diff --git a/.gitignore b/.gitignore index 2f60626..82ab30a 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ pkg/cli/webapp/*.tsbuildinfo !pkg/cli/webapp/dist/ !pkg/cli/webapp/dist/** .grite/ -pkg/cli/webapp/dist/ +hack/ diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..6e55617 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +dev: go run ./cmd/captain serve --dev diff --git a/README.md b/README.md index 125060f..e3a63c4 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,7 @@ The container workflow is designed to package things like: ```text captain/ ├── cmd/captain/ # CLI entrypoint +├── docs/ # Astro documentation site ├── pkg/ai/ # AI abstraction, provider config, models ├── pkg/ai/agent/ # Iterative agent loop, plugins (verify, worktree, judge) ├── pkg/ai/fixture/ # YAML fixture runner for Claude configuration benchmarks @@ -468,9 +469,12 @@ Interactive wizard that writes `~/.captain.yaml` with defaults for backend, mode captain serve captain serve --port 8080 captain serve --dev +go run ./cmd/captain serve --dev --open +task www:dev +task www:build ``` -Starts an HTTP API and embedded web UI. The UI launches `captain ai agent` operations and opens follow-up chat windows that resume the returned session. `--dev` starts the Vite dev server from `pkg/cli/webapp` and proxies `/api` back to the Go process. +Starts an HTTP API and embedded web UI. The UI launches `captain ai agent` operations and opens follow-up chat windows that resume the returned session. `--dev` starts the Vite dev server from `pkg/cli/webapp` and proxies `/api` back to the Go process. Use `task www:dev` for the local Go-backed Vite proxy with the browser opened, and `task www:build` to rebuild the embedded web UI assets. ### MCP server @@ -508,6 +512,15 @@ Binary output: .bin/captain ``` +### Docs + +```bash +task docs:dev +task docs:build +``` + +The Astro docs site lives in `docs/`. The prompts engine is the first complete section; other Captain areas are scaffolded for future expansion. + ### Test ```bash diff --git a/Taskfile.yaml b/Taskfile.yaml index ed4032f..4e2e7ca 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -16,6 +16,35 @@ tasks: - mkdir -p {{.BIN_DIR}} - go build -o {{.BIN_DIR}}/{{.BINARY}} ./cmd/captain + www:build: + desc: Build the embedded Captain web UI + dir: pkg/cli/webapp + cmds: + - CI=true pnpm install --frozen-lockfile + - pnpm run build + - touch dist/.gitkeep + + www:dev: + desc: Start Captain with the Vite dev proxy and open the browser + dir: pkg/cli/webapp + cmds: + - CI=true pnpm install --frozen-lockfile + - cd ../../.. && go run ./cmd/captain serve --dev --open + + docs:build: + desc: Build the Captain Astro documentation site + dir: docs + cmds: + - CI=true pnpm install --frozen-lockfile + - pnpm run build + + docs:dev: + desc: Start the Captain Astro documentation site + dir: docs + cmds: + - CI=true pnpm install --frozen-lockfile + - pnpm run dev + lint: desc: Run linters cmds: diff --git a/cmd/captain/main.go b/cmd/captain/main.go index 512dabd..2a15202 100644 --- a/cmd/captain/main.go +++ b/cmd/captain/main.go @@ -76,8 +76,9 @@ func main() { sessionsCmd := &cobra.Command{Use: "sessions", Short: "Browse Claude and Codex sessions"} rootCmd.AddCommand(sessionsCmd) - clicky.AddNamedCommand("list", sessionsCmd, cli.SessionListOptions{}, cli.RunSessionList).Short = "List discovered sessions" - clicky.AddNamedCommand("get", sessionsCmd, cli.SessionGetOptions{}, cli.RunSessionGet).Short = "Show a session transcript" + clicky.AddNamedCommandWithContext("list", sessionsCmd, cli.SessionListOptions{}, cli.RunSessionList).Short = "List discovered sessions" + clicky.AddNamedCommandWithContext("live", sessionsCmd, cli.SessionLiveOptions{}, cli.RunSessionLive).Short = "List sessions with live process health" + clicky.AddNamedCommandWithContext("get", sessionsCmd, cli.SessionGetOptions{}, cli.RunSessionGet).Short = "Show a session transcript" sandboxCmd := &cobra.Command{ Use: "sandbox", @@ -169,6 +170,13 @@ func main() { clicky.AddNamedCommand("build", containerCmd, cli.ContainerBuildOptions{}, cli.RunContainerBuild).Short = "Build container image" clicky.AddNamedCommand("run", containerCmd, cli.ContainerRunOptions{}, cli.RunContainerRun).Short = "Run container sandbox" + cli.RegisterPromptEntity() + clicky.GenerateCLI(rootCmd) + if err := cli.AttachPromptSchemaFlag(rootCmd); err != nil { + fmt.Fprintf(os.Stderr, "failed to attach prompt schema flag: %v\n", err) + os.Exit(1) + } + mcpConfig := &mcp.Config{ Name: "captain", Version: version, diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..9cf63f7 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,4 @@ +node_modules +dist +.astro + diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs new file mode 100644 index 0000000..6158d3f --- /dev/null +++ b/docs/astro.config.mjs @@ -0,0 +1,15 @@ +import mdx from "@astrojs/mdx"; +import react from "@astrojs/react"; +import tailwindcss from "@tailwindcss/vite"; +import { defineConfig } from "astro/config"; + +export default defineConfig({ + integrations: [mdx(), react()], + vite: { + plugins: [tailwindcss()], + resolve: { + dedupe: ["react", "react-dom", "@tanstack/react-query"], + }, + }, +}); + diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 0000000..ca4a344 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,47 @@ +{ + "name": "captain-docs", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "astro dev", + "build": "astro build", + "preview": "astro preview", + "check": "astro check" + }, + "dependencies": { + "@astrojs/mdx": "^7.0.2", + "@astrojs/react": "^6.0.1", + "@flanksource/clicky-ui": "link:../../clicky-ui/packages/ui", + "@flanksource/icons": "^1.0.60", + "@mdxeditor/editor": "^4.0.4", + "@radix-ui/react-compose-refs": "^1.1.2", + "@radix-ui/react-slot": "^1.1.1", + "@shikijs/langs": "^1.24.0", + "@shikijs/themes": "^1.24.0", + "@shikijs/transformers": "^1.24.0", + "@tailwindcss/vite": "^4.3.2", + "@tanstack/react-query": "^5.90.12", + "ai": "^6.0.199", + "astro": "^7.0.6", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "dompurify": "^3.4.7", + "jotai": "^2.16.0", + "marked": "^17.0.1", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-rnd": "^10.5.3", + "recharts": "^3.8.1", + "shiki": "^1.24.0", + "streamdown": "^2.5.0", + "tailwind-merge": "^2.6.0", + "tailwindcss": "^4.3.2" + }, + "devDependencies": { + "@types/react": "^18.3.28", + "@types/react-dom": "^18.3.7", + "typescript": "~6.0.3" + } +} + diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml new file mode 100644 index 0000000..81b1fc4 --- /dev/null +++ b/docs/pnpm-lock.yaml @@ -0,0 +1,7882 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@astrojs/mdx': + specifier: ^7.0.2 + version: 7.0.2(@astrojs/markdown-satteri@0.3.3)(astro@7.0.6(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(jiti@2.7.0)) + '@astrojs/react': + specifier: ^6.0.1 + version: 6.0.1(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@flanksource/clicky-ui': + specifier: link:../../clicky-ui/packages/ui + version: link:../../clicky-ui/packages/ui + '@flanksource/icons': + specifier: ^1.0.60 + version: 1.0.60(react@18.3.1) + '@mdxeditor/editor': + specifier: ^4.0.4 + version: 4.0.4(@codemirror/language@6.12.4)(@lezer/highlight@1.2.3)(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(yjs@13.6.31) + '@radix-ui/react-compose-refs': + specifier: ^1.1.2 + version: 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-slot': + specifier: ^1.1.1 + version: 1.3.0(@types/react@18.3.31)(react@18.3.1) + '@shikijs/langs': + specifier: ^1.24.0 + version: 1.29.2 + '@shikijs/themes': + specifier: ^1.24.0 + version: 1.29.2 + '@shikijs/transformers': + specifier: ^1.24.0 + version: 1.29.2 + '@tailwindcss/vite': + specifier: ^4.3.2 + version: 4.3.2(vite@8.1.3(esbuild@0.28.1)(jiti@2.7.0)) + '@tanstack/react-query': + specifier: ^5.90.12 + version: 5.101.2(react@18.3.1) + ai: + specifier: ^6.0.199 + version: 6.0.219(zod@4.4.3) + astro: + specifier: ^7.0.6 + version: 7.0.6(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(jiti@2.7.0) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + dompurify: + specifier: ^3.4.7 + version: 3.4.11 + jotai: + specifier: ^2.16.0 + version: 2.20.1(@babel/core@7.29.7)(@babel/template@7.29.7)(@types/react@18.3.31)(react@18.3.1) + marked: + specifier: ^17.0.1 + version: 17.0.6 + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + react-rnd: + specifier: ^10.5.3 + version: 10.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + recharts: + specifier: ^3.8.1 + version: 3.9.1(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react-is@17.0.2)(react@18.3.1)(redux@5.0.1) + shiki: + specifier: ^1.24.0 + version: 1.29.2 + streamdown: + specifier: ^2.5.0 + version: 2.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + tailwind-merge: + specifier: ^2.6.0 + version: 2.6.1 + tailwindcss: + specifier: ^4.3.2 + version: 4.3.2 + devDependencies: + '@types/react': + specifier: ^18.3.28 + version: 18.3.31 + '@types/react-dom': + specifier: ^18.3.7 + version: 18.3.7(@types/react@18.3.31) + typescript: + specifier: ~6.0.3 + version: 6.0.3 + +packages: + + '@ai-sdk/gateway@3.0.143': + resolution: {integrity: sha512-RCH60KsUaNiZkI/fBuyau4yvYrVBIEgAcN+Ain94QpL1kVm28GduQzFKfGffAiJU2We0ZrmN4BHkoCZzACK96Q==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + + '@ai-sdk/provider-utils@4.0.35': + resolution: {integrity: sha512-bjYld/2KGPLt78kpqbya+fD4LYS7BqVQJyUjE3qAHrYB0FR2Q90BaWEVIBZaguTWXf/A8L6uG1zO1v9TxVlGWg==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + + '@ai-sdk/provider@3.0.13': + resolution: {integrity: sha512-ZPtVYt5QIJzOta1kdUiDuCx4HhFkvNPv/rvmZ2b1iXwybYjJsCnNYR4PAw4kW7rgVfDARvHXcU64efWuqNp6bw==} + engines: {node: '>=18'} + + '@antfu/install-pkg@1.1.0': + resolution: {integrity: sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==} + + '@astrojs/compiler-binding-darwin-arm64@0.3.0': + resolution: {integrity: sha512-3n0uu+uJpnCq8b4JFi3uGDsIisAvHctxSmH+cIO9Gbei1H1Y1QXaYboXyiWJugUmprr3OEYP7+LdodzpVFzLMQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@astrojs/compiler-binding-darwin-x64@0.3.0': + resolution: {integrity: sha512-scxNGKjOBydMo1QR4LtK0FMgh7ubQomJDv953nz2msQFkPKke/0FpPv/cQM0T/kuZdReZQFU8Oz3iOrP/6WHEg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@astrojs/compiler-binding-linux-arm64-gnu@0.3.0': + resolution: {integrity: sha512-NZrWLolVUANmrnl0zrFK/Sx5Sock1gEUT49ALfMTTCA5Ya2ec/BoJXMIg4KgE+wZcrdXJ8e+WyEhM7YLk/FJkA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@astrojs/compiler-binding-linux-arm64-musl@0.3.0': + resolution: {integrity: sha512-PjwRmKgMFDsFhg82g0poXlIY8Qn3fMA3hXjaR0coJWJzTJsRH9ATU0j2ocigjtU1h3vL/yR7yLUxGj/lTCq73g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@astrojs/compiler-binding-linux-x64-gnu@0.3.0': + resolution: {integrity: sha512-Dr69VJYlnSfyL8gzELW6S4mE41P7TDPn1IKjwMnjdZ7+dxgJI50oMLFSk1LVe26bHmWB3ktuh8fDVK1THI9e9A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@astrojs/compiler-binding-linux-x64-musl@0.3.0': + resolution: {integrity: sha512-AEt+bRw8PfImCcyRH1lpXVB8CdmQ1K/wPo5u99iec4/U/XdNvQZ715YVuNzIJpbJXelgQeZ5H2+Ea7XwRyWY5g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@astrojs/compiler-binding-wasm32-wasi@0.3.0': + resolution: {integrity: sha512-U80tA1j8V6LjhiTZzVCtG4E8hrNVVNXDGV5fCgJ94q8FU9CPH+XwdDDhLzBybfWhKfyItXmQiZNRPTiPCYTpVg==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@astrojs/compiler-binding-win32-arm64-msvc@0.3.0': + resolution: {integrity: sha512-CpY1RII2r1XMpOUVD1VR/F2wtuRsiOCkFULS10Khyj8/DFZMtxVuUCAWGw+CW2Ka0h6eP3Xc1CA+glFlvXMPxA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@astrojs/compiler-binding-win32-x64-msvc@0.3.0': + resolution: {integrity: sha512-qmFbs769oeeGrRebAnCW7aBk8m71vf85W/dX/jddfx5Z06/w0wf7TZCfJPOX1Fld2t+4N+iXzfGEJG+zJQ+bzg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@astrojs/compiler-binding@0.3.0': + resolution: {integrity: sha512-zlsOT5COD9hRwplJCgQhS21unxON5AKirf0vgt1ijXwuseYIaZdm2ZOpF8fsz+DY9EyXx+I/ukxtg7uoBep68A==} + engines: {node: ^20.19.0 || >=22.12.0} + + '@astrojs/compiler-rs@0.3.0': + resolution: {integrity: sha512-J2qEVHtIDjEM9TxwmwuebOGmZNwhKu/dR7P7qBpnJKGmBBX0vdweQ/4cEXhj8fBbWVUB5V12xWChri3CgKNULQ==} + engines: {node: '>=22.12.0'} + + '@astrojs/internal-helpers@0.10.1': + resolution: {integrity: sha512-5phcroT/vmOOrYuuAxtkbPixy5hePtlz9i8K4OeDv3dNK6/UQRuXPOSRTxIOBbUY5Sonw2UaxjbuVc43Mcir6Q==} + + '@astrojs/markdown-remark@7.2.1': + resolution: {integrity: sha512-jPVNIqTvk+yKviikszv/Y1U4jGUSKpp/Nw48QZV4qjWgp70j4Lkq3lhSDRbWwCfgKvEyO9GHuVbV1dM2WYXy1w==} + + '@astrojs/markdown-satteri@0.3.3': + resolution: {integrity: sha512-Lje33Ittd8UQGgbIIWQvhPkj5X5c4b1sZnZWX3JQV/AWpfbuQGxVi2ONt6+ScydcwfR4egilslEWyczMclrJ1g==} + + '@astrojs/mdx@7.0.2': + resolution: {integrity: sha512-l+sJY5U1KkGZUdr+bIL4Y6BefeS549qoSHVSkUSs6A9INwdCND+/0+vN0NroPBXwl5Vcg5u78t7VQRsJjePxbw==} + engines: {node: '>=22.12.0'} + peerDependencies: + '@astrojs/markdown-satteri': ^0.3.1 + astro: ^7.0.0 + peerDependenciesMeta: + '@astrojs/markdown-satteri': + optional: true + + '@astrojs/prism@4.0.2': + resolution: {integrity: sha512-KTivpmnz6lDsC6o9H4+DNm2SrE/GHzw8cNAvEJwAvUT+eoaEnn/4NtbDNfRRaxaJHdp15gf+tfHAWiXR4wB3BA==} + engines: {node: '>=22.12.0'} + + '@astrojs/react@6.0.1': + resolution: {integrity: sha512-Afs1sEm72P2plDnrOGxmIteJ7bjx/VqxlcaQLNip5eHJ5tIvKUORQetC9UKcvgwKnj51t60HWl5mOANkOsWs4w==} + engines: {node: '>=22.12.0'} + peerDependencies: + '@types/react': ^17.0.50 || ^18.0.21 || ^19.0.0 + '@types/react-dom': ^17.0.17 || ^18.0.6 || ^19.0.0 + react: ^17.0.2 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.2 || ^18.0.0 || ^19.0.0 + + '@astrojs/telemetry@3.3.2': + resolution: {integrity: sha512-j8DNruA8ors99Al39RYZPJK4DC1bKkoNm93mAMuBhY9TCNC4R8n1q7ovFnJ5qhGh5Lsh7pa1gpQVpYpsJPeTHQ==} + engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0} + + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.7': + resolution: {integrity: sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.7': + resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.7': + resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-transform-react-jsx-self@7.29.7': + resolution: {integrity: sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.29.7': + resolution: {integrity: sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/runtime@7.29.7': + resolution: {integrity: sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==} + engines: {node: '>=6.9.0'} + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.7': + resolution: {integrity: sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.7': + resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} + engines: {node: '>=6.9.0'} + + '@braintree/sanitize-url@7.1.2': + resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==} + + '@bruits/satteri-darwin-arm64@0.9.4': + resolution: {integrity: sha512-W3MSUkr2mZRR8Stoe+lqNAyzQzRuFMU8WffV9IvFSxTok0LGWR0ZZQPLELU4QTRiUbhL2Y4VUP9vV7pj8rHjgg==} + cpu: [arm64] + os: [darwin] + + '@bruits/satteri-darwin-x64@0.9.4': + resolution: {integrity: sha512-DXOuuaE1lsv7mpk2mOvGrzqoEWEvOIZEO/fXVa7zfM23Iob+CBjBkRAMwpHA4pmZ3j6Gj7WJzPKw0kQ7w741AQ==} + cpu: [x64] + os: [darwin] + + '@bruits/satteri-linux-arm64-gnu@0.9.4': + resolution: {integrity: sha512-gJxU9rGGoqIznSEgEzpjxkry24jeHuMpoo1tCIAhHYh7WaD3j5F8zt3jmHxEaN1Uwa+K5+wFgIR2uIGOnMzEmw==} + cpu: [arm64] + os: [linux] + + '@bruits/satteri-linux-arm64-musl@0.9.4': + resolution: {integrity: sha512-Wjzu9hmmAbfmDkBfPI1VdZygJtYz9uYZQnkEyrXi6S2JFi+2pXQ1A5irj38bqm0IZmWcTbk0cVG4NZnPdtVNJA==} + cpu: [arm64] + os: [linux] + + '@bruits/satteri-linux-x64-gnu@0.9.4': + resolution: {integrity: sha512-MR1Q+wMx65FQlbSV7cRqWW87Knp0zkoaIV55Dt+xZl028wJABXEPEEmG3670SLq7lVZvcGIDwCgSg2kCYxvRwA==} + cpu: [x64] + os: [linux] + + '@bruits/satteri-linux-x64-musl@0.9.4': + resolution: {integrity: sha512-T4gxhXve3zyNAZesrXAd/rDZOGRkbfFIUFld4TGsw6BsjoIteCcDji6IMqeXyaWEVSykY2X8Eid2hr6aXGYAaw==} + cpu: [x64] + os: [linux] + + '@bruits/satteri-wasm32-wasi@0.9.4': + resolution: {integrity: sha512-/CEG8LUlpaBEnhFnYVn0UnlHFLs51UhrkJBUPDUXLzkadzAcnR88iRA/nOl7Zwhjb4WhfBV4p3P5qeOJMtH0iA==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@bruits/satteri-win32-arm64-msvc@0.9.4': + resolution: {integrity: sha512-E1ZPQbgCtFKiU7pFYVndynvY7ne4coeVDUgnVThErSFlJ2ceQCBZrfRTD1lzrIDy63Bbqo+g/cZY9duw+JYjIw==} + cpu: [arm64] + os: [win32] + + '@bruits/satteri-win32-x64-msvc@0.9.4': + resolution: {integrity: sha512-5I7SiarsNdAUuhJb50CXJPTwr/ECVrBoU+fymoLjChK5fW//+srhY4lstcNTzgFRtQSYfVtm4OQZz16CVMeTeA==} + cpu: [x64] + os: [win32] + + '@capsizecss/unpack@4.0.1': + resolution: {integrity: sha512-CuNiSqg7+e1cO/GjffyMOm5Tt2jUF9CWHHnvQ/UkqvtkGfHdgwEC0wpmq7fkN3gxwpRnrAN0WzO3vREKmNolMQ==} + engines: {node: '>=18'} + + '@chevrotain/types@11.1.2': + resolution: {integrity: sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==} + + '@clack/core@1.4.2': + resolution: {integrity: sha512-0Ty/1Gfm+Kb07sXcuESjyKfwEhSy4Ns1AgeEisHb/bDY5fWme0tTeTkU14T1Gmcs17YIjB/teiDe4uaCghbYqQ==} + engines: {node: '>= 20.12.0'} + + '@clack/prompts@1.6.0': + resolution: {integrity: sha512-EYlRokl8szrP9Z25qT5aepMdBjzBvHF9ZEhzIiUBc9guz/T31EqRgvD0QSgZcpE93xiwrr+OkB4nz0BZyF6fSA==} + engines: {node: '>= 20.12.0'} + + '@codemirror/autocomplete@6.20.3': + resolution: {integrity: sha512-tlosUqb+3BbxCxZdu4tKeRghPFC+QM7q4X5YhKV2eCmPG+1r2F3f4AaSz5sCrFqUtX4Jh20VFTKecl16MgiV9g==} + + '@codemirror/commands@6.10.4': + resolution: {integrity: sha512-Ryk9y9T0FFVF0cUGhAknveAyUOl/A1qReTFi+qPKtOh2Z9F4AUBz3XOrYD4ZEgZirdugVzHvd/2/Wcwy5OliTg==} + + '@codemirror/lang-angular@0.1.4': + resolution: {integrity: sha512-oap+gsltb/fzdlTQWD6BFF4bSLKcDnlxDsLdePiJpCVNKWXSTAbiiQeYI3UmES+BLAdkmIC1WjyztC1pi/bX4g==} + + '@codemirror/lang-cpp@6.0.3': + resolution: {integrity: sha512-URM26M3vunFFn9/sm6rzqrBzDgfWuDixp85uTY49wKudToc2jTHUrKIGGKs+QWND+YLofNNZpxcNGRynFJfvgA==} + + '@codemirror/lang-css@6.3.1': + resolution: {integrity: sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==} + + '@codemirror/lang-go@6.0.1': + resolution: {integrity: sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==} + + '@codemirror/lang-html@6.4.11': + resolution: {integrity: sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw==} + + '@codemirror/lang-java@6.0.2': + resolution: {integrity: sha512-m5Nt1mQ/cznJY7tMfQTJchmrjdjQ71IDs+55d1GAa8DGaB8JXWsVCkVT284C3RTASaY43YknrK2X3hPO/J3MOQ==} + + '@codemirror/lang-javascript@6.2.5': + resolution: {integrity: sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A==} + + '@codemirror/lang-jinja@6.0.1': + resolution: {integrity: sha512-P5kyHLObzjtbGj16h+hyvZTxJhSjBEeSx4wMjbnAf3b0uwTy2+F0zGjMZL4PQOm/mh2eGZ5xUDVZXgwP783Nsw==} + + '@codemirror/lang-json@6.0.2': + resolution: {integrity: sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==} + + '@codemirror/lang-less@6.0.2': + resolution: {integrity: sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==} + + '@codemirror/lang-liquid@6.3.2': + resolution: {integrity: sha512-6PDVU3ZnfeYyz1at1E/ttorErZvZFXXt1OPhtfe1EZJ2V2iDFa0CwPqPgG5F7NXN0yONGoBogKmFAafKTqlwIw==} + + '@codemirror/lang-markdown@6.5.0': + resolution: {integrity: sha512-0K40bZ35jpHya6FriukbgaleaqzBLZfOh7HuzqbMxBXkbYMJDxfF39c23xOgxFezR+3G+tR2/Mup+Xk865OMvw==} + + '@codemirror/lang-php@6.0.2': + resolution: {integrity: sha512-ZKy2v1n8Fc8oEXj0Th0PUMXzQJ0AIR6TaZU+PbDHExFwdu+guzOA4jmCHS1Nz4vbFezwD7LyBdDnddSJeScMCA==} + + '@codemirror/lang-python@6.2.1': + resolution: {integrity: sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==} + + '@codemirror/lang-rust@6.0.2': + resolution: {integrity: sha512-EZaGjCUegtiU7kSMvOfEZpaCReowEf3yNidYu7+vfuGTm9ow4mthAparY5hisJqOHmJowVH3Upu+eJlUji6qqA==} + + '@codemirror/lang-sass@6.0.2': + resolution: {integrity: sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==} + + '@codemirror/lang-sql@6.10.0': + resolution: {integrity: sha512-6ayPkEd/yRw0XKBx5uAiToSgGECo/GY2NoJIHXIIQh1EVwLuKoU8BP/qK0qH5NLXAbtJRLuT73hx7P9X34iO4w==} + + '@codemirror/lang-vue@0.1.3': + resolution: {integrity: sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==} + + '@codemirror/lang-wast@6.0.2': + resolution: {integrity: sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q==} + + '@codemirror/lang-xml@6.1.0': + resolution: {integrity: sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==} + + '@codemirror/lang-yaml@6.1.3': + resolution: {integrity: sha512-AZ8DJBuXGVHybpBQhmZtgew5//4hv3tdkXnr3vDmOUMJRuB6vn/uuwtmTOTlqEaQFg3hQSVeA90NmvIQyUV6FQ==} + + '@codemirror/language-data@6.5.2': + resolution: {integrity: sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==} + + '@codemirror/language@6.12.4': + resolution: {integrity: sha512-1q4PaT+o6PbgpkJt4Q8Fv5XJxTy4FUZ4MWETtyiDw3J0Pyr9E2vqcKL+k9wcvjNTIsauxvE7OfmWj3FRPHQ76A==} + + '@codemirror/legacy-modes@6.5.3': + resolution: {integrity: sha512-xCsmIzH78MyWkib9jlPaaun57XNkfbMIhagfaZVd0iLTqlpw3jXaIcbZm72MTmmn64eTZpBVNjbyYh+QXnxRsg==} + + '@codemirror/lint@6.9.7': + resolution: {integrity: sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==} + + '@codemirror/merge@6.12.2': + resolution: {integrity: sha512-V8JvyAPjHbPupqP7BeMcsdsYCbyPij74jxIbaIJDORI+VZzW44zFmon8bF+oxGWvOKhcRmkiUMXd8MxHr3YA2w==} + + '@codemirror/search@6.7.1': + resolution: {integrity: sha512-uMe5UO6PamJtSHrXhhHOzSX3ReWtiJrva6GnPMwSOrZtiExb5X5eExhr2OUZQVvdxPsKpY3Ro2mFbQadpPWmHA==} + + '@codemirror/state@6.7.0': + resolution: {integrity: sha512-Zbl9NyscLMZkfXPQnNAIIAFftidrA1UbcJEIMp24C0Bukc2I5T8wJS0wsXYsnDOqCFJUeJ1BITGNs5CqPDSmSg==} + + '@codemirror/view@6.43.4': + resolution: {integrity: sha512-YImu23iyKfncJzT7sRy+rEqEhSc8RhOHqDxwy4WzXRKJwYm6iwf/9OJk5ctCAdZ6yi2ZqaGEvmf55fSVqMDrgg==} + + '@emnapi/core@1.11.1': + resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==} + + '@emnapi/runtime@1.11.1': + resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} + + '@emnapi/runtime@1.11.2': + resolution: {integrity: sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==} + + '@emnapi/wasi-threads@1.2.2': + resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} + + '@esbuild/aix-ppc64@0.28.1': + resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.28.1': + resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.28.1': + resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.28.1': + resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.28.1': + resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.28.1': + resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.28.1': + resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.28.1': + resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.28.1': + resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.28.1': + resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.28.1': + resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.28.1': + resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.28.1': + resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.28.1': + resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.1': + resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.28.1': + resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.28.1': + resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.28.1': + resolution: {integrity: sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.28.1': + resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.28.1': + resolution: {integrity: sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.28.1': + resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.1': + resolution: {integrity: sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.28.1': + resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.28.1': + resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.28.1': + resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.28.1': + resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@flanksource/icons@1.0.60': + resolution: {integrity: sha512-PH/0IFJJlyr9bNMUI2abCpiTP6pmYvwXklkw2OsoSIZHjnBvmb9ogZ0Xxd4J7QElT54T6gPZqQEQjTuAz7DISA==} + peerDependencies: + react: '*' + + '@floating-ui/core@1.7.5': + resolution: {integrity: sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==} + + '@floating-ui/dom@1.7.6': + resolution: {integrity: sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==} + + '@floating-ui/react-dom@2.1.8': + resolution: {integrity: sha512-cC52bHwM/n/CxS87FH0yWdngEZrjdtLW/qVruo68qg+prK7ZQ4YGdut2GyDVpoGeAYe/h899rVeOVm6Oi40k2A==} + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + + '@floating-ui/react@0.27.19': + resolution: {integrity: sha512-31B8h5mm8YxotlE7/AU/PhNAl8eWxAmjL/v2QOxroDNkTFLk3Uu82u63N3b6TXa4EGJeeZLVcd/9AlNlVqzeog==} + peerDependencies: + react: '>=17.0.0' + react-dom: '>=17.0.0' + + '@floating-ui/utils@0.2.11': + resolution: {integrity: sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==} + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@iconify/utils@3.1.3': + resolution: {integrity: sha512-LPKOXPn/zV+zis1oOfGWogaXVpqUybF3ZS6SCZIsz8vg0ivVp9+fVqyYB7xq0aiST/VhUQYGO1qo6uoYSiEJqw==} + + '@img/colour@1.1.0': + resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} + engines: {node: '>=18'} + + '@img/sharp-darwin-arm64@0.35.3': + resolution: {integrity: sha512-RMnFX7YQsMoh7lWfcM4NEHHymBX/rLuKNPVM84XE9ONPcaSCDgE7CHIHpSgPcO2xcRthgBy1HfNO319mwhIAkg==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [darwin] + + '@img/sharp-darwin-x64@0.35.3': + resolution: {integrity: sha512-Xo+5uFBtLN0BKqieTxiFzFPQAUlBbbH5iBKyRX/z1JrbnYsHTfKJnUfL8+p2TPXr1pXqao4eeL4Rl144uDpK9w==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [darwin] + + '@img/sharp-freebsd-wasm32@0.35.3': + resolution: {integrity: sha512-lUxcqWIj2wMQ9BrwNjngcr1gWUr5xgaGThBRqPPalIC2n67Cqj1uPh8NnA/ZhAg8hUbKl+kVHKwgUIwe6ZYPrg==} + engines: {node: '>=20.9.0'} + os: [freebsd] + + '@img/sharp-libvips-darwin-arm64@1.3.2': + resolution: {integrity: sha512-9J6ypZFpQBj4YnePGoq/S38w6nz+vqg5WZLrLGY4YuSemdMq47GMLBPO42MzwdGwpg/agZ7xzZcFHa48xlywfg==} + cpu: [arm64] + os: [darwin] + + '@img/sharp-libvips-darwin-x64@1.3.2': + resolution: {integrity: sha512-m2pW1n6cns9VaubNwsZ+c3CRYjxNQWgJ5gPlnL1nbBcpkBvFm6SCFN5o0psFHI8w9n11NKhFkeEDns98tiqbEw==} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-linux-arm64@1.3.2': + resolution: {integrity: sha512-dqVSFynCox4C/J8kT16V7SIFAns0IjgLwkvYT7p8LQVmJ5OS5b6tI9IGflxTeuBS//zXeFIUbwt5dwxyZ17cnA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linux-arm@1.3.2': + resolution: {integrity: sha512-1eMLzy92I4J6rmi4mAT8yC3HxOtniyGELlzGbNMLLeqe052ahFQ0h6LFq+lh5DsDIdYViIDst08abvSbcEdLXQ==} + cpu: [arm] + os: [linux] + + '@img/sharp-libvips-linux-ppc64@1.3.2': + resolution: {integrity: sha512-3z0NHDxD6n5I9gc05U1eW1AyRm+Gznzq3naMrthPNqE6oYykcogW0l/jfpJdjYnuNl8R7yI9pNbE1XiUeyq0Aw==} + cpu: [ppc64] + os: [linux] + + '@img/sharp-libvips-linux-riscv64@1.3.2': + resolution: {integrity: sha512-bsb4rI+NldGOsXuej2r8OdSS8+zXDVaCWxyWrcv6kneTOlgAHtZABRzBBCwdsPiD90J4myNJuHpg6kA20ImW/w==} + cpu: [riscv64] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.3.2': + resolution: {integrity: sha512-/ABshyj8gCpyIrNXnHn4LorDJ0HHm1VhXPBlxZ8zAtfVPAaSafXPGn+sUSIRiwaSBy0mmFjSjiXI5mkcwdChKQ==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.3.2': + resolution: {integrity: sha512-ITPEtgffGJ0S6G9dRyw/366tJQqFRcHWPHhC+Stpg3Z8AEMrDrTr2lhdz4f/Y/HMbRh//7Z5mBzEpVdi62Oc3w==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.3.2': + resolution: {integrity: sha512-zE9EdiUzUmg5mDT5a1rk5fYJ6GWPloTwWBYDS14naqHsL+EaMpDj1AWnpLgh3u0YCORv2Tt50wrcrpYqkP97Kw==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.3.2': + resolution: {integrity: sha512-m0lrLiUt+lBYnCFr8qV/65yMR4E/c7/wf78I5eKTdkEakFAlZ9QlzEM3QIhhAwVeUhLAHLcCq7a7Vszq/oFNZQ==} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-arm64@0.35.3': + resolution: {integrity: sha512-QgKDspHPnrU+GQ55XPhGwyhC8acLVOOSyAvo1oVfFmrIXLkDNmGWzAfDZ4xK8oSA1qBQrALcHX0G5UZni/SuFQ==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm@0.35.3': + resolution: {integrity: sha512-affVWCTLooy8TSxbDx2qkzuDeaWLNVBA+P//FNBirHsXpP2fuBhk5AuboYUnrDnzoXes8GFjpTx0SBFOCRg+FA==} + engines: {node: '>=20.9.0'} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-ppc64@0.35.3': + resolution: {integrity: sha512-sMd8rDxmpLOwv/7N44klFjOD5DUO7FLdjiXDI0hoxYaf7Ar262dQIEkosE98bps+5HPLtp/EvNqeqQtOycP/IA==} + engines: {node: '>=20.9.0'} + cpu: [ppc64] + os: [linux] + + '@img/sharp-linux-riscv64@0.35.3': + resolution: {integrity: sha512-0Eob78yjlYPfL5vMNWAW55l3R9Y6BQS/gOfe0ZcP9mEz9ohhKSt4im1hayiknXgf8AWrFqMvJcKIdmLmEe7yeQ==} + engines: {node: '>=20.9.0'} + cpu: [riscv64] + os: [linux] + + '@img/sharp-linux-s390x@0.35.3': + resolution: {integrity: sha512-KgAxQ0DxpNOq1rG2t5cgTgShJFGSuU7XO45cqC+1NVOuZnP6tlgZRuSYOfNupGkHID0o3cJOsw4DVeJpMovcGw==} + engines: {node: '>=20.9.0'} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-x64@0.35.3': + resolution: {integrity: sha512-8pqvxubL2PGdhlPy6GLqzDYMUjyRmKAwKHYKixpdJYBUK7PJ0C029XdsnpFIdgRZG68fZiGdHVWcKPvtiPB4cA==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.35.3': + resolution: {integrity: sha512-Vz0iQjzzcSX3HCbfwFfCSG/9SCIqyO0mH2sXyiHaAYfBk0cRsCWXRyQYX0ovCK/PAQBbTzQ0dsPQHh5MAFL59w==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.35.3': + resolution: {integrity: sha512-6O1NPKcDVj9QEdg7Hx549EX8U0rp6yXQERqru6yRN7fGBn32UvIRJUlWnk+8xDCiG76hXVBbX82NZ/ZKr0euIg==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [linux] + + '@img/sharp-wasm32@0.35.3': + resolution: {integrity: sha512-cZ0XkcYGpHZkqW6iCkqTcmUC0CD9DhD5d/qeZlZkfRBn6GnHniZXLUo5+9xw8Iv76YE6LQFN9YNBlKREcCG76w==} + engines: {node: '>=20.9.0'} + + '@img/sharp-webcontainers-wasm32@0.35.3': + resolution: {integrity: sha512-2rnq7bX3NzeR2T4YWgz8qiG4h3TSdMe+vN1iQXpJleSJ3SM5zQ8Fy2SyyXAWlbxpEZ2Y+Z4u1BePgJEYbSy80Q==} + engines: {node: '>=20.9.0'} + cpu: [wasm32] + + '@img/sharp-win32-arm64@0.35.3': + resolution: {integrity: sha512-4bPwFdMbeC4JQ8L8LOyWp6nsHcboP5fxkp6iPOXz2Vg49R42TuMs2whkJ5OAP4/Ul035qOzy0AecOF9VOscn4w==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [win32] + + '@img/sharp-win32-ia32@0.35.3': + resolution: {integrity: sha512-r53mXsBN6lFUDiST764SvgwUdHAqM4rPAiDzAmf4fLoB6X/rkfyTrLCg6+g17wJJiCmB3JYgHuUldCWUIRFSXw==} + engines: {node: ^20.9.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.35.3': + resolution: {integrity: sha512-D4y1vNeZrIIJCN+uHaWVtH86B+aCrdMYYjicy9pXHvbGZeGYLLSd3wdVuC37FxVXlU1ARsk84eKWfWMXGYEqvA==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [win32] + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@lexical/clipboard@0.35.0': + resolution: {integrity: sha512-ko7xSIIiayvDiqjNDX6fgH9RlcM6r9vrrvJYTcfGVBor5httx16lhIi0QJZ4+RNPvGtTjyFv4bwRmsixRRwImg==} + + '@lexical/code@0.35.0': + resolution: {integrity: sha512-ox4DZwETQ9IA7+DS6PN8RJNwSAF7RMjL7YTVODIqFZ5tUFIf+5xoCHbz7Fll0Bvixlp12hVH90xnLwTLRGpkKw==} + + '@lexical/devtools-core@0.35.0': + resolution: {integrity: sha512-C2wwtsMCR6ZTfO0TqpSM17RLJWyfHmifAfCTjFtOJu15p3M6NO/nHYK5Mt7YMQteuS89mOjB4ng8iwoLEZ6QpQ==} + peerDependencies: + react: '>=17.x' + react-dom: '>=17.x' + + '@lexical/dragon@0.35.0': + resolution: {integrity: sha512-SL6mT5pcqrt6hEbJ16vWxip5+r3uvMd0bQV5UUxuk+cxIeuP86iTgRh0HFR7SM2dRTYovL6/tM/O+8QLAUGTIg==} + + '@lexical/hashtag@0.35.0': + resolution: {integrity: sha512-LYJWzXuO2ZjKsvQwrLkNZiS2TsjwYkKjlDgtugzejquTBQ/o/nfSn/MmVx6EkYLOYizaJemmZbz3IBh+u732FA==} + + '@lexical/history@0.35.0': + resolution: {integrity: sha512-onjDRLLxGbCfHexSxxrQaDaieIHyV28zCDrbxR5dxTfW8F8PxjuNyuaG0z6o468AXYECmclxkP+P4aT6poHEpQ==} + + '@lexical/html@0.35.0': + resolution: {integrity: sha512-rXGFE5S5rKsg3tVnr1s4iEgOfCApNXGpIFI3T2jGEShaCZ5HLaBY9NVBXnE9Nb49e9bkDkpZ8FZd1qokCbQXbw==} + + '@lexical/link@0.35.0': + resolution: {integrity: sha512-+0Wx6cBwO8TfdMzpkYFacsmgFh8X1rkiYbq3xoLvk3qV8upYxaMzK1s8Q1cpKmWyI0aZrU6z7fiK4vUqB7+69w==} + + '@lexical/list@0.35.0': + resolution: {integrity: sha512-owsmc8iwgExBX8sFe8fKTiwJVhYULt9hD1RZ/HwfaiEtRZZkINijqReOBnW2mJfRxBzhFSWc4NG3ISB+fHYzqw==} + + '@lexical/mark@0.35.0': + resolution: {integrity: sha512-W0hwMTAVeexvpk9/+J6n1G/sNkpI/Meq1yeDazahFLLAwXLHtvhIAq2P/klgFknDy1hr8X7rcsQuN/bqKcKHYg==} + + '@lexical/markdown@0.35.0': + resolution: {integrity: sha512-BlNyXZAt4gWidMw0SRWrhBETY1BpPglFBZI7yzfqukFqgXRh7HUQA28OYeI/nsx9pgNob8TiUduUwShqqvOdEA==} + + '@lexical/offset@0.35.0': + resolution: {integrity: sha512-DRE4Df6qYf2XiV6foh6KpGNmGAv2ANqt3oVXpyS6W8hTx3+cUuAA1APhCZmLNuU107um4zmHym7taCu6uXW5Yg==} + + '@lexical/overflow@0.35.0': + resolution: {integrity: sha512-B25YvnJQTGlZcrNv7b0PJBLWq3tl8sql497OHfYYLem7EOMPKKDGJScJAKM/91D4H/mMAsx5gnA/XgKobriuTg==} + + '@lexical/plain-text@0.35.0': + resolution: {integrity: sha512-lwBCUNMJf7Gujp2syVWMpKRahfbTv5Wq+H3HK1Q1gKH1P2IytPRxssCHvexw9iGwprSyghkKBlbF3fGpEdIJvQ==} + + '@lexical/react@0.35.0': + resolution: {integrity: sha512-uYAZSqumH8tRymMef+A0f2hQvMwplKK9DXamcefnk3vSNDHHqRWQXpiUo6kD+rKWuQmMbVa5RW4xRQebXEW+1A==} + peerDependencies: + react: '>=17.x' + react-dom: '>=17.x' + + '@lexical/rich-text@0.35.0': + resolution: {integrity: sha512-qEHu8g7vOEzz9GUz1VIUxZBndZRJPh9iJUFI+qTDHj+tQqnd5LCs+G9yz6jgNfiuWWpezTp0i1Vz/udNEuDPKQ==} + + '@lexical/selection@0.35.0': + resolution: {integrity: sha512-mMtDE7Q0nycXdFTTH/+ta6EBrBwxBB4Tg8QwsGntzQ1Cq//d838dpXpFjJOqHEeVHUqXpiuj+cBG8+bvz/rPRw==} + + '@lexical/table@0.35.0': + resolution: {integrity: sha512-9jlTlkVideBKwsEnEkqkdg7A3mije1SvmfiqoYnkl1kKJCLA5iH90ywx327PU0p+bdnURAytWUeZPXaEuEl2OA==} + + '@lexical/text@0.35.0': + resolution: {integrity: sha512-uaMh46BkysV8hK8wQwp5g/ByZW+2hPDt8ahAErxtf8NuzQem1FHG/f5RTchmFqqUDVHO3qLNTv4AehEGmXv8MA==} + + '@lexical/utils@0.35.0': + resolution: {integrity: sha512-2H393EYDnFznYCDFOW3MHiRzwEO5M/UBhtUjvTT+9kc+qhX4U3zc8ixQalo5UmZ5B2nh7L/inXdTFzvSRXtsRA==} + + '@lexical/yjs@0.35.0': + resolution: {integrity: sha512-3DSP7QpmTGYU9bN/yljP0PIao4tNIQtsR4ycauWNSawxs/GQCZtSmAPcLRnCm6qpqsDDjUtKjO/1Ej8FRp0m0w==} + peerDependencies: + yjs: '>=13.5.22' + + '@lezer/common@1.5.2': + resolution: {integrity: sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ==} + + '@lezer/cpp@1.1.6': + resolution: {integrity: sha512-vh9gWWJOXFVY8HBHK3Twzq8MgwG2iN4GSyzBP9sCGTe37P15x2R14VaBQk0VA0ezTRN1KHYBBsHhvpGZ2Xy/pA==} + + '@lezer/css@1.3.4': + resolution: {integrity: sha512-N+tn9tej2hPvyKgHEApMOQfHczDJCwxrRFS3SPn9QjYN+uwHvEDnCgKRrb3mxDYxRS8sKMM8fhC3+lc04Abz5Q==} + + '@lezer/go@1.0.1': + resolution: {integrity: sha512-xToRsYxwsgJNHTgNdStpcvmbVuKxTapV0dM0wey1geMMRc9aggoVyKgzYp41D2/vVOx+Ii4hmE206kvxIXBVXQ==} + + '@lezer/highlight@1.2.3': + resolution: {integrity: sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==} + + '@lezer/html@1.3.13': + resolution: {integrity: sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg==} + + '@lezer/java@1.1.3': + resolution: {integrity: sha512-yHquUfujwg6Yu4Fd1GNHCvidIvJwi/1Xu2DaKl/pfWIA2c1oXkVvawH3NyXhCaFx4OdlYBVX5wvz2f7Aoa/4Xw==} + + '@lezer/javascript@1.5.4': + resolution: {integrity: sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==} + + '@lezer/json@1.0.3': + resolution: {integrity: sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==} + + '@lezer/lr@1.4.10': + resolution: {integrity: sha512-rnCpTIBafOx4mRp43xOxDJbFipJm/c0cia/V5TiGlhmMa+wsSdoGmUN3w5Bqrks/09Q/D4tNAmWaT8p6NRi77A==} + + '@lezer/markdown@1.6.4': + resolution: {integrity: sha512-N0SxazMj4k65DBfaf1azqtMZd6u7MqluP84/NZnB/io8Td9aleFmAhz9hcbvSfsxT5tdYlJ5qgv5aMJGY4zEtA==} + + '@lezer/php@1.0.5': + resolution: {integrity: sha512-W7asp9DhM6q0W6DYNwIkLSKOvxlXRrif+UXBMxzsJUuqmhE7oVU+gS3THO4S/Puh7Xzgm858UNaFi6dxTP8dJA==} + + '@lezer/python@1.1.19': + resolution: {integrity: sha512-MhQIURHRytsNzP/YXnqpYKW6la6voAH3kyplTOOiCdjyFY6cWWGFVmYVdHIPrElqSDf4iCDktQCockB9FxuhzQ==} + + '@lezer/rust@1.0.2': + resolution: {integrity: sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==} + + '@lezer/sass@1.1.0': + resolution: {integrity: sha512-3mMGdCTUZ/84ArHOuXWQr37pnf7f+Nw9ycPUeKX+wu19b7pSMcZGLbaXwvD2APMBDOGxPmpK/O6S1v1EvLoqgQ==} + + '@lezer/xml@1.0.6': + resolution: {integrity: sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==} + + '@lezer/yaml@1.0.4': + resolution: {integrity: sha512-2lrrHqxalACEbxIbsjhqGpSW8kWpUKuY6RHgnSAFZa6qK62wvnPxA8hGOwOoDbwHcOFs5M4o27mjGu+P7TvBmw==} + + '@marijn/find-cluster-break@1.0.3': + resolution: {integrity: sha512-FY+MKLBoTsLNJF/eLWaOsXGdz6uh3Iu1axjPf6TUq92IYumcTcXWHoS747JARLkcdlJ/Waiaxc5wQfFO8jC6NA==} + + '@mdx-js/mdx@3.1.1': + resolution: {integrity: sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ==} + + '@mdxeditor/editor@4.0.4': + resolution: {integrity: sha512-fUUWoIFfHB4g+PHkcpKp5zRfoMmDWrVeSaoB4x81759J2xrWsmYYoCYx0oVLcL6HXat8f/8LprlRmAxpcIPnLQ==} + engines: {node: '>=16'} + peerDependencies: + react: '>= 18 || >= 19' + react-dom: '>= 18 || >= 19' + + '@mdxeditor/gurx@1.2.4': + resolution: {integrity: sha512-9ZykIFYhKaXaaSPCs1cuI+FvYDegJjbKwmA4ASE/zY+hJY6EYqvoye4esiO85CjhOw9aoD/izD/CU78/egVqmg==} + engines: {node: '>=16'} + peerDependencies: + react: '>= 18 || >= 19' + react-dom: '>= 18 || >= 19' + + '@mermaid-js/parser@1.2.0': + resolution: {integrity: sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==} + + '@napi-rs/wasm-runtime@1.1.6': + resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + + '@opentelemetry/api@1.9.1': + resolution: {integrity: sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==} + engines: {node: '>=8.0.0'} + + '@oslojs/encoding@1.1.0': + resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} + + '@oxc-project/types@0.138.0': + resolution: {integrity: sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==} + + '@radix-ui/colors@3.0.0': + resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==} + + '@radix-ui/number@1.1.2': + resolution: {integrity: sha512-ceTwaxc4I5IOi97DgCotl3pqiyRGvffcc0oOsE2dQYaJOFIDsDt4VWG6xEbg1QePv9QWausCEIppud/tJ1wNig==} + + '@radix-ui/primitive@1.1.4': + resolution: {integrity: sha512-7AdCK9PQyiljKoBDbN8OuctCbd/esdwZPQ8RtOE3SsyQtUpiPb+ND75q0jEhC1m1ecBI0MFNeLJvwIh9iKHRcQ==} + + '@radix-ui/react-arrow@1.1.11': + resolution: {integrity: sha512-Kdil9BB1rIFC/khmf4hC35bn8701AJcizTU7G7cUbEbk5XqqbjDuHW60uUfKqO5WojjZcbAW51Q7P0hRmMLw8A==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-collection@1.1.11': + resolution: {integrity: sha512-djW9+zeg137KQdlPtmE8xnaD+K2rcXXMWFrSg0hsmYZ6HRbdTA7tDHFgpaW9+huWVEu0RCabL+985T4TA0BE7g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-compose-refs@1.1.3': + resolution: {integrity: sha512-rYOP8OMnuuPMQF1uhPVlGNcCDlkokKqGFE3JcxFViIkAXP7EvFWUliJAstrapypaBLJNHbZL6jGhbVDGTwmVhA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-context@1.1.4': + resolution: {integrity: sha512-QwH4PO5urrbO+FaGd5Aglg+YJgWTyyuZ3g/6mKvsqraLkglDdckw9JafgL5McL5VEJ6EPNduPaT3ZE9BttDAqg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-dialog@1.1.18': + resolution: {integrity: sha512-apa28mldjMgORmE6g/w3sCcA0Y9UAVeeDVoozN4i7kOw12mLl9RBchfzK3Nn6qxOWjrZhK1Lfy7f07kyzxtnBw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-direction@1.1.2': + resolution: {integrity: sha512-C3vFhbyi4SW3PmbAi6Awpu4OzJtd0MxGurvSsYtr7p7nM8RNB3VAF3CUmnp2j50knpkrRcB7+ycVXzgLgF6yNA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-dismissable-layer@1.1.14': + resolution: {integrity: sha512-4lUhWTWAjbDIqFrAPWJ3WqBOpO5YchVZ88X3nh6H9Lu5AFi5nCUeTPj3D8FSDmabmFeRe9ME0BDA4MwKTha5GQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-focus-guards@1.1.4': + resolution: {integrity: sha512-cot/aB/mOm0IYVYTTmQcEEK1M48lZWi8FlYe5nDPQQ8NYZUlXEFgncJ9p2Kzer3RKSrY7cTTpEMLZKNo9QoP5Q==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-focus-scope@1.1.11': + resolution: {integrity: sha512-Mn88Vg2whaRocGJNOH+DKFqYm6ySFPQaiwHNxZPyjn99B52KAEJWWY9NP83+nWdk2HM3rdov+STu9AG471Rt9w==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-icons@1.3.2': + resolution: {integrity: sha512-fyQIhGDhzfc9pK2kH6Pl9c4BDJGfMkPqkyIgYDthyNYoNg3wVhoJMMh19WS4Up/1KMPFVpNsT2q3WmXn2N1m6g==} + peerDependencies: + react: ^16.x || ^17.x || ^18.x || ^19.0.0 || ^19.0.0-rc + + '@radix-ui/react-id@1.1.2': + resolution: {integrity: sha512-orBC88futVpqCmhX1p4cvquNHsELQ+w+vBJnuj3ftETI5bJb0bZn3Tqu3SWN2IOcPycTnMGnhwoermvISt72sA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-popover@1.1.18': + resolution: {integrity: sha512-qdXDes+eHlnMUGlBAAAe5EG7oOQvqsXuq4mq585diMudg80iB+jHbsSeG3+Q4eWNsogNyhqU2p/3i+Y0iEepqg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-popper@1.3.2': + resolution: {integrity: sha512-3QXNeMkdshed1MR3LNoiCirBywRFPkD8ETJa/HlPuLwSajaQixf2ro+isoDNJlGABg9ug41XuZpINZJIle4XWg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-portal@1.1.13': + resolution: {integrity: sha512-z3oXfmaHLJTF1wktbjgD6cn9jiEbq3WSondB10LIuIt2m2Ym4iJlrW04/euMwENDdWDdE7z+OuY7Qyp1YpRSwA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-presence@1.1.6': + resolution: {integrity: sha512-zdTk4PlUO0E18HnZ3wYbW0KkJJxWCdiNYp6g6X1PtONFhxVkg01vliTJAmwIszU6mHiyBOoW9P0rAugl5/hULQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-primitive@2.1.7': + resolution: {integrity: sha512-bC3NiwsprbxKjuon9l7X6BUTw7FPVzEYaL92MPEY5SCd/9hUTPXVFtVwRix7778wtRsVao+zE062gL79FZleeQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-roving-focus@1.1.14': + resolution: {integrity: sha512-8Qcnx9447tx/aCBgw6Jenfqg4Skq+vqab9mCBmuGNipIS5YXvL275wbKEu7+ICYHIlAPgCduUMJH1XOYewKF6Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-select@2.3.2': + resolution: {integrity: sha512-brXD6C/V0fVK0DDbscLVw6LsXrjQ+ay8jdOBaN+tLb4vsHsAMm6Gt6eT77wHX1Eq8GPtD5rJ+RxFtfDozsb4+Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-separator@1.1.11': + resolution: {integrity: sha512-jRhe86+8PF7VZ1u14eOWVOuh2BuAhALg/FT1VcMC4OHedMTRUazDnDlKTt+yxo5cRNKHMfmvZ4sSQtWDeMV4CQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-slot@1.3.0': + resolution: {integrity: sha512-MojKku4U/miO8Av4Dkb+ctMAQx7JmY96LmtDQlAarCRtd7rN52QCSzBF+XAvr5S6coSVj9HEPBgHAHKEJVk/WA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-toggle-group@1.1.14': + resolution: {integrity: sha512-TK1vusNKb8IRhF23FTbRgUNZ9zfs5rGIyI7LfR3h26p9LrQ060i0uW9QWeD8baZMddaaP0DBGlIa6pbZG+mitg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-toggle@1.1.13': + resolution: {integrity: sha512-bI2ILJrzwgmAsH05TsJ9pVrzqQwAip7OM2/krqAdYn0R16bl86UPWbe5VPHsALat0EnqpV01cGtkleaUKPNdNg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-toolbar@1.1.14': + resolution: {integrity: sha512-L/EkWVqlnj3lL2toHh4C7PwH2jxfa7OCq6lGfXSCii99ve2S4Ux5rc9HnOa7LN9exHa/Nl9kmCAmP9BuDPy5UA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-tooltip@1.2.11': + resolution: {integrity: sha512-8XZ6Py3y3W2nEzAUGCN5cfVKaUi+CVApcz1d6lrNVVf2hvYEixMRkq8k9ggPKnQUpRRuOV5avt8uvxViH2jLwA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-use-callback-ref@1.1.2': + resolution: {integrity: sha512-xCso9j1/u8sEgP1RNHjFrXJLApL8LiqOkI1R4ywuN00rxWdYg4oQXuwKLS3i0j5NWLromUD27/4nlxj2UFVvIw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-controllable-state@1.2.3': + resolution: {integrity: sha512-PLzC90MS+ReootmjC597dvopoelpZ8Q61HJkDXZSExitIq7PL55vHNnesAHwguHK0aPfBnpdNzQtv1uliaqQrA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-effect-event@0.0.3': + resolution: {integrity: sha512-6c8ZqvPTWILEKnyVkP53EGRCcpnJiKTC21sS/6R1GF5xKyHJJWQEPfkqlcgUkdRQivd6tb23abUwe4ngWmY0JA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-layout-effect@1.1.2': + resolution: {integrity: sha512-jrBWOxZITuGcnjRCM2t2U5ZPkCLxD+Ym6DjfssS5haTj2iiak/DOb64JeN6OdLfLgptb6/e2kKR+ZuTrGoZTPA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-previous@1.1.2': + resolution: {integrity: sha512-IGBQPtRFdhN6MQ8dbegVmBq1LVZluya3F1jWY+puIcQC3MHctRwTDSBWCkL/3ZcnMJLTMJ++Z+ktmvg0F89iCw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-rect@1.1.2': + resolution: {integrity: sha512-d8a+bBY/FxikNPlgJJoaBHZX+zKVbWHYJGTLnLvveQgFSTntkGdEKv3JDtHrMS0DNYpllz2nRsTLGLKYttbpmw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-size@1.1.2': + resolution: {integrity: sha512-giWQp+4mxjBPt4KZ0MmyuykFNWfbDxKt4x+fPkRYmgRFJSbCZFzUglvMb/Kjn38tm10YP4ufiQZDx3zna4LU6w==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-visually-hidden@1.2.7': + resolution: {integrity: sha512-1wNZBggTDK3GRuuQ6nP4k2yi7a6l7I5qbMPbZcRsrGsGVead/f/d5FhEzUvqFs0bcrDLx7n1zKQ3JvLR6whaaw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/rect@1.1.2': + resolution: {integrity: sha512-xnXE7wG13PI+cxieVssYXlQJuYVRhH9NBoxt3KNwzghDIA69GMm7d4wXRouHIYjE+KvS6U/MsMO73NdS2MH9ZA==} + + '@reduxjs/toolkit@2.12.0': + resolution: {integrity: sha512-KiT+RzZbp6mQET+Mg+h2c97+9j1sNflUxQkIHI7Yuzf6Peu+OYpmkn6nbHWmLLWj+1ZODUJFwGZ7gx3L9R9EOw==} + peerDependencies: + react: ^16.9.0 || ^17.0.0 || ^18 || ^19 + react-redux: ^7.2.1 || ^8.1.3 || ^9.0.0 + peerDependenciesMeta: + react: + optional: true + react-redux: + optional: true + + '@rolldown/binding-android-arm64@1.1.4': + resolution: {integrity: sha512-EZLpf/8y7GXkkra90ML47kzik/GMP3EMcE9bPyHmRfxLC6z9+aW5A8poCsoxjrT5GfEcNAAvWwUHjvP1pUQkfw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.1.4': + resolution: {integrity: sha512-aUi+HBvmYb7j8krl1+qJgkG8C17fO79gk3c+jPw4S8glRFc1DTija9S3EyaTSQUm5GJXYKDAsugBEhFHH2vYiQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.1.4': + resolution: {integrity: sha512-F7hHC3gwY11+vByKPRWqwGbeXWVgKmL+pTGCinaEhdihzBV2aQ0fvZOch9cXYUOKuKKq429HeYXOqQLc7wFCEg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.1.4': + resolution: {integrity: sha512-sI5yw+7s92SK6odiEhD5lKCBlWcpjHS5qyqpVQbZAJ0fIzEUXrmbl3DH2ybR3PZogulNJF+COLtmA8hUfvkCCQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.1.4': + resolution: {integrity: sha512-mCi0OKgEieFircrtVYmQAFGszRtMnZ6fpZAXrxanXAu7lqZcsK1E1RAaZNG0uKAnxox3B1f4EyQNnoyMfN1vAA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.1.4': + resolution: {integrity: sha512-B9Ial3Kv5sh0SHnB1g/QWcUQCEvCF6QKGAl4zXypYj65mVI+B4AhFBwPtSN7pDrJeIx8Z7zdy4ntx+wQABom7w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-arm64-musl@1.1.4': + resolution: {integrity: sha512-lZVym0PuHE1KZ22gmFTC15lAkrg9iTszR617oYRB/iPY1A56ywoJzVKOJBKaot5RiikCObmur6pogpse3gRcng==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-ppc64-gnu@1.1.4': + resolution: {integrity: sha512-t2DNiLJWNTbnEHyUzTumldML6ET4/g16467LZoDDJ3tSxGvguL5/NyC2lCsNKuyRycg9XeDQF5SSv+TNOhQEXg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + + '@rolldown/binding-linux-s390x-gnu@1.1.4': + resolution: {integrity: sha512-0WIRnL1Uw4BvTZRLQt+PVgo6ZKTJadlC2btP+/EOXv2f/DWbY0rEgl+y834mIVwP1FkTlWVTrGGJXf12lru7EQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + + '@rolldown/binding-linux-x64-gnu@1.1.4': + resolution: {integrity: sha512-JWtGshGfX+oENAKonoNkqEJX+7hC8yfhi9GUyPX1VX4mdh1y5r+ZiJLR5XzAB0aoP6s/PcILsGjKq8O0mm24bw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@rolldown/binding-linux-x64-musl@1.1.4': + resolution: {integrity: sha512-rT6yQcxUuXs4CnbofqwHRRV0iem349rLMYpTjkgQGLjrY4ado/eDzwPZPTCgTOlF6Nkp8NEv70yLMTn6qkWxsQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@rolldown/binding-openharmony-arm64@1.1.4': + resolution: {integrity: sha512-KXMGoboq5cyaCQjDA4GLuRiOwBQ0EyFnJoVViLeZ45/3rFItRODEr+NdsBcVpll40hhNArlm/speWGRvj08LzA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.1.4': + resolution: {integrity: sha512-5K83rb36oJiY7BCyE9zLZtGcPV4g5wvq+xwdO0XPIwDVZI8cyB/AUjkNXGb92/rnmezEkjMOpgY61rtwjQtFwg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.1.4': + resolution: {integrity: sha512-PnWBtw3TV5KOg69HQQDR0mnQuyCmSGR2pAB4DC1rPF808fgKeTUMj2EOEyKATpgiuxuR5APQmiDO7PDgEjTFSA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.1.4': + resolution: {integrity: sha512-M1lpniBePobTfsa7Ks9a199e1akxsXn+GYBUKsEzv3YFzOm1HJAMNwKI3qr0Zq+mxwx9gOZoTdP1yXRYsZUocQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.0-rc.3': + resolution: {integrity: sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==} + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@rollup/pluginutils@5.4.0': + resolution: {integrity: sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@shikijs/core@1.29.2': + resolution: {integrity: sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ==} + + '@shikijs/core@4.3.0': + resolution: {integrity: sha512-EooU3i9F6IAE8kEu+AnGf9DFZWkQBZ+hJn3tLVbsH+61mtQiva5biai66fAA6nvFPXkLgvrh7BrR7YcJU83xQQ==} + engines: {node: '>=20'} + + '@shikijs/engine-javascript@1.29.2': + resolution: {integrity: sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==} + + '@shikijs/engine-javascript@4.3.0': + resolution: {integrity: sha512-hTv/KiFf2tpiqlACPiztGGurEARWIutB8YUhcrA1pUC7VzzwKO+g5crUocrLztrZ5ro5Z4hbXg7bYclETn3gSQ==} + engines: {node: '>=20'} + + '@shikijs/engine-oniguruma@1.29.2': + resolution: {integrity: sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==} + + '@shikijs/engine-oniguruma@4.3.0': + resolution: {integrity: sha512-1vMdN3gHfnKfLYwecUI2ITJI4RhHt96xEaJumVn7Heb0IlJ8WQMIH0Voak+2j22BpSNKdnOfB/pCTPnPm2gq7A==} + engines: {node: '>=20'} + + '@shikijs/langs@1.29.2': + resolution: {integrity: sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==} + + '@shikijs/langs@4.3.0': + resolution: {integrity: sha512-rnlqFbBRSys9bT4gl/5rw9RnS0W/I84ZldXPkO7cvlEMoV85TyF/aU01N7/NbSR776RNLjrJKjfFUXJR6wN1Cg==} + engines: {node: '>=20'} + + '@shikijs/primitive@4.3.0': + resolution: {integrity: sha512-CPkz64PTa5diRW1ggzMZH9VM/du4RNChYgVtgqrFcgruvIybmCvySv8GkiHSczUHXYuuR8TdKEwFx+UnZMpgdg==} + engines: {node: '>=20'} + + '@shikijs/themes@1.29.2': + resolution: {integrity: sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==} + + '@shikijs/themes@4.3.0': + resolution: {integrity: sha512-Avgt05YiT+Y3prjIc9lmQxhJzHBcCfR6cjiFW4OyaMBbt2A6trX5rfjUzx+Vj/mE9qpArYjatnqo9XPjQNW/AQ==} + engines: {node: '>=20'} + + '@shikijs/transformers@1.29.2': + resolution: {integrity: sha512-NHQuA+gM7zGuxGWP9/Ub4vpbwrYCrho9nQCLcCPfOe3Yc7LOYwmSuhElI688oiqIXk9dlZwDiyAG9vPBTuPJMA==} + + '@shikijs/types@1.29.2': + resolution: {integrity: sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==} + + '@shikijs/types@4.3.0': + resolution: {integrity: sha512-oc8b9U2SYvofKZk8e/737nIX0qwf6eV2vHFATeObAu7r+mUVpLs8Re0BmVkIjAWAYgkmG/CzLNo7rzuBzRu/wQ==} + engines: {node: '>=20'} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@standard-schema/utils@0.3.0': + resolution: {integrity: sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==} + + '@tailwindcss/node@4.3.2': + resolution: {integrity: sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg==} + + '@tailwindcss/oxide-android-arm64@4.3.2': + resolution: {integrity: sha512-WHxqIuHpvZ5VtdX6GTl1Ik/Vp2YuN42Et+0CdeaVd/frQ9jAvGmvR8vLT+jk3e8/Q3x8kECB9+R17pgpp2BulA==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [android] + + '@tailwindcss/oxide-darwin-arm64@4.3.2': + resolution: {integrity: sha512-GZypeUY/IDJW3877KeM+O67vbXr3MBnbtEL4aYhNErv/JWZhye2vGSWWG9tB6iiqR2MqRNkY8IOUy4NdSZV26w==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [darwin] + + '@tailwindcss/oxide-darwin-x64@4.3.2': + resolution: {integrity: sha512-UIIzmefR6KO1sDU7MzRqAxC8iBpft/VhkGjTjnhoS6k7Z3rQ9wEgA1ODSiyH/tcSYssulNm4Ci3hOeK1jH7ccQ==} + engines: {node: '>= 20'} + cpu: [x64] + os: [darwin] + + '@tailwindcss/oxide-freebsd-x64@4.3.2': + resolution: {integrity: sha512-GN+uAmcI6DNspnCDwtOAZrTz6oukJnp337qZvxqCGLd3BHBzJpO0ZbTLRvJNdztOeAmTzewewGIMPb0tk2R4WA==} + engines: {node: '>= 20'} + cpu: [x64] + os: [freebsd] + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.2': + resolution: {integrity: sha512-4ABn7qSbdHRwTiDiuWNegCyb5+2FJ4vKIKc3DmKrvAFw7MU1Lm11dIkTPwUaFdTzc7IsOpDbqBrlh0x6y36U/w==} + engines: {node: '>= 20'} + cpu: [arm] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.2': + resolution: {integrity: sha512-wDgEIGwoM8w8pufh9LVt1PahDgNdKXrLC2qfAnV3vAmococ9RWbxeAw4pxPttd/TsJfwjyLf90Dg1y9y8I6Emw==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-musl@4.3.2': + resolution: {integrity: sha512-J5Nuk0uZQIiMTJj3LEx4sAA9tMFUoXQZFv1J6An+QGYe53HKRJuFDi0rpq/tuouCZeAbOBY3kQ6g8qeD4TUjtA==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-gnu@4.3.2': + resolution: {integrity: sha512-kqCZpSKOBEJO4mz7OqWoofBZeXTAwaVGPj0ErAj7CojmhKpWVWVOnrt9dE8odoIraZq4oj3ausM37kXi+Tow8w==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-musl@4.3.2': + resolution: {integrity: sha512-cixpqbh2toJDmkuCRI68nXA8ZxNmdK9Y+9v5h3MC3ZQKy/0BO8AWzlkWyRM7JAFSGBlfig4YVTPsK6MVgqz1uw==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-wasm32-wasi@4.3.2': + resolution: {integrity: sha512-4ec2Z/LOmRsAgU23CS4xeJfcJlmRg94A/XrbGRCF1gyU/zdDfRLYDVsS+ynSZCmGNxQ1jQriQOKMQeQxBA3Isw==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + bundledDependencies: + - '@napi-rs/wasm-runtime' + - '@emnapi/core' + - '@emnapi/runtime' + - '@tybys/wasm-util' + - '@emnapi/wasi-threads' + - tslib + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.2': + resolution: {integrity: sha512-Zyr/M0+XcYZu3bZrUytc7TXvrk0ftWfl8gN2MwekNDzhqhKRUucMPSeOzM0o0wH5AWOU49BsKRrfKxI2atCPMQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [win32] + + '@tailwindcss/oxide-win32-x64-msvc@4.3.2': + resolution: {integrity: sha512-QI9BO7KlNZsp2GuO0jwAAj5jCDABOKXRkCk2XuKTSaNEFSdfzqswYVTtCHBNKHLsqyjFyFkqlDiwkNbTYSssMQ==} + engines: {node: '>= 20'} + cpu: [x64] + os: [win32] + + '@tailwindcss/oxide@4.3.2': + resolution: {integrity: sha512-z8ZgnzX8gdNoWLBLqBPoh/sjnxkwvf9ZuWjnO0l0yIzbLa5/9S+eC5QxGZKRobVHIC3/1BoMWjHblqWjcgFgag==} + engines: {node: '>= 20'} + + '@tailwindcss/vite@4.3.2': + resolution: {integrity: sha512-eHpMeX4JXfVNJDEcsouTeCBubJBTcTLigeaw/NTUW6PB5ATKKXdyonnXgTBX2VuRbjz1hjfz6C5XAhr52ImQXA==} + peerDependencies: + vite: ^5.2.0 || ^6 || ^7 || ^8 + + '@tanstack/query-core@5.101.2': + resolution: {integrity: sha512-hH5MLoJhF7KaIGd7q3xTXGXvslI+GYlM1Z/35aSHHWaCJWB7XvTSHYuV3eM7tw+aE0mT/xMro4M4Q9rCGHT0lw==} + + '@tanstack/react-query@5.101.2': + resolution: {integrity: sha512-seDkr6kzGzX1okaaTtZPtgA688CDPlXUz1C6xSg0ESqn04Vuc8tlrYms1s3de+znBqhPVxFRfpAfUf+6XvfPWg==} + peerDependencies: + react: ^18 || ^19 + + '@tybys/wasm-util@0.10.3': + resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.27.0': + resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.28.0': + resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} + + '@types/d3-array@3.2.2': + resolution: {integrity: sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==} + + '@types/d3-axis@3.0.6': + resolution: {integrity: sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==} + + '@types/d3-brush@3.0.6': + resolution: {integrity: sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==} + + '@types/d3-chord@3.0.6': + resolution: {integrity: sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==} + + '@types/d3-color@3.1.3': + resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==} + + '@types/d3-contour@3.0.6': + resolution: {integrity: sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==} + + '@types/d3-delaunay@6.0.4': + resolution: {integrity: sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==} + + '@types/d3-dispatch@3.0.7': + resolution: {integrity: sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==} + + '@types/d3-drag@3.0.7': + resolution: {integrity: sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==} + + '@types/d3-dsv@3.0.7': + resolution: {integrity: sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==} + + '@types/d3-ease@3.0.2': + resolution: {integrity: sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==} + + '@types/d3-fetch@3.0.7': + resolution: {integrity: sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==} + + '@types/d3-force@3.0.10': + resolution: {integrity: sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==} + + '@types/d3-format@3.0.4': + resolution: {integrity: sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==} + + '@types/d3-geo@3.1.0': + resolution: {integrity: sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==} + + '@types/d3-hierarchy@3.1.7': + resolution: {integrity: sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==} + + '@types/d3-interpolate@3.0.4': + resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==} + + '@types/d3-path@3.1.1': + resolution: {integrity: sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==} + + '@types/d3-polygon@3.0.2': + resolution: {integrity: sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==} + + '@types/d3-quadtree@3.0.6': + resolution: {integrity: sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==} + + '@types/d3-random@3.0.4': + resolution: {integrity: sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA==} + + '@types/d3-scale-chromatic@3.1.0': + resolution: {integrity: sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==} + + '@types/d3-scale@4.0.9': + resolution: {integrity: sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==} + + '@types/d3-selection@3.0.11': + resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==} + + '@types/d3-shape@3.1.8': + resolution: {integrity: sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==} + + '@types/d3-time-format@4.0.3': + resolution: {integrity: sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==} + + '@types/d3-time@3.0.4': + resolution: {integrity: sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==} + + '@types/d3-timer@3.0.2': + resolution: {integrity: sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==} + + '@types/d3-transition@3.0.9': + resolution: {integrity: sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==} + + '@types/d3-zoom@3.0.8': + resolution: {integrity: sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==} + + '@types/d3@7.4.3': + resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==} + + '@types/debug@4.1.13': + resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==} + + '@types/estree-jsx@1.0.5': + resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/geojson@7946.0.16': + resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==} + + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + + '@types/mdast@4.0.4': + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + + '@types/mdx@2.0.14': + resolution: {integrity: sha512-T48PeuJtvLosNTPVhfnIp3i/n3a4g4Bad7YCq5k64D4u7NwDrAotikQ+5+sjtUvBmxCMlbo3dVL+C2dP0rWHzg==} + + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + + '@types/nlcst@2.0.3': + resolution: {integrity: sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==} + + '@types/prop-types@15.7.15': + resolution: {integrity: sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==} + + '@types/react-dom@18.3.7': + resolution: {integrity: sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==} + peerDependencies: + '@types/react': ^18.0.0 + + '@types/react@18.3.31': + resolution: {integrity: sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==} + + '@types/trusted-types@2.0.7': + resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + + '@types/unist@2.0.11': + resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} + + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + + '@types/use-sync-external-store@0.0.6': + resolution: {integrity: sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==} + + '@ungap/structured-clone@1.3.2': + resolution: {integrity: sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==} + + '@upsetjs/venn.js@2.0.0': + resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==} + + '@vercel/oidc@3.2.0': + resolution: {integrity: sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug==} + engines: {node: '>= 20'} + + '@vitejs/plugin-react@5.2.0': + resolution: {integrity: sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.17.0: + resolution: {integrity: sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==} + engines: {node: '>=0.4.0'} + hasBin: true + + ai@6.0.219: + resolution: {integrity: sha512-rtTDz99Rc9HsstSJ7YdO8DX7DQwS442N2vQ5jOopXDdo4qfkLrtIRpORdztFMOZxX/XjBzHRlvqF6eMg3cpyLA==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + + am-i-vibing@0.4.0: + resolution: {integrity: sha512-MxT4XZL7pzLHpuvhDKdMaQHMGGkJDLluKBLsbstn+8wv9sWcFT6h+0ve9qkml95amVTZtZV83gQe2hY+ojgHLg==} + hasBin: true + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + aria-hidden@1.2.6: + resolution: {integrity: sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==} + engines: {node: '>=10'} + + aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} + + array-iterate@2.0.1: + resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==} + + astring@1.9.0: + resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} + hasBin: true + + astro@7.0.6: + resolution: {integrity: sha512-Myw0sFia+zs/Y0yqfZEsUYXfDPh3ELcLf1f0Q/qQzVXBh/af1qO62WNT+P89DCcfGVV51nMoQhEfkBYqJmoUOQ==} + engines: {node: '>=22.12.0', npm: '>=9.6.5', pnpm: '>=7.1.0'} + hasBin: true + peerDependencies: + '@astrojs/markdown-remark': 7.2.1 + peerDependenciesMeta: + '@astrojs/markdown-remark': + optional: true + + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + + bail@2.0.2: + resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} + + baseline-browser-mapping@2.10.41: + resolution: {integrity: sha512-WwS7MHhqGHHlaVsqRZnhvCEMS0owDX+SxRlve7JkuH7My1Ara3ZriTmCQupPfYjxMZ8I/tgxtJYr2t7taHaH4A==} + engines: {node: '>=6.0.0'} + hasBin: true + + boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + + browserslist@4.28.4: + resolution: {integrity: sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + caniuse-lite@1.0.30001800: + resolution: {integrity: sha512-MMHtuAz9Ys840zAY5F4k6fV5GaivZ9sPk+nz0mY+GYVzRBnYkN0mpqkSR92oWRQ19yQWo4HvBV/FnC16AJX8MA==} + + ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + + character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + + character-entities-legacy@3.0.0: + resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + + character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + + character-reference-invalid@2.0.1: + resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} + + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} + + ci-info@4.4.0: + resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==} + engines: {node: '>=8'} + + class-variance-authority@0.7.1: + resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} + + classnames@2.5.1: + resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + + cm6-theme-basic-light@0.2.0: + resolution: {integrity: sha512-1prg2gv44sYfpHscP26uLT/ePrh0mlmVwMSoSd3zYKQ92Ab3jPRLzyCnpyOCQLJbK+YdNs4HvMRqMNYdy4pMhA==} + peerDependencies: + '@codemirror/language': ^6.0.0 + '@codemirror/state': ^6.0.0 + '@codemirror/view': ^6.0.0 + '@lezer/highlight': ^1.0.0 + + codemirror@6.0.2: + resolution: {integrity: sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==} + + collapse-white-space@2.1.0: + resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} + + comma-separated-tokens@2.0.3: + resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + + commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} + engines: {node: '>=16'} + + commander@7.2.0: + resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} + engines: {node: '>= 10'} + + commander@8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} + + common-ancestor-path@2.0.0: + resolution: {integrity: sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng==} + engines: {node: '>= 18'} + + compute-scroll-into-view@2.0.4: + resolution: {integrity: sha512-y/ZA3BGnxoM/QHHQ2Uy49CLtnWPbt4tTPpEEZiEmmiWBFKjej7nEyH8Ryz54jH0MLXflUYA3Er2zUxPSJu5R+g==} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cookie-es@1.2.3: + resolution: {integrity: sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw==} + + cookie@1.1.1: + resolution: {integrity: sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==} + engines: {node: '>=18'} + + cose-base@1.0.3: + resolution: {integrity: sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==} + + cose-base@2.2.0: + resolution: {integrity: sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==} + + crelt@1.0.7: + resolution: {integrity: sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==} + + crossws@0.3.5: + resolution: {integrity: sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==} + + css-select@5.2.2: + resolution: {integrity: sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==} + + css-tree@2.2.1: + resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + + css-tree@3.2.1: + resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + + css-what@6.2.2: + resolution: {integrity: sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==} + engines: {node: '>= 6'} + + csso@5.0.5: + resolution: {integrity: sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + cytoscape-cose-bilkent@4.1.0: + resolution: {integrity: sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==} + peerDependencies: + cytoscape: ^3.2.0 + + cytoscape-fcose@2.2.0: + resolution: {integrity: sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==} + peerDependencies: + cytoscape: ^3.2.0 + + cytoscape@3.34.0: + resolution: {integrity: sha512-62rNSrioXw93uliKFBwjukeQyeWwH2PqDrTac31r2P6464u3AUvTk0xS4LVvT251g7IgkFunrI48ZEZGjywSOg==} + engines: {node: '>=0.10'} + + d3-array@2.12.1: + resolution: {integrity: sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==} + + d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + + d3-axis@3.0.0: + resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==} + engines: {node: '>=12'} + + d3-brush@3.0.0: + resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==} + engines: {node: '>=12'} + + d3-chord@3.0.1: + resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==} + engines: {node: '>=12'} + + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + + d3-contour@4.0.2: + resolution: {integrity: sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==} + engines: {node: '>=12'} + + d3-delaunay@6.0.4: + resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==} + engines: {node: '>=12'} + + d3-dispatch@3.0.1: + resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + engines: {node: '>=12'} + + d3-drag@3.0.0: + resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} + engines: {node: '>=12'} + + d3-dsv@3.0.1: + resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==} + engines: {node: '>=12'} + hasBin: true + + d3-ease@3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + + d3-fetch@3.0.1: + resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==} + engines: {node: '>=12'} + + d3-force@3.0.0: + resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==} + engines: {node: '>=12'} + + d3-format@3.1.2: + resolution: {integrity: sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==} + engines: {node: '>=12'} + + d3-geo@3.1.1: + resolution: {integrity: sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==} + engines: {node: '>=12'} + + d3-hierarchy@3.1.2: + resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + + d3-path@1.0.9: + resolution: {integrity: sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==} + + d3-path@3.1.0: + resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==} + engines: {node: '>=12'} + + d3-polygon@3.0.1: + resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==} + engines: {node: '>=12'} + + d3-quadtree@3.0.1: + resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==} + engines: {node: '>=12'} + + d3-random@3.0.1: + resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==} + engines: {node: '>=12'} + + d3-sankey@0.12.3: + resolution: {integrity: sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==} + + d3-scale-chromatic@3.1.0: + resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==} + engines: {node: '>=12'} + + d3-scale@4.0.2: + resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + engines: {node: '>=12'} + + d3-selection@3.0.0: + resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + engines: {node: '>=12'} + + d3-shape@1.3.7: + resolution: {integrity: sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==} + + d3-shape@3.2.0: + resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==} + engines: {node: '>=12'} + + d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + + d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + engines: {node: '>=12'} + + d3-timer@3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + + d3-transition@3.0.1: + resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + engines: {node: '>=12'} + peerDependencies: + d3-selection: 2 - 3 + + d3-zoom@3.0.0: + resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} + engines: {node: '>=12'} + + d3@7.9.0: + resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==} + engines: {node: '>=12'} + + dagre-d3-es@7.0.14: + resolution: {integrity: sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==} + + dayjs@1.11.21: + resolution: {integrity: sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decimal.js-light@2.5.1: + resolution: {integrity: sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==} + + decode-named-character-reference@1.3.0: + resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==} + + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} + + delaunator@5.1.0: + resolution: {integrity: sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==} + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + detect-node-es@1.1.0: + resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} + + devalue@5.8.1: + resolution: {integrity: sha512-4CXDYRBGqN+57wVJkuXBYmpAVUSg3L6JAQa/DFqm238G73E1wuyc/JhGQJzN7vUf/CMphYau2zXbfWzDR5aTEw==} + + devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + + diff@5.2.2: + resolution: {integrity: sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==} + engines: {node: '>=0.3.1'} + + diff@8.0.4: + resolution: {integrity: sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw==} + engines: {node: '>=0.3.1'} + + dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + + domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + + domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + + dompurify@3.4.11: + resolution: {integrity: sha512-zhlUV12GsaRzMsf9q5M254YhA4+VuF0fG+QFqu6aYpoGlKtz+w8//jBcGVYBgQkR5GHjUomejY84AV+/uPbWdw==} + + domutils@3.2.2: + resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} + + downshift@7.6.2: + resolution: {integrity: sha512-iOv+E1Hyt3JDdL9yYcOgW7nZ7GQ2Uz6YbggwXvKUSleetYhU2nXD482Rz6CzvM4lvI1At34BYruKAL4swRGxaA==} + peerDependencies: + react: '>=16.12.0' + + dset@3.1.4: + resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} + engines: {node: '>=4'} + + electron-to-chromium@1.5.385: + resolution: {integrity: sha512-78sa/M08MNAYHQfjoWMvOlKQqZ0ElhSm/L5HNUc96VZ3b+KvDVnngFm8sYQy0XrhTRgAhggHr5abA7yTvRdo4Q==} + + emoji-regex-xs@1.0.0: + resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} + + enhanced-resolve@5.21.6: + resolution: {integrity: sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==} + engines: {node: '>=10.13.0'} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + entities@6.0.1: + resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} + engines: {node: '>=0.12'} + + es-module-lexer@2.3.0: + resolution: {integrity: sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw==} + + es-toolkit@1.49.0: + resolution: {integrity: sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==} + + esast-util-from-estree@2.0.0: + resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==} + + esast-util-from-js@2.0.1: + resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==} + + esbuild@0.28.1: + resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + + estree-util-attach-comments@3.0.0: + resolution: {integrity: sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==} + + estree-util-build-jsx@3.0.1: + resolution: {integrity: sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==} + + estree-util-is-identifier-name@3.0.0: + resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==} + + estree-util-scope@1.0.0: + resolution: {integrity: sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==} + + estree-util-to-js@2.0.0: + resolution: {integrity: sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==} + + estree-util-visit@2.0.0: + resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + eventemitter3@5.0.4: + resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} + + eventsource-parser@3.1.0: + resolution: {integrity: sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg==} + engines: {node: '>=18.0.0'} + + extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + + fast-string-truncated-width@3.0.3: + resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} + + fast-string-width@3.0.2: + resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} + + fast-wrap-ansi@0.2.2: + resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==} + + fault@2.0.1: + resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + flattie@1.1.1: + resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} + engines: {node: '>=8'} + + fontace@0.4.1: + resolution: {integrity: sha512-lDMvbAzSnHmbYMTEld5qdtvNH2/pWpICOqpean9IgC7vUbUJc3k+k5Dokp85CegamqQpFbXf0rAVkbzpyTA8aw==} + + fontkitten@1.0.3: + resolution: {integrity: sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw==} + engines: {node: '>=20'} + + format@0.2.2: + resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} + engines: {node: '>=0.4.x'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + get-nonce@1.0.1: + resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} + engines: {node: '>=6'} + + get-tsconfig@5.0.0-beta.4: + resolution: {integrity: sha512-7nF7C9fIPFEMHgEMEfgIlO9wDdZ8CyHw27rWciFZfHvHDReIiPhsYuzPRXsfvBCqFy1l8RRyyWV7QLM+ZhUJsQ==} + engines: {node: '>=20.20.0'} + + github-slugger@2.0.0: + resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + h3@1.15.11: + resolution: {integrity: sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==} + + hachure-fill@0.5.2: + resolution: {integrity: sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==} + + hast-util-from-html@2.0.3: + resolution: {integrity: sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==} + + hast-util-from-parse5@8.0.3: + resolution: {integrity: sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==} + + hast-util-is-element@3.0.0: + resolution: {integrity: sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==} + + hast-util-parse-selector@4.0.0: + resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==} + + hast-util-raw@9.1.0: + resolution: {integrity: sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==} + + hast-util-sanitize@5.0.2: + resolution: {integrity: sha512-3yTWghByc50aGS7JlGhk61SPenfE/p1oaFeNwkOOyrscaOkMGrcW9+Cy/QAIOBpZxP1yqDIzFMR0+Np0i0+usg==} + + hast-util-to-estree@3.1.3: + resolution: {integrity: sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w==} + + hast-util-to-html@9.0.5: + resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} + + hast-util-to-jsx-runtime@2.3.6: + resolution: {integrity: sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==} + + hast-util-to-parse5@8.0.1: + resolution: {integrity: sha512-MlWT6Pjt4CG9lFCjiz4BH7l9wmrMkfkJYCxFwKQic8+RTZgWPuWxwAfjJElsXkex7DJjfSJsQIt931ilUgmwdA==} + + hast-util-to-text@4.0.2: + resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==} + + hast-util-whitespace@3.0.0: + resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} + + hastscript@9.0.1: + resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==} + + html-escaper@3.0.3: + resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} + + html-url-attributes@3.0.1: + resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==} + + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + + http-cache-semantics@4.2.0: + resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + immer@11.1.9: + resolution: {integrity: sha512-sc/z0Cyti70bZa0ZU4sWfAElfovFb9Ni8tArJZLuklYWxegPiK3pDOql1Rq5H0FIRAW9LSQRG6OX4KqBldbhBA==} + + import-meta-resolve@4.2.0: + resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} + + inline-style-parser@0.2.7: + resolution: {integrity: sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==} + + internmap@1.0.1: + resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==} + + internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + + iron-webcrypto@1.2.1: + resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} + + is-alphabetical@2.0.1: + resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} + + is-alphanumerical@2.0.1: + resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + + is-decimal@2.0.1: + resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + + is-docker@3.0.0: + resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + hasBin: true + + is-docker@4.0.0: + resolution: {integrity: sha512-LHE+wROyG/Y/0ZnbktRCoTix2c1RhgWaZraMZ8o1Q7zCh0VSrICJQO5oqIIISrcSBtrXv0o233w1IYwsWCjTzA==} + engines: {node: '>=20'} + hasBin: true + + is-hexadecimal@2.0.1: + resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + + is-inside-container@1.0.0: + resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} + engines: {node: '>=14.16'} + hasBin: true + + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + + is-wsl@3.1.1: + resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==} + engines: {node: '>=16'} + + isomorphic.js@0.2.5: + resolution: {integrity: sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==} + + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + + jotai@2.20.1: + resolution: {integrity: sha512-dnuKfU/GLi8B28RRMjQ3AfoN7kfzP8o41+AX2FmITZqEMY8PHnjABq+VkEooomLwYaGjda+pgy0yFSjaHX/ZPg==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@babel/core': '>=7.0.0' + '@babel/template': '>=7.0.0' + '@types/react': '>=17.0.0' + react: '>=17.0.0' + peerDependenciesMeta: + '@babel/core': + optional: true + '@babel/template': + optional: true + '@types/react': + optional: true + react: + optional: true + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@4.2.0: + resolution: {integrity: sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==} + hasBin: true + + js-yaml@4.3.0: + resolution: {integrity: sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==} + hasBin: true + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json-schema@0.4.0: + resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + + katex@0.16.47: + resolution: {integrity: sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==} + hasBin: true + + khroma@2.1.0: + resolution: {integrity: sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==} + + kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + + layout-base@1.0.2: + resolution: {integrity: sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==} + + layout-base@2.0.1: + resolution: {integrity: sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==} + + lexical@0.35.0: + resolution: {integrity: sha512-3VuV8xXhh5xJA6tzvfDvE0YBCMkIZUmxtRilJQDDdCgJCc+eut6qAv2qbN+pbqvarqcQqPN1UF+8YvsjmyOZpw==} + + lib0@0.2.117: + resolution: {integrity: sha512-DeXj9X5xDCjgKLU/7RR+/HQEVzuuEUiwldwOGsHK/sfAfELGWEyTcf0x+uOvCvK3O2zPmZePXWL85vtia6GyZw==} + engines: {node: '>=16'} + hasBin: true + + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} + + lodash-es@4.18.1: + resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==} + + longest-streak@3.1.0: + resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + + lru-cache@11.5.1: + resolution: {integrity: sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==} + engines: {node: 20 || >=22} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + magicast@0.5.3: + resolution: {integrity: sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==} + + markdown-extensions@2.0.0: + resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} + engines: {node: '>=16'} + + markdown-table@3.0.4: + resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} + + marked@16.4.2: + resolution: {integrity: sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==} + engines: {node: '>= 20'} + hasBin: true + + marked@17.0.6: + resolution: {integrity: sha512-gB0gkNafnonOw0obSTEGZTT86IuhILt2Wfx0mWH/1Au83kybTayroZ/V6nS25mN7u8ASy+5fMhgB3XPNrOZdmA==} + engines: {node: '>= 20'} + hasBin: true + + mdast-util-definitions@6.0.0: + resolution: {integrity: sha512-scTllyX6pnYNZH/AIp/0ePz6s4cZtARxImwoPJ7kS42n+MnVsI4XbnG6d4ibehRIldYMWM2LD7ImQblVhUejVQ==} + + mdast-util-directive@3.1.0: + resolution: {integrity: sha512-I3fNFt+DHmpWCYAT7quoM6lHf9wuqtI+oCOfvILnoicNIqjh5E3dEJWiXuYME2gNe8vl1iMQwyUHa7bgFmak6Q==} + + mdast-util-find-and-replace@3.0.2: + resolution: {integrity: sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==} + + mdast-util-from-markdown@2.0.3: + resolution: {integrity: sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q==} + + mdast-util-frontmatter@2.0.1: + resolution: {integrity: sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==} + + mdast-util-gfm-autolink-literal@2.0.1: + resolution: {integrity: sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==} + + mdast-util-gfm-footnote@2.1.0: + resolution: {integrity: sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==} + + mdast-util-gfm-strikethrough@2.0.0: + resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} + + mdast-util-gfm-table@2.0.0: + resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==} + + mdast-util-gfm-task-list-item@2.0.0: + resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==} + + mdast-util-gfm@3.1.0: + resolution: {integrity: sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==} + + mdast-util-highlight-mark@1.2.2: + resolution: {integrity: sha512-OYumVoytj+B9YgwzBhBcYUCLYHIPvJtAvwnMyKhUXbfUFuER5S+FDZyu9fadUxm2TCT5fRYK3jQXh2ioWAxrMw==} + + mdast-util-mdx-expression@2.0.1: + resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==} + + mdast-util-mdx-jsx@3.2.0: + resolution: {integrity: sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==} + + mdast-util-mdx@3.0.0: + resolution: {integrity: sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==} + + mdast-util-mdxjs-esm@2.0.1: + resolution: {integrity: sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==} + + mdast-util-phrasing@4.1.0: + resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + + mdast-util-to-hast@13.2.1: + resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} + + mdast-util-to-markdown@2.1.2: + resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==} + + mdast-util-to-string@4.0.0: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + + mdn-data@2.0.28: + resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} + + mdn-data@2.27.1: + resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} + + mermaid@11.16.0: + resolution: {integrity: sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==} + + micromark-core-commonmark@2.0.3: + resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} + + micromark-extension-directive@3.0.2: + resolution: {integrity: sha512-wjcXHgk+PPdmvR58Le9d7zQYWy+vKEU9Se44p2CrCDPiLr2FMyiT4Fyb5UFKFC66wGB3kPlgD7q3TnoqPS7SZA==} + + micromark-extension-frontmatter@2.0.0: + resolution: {integrity: sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg==} + + micromark-extension-gfm-autolink-literal@2.1.0: + resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==} + + micromark-extension-gfm-footnote@2.1.0: + resolution: {integrity: sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==} + + micromark-extension-gfm-strikethrough@2.1.0: + resolution: {integrity: sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==} + + micromark-extension-gfm-table@2.1.1: + resolution: {integrity: sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==} + + micromark-extension-gfm-tagfilter@2.0.0: + resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==} + + micromark-extension-gfm-task-list-item@2.1.0: + resolution: {integrity: sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==} + + micromark-extension-gfm@3.0.0: + resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==} + + micromark-extension-highlight-mark@1.2.0: + resolution: {integrity: sha512-huGtbd/9kQsMk8u7nrVMaS5qH/47yDG6ZADggo5Owz5JoY8wdfQjfuy118/QiYNCvdFuFDbzT0A7K7Hp2cBsXA==} + + micromark-extension-mdx-expression@3.0.1: + resolution: {integrity: sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q==} + + micromark-extension-mdx-jsx@3.0.2: + resolution: {integrity: sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ==} + + micromark-extension-mdx-md@2.0.0: + resolution: {integrity: sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==} + + micromark-extension-mdxjs-esm@3.0.0: + resolution: {integrity: sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==} + + micromark-extension-mdxjs@3.0.0: + resolution: {integrity: sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==} + + micromark-factory-destination@2.0.1: + resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==} + + micromark-factory-label@2.0.1: + resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==} + + micromark-factory-mdx-expression@2.0.3: + resolution: {integrity: sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ==} + + micromark-factory-space@2.0.1: + resolution: {integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==} + + micromark-factory-title@2.0.1: + resolution: {integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==} + + micromark-factory-whitespace@2.0.1: + resolution: {integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==} + + micromark-util-character@2.1.1: + resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} + + micromark-util-chunked@2.0.1: + resolution: {integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==} + + micromark-util-classify-character@2.0.1: + resolution: {integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==} + + micromark-util-combine-extensions@2.0.1: + resolution: {integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==} + + micromark-util-decode-numeric-character-reference@2.0.2: + resolution: {integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==} + + micromark-util-decode-string@2.0.1: + resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==} + + micromark-util-encode@2.0.1: + resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} + + micromark-util-events-to-acorn@2.0.3: + resolution: {integrity: sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg==} + + micromark-util-html-tag-name@2.0.1: + resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==} + + micromark-util-normalize-identifier@2.0.1: + resolution: {integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==} + + micromark-util-resolve-all@2.0.1: + resolution: {integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==} + + micromark-util-sanitize-uri@2.0.1: + resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} + + micromark-util-subtokenize@2.1.0: + resolution: {integrity: sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==} + + micromark-util-symbol@2.0.1: + resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} + + micromark-util-types@2.0.2: + resolution: {integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==} + + micromark@4.0.2: + resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==} + + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + + mrmime@2.0.1: + resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} + engines: {node: '>=10'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.15: + resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + neotraverse@0.6.18: + resolution: {integrity: sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==} + engines: {node: '>= 10'} + + nlcst-to-string@4.0.0: + resolution: {integrity: sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==} + + node-fetch-native@1.6.7: + resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} + + node-mock-http@1.0.4: + resolution: {integrity: sha512-8DY+kFsDkNXy1sJglUfuODx1/opAGJGyrTuFqEoN90oRc2Vk0ZbD4K2qmKXBBEhZQzdKHIVfEJpDU8Ak2NJEvQ==} + + node-releases@2.0.50: + resolution: {integrity: sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg==} + engines: {node: '>=18'} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + obug@2.1.3: + resolution: {integrity: sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==} + engines: {node: '>=12.20.0'} + + ofetch@1.5.1: + resolution: {integrity: sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA==} + + ohash@2.0.11: + resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} + + oniguruma-parser@0.12.2: + resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==} + + oniguruma-to-es@2.3.0: + resolution: {integrity: sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==} + + oniguruma-to-es@4.3.6: + resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==} + + p-limit@7.3.0: + resolution: {integrity: sha512-7cIXg/Z0M5WZRblrsOla88S4wAK+zOQQWeBYfV3qJuJXMr+LnbYjaadrFaS0JILfEDPVqHyKnZ1Z/1d6J9VVUw==} + engines: {node: '>=20'} + + p-queue@9.3.0: + resolution: {integrity: sha512-7NED7xhQ74Ngp4JP/2e0VZHp7vSWfJfqeiR92jPgxsz6m0Se4P03YoTKa9dDXyZ3r6P616gUXttrB6nnHYKang==} + engines: {node: '>=20'} + + p-timeout@7.0.1: + resolution: {integrity: sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==} + engines: {node: '>=20'} + + package-manager-detector@1.7.0: + resolution: {integrity: sha512-xg1eHpwYL/D/HEdWw2goFZP6vV0FH7W+PZ5rFkGjdIDLtxq7EkzBUeT3m+lndYCt8wKbmofUu1MUdMCXkCk9ZQ==} + + parse-entities@4.0.2: + resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==} + + parse-latin@7.0.0: + resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==} + + parse5@7.3.0: + resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} + + path-data-parser@0.1.0: + resolution: {integrity: sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==} + + piccolore@0.1.3: + resolution: {integrity: sha512-o8bTeDWjE086iwKrROaDf31K0qC/BENdm15/uH9usSC/uZjJOKb2YGiVHfLY4GhwsERiPI1jmwI2XrA7ACOxVw==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} + engines: {node: '>=12'} + + points-on-curve@0.2.0: + resolution: {integrity: sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==} + + points-on-path@0.2.1: + resolution: {integrity: sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==} + + postcss@8.5.16: + resolution: {integrity: sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==} + engines: {node: ^10 || ^12 || >=14} + + prismjs@1.30.0: + resolution: {integrity: sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==} + engines: {node: '>=6'} + + process-ancestry@0.1.0: + resolution: {integrity: sha512-tGqJW/UnclpYASFcM6Xh8D8l/BMtaQ9+CSG0vlJSJTcdMM4lDRv4c6H0Pdcsfted+bVczdYSfk2fdukg2gQkZg==} + engines: {node: '>=18.0.0'} + + prop-types@15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + + property-information@7.2.0: + resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} + + radix3@1.1.2: + resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} + + re-resizable@6.11.2: + resolution: {integrity: sha512-2xI2P3OHs5qw7K0Ud1aLILK6MQxW50TcO+DetD9eIV58j84TqYeHoZcL9H4GXFXXIh7afhH8mv5iUCXII7OW7A==} + peerDependencies: + react: ^16.13.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + react-dom@18.3.1: + resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + peerDependencies: + react: ^18.3.1 + + react-draggable@4.7.0: + resolution: {integrity: sha512-kTpANmKWVnFXiZ76Ag2ZowiFStuBYnJ606PI1TbUsOg29/400/JNIxI9+CuenhiAqFuXWJffz6F4UI3R51kUug==} + peerDependencies: + react: '>= 16.3.0' + react-dom: '>= 16.3.0' + + react-error-boundary@3.1.4: + resolution: {integrity: sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==} + engines: {node: '>=10', npm: '>=6'} + peerDependencies: + react: '>=16.13.1' + + react-hook-form@7.80.0: + resolution: {integrity: sha512-4P+fk6oXsxY+6xSj7Euhc2sumQD8zQqCuVHoJwoyp9EchP+IUW9OESB7uHFJOKsIBQ4MQqYE84INJFqUCYNoOg==} + engines: {node: '>=18.0.0'} + peerDependencies: + react: ^16.8.0 || ^17 || ^18 || ^19 + + react-is@16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + + react-is@17.0.2: + resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} + + react-redux@9.3.0: + resolution: {integrity: sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g==} + peerDependencies: + '@types/react': ^18.2.25 || ^19 + react: ^18.0 || ^19 + redux: ^5.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + redux: + optional: true + + react-refresh@0.18.0: + resolution: {integrity: sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==} + engines: {node: '>=0.10.0'} + + react-remove-scroll-bar@2.3.8: + resolution: {integrity: sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + + react-remove-scroll@2.7.2: + resolution: {integrity: sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + react-rnd@10.5.3: + resolution: {integrity: sha512-s/sIT3pGZnQ+57egijkTp9mizjIWrJz68Pq6yd+F/wniFY3IriML18dUXnQe/HP9uMiJ+9MAp44hljG99fZu6Q==} + peerDependencies: + react: '>=16.3.0' + react-dom: '>=16.3.0' + + react-style-singleton@2.2.3: + resolution: {integrity: sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + engines: {node: '>=0.10.0'} + + readdirp@5.0.0: + resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} + engines: {node: '>= 20.19.0'} + + recharts@3.9.1: + resolution: {integrity: sha512-WMcwlXcB7l+BbxiEdyClkG+1sxrMHNZpzT577LEvU4+rXPd8oTAy1wXk72hnk2KOOmxuLvw3z5DtXT7HEAydtg==} + engines: {node: '>=18'} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-is: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + recma-build-jsx@1.0.0: + resolution: {integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==} + + recma-jsx@1.0.1: + resolution: {integrity: sha512-huSIy7VU2Z5OLv6oFLosQGGDqPqdO1iq6bWNAdhzMxSJP7RAso4fCZ1cKu8j9YHCZf3TPrq4dw3okhrylgcd7w==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + recma-parse@1.0.0: + resolution: {integrity: sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==} + + recma-stringify@1.0.0: + resolution: {integrity: sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==} + + redux-thunk@3.1.0: + resolution: {integrity: sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==} + peerDependencies: + redux: ^5.0.0 + + redux@5.0.1: + resolution: {integrity: sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==} + + regex-recursion@5.1.1: + resolution: {integrity: sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==} + + regex-recursion@6.0.2: + resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==} + + regex-utilities@2.3.0: + resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} + + regex@5.1.1: + resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==} + + regex@6.1.0: + resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==} + + rehype-harden@1.1.8: + resolution: {integrity: sha512-Qn7vR1xrf6fZCrkm9TDWi/AB4ylrHy+jqsNm1EHOAmbARYA6gsnVJBq/sdBh6kmT4NEZxH5vgIjrscefJAOXcw==} + + rehype-raw@7.0.0: + resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} + + rehype-recma@1.0.0: + resolution: {integrity: sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==} + + rehype-sanitize@6.0.0: + resolution: {integrity: sha512-CsnhKNsyI8Tub6L4sm5ZFsme4puGfc6pYylvXo1AeqaGbjOYyzNv3qZPwvs0oMJ39eryyeOdmxwUIo94IpEhqg==} + + rehype-stringify@10.0.1: + resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==} + + remark-gfm@4.0.1: + resolution: {integrity: sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==} + + remark-mdx@3.1.1: + resolution: {integrity: sha512-Pjj2IYlUY3+D8x00UJsIOg5BEvfMyeI+2uLPn9VO9Wg4MEtN/VTIq2NEJQfde9PnX15KgtHyl9S0BcTnWrIuWg==} + + remark-parse@11.0.0: + resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} + + remark-rehype@11.1.2: + resolution: {integrity: sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==} + + remark-smartypants@3.0.2: + resolution: {integrity: sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA==} + engines: {node: '>=16.0.0'} + + remark-stringify@11.0.0: + resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} + + remend@1.3.0: + resolution: {integrity: sha512-iIhggPkhW3hFImKtB10w0dz4EZbs28mV/dmbcYVonWEJ6UGHHpP+bFZnTh6GNWJONg5m+U56JrL+8IxZRdgWjw==} + + reselect@5.2.0: + resolution: {integrity: sha512-AgZ3UOZm3YndfrJ4OYjgrT7bmCm/1iqkjvEfH/oYjzh6PD2qw4QuT3jjnXIrpdt4MTpMXclMT3lXbmRY+XRakw==} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + retext-latin@4.0.0: + resolution: {integrity: sha512-hv9woG7Fy0M9IlRQloq/N6atV82NxLGveq+3H2WOi79dtIYWN8OaxogDm77f8YnVXJL2VD3bbqowu5E3EMhBYA==} + + retext-smartypants@6.2.0: + resolution: {integrity: sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ==} + + retext-stringify@4.0.0: + resolution: {integrity: sha512-rtfN/0o8kL1e+78+uxPTqu1Klt0yPzKuQ2BfWwwfgIUSayyzxpM1PJzkKt4V8803uB9qSy32MvI7Xep9khTpiA==} + + retext@9.0.0: + resolution: {integrity: sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA==} + + robust-predicates@3.0.3: + resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} + + rolldown@1.1.4: + resolution: {integrity: sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + roughjs@4.6.6: + resolution: {integrity: sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==} + + rw@1.3.3: + resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} + + sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + satteri@0.9.4: + resolution: {integrity: sha512-BKob126Tay84diOZsnVNH/Q/c+3njPJTCad3w5zLKa6j8bVjxskPNHDtxrMwYK4bN/RlqUSdMnPwKY4k65EMOQ==} + + sax@1.6.0: + resolution: {integrity: sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==} + engines: {node: '>=11.0.0'} + + scheduler@0.23.2: + resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + + sharp@0.35.3: + resolution: {integrity: sha512-ej0zVHuZGHCiABXcNxeYhpRnPNPAcvbG8RMdBAhDAxLKkCRVSpK3Iyu7qbqw3JMzoj0REeM6f3tJLtVwl0023Q==} + engines: {node: '>=20.9.0'} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + shiki@1.29.2: + resolution: {integrity: sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg==} + + shiki@4.3.0: + resolution: {integrity: sha512-NKKjWzR6LIGL3sXBrWDw9sDS9cxx42/DkysaNqJEeOWE8Kix5gpak0bc00OfDVEO4oyXSyz8+aRaqKoBD1yo7A==} + engines: {node: '>=20'} + + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + + smol-toml@1.7.0: + resolution: {integrity: sha512-aqVvWoyO21L23mb+drl4RmMXbf6N7FdHjAhTRA9ZBL7apWBgfWC16KjrASI+1p9GAroljyMHj6fK67i0UiTNvQ==} + engines: {node: '>= 18'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map@0.7.6: + resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} + engines: {node: '>= 12'} + + space-separated-tokens@2.0.2: + resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + + streamdown@2.5.0: + resolution: {integrity: sha512-/tTnURfIOxZK/pqJAxsfCvETG/XCJHoWnk3jq9xLcuz6CSpnjjuxSRBTTL4PKGhxiZQf0lqPxGhImdpwcZ2XwA==} + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + + stringify-entities@4.0.4: + resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} + + style-mod@4.1.3: + resolution: {integrity: sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==} + + style-to-js@1.1.21: + resolution: {integrity: sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==} + + style-to-object@1.0.14: + resolution: {integrity: sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==} + + stylis@4.4.0: + resolution: {integrity: sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==} + + svgo@4.0.1: + resolution: {integrity: sha512-XDpWUOPC6FEibaLzjfe0ucaV0YrOjYotGJO1WpF0Zd+n6ZGEQUsSugaoLq9QkEZtAfQIxT42UChcssDVPP3+/w==} + engines: {node: '>=16'} + hasBin: true + + tabbable@6.5.0: + resolution: {integrity: sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA==} + + tailwind-merge@2.6.1: + resolution: {integrity: sha512-Oo6tHdpZsGpkKG88HJ8RR1rg/RdnEkQEfMoEk2x1XRI3F1AxeU+ijRXpiVUF4UbLfcxxRGw6TbUINKYdWVsQTQ==} + + tailwind-merge@3.6.0: + resolution: {integrity: sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w==} + + tailwindcss@4.3.2: + resolution: {integrity: sha512-WtctNNSH8A9jlMIqxzuYumOHU5uGZyRv0Q5svQl+oEPy5w84YpBxdb7MdqyiSPQge5jTJ6zFQLq0PFygdccSBA==} + + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + engines: {node: '>=6'} + + tiny-inflate@1.0.3: + resolution: {integrity: sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==} + + tiny-invariant@1.3.3: + resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + + tinyclip@0.1.15: + resolution: {integrity: sha512-uo33abH+Ays0xYaDysoBt494Hb3hsEczMpcC0MwFl773pazORx4fmvKhclhR1wonUbB6vvpRsvVMwnhfqeMc+A==} + engines: {node: ^16.14.0 || >= 17.3.0} + + tinyexec@1.2.4: + resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + + trough@2.2.0: + resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} + + ts-dedent@2.3.0: + resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==} + engines: {node: '>=6.10'} + + tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + + ufo@1.6.4: + resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} + + ultrahtml@1.6.0: + resolution: {integrity: sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw==} + + uncrypto@0.1.3: + resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} + + unidiff@1.0.4: + resolution: {integrity: sha512-ynU0vsAXw0ir8roa+xPCUHmnJ5goc5BTM2Kuc3IJd8UwgaeRs7VSD5+eeaQL+xp1JtB92hu/Zy/Lgy7RZcr1pQ==} + + unified@11.0.5: + resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} + + unifont@0.7.4: + resolution: {integrity: sha512-oHeis4/xl42HUIeHuNZRGEvxj5AaIKR+bHPNegRq5LV1gdc3jundpONbjglKpihmJf+dswygdMJn3eftGIMemg==} + + unist-util-find-after@5.0.0: + resolution: {integrity: sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==} + + unist-util-is@6.0.1: + resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} + + unist-util-modify-children@4.0.0: + resolution: {integrity: sha512-+tdN5fGNddvsQdIzUF3Xx82CU9sMM+fA0dLgR9vOmT0oPT2jH+P1nd5lSqfCfXAw+93NhcXNY2qqvTUtE4cQkw==} + + unist-util-position-from-estree@2.0.0: + resolution: {integrity: sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==} + + unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + + unist-util-remove-position@5.0.0: + resolution: {integrity: sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==} + + unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + + unist-util-visit-children@3.0.0: + resolution: {integrity: sha512-RgmdTfSBOg04sdPcpTSD1jzoNBjt9a80/ZCzp5cI9n1qPzLZWF9YdvWGN2zmTumP1HWhXKdUWexjy/Wy/lJ7tA==} + + unist-util-visit-parents@6.0.2: + resolution: {integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==} + + unist-util-visit@5.1.0: + resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} + + unstorage@1.17.5: + resolution: {integrity: sha512-0i3iqvRfx29hkNntHyQvJTpf5W9dQ9ZadSoRU8+xVlhVtT7jAX57fazYO9EHvcRCfBCyi5YRya7XCDOsbTgkPg==} + peerDependencies: + '@azure/app-configuration': ^1.8.0 + '@azure/cosmos': ^4.2.0 + '@azure/data-tables': ^13.3.0 + '@azure/identity': ^4.6.0 + '@azure/keyvault-secrets': ^4.9.0 + '@azure/storage-blob': ^12.26.0 + '@capacitor/preferences': ^6 || ^7 || ^8 + '@deno/kv': '>=0.9.0' + '@netlify/blobs': ^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0 + '@planetscale/database': ^1.19.0 + '@upstash/redis': ^1.34.3 + '@vercel/blob': '>=0.27.1' + '@vercel/functions': ^2.2.12 || ^3.0.0 + '@vercel/kv': ^1 || ^2 || ^3 + aws4fetch: ^1.0.20 + db0: '>=0.2.1' + idb-keyval: ^6.2.1 + ioredis: ^5.4.2 + uploadthing: ^7.4.4 + peerDependenciesMeta: + '@azure/app-configuration': + optional: true + '@azure/cosmos': + optional: true + '@azure/data-tables': + optional: true + '@azure/identity': + optional: true + '@azure/keyvault-secrets': + optional: true + '@azure/storage-blob': + optional: true + '@capacitor/preferences': + optional: true + '@deno/kv': + optional: true + '@netlify/blobs': + optional: true + '@planetscale/database': + optional: true + '@upstash/redis': + optional: true + '@vercel/blob': + optional: true + '@vercel/functions': + optional: true + '@vercel/kv': + optional: true + aws4fetch: + optional: true + db0: + optional: true + idb-keyval: + optional: true + ioredis: + optional: true + uploadthing: + optional: true + + update-browserslist-db@1.2.3: + resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + use-callback-ref@1.3.3: + resolution: {integrity: sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + use-sidecar@1.1.3: + resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + use-sync-external-store@1.6.0: + resolution: {integrity: sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + uuid@14.0.1: + resolution: {integrity: sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==} + hasBin: true + + uvu@0.5.6: + resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} + engines: {node: '>=8'} + hasBin: true + + vfile-location@5.0.3: + resolution: {integrity: sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==} + + vfile-message@4.0.3: + resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==} + + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + + victory-vendor@37.3.6: + resolution: {integrity: sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==} + + vite@8.1.3: + resolution: {integrity: sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.3.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitefu@1.1.3: + resolution: {integrity: sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + vite: + optional: true + + w3c-keyname@2.2.8: + resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} + + web-namespaces@2.0.1: + resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + + which-pm-runs@1.1.0: + resolution: {integrity: sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==} + engines: {node: '>=4'} + + xxhash-wasm@1.1.0: + resolution: {integrity: sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yargs-parser@22.0.0: + resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==} + engines: {node: ^20.19.0 || ^22.12.0 || >=23} + + yjs@13.6.31: + resolution: {integrity: sha512-Eq+5BRfbeGyqGVrTJL3bEcr8gKkxPuyuoHmAwpk52fDb8kOVMrfVSTRPd6yiGgX5Fskb96qCRjzjbRjrL4YEnw==} + engines: {node: '>=16.0.0', npm: '>=8.0.0'} + + yocto-queue@1.2.2: + resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} + engines: {node: '>=12.20'} + + zod@4.4.3: + resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + + zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + +snapshots: + + '@ai-sdk/gateway@3.0.143(zod@4.4.3)': + dependencies: + '@ai-sdk/provider': 3.0.13 + '@ai-sdk/provider-utils': 4.0.35(zod@4.4.3) + '@vercel/oidc': 3.2.0 + zod: 4.4.3 + + '@ai-sdk/provider-utils@4.0.35(zod@4.4.3)': + dependencies: + '@ai-sdk/provider': 3.0.13 + '@standard-schema/spec': 1.1.0 + eventsource-parser: 3.1.0 + zod: 4.4.3 + + '@ai-sdk/provider@3.0.13': + dependencies: + json-schema: 0.4.0 + + '@antfu/install-pkg@1.1.0': + dependencies: + package-manager-detector: 1.7.0 + tinyexec: 1.2.4 + + '@astrojs/compiler-binding-darwin-arm64@0.3.0': + optional: true + + '@astrojs/compiler-binding-darwin-x64@0.3.0': + optional: true + + '@astrojs/compiler-binding-linux-arm64-gnu@0.3.0': + optional: true + + '@astrojs/compiler-binding-linux-arm64-musl@0.3.0': + optional: true + + '@astrojs/compiler-binding-linux-x64-gnu@0.3.0': + optional: true + + '@astrojs/compiler-binding-linux-x64-musl@0.3.0': + optional: true + + '@astrojs/compiler-binding-wasm32-wasi@0.3.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + dependencies: + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + optional: true + + '@astrojs/compiler-binding-win32-arm64-msvc@0.3.0': + optional: true + + '@astrojs/compiler-binding-win32-x64-msvc@0.3.0': + optional: true + + '@astrojs/compiler-binding@0.3.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + optionalDependencies: + '@astrojs/compiler-binding-darwin-arm64': 0.3.0 + '@astrojs/compiler-binding-darwin-x64': 0.3.0 + '@astrojs/compiler-binding-linux-arm64-gnu': 0.3.0 + '@astrojs/compiler-binding-linux-arm64-musl': 0.3.0 + '@astrojs/compiler-binding-linux-x64-gnu': 0.3.0 + '@astrojs/compiler-binding-linux-x64-musl': 0.3.0 + '@astrojs/compiler-binding-wasm32-wasi': 0.3.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@astrojs/compiler-binding-win32-arm64-msvc': 0.3.0 + '@astrojs/compiler-binding-win32-x64-msvc': 0.3.0 + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + + '@astrojs/compiler-rs@0.3.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + dependencies: + '@astrojs/compiler-binding': 0.3.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + + '@astrojs/internal-helpers@0.10.1': + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + js-yaml: 4.3.0 + picomatch: 4.0.5 + retext-smartypants: 6.2.0 + shiki: 4.3.0 + smol-toml: 1.7.0 + unified: 11.0.5 + + '@astrojs/markdown-remark@7.2.1': + dependencies: + '@astrojs/internal-helpers': 0.10.1 + '@astrojs/prism': 4.0.2 + github-slugger: 2.0.0 + hast-util-from-html: 2.0.3 + hast-util-to-text: 4.0.2 + mdast-util-definitions: 6.0.0 + rehype-raw: 7.0.0 + rehype-stringify: 10.0.1 + remark-gfm: 4.0.1 + remark-parse: 11.0.0 + remark-rehype: 11.1.2 + remark-smartypants: 3.0.2 + unified: 11.0.5 + unist-util-remove-position: 5.0.0 + unist-util-visit: 5.1.0 + unist-util-visit-parents: 6.0.2 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@astrojs/markdown-satteri@0.3.3': + dependencies: + '@astrojs/internal-helpers': 0.10.1 + '@astrojs/prism': 4.0.2 + github-slugger: 2.0.0 + satteri: 0.9.4 + + '@astrojs/mdx@7.0.2(@astrojs/markdown-satteri@0.3.3)(astro@7.0.6(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(jiti@2.7.0))': + dependencies: + '@astrojs/internal-helpers': 0.10.1 + '@astrojs/markdown-remark': 7.2.1 + '@mdx-js/mdx': 3.1.1 + acorn: 8.17.0 + astro: 7.0.6(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(jiti@2.7.0) + es-module-lexer: 2.3.0 + estree-util-visit: 2.0.0 + hast-util-to-html: 9.0.5 + piccolore: 0.1.3 + rehype-raw: 7.0.0 + remark-gfm: 4.0.1 + remark-smartypants: 3.0.2 + source-map: 0.7.6 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + optionalDependencies: + '@astrojs/markdown-satteri': 0.3.3 + transitivePeerDependencies: + - supports-color + + '@astrojs/prism@4.0.2': + dependencies: + prismjs: 1.30.0 + + '@astrojs/react@6.0.1(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@astrojs/internal-helpers': 0.10.1 + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + '@vitejs/plugin-react': 5.2.0(vite@8.1.3(esbuild@0.28.1)(jiti@2.7.0)) + devalue: 5.8.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + ultrahtml: 1.6.0 + vite: 8.1.3(esbuild@0.28.1)(jiti@2.7.0) + transitivePeerDependencies: + - '@types/node' + - '@vitejs/devtools' + - esbuild + - jiti + - less + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + '@astrojs/telemetry@3.3.2': + dependencies: + ci-info: 4.4.0 + dset: 3.1.4 + is-docker: 4.0.0 + is-wsl: 3.1.1 + which-pm-runs: 1.1.0 + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.4.3 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.7': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.28.4 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-module-imports@7.29.7': + dependencies: + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.29.7': {} + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.7': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/parser@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/plugin-transform-react-jsx-self@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-transform-react-jsx-source@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/runtime@7.29.7': {} + + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/traverse@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.29.7': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@braintree/sanitize-url@7.1.2': {} + + '@bruits/satteri-darwin-arm64@0.9.4': + optional: true + + '@bruits/satteri-darwin-x64@0.9.4': + optional: true + + '@bruits/satteri-linux-arm64-gnu@0.9.4': + optional: true + + '@bruits/satteri-linux-arm64-musl@0.9.4': + optional: true + + '@bruits/satteri-linux-x64-gnu@0.9.4': + optional: true + + '@bruits/satteri-linux-x64-musl@0.9.4': + optional: true + + '@bruits/satteri-wasm32-wasi@0.9.4': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + optional: true + + '@bruits/satteri-win32-arm64-msvc@0.9.4': + optional: true + + '@bruits/satteri-win32-x64-msvc@0.9.4': + optional: true + + '@capsizecss/unpack@4.0.1': + dependencies: + fontkitten: 1.0.3 + + '@chevrotain/types@11.1.2': {} + + '@clack/core@1.4.2': + dependencies: + fast-wrap-ansi: 0.2.2 + sisteransi: 1.0.5 + + '@clack/prompts@1.6.0': + dependencies: + '@clack/core': 1.4.2 + fast-string-width: 3.0.2 + fast-wrap-ansi: 0.2.2 + sisteransi: 1.0.5 + + '@codemirror/autocomplete@6.20.3': + dependencies: + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/common': 1.5.2 + + '@codemirror/commands@6.10.4': + dependencies: + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/common': 1.5.2 + + '@codemirror/lang-angular@0.1.4': + dependencies: + '@codemirror/lang-html': 6.4.11 + '@codemirror/lang-javascript': 6.2.5 + '@codemirror/language': 6.12.4 + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@codemirror/lang-cpp@6.0.3': + dependencies: + '@codemirror/language': 6.12.4 + '@lezer/cpp': 1.1.6 + + '@codemirror/lang-css@6.3.1': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@lezer/common': 1.5.2 + '@lezer/css': 1.3.4 + + '@codemirror/lang-go@6.0.1': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@lezer/common': 1.5.2 + '@lezer/go': 1.0.1 + + '@codemirror/lang-html@6.4.11': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/lang-css': 6.3.1 + '@codemirror/lang-javascript': 6.2.5 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/common': 1.5.2 + '@lezer/css': 1.3.4 + '@lezer/html': 1.3.13 + + '@codemirror/lang-java@6.0.2': + dependencies: + '@codemirror/language': 6.12.4 + '@lezer/java': 1.1.3 + + '@codemirror/lang-javascript@6.2.5': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/language': 6.12.4 + '@codemirror/lint': 6.9.7 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/common': 1.5.2 + '@lezer/javascript': 1.5.4 + + '@codemirror/lang-jinja@6.0.1': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/lang-html': 6.4.11 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@codemirror/lang-json@6.0.2': + dependencies: + '@codemirror/language': 6.12.4 + '@lezer/json': 1.0.3 + + '@codemirror/lang-less@6.0.2': + dependencies: + '@codemirror/lang-css': 6.3.1 + '@codemirror/language': 6.12.4 + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@codemirror/lang-liquid@6.3.2': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/lang-html': 6.4.11 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@codemirror/lang-markdown@6.5.0': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/lang-html': 6.4.11 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/common': 1.5.2 + '@lezer/markdown': 1.6.4 + + '@codemirror/lang-php@6.0.2': + dependencies: + '@codemirror/lang-html': 6.4.11 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@lezer/common': 1.5.2 + '@lezer/php': 1.0.5 + + '@codemirror/lang-python@6.2.1': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@lezer/common': 1.5.2 + '@lezer/python': 1.1.19 + + '@codemirror/lang-rust@6.0.2': + dependencies: + '@codemirror/language': 6.12.4 + '@lezer/rust': 1.0.2 + + '@codemirror/lang-sass@6.0.2': + dependencies: + '@codemirror/lang-css': 6.3.1 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@lezer/common': 1.5.2 + '@lezer/sass': 1.1.0 + + '@codemirror/lang-sql@6.10.0': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@codemirror/lang-vue@0.1.3': + dependencies: + '@codemirror/lang-html': 6.4.11 + '@codemirror/lang-javascript': 6.2.5 + '@codemirror/language': 6.12.4 + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@codemirror/lang-wast@6.0.2': + dependencies: + '@codemirror/language': 6.12.4 + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@codemirror/lang-xml@6.1.0': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/common': 1.5.2 + '@lezer/xml': 1.0.6 + + '@codemirror/lang-yaml@6.1.3': + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + '@lezer/yaml': 1.0.4 + + '@codemirror/language-data@6.5.2': + dependencies: + '@codemirror/lang-angular': 0.1.4 + '@codemirror/lang-cpp': 6.0.3 + '@codemirror/lang-css': 6.3.1 + '@codemirror/lang-go': 6.0.1 + '@codemirror/lang-html': 6.4.11 + '@codemirror/lang-java': 6.0.2 + '@codemirror/lang-javascript': 6.2.5 + '@codemirror/lang-jinja': 6.0.1 + '@codemirror/lang-json': 6.0.2 + '@codemirror/lang-less': 6.0.2 + '@codemirror/lang-liquid': 6.3.2 + '@codemirror/lang-markdown': 6.5.0 + '@codemirror/lang-php': 6.0.2 + '@codemirror/lang-python': 6.2.1 + '@codemirror/lang-rust': 6.0.2 + '@codemirror/lang-sass': 6.0.2 + '@codemirror/lang-sql': 6.10.0 + '@codemirror/lang-vue': 0.1.3 + '@codemirror/lang-wast': 6.0.2 + '@codemirror/lang-xml': 6.1.0 + '@codemirror/lang-yaml': 6.1.3 + '@codemirror/language': 6.12.4 + '@codemirror/legacy-modes': 6.5.3 + + '@codemirror/language@6.12.4': + dependencies: + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + style-mod: 4.1.3 + + '@codemirror/legacy-modes@6.5.3': + dependencies: + '@codemirror/language': 6.12.4 + + '@codemirror/lint@6.9.7': + dependencies: + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + crelt: 1.0.7 + + '@codemirror/merge@6.12.2': + dependencies: + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/highlight': 1.2.3 + style-mod: 4.1.3 + + '@codemirror/search@6.7.1': + dependencies: + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + crelt: 1.0.7 + + '@codemirror/state@6.7.0': + dependencies: + '@marijn/find-cluster-break': 1.0.3 + + '@codemirror/view@6.43.4': + dependencies: + '@codemirror/state': 6.7.0 + crelt: 1.0.7 + style-mod: 4.1.3 + w3c-keyname: 2.2.8 + + '@emnapi/core@1.11.1': + dependencies: + '@emnapi/wasi-threads': 1.2.2 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.2': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.2': + dependencies: + tslib: 2.8.1 + optional: true + + '@esbuild/aix-ppc64@0.28.1': + optional: true + + '@esbuild/android-arm64@0.28.1': + optional: true + + '@esbuild/android-arm@0.28.1': + optional: true + + '@esbuild/android-x64@0.28.1': + optional: true + + '@esbuild/darwin-arm64@0.28.1': + optional: true + + '@esbuild/darwin-x64@0.28.1': + optional: true + + '@esbuild/freebsd-arm64@0.28.1': + optional: true + + '@esbuild/freebsd-x64@0.28.1': + optional: true + + '@esbuild/linux-arm64@0.28.1': + optional: true + + '@esbuild/linux-arm@0.28.1': + optional: true + + '@esbuild/linux-ia32@0.28.1': + optional: true + + '@esbuild/linux-loong64@0.28.1': + optional: true + + '@esbuild/linux-mips64el@0.28.1': + optional: true + + '@esbuild/linux-ppc64@0.28.1': + optional: true + + '@esbuild/linux-riscv64@0.28.1': + optional: true + + '@esbuild/linux-s390x@0.28.1': + optional: true + + '@esbuild/linux-x64@0.28.1': + optional: true + + '@esbuild/netbsd-arm64@0.28.1': + optional: true + + '@esbuild/netbsd-x64@0.28.1': + optional: true + + '@esbuild/openbsd-arm64@0.28.1': + optional: true + + '@esbuild/openbsd-x64@0.28.1': + optional: true + + '@esbuild/openharmony-arm64@0.28.1': + optional: true + + '@esbuild/sunos-x64@0.28.1': + optional: true + + '@esbuild/win32-arm64@0.28.1': + optional: true + + '@esbuild/win32-ia32@0.28.1': + optional: true + + '@esbuild/win32-x64@0.28.1': + optional: true + + '@flanksource/icons@1.0.60(react@18.3.1)': + dependencies: + react: 18.3.1 + + '@floating-ui/core@1.7.5': + dependencies: + '@floating-ui/utils': 0.2.11 + + '@floating-ui/dom@1.7.6': + dependencies: + '@floating-ui/core': 1.7.5 + '@floating-ui/utils': 0.2.11 + + '@floating-ui/react-dom@2.1.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@floating-ui/dom': 1.7.6 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@floating-ui/react@0.27.19(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@floating-ui/react-dom': 2.1.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@floating-ui/utils': 0.2.11 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + tabbable: 6.5.0 + + '@floating-ui/utils@0.2.11': {} + + '@iconify/types@2.0.0': {} + + '@iconify/utils@3.1.3': + dependencies: + '@antfu/install-pkg': 1.1.0 + '@iconify/types': 2.0.0 + import-meta-resolve: 4.2.0 + + '@img/colour@1.1.0': + optional: true + + '@img/sharp-darwin-arm64@0.35.3': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.3.2 + optional: true + + '@img/sharp-darwin-x64@0.35.3': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.3.2 + optional: true + + '@img/sharp-freebsd-wasm32@0.35.3': + dependencies: + '@img/sharp-wasm32': 0.35.3 + optional: true + + '@img/sharp-libvips-darwin-arm64@1.3.2': + optional: true + + '@img/sharp-libvips-darwin-x64@1.3.2': + optional: true + + '@img/sharp-libvips-linux-arm64@1.3.2': + optional: true + + '@img/sharp-libvips-linux-arm@1.3.2': + optional: true + + '@img/sharp-libvips-linux-ppc64@1.3.2': + optional: true + + '@img/sharp-libvips-linux-riscv64@1.3.2': + optional: true + + '@img/sharp-libvips-linux-s390x@1.3.2': + optional: true + + '@img/sharp-libvips-linux-x64@1.3.2': + optional: true + + '@img/sharp-libvips-linuxmusl-arm64@1.3.2': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.3.2': + optional: true + + '@img/sharp-linux-arm64@0.35.3': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.3.2 + optional: true + + '@img/sharp-linux-arm@0.35.3': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.3.2 + optional: true + + '@img/sharp-linux-ppc64@0.35.3': + optionalDependencies: + '@img/sharp-libvips-linux-ppc64': 1.3.2 + optional: true + + '@img/sharp-linux-riscv64@0.35.3': + optionalDependencies: + '@img/sharp-libvips-linux-riscv64': 1.3.2 + optional: true + + '@img/sharp-linux-s390x@0.35.3': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.3.2 + optional: true + + '@img/sharp-linux-x64@0.35.3': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.3.2 + optional: true + + '@img/sharp-linuxmusl-arm64@0.35.3': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.3.2 + optional: true + + '@img/sharp-linuxmusl-x64@0.35.3': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.3.2 + optional: true + + '@img/sharp-wasm32@0.35.3': + dependencies: + '@emnapi/runtime': 1.11.2 + optional: true + + '@img/sharp-webcontainers-wasm32@0.35.3': + dependencies: + '@img/sharp-wasm32': 0.35.3 + optional: true + + '@img/sharp-win32-arm64@0.35.3': + optional: true + + '@img/sharp-win32-ia32@0.35.3': + optional: true + + '@img/sharp-win32-x64@0.35.3': + optional: true + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@lexical/clipboard@0.35.0': + dependencies: + '@lexical/html': 0.35.0 + '@lexical/list': 0.35.0 + '@lexical/selection': 0.35.0 + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/code@0.35.0': + dependencies: + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + prismjs: 1.30.0 + + '@lexical/devtools-core@0.35.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@lexical/html': 0.35.0 + '@lexical/link': 0.35.0 + '@lexical/mark': 0.35.0 + '@lexical/table': 0.35.0 + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@lexical/dragon@0.35.0': + dependencies: + lexical: 0.35.0 + + '@lexical/hashtag@0.35.0': + dependencies: + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/history@0.35.0': + dependencies: + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/html@0.35.0': + dependencies: + '@lexical/selection': 0.35.0 + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/link@0.35.0': + dependencies: + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/list@0.35.0': + dependencies: + '@lexical/selection': 0.35.0 + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/mark@0.35.0': + dependencies: + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/markdown@0.35.0': + dependencies: + '@lexical/code': 0.35.0 + '@lexical/link': 0.35.0 + '@lexical/list': 0.35.0 + '@lexical/rich-text': 0.35.0 + '@lexical/text': 0.35.0 + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/offset@0.35.0': + dependencies: + lexical: 0.35.0 + + '@lexical/overflow@0.35.0': + dependencies: + lexical: 0.35.0 + + '@lexical/plain-text@0.35.0': + dependencies: + '@lexical/clipboard': 0.35.0 + '@lexical/selection': 0.35.0 + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/react@0.35.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(yjs@13.6.31)': + dependencies: + '@floating-ui/react': 0.27.19(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@lexical/devtools-core': 0.35.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@lexical/dragon': 0.35.0 + '@lexical/hashtag': 0.35.0 + '@lexical/history': 0.35.0 + '@lexical/link': 0.35.0 + '@lexical/list': 0.35.0 + '@lexical/mark': 0.35.0 + '@lexical/markdown': 0.35.0 + '@lexical/overflow': 0.35.0 + '@lexical/plain-text': 0.35.0 + '@lexical/rich-text': 0.35.0 + '@lexical/table': 0.35.0 + '@lexical/text': 0.35.0 + '@lexical/utils': 0.35.0 + '@lexical/yjs': 0.35.0(yjs@13.6.31) + lexical: 0.35.0 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-error-boundary: 3.1.4(react@18.3.1) + transitivePeerDependencies: + - yjs + + '@lexical/rich-text@0.35.0': + dependencies: + '@lexical/clipboard': 0.35.0 + '@lexical/selection': 0.35.0 + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/selection@0.35.0': + dependencies: + lexical: 0.35.0 + + '@lexical/table@0.35.0': + dependencies: + '@lexical/clipboard': 0.35.0 + '@lexical/utils': 0.35.0 + lexical: 0.35.0 + + '@lexical/text@0.35.0': + dependencies: + lexical: 0.35.0 + + '@lexical/utils@0.35.0': + dependencies: + '@lexical/list': 0.35.0 + '@lexical/selection': 0.35.0 + '@lexical/table': 0.35.0 + lexical: 0.35.0 + + '@lexical/yjs@0.35.0(yjs@13.6.31)': + dependencies: + '@lexical/offset': 0.35.0 + '@lexical/selection': 0.35.0 + lexical: 0.35.0 + yjs: 13.6.31 + + '@lezer/common@1.5.2': {} + + '@lezer/cpp@1.1.6': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/css@1.3.4': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/go@1.0.1': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/highlight@1.2.3': + dependencies: + '@lezer/common': 1.5.2 + + '@lezer/html@1.3.13': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/java@1.1.3': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/javascript@1.5.4': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/json@1.0.3': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/lr@1.4.10': + dependencies: + '@lezer/common': 1.5.2 + + '@lezer/markdown@1.6.4': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + + '@lezer/php@1.0.5': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/python@1.1.19': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/rust@1.0.2': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/sass@1.1.0': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/xml@1.0.6': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@lezer/yaml@1.0.4': + dependencies: + '@lezer/common': 1.5.2 + '@lezer/highlight': 1.2.3 + '@lezer/lr': 1.4.10 + + '@marijn/find-cluster-break@1.0.3': {} + + '@mdx-js/mdx@3.1.1': + dependencies: + '@types/estree': 1.0.9 + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdx': 2.0.14 + acorn: 8.17.0 + collapse-white-space: 2.1.0 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + estree-util-scope: 1.0.0 + estree-walker: 3.0.3 + hast-util-to-jsx-runtime: 2.3.6 + markdown-extensions: 2.0.0 + recma-build-jsx: 1.0.0 + recma-jsx: 1.0.1(acorn@8.17.0) + recma-stringify: 1.0.0 + rehype-recma: 1.0.0 + remark-mdx: 3.1.1 + remark-parse: 11.0.0 + remark-rehype: 11.1.2 + source-map: 0.7.6 + unified: 11.0.5 + unist-util-position-from-estree: 2.0.0 + unist-util-stringify-position: 4.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@mdxeditor/editor@4.0.4(@codemirror/language@6.12.4)(@lezer/highlight@1.2.3)(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(yjs@13.6.31)': + dependencies: + '@codemirror/commands': 6.10.4 + '@codemirror/lang-markdown': 6.5.0 + '@codemirror/language-data': 6.5.2 + '@codemirror/merge': 6.12.2 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lexical/clipboard': 0.35.0 + '@lexical/link': 0.35.0 + '@lexical/list': 0.35.0 + '@lexical/markdown': 0.35.0 + '@lexical/plain-text': 0.35.0 + '@lexical/react': 0.35.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(yjs@13.6.31) + '@lexical/rich-text': 0.35.0 + '@lexical/selection': 0.35.0 + '@lexical/utils': 0.35.0 + '@mdxeditor/gurx': 1.2.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/colors': 3.0.0 + '@radix-ui/react-dialog': 1.1.18(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-icons': 1.3.2(react@18.3.1) + '@radix-ui/react-popover': 1.1.18(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-popper': 1.3.2(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-select': 2.3.2(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-toggle-group': 1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-toolbar': 1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-tooltip': 1.2.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + classnames: 2.5.1 + cm6-theme-basic-light: 0.2.0(@codemirror/language@6.12.4)(@codemirror/state@6.7.0)(@codemirror/view@6.43.4)(@lezer/highlight@1.2.3) + codemirror: 6.0.2 + downshift: 7.6.2(react@18.3.1) + js-yaml: 4.2.0 + lexical: 0.35.0 + mdast-util-directive: 3.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-frontmatter: 2.0.1 + mdast-util-gfm-strikethrough: 2.0.0 + mdast-util-gfm-table: 2.0.0 + mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-highlight-mark: 1.2.2 + mdast-util-mdx: 3.0.0 + mdast-util-mdx-jsx: 3.2.0 + mdast-util-to-markdown: 2.1.2 + micromark-extension-directive: 3.0.2 + micromark-extension-frontmatter: 2.0.0 + micromark-extension-gfm-strikethrough: 2.1.0 + micromark-extension-gfm-table: 2.1.1 + micromark-extension-gfm-task-list-item: 2.1.0 + micromark-extension-highlight-mark: 1.2.0 + micromark-extension-mdx-jsx: 3.0.2 + micromark-extension-mdx-md: 2.0.0 + micromark-extension-mdxjs: 3.0.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-hook-form: 7.80.0(react@18.3.1) + unidiff: 1.0.4 + transitivePeerDependencies: + - '@codemirror/language' + - '@lezer/highlight' + - '@types/react' + - '@types/react-dom' + - supports-color + - yjs + + '@mdxeditor/gurx@1.2.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@mermaid-js/parser@1.2.0': + dependencies: + '@chevrotain/types': 11.1.2 + + '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.2 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@opentelemetry/api@1.9.1': {} + + '@oslojs/encoding@1.1.0': {} + + '@oxc-project/types@0.138.0': {} + + '@radix-ui/colors@3.0.0': {} + + '@radix-ui/number@1.1.2': {} + + '@radix-ui/primitive@1.1.4': {} + + '@radix-ui/react-arrow@1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-collection@1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-context': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': 1.3.0(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-compose-refs@1.1.3(@types/react@18.3.31)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-context@1.1.4(@types/react@18.3.31)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-dialog@1.1.18(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.4 + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-context': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-dismissable-layer': 1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-focus-guards': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-focus-scope': 1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-id': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-portal': 1.1.13(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-presence': 1.1.6(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': 1.3.0(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.2.3(@types/react@18.3.31)(react@18.3.1) + aria-hidden: 1.2.6 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-remove-scroll: 2.7.2(@types/react@18.3.31)(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-direction@1.1.2(@types/react@18.3.31)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-dismissable-layer@1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.4 + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-callback-ref': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-effect-event': 0.0.3(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-focus-guards@1.1.4(@types/react@18.3.31)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-focus-scope@1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-callback-ref': 1.1.2(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-icons@1.3.2(react@18.3.1)': + dependencies: + react: 18.3.1 + + '@radix-ui/react-id@1.1.2(@types/react@18.3.31)(react@18.3.1)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.2(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-popover@1.1.18(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.4 + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-context': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-dismissable-layer': 1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-focus-guards': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-focus-scope': 1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-id': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-popper': 1.3.2(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-portal': 1.1.13(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-presence': 1.1.6(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': 1.3.0(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.2.3(@types/react@18.3.31)(react@18.3.1) + aria-hidden: 1.2.6 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-remove-scroll: 2.7.2(@types/react@18.3.31)(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-popper@1.3.2(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@floating-ui/react-dom': 2.1.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-arrow': 1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-context': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-callback-ref': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-layout-effect': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-rect': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-size': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/rect': 1.1.2 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-portal@1.1.13(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-layout-effect': 1.1.2(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-presence@1.1.6(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.2(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-primitive@2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-slot': 1.3.0(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-roving-focus@1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.4 + '@radix-ui/react-collection': 1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-context': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-direction': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-id': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-callback-ref': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.2.3(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-select@2.3.2(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/number': 1.1.2 + '@radix-ui/primitive': 1.1.4 + '@radix-ui/react-collection': 1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-context': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-direction': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-dismissable-layer': 1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-focus-guards': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-focus-scope': 1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-id': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-popper': 1.3.2(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-portal': 1.1.13(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-presence': 1.1.6(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': 1.3.0(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-callback-ref': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.2.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-layout-effect': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-previous': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-visually-hidden': 1.2.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + aria-hidden: 1.2.6 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-remove-scroll: 2.7.2(@types/react@18.3.31)(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-separator@1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-slot@1.3.0(@types/react@18.3.31)(react@18.3.1)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-toggle-group@1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.4 + '@radix-ui/react-context': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-direction': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-roving-focus': 1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-toggle': 1.1.13(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.2.3(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-toggle@1.1.13(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.4 + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.2.3(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-toolbar@1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.4 + '@radix-ui/react-context': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-direction': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-roving-focus': 1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-separator': 1.1.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-toggle-group': 1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-tooltip@1.2.11(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.4 + '@radix-ui/react-compose-refs': 1.1.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-context': 1.1.4(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-dismissable-layer': 1.1.14(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-id': 1.1.2(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-popper': 1.3.2(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-portal': 1.1.13(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-presence': 1.1.6(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': 1.3.0(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.2.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-visually-hidden': 1.2.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/react-use-callback-ref@1.1.2(@types/react@18.3.31)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-use-controllable-state@1.2.3(@types/react@18.3.31)(react@18.3.1)': + dependencies: + '@radix-ui/react-use-effect-event': 0.0.3(@types/react@18.3.31)(react@18.3.1) + '@radix-ui/react-use-layout-effect': 1.1.2(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-use-effect-event@0.0.3(@types/react@18.3.31)(react@18.3.1)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.2(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-use-layout-effect@1.1.2(@types/react@18.3.31)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-use-previous@1.1.2(@types/react@18.3.31)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-use-rect@1.1.2(@types/react@18.3.31)(react@18.3.1)': + dependencies: + '@radix-ui/rect': 1.1.2 + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-use-size@1.1.2(@types/react@18.3.31)(react@18.3.1)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.2(@types/react@18.3.31)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.31 + + '@radix-ui/react-visually-hidden@1.2.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-primitive': 2.1.7(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + '@types/react-dom': 18.3.7(@types/react@18.3.31) + + '@radix-ui/rect@1.1.2': {} + + '@reduxjs/toolkit@2.12.0(react-redux@9.3.0(@types/react@18.3.31)(react@18.3.1)(redux@5.0.1))(react@18.3.1)': + dependencies: + '@standard-schema/spec': 1.1.0 + '@standard-schema/utils': 0.3.0 + immer: 11.1.9 + redux: 5.0.1 + redux-thunk: 3.1.0(redux@5.0.1) + reselect: 5.2.0 + optionalDependencies: + react: 18.3.1 + react-redux: 9.3.0(@types/react@18.3.31)(react@18.3.1)(redux@5.0.1) + + '@rolldown/binding-android-arm64@1.1.4': + optional: true + + '@rolldown/binding-darwin-arm64@1.1.4': + optional: true + + '@rolldown/binding-darwin-x64@1.1.4': + optional: true + + '@rolldown/binding-freebsd-x64@1.1.4': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.1.4': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.1.4': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.1.4': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.1.4': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.1.4': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.1.4': + optional: true + + '@rolldown/binding-linux-x64-musl@1.1.4': + optional: true + + '@rolldown/binding-openharmony-arm64@1.1.4': + optional: true + + '@rolldown/binding-wasm32-wasi@1.1.4': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.1.4': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.1.4': + optional: true + + '@rolldown/pluginutils@1.0.0-rc.3': {} + + '@rolldown/pluginutils@1.0.1': {} + + '@rollup/pluginutils@5.4.0': + dependencies: + '@types/estree': 1.0.9 + estree-walker: 2.0.2 + picomatch: 4.0.5 + + '@shikijs/core@1.29.2': + dependencies: + '@shikijs/engine-javascript': 1.29.2 + '@shikijs/engine-oniguruma': 1.29.2 + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + + '@shikijs/core@4.3.0': + dependencies: + '@shikijs/primitive': 4.3.0 + '@shikijs/types': 4.3.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + + '@shikijs/engine-javascript@1.29.2': + dependencies: + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 + oniguruma-to-es: 2.3.0 + + '@shikijs/engine-javascript@4.3.0': + dependencies: + '@shikijs/types': 4.3.0 + '@shikijs/vscode-textmate': 10.0.2 + oniguruma-to-es: 4.3.6 + + '@shikijs/engine-oniguruma@1.29.2': + dependencies: + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/engine-oniguruma@4.3.0': + dependencies: + '@shikijs/types': 4.3.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/langs@1.29.2': + dependencies: + '@shikijs/types': 1.29.2 + + '@shikijs/langs@4.3.0': + dependencies: + '@shikijs/types': 4.3.0 + + '@shikijs/primitive@4.3.0': + dependencies: + '@shikijs/types': 4.3.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/themes@1.29.2': + dependencies: + '@shikijs/types': 1.29.2 + + '@shikijs/themes@4.3.0': + dependencies: + '@shikijs/types': 4.3.0 + + '@shikijs/transformers@1.29.2': + dependencies: + '@shikijs/core': 1.29.2 + '@shikijs/types': 1.29.2 + + '@shikijs/types@1.29.2': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/types@4.3.0': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@10.0.2': {} + + '@standard-schema/spec@1.1.0': {} + + '@standard-schema/utils@0.3.0': {} + + '@tailwindcss/node@4.3.2': + dependencies: + '@jridgewell/remapping': 2.3.5 + enhanced-resolve: 5.21.6 + jiti: 2.7.0 + lightningcss: 1.32.0 + magic-string: 0.30.21 + source-map-js: 1.2.1 + tailwindcss: 4.3.2 + + '@tailwindcss/oxide-android-arm64@4.3.2': + optional: true + + '@tailwindcss/oxide-darwin-arm64@4.3.2': + optional: true + + '@tailwindcss/oxide-darwin-x64@4.3.2': + optional: true + + '@tailwindcss/oxide-freebsd-x64@4.3.2': + optional: true + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.2': + optional: true + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.2': + optional: true + + '@tailwindcss/oxide-linux-arm64-musl@4.3.2': + optional: true + + '@tailwindcss/oxide-linux-x64-gnu@4.3.2': + optional: true + + '@tailwindcss/oxide-linux-x64-musl@4.3.2': + optional: true + + '@tailwindcss/oxide-wasm32-wasi@4.3.2': + optional: true + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.2': + optional: true + + '@tailwindcss/oxide-win32-x64-msvc@4.3.2': + optional: true + + '@tailwindcss/oxide@4.3.2': + optionalDependencies: + '@tailwindcss/oxide-android-arm64': 4.3.2 + '@tailwindcss/oxide-darwin-arm64': 4.3.2 + '@tailwindcss/oxide-darwin-x64': 4.3.2 + '@tailwindcss/oxide-freebsd-x64': 4.3.2 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.2 + '@tailwindcss/oxide-linux-arm64-gnu': 4.3.2 + '@tailwindcss/oxide-linux-arm64-musl': 4.3.2 + '@tailwindcss/oxide-linux-x64-gnu': 4.3.2 + '@tailwindcss/oxide-linux-x64-musl': 4.3.2 + '@tailwindcss/oxide-wasm32-wasi': 4.3.2 + '@tailwindcss/oxide-win32-arm64-msvc': 4.3.2 + '@tailwindcss/oxide-win32-x64-msvc': 4.3.2 + + '@tailwindcss/vite@4.3.2(vite@8.1.3(esbuild@0.28.1)(jiti@2.7.0))': + dependencies: + '@tailwindcss/node': 4.3.2 + '@tailwindcss/oxide': 4.3.2 + tailwindcss: 4.3.2 + vite: 8.1.3(esbuild@0.28.1)(jiti@2.7.0) + + '@tanstack/query-core@5.101.2': {} + + '@tanstack/react-query@5.101.2(react@18.3.1)': + dependencies: + '@tanstack/query-core': 5.101.2 + react: 18.3.1 + + '@tybys/wasm-util@0.10.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + '@types/babel__generator': 7.27.0 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.28.0 + + '@types/babel__generator@7.27.0': + dependencies: + '@babel/types': 7.29.7 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@types/babel__traverse@7.28.0': + dependencies: + '@babel/types': 7.29.7 + + '@types/d3-array@3.2.2': {} + + '@types/d3-axis@3.0.6': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-brush@3.0.6': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-chord@3.0.6': {} + + '@types/d3-color@3.1.3': {} + + '@types/d3-contour@3.0.6': + dependencies: + '@types/d3-array': 3.2.2 + '@types/geojson': 7946.0.16 + + '@types/d3-delaunay@6.0.4': {} + + '@types/d3-dispatch@3.0.7': {} + + '@types/d3-drag@3.0.7': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-dsv@3.0.7': {} + + '@types/d3-ease@3.0.2': {} + + '@types/d3-fetch@3.0.7': + dependencies: + '@types/d3-dsv': 3.0.7 + + '@types/d3-force@3.0.10': {} + + '@types/d3-format@3.0.4': {} + + '@types/d3-geo@3.1.0': + dependencies: + '@types/geojson': 7946.0.16 + + '@types/d3-hierarchy@3.1.7': {} + + '@types/d3-interpolate@3.0.4': + dependencies: + '@types/d3-color': 3.1.3 + + '@types/d3-path@3.1.1': {} + + '@types/d3-polygon@3.0.2': {} + + '@types/d3-quadtree@3.0.6': {} + + '@types/d3-random@3.0.4': {} + + '@types/d3-scale-chromatic@3.1.0': {} + + '@types/d3-scale@4.0.9': + dependencies: + '@types/d3-time': 3.0.4 + + '@types/d3-selection@3.0.11': {} + + '@types/d3-shape@3.1.8': + dependencies: + '@types/d3-path': 3.1.1 + + '@types/d3-time-format@4.0.3': {} + + '@types/d3-time@3.0.4': {} + + '@types/d3-timer@3.0.2': {} + + '@types/d3-transition@3.0.9': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-zoom@3.0.8': + dependencies: + '@types/d3-interpolate': 3.0.4 + '@types/d3-selection': 3.0.11 + + '@types/d3@7.4.3': + dependencies: + '@types/d3-array': 3.2.2 + '@types/d3-axis': 3.0.6 + '@types/d3-brush': 3.0.6 + '@types/d3-chord': 3.0.6 + '@types/d3-color': 3.1.3 + '@types/d3-contour': 3.0.6 + '@types/d3-delaunay': 6.0.4 + '@types/d3-dispatch': 3.0.7 + '@types/d3-drag': 3.0.7 + '@types/d3-dsv': 3.0.7 + '@types/d3-ease': 3.0.2 + '@types/d3-fetch': 3.0.7 + '@types/d3-force': 3.0.10 + '@types/d3-format': 3.0.4 + '@types/d3-geo': 3.1.0 + '@types/d3-hierarchy': 3.1.7 + '@types/d3-interpolate': 3.0.4 + '@types/d3-path': 3.1.1 + '@types/d3-polygon': 3.0.2 + '@types/d3-quadtree': 3.0.6 + '@types/d3-random': 3.0.4 + '@types/d3-scale': 4.0.9 + '@types/d3-scale-chromatic': 3.1.0 + '@types/d3-selection': 3.0.11 + '@types/d3-shape': 3.1.8 + '@types/d3-time': 3.0.4 + '@types/d3-time-format': 4.0.3 + '@types/d3-timer': 3.0.2 + '@types/d3-transition': 3.0.9 + '@types/d3-zoom': 3.0.8 + + '@types/debug@4.1.13': + dependencies: + '@types/ms': 2.1.0 + + '@types/estree-jsx@1.0.5': + dependencies: + '@types/estree': 1.0.9 + + '@types/estree@1.0.9': {} + + '@types/geojson@7946.0.16': {} + + '@types/hast@3.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/mdast@4.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/mdx@2.0.14': {} + + '@types/ms@2.1.0': {} + + '@types/nlcst@2.0.3': + dependencies: + '@types/unist': 3.0.3 + + '@types/prop-types@15.7.15': {} + + '@types/react-dom@18.3.7(@types/react@18.3.31)': + dependencies: + '@types/react': 18.3.31 + + '@types/react@18.3.31': + dependencies: + '@types/prop-types': 15.7.15 + csstype: 3.2.3 + + '@types/trusted-types@2.0.7': + optional: true + + '@types/unist@2.0.11': {} + + '@types/unist@3.0.3': {} + + '@types/use-sync-external-store@0.0.6': {} + + '@ungap/structured-clone@1.3.2': {} + + '@upsetjs/venn.js@2.0.0': + optionalDependencies: + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + '@vercel/oidc@3.2.0': {} + + '@vitejs/plugin-react@5.2.0(vite@8.1.3(esbuild@0.28.1)(jiti@2.7.0))': + dependencies: + '@babel/core': 7.29.7 + '@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-react-jsx-source': 7.29.7(@babel/core@7.29.7) + '@rolldown/pluginutils': 1.0.0-rc.3 + '@types/babel__core': 7.20.5 + react-refresh: 0.18.0 + vite: 8.1.3(esbuild@0.28.1)(jiti@2.7.0) + transitivePeerDependencies: + - supports-color + + acorn-jsx@5.3.2(acorn@8.17.0): + dependencies: + acorn: 8.17.0 + + acorn@8.17.0: {} + + ai@6.0.219(zod@4.4.3): + dependencies: + '@ai-sdk/gateway': 3.0.143(zod@4.4.3) + '@ai-sdk/provider': 3.0.13 + '@ai-sdk/provider-utils': 4.0.35(zod@4.4.3) + '@opentelemetry/api': 1.9.1 + zod: 4.4.3 + + am-i-vibing@0.4.0: + dependencies: + process-ancestry: 0.1.0 + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.2 + + argparse@2.0.1: {} + + aria-hidden@1.2.6: + dependencies: + tslib: 2.8.1 + + aria-query@5.3.2: {} + + array-iterate@2.0.1: {} + + astring@1.9.0: {} + + astro@7.0.6(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(jiti@2.7.0): + dependencies: + '@astrojs/compiler-rs': 0.3.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@astrojs/internal-helpers': 0.10.1 + '@astrojs/markdown-satteri': 0.3.3 + '@astrojs/telemetry': 3.3.2 + '@capsizecss/unpack': 4.0.1 + '@clack/prompts': 1.6.0 + '@oslojs/encoding': 1.1.0 + '@rollup/pluginutils': 5.4.0 + am-i-vibing: 0.4.0 + aria-query: 5.3.2 + axobject-query: 4.1.0 + ci-info: 4.4.0 + clsx: 2.1.1 + common-ancestor-path: 2.0.0 + cookie: 1.1.1 + devalue: 5.8.1 + diff: 8.0.4 + dset: 3.1.4 + es-module-lexer: 2.3.0 + esbuild: 0.28.1 + flattie: 1.1.1 + fontace: 0.4.1 + get-tsconfig: 5.0.0-beta.4 + github-slugger: 2.0.0 + html-escaper: 3.0.3 + http-cache-semantics: 4.2.0 + js-yaml: 4.3.0 + jsonc-parser: 3.3.1 + magic-string: 0.30.21 + magicast: 0.5.3 + mrmime: 2.0.1 + neotraverse: 0.6.18 + obug: 2.1.3 + p-limit: 7.3.0 + p-queue: 9.3.0 + package-manager-detector: 1.7.0 + piccolore: 0.1.3 + picomatch: 4.0.5 + semver: 7.8.5 + shiki: 4.3.0 + smol-toml: 1.7.0 + svgo: 4.0.1 + tinyclip: 0.1.15 + tinyexec: 1.2.4 + tinyglobby: 0.2.17 + ultrahtml: 1.6.0 + unifont: 0.7.4 + unstorage: 1.17.5 + vite: 8.1.3(esbuild@0.28.1)(jiti@2.7.0) + vitefu: 1.1.3(vite@8.1.3(esbuild@0.28.1)(jiti@2.7.0)) + xxhash-wasm: 1.1.0 + yargs-parser: 22.0.0 + zod: 4.4.3 + optionalDependencies: + '@astrojs/markdown-remark': 7.2.1 + sharp: 0.35.3 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@emnapi/core' + - '@emnapi/runtime' + - '@netlify/blobs' + - '@planetscale/database' + - '@types/node' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/functions' + - '@vercel/kv' + - '@vitejs/devtools' + - aws4fetch + - db0 + - idb-keyval + - ioredis + - jiti + - less + - rollup + - sass + - sass-embedded + - stylus + - sugarss + - terser + - tsx + - uploadthing + - yaml + + axobject-query@4.1.0: {} + + bail@2.0.2: {} + + baseline-browser-mapping@2.10.41: {} + + boolbase@1.0.0: {} + + browserslist@4.28.4: + dependencies: + baseline-browser-mapping: 2.10.41 + caniuse-lite: 1.0.30001800 + electron-to-chromium: 1.5.385 + node-releases: 2.0.50 + update-browserslist-db: 1.2.3(browserslist@4.28.4) + + caniuse-lite@1.0.30001800: {} + + ccount@2.0.1: {} + + character-entities-html4@2.1.0: {} + + character-entities-legacy@3.0.0: {} + + character-entities@2.0.2: {} + + character-reference-invalid@2.0.1: {} + + chokidar@5.0.0: + dependencies: + readdirp: 5.0.0 + + ci-info@4.4.0: {} + + class-variance-authority@0.7.1: + dependencies: + clsx: 2.1.1 + + classnames@2.5.1: {} + + clsx@2.1.1: {} + + cm6-theme-basic-light@0.2.0(@codemirror/language@6.12.4)(@codemirror/state@6.7.0)(@codemirror/view@6.43.4)(@lezer/highlight@1.2.3): + dependencies: + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + '@lezer/highlight': 1.2.3 + + codemirror@6.0.2: + dependencies: + '@codemirror/autocomplete': 6.20.3 + '@codemirror/commands': 6.10.4 + '@codemirror/language': 6.12.4 + '@codemirror/lint': 6.9.7 + '@codemirror/search': 6.7.1 + '@codemirror/state': 6.7.0 + '@codemirror/view': 6.43.4 + + collapse-white-space@2.1.0: {} + + comma-separated-tokens@2.0.3: {} + + commander@11.1.0: {} + + commander@7.2.0: {} + + commander@8.3.0: {} + + common-ancestor-path@2.0.0: {} + + compute-scroll-into-view@2.0.4: {} + + convert-source-map@2.0.0: {} + + cookie-es@1.2.3: {} + + cookie@1.1.1: {} + + cose-base@1.0.3: + dependencies: + layout-base: 1.0.2 + + cose-base@2.2.0: + dependencies: + layout-base: 2.0.1 + + crelt@1.0.7: {} + + crossws@0.3.5: + dependencies: + uncrypto: 0.1.3 + + css-select@5.2.2: + dependencies: + boolbase: 1.0.0 + css-what: 6.2.2 + domhandler: 5.0.3 + domutils: 3.2.2 + nth-check: 2.1.1 + + css-tree@2.2.1: + dependencies: + mdn-data: 2.0.28 + source-map-js: 1.2.1 + + css-tree@3.2.1: + dependencies: + mdn-data: 2.27.1 + source-map-js: 1.2.1 + + css-what@6.2.2: {} + + csso@5.0.5: + dependencies: + css-tree: 2.2.1 + + csstype@3.2.3: {} + + cytoscape-cose-bilkent@4.1.0(cytoscape@3.34.0): + dependencies: + cose-base: 1.0.3 + cytoscape: 3.34.0 + + cytoscape-fcose@2.2.0(cytoscape@3.34.0): + dependencies: + cose-base: 2.2.0 + cytoscape: 3.34.0 + + cytoscape@3.34.0: {} + + d3-array@2.12.1: + dependencies: + internmap: 1.0.1 + + d3-array@3.2.4: + dependencies: + internmap: 2.0.3 + + d3-axis@3.0.0: {} + + d3-brush@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + d3-chord@3.0.1: + dependencies: + d3-path: 3.1.0 + + d3-color@3.1.0: {} + + d3-contour@4.0.2: + dependencies: + d3-array: 3.2.4 + + d3-delaunay@6.0.4: + dependencies: + delaunator: 5.1.0 + + d3-dispatch@3.0.1: {} + + d3-drag@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-selection: 3.0.0 + + d3-dsv@3.0.1: + dependencies: + commander: 7.2.0 + iconv-lite: 0.6.3 + rw: 1.3.3 + + d3-ease@3.0.1: {} + + d3-fetch@3.0.1: + dependencies: + d3-dsv: 3.0.1 + + d3-force@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-quadtree: 3.0.1 + d3-timer: 3.0.1 + + d3-format@3.1.2: {} + + d3-geo@3.1.1: + dependencies: + d3-array: 3.2.4 + + d3-hierarchy@3.1.2: {} + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + + d3-path@1.0.9: {} + + d3-path@3.1.0: {} + + d3-polygon@3.0.1: {} + + d3-quadtree@3.0.1: {} + + d3-random@3.0.1: {} + + d3-sankey@0.12.3: + dependencies: + d3-array: 2.12.1 + d3-shape: 1.3.7 + + d3-scale-chromatic@3.1.0: + dependencies: + d3-color: 3.1.0 + d3-interpolate: 3.0.1 + + d3-scale@4.0.2: + dependencies: + d3-array: 3.2.4 + d3-format: 3.1.2 + d3-interpolate: 3.0.1 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + + d3-selection@3.0.0: {} + + d3-shape@1.3.7: + dependencies: + d3-path: 1.0.9 + + d3-shape@3.2.0: + dependencies: + d3-path: 3.1.0 + + d3-time-format@4.1.0: + dependencies: + d3-time: 3.1.0 + + d3-time@3.1.0: + dependencies: + d3-array: 3.2.4 + + d3-timer@3.0.1: {} + + d3-transition@3.0.1(d3-selection@3.0.0): + dependencies: + d3-color: 3.1.0 + d3-dispatch: 3.0.1 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-timer: 3.0.1 + + d3-zoom@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + d3@7.9.0: + dependencies: + d3-array: 3.2.4 + d3-axis: 3.0.0 + d3-brush: 3.0.0 + d3-chord: 3.0.1 + d3-color: 3.1.0 + d3-contour: 4.0.2 + d3-delaunay: 6.0.4 + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-dsv: 3.0.1 + d3-ease: 3.0.1 + d3-fetch: 3.0.1 + d3-force: 3.0.0 + d3-format: 3.1.2 + d3-geo: 3.1.1 + d3-hierarchy: 3.1.2 + d3-interpolate: 3.0.1 + d3-path: 3.1.0 + d3-polygon: 3.0.1 + d3-quadtree: 3.0.1 + d3-random: 3.0.1 + d3-scale: 4.0.2 + d3-scale-chromatic: 3.1.0 + d3-selection: 3.0.0 + d3-shape: 3.2.0 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + d3-timer: 3.0.1 + d3-transition: 3.0.1(d3-selection@3.0.0) + d3-zoom: 3.0.0 + + dagre-d3-es@7.0.14: + dependencies: + d3: 7.9.0 + lodash-es: 4.18.1 + + dayjs@1.11.21: {} + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + decimal.js-light@2.5.1: {} + + decode-named-character-reference@1.3.0: + dependencies: + character-entities: 2.0.2 + + defu@6.1.7: {} + + delaunator@5.1.0: + dependencies: + robust-predicates: 3.0.3 + + dequal@2.0.3: {} + + destr@2.0.5: {} + + detect-libc@2.1.2: {} + + detect-node-es@1.1.0: {} + + devalue@5.8.1: {} + + devlop@1.1.0: + dependencies: + dequal: 2.0.3 + + diff@5.2.2: {} + + diff@8.0.4: {} + + dom-serializer@2.0.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + + domelementtype@2.3.0: {} + + domhandler@5.0.3: + dependencies: + domelementtype: 2.3.0 + + dompurify@3.4.11: + optionalDependencies: + '@types/trusted-types': 2.0.7 + + domutils@3.2.2: + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + + downshift@7.6.2(react@18.3.1): + dependencies: + '@babel/runtime': 7.29.7 + compute-scroll-into-view: 2.0.4 + prop-types: 15.8.1 + react: 18.3.1 + react-is: 17.0.2 + tslib: 2.8.1 + + dset@3.1.4: {} + + electron-to-chromium@1.5.385: {} + + emoji-regex-xs@1.0.0: {} + + enhanced-resolve@5.21.6: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.3 + + entities@4.5.0: {} + + entities@6.0.1: {} + + es-module-lexer@2.3.0: {} + + es-toolkit@1.49.0: {} + + esast-util-from-estree@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + devlop: 1.1.0 + estree-util-visit: 2.0.0 + unist-util-position-from-estree: 2.0.0 + + esast-util-from-js@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + acorn: 8.17.0 + esast-util-from-estree: 2.0.0 + vfile-message: 4.0.3 + + esbuild@0.28.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.1 + '@esbuild/android-arm': 0.28.1 + '@esbuild/android-arm64': 0.28.1 + '@esbuild/android-x64': 0.28.1 + '@esbuild/darwin-arm64': 0.28.1 + '@esbuild/darwin-x64': 0.28.1 + '@esbuild/freebsd-arm64': 0.28.1 + '@esbuild/freebsd-x64': 0.28.1 + '@esbuild/linux-arm': 0.28.1 + '@esbuild/linux-arm64': 0.28.1 + '@esbuild/linux-ia32': 0.28.1 + '@esbuild/linux-loong64': 0.28.1 + '@esbuild/linux-mips64el': 0.28.1 + '@esbuild/linux-ppc64': 0.28.1 + '@esbuild/linux-riscv64': 0.28.1 + '@esbuild/linux-s390x': 0.28.1 + '@esbuild/linux-x64': 0.28.1 + '@esbuild/netbsd-arm64': 0.28.1 + '@esbuild/netbsd-x64': 0.28.1 + '@esbuild/openbsd-arm64': 0.28.1 + '@esbuild/openbsd-x64': 0.28.1 + '@esbuild/openharmony-arm64': 0.28.1 + '@esbuild/sunos-x64': 0.28.1 + '@esbuild/win32-arm64': 0.28.1 + '@esbuild/win32-ia32': 0.28.1 + '@esbuild/win32-x64': 0.28.1 + + escalade@3.2.0: {} + + escape-string-regexp@5.0.0: {} + + estree-util-attach-comments@3.0.0: + dependencies: + '@types/estree': 1.0.9 + + estree-util-build-jsx@3.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + estree-walker: 3.0.3 + + estree-util-is-identifier-name@3.0.0: {} + + estree-util-scope@1.0.0: + dependencies: + '@types/estree': 1.0.9 + devlop: 1.1.0 + + estree-util-to-js@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + astring: 1.9.0 + source-map: 0.7.6 + + estree-util-visit@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/unist': 3.0.3 + + estree-walker@2.0.2: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + eventemitter3@5.0.4: {} + + eventsource-parser@3.1.0: {} + + extend@3.0.2: {} + + fast-string-truncated-width@3.0.3: {} + + fast-string-width@3.0.2: + dependencies: + fast-string-truncated-width: 3.0.3 + + fast-wrap-ansi@0.2.2: + dependencies: + fast-string-width: 3.0.2 + + fault@2.0.1: + dependencies: + format: 0.2.2 + + fdir@6.5.0(picomatch@4.0.5): + optionalDependencies: + picomatch: 4.0.5 + + flattie@1.1.1: {} + + fontace@0.4.1: + dependencies: + fontkitten: 1.0.3 + + fontkitten@1.0.3: + dependencies: + tiny-inflate: 1.0.3 + + format@0.2.2: {} + + fsevents@2.3.3: + optional: true + + gensync@1.0.0-beta.2: {} + + get-nonce@1.0.1: {} + + get-tsconfig@5.0.0-beta.4: + dependencies: + resolve-pkg-maps: 1.0.0 + + github-slugger@2.0.0: {} + + graceful-fs@4.2.11: {} + + h3@1.15.11: + dependencies: + cookie-es: 1.2.3 + crossws: 0.3.5 + defu: 6.1.7 + destr: 2.0.5 + iron-webcrypto: 1.2.1 + node-mock-http: 1.0.4 + radix3: 1.1.2 + ufo: 1.6.4 + uncrypto: 0.1.3 + + hachure-fill@0.5.2: {} + + hast-util-from-html@2.0.3: + dependencies: + '@types/hast': 3.0.4 + devlop: 1.1.0 + hast-util-from-parse5: 8.0.3 + parse5: 7.3.0 + vfile: 6.0.3 + vfile-message: 4.0.3 + + hast-util-from-parse5@8.0.3: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + devlop: 1.1.0 + hastscript: 9.0.1 + property-information: 7.2.0 + vfile: 6.0.3 + vfile-location: 5.0.3 + web-namespaces: 2.0.1 + + hast-util-is-element@3.0.0: + dependencies: + '@types/hast': 3.0.4 + + hast-util-parse-selector@4.0.0: + dependencies: + '@types/hast': 3.0.4 + + hast-util-raw@9.1.0: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + '@ungap/structured-clone': 1.3.2 + hast-util-from-parse5: 8.0.3 + hast-util-to-parse5: 8.0.1 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.1 + parse5: 7.3.0 + unist-util-position: 5.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + + hast-util-sanitize@5.0.2: + dependencies: + '@types/hast': 3.0.4 + '@ungap/structured-clone': 1.3.2 + unist-util-position: 5.0.0 + + hast-util-to-estree@3.1.3: + dependencies: + '@types/estree': 1.0.9 + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + estree-util-attach-comments: 3.0.0 + estree-util-is-identifier-name: 3.0.0 + hast-util-whitespace: 3.0.0 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.2.0 + mdast-util-mdxjs-esm: 2.0.1 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + style-to-js: 1.1.21 + unist-util-position: 5.0.0 + zwitch: 2.0.4 + transitivePeerDependencies: + - supports-color + + hast-util-to-html@9.0.5: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.1 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + + hast-util-to-jsx-runtime@2.3.6: + dependencies: + '@types/estree': 1.0.9 + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + hast-util-whitespace: 3.0.0 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.2.0 + mdast-util-mdxjs-esm: 2.0.1 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + style-to-js: 1.1.21 + unist-util-position: 5.0.0 + vfile-message: 4.0.3 + transitivePeerDependencies: + - supports-color + + hast-util-to-parse5@8.0.1: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + + hast-util-to-text@4.0.2: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + hast-util-is-element: 3.0.0 + unist-util-find-after: 5.0.0 + + hast-util-whitespace@3.0.0: + dependencies: + '@types/hast': 3.0.4 + + hastscript@9.0.1: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + hast-util-parse-selector: 4.0.0 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + + html-escaper@3.0.3: {} + + html-url-attributes@3.0.1: {} + + html-void-elements@3.0.0: {} + + http-cache-semantics@4.2.0: {} + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + immer@11.1.9: {} + + import-meta-resolve@4.2.0: {} + + inline-style-parser@0.2.7: {} + + internmap@1.0.1: {} + + internmap@2.0.3: {} + + iron-webcrypto@1.2.1: {} + + is-alphabetical@2.0.1: {} + + is-alphanumerical@2.0.1: + dependencies: + is-alphabetical: 2.0.1 + is-decimal: 2.0.1 + + is-decimal@2.0.1: {} + + is-docker@3.0.0: {} + + is-docker@4.0.0: {} + + is-hexadecimal@2.0.1: {} + + is-inside-container@1.0.0: + dependencies: + is-docker: 3.0.0 + + is-plain-obj@4.1.0: {} + + is-wsl@3.1.1: + dependencies: + is-inside-container: 1.0.0 + + isomorphic.js@0.2.5: {} + + jiti@2.7.0: {} + + jotai@2.20.1(@babel/core@7.29.7)(@babel/template@7.29.7)(@types/react@18.3.31)(react@18.3.1): + optionalDependencies: + '@babel/core': 7.29.7 + '@babel/template': 7.29.7 + '@types/react': 18.3.31 + react: 18.3.1 + + js-tokens@4.0.0: {} + + js-yaml@4.2.0: + dependencies: + argparse: 2.0.1 + + js-yaml@4.3.0: + dependencies: + argparse: 2.0.1 + + jsesc@3.1.0: {} + + json-schema@0.4.0: {} + + json5@2.2.3: {} + + jsonc-parser@3.3.1: {} + + katex@0.16.47: + dependencies: + commander: 8.3.0 + + khroma@2.1.0: {} + + kleur@4.1.5: {} + + layout-base@1.0.2: {} + + layout-base@2.0.1: {} + + lexical@0.35.0: {} + + lib0@0.2.117: + dependencies: + isomorphic.js: 0.2.5 + + lightningcss-android-arm64@1.32.0: + optional: true + + lightningcss-darwin-arm64@1.32.0: + optional: true + + lightningcss-darwin-x64@1.32.0: + optional: true + + lightningcss-freebsd-x64@1.32.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true + + lightningcss-linux-arm64-gnu@1.32.0: + optional: true + + lightningcss-linux-arm64-musl@1.32.0: + optional: true + + lightningcss-linux-x64-gnu@1.32.0: + optional: true + + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 + + lodash-es@4.18.1: {} + + longest-streak@3.1.0: {} + + loose-envify@1.4.0: + dependencies: + js-tokens: 4.0.0 + + lru-cache@11.5.1: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + magicast@0.5.3: + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + source-map-js: 1.2.1 + + markdown-extensions@2.0.0: {} + + markdown-table@3.0.4: {} + + marked@16.4.2: {} + + marked@17.0.6: {} + + mdast-util-definitions@6.0.0: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + unist-util-visit: 5.1.0 + + mdast-util-directive@3.1.0: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + parse-entities: 4.0.2 + stringify-entities: 4.0.4 + unist-util-visit-parents: 6.0.2 + transitivePeerDependencies: + - supports-color + + mdast-util-find-and-replace@3.0.2: + dependencies: + '@types/mdast': 4.0.4 + escape-string-regexp: 5.0.0 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.0.2 + + mdast-util-from-markdown@2.0.3: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.2 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-decode-string: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + + mdast-util-frontmatter@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + escape-string-regexp: 5.0.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + micromark-extension-frontmatter: 2.0.0 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-autolink-literal@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-find-and-replace: 3.0.2 + micromark-util-character: 2.1.1 + + mdast-util-gfm-footnote@2.1.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + micromark-util-normalize-identifier: 2.0.1 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-strikethrough@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-table@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + markdown-table: 3.0.4 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-task-list-item@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm@3.1.0: + dependencies: + mdast-util-from-markdown: 2.0.3 + mdast-util-gfm-autolink-literal: 2.0.1 + mdast-util-gfm-footnote: 2.1.0 + mdast-util-gfm-strikethrough: 2.0.0 + mdast-util-gfm-table: 2.0.0 + mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-highlight-mark@1.2.2: + dependencies: + micromark-extension-highlight-mark: 1.2.0 + + mdast-util-mdx-expression@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-mdx-jsx@3.2.0: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + parse-entities: 4.0.2 + stringify-entities: 4.0.4 + unist-util-stringify-position: 4.0.0 + vfile-message: 4.0.3 + transitivePeerDependencies: + - supports-color + + mdast-util-mdx@3.0.0: + dependencies: + mdast-util-from-markdown: 2.0.3 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.2.0 + mdast-util-mdxjs-esm: 2.0.1 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-mdxjs-esm@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-phrasing@4.1.0: + dependencies: + '@types/mdast': 4.0.4 + unist-util-is: 6.0.1 + + mdast-util-to-hast@13.2.1: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.3.2 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.1 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + + mdast-util-to-markdown@2.1.2: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + longest-streak: 3.1.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-string: 4.0.0 + micromark-util-classify-character: 2.0.1 + micromark-util-decode-string: 2.0.1 + unist-util-visit: 5.1.0 + zwitch: 2.0.4 + + mdast-util-to-string@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + + mdn-data@2.0.28: {} + + mdn-data@2.27.1: {} + + mermaid@11.16.0: + dependencies: + '@braintree/sanitize-url': 7.1.2 + '@iconify/utils': 3.1.3 + '@mermaid-js/parser': 1.2.0 + '@types/d3': 7.4.3 + '@upsetjs/venn.js': 2.0.0 + cytoscape: 3.34.0 + cytoscape-cose-bilkent: 4.1.0(cytoscape@3.34.0) + cytoscape-fcose: 2.2.0(cytoscape@3.34.0) + d3: 7.9.0 + d3-sankey: 0.12.3 + dagre-d3-es: 7.0.14 + dayjs: 1.11.21 + dompurify: 3.4.11 + es-toolkit: 1.49.0 + katex: 0.16.47 + khroma: 2.1.0 + marked: 16.4.2 + roughjs: 4.6.6 + stylis: 4.4.0 + ts-dedent: 2.3.0 + uuid: 14.0.1 + + micromark-core-commonmark@2.0.3: + dependencies: + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + micromark-factory-destination: 2.0.1 + micromark-factory-label: 2.0.1 + micromark-factory-space: 2.0.1 + micromark-factory-title: 2.0.1 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-html-tag-name: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-directive@3.0.2: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + parse-entities: 4.0.2 + + micromark-extension-frontmatter@2.0.0: + dependencies: + fault: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-autolink-literal@2.1.0: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-footnote@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-core-commonmark: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-strikethrough@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-table@2.1.1: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-tagfilter@2.0.0: + dependencies: + micromark-util-types: 2.0.2 + + micromark-extension-gfm-task-list-item@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm@3.0.0: + dependencies: + micromark-extension-gfm-autolink-literal: 2.1.0 + micromark-extension-gfm-footnote: 2.1.0 + micromark-extension-gfm-strikethrough: 2.1.0 + micromark-extension-gfm-table: 2.1.1 + micromark-extension-gfm-tagfilter: 2.0.0 + micromark-extension-gfm-task-list-item: 2.1.0 + micromark-util-combine-extensions: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-highlight-mark@1.2.0: + dependencies: + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + uvu: 0.5.6 + + micromark-extension-mdx-expression@3.0.1: + dependencies: + '@types/estree': 1.0.9 + devlop: 1.1.0 + micromark-factory-mdx-expression: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-mdx-jsx@3.0.2: + dependencies: + '@types/estree': 1.0.9 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + micromark-factory-mdx-expression: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + vfile-message: 4.0.3 + + micromark-extension-mdx-md@2.0.0: + dependencies: + micromark-util-types: 2.0.2 + + micromark-extension-mdxjs-esm@3.0.0: + dependencies: + '@types/estree': 1.0.9 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.3 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + unist-util-position-from-estree: 2.0.0 + vfile-message: 4.0.3 + + micromark-extension-mdxjs@3.0.0: + dependencies: + acorn: 8.17.0 + acorn-jsx: 5.3.2(acorn@8.17.0) + micromark-extension-mdx-expression: 3.0.1 + micromark-extension-mdx-jsx: 3.0.2 + micromark-extension-mdx-md: 2.0.0 + micromark-extension-mdxjs-esm: 3.0.0 + micromark-util-combine-extensions: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-destination@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-label@2.0.1: + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-mdx-expression@2.0.3: + dependencies: + '@types/estree': 1.0.9 + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + unist-util-position-from-estree: 2.0.0 + vfile-message: 4.0.3 + + micromark-factory-space@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-types: 2.0.2 + + micromark-factory-title@2.0.1: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-whitespace@2.0.1: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-character@2.1.1: + dependencies: + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-chunked@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-classify-character@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-combine-extensions@2.0.1: + dependencies: + micromark-util-chunked: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-decode-numeric-character-reference@2.0.2: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-decode-string@2.0.1: + dependencies: + decode-named-character-reference: 1.3.0 + micromark-util-character: 2.1.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-symbol: 2.0.1 + + micromark-util-encode@2.0.1: {} + + micromark-util-events-to-acorn@2.0.3: + dependencies: + '@types/estree': 1.0.9 + '@types/unist': 3.0.3 + devlop: 1.1.0 + estree-util-visit: 2.0.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + vfile-message: 4.0.3 + + micromark-util-html-tag-name@2.0.1: {} + + micromark-util-normalize-identifier@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-resolve-all@2.0.1: + dependencies: + micromark-util-types: 2.0.2 + + micromark-util-sanitize-uri@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-encode: 2.0.1 + micromark-util-symbol: 2.0.1 + + micromark-util-subtokenize@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-symbol@2.0.1: {} + + micromark-util-types@2.0.2: {} + + micromark@4.0.2: + dependencies: + '@types/debug': 4.1.13 + debug: 4.4.3 + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-combine-extensions: 2.0.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-encode: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + transitivePeerDependencies: + - supports-color + + mri@1.2.0: {} + + mrmime@2.0.1: {} + + ms@2.1.3: {} + + nanoid@3.3.15: {} + + neotraverse@0.6.18: {} + + nlcst-to-string@4.0.0: + dependencies: + '@types/nlcst': 2.0.3 + + node-fetch-native@1.6.7: {} + + node-mock-http@1.0.4: {} + + node-releases@2.0.50: {} + + normalize-path@3.0.0: {} + + nth-check@2.1.1: + dependencies: + boolbase: 1.0.0 + + object-assign@4.1.1: {} + + obug@2.1.3: {} + + ofetch@1.5.1: + dependencies: + destr: 2.0.5 + node-fetch-native: 1.6.7 + ufo: 1.6.4 + + ohash@2.0.11: {} + + oniguruma-parser@0.12.2: {} + + oniguruma-to-es@2.3.0: + dependencies: + emoji-regex-xs: 1.0.0 + regex: 5.1.1 + regex-recursion: 5.1.1 + + oniguruma-to-es@4.3.6: + dependencies: + oniguruma-parser: 0.12.2 + regex: 6.1.0 + regex-recursion: 6.0.2 + + p-limit@7.3.0: + dependencies: + yocto-queue: 1.2.2 + + p-queue@9.3.0: + dependencies: + eventemitter3: 5.0.4 + p-timeout: 7.0.1 + + p-timeout@7.0.1: {} + + package-manager-detector@1.7.0: {} + + parse-entities@4.0.2: + dependencies: + '@types/unist': 2.0.11 + character-entities-legacy: 3.0.0 + character-reference-invalid: 2.0.1 + decode-named-character-reference: 1.3.0 + is-alphanumerical: 2.0.1 + is-decimal: 2.0.1 + is-hexadecimal: 2.0.1 + + parse-latin@7.0.0: + dependencies: + '@types/nlcst': 2.0.3 + '@types/unist': 3.0.3 + nlcst-to-string: 4.0.0 + unist-util-modify-children: 4.0.0 + unist-util-visit-children: 3.0.0 + vfile: 6.0.3 + + parse5@7.3.0: + dependencies: + entities: 6.0.1 + + path-data-parser@0.1.0: {} + + piccolore@0.1.3: {} + + picocolors@1.1.1: {} + + picomatch@2.3.2: {} + + picomatch@4.0.5: {} + + points-on-curve@0.2.0: {} + + points-on-path@0.2.1: + dependencies: + path-data-parser: 0.1.0 + points-on-curve: 0.2.0 + + postcss@8.5.16: + dependencies: + nanoid: 3.3.15 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prismjs@1.30.0: {} + + process-ancestry@0.1.0: {} + + prop-types@15.8.1: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react-is: 16.13.1 + + property-information@7.2.0: {} + + radix3@1.1.2: {} + + re-resizable@6.11.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + react-dom@18.3.1(react@18.3.1): + dependencies: + loose-envify: 1.4.0 + react: 18.3.1 + scheduler: 0.23.2 + + react-draggable@4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + clsx: 2.1.1 + prop-types: 15.8.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + react-error-boundary@3.1.4(react@18.3.1): + dependencies: + '@babel/runtime': 7.29.7 + react: 18.3.1 + + react-hook-form@7.80.0(react@18.3.1): + dependencies: + react: 18.3.1 + + react-is@16.13.1: {} + + react-is@17.0.2: {} + + react-redux@9.3.0(@types/react@18.3.31)(react@18.3.1)(redux@5.0.1): + dependencies: + '@types/use-sync-external-store': 0.0.6 + react: 18.3.1 + use-sync-external-store: 1.6.0(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + redux: 5.0.1 + + react-refresh@0.18.0: {} + + react-remove-scroll-bar@2.3.8(@types/react@18.3.31)(react@18.3.1): + dependencies: + react: 18.3.1 + react-style-singleton: 2.2.3(@types/react@18.3.31)(react@18.3.1) + tslib: 2.8.1 + optionalDependencies: + '@types/react': 18.3.31 + + react-remove-scroll@2.7.2(@types/react@18.3.31)(react@18.3.1): + dependencies: + react: 18.3.1 + react-remove-scroll-bar: 2.3.8(@types/react@18.3.31)(react@18.3.1) + react-style-singleton: 2.2.3(@types/react@18.3.31)(react@18.3.1) + tslib: 2.8.1 + use-callback-ref: 1.3.3(@types/react@18.3.31)(react@18.3.1) + use-sidecar: 1.1.3(@types/react@18.3.31)(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.31 + + react-rnd@10.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + re-resizable: 6.11.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-draggable: 4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + tslib: 2.6.2 + + react-style-singleton@2.2.3(@types/react@18.3.31)(react@18.3.1): + dependencies: + get-nonce: 1.0.1 + react: 18.3.1 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 18.3.31 + + react@18.3.1: + dependencies: + loose-envify: 1.4.0 + + readdirp@5.0.0: {} + + recharts@3.9.1(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react-is@17.0.2)(react@18.3.1)(redux@5.0.1): + dependencies: + '@reduxjs/toolkit': 2.12.0(react-redux@9.3.0(@types/react@18.3.31)(react@18.3.1)(redux@5.0.1))(react@18.3.1) + clsx: 2.1.1 + decimal.js-light: 2.5.1 + es-toolkit: 1.49.0 + eventemitter3: 5.0.4 + immer: 11.1.9 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-is: 17.0.2 + react-redux: 9.3.0(@types/react@18.3.31)(react@18.3.1)(redux@5.0.1) + reselect: 5.2.0 + tiny-invariant: 1.3.3 + use-sync-external-store: 1.6.0(react@18.3.1) + victory-vendor: 37.3.6 + transitivePeerDependencies: + - '@types/react' + - redux + + recma-build-jsx@1.0.0: + dependencies: + '@types/estree': 1.0.9 + estree-util-build-jsx: 3.0.1 + vfile: 6.0.3 + + recma-jsx@1.0.1(acorn@8.17.0): + dependencies: + acorn: 8.17.0 + acorn-jsx: 5.3.2(acorn@8.17.0) + estree-util-to-js: 2.0.0 + recma-parse: 1.0.0 + recma-stringify: 1.0.0 + unified: 11.0.5 + + recma-parse@1.0.0: + dependencies: + '@types/estree': 1.0.9 + esast-util-from-js: 2.0.1 + unified: 11.0.5 + vfile: 6.0.3 + + recma-stringify@1.0.0: + dependencies: + '@types/estree': 1.0.9 + estree-util-to-js: 2.0.0 + unified: 11.0.5 + vfile: 6.0.3 + + redux-thunk@3.1.0(redux@5.0.1): + dependencies: + redux: 5.0.1 + + redux@5.0.1: {} + + regex-recursion@5.1.1: + dependencies: + regex: 5.1.1 + regex-utilities: 2.3.0 + + regex-recursion@6.0.2: + dependencies: + regex-utilities: 2.3.0 + + regex-utilities@2.3.0: {} + + regex@5.1.1: + dependencies: + regex-utilities: 2.3.0 + + regex@6.1.0: + dependencies: + regex-utilities: 2.3.0 + + rehype-harden@1.1.8: + dependencies: + unist-util-visit: 5.1.0 + + rehype-raw@7.0.0: + dependencies: + '@types/hast': 3.0.4 + hast-util-raw: 9.1.0 + vfile: 6.0.3 + + rehype-recma@1.0.0: + dependencies: + '@types/estree': 1.0.9 + '@types/hast': 3.0.4 + hast-util-to-estree: 3.1.3 + transitivePeerDependencies: + - supports-color + + rehype-sanitize@6.0.0: + dependencies: + '@types/hast': 3.0.4 + hast-util-sanitize: 5.0.2 + + rehype-stringify@10.0.1: + dependencies: + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + unified: 11.0.5 + + remark-gfm@4.0.1: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-gfm: 3.1.0 + micromark-extension-gfm: 3.0.0 + remark-parse: 11.0.0 + remark-stringify: 11.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + + remark-mdx@3.1.1: + dependencies: + mdast-util-mdx: 3.0.0 + micromark-extension-mdxjs: 3.0.0 + transitivePeerDependencies: + - supports-color + + remark-parse@11.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.0.3 + micromark-util-types: 2.0.2 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + + remark-rehype@11.1.2: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + mdast-util-to-hast: 13.2.1 + unified: 11.0.5 + vfile: 6.0.3 + + remark-smartypants@3.0.2: + dependencies: + retext: 9.0.0 + retext-smartypants: 6.2.0 + unified: 11.0.5 + unist-util-visit: 5.1.0 + + remark-stringify@11.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-to-markdown: 2.1.2 + unified: 11.0.5 + + remend@1.3.0: {} + + reselect@5.2.0: {} + + resolve-pkg-maps@1.0.0: {} + + retext-latin@4.0.0: + dependencies: + '@types/nlcst': 2.0.3 + parse-latin: 7.0.0 + unified: 11.0.5 + + retext-smartypants@6.2.0: + dependencies: + '@types/nlcst': 2.0.3 + nlcst-to-string: 4.0.0 + unist-util-visit: 5.1.0 + + retext-stringify@4.0.0: + dependencies: + '@types/nlcst': 2.0.3 + nlcst-to-string: 4.0.0 + unified: 11.0.5 + + retext@9.0.0: + dependencies: + '@types/nlcst': 2.0.3 + retext-latin: 4.0.0 + retext-stringify: 4.0.0 + unified: 11.0.5 + + robust-predicates@3.0.3: {} + + rolldown@1.1.4: + dependencies: + '@oxc-project/types': 0.138.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.1.4 + '@rolldown/binding-darwin-arm64': 1.1.4 + '@rolldown/binding-darwin-x64': 1.1.4 + '@rolldown/binding-freebsd-x64': 1.1.4 + '@rolldown/binding-linux-arm-gnueabihf': 1.1.4 + '@rolldown/binding-linux-arm64-gnu': 1.1.4 + '@rolldown/binding-linux-arm64-musl': 1.1.4 + '@rolldown/binding-linux-ppc64-gnu': 1.1.4 + '@rolldown/binding-linux-s390x-gnu': 1.1.4 + '@rolldown/binding-linux-x64-gnu': 1.1.4 + '@rolldown/binding-linux-x64-musl': 1.1.4 + '@rolldown/binding-openharmony-arm64': 1.1.4 + '@rolldown/binding-wasm32-wasi': 1.1.4 + '@rolldown/binding-win32-arm64-msvc': 1.1.4 + '@rolldown/binding-win32-x64-msvc': 1.1.4 + + roughjs@4.6.6: + dependencies: + hachure-fill: 0.5.2 + path-data-parser: 0.1.0 + points-on-curve: 0.2.0 + points-on-path: 0.2.1 + + rw@1.3.3: {} + + sade@1.8.1: + dependencies: + mri: 1.2.0 + + safer-buffer@2.1.2: {} + + satteri@0.9.4: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + optionalDependencies: + '@bruits/satteri-darwin-arm64': 0.9.4 + '@bruits/satteri-darwin-x64': 0.9.4 + '@bruits/satteri-linux-arm64-gnu': 0.9.4 + '@bruits/satteri-linux-arm64-musl': 0.9.4 + '@bruits/satteri-linux-x64-gnu': 0.9.4 + '@bruits/satteri-linux-x64-musl': 0.9.4 + '@bruits/satteri-wasm32-wasi': 0.9.4 + '@bruits/satteri-win32-arm64-msvc': 0.9.4 + '@bruits/satteri-win32-x64-msvc': 0.9.4 + + sax@1.6.0: {} + + scheduler@0.23.2: + dependencies: + loose-envify: 1.4.0 + + semver@6.3.1: {} + + semver@7.8.5: {} + + sharp@0.35.3: + dependencies: + '@img/colour': 1.1.0 + detect-libc: 2.1.2 + semver: 7.8.5 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.35.3 + '@img/sharp-darwin-x64': 0.35.3 + '@img/sharp-freebsd-wasm32': 0.35.3 + '@img/sharp-libvips-darwin-arm64': 1.3.2 + '@img/sharp-libvips-darwin-x64': 1.3.2 + '@img/sharp-libvips-linux-arm': 1.3.2 + '@img/sharp-libvips-linux-arm64': 1.3.2 + '@img/sharp-libvips-linux-ppc64': 1.3.2 + '@img/sharp-libvips-linux-riscv64': 1.3.2 + '@img/sharp-libvips-linux-s390x': 1.3.2 + '@img/sharp-libvips-linux-x64': 1.3.2 + '@img/sharp-libvips-linuxmusl-arm64': 1.3.2 + '@img/sharp-libvips-linuxmusl-x64': 1.3.2 + '@img/sharp-linux-arm': 0.35.3 + '@img/sharp-linux-arm64': 0.35.3 + '@img/sharp-linux-ppc64': 0.35.3 + '@img/sharp-linux-riscv64': 0.35.3 + '@img/sharp-linux-s390x': 0.35.3 + '@img/sharp-linux-x64': 0.35.3 + '@img/sharp-linuxmusl-arm64': 0.35.3 + '@img/sharp-linuxmusl-x64': 0.35.3 + '@img/sharp-webcontainers-wasm32': 0.35.3 + '@img/sharp-win32-arm64': 0.35.3 + '@img/sharp-win32-ia32': 0.35.3 + '@img/sharp-win32-x64': 0.35.3 + optional: true + + shiki@1.29.2: + dependencies: + '@shikijs/core': 1.29.2 + '@shikijs/engine-javascript': 1.29.2 + '@shikijs/engine-oniguruma': 1.29.2 + '@shikijs/langs': 1.29.2 + '@shikijs/themes': 1.29.2 + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + shiki@4.3.0: + dependencies: + '@shikijs/core': 4.3.0 + '@shikijs/engine-javascript': 4.3.0 + '@shikijs/engine-oniguruma': 4.3.0 + '@shikijs/langs': 4.3.0 + '@shikijs/themes': 4.3.0 + '@shikijs/types': 4.3.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + sisteransi@1.0.5: {} + + smol-toml@1.7.0: {} + + source-map-js@1.2.1: {} + + source-map@0.7.6: {} + + space-separated-tokens@2.0.2: {} + + streamdown@2.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + clsx: 2.1.1 + hast-util-to-jsx-runtime: 2.3.6 + html-url-attributes: 3.0.1 + marked: 17.0.6 + mermaid: 11.16.0 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + rehype-harden: 1.1.8 + rehype-raw: 7.0.0 + rehype-sanitize: 6.0.0 + remark-gfm: 4.0.1 + remark-parse: 11.0.0 + remark-rehype: 11.1.2 + remend: 1.3.0 + tailwind-merge: 3.6.0 + unified: 11.0.5 + unist-util-visit: 5.1.0 + unist-util-visit-parents: 6.0.2 + transitivePeerDependencies: + - supports-color + + stringify-entities@4.0.4: + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + + style-mod@4.1.3: {} + + style-to-js@1.1.21: + dependencies: + style-to-object: 1.0.14 + + style-to-object@1.0.14: + dependencies: + inline-style-parser: 0.2.7 + + stylis@4.4.0: {} + + svgo@4.0.1: + dependencies: + commander: 11.1.0 + css-select: 5.2.2 + css-tree: 3.2.1 + css-what: 6.2.2 + csso: 5.0.5 + picocolors: 1.1.1 + sax: 1.6.0 + + tabbable@6.5.0: {} + + tailwind-merge@2.6.1: {} + + tailwind-merge@3.6.0: {} + + tailwindcss@4.3.2: {} + + tapable@2.3.3: {} + + tiny-inflate@1.0.3: {} + + tiny-invariant@1.3.3: {} + + tinyclip@0.1.15: {} + + tinyexec@1.2.4: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.5) + picomatch: 4.0.5 + + trim-lines@3.0.1: {} + + trough@2.2.0: {} + + ts-dedent@2.3.0: {} + + tslib@2.6.2: {} + + tslib@2.8.1: {} + + typescript@6.0.3: {} + + ufo@1.6.4: {} + + ultrahtml@1.6.0: {} + + uncrypto@0.1.3: {} + + unidiff@1.0.4: + dependencies: + diff: 5.2.2 + + unified@11.0.5: + dependencies: + '@types/unist': 3.0.3 + bail: 2.0.2 + devlop: 1.1.0 + extend: 3.0.2 + is-plain-obj: 4.1.0 + trough: 2.2.0 + vfile: 6.0.3 + + unifont@0.7.4: + dependencies: + css-tree: 3.2.1 + ofetch: 1.5.1 + ohash: 2.0.11 + + unist-util-find-after@5.0.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + + unist-util-is@6.0.1: + dependencies: + '@types/unist': 3.0.3 + + unist-util-modify-children@4.0.0: + dependencies: + '@types/unist': 3.0.3 + array-iterate: 2.0.1 + + unist-util-position-from-estree@2.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-position@5.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-remove-position@5.0.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-visit: 5.1.0 + + unist-util-stringify-position@4.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-visit-children@3.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-visit-parents@6.0.2: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + + unist-util-visit@5.1.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.0.2 + + unstorage@1.17.5: + dependencies: + anymatch: 3.1.3 + chokidar: 5.0.0 + destr: 2.0.5 + h3: 1.15.11 + lru-cache: 11.5.1 + node-fetch-native: 1.6.7 + ofetch: 1.5.1 + ufo: 1.6.4 + + update-browserslist-db@1.2.3(browserslist@4.28.4): + dependencies: + browserslist: 4.28.4 + escalade: 3.2.0 + picocolors: 1.1.1 + + use-callback-ref@1.3.3(@types/react@18.3.31)(react@18.3.1): + dependencies: + react: 18.3.1 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 18.3.31 + + use-sidecar@1.1.3(@types/react@18.3.31)(react@18.3.1): + dependencies: + detect-node-es: 1.1.0 + react: 18.3.1 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 18.3.31 + + use-sync-external-store@1.6.0(react@18.3.1): + dependencies: + react: 18.3.1 + + uuid@14.0.1: {} + + uvu@0.5.6: + dependencies: + dequal: 2.0.3 + diff: 5.2.2 + kleur: 4.1.5 + sade: 1.8.1 + + vfile-location@5.0.3: + dependencies: + '@types/unist': 3.0.3 + vfile: 6.0.3 + + vfile-message@4.0.3: + dependencies: + '@types/unist': 3.0.3 + unist-util-stringify-position: 4.0.0 + + vfile@6.0.3: + dependencies: + '@types/unist': 3.0.3 + vfile-message: 4.0.3 + + victory-vendor@37.3.6: + dependencies: + '@types/d3-array': 3.2.2 + '@types/d3-ease': 3.0.2 + '@types/d3-interpolate': 3.0.4 + '@types/d3-scale': 4.0.9 + '@types/d3-shape': 3.1.8 + '@types/d3-time': 3.0.4 + '@types/d3-timer': 3.0.2 + d3-array: 3.2.4 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-scale: 4.0.2 + d3-shape: 3.2.0 + d3-time: 3.1.0 + d3-timer: 3.0.1 + + vite@8.1.3(esbuild@0.28.1)(jiti@2.7.0): + dependencies: + lightningcss: 1.32.0 + picomatch: 4.0.5 + postcss: 8.5.16 + rolldown: 1.1.4 + tinyglobby: 0.2.17 + optionalDependencies: + esbuild: 0.28.1 + fsevents: 2.3.3 + jiti: 2.7.0 + + vitefu@1.1.3(vite@8.1.3(esbuild@0.28.1)(jiti@2.7.0)): + optionalDependencies: + vite: 8.1.3(esbuild@0.28.1)(jiti@2.7.0) + + w3c-keyname@2.2.8: {} + + web-namespaces@2.0.1: {} + + which-pm-runs@1.1.0: {} + + xxhash-wasm@1.1.0: {} + + yallist@3.1.1: {} + + yargs-parser@22.0.0: {} + + yjs@13.6.31: + dependencies: + lib0: 0.2.117 + + yocto-queue@1.2.2: {} + + zod@4.4.3: {} + + zwitch@2.0.4: {} diff --git a/docs/src/components/ClickyProviders.tsx b/docs/src/components/ClickyProviders.tsx new file mode 100644 index 0000000..2dcb746 --- /dev/null +++ b/docs/src/components/ClickyProviders.tsx @@ -0,0 +1,11 @@ +import type { ReactNode } from "react"; +import { DensityProvider, ThemeProvider } from "@flanksource/clicky-ui/hooks"; + +export function ClickyProviders({ children }: { children: ReactNode }) { + return ( + + {children} + + ); +} + diff --git a/docs/src/components/CodeExample.tsx b/docs/src/components/CodeExample.tsx new file mode 100644 index 0000000..58a7232 --- /dev/null +++ b/docs/src/components/CodeExample.tsx @@ -0,0 +1,24 @@ +import { CodeBlock } from "@flanksource/clicky-ui/data"; +import { ClickyProviders } from "./ClickyProviders"; + +export type CodeExampleProps = { + language: string; + source: string; + title?: string; +}; + +export default function CodeExample({ language, source, title }: CodeExampleProps) { + return ( + +
+ {title ? ( +
+ {title} +
+ ) : null} + +
+
+ ); +} + diff --git a/docs/src/components/DocsAppShell.tsx b/docs/src/components/DocsAppShell.tsx new file mode 100644 index 0000000..c379f98 --- /dev/null +++ b/docs/src/components/DocsAppShell.tsx @@ -0,0 +1,86 @@ +import type { ReactNode } from "react"; +import { AppShell, type AppShellNavSection } from "@flanksource/clicky-ui/components"; +import { RouterProvider, type RouterAdapter } from "@flanksource/clicky-ui/rpc"; +import { docSections, isActivePath } from "../data/navigation"; +import { ClickyProviders } from "./ClickyProviders"; + +type DocsAppShellProps = { + currentPath: string; + children: ReactNode; +}; + +export default function DocsAppShell({ currentPath, children }: DocsAppShellProps) { + const navSections = docSections.map((section) => ({ + label: section.label, + items: section.items.map((item) => ({ + key: item.href, + label: item.label, + to: item.href, + active: isActivePath(currentPath, item.href), + badge: + item.status === "stub" ? ( + + next + + ) : undefined, + })), + })); + + const router: RouterAdapter = { + pathname: currentPath, + navigate: (to, opts) => { + if (typeof window === "undefined") return; + if (opts?.replace) window.location.replace(to); + else window.location.assign(to); + }, + renderLink: ({ to, className, children: linkChildren, title, key }) => ( + + {linkChildren} + + ), + }; + + return ( + + + } + nav={
Documentation
} + actions={ + + Prompts + + } + navSections={navSections} + collapsible={false} + sidebarWidth={272} + mobileSidebarLabel="Docs navigation" + contentClassName="p-0" + > + {children} +
+
+
+ ); +} + +function DocsBrand() { + return ( + + + C + + + Captain Docs + + Runtime docs + + + + ); +} + diff --git a/docs/src/components/PromptApiShapes.tsx b/docs/src/components/PromptApiShapes.tsx new file mode 100644 index 0000000..ed0da08 --- /dev/null +++ b/docs/src/components/PromptApiShapes.tsx @@ -0,0 +1,68 @@ +import { Badge, CodeBlock, JsonView, KeyValueList, MethodBadge } from "@flanksource/clicky-ui/data"; +import { ClickyProviders } from "./ClickyProviders"; + +const promptSummary = { + id: "embedded\\u0000embedded\\u0000testdata/commit.prompt", + name: "commit", + sourceKind: "embedded", + source: "Embedded examples", + relPath: "testdata/commit.prompt", + writable: false, + model: "claude-sonnet-4-6", + variables: [{ name: "diff", type: "string" }], +}; + +const renderResult = { + id: "local\\u0000a18f2c431efa\\u0000commit.prompt", + name: "commit", + model: "claude-sonnet-4-6", + backend: "anthropic", + user: "Diff:\\n...", + system: "You write Conventional Commit messages.", + validationError: "", + input: { + prompt: { + source: "commit.prompt", + user: "Diff:\\n...", + system: "You write Conventional Commit messages.", + }, + budget: { maxTokens: 1024, timeout: "2h" }, + }, +}; + +export default function PromptApiShapes() { + return ( + +
+
+
+ + + /api/v1/prompts + +
+ +
+ +
+
+
+
+ + + render / run + +
+ +
+
+
+ ); +} + diff --git a/docs/src/components/PromptPipeline.tsx b/docs/src/components/PromptPipeline.tsx new file mode 100644 index 0000000..d9c0d6a --- /dev/null +++ b/docs/src/components/PromptPipeline.tsx @@ -0,0 +1,108 @@ +import { useMemo, useState } from "react"; +import { InputField, SegmentedControl } from "@flanksource/clicky-ui/components"; +import { Badge, KeyValueList } from "@flanksource/clicky-ui/data"; +import { ClickyProviders } from "./ClickyProviders"; + +type Stage = "load" | "render" | "fold" | "overlay"; + +const stages: Array<{ + id: Stage; + label: string; + description: string; + owner: string; + output: string; +}> = [ + { + id: "load", + label: "Load", + description: "Read inline, file, stdin, embedded, or local .prompt source.", + owner: "prompt.Load, prompt.LoadFile, prompt.LoadFS", + output: "Template source and source name", + }, + { + id: "render", + label: "Render", + description: "dotprompt renders frontmatter and role-marked body content.", + owner: "Template.Render", + output: "System and user message text", + }, + { + id: "fold", + label: "Fold spec", + description: "Spec-native frontmatter is decoded into ai.Request/api.Spec.", + owner: "decodeSpecFrontmatter", + output: "Typed request plus ai.Config", + }, + { + id: "overlay", + label: "Overlay", + description: "CLI flags, saved defaults, and runtime spec edits resolve the final request.", + owner: "overlayCLI, overlayRuntimeSpec", + output: "Provider-ready request", + }, +]; + +export default function PromptPipeline() { + const [stage, setStage] = useState("render"); + const [filter, setFilter] = useState(""); + const selected = stages.find((item) => item.id === stage) ?? stages[0]; + const visibleStages = useMemo(() => { + const q = filter.trim().toLowerCase(); + if (!q) return stages; + return stages.filter((item) => + `${item.label} ${item.description} ${item.owner} ${item.output}` + .toLowerCase() + .includes(q), + ); + }, [filter]); + + return ( + +
+
+
+
Prompt render pipeline
+
+ Static map of the engine path before provider execution. +
+
+ +
+ ({ + id: item.id, + label: item.label, + description: item.output, + }))} + /> +
+ +
+ + {selected.id} + +

{selected.description}

+
+
+
+
+ ); +} + diff --git a/docs/src/components/RuntimeSpecDemo.tsx b/docs/src/components/RuntimeSpecDemo.tsx new file mode 100644 index 0000000..2f42831 --- /dev/null +++ b/docs/src/components/RuntimeSpecDemo.tsx @@ -0,0 +1,99 @@ +import { useState } from "react"; +import { SpecRuntimeEditor, type AISpecRuntimeValue } from "@flanksource/clicky-ui/ai"; +import type { ToolMeta } from "@flanksource/clicky-ui/ai"; +import { ClickyProviders } from "./ClickyProviders"; + +const tools: ToolMeta[] = [ + { + name: "Read", + label: "Read", + group: "Files", + defaultMode: "ask", + description: "Read files from the workspace.", + }, + { + name: "Edit", + label: "Edit", + group: "Files", + defaultMode: "ask", + description: "Apply targeted edits.", + }, + { + name: "Bash", + label: "Bash", + group: "Shell", + defaultMode: "ask", + description: "Run shell commands.", + }, + { + name: "WebSearch", + label: "Web search", + group: "Web", + defaultMode: "disabled", + description: "Search external documentation.", + }, +]; + +const initialValue: AISpecRuntimeValue = { + model: "claude-sonnet-4-6", + backend: "anthropic", + effort: "medium", + temperature: 0.2, + budget: { + maxTokens: 5000, + maxTurns: 3, + timeout: "2h", + cost: 1, + }, + prompt: { + system: "You are a careful refactoring assistant.", + user: "Refactor: {{target}}", + source: "options.prompt", + }, + permissions: { + mode: "acceptEdits", + presets: ["edit"], + tools: { + Read: "allow", + Edit: "allow", + Bash: "ask", + WebSearch: "deny", + }, + mcp: { + servers: [], + }, + }, + memory: { + skipUser: true, + }, + setup: { + cwd: ".", + }, +}; + +export default function RuntimeSpecDemo() { + const [value, setValue] = useState(initialValue); + + return ( + +
+
+
Static runtime spec example
+
+ This mirrors the runtime overlay shape. It does not call a Captain API. +
+
+
+ +
+
+
+ ); +} + diff --git a/docs/src/data/navigation.ts b/docs/src/data/navigation.ts new file mode 100644 index 0000000..a82152f --- /dev/null +++ b/docs/src/data/navigation.ts @@ -0,0 +1,125 @@ +export type DocItem = { + label: string; + href: string; + description?: string; + status?: "ready" | "stub"; +}; + +export type DocSection = { + label: string; + items: DocItem[]; +}; + +export const docSections: DocSection[] = [ + { + label: "Start", + items: [ + { + label: "Overview", + href: "/", + description: "Documentation map for Captain.", + status: "ready", + }, + ], + }, + { + label: "Prompts", + items: [ + { + label: "Prompts Overview", + href: "/prompts/", + description: "Prompt engine responsibilities and data flow.", + status: "ready", + }, + { + label: "Prompt Format", + href: "/prompts/format/", + description: ".prompt frontmatter, roles, and variables.", + status: "ready", + }, + { + label: "Runtime Overlay", + href: "/prompts/runtime/", + description: "Spec, model, permissions, memory, budget, and setup.", + status: "ready", + }, + { + label: "Sources and API", + href: "/prompts/sources-api/", + description: "Prompt source discovery, render API, and run stream.", + status: "ready", + }, + ], + }, + { + label: "Todos", + items: [ + { + label: "Todo Execution", + href: "/todos/", + description: "How gavel drives Captain's agent runtime to execute TODOs.", + status: "ready", + }, + { + label: "Todo Format", + href: "/todos/format/", + description: "Providers, file schema, statuses, and creation paths.", + status: "ready", + }, + { + label: "Execution and Verification", + href: "/todos/execution/", + description: "Run modes, drivers, check loop, plan review, and AI verify.", + status: "ready", + }, + ], + }, + { + label: "Next Sections", + items: [ + { + label: "Serve", + href: "/serve/", + description: "Embedded API and web UI.", + status: "stub", + }, + { + label: "AI Agents", + href: "/agents/", + description: "Agent loop, verifiers, worktrees, and judges.", + status: "stub", + }, + { + label: "Sessions", + href: "/sessions/", + description: "Claude and Codex history surfaces.", + status: "stub", + }, + { + label: "Configuration", + href: "/configuration/", + description: "Saved defaults and runtime toggles.", + status: "stub", + }, + { + label: "Fixtures", + href: "/fixtures/", + description: "Benchmark fixtures and evidence reports.", + status: "stub", + }, + ], + }, +]; + +export function isActivePath(currentPath: string, href: string) { + const normalizedCurrent = normalizePath(currentPath); + const normalizedHref = normalizePath(href); + return normalizedCurrent === normalizedHref; +} + +function normalizePath(path: string) { + if (path === "") return "/"; + if (path === "/") return "/"; + return path.endsWith("/") ? path : `${path}/`; +} + diff --git a/docs/src/env.d.ts b/docs/src/env.d.ts new file mode 100644 index 0000000..015d937 --- /dev/null +++ b/docs/src/env.d.ts @@ -0,0 +1,3 @@ +/// +/// + diff --git a/docs/src/layouts/DocsLayout.astro b/docs/src/layouts/DocsLayout.astro new file mode 100644 index 0000000..c626800 --- /dev/null +++ b/docs/src/layouts/DocsLayout.astro @@ -0,0 +1,111 @@ +--- +import "../styles/global.css"; +import DocsAppShell from "../components/DocsAppShell"; + +const frontmatter = Astro.props.frontmatter ?? {}; +const title = frontmatter.title ? `${frontmatter.title} - Captain Docs` : "Captain Docs"; +const description = frontmatter.description ?? "Captain documentation."; +const currentPath = Astro.url.pathname; +--- + + + + + + + + {title} + + + +
+
+
+ {frontmatter.section && ( +
+ {frontmatter.section} +
+ )} + +
+
+ +
+
+ + + diff --git a/docs/src/pages/agents/index.mdx b/docs/src/pages/agents/index.mdx new file mode 100644 index 0000000..902a429 --- /dev/null +++ b/docs/src/pages/agents/index.mdx @@ -0,0 +1,11 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: AI Agents +description: Placeholder for Captain AI agent documentation. +section: Next Sections +--- + +# AI agents + +This section is scaffolded for the iterative agent loop, verification commands, git worktrees, commit finalization, and judge checks. Prompts are the first authored section; agent lifecycle docs can build on the same runtime spec vocabulary. + diff --git a/docs/src/pages/configuration/index.mdx b/docs/src/pages/configuration/index.mdx new file mode 100644 index 0000000..13ec22d --- /dev/null +++ b/docs/src/pages/configuration/index.mdx @@ -0,0 +1,11 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Configuration +description: Placeholder for Captain configuration documentation. +section: Next Sections +--- + +# Configuration + +This section is scaffolded for `captain configure`, `~/.captain.yaml`, provider defaults, prompt directories, memory toggles, and safety defaults. + diff --git a/docs/src/pages/fixtures/index.mdx b/docs/src/pages/fixtures/index.mdx new file mode 100644 index 0000000..1eee98a --- /dev/null +++ b/docs/src/pages/fixtures/index.mdx @@ -0,0 +1,11 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Fixtures +description: Placeholder for Captain fixture documentation. +section: Next Sections +--- + +# Fixtures + +This section is scaffolded for AI fixture benchmarks, repeat runs, artifact capture, direct-vs-MCP comparisons, and evidence reports. + diff --git a/docs/src/pages/index.mdx b/docs/src/pages/index.mdx new file mode 100644 index 0000000..892ee81 --- /dev/null +++ b/docs/src/pages/index.mdx @@ -0,0 +1,38 @@ +--- +layout: ../layouts/DocsLayout.astro +title: Overview +description: Captain documentation map. +section: Start +--- + +# Captain documentation + +This site is the documentation home for Captain. Authored sections cover the prompts engine — how `.prompt` files are loaded, rendered, merged into `api.Spec`, and executed from the CLI and web UI — and todo execution, where gavel drives Captain's agent runtime to implement, check, and verify TODOs. + + + +## Current focus + +The prompts section is grounded in the implementation under `pkg/ai/prompt`, `pkg/cli/ai_prompt_file.go`, and `pkg/cli/prompt_entity.go`. The docs intentionally describe the existing runtime behavior instead of creating a second prompt workbench. + diff --git a/docs/src/pages/prompts/format.mdx b/docs/src/pages/prompts/format.mdx new file mode 100644 index 0000000..a91eb9b --- /dev/null +++ b/docs/src/pages/prompts/format.mdx @@ -0,0 +1,102 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Prompt Format +description: .prompt frontmatter, roles, variables, and schema behavior. +section: Prompts +--- + +import CodeExample from "../../components/CodeExample.tsx"; + +# Prompt format + +A `.prompt` file has YAML frontmatter followed by a Handlebars body. dotprompt owns the template render and the built-in `model`, `config`, `input`, and `output` keys. Captain then reads the same frontmatter a second time and decodes any spec-native keys into `ai.Request`. + +## Frontmatter dialects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key familyOwnerBehavior
modeldotprompt and Captain configSeeds the model name. Captain infers the backend when possible.
config.maxOutputTokens, temperature, reasoningdotprompt config blockApplied after spec decoding, so this block wins for those knobs.
input.schema, input.defaultdotprompt metadataUsed by the workbench to discover variables and defaults.
permissions, memory, budget, setupCaptain specDecoded into `api.Spec` with strict field validation.
+ +## Roles + +The rendered body is split with dotprompt role markers. Captain treats rendered body text as authoritative: role output replaces any `prompt.user` or `prompt.system` values supplied in frontmatter. + + + +## Spec-native frontmatter + +Spec fields use the same nested shape consumed by the runtime editor and providers. The file can express permissions, memory, budget, setup, and model details without a separate translation layer. + + + +## Structured output + +Captain does not turn a bare dotprompt `output` schema into a provider schema target. Structured output is attached by Go callers that pass a concrete output type to `Render`; providers derive the JSON schema from that Go type. + diff --git a/docs/src/pages/prompts/index.mdx b/docs/src/pages/prompts/index.mdx new file mode 100644 index 0000000..7210b4b --- /dev/null +++ b/docs/src/pages/prompts/index.mdx @@ -0,0 +1,62 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Prompts Overview +description: Captain prompt engine responsibilities and data flow. +section: Prompts +--- + +import PromptPipeline from "../../components/PromptPipeline.tsx"; +import CodeExample from "../../components/CodeExample.tsx"; + +# Prompts engine + +Captain prompts are `.prompt` templates rendered through Google dotprompt and folded into Captain's typed AI request shape. The engine lets prompt authors keep the instruction text, model choice, permissions, memory controls, budget, setup, and runtime metadata in one file while still allowing CLI and UI overrides. + + + +## Mental model + +
+
+

Source

+

A prompt can come from a positional file, `--prompt`, stdin, embedded examples, configured prompt dirs, or the implicit `.captain/prompts` directory.

+
+
+

Template

+

dotprompt renders YAML frontmatter, input schema, defaults, and role-marked body blocks such as `{{role "system"}}` and `{{role "user"}}`.

+
+
+

Spec

+

Captain decodes spec-native frontmatter directly into `ai.Request`, which aliases the public `api.Spec` runtime shape.

+
+
+

Runtime

+

CLI flags, saved defaults, and workbench edits overlay the rendered file before validation and provider dispatch.

+
+
+ +## Minimal prompt + + + +## Where to go next + +- [Prompt Format](/prompts/format/) covers frontmatter, roles, variables, and config precedence. +- [Runtime Overlay](/prompts/runtime/) covers `api.Spec`, budgets, permissions, memory, model selection, and setup. +- [Sources and API](/prompts/sources-api/) covers embedded/local sources and render/run API payloads. + diff --git a/docs/src/pages/prompts/runtime.mdx b/docs/src/pages/prompts/runtime.mdx new file mode 100644 index 0000000..634c510 --- /dev/null +++ b/docs/src/pages/prompts/runtime.mdx @@ -0,0 +1,76 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Runtime Overlay +description: Prompt runtime spec, override precedence, and model controls. +section: Prompts +--- + +import CodeExample from "../../components/CodeExample.tsx"; +import RuntimeSpecDemo from "../../components/RuntimeSpecDemo.tsx"; + +# Runtime overlay + +The prompt file provides the base request, but it is not the last word. Captain resolves the final runtime request by layering command flags, saved defaults, and workbench edits over the rendered prompt. + + + +## Precedence + +
+

1. Prompt frontmatter

+

The `.prompt` file declares the base model, budget, permissions, memory, setup, and prompt metadata.

+
+
+

2. Saved defaults

+

`captain configure` values fill gaps such as default model, backend, max tokens, budget, no-cache, and memory toggles.

+
+
+

3. CLI or UI overlay

+

Explicit runtime choices override the base file and defaults. Negative toggles such as no-MCP and no-hooks stay enabled once set by any layer.

+
+
+

4. Context normalization

+

The prompt command resolves an empty workspace directory to the invocation cwd and resolves relative directories from that same cwd before provider dispatch.

+
+ +## Runtime payload + + + +## Model and backend + +The prompt workbench keeps runtime selection catalog-backed. The UI groups by provider family first, then mode/backend, then the model list filtered to that backend. Prompt files can still name `model` and `backend` directly when the runtime should be pinned. + diff --git a/docs/src/pages/prompts/sources-api.mdx b/docs/src/pages/prompts/sources-api.mdx new file mode 100644 index 0000000..c5b49d0 --- /dev/null +++ b/docs/src/pages/prompts/sources-api.mdx @@ -0,0 +1,75 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Sources and API +description: Prompt source discovery, prompt entities, render action, and run stream. +section: Prompts +--- + +import CodeExample from "../../components/CodeExample.tsx"; +import PromptApiShapes from "../../components/PromptApiShapes.tsx"; + +# Sources and API + +The prompts UI and Clicky operation surface are backed by a prompt entity. The entity lists prompt sources, reads prompt details, writes local prompts, renders without calling a model, and runs prompts asynchronously. + + + +## Source discovery + +Captain discovers prompt sources in this order: + +1. Embedded examples from `pkg/ai/prompt/testdata`, exposed as a read-only source. +2. Directories configured under `prompts.dirs` in `~/.captain.yaml`. +3. Directories passed to `captain serve --prompt-dir`. +4. An implicit writable local source at `.captain/prompts` when no other writable source exists. + +Embedded prompts are read-only. Saving an embedded prompt from the workbench writes a local fork, stripping the embedded walk root so `testdata/commit.prompt` becomes `commit.prompt`. + +## Entity records + + + +`PromptDetail` extends the summary with raw `content`, `inputSchema`, `inputDefault`, and metadata extracted by dotprompt. + +## Render request + +Rendering accepts template variables and an optional runtime `spec` overlay. It returns the rendered user/system prompt, full typed request input, config mirror, schema metadata, and a validation error field when the request is incomplete. + + + +## Run stream + +The `run` action renders synchronously, creates a prompt run id, then streams session entries through `/api/captain/prompt/runs/{runId}/stream`. A snapshot endpoint at `/api/captain/prompt/runs/{runId}` lets the UI recover entries, completion state, summary, and error text. + diff --git a/docs/src/pages/serve/index.mdx b/docs/src/pages/serve/index.mdx new file mode 100644 index 0000000..d80fc24 --- /dev/null +++ b/docs/src/pages/serve/index.mdx @@ -0,0 +1,11 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Serve +description: Placeholder for Captain serve documentation. +section: Next Sections +--- + +# Serve + +This section is scaffolded for the embedded HTTP API and web UI. The prompts docs refer to `captain serve` where it hosts the prompt workbench, but this page will later cover API routing, Vite dev proxying, embedded assets, and chat/session integration. + diff --git a/docs/src/pages/sessions/index.mdx b/docs/src/pages/sessions/index.mdx new file mode 100644 index 0000000..68ad194 --- /dev/null +++ b/docs/src/pages/sessions/index.mdx @@ -0,0 +1,11 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Sessions +description: Placeholder for Captain session documentation. +section: Next Sections +--- + +# Sessions + +This section is scaffolded for Claude and Codex history, live prompt run entries, session browser behavior, cost analysis, and change tracking. + diff --git a/docs/src/pages/todos/execution.mdx b/docs/src/pages/todos/execution.mdx new file mode 100644 index 0000000..e42a199 --- /dev/null +++ b/docs/src/pages/todos/execution.mdx @@ -0,0 +1,98 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Execution and Verification +description: Run modes, drivers, the check loop, plan review, and AI verification. +section: Todos +--- + +import CodeExample from "../../components/CodeExample.tsx"; + +# Execution and verification + +`gavel todos run` selects TODOs, renders a mode-specific Captain dotprompt, and drives a coding agent through Captain's `agent.Runner`. The agent is explicitly told not to `git add` or `git commit` — gavel finalizes commits itself. + +## Run modes + +`--mode` selects what the agent is asked to do: + +| Mode | Behavior | Resulting status | +| --- | --- | --- | +| `run` (default) | Implement the TODO; `Verification` fixtures run in-loop | `verified` / `unverified` / `completed` / `failed` | +| `plan` | Read-only: the agent produces a reviewable plan in its native plan mode | `review` (new or updated plan), `pending` (unchanged), or `ask` | +| `verify` | Score already-committed work against acceptance criteria (same as `gavel todos verify`) | `verified` at or above threshold | + +## Drivers + +`--driver` is `-`, defaulting to `claude-cmux`: + +- **`claude-cmux` / `codex-cmux`** — drives the agent's interactive TUI inside a cmux terminal surface, via Captain's `BackendClaudeCmux` / `BackendCodexCmux`. `--dry-run` prints the exact cmux command sequence and rendered prompt without executing. +- **`claude-headless` / `codex-headless`** — `claude -p --output-format stream-json` / `codex exec --json` streamed through the same executor. + +Both mechanisms route through the same executor composing Captain's `agent.Runner` with provider, plugins, and loop settings. + +## `gavel todos run` flags + +| Flag | Default | Purpose | +| --- | --- | --- | +| `--dir` | `.todos` | TODO directory (files provider only) | +| `--status` | | Filter by status | +| `-i, --interactive` | `false` | Multi-select TODOs to run | +| `--group-by` | `repo` for cmux | `file` / `directory` / `repo` / `all` / `none`; a group shares one agent session | +| `--mode` | `run` | `run` / `plan` / `verify` | +| `--driver` | `claude-cmux` | Agent and mechanism | +| `--model` | | LLM model override | +| `--effort` | `medium` | Reasoning effort: `low` / `medium` / `high` / `xhigh` | +| `--resume` | `false` | Resume the TODO's prior agent session | +| `--max-retries` | `3` | Retry attempts | +| `--max-budget`, `--max-turns` | `0` | USD and turn caps passed to the Captain request | +| `--dirty` | `false` | Skip git stash/checkout; run on a dirty tree | +| `--dry-run` | `false` | Print commands and prompts without executing | +| `--commit` | `true` | Run `gavel commit` after each TODO | +| `--check` | `false` | Post-completion test/lint loop (below) | + +## Execution lifecycle + +1. **Discover and group** — the provider lists TODOs (excluding `completed`), filters apply, and TODOs are grouped so a group shares one agent session. +2. **Start** — status flips to `in_progress`; the session id is persisted immediately so `--resume` works even after interruption. +3. **Skip check** — outside plan mode, if `Steps to Reproduce` already pass the TODO is marked `skipped` and the agent never runs. +4. **Agent run** — the mode-specific prompt renders with the TODO body, effort directive, and a structured-output envelope schema. `Verification` fixtures are compiled into in-loop verifier plugins: a failing definition of done feeds back into the same session for another iteration, bounded by `maxIterations` (default 3). +5. **Outcome** — the agent's envelope maps to a status: definition-of-done ran and passed → `verified`; ran and failed → `unverified`; no verifier → `completed`; blocking questions → `ask`; reported failure → `failed`. +6. **Commit** — unless `--commit=false` (or the run was a plan or ended in `ask`), `gavel commit` stages and commits the agent's changes. + +## Post-completion check loop + +With `--check`, after the agent finishes gavel runs the configured test/lint suite and feeds failures back into the same session until they pass or `maxIterations` is reached. Configure globally in `.gavel.yaml` or per-TODO under the `checks` frontmatter key: + + + +## Plan review + +`--mode plan` runs the agent read-only; the plan file path is recorded on the TODO and the status becomes `review`. From there: + + + +## Checking and verifying + +Two distinct gates: + +- **`gavel todos check [files...]`** — deterministic: runs each TODO's `Verification` fixtures (`--timeout` default 2m) and exits non-zero if any fail. Useful in CI. +- **`gavel todos verify [ids...]`** — agentic: Captain's verify engine reviews the TODO's commits against its `Acceptance Criteria` checklist and scores them. `--threshold` (default 80) sets the promote-to-`verified` score; `--strict` exits non-zero when any TODO fails verification. + + diff --git a/docs/src/pages/todos/format.mdx b/docs/src/pages/todos/format.mdx new file mode 100644 index 0000000..7d80381 --- /dev/null +++ b/docs/src/pages/todos/format.mdx @@ -0,0 +1,125 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Todo Format +description: TODO providers, file schema, statuses, and creation paths. +section: Todos +--- + +import CodeExample from "../../components/CodeExample.tsx"; + +# Todo format + +A TODO is a unit of work with a priority, a status, free-form implementation instructions, and executable definition-of-done tests. TODOs are persisted by one of two providers, selected with the persistent `--provider` flag on every `gavel todos` subcommand. + +## Providers + +
+
+

grite (default)

+

TODOs are issues in the git-backed `grite` issue tracker. Gavel maps state onto namespaced labels (`status:*`, `priority:*`, `session:*`, `plan:*`, `mode:*`) plus a marked state comment for long values such as the plan path and blocking questions. `--dir` is rejected for this provider.

+
+
+

todos (files)

+

TODOs are markdown files in a `.todos/` directory at the repo root (override with `--dir`). Enable with `--provider=todos`. Each file is YAML frontmatter plus named markdown sections.

+
+
+ +## File schema + + + +### Frontmatter + +`priority` (`high` / `medium` / `low`) is required; `status` and `language` (`go` / `typescript` / `python`) are validated. The frontmatter embeds the fixture `FrontMatter`, so fixture keys like `build`, `exec`, `cwd`, and `env` are also available. + +| Field | Purpose | +| --- | --- | +| `title`, `priority`, `status` | Identity and scheduling | +| `created`, `last_run`, `attempts` | Run bookkeeping | +| `language`, `path`, `cwd`, `branch`, `working_commit` | Scope — `cwd` defaults to the git root | +| `llm` | Model, `max_tokens`, `max_cost`, `max_turns`, `session_id`, plus recorded `tokens_used` / `cost_incurred` | +| `verify` | AI verification gate: `categories` and `score_threshold` (default 80) | +| `checks` | Per-TODO override of the post-completion check loop | +| `pr` | PR linkage: `number`, `url`, `head`, `base`, `comment_id` | +| `prompt` | Prompt override for the agent run | +| `plan_path`, `plan_status`, `run_mode` | Plan-mode state and last run mode | +| `last_run_summary`, `questions` | Agent's final summary and blocking questions when status is `ask` | + +### Body sections + +- **`## Steps to Reproduce`** — executable fixture commands. If they already pass before the run, the TODO is marked `skipped` without invoking the agent. +- **`## Implementation`** — free-form instructions rendered into the agent prompt. +- **`## Verification`** — executable fixture commands that are the TODO's definition of done. They run as in-loop verifiers during execution; a failure drives another agent iteration in the same session. +- **`## Custom Validations`** — additional validation tests. +- **`## Acceptance Criteria`** — a `- [ ]` checklist scored by `gavel todos verify`. + +## Statuses + +| Status | Meaning | +| --- | --- | +| `draft` | Not ready to run | +| `pending` | Ready, not started | +| `in_progress` | Agent running | +| `review` | A plan awaits human approval (plan mode) | +| `ask` | Agent blocked on questions a human must answer | +| `verified` | Implemented and definition-of-done fixtures passed | +| `unverified` | Implemented but the definition of done was still failing when the iteration budget ran out | +| `completed` | Finished successfully with no definition-of-done verifier | +| `failed` | Execution failed | +| `skipped` | Reproduction steps already passed | + +## Where TODOs come from + +Most TODOs are generated from failures by other gavel commands: + +/ +gavel pr fix # sync + choose + execute in one step +`} /> + +PR-sourced TODOs carry the PR metadata in frontmatter and a `build` step that fetches and checks out the PR head; a re-failure appends an `## Attempt N` section, and a later passing job flips the TODO to `completed` automatically. + +TODOs can also be authored directly: + + + +`gavel todos create` drafts acceptance criteria with AI by default (`--criteria=false` to skip). diff --git a/docs/src/pages/todos/index.mdx b/docs/src/pages/todos/index.mdx new file mode 100644 index 0000000..3fdaa90 --- /dev/null +++ b/docs/src/pages/todos/index.mdx @@ -0,0 +1,69 @@ +--- +layout: ../../layouts/DocsLayout.astro +title: Todo Execution +description: How gavel drives Captain's agent runtime to execute TODOs. +section: Todos +--- + +import CodeExample from "../../components/CodeExample.tsx"; + +# Todo execution + +Gavel's `todos` subsystem is the task-execution side of its failure-to-fix loop. Other gavel commands *create* TODOs from failing tests, lint violations, CI jobs, and PR review comments; `gavel todos` inspects, plans, executes, verifies, and commits them. The actual implementation work is done by a Claude or Codex coding agent driven **in-process through Captain's AI runtime** — gavel imports `github.com/flanksource/captain/pkg/ai` and composes an `agent.Runner`; it never shells out to a `claude` or `captain` binary in the run path. + +## How Captain and gavel relate + +The dependency is one-directional: gavel embeds Captain, Captain has no awareness of gavel. + +
+
+

Gavel owns the workflow

+

TODO files, providers, discovery, grouping, statuses, prompts, retry loops, and commit finalization all live in gavel's `todos/` package and `gavel todos` CLI.

+
+
+

Captain owns the agent runtime

+

Gavel builds Captain `ai.Request`s, selects Captain backends (`BackendClaudeCmux`, `BackendClaudeAgent`, `BackendCodexCLI`, …), and streams events from Captain's `agent.Runner` — the same runtime documented under AI Agents.

+
+
+

Prompts are Captain prompts

+

The run and plan instructions are dotprompt files (`todos/prompt/todos-run.prompt`, `todos-plan.prompt`) rendered through the same engine described in Prompts.

+
+
+

Verification reuses fixtures

+

A TODO's `Steps to Reproduce` and `Verification` sections are executable fixture tests, compiled into in-loop verifier plugins so a failing definition-of-done drives another agent iteration.

+
+
+ +## Lifecycle at a glance + +1. **Create** — `gavel test|lint|verify|pr status --sync-todos` writes TODOs from failures, or author one with `gavel todos create`. +2. **Select** — `gavel todos run` discovers pending TODOs (filter with `--status`, pick interactively with `-i`, batch with `--group-by`). +3. **Plan (optional)** — `--mode plan` runs the agent read-only and parks the TODO in `review` until a human approves, rejects, or revises the plan. +4. **Execute** — the agent implements the change; `Verification` fixtures run in-loop until they pass or the iteration budget runs out. +5. **Commit** — gavel (not the agent) stages and commits via `gavel commit` after each TODO, unless `--commit=false`. +6. **Verify** — `gavel todos verify` scores the committed work against the TODO's acceptance criteria with an agentic review pass and promotes it to `verified` at or above the threshold. + +## Quick start + + + +## Where to go next + +- [Todo Format](/todos/format/) covers providers (grite vs `.todos/` files), frontmatter, body sections, statuses, and the `--sync-todos` creation paths. +- [Execution and Verification](/todos/execution/) covers run modes, drivers, flags, the check loop, plan review, and AI verification. diff --git a/docs/src/styles/global.css b/docs/src/styles/global.css new file mode 100644 index 0000000..308fd7e --- /dev/null +++ b/docs/src/styles/global.css @@ -0,0 +1,198 @@ +@import "tailwindcss"; +@import "@flanksource/clicky-ui/styles.css"; + +@source "../**/*.{astro,mdx,ts,tsx}"; + +:root { + color-scheme: light; +} + +html { + scroll-behavior: smooth; +} + +body { + margin: 0; + min-height: 100vh; + background: hsl(var(--background)); + color: hsl(var(--foreground)); + font-family: + Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", + sans-serif; +} + +code, +pre, +kbd { + font-family: + "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace; +} + +.docs-prose { + color: hsl(var(--foreground)); +} + +.docs-page { + width: 100%; +} + +.docs-prose h1 { + margin: 0; + max-width: 48rem; + font-size: clamp(2rem, 4vw, 3.25rem); + line-height: 1.05; + font-weight: 720; + letter-spacing: 0; +} + +.docs-prose h2 { + margin-top: 3rem; + margin-bottom: 1rem; + scroll-margin-top: 6rem; + font-size: 1.55rem; + line-height: 1.2; + font-weight: 680; + letter-spacing: 0; +} + +.docs-prose h3 { + margin-top: 2rem; + margin-bottom: 0.75rem; + scroll-margin-top: 6rem; + font-size: 1.1rem; + line-height: 1.3; + font-weight: 650; +} + +.docs-prose p { + max-width: 48rem; + color: hsl(var(--muted-foreground)); + line-height: 1.7; +} + +.docs-prose ul, +.docs-prose ol { + max-width: 50rem; + padding-left: 1.25rem; + color: hsl(var(--muted-foreground)); + line-height: 1.7; +} + +.docs-prose li + li { + margin-top: 0.4rem; +} + +.docs-prose a { + color: hsl(var(--primary)); + text-decoration: none; +} + +.docs-prose a:hover { + text-decoration: underline; +} + +.docs-prose :not(pre) > code { + border-radius: 0.375rem; + border: 1px solid hsl(var(--border)); + background: hsl(var(--muted) / 0.5); + padding: 0.1rem 0.35rem; + color: hsl(var(--foreground)); + font-size: 0.88em; +} + +.docs-card-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); + gap: 1rem; +} + +.docs-card { + border: 1px solid hsl(var(--border)); + border-radius: 0.5rem; + background: hsl(var(--card)); + padding: 1rem; +} + +.docs-card h2, +.docs-card h3 { + margin-top: 0; +} + +.docs-muted { + color: hsl(var(--muted-foreground)); +} + +.docs-step { + border-left: 2px solid hsl(var(--border)); + padding-left: 1rem; +} + +.docs-step + .docs-step { + margin-top: 1rem; +} + +.docs-table { + width: 100%; + border-collapse: collapse; + overflow: hidden; + border: 1px solid hsl(var(--border)); + border-radius: 0.5rem; + font-size: 0.92rem; +} + +.docs-table th, +.docs-table td { + border-bottom: 1px solid hsl(var(--border)); + padding: 0.75rem; + text-align: left; + vertical-align: top; +} + +.docs-table th { + background: hsl(var(--muted) / 0.5); + color: hsl(var(--foreground)); + font-weight: 650; +} + +.docs-table tr:last-child td { + border-bottom: 0; +} + +.docs-toc-list { + display: grid; + gap: 0.125rem; + margin: 0; + max-height: calc(100vh - 8rem); + overflow: auto; + padding: 0; + list-style: none; +} + +.docs-toc-list li { + min-width: 0; +} + +.docs-toc-list li[data-depth="3"] { + padding-left: 0.875rem; +} + +.docs-toc-list a { + display: block; + border-left: 2px solid transparent; + padding: 0.35rem 0 0.35rem 0.75rem; + color: hsl(var(--muted-foreground)); + font-size: 0.8125rem; + line-height: 1.35; + text-decoration: none; +} + +.docs-toc-list a:hover { + border-left-color: hsl(var(--border)); + color: hsl(var(--foreground)); +} + +.docs-toc-list a.is-active { + border-left-color: hsl(var(--primary)); + color: hsl(var(--foreground)); + font-weight: 600; +} diff --git a/docs/tsconfig.json b/docs/tsconfig.json new file mode 100644 index 0000000..aac5912 --- /dev/null +++ b/docs/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "astro/tsconfigs/strict", + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "react", + "types": ["astro/client"] + }, + "include": [".astro/types.d.ts", "**/*"] +} + diff --git a/go.mod b/go.mod index 466c551..dcb52ee 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,8 @@ require ( github.com/aws/aws-sdk-go-v2/service/sts v1.42.0 github.com/charmbracelet/huh v1.0.0 github.com/firebase/genkit/go v1.8.0 - github.com/flanksource/clicky v1.21.33 - github.com/flanksource/clicky/aichat v1.21.34-0.20260630075958-cd55f2f4fce3 + github.com/flanksource/clicky v1.21.37-0.20260707073215-39f9301d5c01 + github.com/flanksource/clicky/aichat v1.21.37-0.20260707073215-39f9301d5c01 github.com/flanksource/commons v1.53.1 github.com/flanksource/sandbox-runtime v1.0.2 github.com/google/dotprompt/go v0.0.0-20260502013637-5cd4a8405ca3 @@ -20,39 +20,84 @@ require ( github.com/onsi/ginkgo/v2 v2.28.0 github.com/onsi/gomega v1.39.1 github.com/samber/lo v1.53.0 + github.com/segmentio/encoding v0.5.4 github.com/sergi/go-diff v1.4.0 github.com/spf13/cobra v1.10.2 github.com/stretchr/testify v1.11.1 github.com/timberio/go-datemath v0.1.0 github.com/yuin/goldmark v1.7.16 golang.org/x/oauth2 v0.36.0 - golang.org/x/term v0.41.0 + golang.org/x/term v0.44.0 gopkg.in/yaml.v3 v3.0.1 + k8s.io/api v0.36.1 + k8s.io/apimachinery v0.36.1 k8s.io/client-go v0.36.1 mvdan.cc/sh/v3 v3.13.0 + sigs.k8s.io/yaml v1.6.0 +) + +require github.com/flanksource/commons-db v0.1.14 + +require ( + cloud.google.com/go/cloudsqlconn v1.22.1 // indirect + github.com/exaring/otelpgx v0.9.3 // indirect + github.com/fergusstrange/embedded-postgres v1.34.0 // indirect + github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect + go.opencensus.io v0.24.0 // indirect + gorm.io/driver/postgres v1.6.0 // indirect ) require ( cel.dev/expr v0.25.1 // indirect cloud.google.com/go v0.123.0 // indirect - cloud.google.com/go/auth v0.18.2 // indirect + cloud.google.com/go/auth v0.20.0 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect cloud.google.com/go/compute/metadata v0.9.0 // indirect + cloud.google.com/go/iam v1.5.3 // indirect + cloud.google.com/go/kms v1.26.0 // indirect + cloud.google.com/go/longrunning v0.8.0 // indirect + cloud.google.com/go/monitoring v1.24.3 // indirect + cloud.google.com/go/storage v1.59.2 // indirect + dario.cat/mergo v1.0.2 // indirect + filippo.io/edwards25519 v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.12.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 // indirect + github.com/ClickHouse/ch-go v0.71.0 // indirect + github.com/ClickHouse/clickhouse-go/v2 v2.46.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.54.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.54.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect + github.com/Masterminds/squirrel v1.5.4 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/ProtonMail/go-crypto v1.1.6 // indirect + github.com/TomOnTime/utfutil v1.0.0 // indirect github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b // indirect github.com/alecthomas/chroma/v2 v2.23.1 // indirect + github.com/andybalholm/brotli v1.2.0 // indirect github.com/antchfx/xmlquery v1.5.1 // indirect github.com/antchfx/xpath v1.3.6 // indirect github.com/anthropics/anthropic-sdk-go v1.26.0 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 // indirect github.com/atotto/clipboard v0.1.4 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.22 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.22 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.22 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.23 // indirect + github.com/aws/aws-sdk-go-v2/service/eks v1.74.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.8 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.22 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.41.2 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3 // indirect github.com/aws/aws-sdk-go-v2/service/signin v1.0.10 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.30.16 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.20 // indirect @@ -60,8 +105,10 @@ require ( github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/buger/jsonparser v1.1.1 // indirect + github.com/bmatcuk/doublestar/v4 v4.9.1 // indirect + github.com/buger/jsonparser v1.1.2 // indirect github.com/catppuccin/go v0.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cert-manager/cert-manager v1.20.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 // indirect @@ -75,52 +122,103 @@ require ( github.com/charmbracelet/x/term v0.2.2 // indirect github.com/clipperhouse/displaywidth v0.11.0 // indirect github.com/clipperhouse/uax29/v2 v2.7.0 // indirect + github.com/cloudflare/circl v1.6.3 // indirect + github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect github.com/coder/websocket v1.8.14 // indirect + github.com/cyphar/filepath-securejoin v0.6.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set/v2 v2.8.0 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/dlclark/regexp2 v1.11.5 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/eko/gocache/lib/v4 v4.2.2 // indirect + github.com/eko/gocache/store/go_cache/v4 v4.2.2 // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect github.com/emirpasic/gods/v2 v2.0.0-alpha // indirect + github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/fatih/color v1.18.0 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/felixge/httpsnoop v1.1.0 // indirect github.com/flanksource/gomplate/v3 v3.24.82 // indirect github.com/flanksource/is-healthy v1.0.88 // indirect github.com/flanksource/kubectl-neat v1.0.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect + github.com/geoffgarside/ber v1.1.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-faster/city v1.0.1 // indirect + github.com/go-faster/errors v0.7.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.9.0 // indirect + github.com/go-git/go-git/v5 v5.19.1 // indirect github.com/go-jose/go-jose/v3 v3.0.5 // indirect + github.com/go-jose/go-jose/v4 v4.1.4 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.22.4 // indirect + github.com/go-openapi/jsonreference v0.21.4 // indirect + github.com/go-openapi/swag v0.23.1 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect + github.com/go-sql-driver/mysql v1.10.0 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.6 // indirect github.com/goccy/go-yaml v1.19.2 // indirect + github.com/golang-jwt/jwt/v5 v5.3.1 // indirect + github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect + github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect + github.com/golang/mock v1.6.0 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/cel-go v0.27.0 // indirect + github.com/google/gnostic-models v0.7.1 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect github.com/google/s2a-go v0.1.9 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect - github.com/googleapis/gax-go/v2 v2.18.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.17 // indirect + github.com/googleapis/gax-go/v2 v2.22.0 // indirect github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/gosimple/slug v1.15.0 // indirect github.com/gosimple/unidecode v1.0.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect github.com/hairyhenderson/toml v0.4.2-0.20210923231440-40456b8e66cf // indirect github.com/hairyhenderson/yaml v0.0.0-20220618171115-2d35fca545ce // indirect + github.com/henvic/httpretty v0.1.4 // indirect + github.com/hirochachacha/go-smb2 v1.1.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/itchyny/gojq v0.12.19 // indirect github.com/itchyny/timefmt-go v0.1.8 // indirect + github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.10.0 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jeremywohl/flatten v1.0.1 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect + github.com/joho/godotenv v1.5.1 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/klauspost/compress v1.18.3 // indirect + github.com/klauspost/cpuid/v2 v2.3.0 // indirect + github.com/kr/fs v0.1.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect + github.com/labstack/echo/v4 v4.14.0 // indirect + github.com/labstack/gommon v0.4.2 // indirect + github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect + github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect + github.com/liamylian/jsontime/v2 v2.0.0 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/lmittmann/tint v1.1.3 // indirect github.com/lrita/cmap v0.0.0-20231108122212-cb084a67f554 // indirect github.com/lucasb-eyer/go-colorful v1.3.0 // indirect @@ -131,9 +229,11 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.21 // indirect - github.com/mbleigh/raymond v0.0.0-20250414171441-6b3a58ab9e0a // indirect + github.com/mbleigh/raymond v0.0.0-20250414171441-6b3a58ab9e0a + github.com/microsoft/go-mssqldb v1.10.0 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/moby/spdystream v0.5.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect @@ -148,8 +248,16 @@ require ( github.com/olekukonko/tablewriter v1.1.4 // indirect github.com/openai/openai-go v1.12.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/orcaman/concurrent-map/v2 v2.0.1 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect + github.com/paulmach/orb v0.12.0 // indirect + github.com/peterbourgon/diskv v2.0.1+incompatible // indirect + github.com/pierrec/lz4/v4 v4.1.25 // indirect + github.com/pjbgf/sha1cd v0.6.0 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/sftp v1.13.6 // indirect + github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/playwright-community/playwright-go v0.5700.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect @@ -164,11 +272,15 @@ require ( github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/samber/oops v1.21.0 // indirect + github.com/segmentio/asm v1.2.1 // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect github.com/shoenig/go-m1cpu v0.1.7 // indirect + github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.4 // indirect + github.com/skeema/knownhosts v1.3.1 // indirect github.com/spf13/cast v1.7.1 // indirect github.com/spf13/pflag v1.0.10 // indirect + github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect @@ -178,11 +290,18 @@ require ( github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/ugorji/go/codec v1.3.1 // indirect + github.com/ulikunitz/xz v0.5.15 // indirect + github.com/vadimi/go-http-ntlm v1.0.3 // indirect + github.com/vadimi/go-http-ntlm/v2 v2.5.0 // indirect + github.com/vadimi/go-ntlm v1.2.1 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/xuri/efp v0.0.1 // indirect github.com/xuri/excelize/v2 v2.10.1 // indirect @@ -191,46 +310,52 @@ require ( github.com/yuin/gopher-lua v1.1.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect - go.opentelemetry.io/otel v1.42.0 // indirect - go.opentelemetry.io/otel/metric v1.42.0 // indirect - go.opentelemetry.io/otel/sdk v1.42.0 // indirect - go.opentelemetry.io/otel/trace v1.42.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.42.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 // indirect + go.opentelemetry.io/otel v1.44.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0 // indirect + go.opentelemetry.io/otel/metric v1.44.0 // indirect + go.opentelemetry.io/otel/sdk v1.44.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.44.0 // indirect + go.opentelemetry.io/otel/trace v1.44.0 // indirect + go.opentelemetry.io/proto/otlp v1.10.0 // indirect go.yaml.in/yaml/v2 v2.4.4 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.49.0 // indirect - golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 // indirect - golang.org/x/mod v0.34.0 // indirect - golang.org/x/net v0.52.0 // indirect - golang.org/x/sync v0.20.0 // indirect - golang.org/x/sys v0.42.0 // indirect - golang.org/x/text v0.35.0 // indirect - golang.org/x/time v0.14.0 // indirect - golang.org/x/tools v0.43.0 // indirect + gocloud.dev v0.43.0 // indirect + golang.org/x/crypto v0.53.0 // indirect + golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect + golang.org/x/mod v0.36.0 // indirect + golang.org/x/net v0.56.0 // indirect + golang.org/x/sync v0.21.0 // indirect + golang.org/x/sys v0.46.0 // indirect + golang.org/x/text v0.38.0 // indirect + golang.org/x/time v0.15.0 // indirect + golang.org/x/tools v0.45.0 // indirect + golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect + google.golang.org/api v0.286.0 // indirect google.golang.org/genai v1.51.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 // indirect - google.golang.org/grpc v1.79.3 // indirect + google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260622175928-b703f567277d // indirect + google.golang.org/grpc v1.81.1 // indirect google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/sourcemap.v1 v1.0.5 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/api v0.36.1 // indirect + gorm.io/gorm v1.31.0 k8s.io/apiextensions-apiserver v0.36.1 // indirect - k8s.io/apimachinery v0.36.1 // indirect k8s.io/klog/v2 v2.140.0 // indirect k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect + k8s.io/streaming v0.36.1 // indirect k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect layeh.com/gopher-json v0.0.0-20201124131017-552bb3c4c3bf // indirect sigs.k8s.io/gateway-api v1.5.1 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect - sigs.k8s.io/yaml v1.6.0 // indirect ) - -// replace github.com/flanksource/sandbox-runtime => ../sandbox-runtime - -// Local dev builds against ../clicky via go.work; tagged builds use the -// required clicky version above. -// replace github.com/flanksource/clicky => ../clicky diff --git a/go.sum b/go.sum index 436e72c..ef1e38e 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,82 @@ cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE= cloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU= -cloud.google.com/go/auth v0.18.2 h1:+Nbt5Ev0xEqxlNjd6c+yYUeosQ5TtEUaNcN/3FozlaM= -cloud.google.com/go/auth v0.18.2/go.mod h1:xD+oY7gcahcu7G2SG2DsBerfFxgPAJz17zz2joOFF3M= +cloud.google.com/go/auth v0.20.0 h1:kXTssoVb4azsVDoUiF8KvxAqrsQcQtB53DcSgta74CA= +cloud.google.com/go/auth v0.20.0/go.mod h1:942/yi/itH1SsmpyrbnTMDgGfdy2BUqIKyd0cyYLc5Q= +cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= +cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/cloudsqlconn v1.22.1 h1:c4HkWMSV4pDL8kJid+nIuF+6iE07pR5Mn/sRVY17wf4= +cloud.google.com/go/cloudsqlconn v1.22.1/go.mod h1:p7l+u0ThOzSvC5a4fkywi1hEyD8S709X1zEqux9tsq0= cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= +cloud.google.com/go/iam v1.5.3 h1:+vMINPiDF2ognBJ97ABAYYwRgsaqxPbQDlMnbHMjolc= +cloud.google.com/go/iam v1.5.3/go.mod h1:MR3v9oLkZCTlaqljW6Eb2d3HGDGK5/bDv93jhfISFvU= +cloud.google.com/go/kms v1.26.0 h1:cK9mN2cf+9V63D3H1f6koxTatWy39aTI/hCjz1I+adU= +cloud.google.com/go/kms v1.26.0/go.mod h1:pHKOdFJm63hxBsiPkYtowZPltu9dW0MWvBa6IA4HM58= +cloud.google.com/go/logging v1.13.2 h1:qqlHCBvieJT9Cdq4QqYx1KPadCQ2noD4FK02eNqHAjA= +cloud.google.com/go/logging v1.13.2/go.mod h1:zaybliM3yun1J8mU2dVQ1/qDzjbOqEijZCn6hSBtKak= +cloud.google.com/go/longrunning v0.8.0 h1:LiKK77J3bx5gDLi4SMViHixjD2ohlkwBi+mKA7EhfW8= +cloud.google.com/go/longrunning v0.8.0/go.mod h1:UmErU2Onzi+fKDg2gR7dusz11Pe26aknR4kHmJJqIfk= +cloud.google.com/go/monitoring v1.24.3 h1:dde+gMNc0UhPZD1Azu6at2e79bfdztVDS5lvhOdsgaE= +cloud.google.com/go/monitoring v1.24.3/go.mod h1:nYP6W0tm3N9H/bOw8am7t62YTzZY+zUeQ+Bi6+2eonI= +cloud.google.com/go/storage v1.59.2 h1:gmOAuG1opU8YvycMNpP+DvHfT9BfzzK5Cy+arP+Nocw= +cloud.google.com/go/storage v1.59.2/go.mod h1:cMWbtM+anpC74gn6qjLh+exqYcfmB9Hqe5z6adx+CLI= +cloud.google.com/go/trace v1.11.7 h1:kDNDX8JkaAG3R2nq1lIdkb7FCSi1rCmsEtKVsty7p+U= +cloud.google.com/go/trace v1.11.7/go.mod h1:TNn9d5V3fQVf6s4SCveVMIBS2LJUqo73GACmq/Tky0s= +dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= +dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= +filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= +filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.1 h1:jHb/wfvRikGdxMXYV3QG/SzUOPYN9KEUUuC0Yd0/vC0= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.1/go.mod h1:pzBXCYn05zvYIrwLgtK8Ap8QcjRg+0i76tMQdWN6wOk= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 h1:Hk5QBxZQC1jb2Fwj6mpzme37xbCDdNTxU7O9eb5+LB4= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1/go.mod h1:IYus9qsFobWIc2YVwe/WPjcnyCkPKtnHAqUYeebc8z0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.12.0 h1:fhqpLE3UEXi9lPaBRpQ6XuRW0nU7hgg4zlmZZa+a9q4= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.12.0/go.mod h1:7dCRMLwisfRH3dBupKeNCioWYUZ4SS09Z14H+7i8ZoY= +github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0 h1:m/sWOGCREuSBqg2htVQTBY8nOZpyajYztF0vUvSZTuM= +github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0/go.mod h1:Pu5Zksi2KrU7LPbZbNINx6fuVrUp/ffvpxdDj+i8LeE= +github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 h1:FbH3BbSb4bvGluTesZZ+ttN/MDsnMmQP36OSnDuSXqw= +github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1/go.mod h1:9V2j0jn9jDEkCkv8w/bKTNppX/d0FVA1ud77xCIP4KA= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.4.0 h1:E4MgwLBGeVB5f2MdcIVD3ELVAWpr+WD6MUe1i+tM/PA= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.4.0/go.mod h1:Y2b/1clN4zsAoUd/pgNAQHjLDnTis/6ROkUfyob6psM= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.2.0 h1:nCYfgcSyHZXJI8J0IWE5MsCGlb2xp9fJiXyxWgmOFg4= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.2.0/go.mod h1:ucUjca2JtSZboY8IoUqyQyuuXvwbMBVwFOm0vdQPNhA= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/ClickHouse/ch-go v0.71.0 h1:bUdZ/EZj/LcVHsMqaRUP2holqygrPWQKeMjc6nZoyRM= +github.com/ClickHouse/ch-go v0.71.0/go.mod h1:NwbNc+7jaqfY58dmdDUbG4Jl22vThgx1cYjBw0vtgXw= +github.com/ClickHouse/clickhouse-go/v2 v2.46.0 h1:s3eRy+hYmu5uzotB6ZhDofgHu8kDgGN/fpmjxRkqSpk= +github.com/ClickHouse/clickhouse-go/v2 v2.46.0/go.mod h1:giJfUVlMkcfUEPVfRpt51zZaGEx9i17gCos8gBl392c= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 h1:DHa2U07rk8syqvCge0QIGMCE1WxGj9njT44GH7zNJLQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.54.0 h1:lhhYARPUu3LmHysQ/igznQphfzynnqI3D75oUyw1HXk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.54.0/go.mod h1:l9rva3ApbBpEJxSNYnwT9N4CDLrWgtq3u8736C5hyJw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.54.0 h1:xfK3bbi6F2RDtaZFtUdKO3osOBIhNb+xTs8lFW6yx9o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.54.0/go.mod h1:vB2GH9GAYYJTO3mEn8oYwzEdhlayZIdQz6zdzgUIRvA= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.54.0 h1:s0WlVbf9qpvkh1c/uDAPElam0WrL7fHRIidgZJ7UqZI= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.54.0/go.mod h1:Mf6O40IAyB9zR/1J8nGDDPirZQQPbYJni8Yisy7NTMc= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM= +github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw= +github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/TomOnTime/utfutil v1.0.0 h1:/0Ivgo2OjXJxo8i7zgvs7ewSFZMLwCRGm3P5Umowb90= +github.com/TomOnTime/utfutil v1.0.0/go.mod h1:l9lZmOniizVSuIliSkEf87qivMRlSNzbdBFKjuLRg1c= github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw= @@ -23,6 +87,10 @@ github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ= +github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antchfx/xmlquery v1.5.1 h1:T9I4Ns1EXiWHy0IqKupGhnfTQtJwlGrpXtauYOoNv78= github.com/antchfx/xmlquery v1.5.1/go.mod h1:bVqnl7TaDXSReKINrhZz+2E/PbCu2tUahb+wZ7WZNT8= github.com/antchfx/xpath v1.3.6 h1:s0y+ElRRtTQdfHP609qFu0+c6bglDv20pqOViQjjdPI= @@ -37,6 +105,8 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go-v2 v1.41.6 h1:1AX0AthnBQzMx1vbmir3Y4WsnJgiydmnJjiLu+LvXOg= github.com/aws/aws-sdk-go-v2 v1.41.6/go.mod h1:dy0UzBIfwSeot4grGvY1AqFWN5zgziMmWGzysDnHFcQ= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 h1:eBMB84YGghSocM7PsjmmPffTa+1FBUeNvGvFou6V/4o= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8/go.mod h1:lyw7GFp3qENLh7kwzf7iMzAxDn+NzjXEAGjKS2UOKqI= github.com/aws/aws-sdk-go-v2/config v1.32.16 h1:Q0iQ7quUgJP0F/SCRTieScnaMdXr9h/2+wze1u3cNeM= github.com/aws/aws-sdk-go-v2/config v1.32.16/go.mod h1:duCCnJEFqpt2RC6no1iK6q+8HpwOAkiUua0pY507dQc= github.com/aws/aws-sdk-go-v2/credentials v1.19.15 h1:fyvgWTszojq8hEnMi8PPBTvZdTtEVmAVyo+NFLHBhH4= @@ -49,10 +119,20 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.22 h1:dY4kWZiSaXIzxnKlj1 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.22/go.mod h1:KIpEUx0JuRZLO7U6cbV204cWAEco2iC3l061IxlwLtI= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.23 h1:FPXsW9+gMuIeKmz7j6ENWcWtBGTe1kH8r9thNt5Uxx4= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.23/go.mod h1:7J8iGMdRKk6lw2C+cMIphgAnT8uTwBwNOsGkyOCm80U= +github.com/aws/aws-sdk-go-v2/service/eks v1.74.2 h1:GKqBur7gp6rnYbMZXh2+89f8g+/bu26ZKwpXfXrno80= +github.com/aws/aws-sdk-go-v2/service/eks v1.74.2/go.mod h1:f1/1x766rRjLVUk94exobjhggT1MR3vO4wxglqOvpY4= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.8 h1:HtOTYcbVcGABLOVuPYaIihj6IlkqubBwFj10K5fxRek= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.8/go.mod h1:VsK9abqQeGlzPgUr+isNWzPlK2vKe9INMLWnY65f5Xs= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 h1:JRaIgADQS/U6uXDqlPiefP32yXTda7Kqfx+LgspooZM= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13/go.mod h1:CEuVn5WqOMilYl+tbccq8+N2ieCy0gVn3OtRb0vBNNM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.22 h1:PUmZeJU6Y1Lbvt9WFuJ0ugUK2xn6hIWUBBbKuOWF30s= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.22/go.mod h1:nO6egFBoAaoXze24a2C0NjQCvdpk8OueRoYimvEB9jo= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 h1:ZlvrNcHSFFWURB8avufQq9gFsheUgjVD9536obIknfM= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21/go.mod h1:cv3TNhVrssKR0O/xxLJVRfd2oazSnZnkUeTf6ctUwfQ= +github.com/aws/aws-sdk-go-v2/service/kms v1.41.2 h1:zJeUxFP7+XP52u23vrp4zMcVhShTWbNO8dHV6xCSvFo= +github.com/aws/aws-sdk-go-v2/service/kms v1.41.2/go.mod h1:Pqd9k4TuespkireN206cK2QBsaBTL6X+VPAez5Qcijk= +github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3 h1:HwxWTbTrIHm5qY+CAEur0s/figc3qwvLWsNkF4RPToo= +github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3/go.mod h1:uoA43SdFwacedBfSgfFSjjCvYe8aYBS7EnU5GZ/YKMM= github.com/aws/aws-sdk-go-v2/service/signin v1.0.10 h1:a1Fq/KXn75wSzoJaPQTgZO0wHGqE9mjFnylnqEPTchA= github.com/aws/aws-sdk-go-v2/service/signin v1.0.10/go.mod h1:p6+MXNxW7IA6dMgHfTAzljuwSKD0NCm/4lbS4t6+7vI= github.com/aws/aws-sdk-go-v2/service/sso v1.30.16 h1:x6bKbmDhsgSZwv6q19wY/u3rLk/3FGjJWyqKcIRufpE= @@ -71,14 +151,17 @@ github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPn github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bmatcuk/doublestar/v4 v4.8.1 h1:54Bopc5c2cAvhLRAzqOGCYHYyhcDHsFF4wWIR5wKP38= -github.com/bmatcuk/doublestar/v4 v4.8.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bmatcuk/doublestar/v4 v4.9.1 h1:X8jg9rRZmJd4yRy7ZeNDRnM+T3ZfHv15JiBJ/avrEXE= +github.com/bmatcuk/doublestar/v4 v4.9.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= -github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk= +github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/catppuccin/go v0.3.0 h1:d+0/YicIq+hSTo5oPuRi5kOpqkVA5tAsU6dNhvRu+aY= github.com/catppuccin/go v0.3.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cert-manager/cert-manager v1.20.0 h1:czZamsFJ1YdKPhpv+SopJZN9t3W68vQBnFYUevSHGqY= github.com/cert-manager/cert-manager v1.20.0/go.mod h1:3oparI7R5JyJMNXntYod9p6DucIZ84st7y/9kL6cbBE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -111,16 +194,24 @@ github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8 github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo= github.com/charmbracelet/x/xpty v0.1.3 h1:eGSitii4suhzrISYH50ZfufV3v085BXQwIytcOdFSsw= github.com/charmbracelet/x/xpty v0.1.3/go.mod h1:poPYpWuLDBFCKmKLDnhBp51ATa0ooD8FhypRwEFtH3Y= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8= github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0= github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk= github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= +github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8= +github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 h1:aBangftG7EVZoUb69Os8IaYg++6uMOdKK83QtkkvJik= +github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2/go.mod h1:qwXFYgsP6T7XnJtbKlf1HP8AjxZZyzxMmc+Lq5GjlU4= github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g= github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= +github.com/cyphar/filepath-securejoin v0.6.1 h1:5CeZ1jPXEiYt3+Z6zqprSAgSWiggmpVyciv8syjIpVE= +github.com/cyphar/filepath-securejoin v0.6.1/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -135,24 +226,50 @@ github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/eko/gocache/lib/v4 v4.2.2 h1:jUQ1EPoapmnxeDfekdu8nb2D5d5nSgxSJyPZ1PsloBM= +github.com/eko/gocache/lib/v4 v4.2.2/go.mod h1:/Lpnfie38P4Qkun24jyIVRv95GzhbC90dsq6Q7AtQ2I= +github.com/eko/gocache/store/go_cache/v4 v4.2.2 h1:tAI9nl6TLoJyKG1ujF0CS0n/IgTEMl+NivxtR5R3/hw= +github.com/eko/gocache/store/go_cache/v4 v4.2.2/go.mod h1:T9zkHokzr8K9EiC7RfMbDg6HSwaV6rv3UdcNu13SGcA= +github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o= +github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE= github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/emirpasic/gods/v2 v2.0.0-alpha h1:dwFlh8pBg1VMOXWGipNMRt8v96dKAIvBehtCt6OtunU= github.com/emirpasic/gods/v2 v2.0.0-alpha/go.mod h1:W0y4M2dtBB9U5z3YlghmpuUhiaZT2h6yoeE+C1sCp6A= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.14.0 h1:hbG2kr4RuFj222B6+7T83thSPqLjwBIfQawTkC++2HA= +github.com/envoyproxy/go-control-plane v0.14.0/go.mod h1:NcS5X47pLl/hfqxU70yPwL9ZMkUlwlKxtAohpi2wBEU= +github.com/envoyproxy/go-control-plane/envoy v1.37.0 h1:u3riX6BoYRfF4Dr7dwSOroNfdSbEPe9Yyl09/B6wBrQ= +github.com/envoyproxy/go-control-plane/envoy v1.37.0/go.mod h1:DReE9MMrmecPy+YvQOAOHNYMALuowAnbjjEMkkWOi6A= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.3.3 h1:MVQghNeW+LZcmXe7SY1V36Z+WFMDjpqGAGacLe2T0ds= +github.com/envoyproxy/protoc-gen-validate v1.3.3/go.mod h1:TsndJ/ngyIdQRhMcVVGDDHINPLWB7C82oDArY51KfB0= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= +github.com/exaring/otelpgx v0.9.3 h1:4yO02tXC7ZJZ+hcqcUkfxblYNCIFGVhpUWI0iw1TzPU= +github.com/exaring/otelpgx v0.9.3/go.mod h1:R5/M5LWsPPBZc1SrRE5e0DiU48bI78C1/GPTWs6I66U= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc= +github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE= +github.com/fergusstrange/embedded-postgres v1.34.0 h1:c6RKhPKFsLVU+Tdxsx8q0UxCHsvZZ/iShAnljRBXs6s= +github.com/fergusstrange/embedded-postgres v1.34.0/go.mod h1:w0YvnCgf19o6tskInrOOACtnqfVlOvluz3hlNLY7tRk= github.com/firebase/genkit/go v1.8.0 h1:jIL9xS3ZxW9sTWN2SG9RyupPd0srjXmfB1749FPIuaY= github.com/firebase/genkit/go v1.8.0/go.mod h1:AzmlJrm+2PjSrLnBHwY0uTbRC/GsazMa0JYpBrVf18E= -github.com/flanksource/clicky v1.21.33 h1:fiZ4+sjKdtcmqGgaJiER5wM/34QSjS9pL29gQ84BKOs= -github.com/flanksource/clicky v1.21.33/go.mod h1:1vjQu7ZeWqvEy98bIlZWUni6F+fy9KtWgaHCtAJs6yE= -github.com/flanksource/clicky/aichat v1.21.34-0.20260630075958-cd55f2f4fce3 h1:mXkj1sHYNWi+9TJwo3xV8oI7soPmfWMce7AR4/7Y2NM= -github.com/flanksource/clicky/aichat v1.21.34-0.20260630075958-cd55f2f4fce3/go.mod h1:u0m4ogkrOCW9/TAc/f06D4kBgZOZaxvLQ7HCyglL9kI= +github.com/flanksource/clicky v1.21.37-0.20260707073215-39f9301d5c01 h1:IWoEd2O0TUwjKHcr9/gzEphYiTF3sOsduMG/FGyGD9E= +github.com/flanksource/clicky v1.21.37-0.20260707073215-39f9301d5c01/go.mod h1:832IbjMZgsqGYF2fwskgUZ6zrvf7qfxpFv3mfLO2DWg= +github.com/flanksource/clicky/aichat v1.21.37-0.20260707073215-39f9301d5c01 h1:3ZprIIQL7Wi1V+oKeX7cUNhwcAj0vwuxWvtGKRGp5XY= +github.com/flanksource/clicky/aichat v1.21.37-0.20260707073215-39f9301d5c01/go.mod h1:mSxTai8EkfsTngtUzeQLSMy25xV3E/D4bOaC0sF+ZGk= github.com/flanksource/commons v1.53.1 h1:WiMvY9XGG//L4ndYKTcmp0NjWXg4B7Wbn4hYWkITUmY= github.com/flanksource/commons v1.53.1/go.mod h1:ZII22jIDJ3fd/Mz7l0SzLFEv8aoSUg+xwfJAAVf8up4= +github.com/flanksource/commons-db v0.1.14 h1:XXTRrFmHEQQKlUVjUx1rq9lAE3CGhoVEQhevd6lfN3A= +github.com/flanksource/commons-db v0.1.14/go.mod h1:EGQjugWW+QYvZcBhleb9QzDs1xhNrezf9V1NKsofQ6g= github.com/flanksource/gomplate/v3 v3.24.82 h1:22HOZYeNRMX40G8OF3qRAqRoR5Lkf8Vm4x3WDqugZkE= github.com/flanksource/gomplate/v3 v3.24.82/go.mod h1:NMMZkFsjbLy/8iY8Fip5N86Y0PP6lZeq+kmPwpVVIL0= github.com/flanksource/is-healthy v1.0.88 h1:ATQuKoNdp8Qfzf41/eMFajmT0qzOmZlZNG5eLK41RFo= @@ -167,6 +284,8 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/geoffgarside/ber v1.1.0 h1:qTmFG4jJbwiSzSXoNJeHcOprVzZ8Ulde2Rrrifu5U9w= +github.com/geoffgarside/ber v1.1.0/go.mod h1:jVPKeCbj6MvQZhwLYsGwaGI52oUorHoHKNecGT85ZCc= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs= @@ -175,15 +294,32 @@ github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZ github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= github.com/gkampitakis/go-snaps v0.5.15 h1:amyJrvM1D33cPHwVrjo9jQxX8g/7E2wYdZ+01KS3zGE= github.com/gkampitakis/go-snaps v0.5.15/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= +github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= +github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= +github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= +github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= +github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg= +github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.9.0 h1:jItGXszUDRtR/AlferWPTMN4j38BQ88XnXKbilmmBPA= +github.com/go-git/go-billy/v5 v5.9.0/go.mod h1:jCnQMLj9eUgGU7+ludSTYoZL/GGmii14RxKFj7ROgHw= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.19.1 h1:nX27AnaU43/K5bKktKwgBmR9lawoYVe1Ckg0rgzzN00= +github.com/go-git/go-git/v5 v5.19.1/go.mod h1:Pb1v0c7/g8aGQJwx9Us09W85yGoyvSwuhEGMH7zjDKQ= github.com/go-jose/go-jose/v3 v3.0.5 h1:BLLJWbC4nMZOfuPVxoZIxeYsn6Nl2r1fITaJ78UQlVQ= github.com/go-jose/go-jose/v3 v3.0.5/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ= +github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= +github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= github.com/go-openapi/jsonreference v0.21.4 h1:24qaE2y9bx/q3uRK/qN+TDwbok1NhbSmGjjySRCHtC8= @@ -192,8 +328,12 @@ github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZ github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= +github.com/go-sql-driver/mysql v1.10.0 h1:Q+1LV8DkHJvSYAdR83XzuhDaTykuDx0l6fkXxoWCWfw= +github.com/go-sql-driver/mysql v1.10.0/go.mod h1:M+cqaI7+xxXGG9swrdeUIoPG3Y3KCkF0pZej+SK+nWk= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= @@ -206,44 +346,88 @@ github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU= github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= +github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= +github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cel-go v0.27.0 h1:e7ih85+4qVrBuqQWTW4FKSqZYokVuc3HnhH5keboFTo= github.com/google/cel-go v0.27.0/go.mod h1:tTJ11FWqnhw5KKpnWpvW9CJC3Y9GK4EIS0WXnBbebzw= github.com/google/dotprompt/go v0.0.0-20260502013637-5cd4a8405ca3 h1:PtLUK1Z0nr/4Bv7yjYm4qzUe/IsKGIOXc3SJWB1clNk= github.com/google/dotprompt/go v0.0.0-20260502013637-5cd4a8405ca3/go.mod h1:mjF7S9XoK7vfdpnZa49V2nQEN0UJxnejJzveZ1hnYGA= github.com/google/gnostic-models v0.7.1 h1:SisTfuFKJSKM5CPZkffwi6coztzzeYUhc3v4yxLWH8c= github.com/google/gnostic-models v0.7.1/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= +github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.14 h1:yh8ncqsbUY4shRD5dA6RlzjJaT4hi3kII+zYw8wmLb8= -github.com/googleapis/enterprise-certificate-proxy v0.3.14/go.mod h1:vqVt9yG9480NtzREnTlmGSBmFrA+bzb0yl0TxoBQXOg= -github.com/googleapis/gax-go/v2 v2.18.0 h1:jxP5Uuo3bxm3M6gGtV94P4lliVetoCB4Wk2x8QA86LI= -github.com/googleapis/gax-go/v2 v2.18.0/go.mod h1:uSzZN4a356eRG985CzJ3WfbFSpqkLTjsnhWGJR6EwrE= +github.com/google/wire v0.6.0 h1:HBkoIh4BdSxoyo9PveV8giw7ZsaBOvzWKfcg/6MrVwI= +github.com/google/wire v0.6.0/go.mod h1:F4QhpQ9EDIdJ1Mbop/NZBRB+5yrR6qg3BnctaoUk6NA= +github.com/googleapis/enterprise-certificate-proxy v0.3.17 h1:73NfMHdiqo9JFU9+7a5ExpVa10/R29pXfZIaW559nrg= +github.com/googleapis/enterprise-certificate-proxy v0.3.17/go.mod h1:rSEsBUemEBZEexP2y6jPp16LUmUbjmSbcPMQizR0o4k= +github.com/googleapis/gax-go/v2 v2.22.0 h1:PjIWBpgGIVKGoCXuiCoP64altEJCj3/Ei+kSU5vlZD4= +github.com/googleapis/gax-go/v2 v2.22.0/go.mod h1:irWBbALSr0Sk3qlqb9SyJ1h68WjgeFuiOzI4Rqw5+aY= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= github.com/gosimple/slug v1.15.0 h1:wRZHsRrRcs6b0XnxMUBM6WK1U1Vg5B0R7VkIf1Xzobo= github.com/gosimple/slug v1.15.0/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ= github.com/gosimple/unidecode v1.0.1 h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o= github.com/gosimple/unidecode v1.0.1/go.mod h1:CP0Cr1Y1kogOtx0bJblKzsVWrqYaqfNOnHzpgWw4Awc= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0/go.mod h1:Hyl3n6Twe1hvtd9XUXDec4pTvgMSEixRuQKPTMH2bNs= github.com/hairyhenderson/toml v0.4.2-0.20210923231440-40456b8e66cf h1:I1sbT4ZbIt9i+hB1zfKw2mE8C12TuGxPiW7YmtLbPa4= github.com/hairyhenderson/toml v0.4.2-0.20210923231440-40456b8e66cf/go.mod h1:jDHmWDKZY6MIIYltYYfW4Rs7hQ50oS4qf/6spSiZAxY= github.com/hairyhenderson/yaml v0.0.0-20220618171115-2d35fca545ce h1:cVkYhlWAxwuS2/Yp6qPtcl0fGpcWxuZNonywHZ6/I+s= github.com/hairyhenderson/yaml v0.0.0-20220618171115-2d35fca545ce/go.mod h1:7TyiGlHI+IO+iJbqRZ82QbFtvgj/AIcFm5qc9DLn7Kc= +github.com/henvic/httpretty v0.1.4 h1:Jo7uwIRWVFxkqOnErcoYfH90o3ddQyVrSANeS4cxYmU= +github.com/henvic/httpretty v0.1.4/go.mod h1:Dn60sQTZfbt2dYsdUSNsCljyF4AfdqnuJFDLJA1I4AM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/hirochachacha/go-smb2 v1.1.0 h1:b6hs9qKIql9eVXAiN0M2wSFY5xnhbHAQoCwRKbaRTZI= +github.com/hirochachacha/go-smb2 v1.1.0/go.mod h1:8F1A4d5EZzrGu5R7PU163UcMRDJQl4FtcxjBfsY8TZE= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/invopop/jsonschema v0.13.0 h1:KvpoAJWEjR3uD9Kbm2HWJmqsEaHt8lBUpd0qHcIi21E= @@ -252,19 +436,52 @@ github.com/itchyny/gojq v0.12.19 h1:ttXA0XCLEMoaLOz5lSeFOZ6u6Q3QxmG46vfgI4O0DEs= github.com/itchyny/gojq v0.12.19/go.mod h1:5galtVPDywX8SPSOrqjGxkBeDhSxEW1gSxoy7tn1iZY= github.com/itchyny/timefmt-go v0.1.8 h1:1YEo1JvfXeAHKdjelbYr/uCuhkybaHCeTkH8Bo791OI= github.com/itchyny/timefmt-go v0.1.8/go.mod h1:5E46Q+zj7vbTgWY8o5YkMeYb4I6GeWLFnetPy5oBrAI= +github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 h1:Dj0L5fhJ9F82ZJyVOmBx6msDp/kfd1t9GRfny/mfJA0= +github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.10.0 h1:VhSvgU2jSli8o3AqIEOTJr7rZwAEUVo4E4XhR94Zfr0= +github.com/jackc/pgx/v5 v5.10.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jeremywohl/flatten v1.0.1 h1:LrsxmB3hfwJuE+ptGOijix1PIfOoKLJ3Uee/mzbgtrs= github.com/jeremywohl/flatten v1.0.1/go.mod h1:4AmD/VxjWcI5SRB0n6szE2A6s2fsNHDLO0nAlMHgfLQ= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 h1:liMMTbpW34dhU4az1GN0pTPADwNmvoRSeoZ6PItiqnY= github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE= github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/keybase/go-keychain v0.0.1 h1:way+bWYa6lDppZoZcgMbYsvC7GxljxrskdNInRtuthU= +github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXwkPPMeUgOK1k= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.18.3 h1:9PJRvfbmTabkOX8moIpXPbMMbYN60bWImDDU7L+/6zw= +github.com/klauspost/compress v1.18.3/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= +github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= +github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -272,6 +489,20 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo/v4 v4.14.0 h1:+tiMrDLxwv6u0oKtD03mv+V1vXXB3wCqPHJqPuIe+7M= +github.com/labstack/echo/v4 v4.14.0/go.mod h1:xmw1clThob0BSVRX1CRQkGQ/vjwcpOMjQZSZa9fKA/c= +github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= +github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= +github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= +github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= +github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= +github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= +github.com/liamylian/jsontime/v2 v2.0.0 h1:3if2kDW/boymUdO+4Qj/m4uaXMBSF6np9KEgg90cwH0= +github.com/liamylian/jsontime/v2 v2.0.0/go.mod h1:UHp1oAPqCBfspokvGmaGe0IAl2IgOpgOgDaKPcvcGGY= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lmittmann/tint v1.1.3 h1:Hv4EaHWXQr+GTFnOU4VKf8UvAtZgn0VuKT+G0wFlO3I= github.com/lmittmann/tint v1.1.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/lrita/cmap v0.0.0-20231108122212-cb084a67f554 h1:a0+bIffIh/HdvvgtPQLRhOef1VDSxZ+8bQiyjQlJzqc= @@ -300,16 +531,23 @@ github.com/mbleigh/raymond v0.0.0-20250414171441-6b3a58ab9e0a h1:v2cBA3xWKv2cIOV github.com/mbleigh/raymond v0.0.0-20250414171441-6b3a58ab9e0a/go.mod h1:Y6ghKH+ZijXn5d9E7qGGZBmjitx7iitZdQiIW97EpTU= github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= +github.com/microsoft/go-mssqldb v1.10.0 h1:pHEt+Qz6YFPWqREq10mqSE524QQo+/QremwTCQht7TY= +github.com/microsoft/go-mssqldb v1.10.0/go.mod h1:mnG7lGa9iYJbzJqGCXyuQCegStKMr3kogDLD6+bmggg= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/spdystream v0.5.1 h1:9sNYeYZUcci9R6/w7KDaFWEWeV4LStVG78Mpyq/Zm/Y= +github.com/moby/spdystream v0.5.1/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= @@ -318,6 +556,8 @@ github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/ohler55/ojg v1.28.1 h1:Xy93DelhLSZNeWv8GPKtP6qMqkUlZlAxBP/AQcC5RfY= github.com/ohler55/ojg v1.28.1/go.mod h1:/Y5dGWkekv9ocnUixuETqiL58f+5pAsUfg5P8e7Pa2o= github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s= @@ -338,12 +578,29 @@ github.com/openai/openai-go v1.12.0 h1:NBQCnXzqOTv5wsgNC36PrFEiskGfO5wccfCWDo9S1 github.com/openai/openai-go v1.12.0/go.mod h1:g461MYGXEXBVdV5SaR/5tNzNbSfwTBBefwc+LlDCK0Y= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/orcaman/concurrent-map/v2 v2.0.1 h1:jOJ5Pg2w1oeB6PeDurIYf6k9PQ+aTITr/6lP/L/zp6c= +github.com/orcaman/concurrent-map/v2 v2.0.1/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= +github.com/paulmach/orb v0.12.0 h1:z+zOwjmG3MyEEqzv92UN49Lg1JFYx0L9GpGKNVDKk1s= +github.com/paulmach/orb v0.12.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= +github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4/v4 v4.1.25 h1:kocOqRffaIbU5djlIBr7Wh+cx82C0vtFb0fOurZHqD0= +github.com/pierrec/lz4/v4 v4.1.25/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= +github.com/pjbgf/sha1cd v0.6.0 h1:3WJ8Wz8gvDz29quX1OcEmkAlUg9diU4GxJHqs0/XiwU= +github.com/pjbgf/sha1cd v0.6.0/go.mod h1:lhpGlyHLpQZoxMv8HcgXvZEhcGs0PG/vsZnEJ7H0iCM= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= +github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/playwright-community/playwright-go v0.5700.1 h1:PNFb1byWqrTT720rEO0JL88C6Ju0EmUnR5deFLvtP/U= github.com/playwright-community/playwright-go v0.5700.1/go.mod h1:MlSn1dZrx8rszbCxY6x3qK89ZesJUYVx21B2JnkoNF0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -353,6 +610,7 @@ github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= @@ -377,6 +635,10 @@ github.com/samber/lo v1.53.0 h1:t975lj2py4kJPQ6haz1QMgtId2gtmfktACxIXArw3HM= github.com/samber/lo v1.53.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= github.com/samber/oops v1.21.0 h1:18atcO4oEigNFuGXqr3NZWZ6P0XOSEXyBSAMXdQRxTc= github.com/samber/oops v1.21.0/go.mod h1:Hsm/sKPxtCfPh0w/cE3xVoRfSiE1joDRiStPAsmG9bo= +github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= +github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/segmentio/encoding v0.5.4 h1:OW1VRern8Nw6ITAtwSZ7Idrl3MXCFwXHPgqESYfvNt0= +github.com/segmentio/encoding v0.5.4/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= @@ -385,8 +647,13 @@ github.com/shoenig/go-m1cpu v0.1.7 h1:C76Yd0ObKR82W4vhfjZiCp0HxcSZ8Nqd84v+HZ0qyI github.com/shoenig/go-m1cpu v0.1.7/go.mod h1:KkDOw6m3ZJQAPHbrzkZki4hnx+pDRR1Lo+ldA56wD5w= github.com/shoenig/test v1.7.0 h1:eWcHtTXa6QLnBvm0jgEabMRN/uJ4DMV3M8xUGgRkZmk= github.com/shoenig/test v1.7.0/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= +github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= @@ -394,12 +661,21 @@ github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiT github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= +github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -408,6 +684,7 @@ github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vl github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= @@ -427,16 +704,28 @@ github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9R github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ= github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY= +github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/vadimi/go-http-ntlm v1.0.3 h1:o6n2vAtP1MlLT73jIXuQYryIcWzXyMN0SCQWZ2QVLLc= github.com/vadimi/go-http-ntlm v1.0.3/go.mod h1:SwhhmybQ4Yn1mC53UPmQ6MCrBX6UvJHlS1Xt89OmM9M= github.com/vadimi/go-http-ntlm/v2 v2.5.0 h1:sddEWZumD7GoeNkfFZyZq01pq6CB4U6L73EBw3X7vTU= github.com/vadimi/go-http-ntlm/v2 v2.5.0/go.mod h1:KduY1xBqaL8Q2Rh/erMvRQHKoj3VAT9GNYxe9EH+rOo= +github.com/vadimi/go-ntlm v1.0.1/go.mod h1:hPTY60eLSKGj9oUJAB+kZiLs2Cg5eKdH60aLczM9rMg= github.com/vadimi/go-ntlm v1.2.1 h1:y2xZf/a5+BJlYNJIIulP1q8F438H9bU7aGcYE53vghQ= github.com/vadimi/go-ntlm v1.2.1/go.mod h1:hPTY60eLSKGj9oUJAB+kZiLs2Cg5eKdH60aLczM9rMg= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -444,6 +733,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= +github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8= @@ -452,9 +743,14 @@ github.com/xuri/excelize/v2 v2.10.1 h1:V62UlqopMqha3kOpnlHy2CcRVw1V8E63jFoWUmMzx github.com/xuri/excelize/v2 v2.10.1/go.mod h1:iG5tARpgaEeIhTqt3/fgXCGoBRt4hNXgCp3tfXKoOIc= github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9 h1:+C0TIdyyYmzadGaL/HBLbf3WdLgC29pgyhTjAT/0nuE= github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= +github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= +github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.7.16 h1:n+CJdUxaFMiDUNnWC3dMWCIQJSkxH4uz3ZwQBkAlVNE= github.com/yuin/goldmark v1.7.16/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= @@ -462,86 +758,140 @@ github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg= -go.opentelemetry.io/otel v1.42.0 h1:lSQGzTgVR3+sgJDAU/7/ZMjN9Z+vUip7leaqBKy4sho= -go.opentelemetry.io/otel v1.42.0/go.mod h1:lJNsdRMxCUIWuMlVJWzecSMuNjE7dOYyWlqOXWkdqCc= +go.opentelemetry.io/contrib/detectors/gcp v1.42.0 h1:kpt2PEJuOuqYkPcktfJqWWDjTEd/FNgrxcniL7kQrXQ= +go.opentelemetry.io/contrib/detectors/gcp v1.42.0/go.mod h1:W9zQ439utxymRrXsUOzZbFX4JhLxXU4+ZnCt8GG7yA8= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 h1:yI1/OhfEPy7J9eoa6Sj051C7n5dvpj0QX8g4sRchg04= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0/go.mod h1:NoUCKYWK+3ecatC4HjkRktREheMeEtrXoQxrqYFeHSc= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 h1:8tvICD4vSTOOsNrsI4Ljf6C+6UKvpTEH5XY3JMoyPoo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0/go.mod h1:z9+yiacE0IHRqM4qFfkbt/JYlmYXgss8GY/jXoNuPJI= +go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= +go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 h1:4YsVu3B8+3qtWYYrsUYgn0OG78pN0rnNPRGX4SbokQI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0/go.mod h1:+wnlSn0mD1ADVMe3v9Z/WIaiz6q6gL2J/ejaAmdmv80= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0 h1:qazEJlUOQzhCpzQpFETGby7EdqjI1wsd0W+6Gg1SCTU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0/go.mod h1:fOD2Yefuxixkx3ahVNf0O/PERb6r4OlbxfATVnYvzCo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0 h1:lgh3PiVrRUWMLOVSkQicxzZll5NjF1r+AtsX1XRIHw0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0/go.mod h1:5Cnhth3m/AgOeTgE3ex12pPmiu/gGtZit03kSzx9X7s= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 h1:wm/Q0GAAykXv83wzcKzGGqAnnfLFyFe7RslekZuv+VI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0/go.mod h1:ra3Pa40+oKjvYh+ZD3EdxFZZB0xdMfuileHAm4nNN7w= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.35.0 h1:T0Ec2E+3YZf5bgTNQVet8iTDW7oIk03tXHq+wkwIDnE= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.35.0/go.mod h1:30v2gqH+vYGJsesLWFov8u47EpYTcIQcBjKpI6pJThg= -go.opentelemetry.io/otel/metric v1.42.0 h1:2jXG+3oZLNXEPfNmnpxKDeZsFI5o4J+nz6xUlaFdF/4= -go.opentelemetry.io/otel/metric v1.42.0/go.mod h1:RlUN/7vTU7Ao/diDkEpQpnz3/92J9ko05BIwxYa2SSI= -go.opentelemetry.io/otel/sdk v1.42.0 h1:LyC8+jqk6UJwdrI/8VydAq/hvkFKNHZVIWuslJXYsDo= -go.opentelemetry.io/otel/sdk v1.42.0/go.mod h1:rGHCAxd9DAph0joO4W6OPwxjNTYWghRWmkHuGbayMts= -go.opentelemetry.io/otel/sdk/metric v1.42.0 h1:D/1QR46Clz6ajyZ3G8SgNlTJKBdGp84q9RKCAZ3YGuA= -go.opentelemetry.io/otel/sdk/metric v1.42.0/go.mod h1:Ua6AAlDKdZ7tdvaQKfSmnFTdHx37+J4ba8MwVCYM5hc= -go.opentelemetry.io/otel/trace v1.42.0 h1:OUCgIPt+mzOnaUTpOQcBiM/PLQ/Op7oq6g4LenLmOYY= -go.opentelemetry.io/otel/trace v1.42.0/go.mod h1:f3K9S+IFqnumBkKhRJMeaZeNk9epyhnCmQh/EysQCdc= +go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= +go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel/metric/x v0.66.0 h1:YkCrx1zLOChi9ZcZ6euupOcsgzbVlec7D/xoEU1+cTA= +go.opentelemetry.io/otel/metric/x v0.66.0/go.mod h1:d1+BDj9t96do0/1LoU1ayfCv79ZgNE41qbhBvnMOBZk= +go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= +go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= +go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= +go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= +go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= +go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g= +go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +gocloud.dev v0.43.0 h1:aW3eq4RMyehbJ54PMsh4hsp7iX8cO/98ZRzJJOzN/5M= +gocloud.dev v0.43.0/go.mod h1:eD8rkg7LhKUHrzkEdLTZ+Ty/vgPHPCd+yMQdfelQVu4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= -golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= -golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 h1:jiDhWWeC7jfWqR9c/uplMOqJ0sbNlNWv0UkzE0vX1MA= -golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90/go.mod h1:xE1HEv6b+1SCZ5/uscMRjUBKtIxworgEcEi+/n9NQDQ= -golang.org/x/image v0.27.0 h1:C8gA4oWU/tKkdCfYT6T2u4faJu3MeNS5O8UPWlPF61w= -golang.org/x/image v0.27.0/go.mod h1:xbdrClrAUway1MUTEZDq9mz/UpRwYAkFFNUslZtcB+g= +golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= +golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJkhzJCK5J6kUi1NTVXfM= +golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80= +golang.org/x/image v0.41.0 h1:8wS72eGJMJaBxK6okTzd4WaXumUlTVlb753MlsSvTCo= +golang.org/x/image v0.41.0/go.mod h1:uIc348UZMSvS5Z65CVZ7iDPaNobNFEPeJ4kbqTOszmA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= -golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= +golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4= +golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= -golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= +golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o= +golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= +golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -549,57 +899,96 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= -golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= -golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU= -golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A= +golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc= +golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= -golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= -golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= -golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= +golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= +golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= +golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= -golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= +golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8= +golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= -gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= +gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= +google.golang.org/api v0.286.0 h1:TdTXMvzYKnWV1/lPbCdbXRqBrkDqjPto22H2xeZZ8LI= +google.golang.org/api v0.286.0/go.mod h1:NlOlUIr8MPoIhT9Bb/oUnRuHbJOLwxb6JSYJM8Yz+jQ= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genai v1.51.0 h1:IZGuUqgfx40INv3hLFGCbOSGp0qFqm7LVmDghzNIYqg= google.golang.org/genai v1.51.0/go.mod h1:A3kkl0nyBjyFlNjgxIwKq70julKbIxpSxqKO5gw/gmk= -google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 h1:VPWxll4HlMw1Vs/qXtN7BvhZqsS9cdAittCNvVENElA= -google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:7QBABkRtR8z+TEnmXTqIqwJLlzrZKVfAUm7tY3yGv0M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 h1:RmoJA1ujG+/lRGNfUnOMfhCy5EipVMyvUE+KNbPbTlw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= -google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= -google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 h1:XzmzkmB14QhVhgnawEVsOn6OFsnpyxNPRY9QV01dNB0= +google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:L43LFes82YgSonw6iTXTxXUX1OlULt4AQtkik4ULL/I= +google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8= +google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260622175928-b703f567277d h1:mpAgMyM9vQHxycBlDq50y1VHpfSfVwzXvrQKtYbXuUY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260622175928-b703f567277d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.81.1 h1:VnnIIZ88UzOOKLukQi+ImGz8O1Wdp8nAGGnvOfEIWQQ= +google.golang.org/grpc v1.81.1/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI= google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -609,6 +998,8 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -616,8 +1007,14 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/postgres v1.6.0 h1:2dxzU8xJ+ivvqTRph34QX+WrRaJlmfyPqXmoGVjMBa4= +gorm.io/driver/postgres v1.6.0/go.mod h1:vUw0mrGgrTK+uPHEhAdV4sfFELrByKVGnaVRkXDhtWo= +gorm.io/gorm v1.31.0 h1:0VlycGreVhK7RF/Bwt51Fk8v0xLiiiFdbGDPIZQ7mJY= +gorm.io/gorm v1.31.0/go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= k8s.io/api v0.36.1 h1:XbL/EMj8K2aJpJtePmqUyQMsM0D4QI2pvl7YKJ20FTY= k8s.io/api v0.36.1/go.mod h1:KOWo4ey3TINlXjeHVuwB3i+tXXnu+UcwFBHlI/9dvEo= @@ -631,6 +1028,8 @@ k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg= k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0= +k8s.io/streaming v0.36.1 h1:L+K68n4Gg940BGNNYtUBvL1WTLL0YnKT3s+P1MNAmR4= +k8s.io/streaming v0.36.1/go.mod h1:z6fV3D+NVkoeqRMtWwlUZK6U17SY/LqNzOxWL6GyR/s= k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU= k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= layeh.com/gopher-json v0.0.0-20201124131017-552bb3c4c3bf h1:rRz0YsF7VXj9fXRF6yQgFI7DzST+hsI3TeFSGupntu0= diff --git a/pkg/ai/agent.go b/pkg/ai/agent.go index 446c21a..6b62e00 100644 --- a/pkg/ai/agent.go +++ b/pkg/ai/agent.go @@ -2,6 +2,7 @@ package ai import ( "context" + "encoding/json" "io" "sync" "time" @@ -31,6 +32,15 @@ type PromptRequest struct { SystemPrompt string `json:"system_prompt,omitempty"` Context map[string]string `json:"context,omitempty"` StructuredOutput any `json:"structured_output,omitempty"` + // SchemaJSON is a pre-built JSON Schema (e.g. from a .prompt frontmatter + // output block) forwarded verbatim to ai.Request.Prompt.SchemaJSON. Prefer it + // over StructuredOutput when the schema is declared in the prompt file rather + // than a Go type; the two are mutually exclusive. + SchemaJSON json.RawMessage `json:"schema_json,omitempty"` + // SchemaStrictness forwards api.Prompt.SchemaStrictness — the policy for a + // response that fails schema validation (warning/error/retry). "" (default) + // skips validation. + SchemaStrictness api.SchemaStrictness `json:"schema_strictness,omitempty"` // Source identifies the prompt template (e.g. the .prompt filename) for // diagnostics; forwarded to ai.Request.Source and printed by the logging // middleware. @@ -77,10 +87,12 @@ func (a *Agent) GetBackend() Backend { return a.provider.GetBackend() } func (a *Agent) ExecutePrompt(ctx context.Context, req PromptRequest) (*PromptResponse, error) { start := time.Now() resp, err := a.provider.Execute(ctx, Request{Prompt: api.Prompt{ - User: req.Prompt, - System: req.SystemPrompt, - Source: req.Source, - Schema: req.StructuredOutput, + User: req.Prompt, + System: req.SystemPrompt, + Source: req.Source, + Schema: req.StructuredOutput, + SchemaJSON: req.SchemaJSON, + SchemaStrictness: req.SchemaStrictness, }}) if err != nil { return &PromptResponse{Request: req, Model: a.cfg.Model.Name, Error: err.Error(), Duration: time.Since(start)}, err diff --git a/pkg/ai/agent/runner.go b/pkg/ai/agent/runner.go index 8b99231..be503d9 100644 --- a/pkg/ai/agent/runner.go +++ b/pkg/ai/agent/runner.go @@ -1,14 +1,12 @@ -// Package agent composes pre/post lifecycle plugins around an iterative AI run. +// Package agent composes a generate→verify run out of generic hooks. // -// It sits one layer above ai.RunUntil: a Runner drives the loop while -// SetupPlugins (e.g. a git worktree) run once before it, VerifyPlugins (e.g. -// lint/test/LLM-judge) vote after every iteration and drive re-runs when they -// fail, and FinalizePlugins (e.g. a commit) run once after the loop. This is the -// extension point ai/middleware (a single-call decorator) cannot express. -// -// The Runner also taps the event stream to record the run's SessionID and the -// set of files the agent changed (reusing pkg/ai/history's file-mutating tool -// table), so verifiers and finalizers can scope themselves to just those files. +// A Runner[T] drives an iterative AI run: PreRun hooks (e.g. a git worktree) run +// once before the loop; Verify hooks vote after every iteration and, when a run +// fails, return the exact next request to re-run; PostRun hooks (e.g. commit + +// worktree teardown) run once after; an optional Output hook produces the typed +// final result T. Every hook receives a HookContext carrying the rendered +// request and the accumulating api.Response — whose Workspace holds the run's +// cwd/git/changed/commits/plan state. package agent import ( @@ -18,11 +16,16 @@ import ( "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/ai/history" + "github.com/flanksource/captain/pkg/api" "github.com/flanksource/captain/pkg/claude" + "github.com/flanksource/commons/logger" ) -// Scope controls how much verifiers/finalizers act on. ScopeChanged restricts -// them to the files the agent edited; ScopeAll lets each act on the whole tree. +// fallbackLog is used when ctx carries no task-scoped logger (ai.ContextWithLogger). +var fallbackLog = logger.GetLogger("agent") + +// Scope controls how much hooks act on. ScopeChanged restricts them to the files +// the agent edited; ScopeAll lets each act on the whole tree. type Scope string const ( @@ -30,12 +33,8 @@ const ( ScopeAll Scope = "all" ) -// AllScopes lists every verifier scope in canonical order. It is the single -// source of truth behind Scope.Valid, ScopeList, ParseScope, and the -// help/error/completion strings that enumerate scopes. -func AllScopes() []Scope { - return []Scope{ScopeAll, ScopeChanged} -} +// AllScopes lists every scope in canonical order. +func AllScopes() []Scope { return []Scope{ScopeAll, ScopeChanged} } // Valid reports whether s is one of the supported scopes. func (s Scope) Valid() bool { @@ -47,8 +46,7 @@ func (s Scope) Valid() bool { return false } -// ScopeList renders the supported scopes as a comma-separated string for -// help/error text. +// ScopeList renders the supported scopes as a comma-separated string. func ScopeList() string { parts := make([]string, len(AllScopes())) for i, s := range AllScopes() { @@ -57,8 +55,7 @@ func ScopeList() string { return strings.Join(parts, ", ") } -// ParseScope resolves a CLI/flag value into a Scope, defaulting empty to -// ScopeAll. It fails loud on any other value, naming the valid set. +// ParseScope resolves a CLI/flag value into a Scope, defaulting empty to ScopeAll. func ParseScope(s string) (Scope, error) { switch Scope(s) { case "", ScopeAll: @@ -70,198 +67,288 @@ func ParseScope(s string) (Scope, error) { } } -// RunContext is the shared per-run state passed to every plugin. Setup plugins -// may rewrite Cwd (a worktree); the Runner fills SessionID/ChangedFiles from the -// event stream as the loop progresses. -type RunContext struct { - Ctx context.Context - Repo string // repo root (for git/commit/test scoping) - Cwd string // working dir the provider runs in; a worktree plugin rewrites it - Scope Scope // ScopeChanged ⇒ verifiers/finalizers act on ChangedFiles only - - SessionID string // last EventSystem.SessionID seen - ChangedFiles []string // distinct repo-relative paths from file-mutating tool_use events - - Metadata map[string]any // plugin scratch (worktree path/branch/diff, …) +// HookContext carries what hooks read/mutate: the request for this iteration and +// the accumulating response, whose Workspace holds the run's working-dir state. +type HookContext struct { + context.Context + Request *ai.Request + Response *ai.Response + Iteration int + Scope Scope + + // Verified and Failed describe the run's outcome so PostRun hooks (e.g. the + // worktree merge/cleanup gate) can act on it. Runner.Run sets both right + // before invoking PostRun hooks; they are meaningless beforehand. + // + // Verified mirrors VerifyPassed(result.Verdicts) — true when the last verify + // verdict passed, or trivially true when no Verify hooks ran at all. + Verified bool + // Failed is true when the generate/verify run itself returned an error + // (a provider failure, not a failing verdict). + Failed bool } -// Verdict is a verifier's judgement on an iteration. Feedback is appended to the -// next iteration's prompt when OK is false. -type Verdict struct { - OK bool - Reason string - Feedback string +// Workspace returns the run's working-dir state, allocating it if needed (so it +// is never nil for a hook to read/mutate). +func (hc *HookContext) Workspace() *api.Workspace { + if hc.Response.Workspace == nil { + hc.Response.Workspace = &api.Workspace{} + } + return hc.Response.Workspace } -// Plugin is the common base; concrete plugins also implement one or more of the -// hook interfaces below. -type Plugin interface{ Name() string } - -// SetupPlugin runs once before the loop and returns a teardown closure run after -// it (teardowns run in LIFO order). A worktree plugin creates the worktree here. -type SetupPlugin interface { - Plugin - Setup(rc *RunContext) (teardown func() error, err error) +// VerifyResult is a Verify hook's judgement on an iteration. When !Valid, Retry +// (if non-nil) is the exact next request to run — the hook bakes its feedback +// into that request's prompt. Output carries structured verify output. +type VerifyResult struct { + Valid bool + Retry *ai.Request + Output any } -// VerifyPlugin runs after each completed iteration and votes. A non-OK verdict -// triggers a re-run with the verdict's Feedback appended to the prompt. -type VerifyPlugin interface { - Plugin - Verify(rc *RunContext, iter *ai.LoopIteration) (Verdict, error) +// PreRun runs once before the loop. +type PreRun interface { + Name() string + PreRun(*HookContext) error } -// FinalizePlugin runs once after the loop ends cleanly, before teardowns — so a -// commit plugin can stage and commit while a worktree still exists. -type FinalizePlugin interface { - Plugin - Finalize(rc *RunContext, result *RunResult) error +// Verify runs after each completed iteration and votes. +type Verify interface { + Name() string + Verify(*HookContext) (VerifyResult, error) } -// Runner composes plugins around ai.RunUntil. -type Runner struct { - Provider ai.StreamingProvider - Plugins []Plugin - Loop ai.LoopOptions // MaxIterations, MaxCostUSD, SessionReuse, OnEvent honoured +// PostRun runs once after the loop, always (commit + teardown). +type PostRun interface { + Name() string + PostRun(*HookContext) error +} - // Build assembles the per-iteration request. feedback is the aggregated - // verifier feedback from the previous turn ("" on the first turn). - Build func(rc *RunContext, iter int, prev *ai.LoopIteration, feedback string) ai.Request +// Output produces the workflow's typed final result. Optional; when absent the +// runner leaves Result.Output at its zero value. +type Output[T any] interface { + Name() string + Output(*HookContext) (T, error) +} - Repo string // seeds RunContext.Repo - Cwd string // seeds RunContext.Cwd - Scope Scope // seeds RunContext.Scope (defaults to ScopeAll) +// Runner drives a generate→verify loop composed of hooks, producing a typed +// result T. Hooks is a heterogeneous list; each element may implement any of +// PreRun/Verify/PostRun/Output[T]. +type Runner[T any] struct { + Provider ai.StreamingProvider + Request ai.Request // the initial rendered request + Hooks []any + MaxIterations int // 0 ⇒ 1 + Repo, Cwd string + Scope Scope + OnEvent func(iter int, ev ai.Event) // live progress tap } -// RunResult bundles the outcome. -type RunResult struct { - Loop *ai.LoopResult - Verdicts []Verdict - Cwd string - SessionID string - ChangedFiles []string +// Result bundles the run outcome. Response carries the final text/structured +// data + Workspace; Output is the typed final result. +type Result[T any] struct { + Response *ai.Response + Output T + Verdicts []VerifyResult + Loop *ai.LoopResult } -// Run executes the full pipeline: setup → loop (with per-iteration verify) → -// finalize → teardown. Errors are surfaced in priority order (loop, verify, -// finalize, teardown); teardowns always run. -func (r *Runner) Run(ctx context.Context) (*RunResult, error) { - if r.Provider == nil { - return nil, fmt.Errorf("agent.Runner: Provider is required") +// Run executes the pipeline: PreRun → loop(generate + verify) | verify-only → +// PostRun (always) → Output. An empty prompt body runs verify-only (no +// generation); no Verify hooks runs generate-only. +func (r *Runner[T]) Run(ctx context.Context) (Result[T], error) { + var zero Result[T] + scope := r.Scope + if scope == "" { + scope = ScopeAll } - if r.Build == nil { - return nil, fmt.Errorf("agent.Runner: Build is required") + resp := &ai.Response{Workspace: &api.Workspace{Repo: r.Repo, Cwd: r.Cwd}} + hc := &HookContext{Context: ctx, Request: &r.Request, Response: resp, Scope: scope} + result := Result[T]{Response: resp} + + for _, h := range r.Hooks { + if pr, ok := h.(PreRun); ok { + if err := pr.PreRun(hc); err != nil { + hc.Failed = true + _ = r.runPostRun(hc) // best-effort teardown + return zero, fmt.Errorf("agent: preRun %q: %w", pr.Name(), err) + } + } } - rc := &RunContext{Ctx: ctx, Repo: r.Repo, Cwd: r.Cwd, Scope: r.Scope, Metadata: map[string]any{}} - if rc.Scope == "" { - rc.Scope = ScopeAll + verifyOnly := strings.TrimSpace(r.Request.Prompt.User) == "" + var runErr error + if verifyOnly { + runErr = r.runVerifyOnce(hc, &result) + } else if r.Provider == nil { + runErr = fmt.Errorf("agent: Provider is required") + } else { + runErr = r.runLoop(ctx, hc, &result) } - result := &RunResult{} - - // 1. Setup plugins (in order); collect teardowns to run LIFO at the end. - var teardowns []func() error - runTeardowns := func() error { - var firstErr error - for i := len(teardowns) - 1; i >= 0; i-- { - if err := teardowns[i](); err != nil && firstErr == nil { - firstErr = err + + hc.Failed = runErr != nil + hc.Verified = verifyPassed(result.Verdicts) + postErr := r.runPostRun(hc) + if runErr != nil { + return result, runErr + } + if postErr != nil { + return result, postErr + } + + for _, h := range r.Hooks { + if oh, ok := h.(Output[T]); ok { + out, err := oh.Output(hc) + if err != nil { + return result, fmt.Errorf("agent: output %q: %w", oh.Name(), err) } + result.Output = out + break } - return firstErr } - for _, p := range r.Plugins { - sp, ok := p.(SetupPlugin) - if !ok { - continue - } - td, err := sp.Setup(rc) - if err != nil { - _ = runTeardowns() - return nil, fmt.Errorf("agent: setup plugin %q: %w", p.Name(), err) - } - if td != nil { - teardowns = append(teardowns, td) + return result, nil +} + +// runPostRun runs every PostRun hook, always; returns the first error. +func (r *Runner[T]) runPostRun(hc *HookContext) error { + var firstErr error + for _, h := range r.Hooks { + if pr, ok := h.(PostRun); ok { + if err := pr.PostRun(hc); err != nil && firstErr == nil { + firstErr = fmt.Errorf("agent: postRun %q: %w", pr.Name(), err) + } } } + return firstErr +} - // 2. Drive the loop. The event tap records session + changed files; the - // BuildRequest hook runs verifiers between iterations. - var verifyErr error - var feedback string - loop := r.Loop - loop.Provider = r.Provider - callerOnEvent := r.Loop.OnEvent - loop.OnEvent = func(iter int, ev ai.Event) { - r.recordEvent(rc, ev) - if callerOnEvent != nil { - callerOnEvent(iter, ev) - } +// runVerifyOnce runs the Verify hooks a single time against the current state +// (no generation) — e.g. scoring already-committed work. +func (r *Runner[T]) runVerifyOnce(hc *HookContext, result *Result[T]) error { + verdicts, _, _, err := r.verify(hc) + if err != nil { + return err } - loop.BuildRequest = func(iter int, prev *ai.LoopIteration) (ai.Request, bool) { - if prev != nil { - v, err := r.runVerifiers(rc, prev) - if err != nil { - verifyErr = err - return ai.Request{}, false + result.Verdicts = append(result.Verdicts, verdicts...) + return nil +} + +// runLoop drives ai.RunUntil; verifiers run in the BuildRequest hook between +// iterations, and a failing verdict's Retry becomes the next request. +func (r *Runner[T]) runLoop(ctx context.Context, hc *HookContext, result *Result[T]) error { + log := ai.LoggerFromContext(ctx, fallbackLog) + maxIter := r.MaxIterations + if maxIter <= 0 { + maxIter = 1 + } + req := r.Request + var verifyErr error + + loop, loopErr := ai.RunUntil(ctx, ai.LoopOptions{ + Provider: r.Provider, + MaxIterations: maxIter, + OnEvent: func(iter int, ev ai.Event) { + r.recordEvent(hc, ev) + if r.OnEvent != nil { + r.OnEvent(iter, ev) } - result.Verdicts = append(result.Verdicts, v) - if v.OK { - return ai.Request{}, false // success → stop ("condition-met") + }, + BuildRequest: func(iter int, prev *ai.LoopIteration) (ai.Request, bool) { + if prev != nil { + r.updateResponse(hc, prev) + verdicts, retry, allValid, err := r.verify(hc) + if err != nil { + verifyErr = err + return ai.Request{}, false + } + result.Verdicts = append(result.Verdicts, verdicts...) + if allValid { + log.Tracef("agent: iteration %d verified OK; stopping", iter) + return ai.Request{}, false + } + if retry == nil { + return ai.Request{}, false // failed, no retry proposed + } + req = *retry } - feedback = v.Feedback - } - req := r.Build(rc, iter, prev, feedback) - req.Context.Dir = rc.Cwd - return req, true + hc.Iteration = iter + hc.Request = &req + req.SetCwd(hc.Workspace().Cwd) + return req, true + }, + }) + result.Loop = loop + if loopErr != nil { + return loopErr } + return verifyErr +} - lr, loopErr := ai.RunUntil(ctx, loop) - result.Loop = lr - result.Cwd = rc.Cwd - result.SessionID = rc.SessionID - result.ChangedFiles = rc.ChangedFiles - - // 3. Finalize (only on a clean loop) — runs before teardown so a commit - // lands while a worktree still exists. - var finalizeErr error - if loopErr == nil && verifyErr == nil { - for _, p := range r.Plugins { - fp, ok := p.(FinalizePlugin) - if !ok { - continue - } - if err := fp.Finalize(rc, result); err != nil { - finalizeErr = fmt.Errorf("agent: finalize plugin %q: %w", p.Name(), err) - break +// verifyPassed reports whether the run's last verify verdict passed, or +// trivially true when no Verify hooks ran at all. Runner.Run uses it to set +// HookContext.Verified for PostRun hooks; mirrors pkg/cli's own verifyPassed, +// which summarizes the same Result.Verdicts for CLI output. +func verifyPassed(verdicts []VerifyResult) bool { + if len(verdicts) == 0 { + return true + } + return verdicts[len(verdicts)-1].Valid +} + +// verify runs every Verify hook; allValid is true only if all passed. retry is +// the first failing hook's proposed next request. +func (r *Runner[T]) verify(hc *HookContext) (verdicts []VerifyResult, retry *ai.Request, allValid bool, err error) { + allValid = true + for _, h := range r.Hooks { + v, ok := h.(Verify) + if !ok { + continue + } + res, verr := v.Verify(hc) + if verr != nil { + return verdicts, nil, false, fmt.Errorf("agent: verify %q: %w", v.Name(), verr) + } + verdicts = append(verdicts, res) + if !res.Valid { + allValid = false + if retry == nil && res.Retry != nil { + retry = res.Retry } } } + return verdicts, retry, allValid, nil +} - // 4. Teardown (always). - teardownErr := runTeardowns() - - switch { - case loopErr != nil: - return result, loopErr - case verifyErr != nil: - return result, verifyErr - case finalizeErr != nil: - return result, finalizeErr - case teardownErr != nil: - return result, fmt.Errorf("agent: teardown: %w", teardownErr) +// updateResponse folds one completed iteration into the accumulating response: +// its assembled text, structured data, usage, and session id. +func (r *Runner[T]) updateResponse(hc *HookContext, prev *ai.LoopIteration) { + ws := hc.Workspace() + if prev.SessionID != "" { + ws.SessionID = prev.SessionID } - return result, nil + var text strings.Builder + for _, ev := range prev.Events { + switch ev.Kind { + case ai.EventText: + text.WriteString(ev.Text) + case ai.EventResult: + if len(ev.StructuredData) > 0 { + hc.Response.StructuredData = ev.StructuredData + } + } + } + hc.Response.Text = text.String() + hc.Response.Usage = prev.Usage } -// recordEvent updates the run context from one streamed event: session id from -// system events, and changed files from file-mutating tool_use events (reusing -// history's canonical tool table). Paths are normalized to repo-relative. -func (r *Runner) recordEvent(rc *RunContext, ev ai.Event) { +// recordEvent updates the workspace from one streamed event: session id and the +// set of files the agent changed (repo-relative). +func (r *Runner[T]) recordEvent(hc *HookContext, ev ai.Event) { + ws := hc.Workspace() switch ev.Kind { case ai.EventSystem: if ev.SessionID != "" { - rc.SessionID = ev.SessionID + ws.SessionID = ev.SessionID } case ai.EventToolUse: path, ok := mutatedPath(ev) @@ -269,40 +356,11 @@ func (r *Runner) recordEvent(rc *RunContext, ev ai.Event) { return } rel := path - if rc.Repo != "" { - rel = claude.RelativePath(path, rc.Repo) - } - rc.ChangedFiles = addUnique(rc.ChangedFiles, rel) - } -} - -// runVerifiers runs every VerifyPlugin; the run is OK only if all are OK, and -// each failing plugin's feedback is concatenated for the next prompt. -func (r *Runner) runVerifiers(rc *RunContext, iter *ai.LoopIteration) (Verdict, error) { - overall := Verdict{OK: true} - var reasons, feedbacks []string - for _, p := range r.Plugins { - vp, ok := p.(VerifyPlugin) - if !ok { - continue - } - v, err := vp.Verify(rc, iter) - if err != nil { - return Verdict{}, fmt.Errorf("verify plugin %q: %w", p.Name(), err) - } - if !v.OK { - overall.OK = false - if v.Reason != "" { - reasons = append(reasons, p.Name()+": "+v.Reason) - } - if v.Feedback != "" { - feedbacks = append(feedbacks, v.Feedback) - } + if ws.Repo != "" { + rel = claude.RelativePath(path, ws.Repo) } + ws.Changed = addUnique(ws.Changed, rel) } - overall.Reason = strings.Join(reasons, "; ") - overall.Feedback = strings.Join(feedbacks, "\n\n") - return overall, nil } // mutatedPath extracts the file an Edit/Write/MultiEdit/NotebookEdit tool_use diff --git a/pkg/ai/agent/runner_test.go b/pkg/ai/agent/runner_test.go index ce09e91..623864d 100644 --- a/pkg/ai/agent/runner_test.go +++ b/pkg/ai/agent/runner_test.go @@ -45,18 +45,17 @@ func TestRunner_CapturesSessionAndChangedFiles(t *testing.T) { } }} - r := &Runner{ + r := &Runner[string]{ Provider: prov, Repo: "/repo", - Build: func(_ *RunContext, _ int, _ *ai.LoopIteration, _ string) ai.Request { - return ai.Request{Prompt: api.Prompt{User: "go"}} - }, + Request: ai.Request{Prompt: api.Prompt{User: "go"}}, } res, err := r.Run(context.Background()) require.NoError(t, err) - assert.Equal(t, "sess-1", res.SessionID) - assert.Equal(t, []string{"pkg/a.go", "pkg/b.go"}, res.ChangedFiles) - assert.Equal(t, 1, prov.calls, "no verifiers ⇒ exactly one iteration") + require.NotNil(t, res.Response.Workspace) + assert.Equal(t, "sess-1", res.Response.Workspace.SessionID) + assert.Equal(t, []string{"pkg/a.go", "pkg/b.go"}, res.Response.Workspace.Changed) + assert.Equal(t, 1, prov.calls, "no verify hooks ⇒ exactly one iteration") } func TestRunner_VerifyDrivesRerunThenStops(t *testing.T) { @@ -65,79 +64,147 @@ func TestRunner_VerifyDrivesRerunThenStops(t *testing.T) { }} var verifyCalls int - var feedbackSeen []string - - r := &Runner{ - Provider: prov, - Scope: ScopeAll, - Plugins: []Plugin{ - verifyPlugin{name: "lint", fn: func(*RunContext, *ai.LoopIteration) (Verdict, error) { + r := &Runner[string]{ + Provider: prov, + Scope: ScopeAll, + MaxIterations: 3, + Request: ai.Request{Prompt: api.Prompt{User: "go"}}, + Hooks: []any{ + verifyHook{name: "lint", fn: func(hc *HookContext) (VerifyResult, error) { verifyCalls++ if verifyCalls == 1 { - return Verdict{OK: false, Reason: "1 violation", Feedback: "fix line 7"}, nil + // fail: the hook returns the exact next request to re-run. + next := *hc.Request + next.Prompt.User = hc.Request.Prompt.User + "\n\nfix line 7" + return VerifyResult{Valid: false, Retry: &next}, nil } - return Verdict{OK: true}, nil + return VerifyResult{Valid: true}, nil }}, }, - Build: func(_ *RunContext, _ int, _ *ai.LoopIteration, feedback string) ai.Request { - feedbackSeen = append(feedbackSeen, feedback) - return ai.Request{Prompt: api.Prompt{User: "go"}} - }, } res, err := r.Run(context.Background()) require.NoError(t, err) - assert.Equal(t, 2, prov.calls, "should re-run once after the first failing verify") + assert.Equal(t, 2, prov.calls, "re-run once after the first failing verify") assert.Equal(t, 2, verifyCalls) require.Len(t, res.Verdicts, 2) - assert.False(t, res.Verdicts[0].OK) - assert.True(t, res.Verdicts[1].OK) - // iter0 has no feedback; iter1 carries the failing verdict's feedback. - assert.Equal(t, []string{"", "fix line 7"}, feedbackSeen) + assert.False(t, res.Verdicts[0].Valid) + assert.True(t, res.Verdicts[1].Valid) } -func TestRunner_SetupFinalizeTeardownOrder(t *testing.T) { +func TestRunner_PreRunPostRunOrder(t *testing.T) { prov := &fakeProvider{events: func(int) []ai.Event { return []ai.Event{{Kind: ai.EventResult, Success: true}} }} var log []string - plugin := &lifecyclePlugin{log: &log} - - r := &Runner{ + r := &Runner[string]{ Provider: prov, - Plugins: []Plugin{plugin}, - Build: func(*RunContext, int, *ai.LoopIteration, string) ai.Request { - log = append(log, "build") - return ai.Request{} - }, + Request: ai.Request{Prompt: api.Prompt{User: "go"}}, + Hooks: []any{&lifecycleHook{log: &log}}, } _, err := r.Run(context.Background()) require.NoError(t, err) - // setup before the loop; finalize after; teardown last. - assert.Equal(t, []string{"setup", "build", "finalize", "teardown"}, log) + // PreRun before the loop; PostRun after. + assert.Equal(t, []string{"preRun", "postRun"}, log) } -// --- test plugins ----------------------------------------------------------- +func TestRunner_PostRunSeesVerifiedAndFailed(t *testing.T) { + cases := []struct { + name string + provider ai.StreamingProvider + hook verifyHook + wantVerified bool + wantFailed bool + }{ + { + name: "passing verify, no run error", + provider: &fakeProvider{events: func(int) []ai.Event { return []ai.Event{{Kind: ai.EventResult, Success: true}} }}, + hook: verifyHook{name: "lint", fn: func(*HookContext) (VerifyResult, error) { + return VerifyResult{Valid: true}, nil + }}, + wantVerified: true, + wantFailed: false, + }, + { + name: "failing verify with no retry, no run error", + provider: &fakeProvider{events: func(int) []ai.Event { return []ai.Event{{Kind: ai.EventResult, Success: true}} }}, + hook: verifyHook{name: "lint", fn: func(*HookContext) (VerifyResult, error) { + return VerifyResult{Valid: false}, nil + }}, + wantVerified: false, + wantFailed: false, + }, + { + name: "missing provider surfaces as a run error", + provider: nil, + hook: verifyHook{name: "lint", fn: func(*HookContext) (VerifyResult, error) { + return VerifyResult{Valid: true}, nil + }}, + wantVerified: true, // no verdicts recorded before the run error + wantFailed: true, + }, + } -type verifyPlugin struct { - name string - fn func(*RunContext, *ai.LoopIteration) (Verdict, error) + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + var sawVerified, sawFailed bool + outcome := &outcomeHook{onPostRun: func(hc *HookContext) { + sawVerified = hc.Verified + sawFailed = hc.Failed + }} + r := &Runner[string]{ + Provider: tc.provider, + Request: ai.Request{Prompt: api.Prompt{User: "go"}}, + Hooks: []any{tc.hook, outcome}, + } + _, _ = r.Run(context.Background()) + assert.Equal(t, tc.wantVerified, sawVerified, "hc.Verified") + assert.Equal(t, tc.wantFailed, sawFailed, "hc.Failed") + }) + } } -func (v verifyPlugin) Name() string { return v.name } -func (v verifyPlugin) Verify(rc *RunContext, it *ai.LoopIteration) (Verdict, error) { - return v.fn(rc, it) +func TestRunner_VerifyOnlySkipsGeneration(t *testing.T) { + var verifyCalls int + // Empty prompt body ⇒ verify-only: no provider, no generation loop. + r := &Runner[string]{ + Scope: ScopeAll, + Hooks: []any{ + verifyHook{name: "score", fn: func(*HookContext) (VerifyResult, error) { + verifyCalls++ + return VerifyResult{Valid: true}, nil + }}, + }, + } + + res, err := r.Run(context.Background()) + require.NoError(t, err) + assert.Equal(t, 1, verifyCalls, "verify runs exactly once") + require.Len(t, res.Verdicts, 1) + assert.True(t, res.Verdicts[0].Valid) + assert.Nil(t, res.Loop, "no generation loop in verify-only") } -type lifecyclePlugin struct{ log *[]string } +// --- test hooks ------------------------------------------------------------- -func (l *lifecyclePlugin) Name() string { return "lifecycle" } -func (l *lifecyclePlugin) Setup(*RunContext) (func() error, error) { - *l.log = append(*l.log, "setup") - return func() error { *l.log = append(*l.log, "teardown"); return nil }, nil -} -func (l *lifecyclePlugin) Finalize(*RunContext, *RunResult) error { - *l.log = append(*l.log, "finalize") - return nil +type verifyHook struct { + name string + fn func(*HookContext) (VerifyResult, error) } + +func (v verifyHook) Name() string { return v.name } +func (v verifyHook) Verify(hc *HookContext) (VerifyResult, error) { return v.fn(hc) } + +// outcomeHook records the HookContext.Verified/Failed values PostRun observes, +// e.g. what a worktree.Plugin reads to gate merge/cleanup. +type outcomeHook struct{ onPostRun func(*HookContext) } + +func (o *outcomeHook) Name() string { return "outcome" } +func (o *outcomeHook) PostRun(hc *HookContext) error { o.onPostRun(hc); return nil } + +type lifecycleHook struct{ log *[]string } + +func (l *lifecycleHook) Name() string { return "lifecycle" } +func (l *lifecycleHook) PreRun(*HookContext) error { *l.log = append(*l.log, "preRun"); return nil } +func (l *lifecycleHook) PostRun(*HookContext) error { *l.log = append(*l.log, "postRun"); return nil } diff --git a/pkg/ai/agent/verify/llmjudge.go b/pkg/ai/agent/verify/llmjudge.go index 8f8bc62..b9382b2 100644 --- a/pkg/ai/agent/verify/llmjudge.go +++ b/pkg/ai/agent/verify/llmjudge.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/flanksource/captain/pkg/ai" - "github.com/flanksource/captain/pkg/ai/agent" "github.com/flanksource/captain/pkg/ai/prompt" ) @@ -27,9 +26,9 @@ type LLMJudgeVerifier struct { Data func(cwd string, changed []string) map[string]any } -func (j *LLMJudgeVerifier) Verify(ctx context.Context, cwd string, changed []string) (agent.Verdict, error) { +func (j *LLMJudgeVerifier) Verify(ctx context.Context, cwd string, changed []string) (Verdict, error) { if j.Provider == nil || j.Prompt == nil { - return agent.Verdict{}, fmt.Errorf("LLMJudgeVerifier: Provider and Prompt are required") + return Verdict{}, fmt.Errorf("LLMJudgeVerifier: Provider and Prompt are required") } data := map[string]any{"cwd": cwd, "changed": changed} if j.Data != nil { @@ -39,10 +38,10 @@ func (j *LLMJudgeVerifier) Verify(ctx context.Context, cwd string, changed []str out := &judgeVerdict{} req, _, err := j.Prompt.Render(data, out) if err != nil { - return agent.Verdict{}, err + return Verdict{}, err } if _, err := j.Provider.Execute(ctx, req); err != nil { - return agent.Verdict{}, err + return Verdict{}, err } - return agent.Verdict{OK: out.OK, Reason: out.Reason, Feedback: out.Feedback}, nil + return Verdict{OK: out.OK, Reason: out.Reason, Feedback: out.Feedback}, nil } diff --git a/pkg/ai/agent/verify/verify.go b/pkg/ai/agent/verify/verify.go index b732697..a91f4d2 100644 --- a/pkg/ai/agent/verify/verify.go +++ b/pkg/ai/agent/verify/verify.go @@ -1,6 +1,7 @@ -// Package verify provides VerifyPlugins for agent.Runner: a generic command +// Package verify provides Verify hooks for agent.Runner: a generic command // verifier, a function verifier, and the plumbing to scope a verifier to the -// files an agent changed. Gavel layers richer lint/test verifiers on top. +// files an agent changed. Gavel layers richer lint/test/checklist verifiers on +// top via its own fixture engine. package verify import ( @@ -12,45 +13,70 @@ import ( "github.com/flanksource/clicky/exec" ) +// Verdict is a Verifier's judgement. Feedback is fed back into the next +// iteration's prompt when OK is false. +type Verdict struct { + OK bool + Reason string + Feedback string +} + // Verifier checks the state of a working tree after an agent turn. cwd is where // the run executed; changed is the agent's changed files when the run scope is // ScopeChanged, and nil otherwise (meaning "verify the whole tree"). type Verifier interface { - Verify(ctx context.Context, cwd string, changed []string) (agent.Verdict, error) + Verify(ctx context.Context, cwd string, changed []string) (Verdict, error) } -// Plugin adapts a Verifier into an agent.VerifyPlugin, applying the run's scope. +// Plugin adapts a Verifier into an agent.Verify hook: it scopes the verifier, +// and on failure returns the exact next request (feedback appended to the prompt) +// as the loop's Retry. type Plugin struct { name string v Verifier } -// New wraps a Verifier as a named VerifyPlugin. +// New wraps a Verifier as a named agent.Verify hook. func New(name string, v Verifier) *Plugin { return &Plugin{name: name, v: v} } func (p *Plugin) Name() string { return p.name } -// Verify passes the changed-file set to the inner verifier only when the run is -// scoped to changed files; otherwise it passes nil ("whole tree"). -func (p *Plugin) Verify(rc *agent.RunContext, _ *ai.LoopIteration) (agent.Verdict, error) { +func (p *Plugin) Verify(hc *agent.HookContext) (agent.VerifyResult, error) { + ws := hc.Workspace() var changed []string - if rc.Scope == agent.ScopeChanged { - changed = rc.ChangedFiles + if hc.Scope == agent.ScopeChanged { + changed = ws.Changed + } + vd, err := p.v.Verify(hc, ws.Cwd, changed) + if err != nil { + return agent.VerifyResult{}, err } - return p.v.Verify(rc.Ctx, rc.Cwd, changed) + if vd.OK { + return agent.VerifyResult{Valid: true, Output: vd}, nil + } + return agent.VerifyResult{Valid: false, Retry: retryWithFeedback(hc.Request, vd.Feedback), Output: vd}, nil +} + +// retryWithFeedback builds the next request: the current one with the verifier's +// feedback appended to the user prompt. +func retryWithFeedback(req *ai.Request, feedback string) *ai.Request { + next := *req + next.Prompt.User = strings.TrimRight(req.Prompt.User, "\n") + + "\n\n[verifier feedback]\n" + feedback + "\n\nFix the issues above and continue." + return &next } // FuncVerifier adapts a function to the Verifier interface. -type FuncVerifier func(ctx context.Context, cwd string, changed []string) (agent.Verdict, error) +type FuncVerifier func(ctx context.Context, cwd string, changed []string) (Verdict, error) -func (f FuncVerifier) Verify(ctx context.Context, cwd string, changed []string) (agent.Verdict, error) { +func (f FuncVerifier) Verify(ctx context.Context, cwd string, changed []string) (Verdict, error) { return f(ctx, cwd, changed) } // CmdVerifier runs an external command (lint, test, build, …) in the run's cwd. // A zero exit code is a pass; a non-zero exit is a failure whose feedback is the // tail of the combined output. When PerFile is set the changed files are -// appended to the command's arguments (for tools that take explicit paths). +// appended to the command's arguments. type CmdVerifier struct { Cmd string Args []string @@ -58,14 +84,14 @@ type CmdVerifier struct { FeedbackTail int // max bytes of output fed back; 0 ⇒ 4096 } -func (c *CmdVerifier) Verify(_ context.Context, cwd string, changed []string) (agent.Verdict, error) { +func (c *CmdVerifier) Verify(_ context.Context, cwd string, changed []string) (Verdict, error) { args := append([]string(nil), c.Args...) if c.PerFile { args = append(args, changed...) } res := exec.NewExec(c.Cmd, args...).WithCwd(cwd).Run().Result() if res.Error == nil && res.ExitCode == 0 { - return agent.Verdict{OK: true}, nil + return Verdict{OK: true}, nil } tail := c.FeedbackTail @@ -76,9 +102,5 @@ func (c *CmdVerifier) Verify(_ context.Context, cwd string, changed []string) (a if len(out) > tail { out = out[len(out)-tail:] } - return agent.Verdict{ - OK: false, - Reason: c.Cmd + " failed", - Feedback: out, - }, nil + return Verdict{OK: false, Reason: c.Cmd + " failed", Feedback: out}, nil } diff --git a/pkg/ai/agent/verify/verify_test.go b/pkg/ai/agent/verify/verify_test.go index 1b75c4b..20158fa 100644 --- a/pkg/ai/agent/verify/verify_test.go +++ b/pkg/ai/agent/verify/verify_test.go @@ -4,7 +4,9 @@ import ( "context" "testing" + "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/ai/agent" + "github.com/flanksource/captain/pkg/api" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -24,17 +26,44 @@ func TestCmdVerifier_PassAndFail(t *testing.T) { func TestPlugin_PassesChangedOnlyWhenScopeChanged(t *testing.T) { var seen []string - rec := FuncVerifier(func(_ context.Context, _ string, changed []string) (agent.Verdict, error) { + rec := FuncVerifier(func(_ context.Context, _ string, changed []string) (Verdict, error) { seen = changed - return agent.Verdict{OK: true}, nil + return Verdict{OK: true}, nil }) p := New("rec", rec) - _, err := p.Verify(&agent.RunContext{Ctx: context.Background(), Scope: agent.ScopeChanged, ChangedFiles: []string{"a.go"}}, nil) + hc := &agent.HookContext{ + Context: context.Background(), + Request: &ai.Request{}, + Response: &ai.Response{Workspace: &api.Workspace{Changed: []string{"a.go"}}}, + Scope: agent.ScopeChanged, + } + res, err := p.Verify(hc) require.NoError(t, err) + assert.True(t, res.Valid) assert.Equal(t, []string{"a.go"}, seen) - _, err = p.Verify(&agent.RunContext{Ctx: context.Background(), Scope: agent.ScopeAll, ChangedFiles: []string{"a.go"}}, nil) + hc.Scope = agent.ScopeAll + _, err = p.Verify(hc) require.NoError(t, err) assert.Nil(t, seen, "ScopeAll ⇒ verifier gets nil (whole-tree)") } + +func TestPlugin_FailBuildsRetryWithFeedback(t *testing.T) { + rec := FuncVerifier(func(_ context.Context, _ string, _ []string) (Verdict, error) { + return Verdict{OK: false, Reason: "lint", Feedback: "fix line 7"}, nil + }) + p := New("rec", rec) + hc := &agent.HookContext{ + Context: context.Background(), + Request: &ai.Request{Prompt: api.Prompt{User: "do it"}}, + Response: &ai.Response{Workspace: &api.Workspace{}}, + Scope: agent.ScopeAll, + } + res, err := p.Verify(hc) + require.NoError(t, err) + assert.False(t, res.Valid) + require.NotNil(t, res.Retry) + assert.Contains(t, res.Retry.Prompt.User, "do it") + assert.Contains(t, res.Retry.Prompt.User, "fix line 7") +} diff --git a/pkg/ai/agent/verify/workflow.go b/pkg/ai/agent/verify/workflow.go new file mode 100644 index 0000000..752756d --- /dev/null +++ b/pkg/ai/agent/verify/workflow.go @@ -0,0 +1,46 @@ +package verify + +import ( + "strings" + + "github.com/flanksource/captain/pkg/ai/agent" + "github.com/flanksource/captain/pkg/api" +) + +// HooksForWorkflow builds the generate→verify loop's Verify hooks from a spec's +// Workflow: each verify command becomes a pass/fail CmdVerifier whose failure +// output drives a re-run. Returns nil when there is nothing to verify. +// +// Shared by captain prompt-run and gavel so both construct the loop identically +// from an api.Spec.Workflow. Returns []any — the runner's heterogeneous hook list. +func HooksForWorkflow(wf *api.Workflow) []any { + if wf == nil || wf.Verify == nil { + return nil + } + var hooks []any + for _, cmd := range wf.Verify.Commands { + cmd = strings.TrimSpace(cmd) + if cmd == "" { + continue + } + hooks = append(hooks, New("verify:"+cmd, &CmdVerifier{Cmd: "sh", Args: []string{"-c", cmd}})) + } + return hooks +} + +// MaxIterationsForWorkflow is the loop cap: the declared maxIterations, else 1 +// (a single generation; verification votes once with no automatic re-run). +func MaxIterationsForWorkflow(wf *api.Workflow) int { + if wf != nil && wf.Verify != nil && wf.Verify.MaxIterations > 0 { + return wf.Verify.MaxIterations + } + return 1 +} + +// ScopeForWorkflow maps the spec verify scope onto the runner scope (default all). +func ScopeForWorkflow(wf *api.Workflow) agent.Scope { + if wf != nil && wf.Verify != nil && wf.Verify.Scope == api.VerifyScopeChanged { + return agent.ScopeChanged + } + return agent.ScopeAll +} diff --git a/pkg/ai/agent/verify/workflow_test.go b/pkg/ai/agent/verify/workflow_test.go new file mode 100644 index 0000000..967e328 --- /dev/null +++ b/pkg/ai/agent/verify/workflow_test.go @@ -0,0 +1,44 @@ +package verify + +import ( + "testing" + + "github.com/flanksource/captain/pkg/ai/agent" + "github.com/flanksource/captain/pkg/api" +) + +func TestHooksForWorkflow(t *testing.T) { + if HooksForWorkflow(nil) != nil { + t.Errorf("nil workflow should yield no hooks") + } + if HooksForWorkflow(&api.Workflow{}) != nil { + t.Errorf("workflow without verify should yield no hooks") + } + + wf := &api.Workflow{Verify: &api.Verify{Commands: []string{"go test ./...", " ", "go vet ./..."}}} + hooks := HooksForWorkflow(wf) + if len(hooks) != 2 { + t.Fatalf("want 2 hooks (blank command skipped), got %d", len(hooks)) + } + named, ok := hooks[0].(interface{ Name() string }) + if !ok || named.Name() != "verify:go test ./..." { + t.Errorf("unexpected first hook %v", hooks[0]) + } +} + +func TestMaxIterationsAndScopeForWorkflow(t *testing.T) { + if got := MaxIterationsForWorkflow(nil); got != 1 { + t.Errorf("nil workflow → 1 iteration, got %d", got) + } + if got := ScopeForWorkflow(nil); got != agent.ScopeAll { + t.Errorf("nil workflow → all scope, got %v", got) + } + + wf := &api.Workflow{Verify: &api.Verify{MaxIterations: 5, Scope: api.VerifyScopeChanged}} + if got := MaxIterationsForWorkflow(wf); got != 5 { + t.Errorf("want 5 iterations, got %d", got) + } + if got := ScopeForWorkflow(wf); got != agent.ScopeChanged { + t.Errorf("want changed scope, got %v", got) + } +} diff --git a/pkg/ai/agent/worktree/enums.go b/pkg/ai/agent/worktree/enums.go new file mode 100644 index 0000000..fd416eb --- /dev/null +++ b/pkg/ai/agent/worktree/enums.go @@ -0,0 +1,114 @@ +package worktree + +import "fmt" + +// WorktreeMerge controls whether PostRun merges the run's branch back into +// Trunk via `wt merge`. These reference the run/verify outcome (Failed/ +// Verified), which commons-db's shell.Worktree does not model, so they live in +// this captain-layer package rather than pkg/api. +type WorktreeMerge string + +const ( + // WorktreeMergeAlways merges unconditionally. + WorktreeMergeAlways WorktreeMerge = "always" + // WorktreeMergeNever never merges (the default — matches Plugin{}'s + // zero-value behaviour of leaving the branch for the caller to handle). + WorktreeMergeNever WorktreeMerge = "never" + // WorktreeMergeOnSuccess merges only when the run completed without error. + WorktreeMergeOnSuccess WorktreeMerge = "onSuccess" + // WorktreeMergeOnVerify merges only when every Verify hook passed. + WorktreeMergeOnVerify WorktreeMerge = "onVerify" +) + +// AllWorktreeMerges lists the merge policies in canonical order. +func AllWorktreeMerges() []WorktreeMerge { + return []WorktreeMerge{WorktreeMergeAlways, WorktreeMergeNever, WorktreeMergeOnSuccess, WorktreeMergeOnVerify} +} + +// Valid reports whether m is a recognised merge policy (including the "" +// default, treated as WorktreeMergeNever). +func (m WorktreeMerge) Valid() bool { + switch m { + case "", WorktreeMergeAlways, WorktreeMergeNever, WorktreeMergeOnSuccess, WorktreeMergeOnVerify: + return true + default: + return false + } +} + +// Validate fails loud on an unknown merge policy, naming the valid set. +func (m WorktreeMerge) Validate() error { + if m.Valid() { + return nil + } + return fmt.Errorf("invalid worktree merge policy %q; want one of: always, never, onSuccess, onVerify", m) +} + +// shouldMerge decides whether PostRun should merge, given the run's outcome. +func (m WorktreeMerge) shouldMerge(failed, verified bool) bool { + switch m { + case WorktreeMergeAlways: + return true + case WorktreeMergeOnSuccess: + return !failed + case WorktreeMergeOnVerify: + return verified + default: // "", WorktreeMergeNever + return false + } +} + +// WorktreeCleanup controls whether PostRun removes the worktree via `wt +// remove`. +type WorktreeCleanup string + +const ( + // WorktreeCleanupAlways removes unconditionally (the default — matches + // Plugin{}'s zero-value behaviour of always tearing down). + WorktreeCleanupAlways WorktreeCleanup = "always" + // WorktreeCleanupNever keeps the worktree for inspection. + WorktreeCleanupNever WorktreeCleanup = "never" + // WorktreeCleanupOnMerge removes only after a merge happened. + WorktreeCleanupOnMerge WorktreeCleanup = "onMerge" + // WorktreeCleanupOnVerify removes only when every Verify hook passed. + WorktreeCleanupOnVerify WorktreeCleanup = "onVerify" +) + +// AllWorktreeCleanups lists the cleanup policies in canonical order. +func AllWorktreeCleanups() []WorktreeCleanup { + return []WorktreeCleanup{WorktreeCleanupAlways, WorktreeCleanupNever, WorktreeCleanupOnMerge, WorktreeCleanupOnVerify} +} + +// Valid reports whether c is a recognised cleanup policy (including the "" +// default, treated as WorktreeCleanupAlways). +func (c WorktreeCleanup) Valid() bool { + switch c { + case "", WorktreeCleanupAlways, WorktreeCleanupNever, WorktreeCleanupOnMerge, WorktreeCleanupOnVerify: + return true + default: + return false + } +} + +// Validate fails loud on an unknown cleanup policy, naming the valid set. +func (c WorktreeCleanup) Validate() error { + if c.Valid() { + return nil + } + return fmt.Errorf("invalid worktree cleanup policy %q; want one of: always, never, onMerge, onVerify", c) +} + +// shouldCleanup decides whether PostRun should remove the worktree, given +// whether a merge happened and whether every Verify hook passed. +func (c WorktreeCleanup) shouldCleanup(merged, verified bool) bool { + switch c { + case WorktreeCleanupNever: + return false + case WorktreeCleanupOnMerge: + return merged + case WorktreeCleanupOnVerify: + return verified + default: // "", WorktreeCleanupAlways + return true + } +} diff --git a/pkg/ai/agent/worktree/enums_test.go b/pkg/ai/agent/worktree/enums_test.go new file mode 100644 index 0000000..9a7c5b8 --- /dev/null +++ b/pkg/ai/agent/worktree/enums_test.go @@ -0,0 +1,86 @@ +package worktree + +import "testing" + +func TestWorktreeMerge_Validate(t *testing.T) { + for _, ok := range AllWorktreeMerges() { + if err := ok.Validate(); err != nil { + t.Errorf("merge policy %q should be valid: %v", ok, err) + } + } + if err := WorktreeMerge("").Validate(); err != nil { + t.Errorf("empty merge policy should be valid (defaults to never): %v", err) + } + if err := WorktreeMerge("sometimes").Validate(); err == nil { + t.Error("unknown merge policy should fail validation") + } +} + +func TestWorktreeMerge_ShouldMerge(t *testing.T) { + cases := []struct { + policy WorktreeMerge + failed bool + verified bool + wantShouldRun bool + }{ + {WorktreeMergeAlways, true, false, true}, + {WorktreeMergeAlways, false, true, true}, + {WorktreeMergeNever, false, true, false}, + {"", false, true, false}, + {WorktreeMergeOnSuccess, false, false, true}, + {WorktreeMergeOnSuccess, true, true, false}, + {WorktreeMergeOnVerify, false, true, true}, + {WorktreeMergeOnVerify, false, false, false}, + } + for _, c := range cases { + if got := c.policy.shouldMerge(c.failed, c.verified); got != c.wantShouldRun { + t.Errorf("%q.shouldMerge(failed=%v, verified=%v) = %v, want %v", c.policy, c.failed, c.verified, got, c.wantShouldRun) + } + } +} + +func TestWorktreeCleanup_Validate(t *testing.T) { + for _, ok := range AllWorktreeCleanups() { + if err := ok.Validate(); err != nil { + t.Errorf("cleanup policy %q should be valid: %v", ok, err) + } + } + if err := WorktreeCleanup("").Validate(); err != nil { + t.Errorf("empty cleanup policy should be valid (defaults to always): %v", err) + } + if err := WorktreeCleanup("sometimes").Validate(); err == nil { + t.Error("unknown cleanup policy should fail validation") + } +} + +func TestWorktreeCleanup_ShouldCleanup(t *testing.T) { + cases := []struct { + policy WorktreeCleanup + merged bool + verified bool + wantShouldRun bool + }{ + {WorktreeCleanupAlways, false, false, true}, + {"", false, false, true}, + {WorktreeCleanupNever, true, true, false}, + {WorktreeCleanupOnMerge, true, false, true}, + {WorktreeCleanupOnMerge, false, true, false}, + {WorktreeCleanupOnVerify, false, true, true}, + {WorktreeCleanupOnVerify, true, false, false}, + } + for _, c := range cases { + if got := c.policy.shouldCleanup(c.merged, c.verified); got != c.wantShouldRun { + t.Errorf("%q.shouldCleanup(merged=%v, verified=%v) = %v, want %v", c.policy, c.merged, c.verified, got, c.wantShouldRun) + } + } +} + +// TestPlugin_PostRunNoopWithoutPreRun checks the PostRun-called-without-PreRun +// guard, which must not invoke `wt` at all (so it passes even when `wt` isn't +// installed). +func TestPlugin_PostRunNoopWithoutPreRun(t *testing.T) { + p := &Plugin{Branch: "unused"} + if err := p.PostRun(nil); err != nil { + t.Errorf("PostRun without a PreRun'd worktree should be a no-op, got: %v", err) + } +} diff --git a/pkg/ai/agent/worktree/worktree.go b/pkg/ai/agent/worktree/worktree.go index 69febdd..a138add 100644 --- a/pkg/ai/agent/worktree/worktree.go +++ b/pkg/ai/agent/worktree/worktree.go @@ -1,79 +1,166 @@ -// Package worktree provides an agent.SetupPlugin that runs an AI agent inside a -// throwaway git worktree: it creates the worktree before the loop (pointing the -// run's Cwd at it) and, on teardown, captures the diff, optionally commits, and -// removes the worktree. +// Package worktree provides PreRun/PostRun hooks that isolate an agent run in a +// git worktree — a thin wrapper around the `wt` CLI (worktrunk.dev): PreRun +// switches to (creating) a worktree on a fresh branch, pointing the run's +// Workspace at it; PostRun optionally merges the branch back into Trunk and/or +// removes the worktree, gated by Merge/Cleanup and the run's outcome +// (HookContext.Failed / HookContext.Verified). Captain implements no git logic +// itself here — `wt` does; captain only decides when to call it. package worktree import ( + "encoding/json" "fmt" + "strings" "github.com/flanksource/captain/pkg/ai/agent" - "github.com/flanksource/captain/pkg/git" + "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/clicky/exec" ) -// Plugin isolates an agent run in a git worktree. +// Plugin isolates an agent run in a git worktree managed by the `wt` CLI. type Plugin struct { - Repo string // repo root; defaults to RunContext.Repo when empty - Branch string // new branch name (required) - Base string // base ref; HEAD when empty - CommitMsg string // when set, the GENERIC commit path: commit all changes on teardown - KeepOnExit bool // keep the worktree + branch for inspection instead of removing + Repo string // repo root; defaults to Workspace.Repo when empty + Branch string // new branch name (required) + Base string // base ref for the new branch; wt's default branch when empty + // Trunk is the `wt merge` target branch; wt's default branch when empty + // (wt resolves this itself, which is more robust than hardcoding "main"). + Trunk string - Result *Result -} + Merge WorktreeMerge + Cleanup WorktreeCleanup -// Result records what the run produced. Populated on teardown. -type Result struct { - Path string - Branch string - Diff string - Commit string + path string // resolved worktree path, set in PreRun } func (p *Plugin) Name() string { return "worktree" } -// Setup creates the worktree, points the run at it, and returns the teardown. -func (p *Plugin) Setup(rc *agent.RunContext) (func() error, error) { +// switchResult is the shape of `wt switch --format=json`'s stdout. +type switchResult struct { + Branch string `json:"branch"` + Path string `json:"path"` + BaseBranch string `json:"base_branch"` +} + +// PreRun creates (or switches to) the worktree and points the run's Workspace +// at it, via `wt switch --create`. +func (p *Plugin) PreRun(hc *agent.HookContext) error { + ws := hc.Workspace() repo := p.Repo if repo == "" { - repo = rc.Repo + repo = ws.Repo } if repo == "" { - return nil, fmt.Errorf("worktree: Repo is required (set Plugin.Repo or Runner.Repo)") + return fmt.Errorf("worktree: Repo is required (set Plugin.Repo or Runner.Repo)") } if p.Branch == "" { - return nil, fmt.Errorf("worktree: Branch is required") + return fmt.Errorf("worktree: Branch is required") } - path, err := git.WorktreeAdd(repo, p.Branch, p.Base) - if err != nil { - return nil, err + args := []string{"switch", "--create", p.Branch, "--no-cd", "--format=json"} + if p.Base != "" { + args = append(args, "--base", p.Base) + } + res := exec.NewExec("wt", args...).WithCwd(repo).Run().Result() + if res.Error != nil { + return fmt.Errorf("wt switch --create %s: %w: %s", p.Branch, res.Error, strings.TrimSpace(res.Stderr)) } + var sw switchResult + if err := json.Unmarshal([]byte(strings.TrimSpace(res.Stdout)), &sw); err != nil { + return fmt.Errorf("wt switch --create %s: parse JSON result: %w (stdout=%q)", p.Branch, err, res.Stdout) + } + + p.path = sw.Path + ws.Repo = repo + ws.Cwd = sw.Path + ws.Branch = p.Branch + ws.Base = sw.BaseBranch + return nil +} - rc.Repo = repo - rc.Cwd = path - rc.Metadata["worktree"] = path - if p.Result == nil { - p.Result = &Result{} +// mergeResult is the shape of `wt merge --format=json`'s stdout. +type mergeResult struct { + Target string `json:"target"` +} + +// PostRun merges the run's branch into Trunk and/or removes the worktree, +// gated by Merge/Cleanup and the run's outcome (hc.Failed / hc.Verified). +func (p *Plugin) PostRun(hc *agent.HookContext) error { + if p.path == "" { + return nil // PreRun never ran (or failed before creating a worktree) + } + ws := hc.Workspace() + if diff, err := gitDiff(p.path); err == nil { + ws.Diff = diff } - p.Result.Path = path - p.Result.Branch = p.Branch - teardown := func() error { - if diff, derr := git.Diff(path); derr == nil { - p.Result.Diff = diff - } - if p.CommitMsg != "" { - sha, cerr := git.Commit(path, p.CommitMsg) - if cerr != nil { - return cerr - } - p.Result.Commit = sha - } - if p.KeepOnExit { - return nil + merged := false + if p.Merge.shouldMerge(hc.Failed, hc.Verified) { + target, err := p.merge() + if err != nil { + return err } - return git.WorktreeRemove(repo, path) + merged = true + p.recordMergeCommit(ws, target) + } + + if p.Cleanup.shouldCleanup(merged, hc.Verified) { + return p.remove(ws.Repo) + } + return nil +} + +// merge runs `wt merge`, always passing --no-remove so Cleanup independently +// decides whether the worktree is removed. Returns the resolved target branch. +func (p *Plugin) merge() (string, error) { + args := []string{"merge", "--no-remove", "--format=json"} + if p.Trunk != "" { + args = append(args, p.Trunk) + } + res := exec.NewExec("wt", args...).WithCwd(p.path).Run().Result() + if res.Error != nil { + return "", fmt.Errorf("wt merge %s: %w: %s", p.Branch, res.Error, strings.TrimSpace(res.Stderr)) + } + var mr mergeResult + if err := json.Unmarshal([]byte(strings.TrimSpace(res.Stdout)), &mr); err != nil { + return "", fmt.Errorf("wt merge %s: parse JSON result: %w (stdout=%q)", p.Branch, err, res.Stdout) + } + return mr.Target, nil +} + +// recordMergeCommit best-effort captures the merge commit's sha/message from +// the repo's target branch — a plain git read, since `wt merge`'s JSON result +// carries no commit metadata. +func (p *Plugin) recordMergeCommit(ws *api.Workspace, target string) { + if target == "" || ws.Repo == "" { + return + } + res := exec.NewExec("git", "log", "-1", target, "--format=%H%x00%s").WithCwd(ws.Repo).Run().Result() + if res.Error != nil { + return + } + sha, message, ok := strings.Cut(strings.TrimSpace(res.Stdout), "\x00") + if !ok { + return + } + ws.AddCommit(sha, message) +} + +// remove runs `wt remove` to delete the worktree (and, when merged/safe, its +// branch). +func (p *Plugin) remove(repo string) error { + res := exec.NewExec("wt", "remove", p.Branch, "--format=json").WithCwd(repo).Run().Result() + if res.Error != nil { + return fmt.Errorf("wt remove %s: %w: %s", p.Branch, res.Error, strings.TrimSpace(res.Stderr)) + } + return nil +} + +// gitDiff is the one plain-git read this wrapper performs directly: `wt` +// exposes no command that returns the full uncommitted diff as text. +func gitDiff(dir string) (string, error) { + res := exec.NewExec("git", "diff", "HEAD").WithCwd(dir).Run().Result() + if res.Error != nil { + return "", res.Error } - return teardown, nil + return res.Stdout, nil } diff --git a/pkg/ai/agent_test.go b/pkg/ai/agent_test.go index bbfa969..efb252d 100644 --- a/pkg/ai/agent_test.go +++ b/pkg/ai/agent_test.go @@ -2,6 +2,7 @@ package ai import ( "context" + "encoding/json" "fmt" "testing" @@ -11,16 +12,18 @@ import ( ) type mockProvider struct { - model string - text string - err error - closed bool + model string + text string + err error + closed bool + lastReq Request } func (m *mockProvider) GetModel() string { return m.model } func (m *mockProvider) GetBackend() Backend { return BackendAnthropic } func (m *mockProvider) Close() error { m.closed = true; return nil } func (m *mockProvider) Execute(_ context.Context, req Request) (*Response, error) { + m.lastReq = req if m.err != nil { return nil, m.err } @@ -48,6 +51,17 @@ func TestAgent_ExecutePromptAccruesCost(t *testing.T) { assert.Equal(t, "test-model", costs[0].Model) } +func TestAgent_ExecutePromptForwardsSchemaJSON(t *testing.T) { + mp := &mockProvider{model: "m", text: "out"} + a := NewAgentWithProvider(mp, Config{Model: api.Model{Name: "m"}}) + + schema := json.RawMessage(`{"type":"object","required":["pass"]}`) + _, err := a.ExecutePrompt(context.Background(), PromptRequest{Name: "p", Prompt: "hi", SchemaJSON: schema}) + require.NoError(t, err) + assert.JSONEq(t, string(schema), string(mp.lastReq.Prompt.SchemaJSON), + "PromptRequest.SchemaJSON must be forwarded to the provider request") +} + func TestAgent_ExecutePromptError(t *testing.T) { a := NewAgentWithProvider(&mockProvider{model: "m", err: fmt.Errorf("boom")}, Config{Model: api.Model{Name: "m"}}) resp, err := a.ExecutePrompt(context.Background(), PromptRequest{Name: "p", Prompt: "x"}) diff --git a/pkg/ai/catalog.go b/pkg/ai/catalog.go index a97aa7c..05ccb1f 100644 --- a/pkg/ai/catalog.go +++ b/pkg/ai/catalog.go @@ -19,6 +19,7 @@ type Model struct { Label string // human-friendly menu label Reasoning bool // model honours Effort ContextWindow int // max context tokens, for a usage gauge's denominator + ReleaseDate string // YYYY-MM-DD release date, when known // AgentModel is the model slug passed to the captain backend when it differs // from ID (e.g. menu id "codex-gpt-5-codex" → backend model "gpt-5-codex"). // Empty means use ID. Unused for API backends. @@ -48,31 +49,43 @@ func (m Model) BareID() string { // DefaultModelID is the chat backend's default (captain's NewAnthropic default). // The catalog entry with this ID sets Default: true. -const DefaultModelID = "anthropic/claude-sonnet-4-5" - -// defaultCatalog is the v1 model menu. API entries carry the genkit -// "provider/model" id (kept byte-identical so the web menu and stored-thread -// model ids stay stable); agent entries carry the captain backend explicitly so -// codex slugs (which look like gpt-*) are not misrouted. +const DefaultModelID = "anthropic/claude-sonnet-5" + +// defaultCatalog is the model menu: only the latest generally-available model +// per tier for each provider — no preview or superseded entries. API entries +// carry the genkit "provider/model" id (kept byte-identical so the web menu and +// stored-thread model ids stay stable); agent entries carry the captain backend +// explicitly so codex slugs (which look like gpt-*) are not misrouted. +// +// Provider currency (reviewed 2026-07-02): +// - Anthropic: Fable 5 (most capable), Opus 4.8, Sonnet 5, Haiku 4.5. Mythos 5 +// is Project Glasswing invite-only, so it is intentionally excluded. +// - OpenAI: GPT-5.5 (flagship) and GPT-5.4 mini. GPT-5.6 is preview-only. +// - Google: keep recent Pro and Flash families visible separately so a newer +// Flash model does not hide recent Pro entries. var defaultCatalog = []Model{ - {ID: "anthropic/claude-sonnet-4-6", Backend: BackendAnthropic, Label: "Claude Sonnet 4.6", Reasoning: true, ContextWindow: 200000}, - {ID: "anthropic/claude-opus-4-8", Backend: BackendAnthropic, Label: "Claude Opus 4.8", Reasoning: true, ContextWindow: 200000}, - {ID: "anthropic/claude-haiku-4-5", Backend: BackendAnthropic, Label: "Claude Haiku 4.5", Reasoning: true, ContextWindow: 200000}, - {ID: "anthropic/claude-sonnet-4-5", Backend: BackendAnthropic, Label: "Claude Sonnet 4.5", Reasoning: true, ContextWindow: 200000, Default: true}, - {ID: "anthropic/claude-opus-4-1", Backend: BackendAnthropic, Label: "Claude Opus 4.1", Reasoning: true, ContextWindow: 200000}, - {ID: "anthropic/claude-3-5-haiku-latest", Backend: BackendAnthropic, Label: "Claude 3.5 Haiku", Reasoning: false, ContextWindow: 200000}, - {ID: "openai/gpt-4o", Backend: BackendOpenAI, Label: "GPT-4o", Reasoning: false, ContextWindow: 128000}, - {ID: "openai/o3", Backend: BackendOpenAI, Label: "OpenAI o3", Reasoning: true, ContextWindow: 200000}, - {ID: "openai/o4-mini", Backend: BackendOpenAI, Label: "OpenAI o4-mini", Reasoning: true, ContextWindow: 200000}, - {ID: "googleai/gemini-2.5-pro", Backend: BackendGemini, Label: "Gemini 2.5 Pro", Reasoning: true, ContextWindow: 1048576}, - {ID: "googleai/gemini-2.5-flash", Backend: BackendGemini, Label: "Gemini 2.5 Flash", Reasoning: true, ContextWindow: 1048576}, + {ID: "anthropic/claude-fable-5", Backend: BackendAnthropic, Label: "Claude Fable 5", Reasoning: true, ContextWindow: 1000000, ReleaseDate: "2026-06-15"}, + {ID: "anthropic/claude-opus-4-8", Backend: BackendAnthropic, Label: "Claude Opus 4.8", Reasoning: true, ContextWindow: 1000000, ReleaseDate: "2026-04-15"}, + {ID: "anthropic/claude-sonnet-5", Backend: BackendAnthropic, Label: "Claude Sonnet 5", Reasoning: true, ContextWindow: 1000000, ReleaseDate: "2026-05-20", Default: true}, + {ID: "anthropic/claude-haiku-4-5", Backend: BackendAnthropic, Label: "Claude Haiku 4.5", Reasoning: true, ContextWindow: 200000, ReleaseDate: "2025-10-15"}, + {ID: "openai/gpt-5.5", Backend: BackendOpenAI, Label: "GPT-5.5", Reasoning: true, ContextWindow: 1000000, ReleaseDate: "2026-06-01"}, + {ID: "openai/gpt-5.4-mini", Backend: BackendOpenAI, Label: "GPT-5.4 mini", Reasoning: true, ContextWindow: 400000, ReleaseDate: "2026-05-15"}, + {ID: "googleai/gemini-2.5-pro", Backend: BackendGemini, Label: "Gemini 2.5 Pro", Reasoning: true, ContextWindow: 1048576, ReleaseDate: "2025-06-17"}, + {ID: "googleai/gemini-3.0-pro", Backend: BackendGemini, Label: "Gemini 3.0 Pro", Reasoning: true, ContextWindow: 1048576}, + {ID: "googleai/gemini-3.5-flash", Backend: BackendGemini, Label: "Gemini 3.5 Flash", Reasoning: true, ContextWindow: 1048576, ReleaseDate: "2026-06-10"}, + // DeepSeek is OpenAI-compatible; deepseek-chat is the non-thinking model and + // deepseek-reasoner is the thinking model (reasoning selected by model, not + // effort). IDs are stable aliases that always resolve to DeepSeek's latest. + {ID: "deepseek/deepseek-chat", Backend: BackendDeepSeek, Label: "DeepSeek Chat", ContextWindow: 131072}, + {ID: "deepseek/deepseek-reasoner", Backend: BackendDeepSeek, Label: "DeepSeek Reasoner", Reasoning: true, ContextWindow: 131072}, // Agent-framework models (captain pkg/ai StreamingProvider). These run a - // supervised local subprocess that owns its own tools. - {ID: "claude-agent-sonnet", Backend: BackendClaudeAgent, Label: "Claude Agent · Sonnet", Reasoning: true, ContextWindow: 200000}, - {ID: "claude-agent-opus", Backend: BackendClaudeAgent, Label: "Claude Agent · Opus", Reasoning: true, ContextWindow: 200000}, - {ID: "claude-agent-haiku", Backend: BackendClaudeAgent, Label: "Claude Agent · Haiku", Reasoning: true, ContextWindow: 200000}, - {ID: "codex-gpt-5-codex", Backend: BackendCodexCLI, AgentModel: "gpt-5-codex", Label: "Codex · GPT-5", Reasoning: true, ContextWindow: 400000}, + // supervised local subprocess that owns its own tools. IDs are tier aliases + // (not version-pinned), so they always resolve to the installed CLI's latest. + {ID: "claude-agent-sonnet", Backend: BackendClaudeAgent, Label: "Claude Agent · Sonnet", Reasoning: true, ContextWindow: 1000000, ReleaseDate: "2026-05-20"}, + {ID: "claude-agent-opus", Backend: BackendClaudeAgent, Label: "Claude Agent · Opus", Reasoning: true, ContextWindow: 1000000, ReleaseDate: "2026-04-15"}, + {ID: "claude-agent-haiku", Backend: BackendClaudeAgent, Label: "Claude Agent · Haiku", Reasoning: true, ContextWindow: 200000, ReleaseDate: "2025-10-15"}, + {ID: "codex-gpt-5-codex", Backend: BackendCodexCLI, AgentModel: "gpt-5-codex", Label: "Codex · GPT-5", Reasoning: true, ContextWindow: 400000, ReleaseDate: "2025-08-07"}, } var ( @@ -165,6 +178,7 @@ func normalizeModels(models []Model, rejectDuplicateIDs bool) ([]Model, error) { func normalizeModel(model Model) (Model, error) { model.ID = strings.TrimSpace(model.ID) model.Label = strings.TrimSpace(model.Label) + model.ReleaseDate = strings.TrimSpace(model.ReleaseDate) if model.ID == "" { return Model{}, fmt.Errorf("model ID is required") } @@ -177,6 +191,13 @@ func normalizeModel(model Model) (Model, error) { if model.Label == "" { model.Label = model.ID } + if model.ReleaseDate != "" { + normalized := normalizeReleaseDate(model.ReleaseDate) + if normalized == "" { + return Model{}, fmt.Errorf("model %q has invalid release date %q; want YYYY-MM-DD", model.ID, model.ReleaseDate) + } + model.ReleaseDate = normalized + } return model, nil } diff --git a/pkg/ai/catalog_info.go b/pkg/ai/catalog_info.go index a607ed0..2854f60 100644 --- a/pkg/ai/catalog_info.go +++ b/pkg/ai/catalog_info.go @@ -29,6 +29,8 @@ func BackendToProvider(b Backend) string { return "openai" case BackendGemini: return "googleai" + case BackendDeepSeek: + return "deepseek" default: return string(b) } @@ -66,9 +68,9 @@ func CatalogInfo(configuredProviders []string) []ModelInfo { // claude-cli need `tsx` on PATH. A turn still fails loud if the probe is wrong. func agentBackendAvailable(b Backend) bool { switch b { - case BackendCodexCLI: + case BackendCodexCLI, BackendCodexCmux: return binaryOnPath("codex") - case BackendClaudeAgent, BackendClaudeCLI: + case BackendClaudeAgent, BackendClaudeCLI, BackendClaudeCmux: return binaryOnPath("tsx") default: return false diff --git a/pkg/ai/catalog_info_test.go b/pkg/ai/catalog_info_test.go index 4da7a3d..bf5873a 100644 --- a/pkg/ai/catalog_info_test.go +++ b/pkg/ai/catalog_info_test.go @@ -7,6 +7,7 @@ func TestBackendToProvider(t *testing.T) { BackendAnthropic: "anthropic", BackendOpenAI: "openai", BackendGemini: "googleai", + BackendDeepSeek: "deepseek", BackendClaudeAgent: "claude-agent", BackendCodexCLI: "codex-cli", } diff --git a/pkg/ai/catalog_resolve.go b/pkg/ai/catalog_resolve.go index 6f4ff35..9eb53bf 100644 --- a/pkg/ai/catalog_resolve.go +++ b/pkg/ai/catalog_resolve.go @@ -59,7 +59,7 @@ var liveModelFetcher = func(ctx context.Context, b Backend) ([]ModelDef, error) } // apiBackends are the direct-API backends the resolver can list live. -var apiBackends = []Backend{BackendAnthropic, BackendOpenAI, BackendGemini} +var apiBackends = []Backend{BackendAnthropic, BackendOpenAI, BackendGemini, BackendDeepSeek} // ResolveModels returns the merged catalog ∪ live-API view for opts, joined to // merged OpenRouter/static pricing and persisted to ~/.config/captain/models.json. @@ -167,7 +167,7 @@ func unionLive(ctx context.Context, backend Backend, rows *[]ResolvedModel, inde } index[key] = len(*rows) *rows = append(*rows, ResolvedModel{ - Model: Model{ID: d.ID, Backend: b, Label: d.Name}, + Model: Model{ID: d.ID, Backend: b, Label: d.Name, ReleaseDate: d.ReleaseDate}, Live: true, }) } @@ -185,7 +185,7 @@ func filterResolved(rows []ResolvedModel, filter string) []ResolvedModel { if !strings.Contains(strings.ToLower(r.ID), fl) && !strings.Contains(strings.ToLower(r.Label), fl) { continue } - } else if isLegacyModelID(r.ID) { + } else if IsLegacyModelIDForBackend(r.ID, r.Backend) { continue } out = append(out, r) @@ -235,7 +235,7 @@ func AgentCatalogModels(b Backend) []ModelDef { if label == "" { label = id } - out = append(out, ModelDef{ID: id, Name: label, Backend: b}) + out = append(out, ModelDef{ID: id, Name: label, Backend: b, ReleaseDate: m.ReleaseDate}) } sort.SliceStable(out, func(i, j int) bool { return out[i].ID < out[j].ID }) return out @@ -268,54 +268,8 @@ func orPrefix(backend Backend) string { return "anthropic" case BackendGemini: return "google" + case BackendDeepSeek: + return "deepseek" } return "" } - -// legacyModelPrefixes hides model IDs that are superseded by a newer generation -// or aren't chat completions (image/audio/embedding/moderation). Shared by -// `ai models` and the `configure` picker. An explicit --filter overrides it. -var legacyModelPrefixes = []string{ - // OpenAI legacy - "gpt-3", - "gpt-4", // covers gpt-4, gpt-4o, gpt-4.1, gpt-4-turbo, ... - "gpt-5-", // hides gpt-5 variants (mini, nano, codex, pro) but keeps bare "gpt-5", "gpt-5.1/.2/.3" - "o1", - "o3-", - "codex-mini", - // OpenAI non-chat endpoints - "dall-", - "whisper", - "tts-", - "text-embedding", - "text-moderation", - "omni-moderation", - "babbage", - "davinci", - "chatgpt-", - "computer-use-preview", - // Claude legacy (3.x and earlier 4-line latests/dated) - "claude-3", - "claude-2", - "claude-instant", - "claude-sonnet-4-0", - "claude-sonnet-4-2", - "claude-opus-4-0", - "claude-opus-4-1", - // Gemini legacy - "gemini-1", - "gemini-2.0", - // Grok legacy - "grok-3", - "grok-code-fast-1", -} - -func isLegacyModelID(id string) bool { - idLower := strings.ToLower(id) - for _, p := range legacyModelPrefixes { - if strings.HasPrefix(idLower, p) { - return true - } - } - return false -} diff --git a/pkg/ai/catalog_resolve_test.go b/pkg/ai/catalog_resolve_test.go index f2f6684..9076bfd 100644 --- a/pkg/ai/catalog_resolve_test.go +++ b/pkg/ai/catalog_resolve_test.go @@ -60,8 +60,8 @@ func TestResolveModels_TokensUnionDedup(t *testing.T) { return nil, nil } return []ModelDef{ - {ID: "claude-sonnet-4-5", Backend: BackendAnthropic}, // dedups with catalog anthropic/claude-sonnet-4-5 - {ID: "claude-new-xyz", Backend: BackendAnthropic}, // net-new live model + {ID: "claude-sonnet-5", Backend: BackendAnthropic}, // dedups with catalog anthropic/claude-sonnet-5 + {ID: "claude-new-xyz", Backend: BackendAnthropic}, // net-new live model }, nil }) t.Setenv("ANTHROPIC_API_KEY", "k") // after stub clears the key set @@ -71,7 +71,7 @@ func TestResolveModels_TokensUnionDedup(t *testing.T) { t.Fatalf("ResolveModels: %v", err) } - catalogRow, ok := hasModelID(rows, "anthropic/claude-sonnet-4-5") + catalogRow, ok := hasModelID(rows, "anthropic/claude-sonnet-5") if !ok || !catalogRow.Live { t.Fatalf("catalog row should survive and be marked Live: %+v ok=%v", catalogRow, ok) } @@ -80,15 +80,15 @@ func TestResolveModels_TokensUnionDedup(t *testing.T) { t.Fatalf("net-new live model missing/!Live: %+v ok=%v", liveRow, ok) } - // No duplicate (backend, bareID) for claude-sonnet-4-5. + // No duplicate (backend, bareID) for claude-sonnet-5. bareCount := 0 for _, r := range rows { - if r.Backend == BackendAnthropic && r.BareID() == "claude-sonnet-4-5" { + if r.Backend == BackendAnthropic && r.BareID() == "claude-sonnet-5" { bareCount++ } } if bareCount != 1 { - t.Fatalf("claude-sonnet-4-5 appears %d times, want deduped to 1", bareCount) + t.Fatalf("claude-sonnet-5 appears %d times, want deduped to 1", bareCount) } } diff --git a/pkg/ai/catalog_test.go b/pkg/ai/catalog_test.go index 18ad525..1e1d2e5 100644 --- a/pkg/ai/catalog_test.go +++ b/pkg/ai/catalog_test.go @@ -119,4 +119,73 @@ func TestRegisterModelValidation(t *testing.T) { if err := RegisterModel(Model{ID: "x/y", Backend: Backend("nonsense")}); err == nil { t.Fatal("expected error for invalid Backend") } + if err := RegisterModel(Model{ID: "x/y", Backend: BackendOpenAI, ReleaseDate: "not-a-date"}); err == nil { + t.Fatal("expected error for invalid release date") + } +} + +func TestCatalogReleaseDateMatchesBareAndRuntimeIDs(t *testing.T) { + t.Cleanup(ResetModelCatalog) + + if err := SetModelCatalog([]Model{ + {ID: "openai/gpt-test", Backend: BackendOpenAI, ReleaseDate: "2026-01-02"}, + {ID: "codex-gpt-test", Backend: BackendCodexCLI, AgentModel: "gpt-test-runtime", ReleaseDate: "2026-03-04"}, + }); err != nil { + t.Fatalf("SetModelCatalog: %v", err) + } + + if got := CatalogReleaseDate(BackendOpenAI, "gpt-test"); got != "2026-01-02" { + t.Fatalf("bare API release date = %q", got) + } + if got := CatalogReleaseDate(BackendCodexCLI, "gpt-test-runtime"); got != "2026-03-04" { + t.Fatalf("agent runtime release date = %q", got) + } +} + +func TestCurrentModelsByReleaseDateFiltersAndSorts(t *testing.T) { + models := []ModelDef{ + {ID: "claude-sonnet-5", Backend: BackendAnthropic, ReleaseDate: "2026-06-01"}, + {ID: "claude-sonnet-4-6", Backend: BackendAnthropic, ReleaseDate: "2026-05-01"}, + {ID: "claude-sonnet-4-5", Backend: BackendAnthropic, ReleaseDate: "2026-04-01"}, + {ID: "claude-sonnet-4-4", Backend: BackendAnthropic, ReleaseDate: "2026-03-01"}, + {ID: "claude-haiku-4-5", Backend: BackendAnthropic, ReleaseDate: "2025-10-15"}, + {ID: "gemini-3.0-pro", Backend: BackendGemini}, + {ID: "gpt-4o", Backend: BackendOpenAI, ReleaseDate: "2026-04-01"}, + {ID: "gpt-5-codex", Backend: BackendCodexCLI, ReleaseDate: "2026-03-01"}, + } + + got := CurrentModelsByReleaseDate(models) + want := []string{ + "claude-sonnet-5", + "claude-sonnet-4-6", + "claude-sonnet-4-5", + "gpt-5-codex", + "claude-haiku-4-5", + "gemini-3.0-pro", + } + if len(got) != len(want) { + t.Fatalf("len = %d, want %d: %+v", len(got), len(want), got) + } + for i, w := range want { + if got[i].ID != w { + t.Errorf("got[%d].ID = %q, want %q", i, got[i].ID, w) + } + } +} + +func TestModelFamilyPrefix(t *testing.T) { + cases := map[string]string{ + "anthropic/claude-haiku-4-5": "claude-haiku", + "claude-agent-sonnet": "claude-agent-sonnet", + "googleai/gemini-3.0-pro": "gemini-pro", + "gemini-3.5-flash": "gemini-flash", + "gemini-2.5-flash-lite": "gemini-flash-lite", + "openai/gpt-5.4-mini": "gpt-mini", + "openai/gpt-5.5": "gpt", + } + for id, want := range cases { + if got := ModelFamilyPrefix(id); got != want { + t.Errorf("ModelFamilyPrefix(%q) = %q, want %q", id, got, want) + } + } } diff --git a/pkg/ai/client.go b/pkg/ai/client.go index 32df732..2c7a6ee 100644 --- a/pkg/ai/client.go +++ b/pkg/ai/client.go @@ -1,7 +1,13 @@ package ai import ( + "errors" + "fmt" + "strings" + + "github.com/flanksource/captain/pkg/ai/pricing" "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/captain/pkg/collections" ) // The provider registry now lives in pkg/api (the stable runtime contract). @@ -16,9 +22,51 @@ func RegisterProvider(backend Backend, factory ProviderFactory) { api.RegisterProvider(backend, factory) } -// NewProvider constructs the registered provider for cfg's backend. +// NewProvider constructs the registered provider for cfg's backend. When the model +// name is unrecognized, the error is enriched with the closest known model names +// ("did you mean …"). When cfg.Model resolves to more than one candidate (a +// comma-separated Name or a Fallbacks list), a fallback provider is returned that +// tries each in order on a retryable failure. func NewProvider(cfg Config) (Provider, error) { - return api.NewProvider(cfg) + candidates := cfg.Model.Candidates() + cfg.Model = candidates[0] + if len(candidates) > 1 { + return newFallbackProvider(cfg, candidates), nil + } + p, err := api.NewProvider(cfg) + if err != nil { + return nil, suggestModelName(err, cfg.Model.Name) + } + return p, nil +} + +// suggestModelName appends the closest catalog model ids to an unresolvable-model +// error, so e.g. "claud-sonnet-4" points at "claude-sonnet-4". +func suggestModelName(err error, model string) error { + if model == "" || !errors.Is(err, api.ErrInferBackend) { + return err + } + // Candidates are the catalog base names ("claude-sonnet-5"), which is the form + // users type — the prefixed id ("anthropic/claude-sonnet-5") is far in edit + // distance from a bare typo — plus the pricing registry's ids for broader + // coverage (loaded from its disk cache; degrades to catalog-only if absent). + var candidates []string + for _, id := range modelIDsFrom(Catalog()) { + if i := strings.LastIndex(id, "/"); i >= 0 { + candidates = append(candidates, id[i+1:]) + } else { + candidates = append(candidates, id) + } + } + pricing.EnsureLoaded() + for _, mi := range pricing.ListModels("") { + candidates = append(candidates, mi.ModelID) + } + similar := collections.FindSimilar(model, candidates, 3) + if len(similar) == 0 { + return err + } + return fmt.Errorf("%w; did you mean: %s", err, strings.Join(similar, ", ")) } // GetAPIKeyFromEnv returns the first non-empty value among a backend's auth env vars. diff --git a/pkg/ai/context_logger.go b/pkg/ai/context_logger.go new file mode 100644 index 0000000..4c7fcd6 --- /dev/null +++ b/pkg/ai/context_logger.go @@ -0,0 +1,28 @@ +package ai + +import ( + "context" + + "github.com/flanksource/commons/logger" +) + +// contextLoggerKey is captain's own context key for an attached logger.Logger — +// distinct from commons/context's private logger key, so callers that only hold +// a plain context.Context (not a commons Context) can still carry one (e.g. a +// clicky *task.Task, which implements logger.Logger and buffers into the task's +// own trace log). +type contextLoggerKey struct{} + +// ContextWithLogger attaches log to ctx, retrievable via LoggerFromContext. +func ContextWithLogger(ctx context.Context, log logger.Logger) context.Context { + return context.WithValue(ctx, contextLoggerKey{}, log) +} + +// LoggerFromContext returns the logger attached via ContextWithLogger, or +// fallback when ctx carries none. +func LoggerFromContext(ctx context.Context, fallback logger.Logger) logger.Logger { + if log, ok := ctx.Value(contextLoggerKey{}).(logger.Logger); ok && log != nil { + return log + } + return fallback +} diff --git a/pkg/ai/context_logger_test.go b/pkg/ai/context_logger_test.go new file mode 100644 index 0000000..5a8b0f5 --- /dev/null +++ b/pkg/ai/context_logger_test.go @@ -0,0 +1,39 @@ +package ai + +import ( + "context" + "testing" + + "github.com/flanksource/commons/logger" +) + +func TestLoggerFromContext(t *testing.T) { + attached := logger.GetLogger("ai-context-logger-test-attached") + fallback := logger.GetLogger("ai-context-logger-test-fallback") + + cases := []struct { + name string + ctx context.Context + want logger.Logger + }{ + { + name: "returns the attached logger when one was set", + ctx: ContextWithLogger(context.Background(), attached), + want: attached, + }, + { + name: "returns the fallback when none was attached", + ctx: context.Background(), + want: fallback, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + got := LoggerFromContext(tc.ctx, fallback) + if got != tc.want { + t.Fatalf("LoggerFromContext() = %v, want %v", got, tc.want) + } + }) + } +} diff --git a/pkg/ai/errors.go b/pkg/ai/errors.go index b958c6f..9df99fd 100644 --- a/pkg/ai/errors.go +++ b/pkg/ai/errors.go @@ -1,6 +1,9 @@ package ai -import "errors" +import ( + "errors" + "strings" +) var ( ErrBudgetExceeded = errors.New("budget exceeded") @@ -11,3 +14,23 @@ var ( ErrModelNotFound = errors.New("model not found in pricing registry") ErrNoAPIKey = errors.New("API key not found") ) + +// IsRetryable reports whether err is a transient/overload failure worth retrying +// on the same model (see middleware.WithRetry) or falling back to another model +// (see the fallback provider). Provider errors are unstructured strings, so it +// pattern-matches the well-known overload/rate-limit signals; ErrTimeout is +// matched by identity as well. +func IsRetryable(err error) bool { + if err == nil { + return false + } + if errors.Is(err, ErrTimeout) { + return true + } + msg := err.Error() + return strings.Contains(msg, "rate limit") || + strings.Contains(msg, "429") || + strings.Contains(msg, "503") || + strings.Contains(msg, "overloaded") || + strings.Contains(msg, "timeout") +} diff --git a/pkg/ai/errors_test.go b/pkg/ai/errors_test.go new file mode 100644 index 0000000..28b478d --- /dev/null +++ b/pkg/ai/errors_test.go @@ -0,0 +1,32 @@ +package ai + +import ( + "errors" + "fmt" + "testing" +) + +func TestIsRetryable(t *testing.T) { + cases := []struct { + name string + err error + want bool + }{ + {"nil", nil, false}, + {"rate limit", errors.New("openai: rate limit exceeded"), true}, + {"429", errors.New("genkit anthropic generate: 429 Too Many Requests"), true}, + {"503", errors.New("upstream returned 503"), true}, + {"overloaded", errors.New("anthropic: model overloaded, please retry"), true}, + {"timeout text", errors.New("request timeout after 30s"), true}, + {"ErrTimeout identity", fmt.Errorf("dispatch: %w", ErrTimeout), true}, + {"schema validation", ErrSchemaValidation, false}, + {"plain error", errors.New("invalid prompt: missing user"), false}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + if got := IsRetryable(tc.err); got != tc.want { + t.Errorf("IsRetryable(%v) = %v, want %v", tc.err, got, tc.want) + } + }) + } +} diff --git a/pkg/ai/fallback.go b/pkg/ai/fallback.go new file mode 100644 index 0000000..070d0f2 --- /dev/null +++ b/pkg/ai/fallback.go @@ -0,0 +1,254 @@ +package ai + +import ( + "context" + "errors" + "fmt" + "sync" + + "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/commons/logger" +) + +// fallbackLog reports fallback transitions (a candidate being skipped or retried). +var fallbackLog = logger.GetLogger("ai") + +// fallbackProvider tries an ordered list of candidate models, advancing to the +// next when the current one fails with a retryable error or its provider cannot be +// constructed. Providers are built lazily and cached. GetModel/GetBackend report +// the active (last-selected) candidate. It implements StreamingProvider; a +// streaming candidate is abandoned in favour of the next only while it has not yet +// emitted any content (see ExecuteStream). +type fallbackProvider struct { + base Config // shared Config; Model is swapped per candidate + candidates []api.Model // ordered, len >= 2 (primary first) + build func(Config) (Provider, error) + + mu sync.Mutex + built []Provider // lazily filled, len == len(candidates) + active int +} + +func newFallbackProvider(base Config, candidates []api.Model) *fallbackProvider { + return &fallbackProvider{ + base: base, + candidates: candidates, + build: api.NewProvider, + built: make([]Provider, len(candidates)), + } +} + +// cfgFor projects the shared Config onto candidate i. Non-primary candidates drop +// the primary's explicit APIKey so a cross-backend fallback resolves its own key +// from the environment (a --api-key meant for the primary must not be sent to a +// different backend). +func (f *fallbackProvider) cfgFor(i int) Config { + cfg := f.base + cfg.Model = f.candidates[i] + if i > 0 { + cfg.APIKey = "" + } + return cfg +} + +// providerAt lazily constructs and caches the provider for candidate i. +func (f *fallbackProvider) providerAt(i int) (Provider, error) { + f.mu.Lock() + defer f.mu.Unlock() + if f.built[i] != nil { + return f.built[i], nil + } + p, err := f.build(f.cfgFor(i)) + if err != nil { + return nil, err + } + f.built[i] = p + return p, nil +} + +func (f *fallbackProvider) setActive(i int) { + f.mu.Lock() + f.active = i + f.mu.Unlock() +} + +func (f *fallbackProvider) GetModel() string { + f.mu.Lock() + defer f.mu.Unlock() + return f.candidates[f.active].Name +} + +func (f *fallbackProvider) GetBackend() Backend { + f.mu.Lock() + m := f.candidates[f.active] + f.mu.Unlock() + if m.Backend != "" { + return m.Backend + } + b, _ := InferBackend(m.Name) + return b +} + +// Execute runs the primary and, on a retryable failure or a construction error, +// each fallback in turn. A non-retryable runtime error stops immediately (another +// model will not fix a malformed request). When nothing succeeds the primary's +// error is returned, as the most actionable one. +func (f *fallbackProvider) Execute(ctx context.Context, req Request) (*Response, error) { + var firstErr error + record := func(err error) { + if firstErr == nil { + firstErr = err + } + } + for i := range f.candidates { + p, err := f.providerAt(i) + if err != nil { + fallbackLog.Warnf("fallback: model %s unavailable (%v)", f.candidates[i].Name, err) + record(err) + continue + } + f.setActive(i) + resp, err := p.Execute(ctx, req) + if err == nil { + return resp, nil + } + record(err) + if !IsRetryable(err) { + return resp, err + } + if i < len(f.candidates)-1 { + fallbackLog.Warnf("fallback: model %s failed (%v); trying %s", + f.candidates[i].Name, err, f.candidates[i+1].Name) + } + } + return nil, firstErr +} + +// ExecuteStream streams the first candidate that produces output. A candidate is +// abandoned for the next only while it has not yet emitted a content event: an +// EventError (or a silent close) before any content advances to the next model; +// once content has been forwarded the stream is committed and any later error is +// surfaced to the caller. +func (f *fallbackProvider) ExecuteStream(ctx context.Context, req Request) (<-chan Event, error) { + out := make(chan Event) + go func() { + defer close(out) + var firstErr error + record := func(err error) { + if firstErr == nil { + firstErr = err + } + } + emit := func(err error) { sendEvent(ctx, out, Event{Kind: EventError, Error: err.Error()}) } + + for i := range f.candidates { + last := i == len(f.candidates)-1 + + p, err := f.providerAt(i) + if err != nil { + fallbackLog.Warnf("fallback: model %s unavailable (%v)", f.candidates[i].Name, err) + record(err) + continue + } + sp, ok := p.(StreamingProvider) + if !ok { + record(fmt.Errorf("model %s backend does not support streaming", f.candidates[i].Name)) + continue + } + f.setActive(i) + + ch, err := sp.ExecuteStream(ctx, req) + if err != nil { + record(err) + if IsRetryable(err) && !last { + fallbackLog.Warnf("fallback: model %s failed (%v); trying %s", + f.candidates[i].Name, err, f.candidates[i+1].Name) + continue + } + emit(err) + return + } + + committed, streamErr := f.pump(ctx, ch, out) + if committed { + return // the committed candidate's events (incl. any terminal error) are already forwarded + } + if streamErr == nil { + streamErr = fmt.Errorf("model %s produced no output", f.candidates[i].Name) + } + record(streamErr) + if IsRetryable(streamErr) && !last { + fallbackLog.Warnf("fallback: model %s failed pre-output (%v); trying %s", + f.candidates[i].Name, streamErr, f.candidates[i+1].Name) + continue + } + emit(streamErr) + return + } + if firstErr != nil { + emit(firstErr) + } + }() + return out, nil +} + +// pump forwards a candidate's stream to out. Leading non-content events (e.g. +// EventSystem session metadata) are buffered until the first content event, at +// which point the buffer is flushed and the stream is "committed" — from then on +// every event, including a terminal error, is forwarded. An EventError (or a +// silent close) before any content leaves the stream uncommitted so the caller can +// try the next candidate; the buffered leading events of a discarded candidate are +// dropped, never forwarded. It returns whether the stream committed and, when it +// did not, the failure that ended it (nil on a silent close). +func (f *fallbackProvider) pump(ctx context.Context, ch <-chan Event, out chan<- Event) (bool, error) { + var buffered []Event + committed := false + for ev := range ch { + if committed { + if !sendEvent(ctx, out, ev) { + return true, nil + } + continue + } + switch { + case ev.Kind == EventError: + return false, errors.New(ev.Error) + case isCommittingEvent(ev.Kind): + committed = true + for _, b := range buffered { + if !sendEvent(ctx, out, b) { + return true, nil + } + } + buffered = nil + if !sendEvent(ctx, out, ev) { + return true, nil + } + default: + buffered = append(buffered, ev) + } + } + return committed, nil +} + +// isCommittingEvent reports whether an event carries content the user has already +// seen, past which point falling back to another model would double up output. +func isCommittingEvent(k EventKind) bool { + switch k { + case EventText, EventThinking, EventToolUse, EventToolResult, EventResult, EventPermission: + return true + default: + return false + } +} + +// sendEvent forwards one event unless ctx is done, returning false when the send +// was abandoned so callers stop pumping instead of leaking on a gone consumer. +func sendEvent(ctx context.Context, out chan<- Event, ev Event) bool { + select { + case out <- ev: + return true + case <-ctx.Done(): + return false + } +} diff --git a/pkg/ai/fallback_test.go b/pkg/ai/fallback_test.go new file mode 100644 index 0000000..311d1aa --- /dev/null +++ b/pkg/ai/fallback_test.go @@ -0,0 +1,171 @@ +package ai + +import ( + "context" + "errors" + "testing" + + "github.com/flanksource/captain/pkg/api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// fakeProv is a scriptable Provider/StreamingProvider used to drive the fallback +// provider's advance logic without a real backend. +type fakeProv struct { + model string + execResp *Response + execErr error + execCalls int + streamEvents []Event + streamErr error + streamCalls int +} + +func (f *fakeProv) GetModel() string { return f.model } +func (f *fakeProv) GetBackend() Backend { return BackendAnthropic } + +func (f *fakeProv) Execute(_ context.Context, _ Request) (*Response, error) { + f.execCalls++ + if f.execErr != nil { + return nil, f.execErr + } + return f.execResp, nil +} + +func (f *fakeProv) ExecuteStream(_ context.Context, _ Request) (<-chan Event, error) { + f.streamCalls++ + if f.streamErr != nil { + return nil, f.streamErr + } + ch := make(chan Event) + go func() { + defer close(ch) + for _, ev := range f.streamEvents { + ch <- ev + } + }() + return ch, nil +} + +// buildFrom returns a builder that resolves each candidate config to a scripted +// provider by model name; a missing name yields a construction error. +func buildFrom(provs map[string]*fakeProv) func(Config) (Provider, error) { + return func(cfg Config) (Provider, error) { + p, ok := provs[cfg.Model.Name] + if !ok { + return nil, errors.New("no provider for " + cfg.Model.Name) + } + return p, nil + } +} + +func newTestFallback(candidates []string, provs map[string]*fakeProv) *fallbackProvider { + models := make([]api.Model, len(candidates)) + for i, name := range candidates { + models[i] = api.Model{Name: name} + } + return &fallbackProvider{ + candidates: models, + build: buildFrom(provs), + built: make([]Provider, len(models)), + } +} + +func drain(ch <-chan Event) []Event { + var out []Event + for ev := range ch { + out = append(out, ev) + } + return out +} + +func TestFallback_Execute_RetryableAdvances(t *testing.T) { + primary := &fakeProv{model: "primary", execErr: errors.New("openai: 429 rate limit")} + fallback := &fakeProv{model: "fallback", execResp: &Response{Text: "ok", Model: "fallback"}} + fp := newTestFallback([]string{"primary", "fallback"}, map[string]*fakeProv{"primary": primary, "fallback": fallback}) + + resp, err := fp.Execute(context.Background(), Request{}) + require.NoError(t, err) + assert.Equal(t, "ok", resp.Text) + assert.Equal(t, "fallback", fp.GetModel()) + assert.Equal(t, 1, primary.execCalls) + assert.Equal(t, 1, fallback.execCalls) +} + +func TestFallback_Execute_NonRetryableStops(t *testing.T) { + primary := &fakeProv{model: "primary", execErr: errors.New("invalid request: missing user")} + fallback := &fakeProv{model: "fallback", execResp: &Response{Text: "ok"}} + fp := newTestFallback([]string{"primary", "fallback"}, map[string]*fakeProv{"primary": primary, "fallback": fallback}) + + _, err := fp.Execute(context.Background(), Request{}) + require.Error(t, err) + assert.Contains(t, err.Error(), "invalid request") + assert.Equal(t, 0, fallback.execCalls, "non-retryable error must not advance to the fallback") +} + +func TestFallback_Execute_BuildFailureAdvances(t *testing.T) { + fallback := &fakeProv{model: "fallback", execResp: &Response{Text: "ok"}} + // "primary" is absent from the map, so its provider fails to build. + fp := newTestFallback([]string{"primary", "fallback"}, map[string]*fakeProv{"fallback": fallback}) + + resp, err := fp.Execute(context.Background(), Request{}) + require.NoError(t, err) + assert.Equal(t, "ok", resp.Text) + assert.Equal(t, 1, fallback.execCalls) +} + +func TestFallback_Execute_AllFailReturnsPrimaryError(t *testing.T) { + primary := &fakeProv{model: "primary", execErr: errors.New("primary 429 overloaded")} + fallback := &fakeProv{model: "fallback", execErr: errors.New("fallback 503 overloaded")} + fp := newTestFallback([]string{"primary", "fallback"}, map[string]*fakeProv{"primary": primary, "fallback": fallback}) + + _, err := fp.Execute(context.Background(), Request{}) + require.Error(t, err) + assert.Contains(t, err.Error(), "primary 429", "the primary's error is the most actionable") +} + +func TestFallback_Stream_PreContentAdvances(t *testing.T) { + primary := &fakeProv{model: "primary", streamEvents: []Event{ + {Kind: EventSystem, SessionID: "primary-session"}, + {Kind: EventError, Error: "429 overloaded"}, + }} + fallback := &fakeProv{model: "fallback", streamEvents: []Event{ + {Kind: EventText, Text: "hello"}, + {Kind: EventResult, Success: true}, + }} + fp := newTestFallback([]string{"primary", "fallback"}, map[string]*fakeProv{"primary": primary, "fallback": fallback}) + + ch, err := fp.ExecuteStream(context.Background(), Request{}) + require.NoError(t, err) + events := drain(ch) + + require.Len(t, events, 2) + assert.Equal(t, EventText, events[0].Kind) + assert.Equal(t, "hello", events[0].Text) + assert.Equal(t, EventResult, events[1].Kind) + for _, ev := range events { + assert.NotEqual(t, "primary-session", ev.SessionID, "discarded candidate's session must not leak") + assert.NotEqual(t, EventError, ev.Kind, "pre-content error must not surface once a fallback succeeds") + } + assert.Equal(t, 1, fallback.streamCalls) +} + +func TestFallback_Stream_CommittedErrorSurfaces(t *testing.T) { + primary := &fakeProv{model: "primary", streamEvents: []Event{ + {Kind: EventText, Text: "partial"}, + {Kind: EventError, Error: "429 mid-stream"}, + }} + fallback := &fakeProv{model: "fallback", streamEvents: []Event{{Kind: EventText, Text: "should-not-run"}}} + fp := newTestFallback([]string{"primary", "fallback"}, map[string]*fakeProv{"primary": primary, "fallback": fallback}) + + ch, err := fp.ExecuteStream(context.Background(), Request{}) + require.NoError(t, err) + events := drain(ch) + + require.Len(t, events, 2) + assert.Equal(t, "partial", events[0].Text) + assert.Equal(t, EventError, events[1].Kind) + assert.Equal(t, "429 mid-stream", events[1].Error) + assert.Equal(t, 0, fallback.streamCalls, "a committed stream must not fall back after emitting content") +} diff --git a/pkg/ai/history/agent_messages.go b/pkg/ai/history/agent_messages.go index 3df577e..f00e6b9 100644 --- a/pkg/ai/history/agent_messages.go +++ b/pkg/ai/history/agent_messages.go @@ -1,9 +1,10 @@ package history import ( - "encoding/json" "fmt" "strings" + + "github.com/segmentio/encoding/json" ) type AgentMessage struct { diff --git a/pkg/ai/history/codex_parser.go b/pkg/ai/history/codex_parser.go index b9faef2..107fcaf 100644 --- a/pkg/ai/history/codex_parser.go +++ b/pkg/ai/history/codex_parser.go @@ -2,7 +2,7 @@ package history import ( "bufio" - "encoding/json" + "github.com/segmentio/encoding/json" "io" "os" "path/filepath" diff --git a/pkg/ai/history/codex_types.go b/pkg/ai/history/codex_types.go index 1fd17b5..381adc4 100644 --- a/pkg/ai/history/codex_types.go +++ b/pkg/ai/history/codex_types.go @@ -1,7 +1,7 @@ package history import ( - "encoding/json" + "github.com/segmentio/encoding/json" "time" ) @@ -113,8 +113,9 @@ type CodexContent struct { } type CodexTokenInfo struct { - TotalTokenUsage CodexTokenUsage `json:"total_token_usage"` - LastTokenUsage CodexTokenUsage `json:"last_token_usage"` + TotalTokenUsage CodexTokenUsage `json:"total_token_usage"` + LastTokenUsage CodexTokenUsage `json:"last_token_usage"` + ModelContextWindow int `json:"model_context_window,omitempty"` } type CodexTokenUsage struct { diff --git a/pkg/ai/history/parser.go b/pkg/ai/history/parser.go index e032739..1f84374 100644 --- a/pkg/ai/history/parser.go +++ b/pkg/ai/history/parser.go @@ -2,7 +2,6 @@ package history import ( "bufio" - "encoding/json" "fmt" "os" "path/filepath" @@ -12,6 +11,7 @@ import ( "github.com/flanksource/commons/collections" "github.com/flanksource/commons/logger" + "github.com/segmentio/encoding/json" ) // log is the package-scoped logger for session-history parsing. Its level diff --git a/pkg/ai/history/session_stream.go b/pkg/ai/history/session_stream.go index 0101305..c032040 100644 --- a/pkg/ai/history/session_stream.go +++ b/pkg/ai/history/session_stream.go @@ -1,6 +1,6 @@ package history -import "encoding/json" +import "github.com/segmentio/encoding/json" // SessionEventKind classifies a streamed event parsed from a Claude session log. type SessionEventKind string diff --git a/pkg/ai/middleware/construct.go b/pkg/ai/middleware/construct.go new file mode 100644 index 0000000..81f4721 --- /dev/null +++ b/pkg/ai/middleware/construct.go @@ -0,0 +1,45 @@ +package middleware + +import ( + "github.com/flanksource/captain/pkg/ai" + "github.com/flanksource/captain/pkg/ai/cache" +) + +// DefaultOptions is captain's standard middleware stack for a Config: response +// logging is always applied, and response caching is added when cfg configures +// it (a cache TTL or DB path, with NoCache unset). This lives in middleware, not +// ai.NewProvider, because middleware imports ai (wrapping ai.Provider) and the +// reverse import would be a cycle. +func DefaultOptions(cfg ai.Config) []Option { + opts := []Option{WithLogging(), WithSchemaValidation()} + if !cfg.NoCache && (cfg.CacheTTL > 0 || cfg.CacheDBPath != "") { + opts = append(opts, WithCache(cache.Config{ + DBPath: cfg.CacheDBPath, + TTL: cfg.CacheTTL, + NoCache: cfg.NoCache, + })) + } + return opts +} + +// NewProvider builds the provider for cfg with the default middleware stack +// (DefaultOptions) applied. It is the batteries-included counterpart to +// ai.NewProvider, which applies no middleware — every embedder that wants the +// standard logging (and configured caching) should use this instead of +// re-wrapping by hand. +func NewProvider(cfg ai.Config) (ai.Provider, error) { + p, err := ai.NewProvider(cfg) + if err != nil { + return nil, err + } + return Wrap(p, DefaultOptions(cfg)...) +} + +// NewAgent builds an ai.Agent whose provider carries the default middleware. +func NewAgent(cfg ai.Config) (*ai.Agent, error) { + p, err := NewProvider(cfg) + if err != nil { + return nil, err + } + return ai.NewAgentWithProvider(p, cfg), nil +} diff --git a/pkg/ai/middleware/logging.go b/pkg/ai/middleware/logging.go index c398fdc..e3a466b 100644 --- a/pkg/ai/middleware/logging.go +++ b/pkg/ai/middleware/logging.go @@ -7,7 +7,7 @@ import ( "time" "github.com/flanksource/captain/pkg/ai" - "github.com/flanksource/captain/pkg/ai/provider" + "github.com/flanksource/captain/pkg/api" "github.com/flanksource/clicky" "github.com/flanksource/clicky/api/icons" "github.com/flanksource/commons/logger" @@ -27,15 +27,17 @@ func (l *loggingProvider) GetBackend() ai.Backend { return l.provider.GetBackend func (l *loggingProvider) Execute(ctx context.Context, req ai.Request) (*ai.Response, error) { start := time.Now() + dispatch := clicky.Text(""). + Add(icons.AI). + Append(fmt.Sprintf(" %s/%s", l.provider.GetBackend(), l.provider.GetModel()), "text-purple-600 font-medium") + if req.Prompt.Source != "" { + dispatch = dispatch.Append(fmt.Sprintf(" [%s]", req.Prompt.Source), "text-gray-500") + } + log.Infof("%v", dispatch) + if log.IsDebugEnabled() { - t := clicky.Text(""). - Add(icons.AI). - Append(fmt.Sprintf(" %s/%s", l.provider.GetBackend(), l.provider.GetModel()), "text-purple-600 font-medium") - if req.Prompt.Source != "" { - t = t.Append(fmt.Sprintf(" [%s]", req.Prompt.Source), "text-gray-500") - } - t = t.NewLine().Append(req.Prompt.User, "text-gray-600") - if s := schemaInJSON(req.Prompt.Schema); s != "" { + t := dispatch.NewLine().Append(req.Prompt.User, "text-gray-600") + if s := schemaInJSON(req.Prompt); s != "" { t = t.NewLine().Append("schema-in ", "text-gray-500").Append(s, "text-gray-600") } log.Debugf("%v", t) @@ -52,13 +54,11 @@ func (l *loggingProvider) Execute(ctx context.Context, req ai.Request) (*ai.Resp return resp, err } - if log.IsDebugEnabled() { - log.Debugf("%v", clicky.Text(""). - Add(icons.Check). - Append(fmt.Sprintf(" %s/%s", l.provider.GetBackend(), l.provider.GetModel()), "text-green-600 font-medium"). - Append(fmt.Sprintf(" %v", duration.Round(time.Millisecond)), "text-gray-500"). - Append(fmt.Sprintf(" (tokens: %d in / %d out)", resp.Usage.InputTokens, resp.Usage.OutputTokens), "text-gray-400")) - } + log.Infof("%v", clicky.Text(""). + Add(icons.Check). + Append(fmt.Sprintf(" %s/%s", l.provider.GetBackend(), l.provider.GetModel()), "text-green-600 font-medium"). + Append(fmt.Sprintf(" %v", duration.Round(time.Millisecond)), "text-gray-500"). + Append(fmt.Sprintf(" (tokens: %d in / %d out)", resp.Usage.InputTokens, resp.Usage.OutputTokens), "text-gray-400")) if log.IsTraceEnabled() { t := clicky.Text(""). @@ -86,14 +86,16 @@ func (l *loggingProvider) ExecuteStream(ctx context.Context, req ai.Request) (<- return nil, fmt.Errorf("provider %s/%s does not support streaming", l.provider.GetBackend(), l.provider.GetModel()) } + dispatch := clicky.Text(""). + Add(icons.AI). + Append(fmt.Sprintf(" %s/%s (stream)", l.provider.GetBackend(), l.provider.GetModel()), "text-purple-600 font-medium") + if req.Prompt.Source != "" { + dispatch = dispatch.Append(fmt.Sprintf(" [%s]", req.Prompt.Source), "text-gray-500") + } + log.Infof("%v", dispatch) + if log.IsDebugEnabled() { - t := clicky.Text(""). - Add(icons.AI). - Append(fmt.Sprintf(" %s/%s (stream)", l.provider.GetBackend(), l.provider.GetModel()), "text-purple-600 font-medium") - if req.Prompt.Source != "" { - t = t.Append(fmt.Sprintf(" [%s]", req.Prompt.Source), "text-gray-500") - } - log.Debugf("%v", t.NewLine().Append(req.Prompt.User, "text-gray-600")) + log.Debugf("%v", dispatch.NewLine().Append(req.Prompt.User, "text-gray-600")) } return streamer.ExecuteStream(ctx, req) @@ -105,23 +107,21 @@ func WithLogging() Option { } } -// schemaInJSON renders the JSON schema captain derives from a structured-output -// target. Returns "" for text-mode requests (nil target); a non-struct target or -// marshal failure is surfaced inline rather than swallowed, since this is -// diagnostics that must never abort the run. -func schemaInJSON(out any) string { - if out == nil { - return "" - } - schema, err := provider.GenerateJSONSchema(out) +// schemaInJSON renders the JSON schema captain will send the model for a prompt: +// the pre-built Prompt.SchemaJSON verbatim when set (preserving the full JSON +// Schema vocabulary, e.g. maxItems), else the schema reflected from the Prompt.Schema +// Go target. Returns "" for text-mode requests (no schema); a resolution failure is +// surfaced inline rather than swallowed, since this is diagnostics that must never +// abort the run. +func schemaInJSON(p api.Prompt) string { + raw, err := ai.SchemaJSONFor(p) if err != nil { return fmt.Sprintf("", err) } - s, err := provider.SchemaToJSON(schema) - if err != nil { - return fmt.Sprintf("", err) + if len(raw) == 0 { + return "" } - return s + return string(raw) } // structuredOutJSON renders the structured response the provider parsed into the diff --git a/pkg/ai/middleware/logging_test.go b/pkg/ai/middleware/logging_test.go index fc31237..fedb257 100644 --- a/pkg/ai/middleware/logging_test.go +++ b/pkg/ai/middleware/logging_test.go @@ -3,6 +3,7 @@ package middleware import ( "bytes" "context" + "encoding/json" "regexp" "strings" "testing" @@ -28,18 +29,24 @@ func (s stubProvider) GetModel() string { return "test-model" } func (s stubProvider) GetBackend() ai.Backend { return ai.BackendAnthropic } func TestSchemaInJSON(t *testing.T) { - if got := schemaInJSON(nil); got != "" { - t.Fatalf("text-mode (nil target): want empty, got %q", got) + if got := schemaInJSON(api.Prompt{}); got != "" { + t.Fatalf("text-mode (no schema): want empty, got %q", got) } - got := schemaInJSON(&sampleOut{}) + got := schemaInJSON(api.Prompt{Schema: &sampleOut{}}) for _, want := range []string{`"type":"object"`, `"description":"conventional type"`, `"required":["type"]`} { if !strings.Contains(got, want) { - t.Errorf("schema-in %q missing %q", got, want) + t.Errorf("reflected schema-in %q missing %q", got, want) } } - if got := schemaInJSON("not-a-struct"); !strings.Contains(got, "schema-in error") { + // A pre-built SchemaJSON is printed verbatim, preserving vocabulary the reflected + // path can't express (e.g. maxItems) — the commit-grouping cap must be visible under -v. + if got := schemaInJSON(api.Prompt{SchemaJSON: json.RawMessage(`{"type":"object","properties":{"groups":{"type":"array","maxItems":2}}}`)}); !strings.Contains(got, `"maxItems":2`) { + t.Errorf("pre-built SchemaJSON should print verbatim, got %q", got) + } + + if got := schemaInJSON(api.Prompt{Schema: "not-a-struct"}); !strings.Contains(got, "schema-in error") { t.Errorf("non-struct target: want inline error marker, got %q", got) } } @@ -100,3 +107,36 @@ func TestLoggingProvider_EmitsSourceAndSchemas(t *testing.T) { } } } + +// TestLoggingProvider_EmitsSchemaJSON drives a request whose schema is a pre-built +// SchemaJSON (no Go target) — the commit-grouping path — through the logging +// middleware at debug level and asserts the schema-in with its maxItems cap appears. +// Before this, schema-in only rendered the reflected Go-target schema, so +// `gavel commit -G -v` could not show the grouping cap. +func TestLoggingProvider_EmitsSchemaJSON(t *testing.T) { + prev := logger.GetOutput() + t.Cleanup(func() { logger.SetOutput(prev) }) + var buf bytes.Buffer + logger.SetOutput(&buf) + logger.GetLogger("ai").SetLogLevel("debug") + + p, err := WithLogging()(stubProvider{resp: &ai.Response{Text: `{"groups":[]}`, Model: "test-model"}}) + if err != nil { + t.Fatalf("WithLogging: %v", err) + } + + if _, err := p.Execute(context.Background(), ai.Request{Prompt: api.Prompt{ + User: "group the files", + Source: "commit-grouping.prompt", + SchemaJSON: json.RawMessage(`{"type":"object","properties":{"groups":{"type":"array","maxItems":2}}}`), + }}); err != nil { + t.Fatalf("Execute: %v", err) + } + + got := ansi.ReplaceAllString(buf.String(), "") + for _, want := range []string{"schema-in", `"maxItems":2`} { + if !strings.Contains(got, want) { + t.Errorf("debug output missing %q\n--- output ---\n%s", want, got) + } + } +} diff --git a/pkg/ai/middleware/retry.go b/pkg/ai/middleware/retry.go index 1049d8c..481bf8a 100644 --- a/pkg/ai/middleware/retry.go +++ b/pkg/ai/middleware/retry.go @@ -3,7 +3,6 @@ package middleware import ( "context" "math/rand/v2" - "strings" "time" "github.com/flanksource/captain/pkg/ai" @@ -42,7 +41,7 @@ func (r *retryProvider) Execute(ctx context.Context, req ai.Request) (*ai.Respon lastErr = err - if !isRetryable(err) { + if !ai.IsRetryable(err) { return resp, err } if attempt >= r.config.MaxRetries { @@ -69,15 +68,6 @@ func (r *retryProvider) Execute(ctx context.Context, req ai.Request) (*ai.Respon return nil, lastErr } -func isRetryable(err error) bool { - msg := err.Error() - return strings.Contains(msg, "rate limit") || - strings.Contains(msg, "429") || - strings.Contains(msg, "503") || - strings.Contains(msg, "overloaded") || - strings.Contains(msg, "timeout") -} - func WithRetry(config RetryConfig) Option { return func(p ai.Provider) (ai.Provider, error) { return &retryProvider{provider: p, config: config}, nil diff --git a/pkg/ai/middleware/validation.go b/pkg/ai/middleware/validation.go new file mode 100644 index 0000000..015c83e --- /dev/null +++ b/pkg/ai/middleware/validation.go @@ -0,0 +1,203 @@ +package middleware + +import ( + "context" + "encoding/json" + "fmt" + "strings" + + "github.com/flanksource/captain/pkg/ai" + "github.com/flanksource/captain/pkg/api" + "github.com/xeipuuv/gojsonschema" +) + +// validatingProvider validates a structured-output response against the request's +// JSON schema and applies the prompt's SchemaStrictness policy: warning (log and +// continue), error (fail), retry (re-ask the model once with the validation error, +// then fail). It is a no-op unless the prompt sets both a schema and a strictness +// mode, so it is safe to keep in the default middleware stack. +type validatingProvider struct { + provider ai.Provider +} + +func (v *validatingProvider) GetModel() string { return v.provider.GetModel() } +func (v *validatingProvider) GetBackend() ai.Backend { return v.provider.GetBackend() } + +// WithSchemaValidation validates structured responses against the request schema +// and enforces api.Prompt.SchemaStrictness. +func WithSchemaValidation() Option { + return func(p ai.Provider) (ai.Provider, error) { + return &validatingProvider{provider: p}, nil + } +} + +func (v *validatingProvider) Execute(ctx context.Context, req ai.Request) (*ai.Response, error) { + resp, err := v.provider.Execute(ctx, req) + if err != nil { + return resp, err + } + + strictness := req.Prompt.SchemaStrictness + if strictness == api.SchemaStrictnessNone { + return resp, nil + } + schema, err := ai.SchemaJSONFor(req.Prompt) + if err != nil || len(schema) == 0 { + return resp, err + } + + verrs, err := validateResponse(schema, resp) + if err != nil { + return resp, err + } + if verrs == "" { + return resp, nil + } + + switch strictness { + case api.SchemaStrictnessWarning: + log.Warnf("schema validation failed (%s/%s): %s", v.provider.GetBackend(), v.provider.GetModel(), verrs) + return resp, nil + case api.SchemaStrictnessRetry: + return v.retry(ctx, req, resp, schema, verrs) + case api.SchemaStrictnessError: + return resp, fmt.Errorf("%w: %s", ai.ErrSchemaValidation, verrs) + default: + return resp, fmt.Errorf("%w: unknown schemaStrictness %q: %s", ai.ErrSchemaValidation, strictness, verrs) + } +} + +// retry re-asks the model once, feeding back the previous response and the schema +// validation errors, then re-validates. A still-invalid response is a hard error +// (retry → then error). +func (v *validatingProvider) retry(ctx context.Context, req ai.Request, prev *ai.Response, schema json.RawMessage, verrs string) (*ai.Response, error) { + correction := fmt.Sprintf( + "\n\nYour previous response did not conform to the required JSON schema.\n"+ + "Previous response:\n%s\n\nSchema validation errors:\n%s\n\n"+ + "Return a corrected JSON response that satisfies the schema.", + responseJSON(prev), verrs) + + req2 := req + req2.Prompt.User = req.Prompt.User + correction + + resp2, err := v.provider.Execute(ctx, req2) + if err != nil { + return resp2, err + } + verrs2, err := validateResponse(schema, resp2) + if err != nil { + return resp2, err + } + if verrs2 == "" { + return resp2, nil + } + return resp2, fmt.Errorf("%w: still invalid after retry: %s", ai.ErrSchemaValidation, verrs2) +} + +// ExecuteStream tees the stream: it forwards every event unchanged, accumulates +// the response (text + any EventResult.StructuredData), and once the terminal +// result arrives validates it against the request schema. Under "error" +// strictness an empty or non-conforming response injects a trailing EventError +// (which fails the iteration); "warning" only logs. (Streaming "retry" isn't +// supported — it would require re-streaming — so it is treated as "error".) +func (v *validatingProvider) ExecuteStream(ctx context.Context, req ai.Request) (<-chan ai.Event, error) { + streamer, ok := v.provider.(ai.StreamingProvider) + if !ok { + return nil, fmt.Errorf("provider %s/%s does not support streaming", v.provider.GetBackend(), v.provider.GetModel()) + } + + strictness := req.Prompt.SchemaStrictness + schema, serr := ai.SchemaJSONFor(req.Prompt) + if strictness == api.SchemaStrictnessNone || serr != nil || len(schema) == 0 { + return streamer.ExecuteStream(ctx, req) // nothing to validate; forward as-is + } + + upstream, err := streamer.ExecuteStream(ctx, req) + if err != nil { + return nil, err + } + + out := make(chan ai.Event) + go func() { + defer close(out) + var text strings.Builder + var structured json.RawMessage + validated := false + for ev := range upstream { + switch ev.Kind { + case ai.EventText: + text.WriteString(ev.Text) + case ai.EventResult: + if len(ev.StructuredData) > 0 { + structured = ev.StructuredData + } + } + out <- ev + if ev.Kind == ai.EventResult { + validated = true + v.emitValidation(out, schema, strictness, text.String(), structured) + } + } + // Some backends close the stream without a terminal EventResult. + if !validated { + v.emitValidation(out, schema, strictness, text.String(), structured) + } + }() + return out, nil +} + +// emitValidation validates the accumulated response and, on failure, injects an +// EventError (error/retry strictness) or logs (warning strictness). +func (v *validatingProvider) emitValidation(out chan<- ai.Event, schema json.RawMessage, strictness api.SchemaStrictness, text string, structured json.RawMessage) { + resp := &ai.Response{Text: text} + if len(structured) > 0 { + resp.StructuredData = structured + } + verrs, err := validateResponse(schema, resp) + if err != nil { + out <- ai.Event{Kind: ai.EventError, Error: err.Error()} + return + } + if verrs == "" { + return + } + if strictness == api.SchemaStrictnessWarning { + log.Warnf("schema validation failed (%s/%s): %s", v.provider.GetBackend(), v.provider.GetModel(), verrs) + return + } + out <- ai.Event{Kind: ai.EventError, Error: fmt.Sprintf("%s: %s", ai.ErrSchemaValidation, verrs)} +} + +// responseJSON extracts the raw structured JSON a provider returned: the decoded +// json.RawMessage when present, else the raw response text. +func responseJSON(resp *ai.Response) string { + if resp == nil { + return "" + } + if raw, ok := resp.StructuredData.(json.RawMessage); ok && len(raw) > 0 { + return string(raw) + } + return resp.Text +} + +// validateResponse validates the provider's structured JSON against schema. It +// returns a human-readable joined error string (empty when the response conforms), +// plus a hard error only when the schema or document could not be loaded/parsed. +func validateResponse(schema json.RawMessage, resp *ai.Response) (string, error) { + doc := responseJSON(resp) + if strings.TrimSpace(doc) == "" { + return "response carried no JSON to validate", nil + } + result, err := gojsonschema.Validate(gojsonschema.NewBytesLoader(schema), gojsonschema.NewStringLoader(doc)) + if err != nil { + return "", fmt.Errorf("%w: validation could not run: %v", ai.ErrSchemaValidation, err) + } + if result.Valid() { + return "", nil + } + msgs := make([]string, 0, len(result.Errors())) + for _, e := range result.Errors() { + msgs = append(msgs, e.String()) + } + return strings.Join(msgs, "; "), nil +} diff --git a/pkg/ai/middleware/validation_test.go b/pkg/ai/middleware/validation_test.go new file mode 100644 index 0000000..0d2c83c --- /dev/null +++ b/pkg/ai/middleware/validation_test.go @@ -0,0 +1,126 @@ +package middleware + +import ( + "context" + "encoding/json" + "errors" + "testing" + + "github.com/flanksource/captain/pkg/ai" + "github.com/flanksource/captain/pkg/api" +) + +// capSchema requires an object with a groups array of at most two items — the +// minimal shape that exercises a maxItems violation. +const capSchema = `{"type":"object","required":["groups"],"properties":{"groups":{"type":"array","maxItems":2}}}` + +const ( + overCapJSON = `{"groups":[{},{},{}]}` // 3 items — violates maxItems:2 + validJSON = `{"groups":[{},{}]}` // 2 items — conforms +) + +// scriptedProvider returns its responses in order (repeating the last), counting +// calls so a retry can be observed. +type scriptedProvider struct { + responses []string + calls int +} + +func (s *scriptedProvider) Execute(context.Context, ai.Request) (*ai.Response, error) { + idx := s.calls + if idx >= len(s.responses) { + idx = len(s.responses) - 1 + } + s.calls++ + return &ai.Response{Text: s.responses[idx], Model: "test-model"}, nil +} +func (s *scriptedProvider) GetModel() string { return "test-model" } +func (s *scriptedProvider) GetBackend() ai.Backend { return ai.BackendAnthropic } + +func capRequest(strictness api.SchemaStrictness) ai.Request { + return ai.Request{Prompt: api.Prompt{ + User: "group the files", + SchemaJSON: json.RawMessage(capSchema), + SchemaStrictness: strictness, + }} +} + +func execWith(t *testing.T, strictness api.SchemaStrictness, responses ...string) (*ai.Response, error, int) { + t.Helper() + inner := &scriptedProvider{responses: responses} + p, err := WithSchemaValidation()(inner) + if err != nil { + t.Fatalf("WithSchemaValidation: %v", err) + } + resp, err := p.Execute(context.Background(), capRequest(strictness)) + return resp, err, inner.calls +} + +func TestValidation_NoStrictnessSkipsValidation(t *testing.T) { + // "" disables validation: an over-cap response passes through unchanged, one call. + resp, err, calls := execWith(t, api.SchemaStrictnessNone, overCapJSON) + if err != nil { + t.Fatalf("want no error, got %v", err) + } + if resp.Text != overCapJSON { + t.Errorf("want passthrough response, got %q", resp.Text) + } + if calls != 1 { + t.Errorf("want 1 provider call, got %d", calls) + } +} + +func TestValidation_WarningLogsAndReturns(t *testing.T) { + resp, err, calls := execWith(t, api.SchemaStrictnessWarning, overCapJSON) + if err != nil { + t.Fatalf("warning mode must not error, got %v", err) + } + if resp.Text != overCapJSON || calls != 1 { + t.Errorf("warning mode should return the response as-is in one call; got calls=%d resp=%q", calls, resp.Text) + } +} + +func TestValidation_ErrorFailsOnViolation(t *testing.T) { + _, err, calls := execWith(t, api.SchemaStrictnessError, overCapJSON) + if !errors.Is(err, ai.ErrSchemaValidation) { + t.Fatalf("want ErrSchemaValidation, got %v", err) + } + if calls != 1 { + t.Errorf("error mode must not retry; want 1 call, got %d", calls) + } +} + +func TestValidation_ErrorPassesWhenValid(t *testing.T) { + resp, err, calls := execWith(t, api.SchemaStrictnessError, validJSON) + if err != nil { + t.Fatalf("a conforming response must not error, got %v", err) + } + if resp.Text != validJSON || calls != 1 { + t.Errorf("want the conforming response in one call; got calls=%d", calls) + } +} + +func TestValidation_RetrySucceedsOnSecond(t *testing.T) { + // First response violates; the single retry conforms → returned, exactly 2 calls. + resp, err, calls := execWith(t, api.SchemaStrictnessRetry, overCapJSON, validJSON) + if err != nil { + t.Fatalf("retry that conforms must not error, got %v", err) + } + if resp.Text != validJSON { + t.Errorf("want the corrected response, got %q", resp.Text) + } + if calls != 2 { + t.Errorf("retry must re-ask exactly once; want 2 calls, got %d", calls) + } +} + +func TestValidation_RetryThenErrorWhenStillInvalid(t *testing.T) { + // Both attempts violate → hard error after exactly one retry (retry → then error). + _, err, calls := execWith(t, api.SchemaStrictnessRetry, overCapJSON, overCapJSON) + if !errors.Is(err, ai.ErrSchemaValidation) { + t.Fatalf("want ErrSchemaValidation after retry, got %v", err) + } + if calls != 2 { + t.Errorf("retry must re-ask exactly once; want 2 calls, got %d", calls) + } +} diff --git a/pkg/ai/model_lists.go b/pkg/ai/model_lists.go new file mode 100644 index 0000000..62d6330 --- /dev/null +++ b/pkg/ai/model_lists.go @@ -0,0 +1,268 @@ +package ai + +import ( + "sort" + "strings" + "time" +) + +const currentModelsPerFamily = 3 + +// legacyModelPrefixes hides model IDs that are either superseded by a newer +// generation or aren't chat completions (image/audio/embedding/moderation). +var legacyModelPrefixes = []string{ + // OpenAI legacy + "gpt-3", + "gpt-4", // covers gpt-4, gpt-4o, gpt-4.1, gpt-4-turbo, ... + "gpt-5-", // API variants like mini/nano/codex/pro; CLI Codex is exempt by backend + "o1", + "o3", + "codex-mini", + // OpenAI non-chat endpoints + "dall-", + "whisper", + "tts-", + "text-embedding", + "text-moderation", + "omni-moderation", + "babbage", + "davinci", + "chatgpt-", + "computer-use-preview", + // Claude legacy + "claude-3", + "claude-2", + "claude-instant", + "claude-sonnet-4-0", + "claude-sonnet-4-2", + "claude-opus-4-0", + "claude-opus-4-1", + // Gemini legacy + "gemini-1", + "gemini-2.0", + // Grok legacy + "grok-3", + "grok-code-fast-1", +} + +// IsLegacyModelID reports whether id is a known legacy, outdated, or non-chat +// model id. Call IsLegacyModelIDForBackend when backend context is available. +func IsLegacyModelID(id string) bool { + idLower := strings.ToLower(bareModelID(strings.TrimPrefix(strings.TrimSpace(id), "models/"))) + for _, p := range legacyModelPrefixes { + if strings.HasPrefix(idLower, p) { + return true + } + } + return false +} + +// IsLegacyModelIDForBackend keeps API model menus clean while preserving local +// agent model slugs such as gpt-5-codex, which are current for Codex CLI even +// though the same id would be noisy in an OpenAI API model listing. +func IsLegacyModelIDForBackend(id string, backend Backend) bool { + if backend.Kind() == "cli" { + return false + } + return IsLegacyModelID(id) +} + +// CurrentModelsByReleaseDate returns a filtered copy sorted newest first, +// retaining the newest few models per family prefix. Known catalog release +// dates fill gaps left by provider list endpoints. +func CurrentModelsByReleaseDate(models []ModelDef) []ModelDef { + out := make([]ModelDef, 0, len(models)) + for _, m := range models { + if IsLegacyModelIDForBackend(m.ID, m.Backend) { + continue + } + if m.ReleaseDate == "" { + m.ReleaseDate = CatalogReleaseDate(m.Backend, m.ID) + } + out = append(out, m) + } + SortModelsByReleaseDateDesc(out) + return limitModelsPerFamily(out, currentModelsPerFamily) +} + +// SortModelsByReleaseDateDesc sorts in-place by release date descending, with +// unknown dates last and id descending as the stable deterministic tie-breaker. +func SortModelsByReleaseDateDesc(models []ModelDef) { + sort.SliceStable(models, func(i, j int) bool { + if ModelFamilyPrefix(models[i].ID) == ModelFamilyPrefix(models[j].ID) { + if cmp := compareModelVersions(models[i].ID, models[j].ID); cmp != 0 { + return cmp > 0 + } + } + left := models[i].ReleaseDate + if left == "" { + left = CatalogReleaseDate(models[i].Backend, models[i].ID) + } + right := models[j].ReleaseDate + if right == "" { + right = CatalogReleaseDate(models[j].Backend, models[j].ID) + } + if left == "" && right == "" { + return models[i].ID > models[j].ID + } + if left == "" { + return false + } + if right == "" { + return true + } + if left == right { + return models[i].ID > models[j].ID + } + return left > right + }) +} + +// CatalogReleaseDate returns the catalog release date for a backend/model id +// when known. API callers may pass either provider-prefixed or bare ids. +func CatalogReleaseDate(backend Backend, id string) string { + id = strings.TrimPrefix(strings.TrimSpace(id), "models/") + bare := bareModelID(id) + for _, m := range Catalog() { + if m.Backend != backend { + continue + } + switch { + case m.ID == id, m.BareID() == bare, m.AgentModel == id, m.AgentModel == bare: + return m.ReleaseDate + } + } + return "" +} + +// ModelFamilyPrefix groups versioned model ids by tier so recent entries from +// each tier survive filtering, e.g. claude-haiku, claude-sonnet, gemini-pro. +func ModelFamilyPrefix(id string) string { + id = strings.TrimPrefix(strings.TrimSpace(id), "models/") + id = bareModelID(id) + parts := strings.Split(strings.ToLower(id), "-") + if len(parts) < 2 { + return strings.ToLower(id) + } + + switch parts[0] { + case "claude": + if len(parts) >= 3 && parts[1] == "agent" { + return strings.Join(parts[:3], "-") + } + return "claude-" + parts[1] + case "gemini": + for i := 1; i < len(parts); i++ { + if isModelVersionToken(parts[i]) { + continue + } + if parts[i] == "flash" && i+1 < len(parts) && parts[i+1] == "lite" { + return "gemini-flash-lite" + } + return "gemini-" + parts[i] + } + return "gemini" + case "gpt": + if len(parts) >= 3 { + return "gpt-" + parts[2] + } + return "gpt" + case "grok": + return "grok-" + parts[1] + default: + if strings.HasPrefix(parts[0], "o") && len(parts) >= 2 { + return parts[0] + "-" + parts[1] + } + return strings.Join(parts[:2], "-") + } +} + +func limitModelsPerFamily(models []ModelDef, limit int) []ModelDef { + if limit <= 0 { + out := make([]ModelDef, len(models)) + copy(out, models) + return out + } + counts := map[string]int{} + out := make([]ModelDef, 0, len(models)) + for _, model := range models { + family := ModelFamilyPrefix(model.ID) + if counts[family] >= limit { + continue + } + counts[family]++ + out = append(out, model) + } + return out +} + +func isModelVersionToken(value string) bool { + if value == "" { + return false + } + for _, r := range value { + if (r < '0' || r > '9') && r != '.' { + return false + } + } + return true +} + +func compareModelVersions(left, right string) int { + lv := modelVersion(left) + rv := modelVersion(right) + if len(lv) == 0 || len(rv) == 0 { + return 0 + } + maxLen := len(lv) + if len(rv) > maxLen { + maxLen = len(rv) + } + for i := 0; i < maxLen; i++ { + l, r := 0, 0 + if i < len(lv) { + l = lv[i] + } + if i < len(rv) { + r = rv[i] + } + if l != r { + return l - r + } + } + return 0 +} + +func modelVersion(id string) []int { + id = bareModelID(strings.TrimPrefix(strings.TrimSpace(id), "models/")) + parts := strings.Split(strings.ToLower(id), "-") + var out []int + for _, part := range parts { + if !isModelVersionToken(part) { + continue + } + for _, piece := range strings.Split(part, ".") { + if piece == "" { + continue + } + n := 0 + for _, r := range piece { + n = n*10 + int(r-'0') + } + out = append(out, n) + } + } + return out +} + +func normalizeReleaseDate(value string) string { + value = strings.TrimSpace(value) + if len(value) < len("2006-01-02") { + return "" + } + date := value[:len("2006-01-02")] + if _, err := time.Parse("2006-01-02", date); err != nil { + return "" + } + return date +} diff --git a/pkg/ai/models_remote.go b/pkg/ai/models_remote.go index d9edc97..d666c62 100644 --- a/pkg/ai/models_remote.go +++ b/pkg/ai/models_remote.go @@ -15,9 +15,10 @@ import ( // and context data live in pkg/ai/pricing (sourced from OpenRouter) and are // looked up by id at render time. type ModelDef struct { - ID string - Name string - Backend Backend + ID string + Name string + Backend Backend + ReleaseDate string `json:"-"` } // remoteModelsTimeout caps each /v1/models call. The configure wizard is an @@ -38,6 +39,8 @@ type modelEntry struct { ID string `json:"id"` DisplayName string `json:"display_name"` Name string `json:"name"` // gemini surfaces "models/" here + Created int64 `json:"created"` + CreatedAt string `json:"created_at"` } // FetchOpenAIModels calls https://api.openai.com/v1/models and returns the @@ -89,6 +92,22 @@ func FetchGeminiModels(ctx context.Context, apiKey string) ([]ModelDef, error) { return doModelsRequest(req, BackendGemini) } +// FetchDeepSeekModels calls https://api.deepseek.com/models and returns the +// available model IDs as ModelDefs scoped to BackendDeepSeek. DeepSeek's API is +// OpenAI-compatible, so the endpoint is a Bearer-authenticated, OpenAI-shaped +// listing. An empty apiKey returns an error without making a request. +func FetchDeepSeekModels(ctx context.Context, apiKey string) ([]ModelDef, error) { + if strings.TrimSpace(apiKey) == "" { + return nil, fmt.Errorf("DEEPSEEK_API_KEY is not set") + } + req, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://api.deepseek.com/models", nil) + if err != nil { + return nil, err + } + req.Header.Set("Authorization", "Bearer "+apiKey) + return doModelsRequest(req, BackendDeepSeek) +} + // doModelsRequest issues req with the default client and decodes the // permissive listing shape, projecting each entry into a ModelDef tagged // with the supplied backend. Centralising this keeps the three fetchers @@ -127,11 +146,22 @@ func doModelsRequest(req *http.Request, backend Backend) ([]ModelDef, error) { if name == "" { name = id } - out = append(out, ModelDef{ID: id, Name: name, Backend: backend}) + releaseDate := m.releaseDate() + if releaseDate == "" { + releaseDate = CatalogReleaseDate(backend, id) + } + out = append(out, ModelDef{ID: id, Name: name, Backend: backend, ReleaseDate: releaseDate}) } return out, nil } +func (m modelEntry) releaseDate() string { + if m.Created > 0 { + return time.Unix(m.Created, 0).UTC().Format("2006-01-02") + } + return normalizeReleaseDate(m.CreatedAt) +} + // ListModels fetches the live model catalogue for an API backend. Live data is // the only source of truth: there is no static fallback, so a missing API key // or a network failure surfaces as an error to the caller. CLI/agent backends @@ -167,6 +197,8 @@ func remoteFetcherFor(backend Backend) (fetch func(context.Context, string) ([]M return FetchAnthropicModels, GetAPIKeyFromEnv(backend) case BackendGemini: return FetchGeminiModels, GetAPIKeyFromEnv(backend) + case BackendDeepSeek: + return FetchDeepSeekModels, GetAPIKeyFromEnv(backend) default: return nil, "" } diff --git a/pkg/ai/models_remote_test.go b/pkg/ai/models_remote_test.go index 6070534..3150dcb 100644 --- a/pkg/ai/models_remote_test.go +++ b/pkg/ai/models_remote_test.go @@ -8,6 +8,7 @@ import ( "net/http/httptest" "strings" "testing" + "time" ) // withTestServer redirects http.DefaultClient.Do to the given test server by @@ -54,7 +55,7 @@ func TestFetchOpenAIModels_HappyPath(t *testing.T) { } _ = json.NewEncoder(w).Encode(map[string]any{ "data": []map[string]any{ - {"id": "gpt-5"}, + {"id": "gpt-5", "created": time.Date(2026, 3, 2, 0, 0, 0, 0, time.UTC).Unix()}, {"id": "gpt-5-mini"}, {"id": "gpt-99-future"}, }, @@ -70,6 +71,9 @@ func TestFetchOpenAIModels_HappyPath(t *testing.T) { if len(got) != 3 { t.Fatalf("len = %d", len(got)) } + if got[0].ReleaseDate != "2026-03-02" { + t.Errorf("ReleaseDate = %q, want parsed OpenAI created date", got[0].ReleaseDate) + } for _, m := range got { if m.Backend != BackendOpenAI { t.Errorf("Backend = %q on %+v", m.Backend, m) @@ -109,7 +113,7 @@ func TestFetchAnthropicModels_HappyPath(t *testing.T) { } _ = json.NewEncoder(w).Encode(map[string]any{ "data": []map[string]any{ - {"id": "claude-sonnet-4-6", "display_name": "Claude Sonnet 4.6"}, + {"id": "claude-sonnet-4-6", "display_name": "Claude Sonnet 4.6", "created_at": "2026-04-05T12:30:00Z"}, {"id": "claude-future-1", "display_name": "Claude Future 1"}, }, }) @@ -127,6 +131,9 @@ func TestFetchAnthropicModels_HappyPath(t *testing.T) { if got[0].Name != "Claude Sonnet 4.6" { t.Errorf("display_name not surfaced: %+v", got[0]) } + if got[0].ReleaseDate != "2026-04-05" { + t.Errorf("ReleaseDate = %q, want parsed Anthropic created_at date", got[0].ReleaseDate) + } for _, m := range got { if m.Backend != BackendAnthropic { t.Errorf("Backend = %q on %+v", m.Backend, m) @@ -134,12 +141,54 @@ func TestFetchAnthropicModels_HappyPath(t *testing.T) { } } +func TestFetchDeepSeekModels_HappyPath(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if got := r.Header.Get("Authorization"); got != "Bearer ds-test" { + t.Errorf("Authorization = %q", got) + } + if !strings.HasSuffix(r.URL.Path, "/models") { + t.Errorf("path = %q", r.URL.Path) + } + _ = json.NewEncoder(w).Encode(map[string]any{ + "data": []map[string]any{ + {"id": "deepseek-chat"}, + {"id": "deepseek-reasoner"}, + }, + }) + })) + defer srv.Close() + withTestServer(t, srv) + + got, err := FetchDeepSeekModels(context.Background(), "ds-test") + if err != nil { + t.Fatalf("FetchDeepSeekModels: %v", err) + } + if len(got) != 2 { + t.Fatalf("len = %d", len(got)) + } + for _, m := range got { + if m.Backend != BackendDeepSeek { + t.Errorf("Backend = %q on %+v", m.Backend, m) + } + if m.ID == "" || m.Name == "" { + t.Errorf("missing fields: %+v", m) + } + } +} + +func TestFetchDeepSeekModels_EmptyKey(t *testing.T) { + if _, err := FetchDeepSeekModels(context.Background(), ""); err == nil { + t.Fatal("expected error for empty api key") + } +} + func TestListModels_ErrorsOnMissingKey(t *testing.T) { t.Setenv("OPENAI_API_KEY", "") t.Setenv("ANTHROPIC_API_KEY", "") t.Setenv("GEMINI_API_KEY", "") + t.Setenv("DEEPSEEK_API_KEY", "") - for _, b := range []Backend{BackendOpenAI, BackendAnthropic, BackendGemini} { + for _, b := range []Backend{BackendOpenAI, BackendAnthropic, BackendGemini, BackendDeepSeek} { _, err := ListModels(context.Background(), b) if err == nil { t.Errorf("backend=%s: expected error when no API key set", b) @@ -227,6 +276,9 @@ func TestFetchGeminiModels_StripsModelsPrefix(t *testing.T) { if len(got) != 2 || got[0].ID != "gemini-2.5-flash" || got[0].Name != "Gemini 2.5 Flash" { t.Errorf("unexpected: %+v", got) } + if got[1].ID != "gemini-2.5-pro" || got[1].ReleaseDate == "" { + t.Errorf("expected Gemini catalog release-date fallback, got %+v", got) + } for _, m := range got { if m.Backend != BackendGemini { t.Errorf("Backend = %q on %+v", m.Backend, m) diff --git a/pkg/ai/parse.go b/pkg/ai/parse.go new file mode 100644 index 0000000..2bbcf0e --- /dev/null +++ b/pkg/ai/parse.go @@ -0,0 +1,197 @@ +package ai + +import ( + "encoding/json" + "fmt" + "strings" + + "sigs.k8s.io/yaml" +) + +// SchemaInstruction is the trailing prompt block that asks an agentic backend +// which cannot enforce a schema natively (e.g. cmux, or a raw CLI) to reply with +// only a JSON object conforming to schemaJSON. Providers that support structured +// output natively never need it. +func SchemaInstruction(schemaJSON string) string { + var b strings.Builder + b.WriteString("When you are done, respond with ONLY a single JSON object that") + b.WriteString(" conforms to this JSON Schema — no prose, no markdown fences:\n") + b.WriteString(schemaJSON) + return b.String() +} + +// StripMarkdownFences removes common markdown fence prefixes/suffixes +// (```json / ```yaml / ```) from a string. +func StripMarkdownFences(s string) string { + for _, prefix := range []string{"```json\n", "```json", "```yaml\n", "```yaml", "```yml\n", "```yml", "```\n", "```"} { + s = strings.TrimPrefix(s, prefix) + } + s = strings.TrimSuffix(s, "\n```") + s = strings.TrimSuffix(s, "```") + return s +} + +// ExtractYAMLBlock returns the content between the first pair of --- delimiters, +// or "" when there is no such block. +func ExtractYAMLBlock(s string) string { + parts := strings.Split(s, "---") + if len(parts) >= 3 { + return strings.TrimSpace(parts[1]) + } + return "" +} + +// ExtractText unwraps a JSON envelope ({"result": "..."} and friends) down to the +// text it carries; anything that is not such an envelope passes through unchanged. +func ExtractText(raw string) string { + raw = strings.TrimSpace(raw) + if !strings.HasPrefix(raw, "{") { + return raw + } + var wrapper map[string]any + if err := json.Unmarshal([]byte(raw), &wrapper); err != nil { + return raw + } + for _, key := range []string{"result", "text", "response", "content"} { + if v, ok := wrapper[key]; ok { + if s, ok := v.(string); ok { + return s + } + } + } + return raw +} + +// ExtractJSONObject finds the first complete, valid JSON object in s using +// bracket-counting that respects JSON string escaping. ok is false when none +// closes and validates. +func ExtractJSONObject(s string) (string, bool) { return extractBalanced(s, '{', '}') } + +// ExtractJSONArray finds the first complete, valid JSON array in s using +// bracket-counting that respects JSON string escaping. +func ExtractJSONArray(s string) (string, bool) { return extractBalanced(s, '[', ']') } + +func extractBalanced(s string, open, close byte) (string, bool) { + start := strings.IndexByte(s, open) + if start < 0 { + return "", false + } + depth := 0 + inString := false + escaped := false + for i := start; i < len(s); i++ { + ch := s[i] + if escaped { + escaped = false + continue + } + if ch == '\\' && inString { + escaped = true + continue + } + if ch == '"' { + inString = !inString + continue + } + if inString { + continue + } + switch ch { + case open: + depth++ + case close: + depth-- + if depth == 0 { + candidate := s[start : i+1] + if isValidJSONText(candidate) { + return candidate, true + } + } + } + } + return "", false +} + +func isValidJSONText(s string) bool { + var v any + return json.Unmarshal([]byte(s), &v) == nil +} + +// ParseStructured extracts a T from an agent's raw reply: a bare JSON/YAML body, +// a JSON envelope carrying the text (result/text/response/content keys), fenced +// JSON, a `---` YAML document, or a JSON object embedded in surrounding prose. A +// candidate only counts when validate accepts it; the last validation failure is +// surfaced so a decoded-but-wrong payload is diagnosable. It is the tolerant +// counterpart to ExecuteTyped for backends that reply with free-form text. +func ParseStructured[T any](raw string, validate func(*T) error) (*T, error) { + p := structuredParser[T]{validate: validate} + if v := p.try(raw); v != nil { + return v, nil + } + + text := ExtractText(raw) + text = StripMarkdownFences(text) + text = strings.TrimSpace(text) + if v := p.try(text); v != nil { + return v, nil + } + + if embedded, ok := ExtractJSONObject(text); ok { + if v := p.try(embedded); v != nil { + return v, nil + } + } + + preview := raw + if len(preview) > 200 { + preview = preview[:200] + "..." + } + if p.lastValidateErr != nil { + return nil, fmt.Errorf("reply decoded but failed validation: %w (preview: %s)", p.lastValidateErr, preview) + } + return nil, fmt.Errorf("failed to parse structured reply (preview: %s)", preview) +} + +type structuredParser[T any] struct { + validate func(*T) error + lastValidateErr error +} + +// try decodes text as JSON, then YAML, then a `---` YAML document, returning the +// first candidate validate accepts. +func (p *structuredParser[T]) try(text string) *T { + text = strings.TrimSpace(text) + if text == "" { + return nil + } + if v := p.decode(text, json.Unmarshal); v != nil { + return v + } + if v := p.decode(text, yamlUnmarshal); v != nil { + return v + } + if block := ExtractYAMLBlock(text); block != "" { + if v := p.decode(block, yamlUnmarshal); v != nil { + return v + } + } + return nil +} + +// yamlUnmarshal adapts sigs.k8s.io/yaml's variadic signature to the plain +// unmarshal shape decode expects. It respects json struct tags. +func yamlUnmarshal(data []byte, v any) error { return yaml.Unmarshal(data, v) } + +func (p *structuredParser[T]) decode(text string, unmarshal func([]byte, any) error) *T { + var v T + if err := unmarshal([]byte(text), &v); err != nil { + return nil + } + if p.validate != nil { + if err := p.validate(&v); err != nil { + p.lastValidateErr = err + return nil + } + } + return &v +} diff --git a/pkg/ai/parse_test.go b/pkg/ai/parse_test.go new file mode 100644 index 0000000..ba149a0 --- /dev/null +++ b/pkg/ai/parse_test.go @@ -0,0 +1,52 @@ +package ai + +import ( + "fmt" + "testing" +) + +type verdict struct { + Pass bool `json:"pass"` + Comment string `json:"comment"` +} + +func nonEmptyComment(v *verdict) error { + if v.Comment == "" { + return fmt.Errorf("comment is required") + } + return nil +} + +func TestParseStructured(t *testing.T) { + cases := []struct { + name string + raw string + wantErr bool + want verdict + }{ + {name: "bare json", raw: `{"pass":true,"comment":"ok"}`, want: verdict{Pass: true, Comment: "ok"}}, + {name: "fenced json", raw: "```json\n{\"pass\":false,\"comment\":\"nope\"}\n```", want: verdict{Comment: "nope"}}, + {name: "json envelope", raw: `{"result":"{\"pass\":true,\"comment\":\"wrapped\"}"}`, want: verdict{Pass: true, Comment: "wrapped"}}, + {name: "embedded in prose", raw: "Here is the result:\n{\"pass\":true,\"comment\":\"prose\"} — done", want: verdict{Pass: true, Comment: "prose"}}, + {name: "yaml body", raw: "pass: true\ncomment: yaml", want: verdict{Pass: true, Comment: "yaml"}}, + {name: "validation fails", raw: `{"pass":true,"comment":""}`, wantErr: true}, + {name: "garbage", raw: "not json at all", wantErr: true}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + got, err := ParseStructured(tc.raw, nonEmptyComment) + if tc.wantErr { + if err == nil { + t.Fatalf("expected error, got %+v", got) + } + return + } + if err != nil { + t.Fatalf("ParseStructured: %v", err) + } + if *got != tc.want { + t.Errorf("got %+v, want %+v", *got, tc.want) + } + }) + } +} diff --git a/pkg/ai/pricing/registry.go b/pkg/ai/pricing/registry.go index 1ca1e22..02d9054 100644 --- a/pkg/ai/pricing/registry.go +++ b/pkg/ai/pricing/registry.go @@ -37,6 +37,17 @@ func GetModelInfo(model string) (ModelInfo, bool) { return claudeStaticInfo(model) } +// Contains reports whether model is an exact id in the pricing registry. Unlike +// GetModelInfo it has no static-Claude fallback (which prices any claude-ish id, +// including typos), so use Contains for membership/validation, not for pricing. +func Contains(model string) bool { + EnsureLoaded() + registryMu.RLock() + defer registryMu.RUnlock() + _, ok := registry[model] + return ok +} + // MergeMode controls how MergeModel/MergeModels reconcile an incoming row with // an existing registry entry for the same id. type MergeMode int diff --git a/pkg/ai/prompt/document.go b/pkg/ai/prompt/document.go new file mode 100644 index 0000000..eab3e4e --- /dev/null +++ b/pkg/ai/prompt/document.go @@ -0,0 +1,80 @@ +package prompt + +import ( + "fmt" + "strings" + + "github.com/flanksource/captain/pkg/api" + dp "github.com/google/dotprompt/go/dotprompt" + "gopkg.in/yaml.v3" +) + +// Document is a parsed .prompt split into its raw YAML frontmatter, the +// spec-native fold of that frontmatter, and the unrendered Handlebars body. +// +// Unlike Render, Parse does not execute the template, so a Document round-trips +// an editable prompt: Frontmatter keeps every key (including the dotprompt-only +// config/input/output and any nested content the spec does not model, e.g. +// output.schema), Spec is the typed view for validation, and Body is left +// verbatim. String reserializes the document so Parse(d.String()) preserves the +// frontmatter keys and body. +type Document struct { + // Frontmatter is the full YAML frontmatter as a map, nil when the source has + // no frontmatter. It is the lossless source of truth for reserialization. + Frontmatter map[string]any + // Spec is the frontmatter decoded into the typed spec (the dotprompt-only + // keys config/input/output/name/description are stripped). Zero when the + // source is body-only or declares no spec-native keys. + Spec api.Spec + // Body is the unrendered Handlebars template body. + Body string +} + +// Parse splits a .prompt source into frontmatter and body WITHOUT rendering the +// body, then decodes the spec-native frontmatter into Spec. It fails loud on +// malformed YAML or on a spec-native key the spec does not model — the opposite +// of the dotprompt library's ParseDocument, which prints and swallows YAML +// errors. +func Parse(source string) (*Document, error) { + frontmatter, body, hasFrontmatter := splitFrontmatter(source) + doc := &Document{Body: body} + if !hasFrontmatter || strings.TrimSpace(frontmatter) == "" { + return doc, nil + } + raw := map[string]any{} + if err := yaml.Unmarshal([]byte(frontmatter), &raw); err != nil { + return nil, fmt.Errorf("parse prompt frontmatter: %w", err) + } + doc.Frontmatter = raw + if err := decodeSpecFrontmatter(raw, &doc.Spec); err != nil { + return nil, fmt.Errorf("decode prompt frontmatter into spec: %w", err) + } + return doc, nil +} + +// String reserializes the document to .prompt text: "---\n\n---\n", +// or the body alone when there is no frontmatter. The output satisfies the +// dotprompt frontmatter grammar so Parse can read it back. +func (d *Document) String() (string, error) { + if len(d.Frontmatter) == 0 { + return d.Body, nil + } + y, err := yaml.Marshal(d.Frontmatter) + if err != nil { + return "", fmt.Errorf("marshal prompt frontmatter: %w", err) + } + return "---\n" + string(y) + "---\n" + d.Body, nil +} + +// splitFrontmatter separates the YAML frontmatter from the body using the +// dotprompt grammar. A source with no frontmatter markers is treated as all +// body. +func splitFrontmatter(source string) (frontmatter, body string, hasFrontmatter bool) { + if m := dp.FrontmatterAndBodyRegex.FindStringSubmatch(source); m != nil { + return m[1], m[2], true + } + if m := dp.EmptyFrontmatterRegex.FindStringSubmatch(source); m != nil { + return "", m[1], true + } + return "", source, false +} diff --git a/pkg/ai/prompt/document_test.go b/pkg/ai/prompt/document_test.go new file mode 100644 index 0000000..45cf1c5 --- /dev/null +++ b/pkg/ai/prompt/document_test.go @@ -0,0 +1,96 @@ +package prompt + +import ( + "io/fs" + "testing" + + "github.com/flanksource/captain/pkg/api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// Parse decodes spec-native frontmatter into Spec, leaves the body unrendered, +// and keeps dotprompt-only keys (config) in the raw frontmatter for round-trip. +func TestParse_SpecAndFrontmatter(t *testing.T) { + src, err := fs.ReadFile(library, "testdata/options.prompt") + require.NoError(t, err) + + doc, err := Parse(string(src)) + require.NoError(t, err) + + assert.Equal(t, api.PermissionAcceptEdits, doc.Spec.Permissions.Mode) + assert.Equal(t, 3, doc.Spec.Budget.MaxTurns) + + // The body is left unrendered — handlebars markers are intact. + assert.Contains(t, doc.Body, `{{role "user"}}`) + assert.Contains(t, doc.Body, "{{target}}") + + // The dotprompt-only config: block is not a spec field but survives in the + // raw frontmatter so String can reserialize it losslessly. + assert.Contains(t, doc.Frontmatter, "config") + assert.Contains(t, doc.Frontmatter, "permissions") +} + +// String reserializes to a document Parse reads back, and an unmodeled nested +// block (output.schema) is not dropped when only spec keys are edited. +func TestDocument_StringRoundTrip(t *testing.T) { + src := "---\n" + + "model: claude-sonnet-4-6\n" + + "output:\n" + + " schema:\n" + + " type: object\n" + + " properties:\n" + + " title:\n" + + " type: string\n" + + "permissions:\n" + + " mode: acceptEdits\n" + + "---\n" + + "{{role \"user\"}}\nWrite a title for {{topic}}.\n" + + doc, err := Parse(src) + require.NoError(t, err) + assert.Equal(t, "claude-sonnet-4-6", doc.Spec.Model.Name) + assert.Equal(t, api.PermissionAcceptEdits, doc.Spec.Permissions.Mode) + + out, err := doc.String() + require.NoError(t, err) + assert.Contains(t, out, "schema", "the unmodeled output.schema block must survive serialization") + assert.Contains(t, out, "title") + + rt, err := Parse(out) + require.NoError(t, err) + assert.Equal(t, doc.Spec.Model.Name, rt.Spec.Model.Name) + assert.Equal(t, doc.Spec.Permissions.Mode, rt.Spec.Permissions.Mode) + assert.Equal(t, doc.Body, rt.Body) + assert.Contains(t, rt.Frontmatter, "output") +} + +// A body-only prompt (no frontmatter markers) parses to a zero spec and +// round-trips byte-for-byte. +func TestParse_BodyOnly(t *testing.T) { + src := "You are a strict reviewer. Evaluate {{diff}}.\n" + + doc, err := Parse(src) + require.NoError(t, err) + assert.Nil(t, doc.Frontmatter) + assert.Equal(t, src, doc.Body) + assert.Equal(t, api.Spec{}, doc.Spec) + + out, err := doc.String() + require.NoError(t, err) + assert.Equal(t, src, out) +} + +// Malformed YAML frontmatter fails loud rather than being swallowed like the +// upstream dotprompt ParseDocument. +func TestParse_MalformedFrontmatter(t *testing.T) { + _, err := Parse("---\nmodel: [unterminated\n---\nbody\n") + require.Error(t, err) +} + +// A top-level key the spec does not model fails loud (KnownFields), matching +// how Render rejects unknown spec-native keys. +func TestParse_UnknownSpecKey(t *testing.T) { + _, err := Parse("---\nbogusKey: nope\n---\nbody\n") + require.Error(t, err) +} diff --git a/pkg/ai/prompt/examples.go b/pkg/ai/prompt/examples.go new file mode 100644 index 0000000..34231e3 --- /dev/null +++ b/pkg/ai/prompt/examples.go @@ -0,0 +1,8 @@ +package prompt + +import "embed" + +// Examples exposes the prompt examples embedded in the Captain binary. +// +//go:embed testdata +var Examples embed.FS diff --git a/pkg/ai/prompt/fallback_test.go b/pkg/ai/prompt/fallback_test.go new file mode 100644 index 0000000..7c1fea3 --- /dev/null +++ b/pkg/ai/prompt/fallback_test.go @@ -0,0 +1,49 @@ +package prompt + +import ( + "testing" + + "github.com/flanksource/captain/pkg/api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// TestParse_Fallbacks pins that an object-form fallbacks: block in frontmatter is +// accepted by the strict (KnownFields) spec decode and folds into +// Spec.Model.Fallbacks with each fallback's own knobs. +func TestParse_Fallbacks(t *testing.T) { + const src = "---\n" + + "model: claude-sonnet-5\n" + + "effort: high\n" + + "fallbacks:\n" + + " - model: gpt-4o\n" + + " effort: medium\n" + + " - model: gemini-2.0-flash\n" + + " temperature: 0.2\n" + + "---\n" + + "Summarize the diff.\n" + + doc, err := Parse(src) + require.NoError(t, err) + + assert.Equal(t, "claude-sonnet-5", doc.Spec.Model.Name) + require.Len(t, doc.Spec.Model.Fallbacks, 2) + assert.Equal(t, "gpt-4o", doc.Spec.Model.Fallbacks[0].Name) + assert.Equal(t, api.EffortMedium, doc.Spec.Model.Fallbacks[0].Effort) + assert.Equal(t, "gemini-2.0-flash", doc.Spec.Model.Fallbacks[1].Name) + require.NotNil(t, doc.Spec.Model.Fallbacks[1].Temperature) + assert.EqualValues(t, 0.2, *doc.Spec.Model.Fallbacks[1].Temperature) +} + +// TestParse_FallbacksExpandsInCandidates confirms the parsed primary + fallbacks +// produce the ordered try-list used at provider construction. +func TestParse_FallbacksExpandsInCandidates(t *testing.T) { + const src = "---\nmodel: claude-sonnet-5\nfallbacks:\n - model: gpt-4o\n---\nHi.\n" + doc, err := Parse(src) + require.NoError(t, err) + + candidates := doc.Spec.Model.Candidates() + require.Len(t, candidates, 2) + assert.Equal(t, "claude-sonnet-5", candidates[0].Name) + assert.Equal(t, "gpt-4o", candidates[1].Name) +} diff --git a/pkg/ai/prompt/frontmatter_test.go b/pkg/ai/prompt/frontmatter_test.go new file mode 100644 index 0000000..645274e --- /dev/null +++ b/pkg/ai/prompt/frontmatter_test.go @@ -0,0 +1,72 @@ +package prompt + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// templatedSchemaPrompt declares an output.schema whose groups array carries a +// static minItems and a maxItems guarded by {{#if limit}} and interpolated from +// the render data — the exact shape gavel's commit-grouping prompt uses to cap the +// number of groups at runtime. +const templatedSchemaPrompt = "---\n" + + "output:\n" + + " schema:\n" + + " type: object\n" + + " required: [groups]\n" + + " properties:\n" + + " groups:\n" + + " type: array\n" + + " minItems: 1\n" + + "{{#if limit}}\n" + + " maxItems: {{limit}}\n" + + "{{/if}}\n" + + " items:\n" + + " type: object\n" + + "---\n" + + "Group the files (limit {{limit}}).\n" + +func groupsNode(t *testing.T, schemaJSON json.RawMessage) map[string]any { + t.Helper() + require.NotEmpty(t, schemaJSON, "frontmatter output.schema must be carried through") + var schema map[string]any + require.NoError(t, json.Unmarshal(schemaJSON, &schema)) + props, ok := schema["properties"].(map[string]any) + require.True(t, ok, "schema has a properties object") + groups, ok := props["groups"].(map[string]any) + require.True(t, ok, "schema has a groups array") + return groups +} + +func TestRenderFrontmatter_InterpolatesOutputSchemaCap(t *testing.T) { + req, _, err := Load(templatedSchemaPrompt).Render(map[string]any{"limit": 3}, nil) + require.NoError(t, err) + assert.Contains(t, req.Prompt.User, "limit 3", "body is still templated normally") + + groups := groupsNode(t, req.Prompt.SchemaJSON) + assert.EqualValues(t, 3, groups["maxItems"], "maxItems interpolated from render data") + assert.EqualValues(t, 1, groups["minItems"], "static minItems preserved") +} + +func TestRenderFrontmatter_GuardOmitsCapWhenFalsy(t *testing.T) { + req, _, err := Load(templatedSchemaPrompt).Render(map[string]any{"limit": 0}, nil) + require.NoError(t, err) + + groups := groupsNode(t, req.Prompt.SchemaJSON) + _, hasMax := groups["maxItems"] + assert.False(t, hasMax, "{{#if limit}} omits maxItems when limit is 0") + assert.EqualValues(t, 1, groups["minItems"], "minItems still present") +} + +func TestRenderFrontmatter_NoTemplateIsInert(t *testing.T) { + // A frontmatter with no {{ }} is returned byte-for-byte (no raymond pass), and a + // literal {{limit}} in the BODY still renders — proving only the frontmatter is + // pre-rendered. + const static = "---\nmodel: claude-sonnet-4-6\n---\nEcho {{limit}}.\n" + req, _, err := Load(static).Render(map[string]any{"limit": 5}, nil) + require.NoError(t, err) + assert.Contains(t, req.Prompt.User, "Echo 5.") +} diff --git a/pkg/ai/prompt/prompt.go b/pkg/ai/prompt/prompt.go index 398c139..e3806f3 100644 --- a/pkg/ai/prompt/prompt.go +++ b/pkg/ai/prompt/prompt.go @@ -11,25 +11,62 @@ // context.dir, effort, sessionId, maxTurns. When a file mixes both dialects the // dotprompt config: block wins for the three knobs it owns. // -// Structured output is driven by the Go target passed to Render (out), which -// becomes ai.Request.Prompt.Schema — captain's providers derive the JSON -// schema from that Go type. The frontmatter output schema is advisory and is -// not used to populate the schema target (captain cannot consume a bare schema -// map), so pass a Go struct when you want structured results. +// Structured output can come from either the Go target passed to Render (out), +// which becomes ai.Request.Prompt.Schema (providers reflect the JSON schema from +// that Go type), or the frontmatter `output.schema` block (picoschema or raw +// JSON Schema), which the dotprompt library resolves and Render marshals onto +// ai.Request.Prompt.SchemaJSON (sent to the model verbatim). A Go target takes +// precedence; pass out == nil to use the schema declared in the file. package prompt import ( + "bytes" + "encoding/json" "fmt" "io/fs" "os" + "regexp" "strings" "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/api" dp "github.com/google/dotprompt/go/dotprompt" + "github.com/mbleigh/raymond" "gopkg.in/yaml.v3" ) +// frontmatterRe splits a .prompt source into YAML frontmatter (group 1) and body +// (group 2). The pattern is copied from google/dotprompt's FrontmatterAndBodyRegex +// so the split matches exactly what the dotprompt library re-parses. +var frontmatterRe = regexp.MustCompile( + `^(?:(?:#[^\n]*|[ \t]*)\n)*---\s*(?:\r\n|\r|\n)([\s\S]*?)(?:\r\n|\r|\n)---\s*(?:\r\n|\r|\n)([\s\S]*)$`) + +// renderFrontmatter templates the YAML frontmatter of a .prompt source with data +// (the same map used to render the body), so authors can parametrize frontmatter — +// notably output.schema constraints like `maxItems: {{maxCommits}}`. Only the +// frontmatter is rendered here; the body is left for dotprompt so its {{role …}} +// helpers and partials render normally. No-op when the source has no frontmatter or +// the frontmatter contains no `{{`. +func renderFrontmatter(source string, data map[string]any) (string, error) { + loc := frontmatterRe.FindStringSubmatchIndex(source) + if loc == nil { + return source, nil + } + fm := source[loc[2]:loc[3]] + if !strings.Contains(fm, "{{") { + return source, nil + } + tpl, err := raymond.Parse(fm) + if err != nil { + return "", fmt.Errorf("parse frontmatter template: %w", err) + } + out, err := tpl.ExecWith(data, raymond.NewDataFrame(), &raymond.ExecOptions{NoEscape: true}) + if err != nil { + return "", fmt.Errorf("render frontmatter template: %w", err) + } + return source[:loc[2]] + out + source[loc[3]:], nil +} + // Template is a parsed .prompt source ready to render with runtime data. type Template struct { dp *dp.Dotprompt @@ -68,7 +105,11 @@ func LoadFS(fsys fs.FS, path string) (*Template, error) { // ai.Request and ai.Config. When out is non-nil it becomes // Request.Prompt.Schema (the structured-output target). func (t *Template) Render(data map[string]any, out any) (ai.Request, ai.Config, error) { - rendered, err := t.dp.Render(t.source, &dp.DataArgument{Input: data}, nil) + src, err := renderFrontmatter(t.source, data) + if err != nil { + return ai.Request{}, ai.Config{}, fmt.Errorf("render prompt %s frontmatter: %w", t.name, err) + } + rendered, err := t.dp.Render(src, &dp.DataArgument{Input: data}, nil) if err != nil { return ai.Request{}, ai.Config{}, fmt.Errorf("render prompt %s: %w", t.name, err) } @@ -114,6 +155,14 @@ func (t *Template) Render(data map[string]any, out any) (ai.Request, ai.Config, cfg.Budget = req.Budget if out != nil { req.Prompt.Schema = out + } else if rendered.Output.Schema != nil { + // A frontmatter `output.schema` block (resolved by the dotprompt library + // from picoschema or a raw JSON Schema) becomes the verbatim SchemaJSON. + raw, err := json.Marshal(rendered.Output.Schema) + if err != nil { + return ai.Request{}, ai.Config{}, fmt.Errorf("marshal prompt %s output schema: %w", t.name, err) + } + req.Prompt.SchemaJSON = raw } return req, cfg, nil } @@ -126,11 +175,25 @@ func decodeSpecFrontmatter(raw map[string]any, req *ai.Request) error { if len(raw) == 0 { return nil } - b, err := yaml.Marshal(raw) + specRaw := map[string]any{} + for key, value := range raw { + switch key { + case "config", "input", "output", "name", "description": + continue + default: + specRaw[key] = value + } + } + if len(specRaw) == 0 { + return nil + } + b, err := yaml.Marshal(specRaw) if err != nil { return fmt.Errorf("re-encode frontmatter: %w", err) } - return yaml.Unmarshal(b, req) + dec := yaml.NewDecoder(bytes.NewReader(b)) + dec.KnownFields(true) + return dec.Decode(req) } // Library renders named .prompt files from an fs.FS (typically an embed.FS), the diff --git a/pkg/ai/prompt/prompt_test.go b/pkg/ai/prompt/prompt_test.go index bc25f39..447a5d8 100644 --- a/pkg/ai/prompt/prompt_test.go +++ b/pkg/ai/prompt/prompt_test.go @@ -2,6 +2,7 @@ package prompt import ( "embed" + "encoding/json" "io/fs" "path/filepath" "strings" @@ -36,7 +37,7 @@ func TestRender_FrontmatterAndMessages(t *testing.T) { } // TestRender_SpecFrontmatter exercises the second parse: spec-native frontmatter -// (permissions/memory/budget/maxTurns) lands on the nested ai.Request groups, +// (permissions/memory/budget) lands on the nested ai.Request groups, // while the dotprompt config: block stays canonical for the knobs it owns. func TestRender_SpecFrontmatter(t *testing.T) { tmpl, err := LoadFS(library, "testdata/options.prompt") @@ -51,7 +52,7 @@ func TestRender_SpecFrontmatter(t *testing.T) { assert.Equal(t, []string{"Read", "Edit"}, req.Permissions.Tools.Allow) assert.True(t, req.Permissions.MCP.Disabled) assert.True(t, req.Memory.SkipUser) - assert.Equal(t, 3, req.MaxTurns) + assert.Equal(t, 3, req.Budget.MaxTurns) // The dotprompt config: block wins for the knobs it owns: config.maxOutputTokens // (1024) overrides the spec-native budget.maxTokens (5000), and config.temperature @@ -76,6 +77,36 @@ func TestRender_StructuredOutputTarget(t *testing.T) { req, _, err := Load("{{role \"user\"}}\nhi").Render(nil, out) require.NoError(t, err) assert.Same(t, out, req.Prompt.Schema) + assert.Empty(t, req.Prompt.SchemaJSON, "a Go target takes precedence over any frontmatter schema") +} + +// A frontmatter output.schema is resolved and marshalled onto SchemaJSON when no +// Go target is passed, so schemas can be declared in the .prompt file. +func TestRender_FrontmatterOutputSchema(t *testing.T) { + src := "---\n" + + "output:\n" + + " schema:\n" + + " type: object\n" + + " additionalProperties: false\n" + + " properties:\n" + + " title:\n" + + " type: string\n" + + " required:\n" + + " - title\n" + + "---\n" + + "{{role \"user\"}}\nname a PR" + + req, _, err := Load(src).Render(nil, nil) + require.NoError(t, err) + require.Nil(t, req.Prompt.Schema, "no Go target was passed") + require.NotEmpty(t, req.Prompt.SchemaJSON, "frontmatter output.schema must reach SchemaJSON") + + var decoded map[string]any + require.NoError(t, json.Unmarshal(req.Prompt.SchemaJSON, &decoded)) + assert.Equal(t, "object", decoded["type"]) + props, ok := decoded["properties"].(map[string]any) + require.True(t, ok, "resolved schema must carry properties") + assert.Contains(t, props, "title") } func TestLibrary_Render(t *testing.T) { @@ -95,8 +126,12 @@ func TestRender_BackendFixtureExamples(t *testing.T) { "testdata/fixtures/anthropic-claude-sonnet.prompt": {backend: api.BackendAnthropic, model: "claude-sonnet-4-6"}, "testdata/fixtures/claude-agent-opus.prompt": {backend: api.BackendClaudeAgent, model: "claude-agent-opus"}, "testdata/fixtures/claude-agent-sonnet.prompt": {backend: api.BackendClaudeAgent, model: "claude-agent-sonnet"}, + "testdata/fixtures/claude-cmux-opus.prompt": {backend: api.BackendClaudeCmux, model: "claude-cmux-opus"}, + "testdata/fixtures/claude-cmux-sonnet.prompt": {backend: api.BackendClaudeCmux, model: "claude-cmux-sonnet"}, "testdata/fixtures/claude-cli-opus.prompt": {backend: api.BackendClaudeCLI, model: "claude-agent-opus"}, "testdata/fixtures/claude-cli-sonnet.prompt": {backend: api.BackendClaudeCLI, model: "claude-agent-sonnet"}, + "testdata/fixtures/codex-cmux.prompt": {backend: api.BackendCodexCmux, model: "gpt-5-codex"}, + "testdata/fixtures/deepseek.prompt": {backend: api.BackendDeepSeek, model: "deepseek-reasoner"}, "testdata/fixtures/codex-cli.prompt": {backend: api.BackendCodexCLI, model: "gpt-5-codex"}, "testdata/fixtures/gemini-api.prompt": {backend: api.BackendGemini, model: "gemini-2.5-pro"}, "testdata/fixtures/gemini-cli.prompt": {backend: api.BackendGeminiCLI, model: "gemini-cli-pro"}, @@ -109,6 +144,7 @@ func TestRender_BackendFixtureExamples(t *testing.T) { api.BackendAnthropic: {}, api.BackendClaudeAgent: {}, api.BackendClaudeCLI: {}, + api.BackendClaudeCmux: {}, } err := fs.WalkDir(library, "testdata/fixtures", func(path string, d fs.DirEntry, err error) error { diff --git a/pkg/ai/prompt/testdata/fixtures/claude-agent-opus.prompt b/pkg/ai/prompt/testdata/fixtures/claude-agent-opus.prompt index e3cbe0c..48eaa79 100644 --- a/pkg/ai/prompt/testdata/fixtures/claude-agent-opus.prompt +++ b/pkg/ai/prompt/testdata/fixtures/claude-agent-opus.prompt @@ -1,9 +1,10 @@ --- model: claude-agent-opus backend: claude-agent -maxTurns: 4 -context: - dir: . +budget: + maxTurns: 4 +setup: + cwd: . permissions: mode: plan tools: @@ -21,4 +22,3 @@ You are planning a sensitive code change. Do not edit files; identify risks and {{role "user"}} Plan: {{task}} - diff --git a/pkg/ai/prompt/testdata/fixtures/claude-agent-sonnet.prompt b/pkg/ai/prompt/testdata/fixtures/claude-agent-sonnet.prompt index 1d7f9fd..e8e789a 100644 --- a/pkg/ai/prompt/testdata/fixtures/claude-agent-sonnet.prompt +++ b/pkg/ai/prompt/testdata/fixtures/claude-agent-sonnet.prompt @@ -1,9 +1,10 @@ --- model: claude-agent-sonnet backend: claude-agent -maxTurns: 6 -context: - dir: . +budget: + maxTurns: 6 +setup: + cwd: . permissions: presets: - edit diff --git a/pkg/ai/prompt/testdata/fixtures/claude-cli-opus.prompt b/pkg/ai/prompt/testdata/fixtures/claude-cli-opus.prompt index 9d77816..b3a4c32 100644 --- a/pkg/ai/prompt/testdata/fixtures/claude-cli-opus.prompt +++ b/pkg/ai/prompt/testdata/fixtures/claude-cli-opus.prompt @@ -1,7 +1,8 @@ --- model: claude-agent-opus backend: claude-cli -maxTurns: 3 +budget: + maxTurns: 3 permissions: mode: default tools: @@ -20,4 +21,3 @@ You are using the Claude CLI backend for high-signal review. Be specific about e {{role "user"}} Review: {{task}} - diff --git a/pkg/ai/prompt/testdata/fixtures/claude-cli-sonnet.prompt b/pkg/ai/prompt/testdata/fixtures/claude-cli-sonnet.prompt index 5c478be..3269b39 100644 --- a/pkg/ai/prompt/testdata/fixtures/claude-cli-sonnet.prompt +++ b/pkg/ai/prompt/testdata/fixtures/claude-cli-sonnet.prompt @@ -1,7 +1,8 @@ --- model: claude-agent-sonnet backend: claude-cli -maxTurns: 3 +budget: + maxTurns: 3 permissions: mode: default tools: @@ -19,4 +20,3 @@ You are using the Claude CLI backend. Keep the answer concise and actionable. {{role "user"}} Handle: {{task}} - diff --git a/pkg/ai/prompt/testdata/fixtures/claude-cmux-opus.prompt b/pkg/ai/prompt/testdata/fixtures/claude-cmux-opus.prompt new file mode 100644 index 0000000..fbf37db --- /dev/null +++ b/pkg/ai/prompt/testdata/fixtures/claude-cmux-opus.prompt @@ -0,0 +1,24 @@ +--- +model: claude-cmux-opus +backend: claude-cmux +budget: + maxTurns: 4 +setup: + cwd: . +permissions: + mode: plan + tools: + allow: + - Read + - Glob + - Grep + modes: + Bash: ask +memory: + skipProject: true +--- +{{role "system"}} +You are working through a cmux Claude surface. Plan carefully before making changes. +{{role "user"}} +Task: +{{task}} diff --git a/pkg/ai/prompt/testdata/fixtures/claude-cmux-sonnet.prompt b/pkg/ai/prompt/testdata/fixtures/claude-cmux-sonnet.prompt new file mode 100644 index 0000000..7ca1ae9 --- /dev/null +++ b/pkg/ai/prompt/testdata/fixtures/claude-cmux-sonnet.prompt @@ -0,0 +1,24 @@ +--- +model: claude-cmux-sonnet +backend: claude-cmux +budget: + maxTurns: 6 +setup: + cwd: . +permissions: + presets: + - edit + tools: + allow: + - Read + - Edit + - Glob + - Grep +memory: + skipUser: true +--- +{{role "system"}} +You are working through a cmux Claude surface. Keep edits scoped and verify the result. +{{role "user"}} +Task: +{{task}} diff --git a/pkg/ai/prompt/testdata/fixtures/codex-cli.prompt b/pkg/ai/prompt/testdata/fixtures/codex-cli.prompt index 142ead5..50c9c68 100644 --- a/pkg/ai/prompt/testdata/fixtures/codex-cli.prompt +++ b/pkg/ai/prompt/testdata/fixtures/codex-cli.prompt @@ -2,8 +2,8 @@ model: gpt-5-codex backend: codex-cli effort: medium -context: - dir: . +setup: + cwd: . permissions: presets: - edit @@ -17,4 +17,3 @@ You are a Codex agent. Apply scoped edits, keep the worktree clean, and verify t {{role "user"}} Code task: {{task}} - diff --git a/pkg/ai/prompt/testdata/fixtures/codex-cmux.prompt b/pkg/ai/prompt/testdata/fixtures/codex-cmux.prompt new file mode 100644 index 0000000..1809db4 --- /dev/null +++ b/pkg/ai/prompt/testdata/fixtures/codex-cmux.prompt @@ -0,0 +1,19 @@ +--- +model: gpt-5-codex +backend: codex-cmux +effort: medium +setup: + cwd: . +permissions: + presets: + - edit + mcp: + disabled: true +memory: + bare: true +--- +{{role "system"}} +You are working through a cmux Codex surface. Apply scoped edits and report verification. +{{role "user"}} +Code task: +{{task}} diff --git a/pkg/ai/prompt/testdata/fixtures/deepseek.prompt b/pkg/ai/prompt/testdata/fixtures/deepseek.prompt new file mode 100644 index 0000000..644b03d --- /dev/null +++ b/pkg/ai/prompt/testdata/fixtures/deepseek.prompt @@ -0,0 +1,15 @@ +--- +model: deepseek-reasoner +backend: deepseek +config: + maxOutputTokens: 4096 + temperature: 0.3 +budget: + cost: 1 +--- +{{role "system"}} +You are a direct implementation planner. Return the smallest practical sequence of steps. +{{role "user"}} +Plan the work for: +{{task}} + diff --git a/pkg/ai/prompt/testdata/options.prompt b/pkg/ai/prompt/testdata/options.prompt index 04e21f0..7a290ce 100644 --- a/pkg/ai/prompt/testdata/options.prompt +++ b/pkg/ai/prompt/testdata/options.prompt @@ -3,7 +3,6 @@ model: claude-sonnet-4-6 config: maxOutputTokens: 1024 temperature: 0.2 -maxTurns: 3 permissions: mode: acceptEdits presets: @@ -18,6 +17,7 @@ memory: skipUser: true budget: maxTokens: 5000 + maxTurns: 3 --- {{role "system"}} You are a careful refactoring assistant. diff --git a/pkg/ai/provider.go b/pkg/ai/provider.go index c70f2f6..97c687e 100644 --- a/pkg/ai/provider.go +++ b/pkg/ai/provider.go @@ -15,6 +15,7 @@ const ( BackendAnthropic = api.BackendAnthropic BackendGemini = api.BackendGemini BackendOpenAI = api.BackendOpenAI + BackendDeepSeek = api.BackendDeepSeek BackendClaudeCLI = api.BackendClaudeCLI BackendCodexCLI = api.BackendCodexCLI BackendGeminiCLI = api.BackendGeminiCLI diff --git a/pkg/ai/provider/claudeagent/agent.ts b/pkg/ai/provider/claudeagent/agent.ts index bdb46ce..8b0216f 100644 --- a/pkg/ai/provider/claudeagent/agent.ts +++ b/pkg/ai/provider/claudeagent/agent.ts @@ -5,7 +5,8 @@ // Protocol (newline-delimited JSON, one object per line on stdout): // client -> server requests: // initialize {cwd, model, systemPrompt, appendSystemPrompt, allowedTools, -// maxTurns, maxBudgetUsd, permissionMode, resume, approvalMode} +// maxTurns, maxBudgetUsd, permissionMode, resume, approvalMode, +// outputSchema} // -> reply {ok:true} // prompt {text} -> reply {accepted:true} // interrupt -> reply {} @@ -16,7 +17,8 @@ // message/thinking {text} // message/tool_use {tool, input, id} // message/tool_result {id, content, is_error} -// turn/completed {success, session_id, cost_usd, usage, num_turns, result_text} +// turn/completed {success, subtype, session_id, cost_usd, usage, num_turns, +// result_text, structured_output} // turn/error {message} // server -> client requests (only when approvalMode === "ask"): // can_use_tool {tool, input, tool_use_id} @@ -56,6 +58,10 @@ interface InitializeParams { permissionMode?: string; resume?: string; approvalMode?: string; + // outputSchema is the JSON Schema captain derives from the request's + // structured-output target. Present => the SDK is asked for validated JSON + // (options.outputFormat) and every turn's result carries structured_output. + outputSchema?: Record; } type JsonRpcId = number | string | null; @@ -240,6 +246,16 @@ function buildOptions(params: InitializeParams): Options { options.resume = params.resume; } + // Structured output: ask the SDK to validate the final answer against the + // caller's JSON Schema and return it on result.structured_output. The schema + // is a session-level option, so it applies to every turn of this query(). + if (params.outputSchema) { + options.outputFormat = { + type: "json_schema", + schema: params.outputSchema, + }; + } + // When the host brokers approvals, forward each tool-permission check to it // over can_use_tool and map the decision onto the SDK PermissionResult. The // PreToolUse git add/commit block above still applies first. @@ -396,11 +412,14 @@ function handleMessage(message: SDKMessage) { case "result": notify("turn/completed", { success: !(message as { is_error?: boolean }).is_error, + subtype: (message as { subtype?: string }).subtype, session_id: message.session_id, cost_usd: (message as { total_cost_usd?: number }).total_cost_usd, usage: (message as { usage?: unknown }).usage, num_turns: (message as { num_turns?: number }).num_turns, result_text: (message as { result?: string }).result, + structured_output: (message as { structured_output?: unknown }) + .structured_output, }); break; } diff --git a/pkg/ai/provider/claudeagent/mapping.go b/pkg/ai/provider/claudeagent/mapping.go index 7636803..3a5effe 100644 --- a/pkg/ai/provider/claudeagent/mapping.go +++ b/pkg/ai/provider/claudeagent/mapping.go @@ -107,12 +107,14 @@ func mapNotification(method string, params json.RawMessage, model string) (ai.Ev case notifyTurnDone: var p struct { - Success bool `json:"success"` - SessionID string `json:"session_id"` - CostUSD float64 `json:"cost_usd"` - Usage json.RawMessage `json:"usage"` - NumTurns int `json:"num_turns"` - ResultText string `json:"result_text"` + Success bool `json:"success"` + Subtype string `json:"subtype"` + SessionID string `json:"session_id"` + CostUSD float64 `json:"cost_usd"` + Usage json.RawMessage `json:"usage"` + NumTurns int `json:"num_turns"` + ResultText string `json:"result_text"` + StructuredOutput json.RawMessage `json:"structured_output"` } _ = json.Unmarshal(params, &p) ev := ai.Event{ @@ -124,7 +126,13 @@ func mapNotification(method string, params json.RawMessage, model string) (ai.Ev Usage: decodeUsage(p.Usage), Model: model, } + if len(p.StructuredOutput) > 0 && string(p.StructuredOutput) != "null" { + ev.StructuredData = p.StructuredOutput + } input := map[string]any{"is_error": !p.Success} + if p.Subtype != "" { + input["subtype"] = p.Subtype + } if p.CostUSD > 0 { input["total_cost_usd"] = p.CostUSD } diff --git a/pkg/ai/provider/claudeagent/mapping_test.go b/pkg/ai/provider/claudeagent/mapping_test.go index e6d1ad5..9b52296 100644 --- a/pkg/ai/provider/claudeagent/mapping_test.go +++ b/pkg/ai/provider/claudeagent/mapping_test.go @@ -150,6 +150,32 @@ func TestMapNotification_TurnCompletedSuccess(t *testing.T) { assert.False(t, tu.IsError) } +func TestMapNotification_TurnCompletedStructured(t *testing.T) { + ev := mustMap(t, notifyTurnDone, `{ + "success": true, + "session_id": "s3", + "subtype": "success", + "structured_output": {"company_name": "Anthropic", "founded_year": 2021} + }`) + + assert.Equal(t, ai.EventResult, ev.Kind) + assert.Equal(t, "success", ev.Input["subtype"]) + require.NotEmpty(t, ev.StructuredData, "structured_output should ride on the result event") + + var out map[string]any + require.NoError(t, json.Unmarshal(ev.StructuredData, &out)) + assert.Equal(t, "Anthropic", out["company_name"]) +} + +func TestMapNotification_TurnCompletedNoStructured(t *testing.T) { + // A text-mode result and an explicit null both leave StructuredData nil. + ev := mustMap(t, notifyTurnDone, `{"success": true, "session_id": "s4"}`) + assert.Nil(t, ev.StructuredData) + + ev = mustMap(t, notifyTurnDone, `{"success": true, "structured_output": null}`) + assert.Nil(t, ev.StructuredData, "explicit null is not structured output") +} + func TestMapNotification_TurnCompletedFailure(t *testing.T) { ev := mustMap(t, notifyTurnDone, `{"success": false, "session_id": "s2"}`) diff --git a/pkg/ai/provider/claudeagent/provider.go b/pkg/ai/provider/claudeagent/provider.go index 2532ab2..d1e70ce 100644 --- a/pkg/ai/provider/claudeagent/provider.go +++ b/pkg/ai/provider/claudeagent/provider.go @@ -14,7 +14,9 @@ package claudeagent import ( + "bytes" "context" + "encoding/json" "fmt" "os" "strings" @@ -109,6 +111,12 @@ type Provider struct { sessMu sync.Mutex sessionID string + + // sessionSchema is the JSON schema the SDK query() session was initialized + // with (nil = text mode). The SDK's outputFormat is a session-level option, + // so it is pinned from the first turn and every later turn must match it. + sessionSchemaOnce sync.Once + sessionSchema json.RawMessage } // New builds a claude-agent provider. The supervised process is started lazily @@ -132,11 +140,11 @@ func New(cfg ai.Config) (*Provider, error) { func (p *Provider) GetModel() string { return p.model } func (p *Provider) GetBackend() ai.Backend { return ai.BackendClaudeAgent } -// Execute drains its own ExecuteStream into a buffered ai.Response. +// Execute drains its own ExecuteStream into a buffered ai.Response. When the +// request carries a structured-output schema, the validated JSON the SDK +// returns is unmarshalled into req.Prompt.Schema and surfaced as StructuredData +// (mirroring the genkit provider). func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, error) { - if req.Prompt.Schema != nil { - return nil, fmt.Errorf("claude-agent does not support StructuredOutput") - } start := time.Now() events, err := p.ExecuteStream(ctx, req) if err != nil { @@ -144,12 +152,14 @@ func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, e } var ( - text strings.Builder - usage ai.Usage - sessionID string - success = true - sawResult bool - lastErr string + text strings.Builder + usage ai.Usage + sessionID string + structured json.RawMessage + subtype string + success = true + sawResult bool + lastErr string ) for ev := range events { switch ev.Kind { @@ -168,6 +178,12 @@ func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, e if ev.SessionID != "" { sessionID = ev.SessionID } + if len(ev.StructuredData) > 0 { + structured = ev.StructuredData + } + if s, ok := ev.Input["subtype"].(string); ok { + subtype = s + } case ai.EventError: lastErr = ev.Error } @@ -177,11 +193,7 @@ func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, e return nil, fmt.Errorf("%w: %s", ai.ErrCLIExecutionFailed, lastErr) } if sawResult && !success { - msg := lastErr - if msg == "" { - msg = "claude-agent returned is_error=true" - } - return nil, fmt.Errorf("%w: %s", ai.ErrCLIExecutionFailed, msg) + return nil, p.resultError(req, subtype, lastErr) } resp := &ai.Response{ @@ -194,25 +206,72 @@ func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, e if sessionID != "" { resp.Raw = map[string]any{"session_id": sessionID} } + if req.Prompt.Schema != nil { + if err := ai.BindStructuredOutput(req.Prompt.Schema, structured); err != nil { + return nil, err + } + resp.StructuredData = req.Prompt.Schema + resp.Text = "" + } else if len(req.Prompt.SchemaJSON) > 0 && len(structured) > 0 { + // A pre-built JSON schema has no Go target to bind into; surface the raw + // structured JSON and leave it on Text for tolerant decoders. + resp.StructuredData = structured + resp.Text = string(structured) + } return resp, nil } +// resultError builds the failure error for a turn that finished with is_error. +// A structured-output run that exhausted its validation retries reports a +// schema-validation failure so the caller can tell it apart from an agent crash. +func (p *Provider) resultError(req ai.Request, subtype, lastErr string) error { + if req.Prompt.Schema != nil && subtype == "error_max_structured_output_retries" { + return fmt.Errorf("%w: claude-agent could not produce output matching the schema after its retry limit", ai.ErrSchemaValidation) + } + msg := lastErr + if msg == "" { + msg = "claude-agent returned is_error=true" + } + return fmt.Errorf("%w: %s", ai.ErrCLIExecutionFailed, msg) +} + // ExecuteStream pushes one user turn to the SDK session and streams the mapped // events back. Turns are serialized via turnMu so the single SDK session is // never driven by two prompts at once. func (p *Provider) ExecuteStream(ctx context.Context, req ai.Request) (<-chan ai.Event, error) { - if req.Prompt.Schema != nil { - return nil, fmt.Errorf("claude-agent stream mode does not support StructuredOutput") + schema, err := requestSchemaJSON(req) + if err != nil { + return nil, err } + // The SDK's outputFormat is fixed for the whole query() session, so the first + // turn pins the schema and every later turn must match it (a text turn on a + // structured session, or a differing schema, cannot be honoured). + p.sessionSchemaOnce.Do(func() { p.sessionSchema = schema }) + if err := p.ensureStarted(req); err != nil { return nil, err } + if !bytes.Equal(schema, p.sessionSchema) { + return nil, fmt.Errorf("claude-agent: structured-output schema is fixed when the session starts and cannot change between turns") + } events := make(chan ai.Event, 16) go p.runTurn(ctx, req, events) return events, nil } +// requestSchemaJSON derives the JSON schema captain sends to the SDK from the +// request's structured-output target (a reflected Go struct or a verbatim +// Prompt.SchemaJSON), or nil for a text-mode request. A non-struct target fails +// loudly rather than silently dropping the schema. +func requestSchemaJSON(req ai.Request) (json.RawMessage, error) { + schema, err := ai.SchemaJSONFor(req.Prompt) + if err != nil { + return nil, fmt.Errorf("claude-agent: cannot derive structured-output schema: %w", err) + } + return schema, nil +} + // Close shuts the SDK session down (best-effort shutdown RPC), stops the // supervised process, and cancels the provider's base context. func (p *Provider) Close() error { @@ -335,30 +394,32 @@ func (p *Provider) initializeParams(req ai.Request) initializeParams { } return initializeParams{ - Cwd: req.Context.Dir, + Cwd: req.Cwd(), Model: aliasModel(p.model), SystemPrompt: req.Prompt.System, AppendSystemPrompt: req.Prompt.AppendSystem, AllowedTools: allowed, - MaxTurns: req.MaxTurns, + MaxTurns: req.Budget.MaxTurns, MaxBudgetUsd: p.cfg.Budget.Cost, PermissionMode: mode, Resume: resume, ApprovalMode: approvalMode, + OutputSchema: p.sessionSchema, } } type initializeParams struct { - Cwd string `json:"cwd,omitempty"` - Model string `json:"model,omitempty"` - SystemPrompt string `json:"systemPrompt,omitempty"` - AppendSystemPrompt string `json:"appendSystemPrompt,omitempty"` - AllowedTools []string `json:"allowedTools,omitempty"` - MaxTurns int `json:"maxTurns,omitempty"` - MaxBudgetUsd float64 `json:"maxBudgetUsd,omitempty"` - PermissionMode string `json:"permissionMode,omitempty"` - Resume string `json:"resume,omitempty"` - ApprovalMode string `json:"approvalMode,omitempty"` + Cwd string `json:"cwd,omitempty"` + Model string `json:"model,omitempty"` + SystemPrompt string `json:"systemPrompt,omitempty"` + AppendSystemPrompt string `json:"appendSystemPrompt,omitempty"` + AllowedTools []string `json:"allowedTools,omitempty"` + MaxTurns int `json:"maxTurns,omitempty"` + MaxBudgetUsd float64 `json:"maxBudgetUsd,omitempty"` + PermissionMode string `json:"permissionMode,omitempty"` + Resume string `json:"resume,omitempty"` + ApprovalMode string `json:"approvalMode,omitempty"` + OutputSchema json.RawMessage `json:"outputSchema,omitempty"` } func (p *Provider) setInitResult(err error) { diff --git a/pkg/ai/provider/claudeagent/provider_test.go b/pkg/ai/provider/claudeagent/provider_test.go index 2d5eec2..7de86ff 100644 --- a/pkg/ai/provider/claudeagent/provider_test.go +++ b/pkg/ai/provider/claudeagent/provider_test.go @@ -65,6 +65,10 @@ func runFakeServer() { }}) } + // initHadSchema records whether the host sent an outputSchema on initialize, + // so the "structured" turn can prove the Go→TS schema wiring end to end. + initHadSchema := false + scanner := bufio.NewScanner(os.Stdin) scanner.Buffer(make([]byte, 64*1024), 4*1024*1024) for scanner.Scan() { @@ -72,6 +76,9 @@ func runFakeServer() { ID json.RawMessage `json:"id"` Method string `json:"method"` Result json.RawMessage `json:"result"` + Params struct { + OutputSchema json.RawMessage `json:"outputSchema"` + } `json:"params"` } if err := json.Unmarshal(scanner.Bytes(), &frame); err != nil { continue @@ -85,6 +92,7 @@ func runFakeServer() { } switch frame.Method { case "initialize": + initHadSchema = len(frame.Params.OutputSchema) > 0 enc(map[string]any{"jsonrpc": "2.0", "id": id(frame.ID), "result": map[string]any{"ok": true}}) enc(map[string]any{"jsonrpc": "2.0", "method": "session/init", "params": map[string]any{ "session_id": "fake-sess", "model": "claude-sonnet-4-5", "tools": []string{"Read", "Bash"}, @@ -101,6 +109,18 @@ func runFakeServer() { }}) case "hang": // Emit nothing more; wait for the interrupt control request. + case "structured": + // Complete with a structured_output payload, echoing whether the + // host actually transmitted the schema on initialize. + enc(map[string]any{"jsonrpc": "2.0", "method": "turn/completed", "params": map[string]any{ + "success": true, "session_id": "fake-sess", "cost_usd": 0.01, "subtype": "success", + "usage": map[string]any{"input_tokens": 10, "output_tokens": 5}, + "structured_output": map[string]any{ + "company_name": "Anthropic", + "founded_year": 2021, + "received_schema": initHadSchema, + }, + }}) default: enc(map[string]any{"jsonrpc": "2.0", "method": "message/tool_use", "params": map[string]any{ "tool": "Read", "id": "t1", "input": map[string]any{"file_path": "/x"}, @@ -191,6 +211,77 @@ func TestProvider_ExecuteCoalesce(t *testing.T) { assert.Equal(t, 10, resp.Usage.InputTokens) } +// companyInfo is the structured-output target for the round-trip test. +type companyInfo struct { + CompanyName string `json:"company_name"` + FoundedYear int `json:"founded_year"` + ReceivedSchema bool `json:"received_schema"` +} + +// TestProvider_StructuredOutput drives the structured-output path end to end: the +// provider derives a JSON schema from the target, transmits it on initialize +// (the fake echoes that it arrived), and unmarshals the SDK's structured_output +// back into the caller's Go struct with Text cleared. +func TestProvider_StructuredOutput(t *testing.T) { + withFakeAgentProcessEnv(t, map[string]string{fakeServerEnv: "1", fakeModeEnv: "structured"}) + + p, err := New(ai.Config{Model: api.Model{Name: "claude-agent-sonnet"}}) + require.NoError(t, err) + t.Cleanup(func() { _ = p.Close() }) + + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() + + var out companyInfo + resp, err := p.Execute(ctx, ai.Request{Prompt: api.Prompt{User: "research Anthropic", Schema: &out}}) + require.NoError(t, err) + + assert.True(t, out.ReceivedSchema, "provider should transmit the derived schema on initialize") + assert.Equal(t, "Anthropic", out.CompanyName) + assert.Equal(t, 2021, out.FoundedYear) + + assert.Same(t, &out, resp.StructuredData, "StructuredData points at the populated target") + assert.Empty(t, resp.Text, "structured runs clear the text answer") +} + +// TestRequestSchemaJSON checks the schema captain derives from a structured +// target and that initializeParams carries it as outputSchema. +func TestRequestSchemaJSON(t *testing.T) { + type plan struct { + Summary string `json:"summary"` + Steps []string `json:"steps"` + } + + t.Run("nil target is text mode", func(t *testing.T) { + raw, err := requestSchemaJSON(ai.Request{Prompt: api.Prompt{User: "x"}}) + require.NoError(t, err) + assert.Nil(t, raw) + }) + + t.Run("struct target derives an object schema wired into initializeParams", func(t *testing.T) { + raw, err := requestSchemaJSON(ai.Request{Prompt: api.Prompt{Schema: &plan{}}}) + require.NoError(t, err) + require.NotEmpty(t, raw) + + p := &Provider{model: "claude-agent-sonnet", sessionSchema: raw} + ip := p.initializeParams(ai.Request{Prompt: api.Prompt{User: "x", Schema: &plan{}}}) + require.NotEmpty(t, ip.OutputSchema, "outputSchema should be set from the session schema") + + var decoded map[string]any + require.NoError(t, json.Unmarshal(ip.OutputSchema, &decoded)) + assert.Equal(t, "object", decoded["type"]) + props, ok := decoded["properties"].(map[string]any) + require.True(t, ok) + assert.Contains(t, props, "summary") + assert.Contains(t, props, "steps") + }) + + t.Run("non-struct target fails loudly", func(t *testing.T) { + _, err := requestSchemaJSON(ai.Request{Prompt: api.Prompt{Schema: "not a struct"}}) + require.Error(t, err) + }) +} + func TestProvider_MultiTurnSerialized(t *testing.T) { withFakeAgentProcess(t) diff --git a/pkg/ai/provider/cli.go b/pkg/ai/provider/cli.go index 898b56a..b38d360 100644 --- a/pkg/ai/provider/cli.go +++ b/pkg/ai/provider/cli.go @@ -73,11 +73,14 @@ func HandleExitError(exitCode int, stderr string) error { } } -func runCLI(ctx context.Context, command string, stdinData []byte, cwd string) (stdout []byte, stderr string, err error) { +func runCLI(ctx context.Context, command string, stdinData []byte, cwd string, env ...[]string) (stdout []byte, stderr string, err error) { cmd := exec.CommandContext(ctx, command) if cwd != "" { cmd.Dir = cwd } + if len(env) > 0 && len(env[0]) > 0 { + cmd.Env = env[0] + } // Buffer stdout/stderr instead of using StdoutPipe/StderrPipe: cmd.Wait closes // those pipes when the process exits, so reading them in a goroutine that races diff --git a/pkg/ai/provider/cli_test.go b/pkg/ai/provider/cli_test.go index 335aa90..e5e635c 100644 --- a/pkg/ai/provider/cli_test.go +++ b/pkg/ai/provider/cli_test.go @@ -9,6 +9,7 @@ import ( "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/commons-db/shell" ) func TestParseStderr(t *testing.T) { @@ -73,8 +74,8 @@ func TestGeminiCLIUsesContextDir(t *testing.T) { t.Setenv("PATH", binDir+string(os.PathListSeparator)+os.Getenv("PATH")) resp, err := NewGeminiCLI("gemini-cli-pro").Execute(context.Background(), ai.Request{ - Prompt: api.Prompt{User: "hello"}, - Context: api.Context{Dir: cwd}, + Prompt: api.Prompt{User: "hello"}, + Setup: &shell.Setup{Cwd: cwd}, }) if err != nil { t.Fatalf("Execute: %v", err) diff --git a/pkg/ai/provider/cmux/executor.go b/pkg/ai/provider/cmux/executor.go index 462d098..f66f128 100644 --- a/pkg/ai/provider/cmux/executor.go +++ b/pkg/ai/provider/cmux/executor.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "path/filepath" + "reflect" "regexp" "sort" "strings" @@ -31,11 +32,24 @@ const defaultScreenLines = 120 // a dropped Enter is recovered in seconds rather than tens of seconds. var defaultSessionStartRetryDelays = []time.Duration{2 * time.Second, 4 * time.Second, 8 * time.Second, 15 * time.Second} -// defaultSendSettleDelay is the pause between pasting text onto the surface -// (SendSurface) and pressing Enter (SendKeySurface). cmux can still be applying -// the paste when the Enter arrives, submitting a half-applied buffer or -// swallowing the Enter in paste mode; the settle gives the paste time to land. -const defaultSendSettleDelay = 150 * time.Millisecond +// defaultSendSettleDelay is the settle/quiesce window a send waits for the paste +// to hold stable on the surface before pressing Enter (SendKeySurface). cmux can +// still be applying the paste when the Enter arrives, submitting a half-applied +// buffer or swallowing the Enter in paste mode; requiring the surface to stay +// unchanged for this window gives the paste time to fully land. It is also the +// fixed fallback delay used when the paste is never observed landing (see +// waitForPasteLanded). +const defaultSendSettleDelay = 2 * time.Second + +// defaultPasteLandTimeout bounds how long a send polls for the pasted text to +// render on the surface before giving up and falling back to the fixed settle +// delay + Enter. Generous so a slow claude/codex input event queue still lands the +// paste before the fallback fires. +const defaultPasteLandTimeout = 60 * time.Second + +// defaultPasteLandPollInterval is how often a send re-reads the surface while +// waiting for the paste to land. +const defaultPasteLandPollInterval = 500 * time.Millisecond // defaultREPLReadyTimeout bounds how long the claude launch waits for the REPL's // input prompt to appear before falling back to plain screen-idle detection. @@ -61,8 +75,15 @@ type runConfig struct { // keystroke did not start the turn. Defaults to defaultSessionStartRetryDelays. SessionStartRetryDelays []time.Duration - // SendSettleDelay is the pause between pasting text and pressing Enter. + // SendSettleDelay is the settle/quiesce window between the paste landing and + // pressing Enter (also the fixed fallback when the paste is never observed). SendSettleDelay time.Duration + // PasteLandTimeout bounds how long a send waits for the pasted text to render on + // the surface before falling back to SendSettleDelay and pressing Enter. + PasteLandTimeout time.Duration + // PasteLandPollInterval is how often the send re-reads the surface while waiting + // for the paste to land. + PasteLandPollInterval time.Duration // REPLReadyTimeout bounds the wait for the claude REPL input prompt before // falling back to screen-idle. REPLReadyTimeout time.Duration @@ -216,10 +237,19 @@ type AgentCommandOpts struct { // --disallowedTools. codex ignores them. AllowedTools []string DisallowedTools []string + // Effort maps onto claude --effort (from Spec.Model.Effort). codex ignores it. + Effort api.Effort + // Memory drives claude --bare / --disable-slash-commands / --setting-sources + // (from Spec.Memory). codex ignores it. + Memory api.Memory + // Extra carries the backend's "extra cmux args": *api.ClaudeCmuxOptions for + // claude, *api.CodexCmuxOptions for codex. A nil/mismatched value emits none. + Extra any } // cliPermissionMode maps an api.PermissionMode onto the claude --permission-mode -// flag value. default/auto/"" all collapse to "default". +// flag value. Unset/"" collapses to "default"; every recognised mode passes +// through to its CLI-native value. func cliPermissionMode(m api.PermissionMode) string { switch m { case api.PermissionPlan: @@ -228,6 +258,10 @@ func cliPermissionMode(m api.PermissionMode) string { return "acceptEdits" case api.PermissionBypass: return "bypassPermissions" + case api.PermissionAuto: + return "auto" + case api.PermissionDontAsk: + return "dontAsk" default: return "default" } @@ -236,17 +270,21 @@ func cliPermissionMode(m api.PermissionMode) string { func AgentCommand(opts AgentCommandOpts) string { switch opts.Agent { case "codex": + tokens := []string{"codex"} if opts.Model != "" { - return "codex -m " + opts.Model + tokens = append(tokens, "-m", opts.Model) } - return "codex" + if extra, ok := opts.Extra.(*api.CodexCmuxOptions); ok && extra != nil { + tokens = append(tokens, flagArgs(*extra)...) + } + return joinCommand(tokens) default: - cmd := "claude" + tokens := []string{"claude"} if opts.SessionID != "" { if opts.Resume { - cmd += " --resume " + opts.SessionID + tokens = append(tokens, "--resume", opts.SessionID) } else { - cmd += " --session-id " + opts.SessionID + tokens = append(tokens, "--session-id", opts.SessionID) } } mode := opts.PermissionMode @@ -254,25 +292,115 @@ func AgentCommand(opts AgentCommandOpts) string { mode = api.PermissionPlan } if opts.Plan || opts.PermissionMode != "" { - cmd += " --permission-mode " + cliPermissionMode(mode) + tokens = append(tokens, "--permission-mode", cliPermissionMode(mode)) } if len(opts.AllowedTools) > 0 { - cmd += " --allowedTools " + strings.Join(opts.AllowedTools, ",") + tokens = append(tokens, "--allowedTools", strings.Join(opts.AllowedTools, ",")) } if len(opts.DisallowedTools) > 0 { - cmd += " --disallowedTools " + strings.Join(opts.DisallowedTools, ",") + tokens = append(tokens, "--disallowedTools", strings.Join(opts.DisallowedTools, ",")) } if opts.Model != "" { - cmd += " --model " + opts.Model + tokens = append(tokens, "--model", opts.Model) + } + if opts.Effort != "" { + tokens = append(tokens, "--effort", string(opts.Effort)) + } + tokens = append(tokens, claudeMemoryArgs(opts.Memory)...) + if extra, ok := opts.Extra.(*api.ClaudeCmuxOptions); ok && extra != nil { + tokens = append(tokens, flagArgs(*extra)...) + } + return joinCommand(tokens) + } +} + +// claudeMemoryArgs maps Spec.Memory toggles onto claude flags: Bare -> --bare, +// SkipSkills -> --disable-slash-commands, and SkipProject/SkipUser -> a narrowed +// --setting-sources list. SkipHooks/SkipMemory have no granular claude flag (only +// --bare covers them), so they are intentionally not emitted here. +func claudeMemoryArgs(m api.Memory) []string { + var args []string + if m.Bare { + args = append(args, "--bare") + } + if m.SkipSkills { + args = append(args, "--disable-slash-commands") + } + if m.SkipProject || m.SkipUser { + var sources []string + if !m.SkipUser { + sources = append(sources, "user") + } + if !m.SkipProject { + sources = append(sources, "project", "local") + } + if len(sources) > 0 { + args = append(args, "--setting-sources", strings.Join(sources, ",")) + } + } + return args +} + +// flagArgs renders the "extra cmux args" from a struct's `flag:` tags and current +// field values: bools emit "--flag" when true, strings emit "--flag value" when +// non-empty, and []string emit "--flag v1 v2 ..." (the repeatable/space form both +// CLIs accept). Fields emit in declaration order (matching the clicky form order). +func flagArgs(v any) []string { + rv := reflect.ValueOf(v) + rt := rv.Type() + var args []string + for i := 0; i < rt.NumField(); i++ { + flag := rt.Field(i).Tag.Get("flag") + if flag == "" { + continue + } + field := rv.Field(i) + switch field.Kind() { + case reflect.Bool: + if field.Bool() { + args = append(args, "--"+flag) + } + case reflect.String: + if s := field.String(); s != "" { + args = append(args, "--"+flag, s) + } + case reflect.Slice: + if field.Len() == 0 { + continue + } + args = append(args, "--"+flag) + for j := 0; j < field.Len(); j++ { + args = append(args, field.Index(j).String()) + } } - return cmd } + return args +} + +// joinCommand renders command tokens into the single shell string pasted onto the +// cmux surface, single-quoting any token that isn't a bare shell-safe word so +// values with spaces or metacharacters (system prompts, JSON settings) survive. +func joinCommand(tokens []string) string { + quoted := make([]string, len(tokens)) + for i, t := range tokens { + quoted[i] = shellQuoteIfNeeded(t) + } + return strings.Join(quoted, " ") +} + +var shellSafeToken = regexp.MustCompile(`^[A-Za-z0-9_@%+=:,./-]+$`) + +func shellQuoteIfNeeded(s string) string { + if s != "" && shellSafeToken.MatchString(s) { + return s + } + return shellSingleQuote(s) } // withEnv prepends KEY='value' assignments (sorted by key for deterministic // output) to the agent launch command so the terminal shell exports them to the // agent process, whose tool children inherit them. The host supplies the env via -// req.Context.Env. +// the prepared setup on api.Spec. func withEnv(command string, env map[string]string) string { if len(env) == 0 { return command @@ -424,6 +552,20 @@ func (r *run) screenLines() int { return defaultScreenLines } +func (r *run) pasteLandTimeout() time.Duration { + if r.cfg.PasteLandTimeout > 0 { + return r.cfg.PasteLandTimeout + } + return defaultPasteLandTimeout +} + +func (r *run) pasteLandPollInterval() time.Duration { + if r.cfg.PasteLandPollInterval > 0 { + return r.cfg.PasteLandPollInterval + } + return defaultPasteLandPollInterval +} + func sleepContext(ctx context.Context, delay time.Duration) error { if delay <= 0 { return nil diff --git a/pkg/ai/provider/cmux/executor_test.go b/pkg/ai/provider/cmux/executor_test.go index 549266b..2507ef6 100644 --- a/pkg/ai/provider/cmux/executor_test.go +++ b/pkg/ai/provider/cmux/executor_test.go @@ -6,6 +6,7 @@ import ( "strings" "testing" + "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/api" ) @@ -24,9 +25,19 @@ func TestAgentCommand(t *testing.T) { {"claude model flag", AgentCommandOpts{Agent: "claude", Model: "opus"}, "claude --model opus"}, {"claude no permission flag when unset", AgentCommandOpts{Agent: "claude", SessionID: "s"}, "claude --session-id s"}, {"claude full", AgentCommandOpts{Agent: "claude", SessionID: "s", PermissionMode: api.PermissionAcceptEdits, AllowedTools: []string{"Read"}, Model: "opus"}, "claude --session-id s --permission-mode acceptEdits --allowedTools Read --model opus"}, + {"claude effort flag", AgentCommandOpts{Agent: "claude", Effort: api.EffortHigh}, "claude --effort high"}, + {"claude bare memory", AgentCommandOpts{Agent: "claude", Memory: api.Memory{Bare: true}}, "claude --bare"}, + {"claude skip skills", AgentCommandOpts{Agent: "claude", Memory: api.Memory{SkipSkills: true}}, "claude --disable-slash-commands"}, + {"claude skip project narrows sources", AgentCommandOpts{Agent: "claude", Memory: api.Memory{SkipProject: true}}, "claude --setting-sources user"}, + {"claude skip user narrows sources", AgentCommandOpts{Agent: "claude", Memory: api.Memory{SkipUser: true}}, "claude --setting-sources project,local"}, + {"claude dontAsk mode", AgentCommandOpts{Agent: "claude", PermissionMode: api.PermissionDontAsk}, "claude --permission-mode dontAsk"}, + {"claude extra args quote values", AgentCommandOpts{Agent: "claude", Extra: &api.ClaudeCmuxOptions{AddDir: []string{"pkg", "cmd"}, StrictMCPConfig: true, AppendSystem: "be terse"}}, "claude --add-dir pkg cmd --strict-mcp-config --append-system-prompt 'be terse'"}, + {"claude ignores codex extras", AgentCommandOpts{Agent: "claude", Extra: &api.CodexCmuxOptions{Search: true}}, "claude"}, {"codex bare", AgentCommandOpts{Agent: "codex"}, "codex"}, {"codex with model", AgentCommandOpts{Agent: "codex", Model: "gpt-5"}, "codex -m gpt-5"}, {"codex ignores tools and permission", AgentCommandOpts{Agent: "codex", AllowedTools: []string{"Read"}, PermissionMode: api.PermissionPlan}, "codex"}, + {"codex extra posture and flags", AgentCommandOpts{Agent: "codex", Model: "gpt-5", Extra: &api.CodexCmuxOptions{Sandbox: api.CodexSandboxWorkspaceWrite, AskForApproval: api.CodexApprovalOnRequest, Search: true}}, "codex -m gpt-5 --sandbox workspace-write --ask-for-approval on-request --search"}, + {"codex ignores claude extras", AgentCommandOpts{Agent: "codex", Extra: &api.ClaudeCmuxOptions{AddDir: []string{"x"}}}, "codex"}, } for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { @@ -43,7 +54,8 @@ func TestCLIPermissionMode(t *testing.T) { api.PermissionAcceptEdits: "acceptEdits", api.PermissionBypass: "bypassPermissions", api.PermissionDefault: "default", - api.PermissionAuto: "default", + api.PermissionAuto: "auto", + api.PermissionDontAsk: "dontAsk", "": "default", } for mode, want := range cases { @@ -53,6 +65,47 @@ func TestCLIPermissionMode(t *testing.T) { } } +func TestCmuxExtraArgs(t *testing.T) { + // codex seeds sandbox/approval from the permission posture when unset. + seeded, err := cmuxExtraArgs("codex", ai.Request{Permissions: api.Permissions{Mode: api.PermissionBypass}}) + if err != nil { + t.Fatalf("cmuxExtraArgs: %v", err) + } + codex, ok := seeded.(*api.CodexCmuxOptions) + if !ok { + t.Fatalf("got %T, want *api.CodexCmuxOptions", seeded) + } + if codex.Sandbox != api.CodexSandboxDangerFull || codex.AskForApproval != api.CodexApprovalNever { + t.Errorf("seeded posture = (%q, %q), want (danger-full-access, never)", codex.Sandbox, codex.AskForApproval) + } + + // An explicit CLIArgs sandbox overrides the seed; approval still seeds. + override, err := cmuxExtraArgs("codex", ai.Request{ + Permissions: api.Permissions{Mode: api.PermissionBypass}, + CLIArgs: map[string]any{"sandbox": "read-only"}, + }) + if err != nil { + t.Fatalf("cmuxExtraArgs override: %v", err) + } + codex = override.(*api.CodexCmuxOptions) + if codex.Sandbox != api.CodexSandboxReadOnly { + t.Errorf("override sandbox = %q, want read-only", codex.Sandbox) + } + if codex.AskForApproval != api.CodexApprovalNever { + t.Errorf("seeded approval = %q, want never", codex.AskForApproval) + } + + // claude decodes CLIArgs into the claude option struct. + claudeAny, err := cmuxExtraArgs("claude", ai.Request{CLIArgs: map[string]any{"addDir": []any{"pkg"}, "strictMcpConfig": true}}) + if err != nil { + t.Fatalf("cmuxExtraArgs claude: %v", err) + } + claude := claudeAny.(*api.ClaudeCmuxOptions) + if len(claude.AddDir) != 1 || claude.AddDir[0] != "pkg" || !claude.StrictMCPConfig { + t.Errorf("claude decode = %+v, want AddDir=[pkg] StrictMCPConfig=true", claude) + } +} + func TestWithEnvSortsAndQuotes(t *testing.T) { got := withEnv("claude", map[string]string{"B": "2", "A": "o'clock"}) want := `A='o'\''clock' B='2' claude` diff --git a/pkg/ai/provider/cmux/provider.go b/pkg/ai/provider/cmux/provider.go index de3f689..88aecd6 100644 --- a/pkg/ai/provider/cmux/provider.go +++ b/pkg/ai/provider/cmux/provider.go @@ -14,6 +14,7 @@ package cmux import ( "context" + "encoding/json" "errors" "fmt" "strings" @@ -74,11 +75,12 @@ func (p *Provider) GetBackend() ai.Backend { return api.BackendClaudeCmux } -// Execute drains its own ExecuteStream into a buffered ai.Response. +// Execute drains its own ExecuteStream into a buffered ai.Response. cmux cannot +// constrain output natively, so a structured-output request is served by +// appending a schema instruction to the prompt (see ExecuteStream) and +// extracting the JSON object from the reply here. func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, error) { - if req.Prompt.Schema != nil { - return nil, fmt.Errorf("cmux provider does not support StructuredOutput") - } + schemaRequested := req.Prompt.HasSchema() start := time.Now() events, err := p.ExecuteStream(ctx, req) if err != nil { @@ -136,14 +138,20 @@ func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, e if sessionID != "" { resp.Raw = map[string]any{"session_id": sessionID} } + if schemaRequested { + if obj, ok := ai.ExtractJSONObject(resp.Text); ok { + resp.StructuredData = json.RawMessage(obj) + } + } return resp, nil } // ExecuteStream drives one cmux run in a goroutine and streams ai.Events on a // buffered channel, closing it when done (always after exactly one EventResult). func (p *Provider) ExecuteStream(ctx context.Context, req ai.Request) (<-chan ai.Event, error) { - if req.Prompt.Schema != nil { - return nil, fmt.Errorf("cmux provider does not support StructuredOutput") + req, err := withSchemaPrompt(req) + if err != nil { + return nil, err } if req.Prompt.User == "" { return nil, fmt.Errorf("cmux provider: prompt is required") @@ -153,6 +161,23 @@ func (p *Provider) ExecuteStream(ctx context.Context, req ai.Request) (<-chan ai return events, nil } +// withSchemaPrompt makes a structured-output request runnable on cmux (which +// cannot enforce a schema natively) by appending a JSON-only schema instruction +// to the user prompt and clearing the native schema fields so the run is a plain +// text turn. The reply's JSON is recovered in Execute. +func withSchemaPrompt(req ai.Request) (ai.Request, error) { + schema, err := ai.SchemaJSONFor(req.Prompt) + if err != nil { + return req, err + } + if len(schema) > 0 { + req.Prompt.User = strings.TrimRight(req.Prompt.User, "\n") + "\n\n" + ai.SchemaInstruction(string(schema)) + } + req.Prompt.Schema = nil + req.Prompt.SchemaJSON = nil + return req, nil +} + // drive runs the session and translates its outcome into the single terminal // EventResult (preceded by an EventError on failure) before closing the channel. func (p *Provider) drive(ctx context.Context, req ai.Request, events chan ai.Event) { @@ -173,6 +198,47 @@ func (p *Provider) drive(ctx context.Context, req ai.Request, events chan ai.Eve emit(ctx, events, ai.Event{Kind: ai.EventResult, Success: true, Usage: usage, CostUSD: cost, Model: p.model}) } +// cmuxExtraArgs decodes req.CLIArgs into the backend's typed "extra cmux args" +// struct. For codex it seeds the sandbox/approval posture from Permissions.Mode +// (via api.CodexSafety) when the caller left them unset, so an unspecified form +// still reflects the run's permission posture while an explicit value overrides it. +func cmuxExtraArgs(agent string, req ai.Request) (any, error) { + switch agent { + case "codex": + opts := api.CodexCmuxOptions{} + if err := decodeCLIArgs(req.CLIArgs, &opts); err != nil { + return nil, err + } + sandbox, approval := api.CodexSafety(req.Permissions) + if opts.Sandbox == "" { + opts.Sandbox = sandbox + } + if opts.AskForApproval == "" { + opts.AskForApproval = approval + } + return &opts, nil + default: + opts := api.ClaudeCmuxOptions{} + if err := decodeCLIArgs(req.CLIArgs, &opts); err != nil { + return nil, err + } + return &opts, nil + } +} + +// decodeCLIArgs round-trips the free-form CLIArgs map through JSON into the typed +// option struct, failing loud on a type mismatch rather than silently dropping it. +func decodeCLIArgs(args map[string]any, out any) error { + if len(args) == 0 { + return nil + } + data, err := json.Marshal(args) + if err != nil { + return err + } + return json.Unmarshal(data, out) +} + // execute mirrors gavel's CmuxExecutor.ExecuteGroup: it ensures a workspace + // surface, launches the agent, submits the prompt, and (for claude) tails the // session log under a stall watchdog. It returns the run's usage/cost on success, @@ -181,7 +247,7 @@ func (p *Provider) execute(ctx context.Context, req ai.Request, r *run) (*ai.Usa start := time.Now() agent := p.agent model := modelFlag(agent, p.model) - workDir := groupWorkDir(req.Context.Dir) + workDir := groupWorkDir(req.Cwd()) // Resolve the Claude session id. Resume reuses req.SessionID (launch with // --resume, tail from the end). A fresh run pre-generates one (or takes @@ -203,6 +269,10 @@ func (p *Provider) execute(ctx context.Context, req ai.Request, r *run) (*ai.Usa r.emit(ai.Event{Kind: ai.EventSystem, SessionID: sessionID}) } + extra, err := cmuxExtraArgs(agent, req) + if err != nil { + return nil, 0, fmt.Errorf("cmux: invalid cliArgs: %w", err) + } agentCommand := withEnv(AgentCommand(AgentCommandOpts{ Agent: agent, Model: model, @@ -212,17 +282,24 @@ func (p *Provider) execute(ctx context.Context, req ai.Request, r *run) (*ai.Usa PermissionMode: req.Permissions.Mode, AllowedTools: req.Permissions.Tools.Allow, DisallowedTools: req.Permissions.Tools.Deny, - }), req.Context.Env) + Effort: req.Effort, + Memory: req.Memory, + Extra: extra, + }), req.EnvMap()) timeout := r.timeout() - log.Infof("cmux: dispatching with %s in %s", agent, workDir) + // ctxLog routes internal step-by-step narration to the run's clicky task + // (its own buffered trace log) when one is attached to ctx, falling back to + // the plain "cmux" logger for callers with no task (e.g. bare-CLI runs). + ctxLog := ai.LoggerFromContext(ctx, log) + log.Infof("cmux: dispatching with %s (model=%s) in %s", agent, model, workDir) log.Debugf("cmux command: cmux ping") if err := r.client.Available(ctx); err != nil { return nil, 0, err } name := AgentWorkspaceName(workDir, agent) - log.Infof("cmux: ensuring workspace %q for %s", name, agent) + ctxLog.Tracef("cmux: ensuring workspace %q for %s", name, agent) workspace, reused, err := r.client.EnsureWorkspace(ctx, EnsureWorkspaceOpts{ Cwd: workDir, Name: name, @@ -233,12 +310,12 @@ func (p *Provider) execute(ctx context.Context, req ai.Request, r *run) (*ai.Usa return nil, 0, err } if reused { - log.Infof("cmux: reusing workspace %s", workspace.String()) + ctxLog.Tracef("cmux: reusing workspace %s", workspace.String()) } else { - log.Infof("cmux: created workspace %s", workspace.String()) + ctxLog.Tracef("cmux: created workspace %s", workspace.String()) } - log.Infof("cmux: creating %s terminal surface in workspace %s", agent, workspace.String()) + ctxLog.Tracef("cmux: creating %s terminal surface in workspace %s", agent, workspace.String()) ref, err := r.client.NewSurface(ctx, NewSurfaceOpts{ WorkspaceRef: workspace.String(), Cwd: workDir, @@ -249,19 +326,19 @@ func (p *Provider) execute(ctx context.Context, req ai.Request, r *run) (*ai.Usa return nil, 0, err } - log.Infof("cmux: waiting for terminal surface to stabilize before launching %s", agent) + ctxLog.Tracef("cmux: waiting for terminal surface to stabilize before launching %s", agent) beforeAgentScreen, err := r.waitForScreenIdle(ctx, ref, "before agent launch", timeout, "", false) if err != nil { return nil, 0, err } - if err := r.sendSurfaceText(ctx, ref.String(), ref.SurfaceID, "agent command", agentCommand); err != nil { + if err := r.sendSurfaceText(ctx, ref, "agent command", agentCommand); err != nil { return nil, 0, err } // Wait until the agent is ready for the prompt. claude gates on a positive // REPL-readiness signal (its input prompt appearing); codex keeps screen-idle. - log.Infof("cmux: waiting for %s to be ready for the prompt", agent) + ctxLog.Tracef("cmux: waiting for %s to be ready for the prompt", agent) var beforePromptScreen string if agent == "claude" { if _, err := r.waitForREPLReady(ctx, ref, timeout, beforeAgentScreen); err != nil { @@ -318,10 +395,15 @@ func (p *Provider) execute(ctx context.Context, req ai.Request, r *run) (*ai.Usa } // codex: no session log to tail, so completion is the screen settling. - if err := r.sendSurfaceText(ctx, ref.String(), ref.SurfaceID, "initial prompt", instruction); err != nil { + // + // codex has no session log, so submission confirmation is purely the surface + // advancing past the just-submitted screen. submitAndConfirm re-presses Enter + // until it does, closing the silent no-submit where waitForScreenIdle would + // otherwise settle on the typed-but-unsent prompt and report success. + if err := r.submitAndConfirm(ctx, ref, "initial prompt", instruction, submitConfirm{}); err != nil { return nil, 0, err } - log.Infof("cmux: waiting for %s screen to change and stabilize after prompt dispatch", agent) + ctxLog.Tracef("cmux: waiting for %s screen to change and stabilize after prompt dispatch", agent) if _, err := r.waitForScreenIdle(ctx, ref, "after prompt dispatch", timeout, beforePromptScreen, true); err != nil { return nil, 0, err } diff --git a/pkg/ai/provider/cmux/provider_test.go b/pkg/ai/provider/cmux/provider_test.go index 077ec75..4f777f4 100644 --- a/pkg/ai/provider/cmux/provider_test.go +++ b/pkg/ai/provider/cmux/provider_test.go @@ -3,13 +3,47 @@ package cmux import ( "context" "errors" + "strings" "testing" "time" "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/commons-db/shell" ) +func TestWithSchemaPrompt(t *testing.T) { + // A raw JSON schema is appended to the prompt and the native fields cleared, + // so the cmux run is a plain text turn that still asks for JSON. + req := ai.Request{Prompt: api.Prompt{ + User: "review the diff", + SchemaJSON: []byte(`{"type":"object","required":["pass"]}`), + }} + got, err := withSchemaPrompt(req) + if err != nil { + t.Fatalf("withSchemaPrompt: %v", err) + } + if got.Prompt.Schema != nil || got.Prompt.SchemaJSON != nil { + t.Errorf("native schema fields must be cleared, got Schema=%v SchemaJSON=%s", got.Prompt.Schema, got.Prompt.SchemaJSON) + } + if !strings.Contains(got.Prompt.User, "review the diff") { + t.Errorf("original prompt lost: %q", got.Prompt.User) + } + if !strings.Contains(got.Prompt.User, `"required":["pass"]`) { + t.Errorf("schema not appended to prompt: %q", got.Prompt.User) + } + + // A text-mode request is returned unchanged. + plain := ai.Request{Prompt: api.Prompt{User: "hi"}} + got, err = withSchemaPrompt(plain) + if err != nil { + t.Fatalf("withSchemaPrompt(text): %v", err) + } + if got.Prompt.User != "hi" { + t.Errorf("text prompt altered: %q", got.Prompt.User) + } +} + func TestNewDerivesAgentAndBackend(t *testing.T) { cases := []struct { name string @@ -46,17 +80,6 @@ func TestNewRejectsUnsupportedBackend(t *testing.T) { } } -func TestExecuteStreamRejectsStructuredOutput(t *testing.T) { - p, err := New(ai.Config{Model: api.Model{Name: "claude", Backend: api.BackendClaudeCmux}}) - if err != nil { - t.Fatalf("New() error = %v", err) - } - req := ai.Request{Prompt: api.Prompt{User: "hi", Schema: struct{ X int }{}}} - if _, err := p.ExecuteStream(context.Background(), req); err == nil { - t.Fatal("ExecuteStream() error = nil, want StructuredOutput rejection") - } -} - func TestExecuteStreamRequiresPrompt(t *testing.T) { p, err := New(ai.Config{Model: api.Model{Name: "claude", Backend: api.BackendClaudeCmux}}) if err != nil { @@ -86,7 +109,7 @@ func TestExecuteFailsLoudWhenCmuxUnavailable(t *testing.T) { r := newTestRun(runConfig{}, func(_ context.Context, _, _ string, _ time.Duration, args ...string) (string, error) { return "", errors.New("cmux not running") }) - if _, _, err := p.execute(context.Background(), ai.Request{Prompt: api.Prompt{User: "hi"}, Context: api.Context{Dir: t.TempDir()}}, r); err == nil { + if _, _, err := p.execute(context.Background(), ai.Request{Prompt: api.Prompt{User: "hi"}, Setup: &shell.Setup{Cwd: t.TempDir()}}, r); err == nil { t.Fatal("execute() error = nil, want a failure when cmux ping fails") } } diff --git a/pkg/ai/provider/cmux/stall.go b/pkg/ai/provider/cmux/stall.go index 328fa3c..177afff 100644 --- a/pkg/ai/provider/cmux/stall.go +++ b/pkg/ai/provider/cmux/stall.go @@ -35,6 +35,23 @@ var errSessionStalled = errors.New("claude session stalled: no log or surface ac // the signal that the turn is paused awaiting a human allow/deny. var approvalPromptRe = regexp.MustCompile(`(?i)\bdo you want to\b`) +// planKeepPlanningRe / planAutoAcceptRe match the two option labels that co-occur +// only in claude's ExitPlanMode approval dialog ("Yes, and auto-accept edits" / +// "No, keep planning"). "keep planning" is unique to that dialog; "auto-accept +// edits" also appears on the *persistent* acceptEdits mode indicator ("⏵⏵ +// auto-accept edits on"), so requiring BOTH excludes the indicator — keying on +// "auto-accept edits" alone would treat every acceptEdits-mode run as permanently +// awaiting a human and disable stall detection. +var planKeepPlanningRe = regexp.MustCompile(`(?i)\bkeep planning\b`) +var planAutoAcceptRe = regexp.MustCompile(`(?i)auto-accept edits`) + +// isPlanApprovalDialog reports whether the surface shows claude's ExitPlanMode +// plan-approval dialog, which pauses a plan-mode turn awaiting the user's decision +// to proceed (approve, switching to acceptEdits) or keep planning (reject). +func isPlanApprovalDialog(screen string) bool { + return planKeepPlanningRe.MatchString(screen) && planAutoAcceptRe.MatchString(screen) +} + // awaitWithStallWatchdog runs awaitSessionCompletion under a dual-signal stall // watchdog. A watcher goroutine samples the session jsonl (log byte-growth and // the accumulator's last-activity time) and the cmux surface (readScreen); if @@ -183,7 +200,7 @@ func (w *stallWatchdog) fingerprint(screen string) stallSignal { // awaitingHuman reports whether the turn is paused on a human: a tool-permission // dialog on the surface, an approval already in flight, or an ask-tool state. func (w *stallWatchdog) awaitingHuman(screen string) bool { - if approvalPromptRe.MatchString(screen) || w.approving.Load() { + if approvalPromptRe.MatchString(screen) || isPlanApprovalDialog(screen) || w.approving.Load() { return true } if w.acc != nil && w.acc.state() == sessionStateAsk { @@ -207,16 +224,13 @@ func (w *stallWatchdog) markAwaitingHuman() { // at most once per dialog. With no broker the dialog is left up for an // interactive terminal user to answer (the stall clock is held by awaitingHuman). func (w *stallWatchdog) maybeRequestApproval(ctx context.Context, screen string) { - if !approvalPromptRe.MatchString(screen) { - return - } - if w.r.canUseTool == nil { + req, ok := detectApprovalRequest(w.sessionID, screen) + if !ok || w.r.canUseTool == nil { return } if !w.approving.CompareAndSwap(false, true) { return } - req := parseApprovalRequest(w.sessionID, screen) w.r.approvals.Add(1) go func() { defer w.r.approvals.Done() @@ -225,12 +239,26 @@ func (w *stallWatchdog) maybeRequestApproval(ctx context.Context, screen string) }() } +// detectApprovalRequest recognises either claude dialog awaiting an allow/deny and +// builds the matching PermissionRequest. The plan dialog is checked first: it is the +// more specific match and its header can also satisfy approvalPromptRe, so ordering +// keeps a plan approval labelled ExitPlanMode rather than a generic tool. +func detectApprovalRequest(sessionID, screen string) (ai.PermissionRequest, bool) { + if isPlanApprovalDialog(screen) { + return parsePlanApprovalRequest(sessionID), true + } + if approvalPromptRe.MatchString(screen) { + return parseApprovalRequest(sessionID, screen), true + } + return ai.PermissionRequest{}, false +} + // handleApproval brokers a tool-permission request via the CanUseTool callback // and applies the decision on the surface: Enter accepts the highlighted "Yes", // Escape cancels (deny). It emits an EventPermission first so the host can observe // what is awaiting approval, then blocks on the callback (which honours ctx). func (r *run) handleApproval(ctx context.Context, ref WorkspaceRef, req ai.PermissionRequest) { - log.Infof("cmux: session %s awaiting tool-permission approval: %s", req.SessionID, approvalSummary(req)) + log.Infof("cmux: session %s awaiting tool-permission approval: %s", req.SessionID, screenSnippet(approvalSummary(req))) r.emit(ai.Event{Kind: ai.EventPermission, Tool: req.Tool, Input: req.Input}) if r.canUseTool == nil { return @@ -253,6 +281,18 @@ func (r *run) handleApproval(ctx context.Context, ref WorkspaceRef, req ai.Permi } } +// parsePlanApprovalRequest builds a PermissionRequest for claude's ExitPlanMode +// plan-approval dialog. The full plan lives in the session log (surfaced separately +// by the host), so the request carries only a human-readable summary; Tool is +// "ExitPlanMode" to match the session-log tool name and the host's ask-tool set. +func parsePlanApprovalRequest(sessionID string) ai.PermissionRequest { + return ai.PermissionRequest{ + SessionID: sessionID, + Tool: "ExitPlanMode", + Input: map[string]any{"prompt": "Claude finished planning; approve to proceed (auto-accept edits) or deny to keep planning"}, + } +} + // parseApprovalRequest builds a PermissionRequest from the dialog text on the // surface. The tool and input are best-effort — the cmux surface carries only // rendered text — but enough for the host to show what is being approved. diff --git a/pkg/ai/provider/cmux/stall_test.go b/pkg/ai/provider/cmux/stall_test.go index 166b8e6..1954404 100644 --- a/pkg/ai/provider/cmux/stall_test.go +++ b/pkg/ai/provider/cmux/stall_test.go @@ -7,12 +7,30 @@ import ( "os" "path/filepath" "sync" + "sync/atomic" "testing" "time" "github.com/flanksource/captain/pkg/ai" ) +// planApprovalScreen is claude's ExitPlanMode plan-approval dialog as rendered on +// the cmux surface: a plan followed by the three-option select. +const planApprovalScreen = `╭─────────────────────────────────────╮ +│ Ready to code? │ +│ Here is Claude's plan: │ +│ 1. Do the thing │ +│ Would you like to proceed? │ +│ ❯ 1. Yes, and auto-accept edits │ +│ 2. Yes, and manually approve edits │ +│ 3. No, keep planning │ +╰─────────────────────────────────────╯` + +// acceptEditsIndicatorScreen is the *persistent* mode indicator shown after a run +// switches to acceptEdits — it contains "auto-accept edits" but is NOT a dialog, so +// it must not be treated as awaiting a human (else stall detection is disabled). +const acceptEditsIndicatorScreen = "⏵⏵ auto-accept edits on (shift+tab to cycle)\nclaude working, no surface change" + // stallRunner is a thread-safe cmux Runner for the watchdog tests: it serves a // (possibly per-call changing) read-screen and counts the Enter/Escape keys the // watchdog and approval handler send. @@ -107,6 +125,193 @@ func TestApprovalPromptRe(t *testing.T) { } } +func TestIsPlanApprovalDialog(t *testing.T) { + cases := []struct { + name string + screen string + want bool + }{ + {"plan dialog", planApprovalScreen, true}, + {"mode indicator only", acceptEditsIndicatorScreen, false}, + {"tool edit dialog", "│ Do you want to make this edit to foo.go? │", false}, + {"header without options", "Would you like to proceed?", false}, + {"keep planning without auto-accept", "❯ 3. No, keep planning", false}, + {"empty", "", false}, + {"working", "claude is working", false}, + } + for _, tc := range cases { + if got := isPlanApprovalDialog(tc.screen); got != tc.want { + t.Errorf("isPlanApprovalDialog(%s) = %v, want %v", tc.name, got, tc.want) + } + } +} + +func TestDetectApprovalRequest(t *testing.T) { + cases := []struct { + name string + screen string + wantOK bool + wantTool string + }{ + {"plan dialog", planApprovalScreen, true, "ExitPlanMode"}, + {"edit dialog", "Do you want to make this edit to foo.go?", true, "Edit"}, + // A plan dialog whose header also matches approvalPromptRe must stay labelled + // ExitPlanMode (plan-first precedence), not the generic tool. + {"plan dialog with do-you-want header", planApprovalScreen + "\nDo you want to proceed?", true, "ExitPlanMode"}, + {"working screen", "claude working, no surface change", false, ""}, + } + for _, tc := range cases { + req, ok := detectApprovalRequest("sess", tc.screen) + if ok != tc.wantOK { + t.Fatalf("detectApprovalRequest(%s) ok = %v, want %v", tc.name, ok, tc.wantOK) + } + if ok && req.Tool != tc.wantTool { + t.Errorf("detectApprovalRequest(%s) tool = %q, want %q", tc.name, req.Tool, tc.wantTool) + } + } +} + +func TestHandleApprovalPlanAllowSendsEnter(t *testing.T) { + runner := &stallRunner{} + r, events := recordingRun(runConfig{}, runner.run) + r.canUseTool = func(_ context.Context, _ ai.PermissionRequest) (ai.PermissionDecision, error) { + return ai.PermissionDecision{Allow: true}, nil + } + + r.handleApproval(context.Background(), testSurface, parsePlanApprovalRequest("plan-allow")) + + if runner.enterCount() != 1 { + t.Fatalf("approve key sent %d times, want 1 (Enter selects auto-accept edits)", runner.enterCount()) + } + if runner.escapeCount() != 0 { + t.Fatalf("escape sent on plan approve: %d", runner.escapeCount()) + } + if !hasPermissionEvent(*events, "ExitPlanMode") { + t.Fatalf("no EventPermission emitted for ExitPlanMode, got %v", *events) + } +} + +func TestHandleApprovalPlanDenyKeepsPlanning(t *testing.T) { + runner := &stallRunner{} + r, events := recordingRun(runConfig{}, runner.run) + r.canUseTool = func(_ context.Context, _ ai.PermissionRequest) (ai.PermissionDecision, error) { + return ai.PermissionDecision{Allow: false, Message: "keep planning"}, nil + } + + r.handleApproval(context.Background(), testSurface, parsePlanApprovalRequest("plan-deny")) + + if runner.escapeCount() != 1 { + t.Fatalf("deny key sent %d times, want 1 (Escape keeps planning)", runner.escapeCount()) + } + if runner.enterCount() != 0 { + t.Fatalf("enter sent on plan deny: %d", runner.enterCount()) + } + if !hasPermissionEvent(*events, "ExitPlanMode") { + t.Fatalf("no EventPermission emitted for ExitPlanMode, got %v", *events) + } +} + +func TestStallWatchdogPlanDialogSuppressesStall(t *testing.T) { + logPath := filepath.Join(t.TempDir(), "s.jsonl") + writeSessionLog(t, logPath, "seed") // static log + runner := &stallRunner{} + runner.setScreen(planApprovalScreen) // plan-approval dialog stays up + // No CanUseTool broker: an interactive terminal user answers, so the dialog is + // left up and the stall clock is held while it is present (no nudges, no give-up). + r := newTestRun(runConfig{}, runner.run) + wd := newWatchdog(r, "plan-await", logPath, nil) + + ctx, cancel := context.WithCancel(context.Background()) + result := make(chan bool, 1) + go func() { result <- wd.watch(ctx) }() + + time.Sleep(80 * time.Millisecond) // far longer than the stall timeout + cancel() + if gaveUp := <-result; gaveUp { + t.Fatal("watchdog gave up while a plan-approval dialog is up") + } + if n := runner.enterCount(); n != 0 { + t.Fatalf("nudges = %d, want 0 while a plan-approval dialog is up", n) + } +} + +func TestStallWatchdogAcceptEditsIndicatorStillStalls(t *testing.T) { + logPath := filepath.Join(t.TempDir(), "s.jsonl") + writeSessionLog(t, logPath, "seed") // static log + runner := &stallRunner{} + // The persistent acceptEdits indicator contains "auto-accept edits" but is not a + // dialog: the watchdog must still detect the stall and nudge/give up, not treat + // the indicator as awaiting a human forever. + runner.setScreen(acceptEditsIndicatorScreen) + r := newTestRun(runConfig{}, runner.run) + wd := newWatchdog(r, "indicator-stall", logPath, nil) // maxNudges = 2 + + gaveUp := wd.watch(context.Background()) + + if !gaveUp { + t.Fatal("watchdog did not give up on a static acceptEdits-indicator screen") + } + if n := runner.enterCount(); n != 2 { + t.Fatalf("nudges = %d, want 2 (StallNudges) before giving up", n) + } +} + +func TestStallWatchdogPlanApprovalBrokeredOnce(t *testing.T) { + logPath := filepath.Join(t.TempDir(), "s.jsonl") + writeSessionLog(t, logPath, "seed") + + // The runner serves the plan dialog until an Enter is sent, then an advancing + // (non-dialog) screen — mirroring the dialog dismissing on approval and the turn + // resuming work. A correct watchdog brokers the plan exactly once and, seeing the + // surface advance afterwards, does not nudge, so only the approval Enter is sent. + var mu sync.Mutex + var enters, frame int + runner := func(_ context.Context, _, _ string, _ time.Duration, args ...string) (string, error) { + mu.Lock() + defer mu.Unlock() + switch args[0] { + case "read-screen": + if enters == 0 { + return planApprovalScreen, nil + } + frame++ + return fmt.Sprintf("claude working %d", frame), nil + case "send-key": + if args[len(args)-1] == "Enter" { + enters++ + } + } + return "ok", nil + } + r := newTestRun(runConfig{}, runner) + var broker atomic.Int32 + r.canUseTool = func(_ context.Context, _ ai.PermissionRequest) (ai.PermissionDecision, error) { + broker.Add(1) + return ai.PermissionDecision{Allow: true}, nil + } + wd := newWatchdog(r, "plan-once", logPath, nil) + + ctx, cancel := context.WithCancel(context.Background()) + result := make(chan bool, 1) + go func() { result <- wd.watch(ctx) }() + + waitFor(t, "plan approval brokered", func() bool { return broker.Load() >= 1 }) + time.Sleep(40 * time.Millisecond) // give any erroneous re-broker time to fire + cancel() + <-result + r.approvals.Wait() + + if got := broker.Load(); got != 1 { + t.Fatalf("plan approval brokered %d times, want exactly 1", got) + } + mu.Lock() + gotEnters := enters + mu.Unlock() + if gotEnters != 1 { + t.Fatalf("Enter sent %d times, want 1 (approve once)", gotEnters) + } +} + func TestStallWatchdogLogGrowthResetsTimer(t *testing.T) { logPath := filepath.Join(t.TempDir(), "s.jsonl") writeSessionLog(t, logPath, "seed") diff --git a/pkg/ai/provider/cmux/submit.go b/pkg/ai/provider/cmux/submit.go index b2bf196..4c4dee8 100644 --- a/pkg/ai/provider/cmux/submit.go +++ b/pkg/ai/provider/cmux/submit.go @@ -7,6 +7,8 @@ import ( "regexp" "strings" "time" + + "github.com/flanksource/captain/pkg/ai" ) // replReadyRe matches the claude REPL's input prompt — the box-drawn "> " / "❯ " @@ -37,7 +39,7 @@ type submitConfirm struct { // returns nil and lets the downstream wait surface the loud failure rather than // masking it here. func (r *run) submitAndConfirm(ctx context.Context, ref WorkspaceRef, label, text string, sc submitConfirm) error { - if err := r.sendSurfaceText(ctx, ref.String(), ref.SurfaceID, label, text); err != nil { + if err := r.sendSurfaceText(ctx, ref, label, text); err != nil { return err } return r.confirmSubmitted(ctx, ref, label, sc) @@ -102,13 +104,16 @@ func (r *run) confirmStarted(ctx context.Context, ref WorkspaceRef, sc submitCon } // sendSurfaceText pastes text onto the surface and presses Enter, retrying the -// whole paste+Enter on transient cmux errors. A settle delay separates the paste -// from the Enter so a fast paste→Enter doesn't submit a half-applied buffer or -// get swallowed while the surface is still in paste mode. -func (r *run) sendSurfaceText(ctx context.Context, workspaceRef, surfaceRef, label, text string) error { +// whole paste+Enter on transient cmux errors. Between the paste and the Enter it +// waits for the paste to actually land on the surface (waitForPasteLanded) rather +// than firing Enter blindly, so a slow input event queue doesn't get Enter pressed +// into a half-applied buffer or swallowed while the surface is still in paste mode. +func (r *run) sendSurfaceText(ctx context.Context, ref WorkspaceRef, label, text string) error { attempts := r.sendAttempts() delay := r.sendRetryDelay() settle := r.sendSettleDelay() + workspaceRef := ref.String() + surfaceRef := ref.SurfaceID text = strings.TrimRight(text, "\r\n") var lastErr error for attempt := 1; attempt <= attempts; attempt++ { @@ -118,10 +123,11 @@ func (r *run) sendSurfaceText(ctx context.Context, workspaceRef, surfaceRef, lab return err } } - log.Infof("cmux: sending %s to workspace %s surface %s (attempt %d/%d)", label, workspaceRef, surfaceRef, attempt, attempts) + ai.LoggerFromContext(ctx, log).Tracef("cmux: sending %s to workspace %s surface %s (attempt %d/%d)", label, workspaceRef, surfaceRef, attempt, attempts) log.Debugf("cmux command: cmux send --workspace %q --surface %q -- <%s>", workspaceRef, surfaceRef, label) log.Debugf("cmux command: cmux send-key --workspace %q --surface %q Enter", workspaceRef, surfaceRef) - log.Debugf("cmux send payload:\n%s", text) + log.Debugf("cmux send payload:\n%s", screenSnippet(text)) + before := r.readScreen(ctx, ref) if err := r.client.SendSurface(ctx, workspaceRef, surfaceRef, text); err != nil { lastErr = err if ctx.Err() != nil { @@ -134,9 +140,16 @@ func (r *run) sendSurfaceText(ctx context.Context, workspaceRef, surfaceRef, lab } continue } - if err := sleepContext(ctx, settle); err != nil { + landed, err := r.waitForPasteLanded(ctx, ref, before) + if err != nil { return err } + if !landed { + log.Warnf("cmux: %s paste not observed on surface within %s; pressing Enter after %s settle fallback", label, r.pasteLandTimeout(), settle) + if err := sleepContext(ctx, settle); err != nil { + return err + } + } if err := r.client.SendKeySurface(ctx, workspaceRef, surfaceRef, "Enter"); err != nil { lastErr = err if ctx.Err() != nil { @@ -155,6 +168,43 @@ func (r *run) sendSurfaceText(ctx context.Context, workspaceRef, surfaceRef, lab return fmt.Errorf("send cmux %s after %d attempts: %w", label, attempts, lastErr) } +// waitForPasteLanded polls the surface until the paste has rendered — the screen +// changes from the pre-paste baseline and then holds stable for the settle window, +// confirming cmux finished applying the paste rather than pressing Enter into a +// half-filled buffer. Sends are always issued from a quiesced surface, so any +// change is attributable to the paste. Returns true once landed; false on timeout, +// where the caller falls back to the fixed settle so a send never regresses below +// the previous fixed-delay behaviour. +func (r *run) waitForPasteLanded(ctx context.Context, ref WorkspaceRef, before string) (bool, error) { + timeout := r.pasteLandTimeout() + poll := r.pasteLandPollInterval() + quiesce := r.sendSettleDelay() + base := normalizeScreen(before) + deadline := time.Now().Add(timeout) + var stable string + var stableSince time.Time + for { + screen := normalizeScreen(r.readScreen(ctx, ref)) + if screen != "" && screen != base { + if screen == stable { + if time.Since(stableSince) >= quiesce { + log.Debugf("cmux: paste landed (surface changed and held stable for %s)", quiesce) + return true, nil + } + } else { + stable = screen + stableSince = time.Now() + } + } + if time.Now().After(deadline) { + return false, nil + } + if err := sleepContext(ctx, poll); err != nil { + return false, err + } + } +} + // waitForREPLReady polls the surface until the claude input prompt appears, // confirming the REPL will accept the initial prompt. On timeout it falls back to // the screen-idle wait so a REPL whose prompt we failed to recognize (a theme diff --git a/pkg/ai/provider/cmux/submit_test.go b/pkg/ai/provider/cmux/submit_test.go index 32e960b..c831700 100644 --- a/pkg/ai/provider/cmux/submit_test.go +++ b/pkg/ai/provider/cmux/submit_test.go @@ -57,20 +57,212 @@ func (r *timedRunner) run(_ context.Context, _, _ string, _ time.Duration, args return "ok", nil } -func TestSendSurfaceTextSettlesBetweenPasteAndEnter(t *testing.T) { +// firstTimeOf returns the time the runner first saw op (and whether it saw it). +func (r *timedRunner) firstTimeOf(op string) (time.Time, bool) { + r.mu.Lock() + defer r.mu.Unlock() + for i, o := range r.ops { + if o == op { + return r.times[i], true + } + } + return time.Time{}, false +} + +// pasteRunner serves the pre-paste baseline until a paste (send) arrives, then a +// changed screen, so a test drives waitForPasteLanded through a real surface change. +type pasteRunner struct { + mu sync.Mutex + baseline string + after string + sent bool + ops []string +} + +func (r *pasteRunner) run(_ context.Context, _, _ string, _ time.Duration, args ...string) (string, error) { + r.mu.Lock() + defer r.mu.Unlock() + r.ops = append(r.ops, args[0]) + switch args[0] { + case "read-screen": + if r.sent { + return r.after, nil + } + return r.baseline, nil + case "send": + r.sent = true + } + return "ok", nil +} + +func (r *pasteRunner) opSequence() []string { + r.mu.Lock() + defer r.mu.Unlock() + return append([]string(nil), r.ops...) +} + +// codexSurfaceRunner models codex's composer: the paste lands (the surface changes +// from the pre-paste baseline) but the first Enter is dropped, so the composer keeps +// showing the typed prompt until a re-press submits it and the surface advances to a +// working state (after the second Enter). +type codexSurfaceRunner struct { + mu sync.Mutex + sent bool + enters int +} + +func (r *codexSurfaceRunner) run(_ context.Context, _, _ string, _ time.Duration, args ...string) (string, error) { + r.mu.Lock() + defer r.mu.Unlock() + switch args[0] { + case "read-screen": + switch { + case !r.sent: + return "codex ready\n> ", nil + case r.enters >= 2: + return "codex working…\nesc to interrupt", nil + default: + return "codex ready\n> run the task", nil + } + case "send": + r.sent = true + case "send-key": + if args[len(args)-1] == "Enter" { + r.enters++ + } + } + return "ok", nil +} + +func (r *codexSurfaceRunner) enterCount() int { + r.mu.Lock() + defer r.mu.Unlock() + return r.enters +} + +func TestWaitForPasteLandedDetectsChangeThenQuiesce(t *testing.T) { + // The surface differs from the pre-paste baseline and holds stable, so the paste + // is confirmed landed within the settle/quiesce window. + r := newTestRun(runConfig{ + PasteLandTimeout: 2 * time.Second, + PasteLandPollInterval: 2 * time.Millisecond, + SendSettleDelay: 20 * time.Millisecond, + }, constantScreenRunner("idle\n> prompt text")) + + landed, err := r.waitForPasteLanded(context.Background(), testSurface, "idle") + if err != nil { + t.Fatalf("waitForPasteLanded() error = %v", err) + } + if !landed { + t.Fatal("waitForPasteLanded() = false, want true once the surface changed and held stable") + } +} + +func TestWaitForPasteLandedTimesOutWhenNoChange(t *testing.T) { + // The surface never changes from the baseline, so the paste is never observed + // landing; the wait must time out so the caller falls back to the fixed settle. + r := newTestRun(runConfig{ + PasteLandTimeout: 30 * time.Millisecond, + PasteLandPollInterval: 2 * time.Millisecond, + SendSettleDelay: 20 * time.Millisecond, + }, constantScreenRunner("idle")) + + start := time.Now() + landed, err := r.waitForPasteLanded(context.Background(), testSurface, "idle") + if err != nil { + t.Fatalf("waitForPasteLanded() error = %v", err) + } + if landed { + t.Fatal("waitForPasteLanded() = true, want false when the surface never changed") + } + if elapsed := time.Since(start); elapsed < 30*time.Millisecond { + t.Fatalf("waitForPasteLanded returned after %s, want it to wait ~PasteLandTimeout (30ms)", elapsed) + } +} + +func TestSendSurfaceTextPressesEnterOncePasteLands(t *testing.T) { + runner := &pasteRunner{baseline: "codex ready\n> ", after: "codex ready\n> hello"} + // A large PasteLandTimeout (2s) with a small settle/quiesce (20ms): the paste + // lands on-screen immediately, so Enter must fire ~one quiesce window later. Had + // the change not been observed, the send would burn the full 2s timeout first. + r := newTestRun(runConfig{ + PasteLandTimeout: 2 * time.Second, + PasteLandPollInterval: 2 * time.Millisecond, + SendSettleDelay: 20 * time.Millisecond, + }, runner.run) + + start := time.Now() + if err := r.sendSurfaceText(context.Background(), testSurface, "prompt", "hello"); err != nil { + t.Fatalf("sendSurfaceText() error = %v", err) + } + if elapsed := time.Since(start); elapsed > time.Second { + t.Fatalf("sendSurfaceText took %s, want Enter pressed adaptively once the paste landed, not after the 2s timeout", elapsed) + } + + ops := runner.opSequence() + sendIdx, sendKeyIdx, polls := -1, -1, 0 + for i, op := range ops { + switch { + case op == "send" && sendIdx == -1: + sendIdx = i + case op == "send-key" && sendKeyIdx == -1: + sendKeyIdx = i + case op == "read-screen" && sendIdx != -1 && sendKeyIdx == -1: + polls++ + } + } + if sendIdx == -1 || sendKeyIdx == -1 || sendKeyIdx < sendIdx { + t.Fatalf("ops = %v, want a send followed by a send-key", ops) + } + if polls == 0 { + t.Fatalf("ops = %v, want the send to poll read-screen for the paste to land before Enter", ops) + } +} + +func TestSendSurfaceTextFallsBackToSettleWhenPasteUnobserved(t *testing.T) { runner := &timedRunner{} - r := newTestRun(runConfig{SendSettleDelay: 50 * time.Millisecond}, runner.run) + // timedRunner's read-screen never changes, so the paste is never observed + // landing and the send must fall back to the settle delay before Enter. + r := newTestRun(runConfig{ + PasteLandTimeout: 20 * time.Millisecond, + PasteLandPollInterval: 2 * time.Millisecond, + SendSettleDelay: 50 * time.Millisecond, + }, runner.run) - if err := r.sendSurfaceText(context.Background(), "workspace:ws1", "surface:sf1", "prompt", "hello"); err != nil { + if err := r.sendSurfaceText(context.Background(), testSurface, "prompt", "hello"); err != nil { t.Fatalf("sendSurfaceText() error = %v", err) } - if len(runner.ops) != 2 || runner.ops[0] != "send" || runner.ops[1] != "send-key" { - t.Fatalf("ops = %v, want [send send-key]", runner.ops) + sendAt, ok := runner.firstTimeOf("send") + if !ok { + t.Fatal("no send op recorded") + } + sendKeyAt, ok := runner.firstTimeOf("send-key") + if !ok { + t.Fatal("no send-key op recorded; Enter was never pressed on the fallback path") + } + // Fallback path waits PasteLandTimeout (20ms) then the settle (50ms) before Enter. + if gap := sendKeyAt.Sub(sendAt); gap < 45*time.Millisecond { + t.Fatalf("paste→Enter gap = %s, want >= ~50ms settle fallback", gap) + } +} + +func TestSubmitAndConfirmRepressesEnterUntilSurfaceAdvances(t *testing.T) { + runner := &codexSurfaceRunner{} + r := newTestRun(runConfig{ + PasteLandTimeout: time.Second, + PasteLandPollInterval: time.Millisecond, + SendSettleDelay: 2 * time.Millisecond, + SessionStartRetryDelays: []time.Duration{2 * time.Millisecond, 2 * time.Millisecond, 2 * time.Millisecond, 2 * time.Millisecond}, + }, runner.run) + + // submitConfirm{} carries no session log (the codex path), so confirmation is + // purely the surface advancing past the just-submitted screen. + if err := r.submitAndConfirm(context.Background(), testSurface, "initial prompt", "run the task", submitConfirm{}); err != nil { + t.Fatalf("submitAndConfirm() error = %v", err) } - gap := runner.times[1].Sub(runner.times[0]) - if gap < 45*time.Millisecond { - t.Fatalf("paste→Enter gap = %s, want >= ~50ms settle delay", gap) + if got := runner.enterCount(); got != 2 { + t.Fatalf("Enter presses = %d, want 2 (initial send + one re-press before the surface advanced)", got) } } diff --git a/pkg/ai/provider/coalesce.go b/pkg/ai/provider/coalesce.go index b1f6889..e29bfee 100644 --- a/pkg/ai/provider/coalesce.go +++ b/pkg/ai/provider/coalesce.go @@ -71,6 +71,11 @@ func finaliseCoalescedResponse(model, text string, usage ai.Usage, lastResult *a } if lastResult != nil { resp.Raw = lastResult.Input + // Carry any validated structured output (raw JSON) the terminal result + // event holds; the caller's Execute binds it into its schema target. + if len(lastResult.StructuredData) > 0 { + resp.StructuredData = lastResult.StructuredData + } } if sessionID != "" { if resp.Raw == nil { diff --git a/pkg/ai/provider/coalesce_test.go b/pkg/ai/provider/coalesce_test.go index 4e52f8e..fc8a755 100644 --- a/pkg/ai/provider/coalesce_test.go +++ b/pkg/ai/provider/coalesce_test.go @@ -2,6 +2,7 @@ package provider import ( "context" + "encoding/json" "strings" "testing" "time" @@ -44,6 +45,27 @@ func TestCoalesceStream_AccumulatesTextAndUsageFromResult(t *testing.T) { } } +func TestCoalesceStream_CarriesStructuredData(t *testing.T) { + const model = "gpt-5" + structured := json.RawMessage(`{"answer":"42"}`) + events := []ai.Event{ + {Kind: ai.EventText, Text: `{"answer":"42"}`, Model: model}, + {Kind: ai.EventResult, Tool: "Result", Success: true, Model: model, StructuredData: structured}, + } + + resp, err := CoalesceStream(context.Background(), model, feedEvents(events), time.Now()) + if err != nil { + t.Fatalf("CoalesceStream err: %v", err) + } + raw, ok := resp.StructuredData.(json.RawMessage) + if !ok { + t.Fatalf("StructuredData = %T, want json.RawMessage", resp.StructuredData) + } + if string(raw) != string(structured) { + t.Errorf("StructuredData = %s, want %s", raw, structured) + } +} + func TestCoalesceStream_ResultErrorReturnsError(t *testing.T) { const wantMsg = "upstream 500" events := []ai.Event{ diff --git a/pkg/ai/provider/codex_appserver.go b/pkg/ai/provider/codex_appserver.go index cae23ca..891063f 100644 --- a/pkg/ai/provider/codex_appserver.go +++ b/pkg/ai/provider/codex_appserver.go @@ -53,21 +53,55 @@ func NewCodexAppServer(model string) (*CodexAppServer, error) { func (c *CodexAppServer) GetModel() string { return c.model } func (c *CodexAppServer) GetBackend() ai.Backend { return ai.BackendCodexCLI } -// Execute drains the streaming output into a buffered ai.Response. +// Execute drains the streaming output into a buffered ai.Response. When the +// request carries a structured-output schema, the final agent message's JSON is +// unmarshalled into req.Prompt.Schema and surfaced as StructuredData (mirroring +// the genkit and claude-agent providers). func (c *CodexAppServer) Execute(ctx context.Context, req ai.Request) (*ai.Response, error) { start := time.Now() events, err := c.ExecuteStream(ctx, req) if err != nil { return nil, err } - return CoalesceStream(ctx, c.model, events, start) + resp, err := CoalesceStream(ctx, c.model, events, start) + if err != nil { + return nil, err + } + if req.Prompt.Schema != nil { + raw, _ := resp.StructuredData.(json.RawMessage) + if err := ai.BindStructuredOutput(req.Prompt.Schema, raw); err != nil { + return nil, err + } + resp.StructuredData = req.Prompt.Schema + resp.Text = "" + } else if len(req.Prompt.SchemaJSON) > 0 { + // A pre-built JSON schema has no Go target to bind into; leave the raw + // structured JSON on Text for tolerant decoders. + if raw, ok := resp.StructuredData.(json.RawMessage); ok && len(raw) > 0 { + resp.Text = string(raw) + } + } + return resp, nil +} + +// codexOutputSchema derives the JSON schema codex should constrain the final +// message to (a reflected Go struct or a verbatim Prompt.SchemaJSON), or nil for +// a text-mode request. A non-struct target fails loudly rather than silently +// dropping the schema. +func codexOutputSchema(req ai.Request) (json.RawMessage, error) { + schema, err := ai.SchemaJSONFor(req.Prompt) + if err != nil { + return nil, fmt.Errorf("codex app-server: cannot derive structured-output schema: %w", err) + } + return schema, nil } // ExecuteStream runs a single turn; the channel closes on turn/completed, a // fatal error, ctx cancellation, or a child crash. func (c *CodexAppServer) ExecuteStream(ctx context.Context, req ai.Request) (<-chan ai.Event, error) { - if req.Prompt.Schema != nil { - return nil, fmt.Errorf("codex app-server does not support StructuredOutput; use a direct API backend") + schema, err := codexOutputSchema(req) + if err != nil { + return nil, err } c.turnMu.Lock() @@ -80,11 +114,12 @@ func (c *CodexAppServer) ExecuteStream(ctx context.Context, req ai.Request) (<-c c.mu.Unlock() ts := &turnState{ - ch: make(chan ai.Event, 16), - usage: &ai.Usage{}, - model: c.model, - streamed: map[string]bool{}, - terminal: make(chan struct{}), + ch: make(chan ai.Event, 16), + usage: &ai.Usage{}, + model: c.model, + streamed: map[string]bool{}, + terminal: make(chan struct{}), + outputSchema: schema, } c.setActive(ts) @@ -102,7 +137,7 @@ func (c *CodexAppServer) driveTurn(ctx context.Context, req ai.Request, ts *turn c.failTurn(ts, err) return } - turnID, err := c.startTurn(ctx, req, threadID) + turnID, err := c.startTurn(ctx, req, threadID, ts.outputSchema) if err != nil { c.failTurn(ts, err) return @@ -234,12 +269,12 @@ func (c *CodexAppServer) startThread(ctx context.Context, req ai.Request) (strin return parseAppServerNotif(raw).threadID(), nil } -func (c *CodexAppServer) startTurn(ctx context.Context, req ai.Request, threadID string) (string, error) { +func (c *CodexAppServer) startTurn(ctx context.Context, req ai.Request, threadID string, outputSchema json.RawMessage) (string, error) { rpc := c.client() if rpc == nil { return "", fmt.Errorf("codex app-server: not started") } - raw, err := rpc.Call(ctx, "turn/start", buildTurnStartParams(c.model, req, threadID)) + raw, err := rpc.Call(ctx, "turn/start", buildTurnStartParams(c.model, req, threadID, outputSchema)) if err != nil { return "", err } @@ -275,13 +310,20 @@ func (c *CodexAppServer) handleNotification(method string, params json.RawMessag ts.streamed[id] = true } case "item/completed": - // The final agent message repeats text already streamed via deltas; drop - // it so CoalesceStream / renderers don't double-count. + // The completed agent message carries the full text (structured runs use it + // as the validated JSON result). Capture it, then drop the duplicate so + // CoalesceStream / renderers don't double-count already-streamed deltas. + if it := parseAppServerNotif(params).Item; it != nil && it.Type == "agentMessage" { + ts.lastAgentMessage = it.Text + } if appServerStreamedAgentMessage(params, ts.streamed) { return } } if ev, ok := mapAppServerNotification(method, params, ts.model, ts.usage); ok { + if ev.Kind == ai.EventResult && len(ts.outputSchema) > 0 { + ev.StructuredData = json.RawMessage(ts.lastAgentMessage) + } ts.send(ev) } if method == "turn/completed" || appServerErrorIsFatal(method, params) { @@ -317,6 +359,13 @@ type turnState struct { model string streamed map[string]bool // agent-message item IDs already streamed via deltas + // outputSchema is non-nil when the turn requested structured output; it drives + // the turn/start outputSchema and gates capturing lastAgentMessage as the + // structured result. lastAgentMessage is the full text of the most recent + // completed agentMessage (codex returns structured JSON as that text). + outputSchema json.RawMessage + lastAgentMessage string + terminal chan struct{} // closed when the turn is over (by codex or by finish) termOnce sync.Once sendMu sync.Mutex diff --git a/pkg/ai/provider/codex_appserver_protocol.go b/pkg/ai/provider/codex_appserver_protocol.go index c4870e7..451c549 100644 --- a/pkg/ai/provider/codex_appserver_protocol.go +++ b/pkg/ai/provider/codex_appserver_protocol.go @@ -226,8 +226,8 @@ func composePrompt(req ai.Request) string { // override (the knobs the protocol exposes) are emitted. func buildThreadStartParams(model string, req ai.Request) map[string]any { p := map[string]any{} - if req.Context.Dir != "" { - p["cwd"] = req.Context.Dir + if cwd := req.Cwd(); cwd != "" { + p["cwd"] = cwd } if model != "" { p["model"] = model @@ -244,20 +244,19 @@ func buildThreadStartParams(model string, req ai.Request) map[string]any { } // codexSafety maps edit/permission knobs onto the SandboxMode + AskForApproval -// enums. Approvals are auto-accepted (handleApproval), so the policy only affects -// when codex prompts, never whether work proceeds. +// enums via the shared api.CodexSafety mapping (also used by the cmux backend). +// Approvals are auto-accepted (handleApproval), so the policy only affects when +// codex prompts, never whether work proceeds. func codexSafety(req ai.Request) (sandbox, approval string) { - switch { - case req.Permissions.Mode == api.PermissionBypass: - return "danger-full-access", "never" - case req.Permissions.HasPreset(api.PresetEdit) && req.Permissions.Mode == "": - return "workspace-write", "on-request" - default: - return "read-only", "on-request" - } + s, a := api.CodexSafety(req.Permissions) + return string(s), string(a) } -func buildTurnStartParams(model string, req ai.Request, threadID string) map[string]any { +// buildTurnStartParams builds the turn/start params. outputSchema, when +// non-empty, is sent as the turn-scoped `outputSchema` that constrains the final +// assistant message to validated JSON (structured output); the raw JSON Schema +// bytes are embedded inline verbatim. +func buildTurnStartParams(model string, req ai.Request, threadID string, outputSchema json.RawMessage) map[string]any { p := map[string]any{ "threadId": threadID, "input": []map[string]any{{"type": "text", "text": composePrompt(req)}}, @@ -268,13 +267,16 @@ func buildTurnStartParams(model string, req ai.Request, threadID string) map[str if req.Effort != "" { p["effort"] = string(req.Effort) } + if len(outputSchema) > 0 { + p["outputSchema"] = outputSchema + } return p } func buildResumeParams(req ai.Request) map[string]any { p := map[string]any{"threadId": req.SessionID} - if req.Context.Dir != "" { - p["cwd"] = req.Context.Dir + if cwd := req.Cwd(); cwd != "" { + p["cwd"] = cwd } return p } diff --git a/pkg/ai/provider/codex_appserver_test.go b/pkg/ai/provider/codex_appserver_test.go index 8f5b698..220b5b1 100644 --- a/pkg/ai/provider/codex_appserver_test.go +++ b/pkg/ai/provider/codex_appserver_test.go @@ -7,6 +7,7 @@ import ( "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/api" "github.com/flanksource/captain/pkg/claude" + "github.com/flanksource/commons-db/shell" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -174,6 +175,80 @@ func TestMapAppServerNotification_Kinds(t *testing.T) { } } +// drainEvents non-blockingly collects everything buffered on a turn's channel. +func drainEvents(ts *turnState) []ai.Event { + var out []ai.Event + for { + select { + case ev := <-ts.ch: + out = append(out, ev) + default: + return out + } + } +} + +// activeTurn wires a turnState onto a fresh provider so handleNotification can +// route to it, mirroring what ExecuteStream sets up. +func activeTurn(t *testing.T, schema json.RawMessage) (*CodexAppServer, *turnState) { + t.Helper() + c, err := NewCodexAppServer("gpt-5") + require.NoError(t, err) + ts := &turnState{ + ch: make(chan ai.Event, 16), + usage: &ai.Usage{}, + model: "gpt-5", + streamed: map[string]bool{}, + terminal: make(chan struct{}), + outputSchema: schema, + } + c.setActive(ts) + return c, ts +} + +func resultEvent(t *testing.T, evs []ai.Event) ai.Event { + t.Helper() + for _, ev := range evs { + if ev.Kind == ai.EventResult { + return ev + } + } + t.Fatalf("no EventResult in %+v", evs) + return ai.Event{} +} + +// A structured turn attaches the final agentMessage JSON to the terminal result. +func TestHandleNotification_StructuredOutput(t *testing.T) { + schema, err := ai.SchemaJSONFor(api.Prompt{Schema: &struct { + Answer string `json:"answer"` + }{}}) + require.NoError(t, err) + + c, ts := activeTurn(t, schema) + // The final agent message's text IS the validated JSON (codex has no separate + // structured field). + c.handleNotification("item/completed", + json.RawMessage(`{"item":{"id":"a1","type":"agentMessage","text":"{\"answer\":\"42\"}"}}`)) + c.handleNotification("turn/completed", + json.RawMessage(`{"threadId":"t","turn":{"id":"u","status":"completed"}}`)) + + result := resultEvent(t, drainEvents(ts)) + require.NotEmpty(t, result.StructuredData, "structured turn should carry the final JSON on the result") + assert.JSONEq(t, `{"answer":"42"}`, string(result.StructuredData)) +} + +// A text-mode turn (no schema) leaves the result's StructuredData empty. +func TestHandleNotification_NoStructuredWithoutSchema(t *testing.T) { + c, ts := activeTurn(t, nil) + c.handleNotification("item/completed", + json.RawMessage(`{"item":{"id":"a1","type":"agentMessage","text":"plain answer"}}`)) + c.handleNotification("turn/completed", + json.RawMessage(`{"threadId":"t","turn":{"id":"u","status":"completed"}}`)) + + result := resultEvent(t, drainEvents(ts)) + assert.Empty(t, result.StructuredData, "text-mode turn must not attach structured output") +} + func TestMapAppServerNotification_ErrorUnwrapping(t *testing.T) { nested := `The 'gpt-5.5-codex' model is not supported when using Codex with a ChatGPT account.` params := `{"threadId":"t","turnId":"u","willRetry":false,"error":{"message":"{\"type\":\"error\",\"status\":400,\"error\":{\"type\":\"invalid_request_error\",\"message\":\"` + nested + `\"}}"}}` @@ -277,7 +352,7 @@ func TestBuildTurnStartParams(t *testing.T) { p := buildTurnStartParams("gpt-5", ai.Request{ Prompt: api.Prompt{User: "hi"}, Model: api.Model{Effort: api.EffortHigh}, - }, "thread-1") + }, "thread-1", nil) assert.Equal(t, "thread-1", p["threadId"]) assert.Equal(t, "gpt-5", p["model"]) assert.Equal(t, "high", p["effort"]) @@ -288,12 +363,35 @@ func TestBuildTurnStartParams(t *testing.T) { assert.Equal(t, "text", input[0]["type"]) assert.Equal(t, "hi", input[0]["text"]) - // No reasoning effort / empty model should be omitted entirely. - bare := buildTurnStartParams("", req(api.Prompt{User: "hi"}), "t") + // No reasoning effort / empty model / nil schema should be omitted entirely. + bare := buildTurnStartParams("", req(api.Prompt{User: "hi"}), "t", nil) _, hasModel := bare["model"] _, hasEffort := bare["effort"] + _, hasSchema := bare["outputSchema"] assert.False(t, hasModel, "empty model must be omitted") assert.False(t, hasEffort, "absent reasoning effort must be omitted") + assert.False(t, hasSchema, "nil schema must omit outputSchema") +} + +func TestBuildTurnStartParams_OutputSchema(t *testing.T) { + type answer struct { + Answer string `json:"answer"` + } + schema, err := ai.SchemaJSONFor(api.Prompt{Schema: &answer{}}) + require.NoError(t, err) + + p := buildTurnStartParams("gpt-5", req(api.Prompt{User: "solve"}), "t", schema) + require.Contains(t, p, "outputSchema", "a derived schema must be sent as outputSchema") + + // It must serialize to a JSON Schema object describing the target struct. + raw, err := json.Marshal(p["outputSchema"]) + require.NoError(t, err) + var decoded map[string]any + require.NoError(t, json.Unmarshal(raw, &decoded)) + assert.Equal(t, "object", decoded["type"]) + props, ok := decoded["properties"].(map[string]any) + require.True(t, ok) + assert.Contains(t, props, "answer") } func TestBuildThreadStartParams_Safety(t *testing.T) { @@ -389,8 +487,8 @@ func TestBuildThreadStartParams_Safety(t *testing.T) { func TestBuildThreadStartParams_CwdAndModel(t *testing.T) { p := buildThreadStartParams("gpt-5", ai.Request{ - Prompt: api.Prompt{User: "p"}, - Context: api.Context{Dir: "/repo"}, + Prompt: api.Prompt{User: "p"}, + Setup: &shell.Setup{Cwd: "/repo"}, }) assert.Equal(t, "/repo", p["cwd"]) assert.Equal(t, "gpt-5", p["model"]) @@ -403,7 +501,7 @@ func TestBuildThreadStartParams_CwdAndModel(t *testing.T) { func TestBuildResumeParams(t *testing.T) { p := buildResumeParams(ai.Request{ SessionID: "thread-9", - Context: api.Context{Dir: "/repo"}, + Setup: &shell.Setup{Cwd: "/repo"}, }) assert.Equal(t, "thread-9", p["threadId"]) assert.Equal(t, "/repo", p["cwd"]) diff --git a/pkg/ai/provider/gemini_cli.go b/pkg/ai/provider/gemini_cli.go index 2a627d2..3b00417 100644 --- a/pkg/ai/provider/gemini_cli.go +++ b/pkg/ai/provider/gemini_cli.go @@ -54,7 +54,11 @@ func (g *GeminiCLI) Execute(ctx context.Context, req ai.Request) (*ai.Response, return nil, fmt.Errorf("failed to marshal request: %w", err) } - stdoutData, _, err := runCLI(ctx, "gemini", reqBytes, req.Context.Dir) + var env []string + if req.Setup != nil { + env = req.Setup.Env + } + stdoutData, _, err := runCLI(ctx, "gemini", reqBytes, req.Cwd(), env) if err != nil { return nil, err } diff --git a/pkg/ai/provider/genkit/genkit.go b/pkg/ai/provider/genkit/genkit.go index d5cb275..c6301d7 100644 --- a/pkg/ai/provider/genkit/genkit.go +++ b/pkg/ai/provider/genkit/genkit.go @@ -10,6 +10,7 @@ package genkit import ( "context" + "encoding/json" "fmt" "time" @@ -49,9 +50,9 @@ func New(cfg ai.Config) (*Provider, error) { } switch backend { - case ai.BackendAnthropic, ai.BackendOpenAI, ai.BackendGemini: + case ai.BackendAnthropic, ai.BackendOpenAI, ai.BackendGemini, ai.BackendDeepSeek: default: - return nil, fmt.Errorf("genkit provider does not support backend %q (supported: anthropic, openai, gemini)", backend) + return nil, fmt.Errorf("genkit provider does not support backend %q (supported: anthropic, openai, gemini, deepseek)", backend) } apiKey := cfg.APIKey @@ -59,7 +60,7 @@ func New(cfg ai.Config) (*Provider, error) { apiKey = ai.GetAPIKeyFromEnv(backend) } if apiKey == "" { - return nil, fmt.Errorf("genkit provider: no API key for backend %q (set the provider's API key, e.g. ANTHROPIC_API_KEY/OPENAI_API_KEY/GEMINI_API_KEY)", backend) + return nil, fmt.Errorf("genkit provider: no API key for backend %q (set the provider's API key, e.g. ANTHROPIC_API_KEY/OPENAI_API_KEY/GEMINI_API_KEY/DEEPSEEK_API_KEY)", backend) } ref, err := modelRef(backend, cfg.Model.Name) @@ -83,7 +84,11 @@ func (p *Provider) GetBackend() ai.Backend { return p.backend } func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, error) { start := time.Now() - resp, err := gk.Generate(ctx, p.g, generateOptions(p, req, nil)...) + opts, err := generateOptions(p, req, nil) + if err != nil { + return nil, err + } + resp, err := gk.Generate(ctx, p.g, opts...) if err != nil { if ctx.Err() != nil { return nil, fmt.Errorf("%w: %v", ai.ErrTimeout, ctx.Err()) @@ -99,6 +104,12 @@ func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, e } out.StructuredData = req.Prompt.Schema out.Text = "" + } else if len(req.Prompt.SchemaJSON) > 0 { + // A pre-built JSON schema has no Go target to bind into; genkit returns the + // constrained JSON as text — surface it as raw structured data too. + if out.Text != "" { + out.StructuredData = json.RawMessage(out.Text) + } } if cost := p.costUSD(out.Usage); cost > 0 { @@ -112,7 +123,7 @@ func (p *Provider) Execute(ctx context.Context, req ai.Request) (*ai.Response, e // and a terminal EventResult carrying usage + best-effort cost. Structured // output is unsupported in stream mode (mirrors the claude_cli stream provider). func (p *Provider) ExecuteStream(ctx context.Context, req ai.Request) (<-chan ai.Event, error) { - if req.Prompt.Schema != nil { + if req.Prompt.HasSchema() { return nil, fmt.Errorf("genkit stream mode does not support structured output; use Execute") } @@ -128,7 +139,10 @@ func (p *Provider) ExecuteStream(ctx context.Context, req ai.Request) (<-chan ai return nil } - opts := generateOptions(p, req, cb) + opts, err := generateOptions(p, req, cb) + if err != nil { + return nil, err + } go func() { defer close(ch) resp, err := gk.Generate(ctx, p.g, opts...) @@ -160,6 +174,8 @@ func pricingModelID(backend ai.Backend, model string) string { return "openai/" + bare case ai.BackendGemini: return "google/" + bare + case ai.BackendDeepSeek: + return "deepseek/" + bare default: return model } diff --git a/pkg/ai/provider/genkit/genkit_test.go b/pkg/ai/provider/genkit/genkit_test.go index aa74b4e..d206589 100644 --- a/pkg/ai/provider/genkit/genkit_test.go +++ b/pkg/ai/provider/genkit/genkit_test.go @@ -66,6 +66,12 @@ func TestEffortConfig(t *testing.T) { req: ai.Request{}, want: nil, }, + { + name: "deepseek omits config (reasoning is selected by model)", + backend: ai.BackendDeepSeek, + req: ai.Request{Model: api.Model{Effort: api.EffortHigh}}, + want: nil, + }, } for _, tt := range tests { @@ -106,6 +112,8 @@ func TestModelRef(t *testing.T) { {"openai bare", ai.BackendOpenAI, "gpt-4o", "openai/gpt-4o", false}, {"gemini bare", ai.BackendGemini, "gemini-2.5-pro", "googleai/gemini-2.5-pro", false}, {"gemini normalizes models prefix", ai.BackendGemini, "models/gemini-2.5-pro", "googleai/gemini-2.5-pro", false}, + {"deepseek bare", ai.BackendDeepSeek, "deepseek-chat", "deepseek/deepseek-chat", false}, + {"deepseek re-prefixes existing", ai.BackendDeepSeek, "deepseek/deepseek-reasoner", "deepseek/deepseek-reasoner", false}, {"anthropic re-prefixes existing", ai.BackendAnthropic, "anthropic/claude-opus-4", "anthropic/claude-opus-4", false}, {"unsupported backend errors", ai.BackendClaudeCLI, "claude-code-foo", "", true}, {"empty model errors", ai.BackendAnthropic, "", "", true}, @@ -129,15 +137,16 @@ func TestPricingModelID(t *testing.T) { assert.Equal(t, "openai/gpt-4o", pricingModelID(ai.BackendOpenAI, "gpt-4o")) // Gemini's OpenRouter pricing key is google/, not the genkit googleai/ ref. assert.Equal(t, "google/gemini-2.5-pro", pricingModelID(ai.BackendGemini, "googleai/gemini-2.5-pro")) + assert.Equal(t, "deepseek/deepseek-chat", pricingModelID(ai.BackendDeepSeek, "deepseek/deepseek-chat")) } func TestNewMissingAPIKey(t *testing.T) { // Ensure no provider key leaks in from the environment. - for _, env := range []string{"ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GEMINI_API_KEY", "GOOGLE_API_KEY"} { + for _, env := range []string{"ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GEMINI_API_KEY", "GOOGLE_API_KEY", "DEEPSEEK_API_KEY"} { t.Setenv(env, "") } - for _, backend := range []ai.Backend{ai.BackendAnthropic, ai.BackendOpenAI, ai.BackendGemini} { + for _, backend := range []ai.Backend{ai.BackendAnthropic, ai.BackendOpenAI, ai.BackendGemini, ai.BackendDeepSeek} { t.Run(string(backend), func(t *testing.T) { _, err := New(ai.Config{Model: api.Model{Backend: backend, Name: "some-model"}}) require.Error(t, err) diff --git a/pkg/ai/provider/genkit/instance.go b/pkg/ai/provider/genkit/instance.go index 028cfb8..ec5a0bf 100644 --- a/pkg/ai/provider/genkit/instance.go +++ b/pkg/ai/provider/genkit/instance.go @@ -10,10 +10,15 @@ import ( "github.com/firebase/genkit/go/core/api" gk "github.com/firebase/genkit/go/genkit" "github.com/firebase/genkit/go/plugins/anthropic" + "github.com/firebase/genkit/go/plugins/compat_oai" "github.com/firebase/genkit/go/plugins/compat_oai/openai" "github.com/firebase/genkit/go/plugins/googlegenai" ) +// deepSeekBaseURL is DeepSeek's OpenAI-compatible endpoint. The compat_oai +// client appends /chat/completions, which DeepSeek serves at this base. +const deepSeekBaseURL = "https://api.deepseek.com" + // instanceKey identifies a cached genkit instance. genkit.Init is heavy and // registers a key-scoped plugin, so one instance is reused per (backend, apiKey). type instanceKey struct { @@ -60,7 +65,11 @@ func pluginFor(backend ai.Backend, apiKey string) (api.Plugin, error) { return &openai.OpenAI{APIKey: apiKey}, nil case ai.BackendGemini: return &googlegenai.GoogleAI{APIKey: apiKey}, nil + case ai.BackendDeepSeek: + // DeepSeek is OpenAI-compatible; the compat_oai plugin resolves models + // dynamically under the "deepseek/" provider namespace. + return &compat_oai.OpenAICompatible{Provider: "deepseek", APIKey: apiKey, BaseURL: deepSeekBaseURL}, nil default: - return nil, fmt.Errorf("genkit provider: unsupported backend %q (supported: anthropic, openai, gemini)", backend) + return nil, fmt.Errorf("genkit provider: unsupported backend %q (supported: anthropic, openai, gemini, deepseek)", backend) } } diff --git a/pkg/ai/provider/genkit/options.go b/pkg/ai/provider/genkit/options.go index f1c4e12..ab2828a 100644 --- a/pkg/ai/provider/genkit/options.go +++ b/pkg/ai/provider/genkit/options.go @@ -1,6 +1,7 @@ package genkit import ( + "encoding/json" "fmt" "strings" @@ -17,7 +18,7 @@ const defaultMaxOutputTokens = 4096 // bareModel strips a leading provider prefix so a model id can be re-prefixed for // either a genkit ref (anthropic/openai/googleai) or an OpenRouter pricing key. func bareModel(model string) string { - for _, prefix := range []string{"anthropic/", "openai/", "googleai/", "google/", "models/"} { + for _, prefix := range []string{"anthropic/", "openai/", "googleai/", "google/", "deepseek/", "models/"} { if strings.HasPrefix(model, prefix) { return strings.TrimPrefix(model, prefix) } @@ -39,6 +40,8 @@ func modelRef(backend ai.Backend, model string) (string, error) { return "openai/" + bare, nil case ai.BackendGemini: return "googleai/" + bare, nil + case ai.BackendDeepSeek: + return "deepseek/" + bare, nil default: return "", fmt.Errorf("genkit provider: unsupported backend %q", backend) } @@ -101,6 +104,10 @@ func effortConfig(backend ai.Backend, req ai.Request) map[string]any { return nil } return map[string]any{"thinkingConfig": map[string]any{"thinkingBudget": thinkingBudget(e)}} + case ai.BackendDeepSeek: + // DeepSeek selects reasoning by model (deepseek-reasoner vs deepseek-chat), + // not a per-request effort knob, so there is no effort config to send. + return nil case ai.BackendAnthropic: cfg := map[string]any{"max_tokens": anthropicMaxTokens(req, e)} if e != api.EffortNone { @@ -119,7 +126,7 @@ func effortConfig(backend ai.Backend, req ai.Request) map[string]any { // system prompt, user prompt, effort config, and (when streaming) the callback. // WithOutputType is added only for the non-streaming structured-output path; // ExecuteStream rejects structured output before calling this. -func generateOptions(p *Provider, req ai.Request, stream gkai.ModelStreamCallback) []gkai.GenerateOption { +func generateOptions(p *Provider, req ai.Request, stream gkai.ModelStreamCallback) ([]gkai.GenerateOption, error) { opts := []gkai.GenerateOption{gkai.WithModelName(p.modelRef)} if req.Prompt.System != "" { @@ -133,8 +140,16 @@ func generateOptions(p *Provider, req ai.Request, stream gkai.ModelStreamCallbac if stream != nil { opts = append(opts, gkai.WithStreaming(stream)) } - if req.Prompt.Schema != nil && stream == nil { - opts = append(opts, gkai.WithOutputType(req.Prompt.Schema)) + if stream == nil { + if len(req.Prompt.SchemaJSON) > 0 { + var schema map[string]any + if err := json.Unmarshal(req.Prompt.SchemaJSON, &schema); err != nil { + return nil, fmt.Errorf("genkit %s: invalid Prompt.SchemaJSON: %w", p.backend, err) + } + opts = append(opts, gkai.WithOutputSchema(schema)) + } else if req.Prompt.Schema != nil { + opts = append(opts, gkai.WithOutputType(req.Prompt.Schema)) + } } - return opts + return opts, nil } diff --git a/pkg/ai/provider/init.go b/pkg/ai/provider/init.go index f4e490c..e2583dd 100644 --- a/pkg/ai/provider/init.go +++ b/pkg/ai/provider/init.go @@ -12,6 +12,9 @@ func init() { ai.RegisterProvider(ai.BackendAnthropic, func(cfg ai.Config) (ai.Provider, error) { return genkit.New(cfg) }) ai.RegisterProvider(ai.BackendOpenAI, func(cfg ai.Config) (ai.Provider, error) { return genkit.New(cfg) }) ai.RegisterProvider(ai.BackendGemini, func(cfg ai.Config) (ai.Provider, error) { return genkit.New(cfg) }) + // DeepSeek exposes an OpenAI-compatible API; genkit serves it via compat_oai + // with a custom base URL (see pluginFor). + ai.RegisterProvider(ai.BackendDeepSeek, func(cfg ai.Config) (ai.Provider, error) { return genkit.New(cfg) }) // Claude Agent SDK as a supervised TS process over JSON-RPC replaces the // one-shot `claude -p` path; claude-code-* models route here too. diff --git a/pkg/ai/provider/json_utils.go b/pkg/ai/provider/json_utils.go index a6ea1a3..30a7a2c 100644 --- a/pkg/ai/provider/json_utils.go +++ b/pkg/ai/provider/json_utils.go @@ -6,6 +6,7 @@ import ( "regexp" "strings" + "github.com/flanksource/captain/pkg/ai" "github.com/yuin/goldmark" "github.com/yuin/goldmark/ast" "github.com/yuin/goldmark/text" @@ -179,61 +180,17 @@ func FindLastJSONLine(output string, predicate func(map[string]any) bool) (json. // Bracket-counting extractors // --------------------------------------------------------------------------- -// ExtractJSONObject finds and extracts the first complete JSON object from -// a string using bracket-counting to handle nested braces correctly. +// ExtractJSONObject finds and extracts the first complete JSON object from a +// string using bracket-counting (canonical implementation in pkg/ai). ANSI codes +// are stripped first so agent-terminal output is handled. func ExtractJSONObject(s string) (string, bool) { - return extractBalanced(StripANSI(s), '{', '}') + return ai.ExtractJSONObject(StripANSI(s)) } -// extractJSONArray finds and extracts the first complete JSON array from -// a string using bracket-counting. +// extractJSONArray finds and extracts the first complete JSON array from a +// string using bracket-counting. func extractJSONArray(s string) (string, bool) { - return extractBalanced(StripANSI(s), '[', ']') -} - -// extractBalanced finds text from the first occurrence of open to the matching -// close character, respecting nesting and JSON string escaping. -func extractBalanced(s string, open, close byte) (string, bool) { - start := strings.IndexByte(s, open) - if start < 0 { - return "", false - } - - depth := 0 - inString := false - escaped := false - - for i := start; i < len(s); i++ { - ch := s[i] - if escaped { - escaped = false - continue - } - if ch == '\\' && inString { - escaped = true - continue - } - if ch == '"' { - inString = !inString - continue - } - if inString { - continue - } - switch ch { - case open: - depth++ - case close: - depth-- - if depth == 0 { - candidate := s[start : i+1] - if isValidJSON(candidate) { - return candidate, true - } - } - } - } - return "", false + return ai.ExtractJSONArray(StripANSI(s)) } // --------------------------------------------------------------------------- @@ -256,24 +213,12 @@ func UnmarshalWithCleanup(data string, v any) error { // StripMarkdownFences removes common markdown fence prefixes/suffixes. // Prefer extractMarkdownJSON for structured extraction; this is a fast -// best-effort helper for simple cases. -func StripMarkdownFences(s string) string { - for _, prefix := range []string{"```json\n", "```json", "```yaml\n", "```yaml", "```yml\n", "```yml", "```\n", "```"} { - s = strings.TrimPrefix(s, prefix) - } - s = strings.TrimSuffix(s, "\n```") - s = strings.TrimSuffix(s, "```") - return s -} +// best-effort helper for simple cases (canonical implementation in pkg/ai). +func StripMarkdownFences(s string) string { return ai.StripMarkdownFences(s) } -// ExtractYAMLBlock extracts content between the first pair of --- delimiters. -func ExtractYAMLBlock(s string) string { - parts := strings.Split(s, "---") - if len(parts) >= 3 { - return strings.TrimSpace(parts[1]) - } - return "" -} +// ExtractYAMLBlock extracts content between the first pair of --- delimiters +// (canonical implementation in pkg/ai). +func ExtractYAMLBlock(s string) string { return ai.ExtractYAMLBlock(s) } // ExtractMarkdownCodeBlocks exposes the goldmark-based code block extractor // for use outside this package. langs filters by info string (empty = all). diff --git a/pkg/ai/provider/schema_test.go b/pkg/ai/provider/schema_test.go deleted file mode 100644 index 8c048c2..0000000 --- a/pkg/ai/provider/schema_test.go +++ /dev/null @@ -1,73 +0,0 @@ -package provider - -import ( - "encoding/json" - "testing" -) - -type testStruct struct { - Name string `json:"name"` - Age int `json:"age"` - Tags []string `json:"tags,omitempty"` - Optional string `json:"optional,omitempty"` -} - -func TestGenerateJSONSchema(t *testing.T) { - schema, err := GenerateJSONSchema(testStruct{}) - if err != nil { - t.Fatalf("GenerateJSONSchema: %v", err) - } - - if schema.Type != "object" { - t.Errorf("Type = %q, want %q", schema.Type, "object") - } - if len(schema.Properties) != 4 { - t.Errorf("Properties count = %d, want 4", len(schema.Properties)) - } - if schema.Properties["name"].Type != "string" { - t.Errorf("name type = %q, want string", schema.Properties["name"].Type) - } - if schema.Properties["age"].Type != "integer" { - t.Errorf("age type = %q, want integer", schema.Properties["age"].Type) - } - if schema.Properties["tags"].Type != "array" { - t.Errorf("tags type = %q, want array", schema.Properties["tags"].Type) - } - - // name and age are required, tags and optional have omitempty - if len(schema.Required) != 2 { - t.Errorf("Required count = %d, want 2", len(schema.Required)) - } -} - -func TestGenerateJSONSchema_Pointer(t *testing.T) { - schema, err := GenerateJSONSchema(&testStruct{}) - if err != nil { - t.Fatalf("GenerateJSONSchema from pointer: %v", err) - } - if schema.Type != "object" { - t.Errorf("Type = %q, want %q", schema.Type, "object") - } -} - -func TestGenerateJSONSchema_NonStruct(t *testing.T) { - _, err := GenerateJSONSchema("string") - if err == nil { - t.Error("expected error for non-struct type") - } -} - -func TestSchemaToJSON(t *testing.T) { - schema := &JSONSchema{Type: "string"} - s, err := SchemaToJSON(schema) - if err != nil { - t.Fatalf("SchemaToJSON: %v", err) - } - var decoded JSONSchema - if err := json.Unmarshal([]byte(s), &decoded); err != nil { - t.Fatalf("re-parse: %v", err) - } - if decoded.Type != "string" { - t.Errorf("Type = %q, want string", decoded.Type) - } -} diff --git a/pkg/ai/provider_test.go b/pkg/ai/provider_test.go index 0304b00..f3487be 100644 --- a/pkg/ai/provider_test.go +++ b/pkg/ai/provider_test.go @@ -46,7 +46,7 @@ func TestInferBackendErrorListsAllBackends(t *testing.T) { } func TestBackendKind(t *testing.T) { - api := map[Backend]bool{BackendAnthropic: true, BackendGemini: true, BackendOpenAI: true} + api := map[Backend]bool{BackendAnthropic: true, BackendGemini: true, BackendOpenAI: true, BackendDeepSeek: true} for _, b := range AllBackends() { want := "cli" if api[b] { @@ -58,17 +58,18 @@ func TestBackendKind(t *testing.T) { } } -// TestAuthEnvVars pins each backend to the env vars it authenticates with, -// including the CLI backends that share their parent provider's key. Every -// backend must resolve to a non-empty list so model listing and whoami never -// silently treat a backend as keyless. +// TestAuthEnvVars pins each backend to the env vars it authenticates with. +// Cmux backends are intentionally keyless: they use the local CLI login. func TestAuthEnvVars(t *testing.T) { cases := map[Backend][]string{ BackendAnthropic: {"ANTHROPIC_API_KEY"}, BackendClaudeCLI: {"ANTHROPIC_API_KEY"}, BackendClaudeAgent: {"ANTHROPIC_API_KEY"}, + BackendClaudeCmux: nil, BackendOpenAI: {"OPENAI_API_KEY"}, BackendCodexCLI: {"OPENAI_API_KEY"}, + BackendCodexCmux: nil, + BackendDeepSeek: {"DEEPSEEK_API_KEY"}, BackendGemini: {"GEMINI_API_KEY", "GOOGLE_API_KEY"}, BackendGeminiCLI: {"GEMINI_API_KEY", "GOOGLE_API_KEY"}, } @@ -98,6 +99,14 @@ func TestGetAPIKeyFromEnvPrefersFirstSet(t *testing.T) { if got := GetAPIKeyFromEnv(BackendClaudeCLI); got != "ant-123" { t.Errorf("GetAPIKeyFromEnv(claude-cli) = %q, want claude-cli to share ANTHROPIC_API_KEY", got) } + + t.Setenv("OPENAI_API_KEY", "openai-123") + if got := GetAPIKeyFromEnv(BackendClaudeCmux); got != "" { + t.Errorf("GetAPIKeyFromEnv(claude-cmux) = %q, want keyless cmux", got) + } + if got := GetAPIKeyFromEnv(BackendCodexCmux); got != "" { + t.Errorf("GetAPIKeyFromEnv(codex-cmux) = %q, want keyless cmux", got) + } } func TestInferBackendKnownPrefixes(t *testing.T) { @@ -109,6 +118,7 @@ func TestInferBackendKnownPrefixes(t *testing.T) { "gemini-cli-pro": BackendGeminiCLI, "gpt-4o": BackendOpenAI, "codex-mini": BackendCodexCLI, + "deepseek-reasoner": BackendDeepSeek, } for model, want := range cases { got, err := InferBackend(model) diff --git a/pkg/ai/provider/schema.go b/pkg/ai/schema.go similarity index 62% rename from pkg/ai/provider/schema.go rename to pkg/ai/schema.go index 1dfab1c..f18a2c9 100644 --- a/pkg/ai/provider/schema.go +++ b/pkg/ai/schema.go @@ -1,12 +1,17 @@ -package provider +package ai import ( "encoding/json" "fmt" "reflect" "strings" + + "github.com/flanksource/captain/pkg/api" ) +// JSONSchema is captain's minimal JSON Schema rendering of a Go struct: enough of +// the vocabulary (types, properties, required, items, enums) for the structured +// output providers to describe the shape a model must return. type JSONSchema struct { Type string `json:"type,omitempty"` Properties map[string]JSONSchema `json:"properties,omitempty"` @@ -17,6 +22,9 @@ type JSONSchema struct { AdditionalProperties bool `json:"additionalProperties,omitempty"` } +// GenerateJSONSchema derives a JSONSchema from a Go struct value (or pointer to +// one). It is the single source of truth for the schema captain sends to +// structured-output backends and prints in the logging middleware. func GenerateJSONSchema(v any) (*JSONSchema, error) { t := reflect.TypeOf(v) if t == nil { @@ -114,6 +122,7 @@ func buildSchema(t reflect.Type) *JSONSchema { return schema } +// SchemaToJSON marshals a JSONSchema to its JSON text. func SchemaToJSON(schema *JSONSchema) (string, error) { data, err := json.Marshal(schema) if err != nil { @@ -121,3 +130,35 @@ func SchemaToJSON(schema *JSONSchema) (string, error) { } return string(data), nil } + +// SchemaJSONFor resolves the JSON schema a provider should send the model for a +// prompt: Prompt.SchemaJSON verbatim when set (preserving the full JSON Schema +// vocabulary), otherwise the reflected Prompt.Schema, otherwise nil for a +// text-mode request. It is the single entry point every provider uses so the two +// schema mechanisms behave identically across backends. +func SchemaJSONFor(p api.Prompt) (json.RawMessage, error) { + if len(p.SchemaJSON) > 0 { + return p.SchemaJSON, nil + } + if p.Schema == nil { + return nil, nil + } + schema, err := GenerateJSONSchema(p.Schema) + if err != nil { + return nil, err + } + return json.Marshal(schema) +} + +// BindStructuredOutput unmarshals a provider's validated structured-output JSON +// into the caller's Go target. Missing or malformed output fails loudly with +// ErrSchemaValidation rather than leaving the target zero-valued. +func BindStructuredOutput(target any, raw json.RawMessage) error { + if len(raw) == 0 { + return fmt.Errorf("%w: no structured output returned", ErrSchemaValidation) + } + if err := json.Unmarshal(raw, target); err != nil { + return fmt.Errorf("%w: %v", ErrSchemaValidation, err) + } + return nil +} diff --git a/pkg/ai/schema_test.go b/pkg/ai/schema_test.go new file mode 100644 index 0000000..d06ac8e --- /dev/null +++ b/pkg/ai/schema_test.go @@ -0,0 +1,139 @@ +package ai + +import ( + "encoding/json" + "errors" + "testing" + + "github.com/flanksource/captain/pkg/api" +) + +type testStruct struct { + Name string `json:"name"` + Age int `json:"age"` + Tags []string `json:"tags,omitempty"` + Optional string `json:"optional,omitempty"` +} + +func TestSchemaJSONFor(t *testing.T) { + // A verbatim SchemaJSON is returned untouched, preserving vocabulary that the + // reflected JSONSchema struct cannot express (minItems, maxLength). + raw := json.RawMessage(`{"type":"array","minItems":2,"maxItems":2}`) + got, err := SchemaJSONFor(api.Prompt{SchemaJSON: raw}) + if err != nil { + t.Fatalf("SchemaJSONFor(SchemaJSON): %v", err) + } + if string(got) != string(raw) { + t.Errorf("SchemaJSON not returned verbatim: got %s", got) + } + + // A Go struct is reflected into an object schema. + got, err = SchemaJSONFor(api.Prompt{Schema: testStruct{}}) + if err != nil { + t.Fatalf("SchemaJSONFor(Schema): %v", err) + } + var decoded map[string]any + if err := json.Unmarshal(got, &decoded); err != nil { + t.Fatalf("reflected schema is not valid JSON: %v", err) + } + if decoded["type"] != "object" { + t.Errorf("reflected schema type = %v, want object", decoded["type"]) + } + + // A text-mode prompt yields no schema. + if got, err := SchemaJSONFor(api.Prompt{User: "hi"}); err != nil || got != nil { + t.Errorf("SchemaJSONFor(text) = (%s, %v), want (nil, nil)", got, err) + } +} + +func TestGenerateJSONSchema(t *testing.T) { + schema, err := GenerateJSONSchema(testStruct{}) + if err != nil { + t.Fatalf("GenerateJSONSchema: %v", err) + } + + if schema.Type != "object" { + t.Errorf("Type = %q, want %q", schema.Type, "object") + } + if len(schema.Properties) != 4 { + t.Errorf("Properties count = %d, want 4", len(schema.Properties)) + } + if schema.Properties["name"].Type != "string" { + t.Errorf("name type = %q, want string", schema.Properties["name"].Type) + } + if schema.Properties["age"].Type != "integer" { + t.Errorf("age type = %q, want integer", schema.Properties["age"].Type) + } + if schema.Properties["tags"].Type != "array" { + t.Errorf("tags type = %q, want array", schema.Properties["tags"].Type) + } + + // name and age are required, tags and optional have omitempty + if len(schema.Required) != 2 { + t.Errorf("Required count = %d, want 2", len(schema.Required)) + } +} + +func TestGenerateJSONSchema_Pointer(t *testing.T) { + schema, err := GenerateJSONSchema(&testStruct{}) + if err != nil { + t.Fatalf("GenerateJSONSchema from pointer: %v", err) + } + if schema.Type != "object" { + t.Errorf("Type = %q, want %q", schema.Type, "object") + } +} + +func TestGenerateJSONSchema_NonStruct(t *testing.T) { + _, err := GenerateJSONSchema("string") + if err == nil { + t.Error("expected error for non-struct type") + } +} + +func TestBindStructuredOutput(t *testing.T) { + type answer struct { + Answer string `json:"answer"` + } + + t.Run("valid JSON binds into the target", func(t *testing.T) { + var out answer + if err := BindStructuredOutput(&out, json.RawMessage(`{"answer":"42"}`)); err != nil { + t.Fatalf("BindStructuredOutput: %v", err) + } + if out.Answer != "42" { + t.Errorf("Answer = %q, want %q", out.Answer, "42") + } + }) + + t.Run("empty payload is a schema-validation error", func(t *testing.T) { + var out answer + err := BindStructuredOutput(&out, nil) + if !errors.Is(err, ErrSchemaValidation) { + t.Errorf("err = %v, want ErrSchemaValidation", err) + } + }) + + t.Run("malformed JSON is a schema-validation error", func(t *testing.T) { + var out answer + err := BindStructuredOutput(&out, json.RawMessage(`{not json`)) + if !errors.Is(err, ErrSchemaValidation) { + t.Errorf("err = %v, want ErrSchemaValidation", err) + } + }) +} + +func TestSchemaToJSON(t *testing.T) { + schema := &JSONSchema{Type: "string"} + s, err := SchemaToJSON(schema) + if err != nil { + t.Fatalf("SchemaToJSON: %v", err) + } + var decoded JSONSchema + if err := json.Unmarshal([]byte(s), &decoded); err != nil { + t.Fatalf("re-parse: %v", err) + } + if decoded.Type != "string" { + t.Errorf("Type = %q, want string", decoded.Type) + } +} diff --git a/pkg/ai/types.go b/pkg/ai/types.go index 3af94b6..67ab6a9 100644 --- a/pkg/ai/types.go +++ b/pkg/ai/types.go @@ -5,11 +5,11 @@ import ( ) // Request is one model/agent call. It is a type alias for the serializable -// api.Spec (model, prompt, budget, memory, permissions, context, session, -// turns) — ai.Request IS the spec, so providers read the nested fields directly: +// api.Spec (model, prompt, budget, memory, permissions, setup, session) — +// ai.Request IS the spec, so providers read the nested fields directly: // req.Temperature/req.Effort (Model is inlined), req.Prompt.User, -// req.Permissions.Mode, req.Context.Dir, req.Memory.Skills. The structured-output -// Go type rides on Prompt.Schema; the +// req.Permissions.Mode, req.Cwd(), req.Memory.Skills. The structured-output Go +// type rides on Prompt.Schema; the // runtime-only tool-permission broker callback lives on Config.CanUseTool. type Request = api.Spec diff --git a/pkg/api/budget.go b/pkg/api/budget.go index a358041..f5d84ac 100644 --- a/pkg/api/budget.go +++ b/pkg/api/budget.go @@ -11,6 +11,12 @@ type Budget struct { // MaxTokens caps output tokens per model call; 0 = backend default. // (legacy ai.Request.MaxTokens / ai.Config.MaxTokens) MaxTokens int `json:"maxTokens,omitempty" yaml:"maxTokens,omitempty" jsonschema:"minimum=0" pretty:"label=Max Tokens"` + + // MaxTurns caps agent turns; 0 = backend default. + MaxTurns int `json:"maxTurns,omitempty" yaml:"maxTurns,omitempty" jsonschema:"minimum=0,maximum=100" pretty:"label=Max Turns"` + + // Timeout caps the overall request duration. Empty means caller default. + Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty" pretty:"label=Timeout"` } // Validate rejects negative ceilings (fail loud). @@ -21,5 +27,8 @@ func (b Budget) Validate() error { if b.MaxTokens < 0 { return fmt.Errorf("invalid maxTokens %d (must be >= 0)", b.MaxTokens) } + if b.MaxTurns < 0 || b.MaxTurns > 100 { + return fmt.Errorf("invalid maxTurns %d (valid: 0-100, 0=backend default)", b.MaxTurns) + } return nil } diff --git a/pkg/api/cli_options.go b/pkg/api/cli_options.go new file mode 100644 index 0000000..cc036b3 --- /dev/null +++ b/pkg/api/cli_options.go @@ -0,0 +1,170 @@ +package api + +import "fmt" + +// This file models the interactive CLI flag surface of the cmux backends +// (claude-cmux / codex-cmux) as typed option structs. It covers only the flags +// that have NO api.Spec home ("extra cmux args"); flags that map onto the Spec +// (model, effort, permission mode, allow/deny tools, memory toggles) stay on the +// Spec and are emitted by the cmux provider from there — one source per flag. +// +// The structs carry three tags: json (form/value key + CLIArgs key), flag (the +// CLI flag the cmux command builder emits), and clicky (form presentation, read +// by clicky's rpc.SchemaForStruct). Enum fields supply their allowed values via a +// SchemaDescriber JSONSchema() method (clicky has no enum tag token). + +// ClaudeCmuxOptions are the interactive `claude` flags with no api.Spec field. +type ClaudeCmuxOptions struct { + Tools []string `json:"tools,omitempty" flag:"tools" clicky:"title=Built-in Tools,desc=Restrict the built-in tool set (e.g. Bash Edit Read),order=1"` + AddDir []string `json:"addDir,omitempty" flag:"add-dir" clicky:"title=Additional Dirs,desc=Extra directories tools may access,order=2"` + MCPConfig []string `json:"mcpConfig,omitempty" flag:"mcp-config" clicky:"title=MCP Config,desc=Load MCP servers from JSON files or strings,order=3"` + StrictMCPConfig bool `json:"strictMcpConfig,omitempty" flag:"strict-mcp-config" clicky:"title=Strict MCP Config,desc=Only use MCP servers from --mcp-config,order=4"` + Settings string `json:"settings,omitempty" flag:"settings" clicky:"title=Settings File/JSON,desc=Path to a settings JSON file or a JSON string,order=5"` + SystemPrompt string `json:"systemPrompt,omitempty" flag:"system-prompt" clicky:"title=System Prompt,desc=Replace the default system prompt,order=6"` + AppendSystem string `json:"appendSystemPrompt,omitempty" flag:"append-system-prompt" clicky:"title=Append System Prompt,desc=Append to the default system prompt,order=7"` + Betas []string `json:"betas,omitempty" flag:"betas" clicky:"title=Beta Headers,desc=Beta headers to include in API requests,order=8"` + ExcludeDynamic bool `json:"excludeDynamicSystemPromptSections,omitempty" flag:"exclude-dynamic-system-prompt-sections" clicky:"title=Exclude Dynamic Sections,desc=Move per-machine sections to the first user message for prompt-cache reuse,order=9"` + Agent string `json:"agent,omitempty" flag:"agent" clicky:"title=Agent,desc=Agent for the current session,order=10"` + SafeMode bool `json:"safeMode,omitempty" flag:"safe-mode" clicky:"title=Safe Mode,desc=Start with all customizations disabled,order=11"` +} + +// CodexCmuxOptions are the interactive `codex` extra args plus the codex posture +// flags (sandbox / ask-for-approval), which have no direct api.Spec field. The +// provider seeds Sandbox/AskForApproval defaults from Permissions.Mode via +// CodexSafety; an explicit value here overrides that default. +type CodexCmuxOptions struct { + Sandbox CodexSandbox `json:"sandbox,omitempty" flag:"sandbox" clicky:"title=Sandbox,order=1"` + AskForApproval CodexApprovalPolicy `json:"askForApproval,omitempty" flag:"ask-for-approval" clicky:"title=Approval Policy,order=2"` + Config []string `json:"config,omitempty" flag:"config" clicky:"title=Config Overrides,desc=Override config values as key=value,order=3"` + Profile string `json:"profile,omitempty" flag:"profile" clicky:"title=Profile,desc=Config profile to layer on the base config,order=4"` + AddDir []string `json:"addDir,omitempty" flag:"add-dir" clicky:"title=Additional Dirs,desc=Extra writable directories,order=5"` + Enable []string `json:"enable,omitempty" flag:"enable" clicky:"title=Enable Features,desc=Enable named features,order=6"` + Disable []string `json:"disable,omitempty" flag:"disable" clicky:"title=Disable Features,desc=Disable named features,order=7"` + StrictConfig bool `json:"strictConfig,omitempty" flag:"strict-config" clicky:"title=Strict Config,desc=Error on unrecognized config fields,order=8"` + Search bool `json:"search,omitempty" flag:"search" clicky:"title=Web Search,desc=Enable live web search,order=9"` + OSS bool `json:"oss,omitempty" flag:"oss" clicky:"title=OSS Provider,desc=Use an open-source model provider,order=10"` + Image []string `json:"image,omitempty" flag:"image" clicky:"title=Images,desc=Image files to attach to the initial prompt,order=11"` +} + +// CodexSandbox is codex's --sandbox policy (from `codex --help`). +type CodexSandbox string + +const ( + CodexSandboxReadOnly CodexSandbox = "read-only" + CodexSandboxWorkspaceWrite CodexSandbox = "workspace-write" + CodexSandboxDangerFull CodexSandbox = "danger-full-access" +) + +// AllCodexSandboxes lists the sandbox policies in ascending permissiveness. +func AllCodexSandboxes() []CodexSandbox { + return []CodexSandbox{CodexSandboxReadOnly, CodexSandboxWorkspaceWrite, CodexSandboxDangerFull} +} + +// JSONSchema implements clicky's rpc.SchemaDescriber so the form renders an enum. +func (CodexSandbox) JSONSchema() map[string]any { + return enumSchema( + codexSandboxValues(), + map[string]string{ + string(CodexSandboxReadOnly): "Read-only", + string(CodexSandboxWorkspaceWrite): "Workspace write", + string(CodexSandboxDangerFull): "Danger: full access", + }, + string(CodexSandboxReadOnly), + "Sandbox policy for model-run shell commands", + ) +} + +// CodexApprovalPolicy is codex's --ask-for-approval policy (from `codex --help`). +type CodexApprovalPolicy string + +const ( + CodexApprovalUntrusted CodexApprovalPolicy = "untrusted" + CodexApprovalOnFailure CodexApprovalPolicy = "on-failure" + CodexApprovalOnRequest CodexApprovalPolicy = "on-request" + CodexApprovalNever CodexApprovalPolicy = "never" +) + +// AllCodexApprovalPolicies lists the approval policies in canonical order. +func AllCodexApprovalPolicies() []CodexApprovalPolicy { + return []CodexApprovalPolicy{CodexApprovalUntrusted, CodexApprovalOnFailure, CodexApprovalOnRequest, CodexApprovalNever} +} + +// JSONSchema implements clicky's rpc.SchemaDescriber so the form renders an enum. +func (CodexApprovalPolicy) JSONSchema() map[string]any { + return enumSchema( + codexApprovalValues(), + map[string]string{ + string(CodexApprovalUntrusted): "Untrusted only", + string(CodexApprovalOnFailure): "On failure (deprecated)", + string(CodexApprovalOnRequest): "On request", + string(CodexApprovalNever): "Never", + }, + string(CodexApprovalOnRequest), + "When codex asks for human approval before running a command", + ) +} + +// CodexSafety maps the permission posture onto codex's sandbox + approval policy. +// It is the single source of truth shared by the codex app-server and cmux +// providers, so the two backends stay consistent. +func CodexSafety(p Permissions) (CodexSandbox, CodexApprovalPolicy) { + switch { + case p.Mode == PermissionBypass: + return CodexSandboxDangerFull, CodexApprovalNever + case p.HasPreset(PresetEdit) && p.Mode == "": + return CodexSandboxWorkspaceWrite, CodexApprovalOnRequest + default: + return CodexSandboxReadOnly, CodexApprovalOnRequest + } +} + +// CLIOptionsFor returns the zero-value option struct for a cmux backend, for +// reflecting into a form schema. It fails loud on any non-cmux backend. +func CLIOptionsFor(b Backend) (any, error) { + switch b { + case BackendClaudeCmux: + return ClaudeCmuxOptions{}, nil + case BackendCodexCmux: + return CodexCmuxOptions{}, nil + default: + return nil, fmt.Errorf("backend %q has no cmux CLI options (valid: %s, %s)", b, BackendClaudeCmux, BackendCodexCmux) + } +} + +func codexSandboxValues() []string { + out := make([]string, 0, len(AllCodexSandboxes())) + for _, v := range AllCodexSandboxes() { + out = append(out, string(v)) + } + return out +} + +func codexApprovalValues() []string { + out := make([]string, 0, len(AllCodexApprovalPolicies())) + for _, v := range AllCodexApprovalPolicies() { + out = append(out, string(v)) + } + return out +} + +// enumSchema builds the SchemaDescriber map for a string enum: the standard +// type/enum/default/description keywords plus clicky's x-enum-* display hints. +func enumSchema(values []string, labels map[string]string, def, desc string) map[string]any { + enum := make([]any, len(values)) + for i, v := range values { + enum[i] = v + } + m := map[string]any{ + "type": "string", + "enum": enum, + "x-enum-display": "radio", + "default": def, + } + if desc != "" { + m["description"] = desc + } + if len(labels) > 0 { + m["x-enum-labels"] = labels + } + return m +} diff --git a/pkg/api/cli_options_test.go b/pkg/api/cli_options_test.go new file mode 100644 index 0000000..5c7e043 --- /dev/null +++ b/pkg/api/cli_options_test.go @@ -0,0 +1,123 @@ +package api + +import ( + "reflect" + "testing" +) + +// enumStrings extracts the "enum" values from a SchemaDescriber map as strings. +func enumStrings(t *testing.T, m map[string]any) []string { + t.Helper() + raw, ok := m["enum"].([]any) + if !ok { + t.Fatalf("schema has no []any enum: %#v", m["enum"]) + } + out := make([]string, len(raw)) + for i, v := range raw { + s, ok := v.(string) + if !ok { + t.Fatalf("enum value %d is not a string: %#v", i, v) + } + out[i] = s + } + return out +} + +func TestCodexSandboxJSONSchema(t *testing.T) { + m := CodexSandbox("").JSONSchema() + if got := m["type"]; got != "string" { + t.Errorf("type = %v, want string", got) + } + want := []string{"read-only", "workspace-write", "danger-full-access"} + if got := enumStrings(t, m); !reflect.DeepEqual(got, want) { + t.Errorf("enum = %v, want %v", got, want) + } + if got := m["default"]; got != string(CodexSandboxReadOnly) { + t.Errorf("default = %v, want %q", got, CodexSandboxReadOnly) + } + if got := m["x-enum-display"]; got != "radio" { + t.Errorf("x-enum-display = %v, want radio", got) + } + labels, ok := m["x-enum-labels"].(map[string]string) + if !ok || len(labels) != len(want) { + t.Errorf("x-enum-labels = %#v, want %d entries", m["x-enum-labels"], len(want)) + } +} + +func TestCodexApprovalJSONSchema(t *testing.T) { + m := CodexApprovalPolicy("").JSONSchema() + want := []string{"untrusted", "on-failure", "on-request", "never"} + if got := enumStrings(t, m); !reflect.DeepEqual(got, want) { + t.Errorf("enum = %v, want %v", got, want) + } + if got := m["default"]; got != string(CodexApprovalOnRequest) { + t.Errorf("default = %v, want %q", got, CodexApprovalOnRequest) + } +} + +func TestCodexSafety(t *testing.T) { + cases := []struct { + name string + perms Permissions + wantSandbox CodexSandbox + wantApproval CodexApprovalPolicy + }{ + {"bypass is full access", Permissions{Mode: PermissionBypass}, CodexSandboxDangerFull, CodexApprovalNever}, + {"edit preset is workspace write", Permissions{Presets: []Preset{PresetEdit}}, CodexSandboxWorkspaceWrite, CodexApprovalOnRequest}, + {"default is read-only", Permissions{}, CodexSandboxReadOnly, CodexApprovalOnRequest}, + {"edit preset with explicit mode stays read-only", Permissions{Mode: PermissionDefault, Presets: []Preset{PresetEdit}}, CodexSandboxReadOnly, CodexApprovalOnRequest}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + sandbox, approval := CodexSafety(tc.perms) + if sandbox != tc.wantSandbox || approval != tc.wantApproval { + t.Errorf("CodexSafety() = (%q, %q), want (%q, %q)", sandbox, approval, tc.wantSandbox, tc.wantApproval) + } + }) + } +} + +func TestCLIOptionsFor(t *testing.T) { + if v, err := CLIOptionsFor(BackendClaudeCmux); err != nil { + t.Errorf("claude-cmux: unexpected error %v", err) + } else if _, ok := v.(ClaudeCmuxOptions); !ok { + t.Errorf("claude-cmux: got %T, want ClaudeCmuxOptions", v) + } + if v, err := CLIOptionsFor(BackendCodexCmux); err != nil { + t.Errorf("codex-cmux: unexpected error %v", err) + } else if _, ok := v.(CodexCmuxOptions); !ok { + t.Errorf("codex-cmux: got %T, want CodexCmuxOptions", v) + } + if _, err := CLIOptionsFor(BackendClaudeCLI); err == nil { + t.Errorf("claude-cli: want error for non-cmux backend, got nil") + } +} + +// TestClaudeCmuxOptionsHasNoSpecFlags guards the Group-A/Group-B split: the extra +// option struct must not redeclare a flag that already has an api.Spec home (model, +// effort, permission mode, allow/deny tools, or the memory-derived flags), which +// would create a second source of truth for that flag. +func TestClaudeCmuxOptionsHasNoSpecFlags(t *testing.T) { + specOwned := map[string]bool{ + "model": true, "effort": true, "permission-mode": true, + "allowedTools": true, "disallowedTools": true, + "bare": true, "disable-slash-commands": true, "setting-sources": true, + "session-id": true, "resume": true, + } + for _, flag := range structFlags(ClaudeCmuxOptions{}) { + if specOwned[flag] { + t.Errorf("ClaudeCmuxOptions declares spec-owned flag %q", flag) + } + } +} + +func structFlags(v any) []string { + rt := reflect.TypeOf(v) + var out []string + for i := 0; i < rt.NumField(); i++ { + if f := rt.Field(i).Tag.Get("flag"); f != "" { + out = append(out, f) + } + } + return out +} diff --git a/pkg/api/context.go b/pkg/api/context.go deleted file mode 100644 index 5242bf8..0000000 --- a/pkg/api/context.go +++ /dev/null @@ -1,39 +0,0 @@ -package api - -// Context is the workspace a request runs against. Consolidates the legacy -// agent.RunContext{Cwd,Repo,ChangedFiles} and the worktree plugin's inputs/outputs. -type Context struct { - // Dir is the working directory the provider runs in. (RunContext.Cwd / ai.Request.Cwd) - Dir string `json:"dir,omitempty" yaml:"dir,omitempty" pretty:"label=Dir"` - // Diff is the unified diff of the run's changes. (git.Diff / worktree.Result.Diff) - Diff string `json:"diff,omitempty" yaml:"diff,omitempty" pretty:"label=Diff"` - // Files are the repo-relative paths the run changed. (RunContext.ChangedFiles) - Files []string `json:"files,omitempty" yaml:"files,omitempty" pretty:"label=Files"` - // Git pins the run to a repository, revision, and optional pull request. - Git *Git `json:"git,omitempty" yaml:"git,omitempty"` - // Worktree isolates the run in a dedicated git worktree on a new branch. - Worktree *Worktree `json:"worktree,omitempty" yaml:"worktree,omitempty"` - // Env are extra environment variables exported to the agent process for the - // run (e.g. host-app metadata a tool the agent runs reads back). CLI/cmux - // providers that launch a child process apply them; API providers ignore them. - Env map[string]string `json:"env,omitempty" yaml:"env,omitempty" pretty:"label=Env"` -} - -// Git pins a run to a repository, revision, and optional pull request. -type Git struct { - Repo string `json:"repo,omitempty" yaml:"repo,omitempty" pretty:"label=Repo"` // repo root (RunContext.Repo) - SHA string `json:"sha,omitempty" yaml:"sha,omitempty" pretty:"label=SHA"` // base/commit ref - PR string `json:"pr,omitempty" yaml:"pr,omitempty" pretty:"label=PR"` // pull-request number or URL -} - -// Worktree isolates a run in a dedicated git worktree on a new branch. Branch is -// required to enable isolation; Path/Commit are populated on teardown. Mirrors -// the legacy worktree.Plugin/Result. -type Worktree struct { - Branch string `json:"branch,omitempty" yaml:"branch,omitempty" pretty:"label=Branch"` // new branch name - Base string `json:"base,omitempty" yaml:"base,omitempty" pretty:"label=Base"` // base ref; HEAD when empty - CommitMsg string `json:"commitMsg,omitempty" yaml:"commitMsg,omitempty" pretty:"label=Commit Msg"` // commit-all message on teardown - KeepOnExit bool `json:"keepOnExit,omitempty" yaml:"keepOnExit,omitempty" pretty:"label=Keep"` // keep worktree+branch for inspection - Path string `json:"path,omitempty" yaml:"path,omitempty" pretty:"label=Path"` // output: filesystem path - Commit string `json:"commit,omitempty" yaml:"commit,omitempty" pretty:"label=Commit"` // output: commit SHA -} diff --git a/pkg/api/enums.go b/pkg/api/enums.go index 422f776..83089ac 100644 --- a/pkg/api/enums.go +++ b/pkg/api/enums.go @@ -1,16 +1,20 @@ // Package api holds captain's root domain types — the serializable, nested // specification of a model/agent run (Model, Cost, Budget, Memory, Permissions, -// Context, Prompt) and the Spec that composes them. It is a leaf package: it -// imports only clicky/api (pretty-printing), invopop/jsonschema, and the stdlib, -// never pkg/ai. pkg/ai re-exports the enum/value types here via aliases, so this -// package is the single source of truth for Backend/Effort/Cost. +// Setup, Prompt) and the Spec that composes them. It never imports pkg/ai; +// pkg/ai re-exports the enum/value types here via aliases, so this package is +// the single source of truth for Backend/Effort/Cost. package api import ( + "errors" "fmt" "strings" ) +// ErrInferBackend marks the "can't infer a backend from this model name" failure +// so callers can enrich it (e.g. with "did you mean" model suggestions). +var ErrInferBackend = errors.New("unable to infer backend from model name") + // Backend is the provider/runtime that serves a request. This is the canonical // definition; pkg/ai re-exports it via `type Backend = api.Backend`. type Backend string @@ -19,17 +23,14 @@ const ( BackendAnthropic Backend = "anthropic" BackendGemini Backend = "gemini" BackendOpenAI Backend = "openai" + BackendDeepSeek Backend = "deepseek" BackendClaudeCLI Backend = "claude-cli" BackendCodexCLI Backend = "codex-cli" BackendGeminiCLI Backend = "gemini-cli" BackendClaudeAgent Backend = "claude-agent" // BackendClaudeCmux / BackendCodexCmux drive an interactive claude/codex TUI // inside a tmux/cmux surface (the cmux provider), tailing the session JSONL. - // They are registered providers selected explicitly by a host (gavel), not - // part of AllBackends(): they are not user-facing, carry no prompt-rendering - // fixture (the provider pastes the host's prompt verbatim), and are never - // inferred from a model name. Backend.Valid() is therefore false for them, - // which is fine — nothing in the run path validates the backend. + // They are selected explicitly, not inferred from a model name. BackendClaudeCmux Backend = "claude-cmux" BackendCodexCmux Backend = "codex-cmux" ) @@ -38,8 +39,9 @@ const ( // source of truth behind Valid, BackendList, and the help/error strings. func AllBackends() []Backend { return []Backend{ - BackendAnthropic, BackendGemini, BackendOpenAI, - BackendClaudeCLI, BackendClaudeAgent, BackendCodexCLI, BackendGeminiCLI, + BackendAnthropic, BackendGemini, BackendOpenAI, BackendDeepSeek, + BackendClaudeCLI, BackendClaudeAgent, BackendClaudeCmux, + BackendCodexCLI, BackendCodexCmux, BackendGeminiCLI, } } @@ -57,7 +59,7 @@ func (b Backend) Valid() bool { // or "cli" (delegated to an installed coding-agent binary with its own auth). func (b Backend) Kind() string { switch b { - case BackendAnthropic, BackendGemini, BackendOpenAI: + case BackendAnthropic, BackendGemini, BackendOpenAI, BackendDeepSeek: return "api" default: return "cli" @@ -65,13 +67,16 @@ func (b Backend) Kind() string { } // AuthEnvVars returns the environment variables consulted for a backend's API -// key, in priority order. CLI backends share their parent provider's key. +// key, in priority order. Some CLI backends can use a parent provider key, while +// cmux backends are keyless and rely on the local CLI login. func AuthEnvVars(b Backend) []string { switch b { - case BackendAnthropic, BackendClaudeCLI, BackendClaudeAgent, BackendClaudeCmux: + case BackendAnthropic, BackendClaudeCLI, BackendClaudeAgent: return []string{"ANTHROPIC_API_KEY"} - case BackendOpenAI, BackendCodexCLI, BackendCodexCmux: + case BackendOpenAI, BackendCodexCLI: return []string{"OPENAI_API_KEY"} + case BackendDeepSeek: + return []string{"DEEPSEEK_API_KEY"} case BackendGemini, BackendGeminiCLI: return []string{"GEMINI_API_KEY", "GOOGLE_API_KEY"} default: @@ -114,9 +119,11 @@ func InferBackend(model string) (Backend, error) { return BackendCodexCLI, nil case strings.HasPrefix(m, "gpt-"), strings.HasPrefix(m, "o1"), strings.HasPrefix(m, "o3"), strings.HasPrefix(m, "o4"): return BackendOpenAI, nil + case strings.HasPrefix(m, "deepseek"): + return BackendDeepSeek, nil } - return "", fmt.Errorf("unable to infer backend from model name: %s (pass an explicit backend: %s)", model, BackendList()) + return "", fmt.Errorf("%w: %s (pass an explicit backend: %s)", ErrInferBackend, model, BackendList()) } // Effort is the per-request reasoning effort. captain owns this enum (it adds @@ -154,6 +161,74 @@ func (e Effort) Validate() error { return fmt.Errorf("invalid reasoning effort %q; want one of: low, medium, high, xhigh", e) } +// SchemaStrictness governs what captain does when a structured-output response +// fails validation against the request's JSON schema. "" disables post-response +// validation (the default — the schema is still sent to the model, just never +// checked on the way back). +type SchemaStrictness string + +const ( + SchemaStrictnessNone SchemaStrictness = "" + SchemaStrictnessWarning SchemaStrictness = "warning" + SchemaStrictnessError SchemaStrictness = "error" + SchemaStrictnessRetry SchemaStrictness = "retry" +) + +// AllSchemaStrictness lists the non-empty strictness modes. +func AllSchemaStrictness() []SchemaStrictness { + return []SchemaStrictness{SchemaStrictnessWarning, SchemaStrictnessError, SchemaStrictnessRetry} +} + +// Valid reports whether s is a recognised strictness mode (including none/""). +func (s SchemaStrictness) Valid() bool { + switch s { + case SchemaStrictnessNone, SchemaStrictnessWarning, SchemaStrictnessError, SchemaStrictnessRetry: + return true + default: + return false + } +} + +// Validate fails loud on an unknown strictness mode, naming the valid set. +func (s SchemaStrictness) Validate() error { + if s.Valid() { + return nil + } + return fmt.Errorf("invalid schemaStrictness %q; want one of: warning, error, retry", s) +} + +// VerifyScope narrows a workflow's verification to the changed files vs the +// whole tree. "" defaults to all. +type VerifyScope string + +const ( + VerifyScopeAll VerifyScope = "all" + VerifyScopeChanged VerifyScope = "changed" +) + +// AllVerifyScopes lists the non-empty verification scopes. +func AllVerifyScopes() []VerifyScope { + return []VerifyScope{VerifyScopeAll, VerifyScopeChanged} +} + +// Valid reports whether s is a recognised scope (including the default ""). +func (s VerifyScope) Valid() bool { + switch s { + case "", VerifyScopeAll, VerifyScopeChanged: + return true + default: + return false + } +} + +// Validate fails loud on an unknown scope, naming the valid set. +func (s VerifyScope) Validate() error { + if s.Valid() { + return nil + } + return fmt.Errorf("invalid verify scope %q; want one of: all, changed", s) +} + // ToolMode is the per-tool exposure for one request. type ToolMode string @@ -173,6 +248,45 @@ func (m ToolMode) Valid() bool { } } +// ToolPolicy is the runtime-spec policy map value for one tool. It keeps the +// wire shape close to coding-agent UX: auto, ask, allow, deny. +type ToolPolicy string + +const ( + ToolPolicyAuto ToolPolicy = "auto" + ToolPolicyAsk ToolPolicy = "ask" + ToolPolicyAllow ToolPolicy = "allow" + ToolPolicyDeny ToolPolicy = "deny" +) + +// Valid reports whether p is a recognised runtime tool policy. +func (p ToolPolicy) Valid() bool { + switch p { + case ToolPolicyAuto, ToolPolicyAsk, ToolPolicyAllow, ToolPolicyDeny: + return true + default: + return false + } +} + +// ResourceMode is the enabled/disabled policy for MCP servers, plugins, and skills. +type ResourceMode string + +const ( + ResourceEnabled ResourceMode = "enabled" + ResourceDisabled ResourceMode = "disabled" +) + +// Valid reports whether m is a recognised resource mode. +func (m ResourceMode) Valid() bool { + switch m { + case ResourceEnabled, ResourceDisabled: + return true + default: + return false + } +} + // PermissionMode is the base permission posture (claude --permission-mode). type PermissionMode string @@ -182,12 +296,14 @@ const ( PermissionAcceptEdits PermissionMode = "acceptEdits" PermissionAuto PermissionMode = "auto" PermissionBypass PermissionMode = "bypassPermissions" + PermissionDontAsk PermissionMode = "dontAsk" ) -// AllPermissionModes lists the permission postures in canonical order. +// AllPermissionModes lists the permission postures in canonical order. Mirrors +// the `claude --permission-mode` choices so the mapping is lossless. func AllPermissionModes() []PermissionMode { return []PermissionMode{ - PermissionAcceptEdits, PermissionAuto, PermissionBypass, PermissionDefault, PermissionPlan, + PermissionAcceptEdits, PermissionAuto, PermissionBypass, PermissionDefault, PermissionDontAsk, PermissionPlan, } } diff --git a/pkg/api/enums_test.go b/pkg/api/enums_test.go index 17f549e..5776623 100644 --- a/pkg/api/enums_test.go +++ b/pkg/api/enums_test.go @@ -16,6 +16,7 @@ func TestInferBackend(t *testing.T) { "gemini-cli-pro": BackendGeminiCLI, "codex-gpt-5-codex": BackendCodexCLI, "grok-2": BackendCodexCLI, + "deepseek-chat": BackendDeepSeek, } for model, want := range cases { got, err := InferBackend(model) @@ -42,6 +43,20 @@ func TestEffortValidateIncludesXHigh(t *testing.T) { } } +func TestSchemaStrictnessValidate(t *testing.T) { + for _, s := range []SchemaStrictness{SchemaStrictnessNone, SchemaStrictnessWarning, SchemaStrictnessError, SchemaStrictnessRetry} { + if err := s.Validate(); err != nil { + t.Errorf("SchemaStrictness(%q).Validate() = %v, want nil", s, err) + } + } + if err := SchemaStrictness("strict").Validate(); err == nil { + t.Error("SchemaStrictness(strict).Validate() should fail (only warning/error/retry)") + } + if want := []SchemaStrictness{SchemaStrictnessWarning, SchemaStrictnessError, SchemaStrictnessRetry}; !reflect.DeepEqual(AllSchemaStrictness(), want) { + t.Errorf("AllSchemaStrictness() = %v, want %v", AllSchemaStrictness(), want) + } +} + func TestBackendKindAndAuth(t *testing.T) { if BackendAnthropic.Kind() != "api" || BackendClaudeAgent.Kind() != "cli" { t.Errorf("Kind() classification wrong: api=%q cli=%q", BackendAnthropic.Kind(), BackendClaudeAgent.Kind()) diff --git a/pkg/api/model.go b/pkg/api/model.go index 9230f6d..b347800 100644 --- a/pkg/api/model.go +++ b/pkg/api/model.go @@ -1,6 +1,9 @@ package api -import "fmt" +import ( + "fmt" + "strings" +) // Model identifies which LLM serves a request plus the per-request inference // knobs. Maps onto the legacy ai.Config.Model + ai.Request.{Temperature, @@ -23,6 +26,16 @@ type Model struct { // Effort is the reasoning effort for thinking-capable models. Effort Effort `json:"effort,omitempty" yaml:"effort,omitempty" jsonschema:"enum=,enum=low,enum=medium,enum=high,enum=xhigh" pretty:"label=Effort"` + + // NoCache disables model response caching for this run. + NoCache bool `json:"noCache,omitempty" yaml:"noCache,omitempty" pretty:"label=No Cache"` + + // Fallbacks are alternative models tried in order when the primary fails with a + // transient/unavailable error or its provider cannot be constructed. Each is a + // full Model (own backend/effort/temperature); a fallback's own nested Fallbacks + // are ignored. Populate it directly, via a comma-separated Name (see ExpandCSV), + // or via the --fallback flag / fallbacks: frontmatter. + Fallbacks []Model `json:"fallbacks,omitempty" yaml:"fallbacks,omitempty" pretty:"label=Fallbacks"` } // ResolveBackend returns Backend when set, otherwise infers it from Name. @@ -45,11 +58,29 @@ func (m Model) Temp() (float64, bool) { return *m.Temperature, true } -// Validate checks the model name is present and the knobs are in range. +// Validate checks the model name is present, the knobs are in range, and every +// fallback is itself a well-formed model. func (m Model) Validate() error { if m.Name == "" { return fmt.Errorf("model name is required") } + if err := m.validateKnobs(); err != nil { + return err + } + for i, fb := range m.Fallbacks { + if fb.Name == "" { + return fmt.Errorf("fallback[%d]: model name is required", i) + } + if err := fb.validateKnobs(); err != nil { + return fmt.Errorf("fallback[%d] %q: %w", i, fb.Name, err) + } + } + return nil +} + +// validateKnobs range-checks the per-request inference knobs shared by a primary +// model and each fallback (backend/temperature/effort), independent of Name. +func (m Model) validateKnobs() error { if m.Backend != "" && !m.Backend.Valid() { return fmt.Errorf("invalid backend %q (valid: %s)", m.Backend, BackendList()) } @@ -58,3 +89,64 @@ func (m Model) Validate() error { } return m.Effort.Validate() } + +// ExpandCSV moves any comma-separated tail of Name into name-only Fallbacks +// (prepended, so CSV order is preserved ahead of an explicit Fallbacks list), +// leaving Name as the single primary. It is idempotent: a single-model Name is +// returned with only whitespace trimmed, and a second call is a no-op. +func (m Model) ExpandCSV() Model { + names := splitCSV(m.Name) + if len(names) == 0 { + return m + } + m.Name = names[0] + if len(names) == 1 { + return m + } + tail := make([]Model, 0, len(names)-1) + for _, n := range names[1:] { + tail = append(tail, Model{Name: n}) + } + m.Fallbacks = append(tail, m.Fallbacks...) + return m +} + +// Candidates returns the ordered models to try: the ExpandCSV primary first, then +// each fallback. Fallbacks inherit the primary's Temperature/Effort/NoCache when +// unset, keep their own Name/Backend (an empty Backend is inferred at construction +// from the fallback's own Name), clear ID, and have nested Fallbacks dropped. A +// length of 1 means "no fallback". +func (m Model) Candidates() []Model { + m = m.ExpandCSV() + primary := m + primary.Fallbacks = nil + out := make([]Model, 0, 1+len(m.Fallbacks)) + out = append(out, primary) + for _, fb := range m.Fallbacks { + fb.Fallbacks = nil + fb.ID = "" + if fb.Temperature == nil { + fb.Temperature = m.Temperature + } + if fb.Effort == "" { + fb.Effort = m.Effort + } + if !fb.NoCache { + fb.NoCache = m.NoCache + } + out = append(out, fb) + } + return out +} + +// splitCSV splits a comma-separated string into trimmed, non-empty parts. +func splitCSV(s string) []string { + parts := strings.Split(s, ",") + out := make([]string, 0, len(parts)) + for _, p := range parts { + if t := strings.TrimSpace(p); t != "" { + out = append(out, t) + } + } + return out +} diff --git a/pkg/api/model_test.go b/pkg/api/model_test.go new file mode 100644 index 0000000..ca0f1a6 --- /dev/null +++ b/pkg/api/model_test.go @@ -0,0 +1,163 @@ +package api + +import ( + "encoding/json" + "reflect" + "strings" + "testing" + + "gopkg.in/yaml.v3" +) + +func modelNames(models []Model) []string { + if len(models) == 0 { + return nil + } + out := make([]string, len(models)) + for i, m := range models { + out[i] = m.Name + } + return out +} + +func TestModel_ExpandCSV(t *testing.T) { + cases := []struct { + name string + in Model + wantName string + wantFallbacks []string + }{ + {"single", Model{Name: "claude-sonnet-5"}, "claude-sonnet-5", nil}, + {"csv three", Model{Name: "a,b,c"}, "a", []string{"b", "c"}}, + {"spaces trimmed", Model{Name: " a , b "}, "a", []string{"b"}}, + { + "csv prepended before explicit fallbacks", + Model{Name: "a,b", Fallbacks: []Model{{Name: "z"}}}, + "a", []string{"b", "z"}, + }, + {"empty name unchanged", Model{Name: ""}, "", nil}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + got := tc.in.ExpandCSV() + if got.Name != tc.wantName { + t.Errorf("Name = %q, want %q", got.Name, tc.wantName) + } + if names := modelNames(got.Fallbacks); !reflect.DeepEqual(names, tc.wantFallbacks) { + t.Errorf("Fallbacks = %v, want %v", names, tc.wantFallbacks) + } + // Idempotent: a second expansion changes nothing. + if again := got.ExpandCSV(); !reflect.DeepEqual(again, got) { + t.Errorf("ExpandCSV not idempotent:\n first=%+v\nsecond=%+v", got, again) + } + }) + } +} + +func TestModel_Candidates(t *testing.T) { + primary := Model{ + Name: "claude-sonnet-5", + Effort: EffortHigh, + Temperature: floatPtr(0.3), + NoCache: true, + Fallbacks: []Model{ + {Name: "gpt-4o"}, // inherits primary effort/temp/noCache + {Name: "gemini-2.0-flash", Effort: EffortLow, ID: "drop-me", Fallbacks: []Model{{Name: "nested"}}}, + }, + } + got := primary.Candidates() + + if names := modelNames(got); !reflect.DeepEqual(names, []string{"claude-sonnet-5", "gpt-4o", "gemini-2.0-flash"}) { + t.Fatalf("candidate order = %v", names) + } + if got[0].Fallbacks != nil { + t.Errorf("primary candidate should not carry Fallbacks, got %v", got[0].Fallbacks) + } + // gpt-4o inherits the primary's effort/temperature/noCache. + if got[1].Effort != EffortHigh { + t.Errorf("fallback effort = %q, want inherited %q", got[1].Effort, EffortHigh) + } + if got[1].Temperature == nil || *got[1].Temperature != 0.3 { + t.Errorf("fallback temperature = %v, want inherited 0.3", got[1].Temperature) + } + if !got[1].NoCache { + t.Errorf("fallback NoCache = false, want inherited true") + } + // gemini keeps its own effort, drops ID and nested fallbacks. + if got[2].Effort != EffortLow { + t.Errorf("fallback own effort = %q, want %q", got[2].Effort, EffortLow) + } + if got[2].ID != "" { + t.Errorf("fallback ID = %q, want cleared", got[2].ID) + } + if got[2].Fallbacks != nil { + t.Errorf("nested fallbacks should be dropped, got %v", got[2].Fallbacks) + } +} + +func TestModel_Candidates_SingleWhenNoFallbacks(t *testing.T) { + if got := (Model{Name: "claude-sonnet-5"}).Candidates(); len(got) != 1 { + t.Fatalf("Candidates len = %d, want 1", len(got)) + } +} + +func TestModel_Validate_Fallbacks(t *testing.T) { + cases := []struct { + name string + model Model + wantErr string + }{ + {"valid list", Model{Name: "claude-sonnet-5", Fallbacks: []Model{{Name: "gpt-4o", Effort: EffortHigh}}}, ""}, + {"empty fallback name", Model{Name: "claude-sonnet-5", Fallbacks: []Model{{Name: ""}}}, "fallback[0]: model name is required"}, + {"bad fallback temp", Model{Name: "claude-sonnet-5", Fallbacks: []Model{{Name: "gpt-4o", Temperature: floatPtr(3)}}}, "fallback[0] \"gpt-4o\""}, + {"bad fallback effort", Model{Name: "claude-sonnet-5", Fallbacks: []Model{{Name: "gpt-4o", Effort: "extreme"}}}, "fallback[0] \"gpt-4o\""}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + err := tc.model.Validate() + if tc.wantErr == "" { + if err != nil { + t.Fatalf("Validate() = %v, want nil", err) + } + return + } + if err == nil || !strings.Contains(err.Error(), tc.wantErr) { + t.Fatalf("Validate() = %v, want mention of %q", err, tc.wantErr) + } + }) + } +} + +// TestModel_FallbacksRoundTrip pins that object-form fallbacks survive JSON and +// YAML round-trips with their per-model knobs intact. +func TestModel_FallbacksRoundTrip(t *testing.T) { + in := Model{ + Name: "claude-sonnet-5", + Fallbacks: []Model{ + {Name: "gpt-4o", Effort: EffortHigh}, + {Name: "gemini-2.0-flash", Temperature: floatPtr(0.2)}, + }, + } + for _, tc := range []struct { + name string + marshal func(any) ([]byte, error) + unmarshal func([]byte, any) error + }{ + {"json", json.Marshal, json.Unmarshal}, + {"yaml", yaml.Marshal, yaml.Unmarshal}, + } { + t.Run(tc.name, func(t *testing.T) { + data, err := tc.marshal(in) + if err != nil { + t.Fatalf("marshal: %v", err) + } + var out Model + if err := tc.unmarshal(data, &out); err != nil { + t.Fatalf("unmarshal: %v", err) + } + if !reflect.DeepEqual(in, out) { + t.Errorf("round-trip mismatch:\n in=%+v\nout=%+v", in, out) + } + }) + } +} diff --git a/pkg/api/permission_catalog.go b/pkg/api/permission_catalog.go new file mode 100644 index 0000000..9083da0 --- /dev/null +++ b/pkg/api/permission_catalog.go @@ -0,0 +1,22 @@ +package api + +// PermissionCatalog lists permission targets available to the current workspace. +type PermissionCatalog struct { + Tools []PermissionCatalogItem `json:"tools"` + MCP []PermissionCatalogItem `json:"mcp"` + Plugins []PermissionCatalogItem `json:"plugins"` + Skills []PermissionCatalogItem `json:"skills"` +} + +// PermissionCatalogItem is one selectable tool, MCP server, plugin, or skill. +type PermissionCatalogItem struct { + ID string `json:"id"` + Label string `json:"label,omitempty"` + Group string `json:"group,omitempty"` + Description string `json:"description,omitempty"` + Source string `json:"source,omitempty"` + SourcePath string `json:"sourcePath,omitempty"` + Configured bool `json:"configured,omitempty"` + Available bool `json:"available,omitempty"` + DefaultMode string `json:"defaultMode,omitempty"` +} diff --git a/pkg/api/permissions.go b/pkg/api/permissions.go index 24742d2..0a43beb 100644 --- a/pkg/api/permissions.go +++ b/pkg/api/permissions.go @@ -1,8 +1,12 @@ package api import ( + "encoding/json" "fmt" "slices" + "sort" + + "gopkg.in/yaml.v3" ) // Permissions governs what an agent may do: the base posture, named presets, @@ -18,25 +22,33 @@ type Permissions struct { // MCP controls Model-Context-Protocol servers. MCP MCP `json:"mcp,omitempty" yaml:"mcp,omitempty"` // Plugins are extra plugin directories (claude --plugin-dir). - Plugins []string `json:"plugins,omitempty" yaml:"plugins,omitempty" pretty:"label=Plugins"` + Plugins ResourcePolicies `json:"plugins,omitempty" yaml:"plugins,omitempty" pretty:"label=Plugins"` + // Skills are skill directories enabled for this request. + Skills ResourcePolicies `json:"skills,omitempty" yaml:"skills,omitempty" pretty:"label=Skills"` } -// Tools is the per-tool policy. Allow/Deny are explicit lists (ai.Request. -// AllowedTools / DisallowedTools); Modes maps a tool to enabled|ask|disabled. +// Tools is the per-tool policy. Allow/Deny/Modes are retained for legacy callers; +// JSON/YAML marshals as map[tool]auto|ask|allow|deny. type Tools struct { - Allow []string `json:"allow,omitempty" yaml:"allow,omitempty" pretty:"label=Allow"` - Deny []string `json:"deny,omitempty" yaml:"deny,omitempty" pretty:"label=Deny"` - Modes map[string]ToolMode `json:"modes,omitempty" yaml:"modes,omitempty" pretty:"label=Modes"` + Allow []string `json:"-" yaml:"-" pretty:"label=Allow"` + Deny []string `json:"-" yaml:"-" pretty:"label=Deny"` + Modes map[string]ToolMode `json:"-" yaml:"-" pretty:"label=Modes"` } // MCP controls Model-Context-Protocol servers. type MCP struct { // Disabled turns off all MCP servers. (ai.Request.NoMCP) - Disabled bool `json:"disabled,omitempty" yaml:"disabled,omitempty" pretty:"label=Disabled"` + Disabled bool `json:"-" yaml:"-" pretty:"label=Disabled"` // Servers is an optional allowlist subset of configured servers. - Servers []string `json:"servers,omitempty" yaml:"servers,omitempty" pretty:"label=Servers"` + Servers []string `json:"-" yaml:"-" pretty:"label=Servers"` + // Modes optionally enables/disables named configured servers. + Modes ResourcePolicies `json:"-" yaml:"-" pretty:"label=Modes"` } +// ResourcePolicies maps MCP/plugin/skill IDs to enabled|disabled. It accepts a +// legacy string array on decode, treating every listed item as enabled. +type ResourcePolicies map[string]ResourceMode + // HasPreset reports whether the named preset is enabled. func (p Permissions) HasPreset(x Preset) bool { return slices.Contains(p.Presets, x) @@ -52,10 +64,402 @@ func (p Permissions) Validate() error { return fmt.Errorf("invalid preset %q (valid: edit, bare)", preset) } } - for tool, mode := range p.Tools.Modes { + for tool, policy := range p.Tools.Policies() { + if !policy.Valid() { + return fmt.Errorf("invalid tool policy %q for tool %q (valid: auto, ask, allow, deny)", policy, tool) + } + } + for name, mode := range p.MCP.Modes { + if !mode.Valid() { + return fmt.Errorf("invalid mcp mode %q for %q (valid: enabled, disabled)", mode, name) + } + } + for name, mode := range p.Plugins { + if !mode.Valid() { + return fmt.Errorf("invalid plugin mode %q for %q (valid: enabled, disabled)", mode, name) + } + } + for name, mode := range p.Skills { if !mode.Valid() { - return fmt.Errorf("invalid tool mode %q for tool %q (valid: enabled, ask, disabled)", mode, tool) + return fmt.Errorf("invalid skill mode %q for %q (valid: enabled, disabled)", mode, name) + } + } + return nil +} + +// Policies returns the canonical tool policy map. +func (t Tools) Policies() map[string]ToolPolicy { + out := map[string]ToolPolicy{} + for _, tool := range t.Allow { + if tool != "" { + out[tool] = ToolPolicyAllow + } + } + for _, tool := range t.Deny { + if tool != "" { + out[tool] = ToolPolicyDeny + } + } + for tool, mode := range t.Modes { + if tool == "" { + continue + } + switch mode { + case ToolModeEnabled: + out[tool] = ToolPolicyAuto + case ToolModeAsk: + out[tool] = ToolPolicyAsk + case ToolModeDisabled: + out[tool] = ToolPolicyDeny + } + } + return out +} + +func (t Tools) MarshalJSON() ([]byte, error) { + policies := t.Policies() + if len(policies) == 0 { + return []byte("{}"), nil + } + return json.Marshal(policies) +} + +func (t *Tools) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if hasRawKey(raw, "allow") || hasRawKey(raw, "deny") || hasRawKey(raw, "modes") { + var legacy struct { + Allow []string `json:"allow"` + Deny []string `json:"deny"` + Modes map[string]ToolMode `json:"modes"` + } + if err := json.Unmarshal(data, &legacy); err != nil { + return err + } + t.Allow = compactStrings(legacy.Allow) + t.Deny = compactStrings(legacy.Deny) + t.Modes = compactToolModes(legacy.Modes) + for key, value := range raw { + if key == "allow" || key == "deny" || key == "modes" { + continue + } + var policy ToolPolicy + if err := json.Unmarshal(value, &policy); err != nil { + return err + } + t.applyPolicy(key, policy) + } + return nil + } + var policies map[string]ToolPolicy + if err := json.Unmarshal(data, &policies); err != nil { + return err + } + t.setPolicies(policies) + return nil +} + +func (t Tools) MarshalYAML() (any, error) { + return t.Policies(), nil +} + +func (t *Tools) UnmarshalYAML(value *yaml.Node) error { + if mappingHas(value, "allow") || mappingHas(value, "deny") || mappingHas(value, "modes") { + var legacy struct { + Allow []string `yaml:"allow"` + Deny []string `yaml:"deny"` + Modes map[string]ToolMode `yaml:"modes"` + } + if err := value.Decode(&legacy); err != nil { + return err + } + t.Allow = compactStrings(legacy.Allow) + t.Deny = compactStrings(legacy.Deny) + t.Modes = compactToolModes(legacy.Modes) + return nil + } + var policies map[string]ToolPolicy + if err := value.Decode(&policies); err != nil { + return err + } + t.setPolicies(policies) + return nil +} + +func (t *Tools) setPolicies(policies map[string]ToolPolicy) { + t.Allow = nil + t.Deny = nil + t.Modes = nil + for _, key := range sortedKeys(policies) { + t.applyPolicy(key, policies[key]) + } +} + +func (t *Tools) applyPolicy(tool string, policy ToolPolicy) { + if tool == "" { + return + } + switch policy { + case ToolPolicyAllow: + t.Allow = append(t.Allow, tool) + case ToolPolicyDeny: + t.Deny = append(t.Deny, tool) + case ToolPolicyAsk: + if t.Modes == nil { + t.Modes = map[string]ToolMode{} + } + t.Modes[tool] = ToolModeAsk + case ToolPolicyAuto: + if t.Modes == nil { + t.Modes = map[string]ToolMode{} + } + t.Modes[tool] = ToolModeEnabled + } +} + +func (m MCP) MarshalJSON() ([]byte, error) { + return json.Marshal(m.asMap()) +} + +func (m *MCP) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + m.Disabled = false + m.Servers = nil + m.Modes = nil + for key, value := range raw { + switch key { + case "disabled": + if err := json.Unmarshal(value, &m.Disabled); err != nil { + return err + } + case "servers": + if err := json.Unmarshal(value, &m.Servers); err != nil { + return err + } + m.Servers = compactStrings(m.Servers) + default: + var mode ResourceMode + if err := json.Unmarshal(value, &mode); err != nil { + return err + } + if m.Modes == nil { + m.Modes = ResourcePolicies{} + } + m.Modes[key] = mode + } + } + return nil +} + +func (m MCP) MarshalYAML() (any, error) { + return m.asMap(), nil +} + +func (m *MCP) UnmarshalYAML(value *yaml.Node) error { + m.Disabled = false + m.Servers = nil + m.Modes = nil + for _, keyNode := range mappingKeys(value) { + switch keyNode.Value { + case "disabled": + var disabled bool + if err := mappingValue(value, keyNode.Value).Decode(&disabled); err != nil { + return err + } + m.Disabled = disabled + case "servers": + var servers []string + if err := mappingValue(value, keyNode.Value).Decode(&servers); err != nil { + return err + } + m.Servers = compactStrings(servers) + default: + var mode ResourceMode + if err := mappingValue(value, keyNode.Value).Decode(&mode); err != nil { + return err + } + if m.Modes == nil { + m.Modes = ResourcePolicies{} + } + m.Modes[keyNode.Value] = mode } } return nil } + +func (m MCP) asMap() map[string]any { + out := map[string]any{} + if m.Disabled { + out["disabled"] = true + } + if len(m.Servers) > 0 { + out["servers"] = compactStrings(m.Servers) + } + for _, key := range sortedKeys(m.Modes) { + out[key] = m.Modes[key] + } + return out +} + +// EnabledServers returns the server allowlist after applying per-server modes. +func (m MCP) EnabledServers() []string { + seen := map[string]bool{} + var out []string + for _, server := range m.Servers { + if server == "" || seen[server] || m.Modes[server] == ResourceDisabled { + continue + } + seen[server] = true + out = append(out, server) + } + for _, server := range sortedKeys(m.Modes) { + if m.Modes[server] != ResourceEnabled || seen[server] { + continue + } + seen[server] = true + out = append(out, server) + } + return out +} + +func (p ResourcePolicies) Enabled() []string { + var out []string + for _, key := range sortedKeys(p) { + if p[key] == ResourceEnabled { + out = append(out, key) + } + } + return out +} + +func (p ResourcePolicies) MarshalJSON() ([]byte, error) { + if len(p) == 0 { + return []byte("{}"), nil + } + return json.Marshal(map[string]ResourceMode(p)) +} + +func (p *ResourcePolicies) UnmarshalJSON(data []byte) error { + var list []string + if err := json.Unmarshal(data, &list); err == nil { + *p = ResourcePolicies{} + for _, item := range compactStrings(list) { + (*p)[item] = ResourceEnabled + } + return nil + } + var mapped map[string]ResourceMode + if err := json.Unmarshal(data, &mapped); err != nil { + return err + } + *p = ResourcePolicies{} + for _, key := range sortedKeys(mapped) { + if key != "" { + (*p)[key] = mapped[key] + } + } + return nil +} + +func (p ResourcePolicies) MarshalYAML() (any, error) { + return map[string]ResourceMode(p), nil +} + +func (p *ResourcePolicies) UnmarshalYAML(value *yaml.Node) error { + if value.Kind == yaml.SequenceNode { + var list []string + if err := value.Decode(&list); err != nil { + return err + } + *p = ResourcePolicies{} + for _, item := range compactStrings(list) { + (*p)[item] = ResourceEnabled + } + return nil + } + var mapped map[string]ResourceMode + if err := value.Decode(&mapped); err != nil { + return err + } + *p = ResourcePolicies{} + for _, key := range sortedKeys(mapped) { + if key != "" { + (*p)[key] = mapped[key] + } + } + return nil +} + +func hasRawKey(m map[string]json.RawMessage, key string) bool { + _, ok := m[key] + return ok +} + +func compactStrings(in []string) []string { + seen := map[string]bool{} + var out []string + for _, item := range in { + if item == "" || seen[item] { + continue + } + seen[item] = true + out = append(out, item) + } + return out +} + +func compactToolModes(in map[string]ToolMode) map[string]ToolMode { + if len(in) == 0 { + return nil + } + out := map[string]ToolMode{} + for _, key := range sortedKeys(in) { + if key != "" { + out[key] = in[key] + } + } + return out +} + +func sortedKeys[V any](m map[string]V) []string { + keys := make([]string, 0, len(m)) + for key := range m { + if key != "" { + keys = append(keys, key) + } + } + sort.Strings(keys) + return keys +} + +func mappingHas(value *yaml.Node, key string) bool { + return mappingValue(value, key) != nil +} + +func mappingValue(value *yaml.Node, key string) *yaml.Node { + if value == nil || value.Kind != yaml.MappingNode { + return nil + } + for i := 0; i+1 < len(value.Content); i += 2 { + if value.Content[i].Value == key { + return value.Content[i+1] + } + } + return nil +} + +func mappingKeys(value *yaml.Node) []*yaml.Node { + if value == nil || value.Kind != yaml.MappingNode { + return nil + } + var keys []*yaml.Node + for i := 0; i+1 < len(value.Content); i += 2 { + keys = append(keys, value.Content[i]) + } + return keys +} diff --git a/pkg/api/permissions_test.go b/pkg/api/permissions_test.go new file mode 100644 index 0000000..394a0aa --- /dev/null +++ b/pkg/api/permissions_test.go @@ -0,0 +1,122 @@ +package api + +import ( + "encoding/json" + "reflect" + "strings" + "testing" + + "gopkg.in/yaml.v3" +) + +func TestPermissions_JSONPolicyShape(t *testing.T) { + in := Permissions{ + Tools: Tools{ + Allow: []string{"Read"}, + Deny: []string{"Bash"}, + Modes: map[string]ToolMode{ + "WebSearch": ToolModeAsk, + "Write": ToolModeEnabled, + }, + }, + MCP: MCP{ + Servers: []string{"filesystem", "gavel"}, + Modes: ResourcePolicies{ + "gavel": ResourceDisabled, + "ado": ResourceDisabled, + }, + }, + Plugins: ResourcePolicies{"/Users/moshe/.codex/plugins/captain": ResourceDisabled}, + Skills: ResourcePolicies{"$CWD/.skills": ResourceEnabled}, + } + + data, err := json.Marshal(in) + if err != nil { + t.Fatalf("marshal: %v", err) + } + got := string(data) + for _, want := range []string{ + `"Read":"allow"`, + `"Bash":"deny"`, + `"WebSearch":"ask"`, + `"Write":"auto"`, + `"servers":["filesystem","gavel"]`, + `"gavel":"disabled"`, + `"/Users/moshe/.codex/plugins/captain":"disabled"`, + `"$CWD/.skills":"enabled"`, + } { + if !strings.Contains(got, want) { + t.Fatalf("marshalled permissions missing %s\ngot: %s", want, got) + } + } +} + +func TestPermissions_JSONLegacyInput(t *testing.T) { + data := []byte(`{ + "tools": { + "allow": ["Read"], + "deny": ["Bash"], + "modes": {"Edit": "ask", "Write": "enabled"} + }, + "mcp": {"servers": ["filesystem", "gavel"], "gavel": "disabled"}, + "plugins": ["/plugins"], + "skills": ["/skills"] + }`) + + var out Permissions + if err := json.Unmarshal(data, &out); err != nil { + t.Fatalf("unmarshal: %v", err) + } + if !reflect.DeepEqual(out.Tools.Policies(), map[string]ToolPolicy{ + "Read": ToolPolicyAllow, + "Bash": ToolPolicyDeny, + "Edit": ToolPolicyAsk, + "Write": ToolPolicyAuto, + }) { + t.Fatalf("tool policies = %#v", out.Tools.Policies()) + } + if got := out.MCP.EnabledServers(); !reflect.DeepEqual(got, []string{"filesystem"}) { + t.Fatalf("enabled MCP servers = %v, want filesystem", got) + } + if got := out.Plugins.Enabled(); !reflect.DeepEqual(got, []string{"/plugins"}) { + t.Fatalf("enabled plugins = %v", got) + } + if got := out.Skills.Enabled(); !reflect.DeepEqual(got, []string{"/skills"}) { + t.Fatalf("enabled skills = %v", got) + } +} + +func TestPermissions_YAMLLegacyInput(t *testing.T) { + data := []byte(` +tools: + allow: + - Read + deny: + - Bash +mcp: + servers: + - filesystem + gavel: disabled +plugins: + - /plugins +skills: + $CWD/.skills: enabled +`) + + var out Permissions + if err := yaml.Unmarshal(data, &out); err != nil { + t.Fatalf("unmarshal: %v", err) + } + if out.Tools.Policies()["Read"] != ToolPolicyAllow { + t.Fatalf("tools = %#v", out.Tools.Policies()) + } + if out.MCP.Modes["gavel"] != ResourceDisabled { + t.Fatalf("mcp modes = %#v", out.MCP.Modes) + } + if out.Plugins["/plugins"] != ResourceEnabled { + t.Fatalf("plugins = %#v", out.Plugins) + } + if out.Skills["$CWD/.skills"] != ResourceEnabled { + t.Fatalf("skills = %#v", out.Skills) + } +} diff --git a/pkg/api/pretty.go b/pkg/api/pretty.go index c456104..668d720 100644 --- a/pkg/api/pretty.go +++ b/pkg/api/pretty.go @@ -22,18 +22,6 @@ func (c Cost) Pretty() clickyapi.Text { Appendf("· %d in / %d out", c.InputTokens, c.OutputTokens) } -// summary renders the git pin as "repo@sha (PR pr)". -func (g Git) summary() string { - s := orDash(g.Repo) - if g.SHA != "" { - s += "@" + g.SHA - } - if g.PR != "" { - s += " (PR " + g.PR + ")" - } - return s -} - // Pretty renders a one-line permissions summary instead of a noisy field dump. func (p Permissions) Pretty() clickyapi.Text { mode := string(p.Mode) @@ -56,22 +44,6 @@ func (p Permissions) Pretty() clickyapi.Text { return t } -// Pretty renders the workspace as a small tree: the working dir, then git, file -// count, and worktree branch as indented children. -func (c Context) Pretty() clickyapi.Text { - t := clickyapi.Text{}.Add(icons.Folder).Space().Append(orDash(c.Dir), "font-medium") - if c.Git != nil { - t = t.NewLine().Append(" ").Add(icons.Git).Space().Append(c.Git.summary()) - } - if n := len(c.Files); n > 0 { - t = t.NewLine().Append(" ").Add(icons.File).Space().Appendf("%d changed file(s)", n) - } - if c.Worktree != nil && c.Worktree.Branch != "" { - t = t.NewLine().Append(" ").Add(icons.Git).Space().Appendf("worktree %s", c.Worktree.Branch) - } - return t -} - // Pretty renders the spec as a compact multi-line summary headed by the model. func (s Spec) Pretty() clickyapi.Text { t := clickyapi.Text{}.Add(icons.Robot).Space(). @@ -84,8 +56,8 @@ func (s Spec) Pretty() clickyapi.Text { t = t.NewLine().Append(fmt.Sprintf(" budget: $%.2f / %d tokens", s.Budget.Cost, s.Budget.MaxTokens)) } t = t.NewLine().Append(" perms: ").Add(s.Permissions.Pretty()) - if s.Context.Dir != "" || s.Context.Git != nil { - t = t.NewLine().Append(" ").Add(s.Context.Pretty()) + if cwd := s.Cwd(); cwd != "" { + t = t.NewLine().Append(" ").Add(icons.Folder).Space().Append(cwd, "font-medium") } return t } diff --git a/pkg/api/pretty_test.go b/pkg/api/pretty_test.go index a3bd847..dd20819 100644 --- a/pkg/api/pretty_test.go +++ b/pkg/api/pretty_test.go @@ -17,18 +17,9 @@ func TestCostPretty(t *testing.T) { func TestSpecPretty(t *testing.T) { got := sampleSpec().Pretty().String() - for _, want := range []string{"Spec", "claude-sonnet-4-6", "effort=xhigh", "mode=acceptEdits"} { + for _, want := range []string{"Spec", "claude-sonnet-4-6", "effort=xhigh", "mode=acceptEdits", "/repo"} { if !strings.Contains(got, want) { t.Errorf("Spec.Pretty() = %q, want substring %q", got, want) } } } - -func TestContextPretty(t *testing.T) { - got := sampleSpec().Context.Pretty().String() - for _, want := range []string{"/repo", "abc123", "PR 42", "1 changed file"} { - if !strings.Contains(got, want) { - t.Errorf("Context.Pretty() = %q, want substring %q", got, want) - } - } -} diff --git a/pkg/api/prompt.go b/pkg/api/prompt.go index def1f60..bdff782 100644 --- a/pkg/api/prompt.go +++ b/pkg/api/prompt.go @@ -1,6 +1,9 @@ package api -import "fmt" +import ( + "encoding/json" + "fmt" +) // Prompt is the instruction payload: the user prompt plus optional system // framing, a structured-output schema target, and diagnostic metadata. @@ -18,14 +21,34 @@ type Prompt struct { // Schema is the Go struct the response must conform to (structured output); a // runtime-only Go type, never serialized as data. (ai.Request.StructuredOutput) Schema any `json:"-" yaml:"-" pretty:"-"` + // SchemaJSON is a pre-built JSON Schema (e.g. from a .prompt frontmatter + // output block or a caller-generated schema) that the response must conform + // to. Unlike Schema it is sent to the model verbatim — never reflected from a + // Go type and never round-tripped through JSONSchema — so it preserves the + // full JSON Schema vocabulary (minItems, maxLength, …). When set, the raw JSON + // reply is also left on Response.Text for tolerant callers. Schema and + // SchemaJSON are mutually exclusive. + SchemaJSON json.RawMessage `json:"schemaJSON,omitempty" yaml:"schemaJSON,omitempty" pretty:"-"` + // SchemaStrictness governs how a response that fails JSON-schema validation is + // handled: "" (default) skips post-response validation; "warning" logs and + // continues; "error" fails; "retry" re-asks the model once with the validation + // error, then fails. Only meaningful alongside a schema (Schema or SchemaJSON). + SchemaStrictness SchemaStrictness `json:"schemaStrictness,omitempty" yaml:"schemaStrictness,omitempty" pretty:"-"` // Metadata is arbitrary caller metadata. (ai.Request.Metadata) Metadata map[string]string `json:"metadata,omitempty" yaml:"metadata,omitempty" pretty:"label=Metadata"` } +// HasSchema reports whether the prompt requests structured output by either +// mechanism (a reflected Go struct or a pre-built JSON schema). +func (p Prompt) HasSchema() bool { return p.Schema != nil || len(p.SchemaJSON) > 0 } + // Validate requires a non-empty user prompt. func (p Prompt) Validate() error { if p.User == "" { return fmt.Errorf("prompt text is required") } + if err := p.SchemaStrictness.Validate(); err != nil { + return err + } return nil } diff --git a/pkg/api/runtime_event.go b/pkg/api/runtime_event.go index daa7ceb..a97aa61 100644 --- a/pkg/api/runtime_event.go +++ b/pkg/api/runtime_event.go @@ -1,6 +1,9 @@ package api -import "time" +import ( + "encoding/json" + "time" +) // Response is the result of a buffered (non-streaming) provider execution. type Response struct { @@ -12,6 +15,10 @@ type Response struct { Duration time.Duration CacheHit bool Raw any + + // Workspace is the run's working-dir runtime state (cwd, git details, changed + // files, commits, plan). Populated by the agent runner + worktree hook. + Workspace *Workspace } // EventKind classifies a streaming provider Event. @@ -52,6 +59,12 @@ type Event struct { Model string Error string // when Kind == EventError + // StructuredData is the validated structured output (raw JSON) carried on an + // EventResult when the request supplied a schema; nil for text-mode runs. It + // is raw JSON because the streaming contract does not know the caller's Go + // type — the buffered Execute path unmarshals it into Request.Prompt.Schema. + StructuredData json.RawMessage + // Raw carries the backend-native event (e.g. claude.HistoryEntry for the // claude_cli stream) so renderers can use the rich pretty-printers in // pkg/claude/tools instead of reformatting from Tool/Input. diff --git a/pkg/api/schema_test.go b/pkg/api/schema_test.go index b74fc55..f0dc450 100644 --- a/pkg/api/schema_test.go +++ b/pkg/api/schema_test.go @@ -18,7 +18,7 @@ func TestSchemaJSON(t *testing.T) { t.Fatalf("schema is not valid JSON: %v", err) } s := string(data) - for _, want := range []string{"xhigh", "Permissions", "Context", "Budget", `"maxTokens"`} { + for _, want := range []string{"xhigh", "Permissions", "Setup", "Budget", `"maxTokens"`} { if !strings.Contains(s, want) { t.Errorf("schema missing %q\n%s", want, s) } @@ -34,3 +34,20 @@ func TestSchemaJSON_PromptRequired(t *testing.T) { t.Errorf("Prompt schema should mark user required:\n%s", data) } } + +// TestSchemaJSON_FallbacksSelfReference pins that the self-referential +// Model.Fallbacks ([]Model) reflects into a bounded schema via a $ref back to the +// Model definition (rather than recursing forever) and still exposes the field. +func TestSchemaJSON_FallbacksSelfReference(t *testing.T) { + data, err := SchemaJSON(&Spec{}) + if err != nil { + t.Fatalf("SchemaJSON: %v", err) + } + s := string(data) + if !strings.Contains(s, "fallbacks") { + t.Errorf("schema missing fallbacks field:\n%s", s) + } + if !strings.Contains(s, "#/$defs/Model") { + t.Errorf("Fallbacks should reference the Model definition ($ref), got:\n%s", s) + } +} diff --git a/pkg/api/spec.go b/pkg/api/spec.go index 9faaf95..de16722 100644 --- a/pkg/api/spec.go +++ b/pkg/api/spec.go @@ -1,27 +1,39 @@ package api -import "fmt" +import ( + "fmt" + "strings" + + "github.com/flanksource/commons-db/shell" +) // Spec is the complete, structured specification of one model/agent run — the -// canonical shape the CLI flags and saved config build, and that the legacy -// ai.Request + ai.Config project onto. Model/Budget derive from ai.Config; -// Prompt/Memory/Permissions/Context derive from ai.Request. +// canonical shape the CLI flags and saved config build, and that ai.Request + +// ai.Config project onto. Model/Budget derive from ai.Config; Prompt/Memory/ +// Permissions/Setup derive from ai.Request. // -// Runtime-only concerns (API key, cache settings, the CanUseTool callback) are -// deliberately excluded — they live in a separate runtime config, not in this -// serializable domain object. +// Runtime-only concerns (API key and the CanUseTool callback) are deliberately +// excluded; they live in provider runtime config, not in this serializable +// domain object. type Spec struct { Model `json:",inline" yaml:",inline"` - Prompt Prompt `json:"prompt" yaml:"prompt"` - Budget Budget `json:"budget,omitempty" yaml:"budget,omitempty"` - Memory Memory `json:"memory,omitempty" yaml:"memory,omitempty"` - Permissions Permissions `json:"permissions,omitempty" yaml:"permissions,omitempty"` - Context Context `json:"context,omitempty" yaml:"context,omitempty"` + Prompt Prompt `json:"prompt" yaml:"prompt"` + Budget Budget `json:"budget,omitempty" yaml:"budget,omitempty"` + Memory Memory `json:"memory,omitempty" yaml:"memory,omitempty"` + Permissions Permissions `json:"permissions,omitempty" yaml:"permissions,omitempty"` + Setup *shell.Setup `json:"setup,omitempty" yaml:"setup,omitempty"` + + // Workflow declares the generate→verify loop (verification + finalize) around + // the run. Absent = single generation, no verification. + Workflow *Workflow `json:"workflow,omitempty" yaml:"workflow,omitempty"` // SessionID resumes an existing session. (ai.Request.SessionID) SessionID string `json:"sessionId,omitempty" yaml:"sessionId,omitempty" pretty:"label=Session"` - // MaxTurns caps agent turns; 0 = backend default. (ai.Request.MaxTurns) - MaxTurns int `json:"maxTurns,omitempty" yaml:"maxTurns,omitempty" pretty:"label=Max Turns"` + + // CLIArgs carries the "extra cmux args" (ClaudeCmuxOptions / CodexCmuxOptions) + // keyed by their json field names — interactive CLI flags with no dedicated + // Spec field. Ignored by non-cmux providers. + CLIArgs map[string]any `json:"cliArgs,omitempty" yaml:"cliArgs,omitempty"` } // Validate runs each component's validation, failing loud on the first error. @@ -29,7 +41,13 @@ func (s Spec) Validate() error { if err := s.Model.Validate(); err != nil { return fmt.Errorf("model: %w", err) } - if err := s.Prompt.Validate(); err != nil { + // A verify-only spec (no body, workflow.verify present) legitimately has an + // empty prompt; only its strictness setting is checked. + if s.IsVerifyOnly() { + if err := s.Prompt.SchemaStrictness.Validate(); err != nil { + return fmt.Errorf("prompt: %w", err) + } + } else if err := s.Prompt.Validate(); err != nil { return fmt.Errorf("prompt: %w", err) } if err := s.Budget.Validate(); err != nil { @@ -38,8 +56,46 @@ func (s Spec) Validate() error { if err := s.Permissions.Validate(); err != nil { return fmt.Errorf("permissions: %w", err) } - if s.MaxTurns < 0 || s.MaxTurns > 100 { - return fmt.Errorf("invalid maxTurns %d (valid: 0-100, 0=backend default)", s.MaxTurns) + if err := s.Workflow.Validate(); err != nil { + return fmt.Errorf("workflow: %w", err) } return nil } + +// IsVerifyOnly reports whether the spec has no prompt body but declares a +// verification — a verify-only run that skips generation and verifies the +// current state (e.g. scoring already-committed work). +func (s Spec) IsVerifyOnly() bool { + return s.Prompt.User == "" && s.Workflow != nil && s.Workflow.Verify != nil +} + +func (s Spec) Cwd() string { + if s.Setup == nil { + return "" + } + return s.Setup.Cwd +} + +func (s *Spec) SetCwd(cwd string) { + if s.Setup == nil { + s.Setup = &shell.Setup{} + } + s.Setup.Cwd = cwd +} + +func (s Spec) EnvMap() map[string]string { + if s.Setup == nil || len(s.Setup.Env) == 0 { + return nil + } + env := map[string]string{} + for _, item := range s.Setup.Env { + key, value, ok := strings.Cut(item, "=") + if ok && key != "" { + env[key] = value + } + } + if len(env) == 0 { + return nil + } + return env +} diff --git a/pkg/api/spec_test.go b/pkg/api/spec_test.go index bb35fe9..d6caaac 100644 --- a/pkg/api/spec_test.go +++ b/pkg/api/spec_test.go @@ -6,6 +6,7 @@ import ( "strings" "testing" + "github.com/flanksource/commons-db/shell" "gopkg.in/yaml.v3" ) @@ -14,19 +15,31 @@ func floatPtr(f float64) *float64 { return &f } // sampleSpec is a fully-populated spec used across round-trip and render tests. func sampleSpec() Spec { return Spec{ - Model: Model{Name: "claude-sonnet-4-6", Backend: BackendAnthropic, Temperature: floatPtr(0.7), Effort: EffortXHigh}, + Model: Model{Name: "claude-sonnet-4-6", Backend: BackendAnthropic, Temperature: floatPtr(0.7), Effort: EffortXHigh, NoCache: true}, Prompt: Prompt{User: "refactor the parser", System: "be precise", Source: "cli"}, - Budget: Budget{Cost: 2.5, MaxTokens: 8000}, + Budget: Budget{Cost: 2.5, MaxTokens: 8000, MaxTurns: 5, Timeout: "120s"}, Memory: Memory{Skills: []string{"/skills/a"}, SkipUser: true}, Permissions: Permissions{ Mode: PermissionAcceptEdits, Presets: []Preset{PresetEdit}, - Tools: Tools{Allow: []string{"Read", "Edit"}, Modes: map[string]ToolMode{"Bash": ToolModeAsk}}, + Tools: Tools{Allow: []string{"Edit", "Read"}, Modes: map[string]ToolMode{"Bash": ToolModeAsk}}, MCP: MCP{Disabled: true}, + Plugins: ResourcePolicies{"/plugins": ResourceEnabled}, + Skills: ResourcePolicies{"/skills/b": ResourceDisabled}, + }, + Setup: &shell.Setup{ + Cwd: "/repo", + DotEnv: []string{".env"}, + Checkout: &shell.Checkout{ + Mode: shell.CheckoutLocal, + Path: "/repo", + Worktree: &shell.Worktree{ + Mode: shell.WorktreeNew, + Prefix: "captain", + }, + }, }, - Context: Context{Dir: "/repo", Files: []string{"parser.go"}, Git: &Git{Repo: "/repo", SHA: "abc123", PR: "42"}}, SessionID: "sess-1", - MaxTurns: 5, } } @@ -64,7 +77,7 @@ func TestSpec_YAMLRoundTrip(t *testing.T) { func TestSpec_JSONFieldNames(t *testing.T) { data, _ := json.Marshal(sampleSpec()) s := string(data) - for _, want := range []string{`"model"`, `"prompt"`, `"budget"`, `"permissions"`, `"context"`, `"maxTokens"`, `"skipUser"`, `"sessionId"`, `"effort":"xhigh"`} { + for _, want := range []string{`"model"`, `"prompt"`, `"budget"`, `"permissions"`, `"setup"`, `"maxTokens"`, `"maxTurns"`, `"timeout"`, `"noCache"`, `"skipUser"`, `"sessionId"`, `"effort":"xhigh"`} { if !strings.Contains(s, want) { t.Errorf("marshalled spec missing %s\ngot: %s", want, s) } @@ -125,7 +138,7 @@ func TestSpec_Validate(t *testing.T) { {"bad backend", func(s *Spec) { s.Model.Backend = "nope" }, "invalid backend"}, {"empty prompt", func(s *Spec) { s.Prompt.User = "" }, "prompt text is required"}, {"negative budget", func(s *Spec) { s.Budget.Cost = -1 }, "budget cost"}, - {"too many turns", func(s *Spec) { s.MaxTurns = 200 }, "0-100"}, + {"too many turns", func(s *Spec) { s.Budget.MaxTurns = 200 }, "0-100"}, {"bad permission mode", func(s *Spec) { s.Permissions.Mode = "yolo" }, "invalid permission mode"}, } for _, tc := range cases { diff --git a/pkg/api/workflow.go b/pkg/api/workflow.go new file mode 100644 index 0000000..8739462 --- /dev/null +++ b/pkg/api/workflow.go @@ -0,0 +1,71 @@ +package api + +import ( + "encoding/json" + "fmt" +) + +// Workflow declares the generate→verify loop around a run as hook +// declarations: an optional verification stage (commands run after each +// generation, whose failure feedback drives a re-run), an optional postRun +// stage (commit the result), and an optional typed output schema. It is the +// serializable form of pkg/ai/agent's Verify/PostRun/Output hooks, and mirrors +// clicky-ui's AISpecRuntimeLocalWorkflow so the SpecRuntimeEditor "Verify" +// section round-trips. +// +// A spec with a Verify but an empty Prompt.User runs verify-only (generation is +// skipped); a spec with no Verify runs generate-only (today's behaviour). +type Workflow struct { + Verify *Verify `json:"verify,omitempty" yaml:"verify,omitempty"` + PostRun *PostRun `json:"postRun,omitempty" yaml:"postRun,omitempty"` + // Output declares the workflow's typed final-result schema. + Output *Output `json:"output,omitempty" yaml:"output,omitempty"` +} + +// Verify is the loop's definition-of-done: it runs after each generation and +// votes; a non-passing verdict appends feedback and triggers another iteration +// up to MaxIterations. +type Verify struct { + // Commands are shell commands run as pass/fail checks (exit 0 = pass); their + // output tail becomes the re-run feedback. Maps to agent/verify.CmdVerifier. + // This is captain's runnable verify — the only part of Verify captain itself + // executes. + Commands []string `json:"commands,omitempty" yaml:"commands,omitempty"` + // Fixture is a clicky-FixtureEditor markdown document (acceptance criteria / + // LLM-judge checklist). Captain declares and reflects it in the spec schema + // for the SpecRuntimeEditor, but does not execute it — only gavel runs + // fixtures. + Fixture string `json:"fixture,omitempty" yaml:"fixture,omitempty"` + // Scope narrows verification to changed files vs the whole tree. + Scope VerifyScope `json:"scope,omitempty" yaml:"scope,omitempty" jsonschema:"enum=,enum=all,enum=changed"` + // MaxIterations caps the generate→verify loop; 0 means the run default (1). + MaxIterations int `json:"maxIterations,omitempty" yaml:"maxIterations,omitempty" jsonschema:"minimum=0"` +} + +// PostRun runs once after the loop ends cleanly (e.g. commit the agent's work). +type PostRun struct { + Commit bool `json:"commit,omitempty" yaml:"commit,omitempty"` + CommitMessage string `json:"commitMessage,omitempty" yaml:"commitMessage,omitempty"` + DryRun bool `json:"dryRun,omitempty" yaml:"dryRun,omitempty"` + KeepWorktree bool `json:"keepWorktree,omitempty" yaml:"keepWorktree,omitempty"` +} + +// Output declares the workflow's typed final-result schema (a JSON Schema +// document) so callers/editors know the shape of the run's structured result. +type Output struct { + SchemaJSON json.RawMessage `json:"schemaJSON,omitempty" yaml:"schemaJSON,omitempty"` +} + +// Validate checks the workflow's enum-typed fields. +func (w *Workflow) Validate() error { + if w == nil || w.Verify == nil { + return nil + } + if err := w.Verify.Scope.Validate(); err != nil { + return err + } + if w.Verify.MaxIterations < 0 { + return fmt.Errorf("workflow.verify.maxIterations must be >= 0") + } + return nil +} diff --git a/pkg/api/workflow_test.go b/pkg/api/workflow_test.go new file mode 100644 index 0000000..7af0bb8 --- /dev/null +++ b/pkg/api/workflow_test.go @@ -0,0 +1,82 @@ +package api + +import ( + "encoding/json" + "strings" + "testing" +) + +func TestWorkflowSpecRoundTrip(t *testing.T) { + spec := Spec{ + Model: Model{Name: "claude-sonnet-4-6"}, + Prompt: Prompt{User: "do the thing"}, + Workflow: &Workflow{ + Verify: &Verify{ + Commands: []string{"go test ./...", "go vet ./..."}, + Fixture: "- [ ] covers the edge case", + Scope: VerifyScopeChanged, + MaxIterations: 3, + }, + PostRun: &PostRun{Commit: true, CommitMessage: "apply"}, + Output: &Output{SchemaJSON: json.RawMessage(`{"type":"object"}`)}, + }, + } + + data, err := json.Marshal(spec) + if err != nil { + t.Fatalf("marshal: %v", err) + } + + var got Spec + if err := json.Unmarshal(data, &got); err != nil { + t.Fatalf("unmarshal: %v", err) + } + if got.Workflow == nil || got.Workflow.Verify == nil { + t.Fatalf("workflow.verify lost in round-trip: %s", data) + } + if got.Workflow.Verify.MaxIterations != 3 || got.Workflow.Verify.Scope != VerifyScopeChanged { + t.Errorf("verify fields not preserved: %+v", got.Workflow.Verify) + } + if got.Workflow.Verify.Fixture != spec.Workflow.Verify.Fixture || len(got.Workflow.Verify.Commands) != 2 { + t.Errorf("verify commands/fixture not preserved: %+v", got.Workflow.Verify) + } + if got.Workflow.PostRun == nil || !got.Workflow.PostRun.Commit { + t.Errorf("postRun not preserved: %+v", got.Workflow.PostRun) + } + if got.Workflow.Output == nil || string(got.Workflow.Output.SchemaJSON) != string(spec.Workflow.Output.SchemaJSON) { + t.Errorf("output schema not preserved: %+v", got.Workflow.Output) + } +} + +func TestWorkflowOmittedWhenNil(t *testing.T) { + data, err := json.Marshal(Spec{Model: Model{Name: "m"}, Prompt: Prompt{User: "u"}}) + if err != nil { + t.Fatalf("marshal: %v", err) + } + if strings.Contains(string(data), "workflow") { + t.Errorf("nil workflow should be omitted, got: %s", data) + } +} + +func TestSpecSchemaIncludesWorkflow(t *testing.T) { + data, err := SchemaJSON(&Spec{}) + if err != nil { + t.Fatalf("schema: %v", err) + } + for _, want := range []string{"workflow", "Workflow", "Verify", "commands", "maxIterations"} { + if !strings.Contains(string(data), want) { + t.Errorf("reflected spec schema missing %q", want) + } + } +} + +func TestVerifyScopeValidate(t *testing.T) { + for _, ok := range []VerifyScope{"", VerifyScopeAll, VerifyScopeChanged} { + if err := ok.Validate(); err != nil { + t.Errorf("scope %q should be valid: %v", ok, err) + } + } + if err := VerifyScope("sometimes").Validate(); err == nil { + t.Errorf("unknown scope should fail validation") + } +} diff --git a/pkg/api/workspace.go b/pkg/api/workspace.go new file mode 100644 index 0000000..75f1f26 --- /dev/null +++ b/pkg/api/workspace.go @@ -0,0 +1,34 @@ +package api + +// Workspace is the runtime state of a run's working directory — the output +// counterpart to Spec.Setup (the input checkout/worktree config). It records +// where the run executed, the git details, and what it changed / committed / +// planned, and travels on Response so callers see what the run did to the tree. +// It reconciles what used to be scattered across the agent run-context and the +// worktree plugin's result. +type Workspace struct { + Cwd string `json:"cwd,omitempty" yaml:"cwd,omitempty"` // resolved dir (a worktree path when set up) + Repo string `json:"repo,omitempty" yaml:"repo,omitempty"` // repo root + Branch string `json:"branch,omitempty" yaml:"branch,omitempty"` // worktree branch + Base string `json:"base,omitempty" yaml:"base,omitempty"` // worktree base ref + Changed []string `json:"changed,omitempty" yaml:"changed,omitempty"` // agent-changed files (repo-relative) + Commits []Commit `json:"commits,omitempty" yaml:"commits,omitempty"` // commits made during the run + Diff string `json:"diff,omitempty" yaml:"diff,omitempty"` // working diff + Plan string `json:"plan,omitempty" yaml:"plan,omitempty"` // plan the agent produced (path or content) + SessionID string `json:"sessionId,omitempty" yaml:"sessionId,omitempty"` // agent session + Metadata map[string]any `json:"metadata,omitempty" yaml:"metadata,omitempty"` +} + +// Commit is one git commit made during a run. +type Commit struct { + SHA string `json:"sha,omitempty" yaml:"sha,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` +} + +// AddCommit appends a commit; nil-safe convenience for hooks. +func (w *Workspace) AddCommit(sha, message string) { + if w == nil { + return + } + w.Commits = append(w.Commits, Commit{SHA: sha, Message: message}) +} diff --git a/pkg/captainconfig/config.go b/pkg/captainconfig/config.go index 47bfbaf..fb57720 100644 --- a/pkg/captainconfig/config.go +++ b/pkg/captainconfig/config.go @@ -16,7 +16,8 @@ import ( ) type Config struct { - AI AIDefaults `yaml:"ai"` + AI AIDefaults `yaml:"ai"` + Prompts PromptDefaults `yaml:"prompts"` } type AIDefaults struct { @@ -36,6 +37,10 @@ type AIDefaults struct { NoMemory bool `yaml:"noMemory,omitempty"` } +type PromptDefaults struct { + Dirs []string `yaml:"dirs,omitempty"` +} + // pathOverride lets tests redirect Path() to a temp directory without touching // $HOME. Empty string means "use os.UserHomeDir". var pathOverride string diff --git a/pkg/captainconfig/config_test.go b/pkg/captainconfig/config_test.go index b379bb6..e3d23fd 100644 --- a/pkg/captainconfig/config_test.go +++ b/pkg/captainconfig/config_test.go @@ -3,6 +3,7 @@ package captainconfig import ( "os" "path/filepath" + "reflect" "testing" ) @@ -24,7 +25,7 @@ func TestLoad_MissingFileReturnsZero(t *testing.T) { if exists { t.Errorf("Load() exists = true, want false for missing file") } - if cfg != (Config{}) { + if !reflect.DeepEqual(cfg, Config{}) { t.Errorf("Load() cfg = %+v, want zero", cfg) } } @@ -65,7 +66,7 @@ func TestSaveLoad_RoundTrip(t *testing.T) { if !exists { t.Fatalf("Load() exists = false after Save") } - if got != want { + if !reflect.DeepEqual(got, want) { t.Errorf("round-trip mismatch:\n got = %+v\n want = %+v", got, want) } } diff --git a/pkg/claude/cost.go b/pkg/claude/cost.go index bb41350..0d95899 100644 --- a/pkg/claude/cost.go +++ b/pkg/claude/cost.go @@ -1,7 +1,7 @@ package claude import ( - "encoding/json" + "github.com/segmentio/encoding/json" "sort" "strings" ) @@ -59,15 +59,20 @@ func ClassifyModel(model string) ModelFamily { } } +// PricingFor returns the per-million-token pricing for a model, falling back to +// Sonnet rates for unrecognized model families (matching CalculateCost). +func PricingFor(model string) ModelPricing { + if pricing, ok := PricingTable[ClassifyModel(model)]; ok { + return pricing + } + return PricingTable[ModelFamilySonnet4] +} + func CalculateCost(usage *Usage, model string) float64 { if usage == nil { return 0 } - family := ClassifyModel(model) - pricing, ok := PricingTable[family] - if !ok { - pricing = PricingTable[ModelFamilySonnet4] - } + pricing := PricingFor(model) return float64(usage.InputTokens)*pricing.InputPerMTok/1e6 + float64(usage.OutputTokens)*pricing.OutputPerMTok/1e6 + float64(usage.CacheCreationInputTokens)*pricing.CacheWritePerMTok/1e6 + diff --git a/pkg/claude/history.go b/pkg/claude/history.go index 14348b7..d473fae 100644 --- a/pkg/claude/history.go +++ b/pkg/claude/history.go @@ -1,7 +1,7 @@ package claude import ( - "encoding/json" + "github.com/segmentio/encoding/json" "strings" "time" ) diff --git a/pkg/claude/hooks.go b/pkg/claude/hooks.go index b57e431..70f13ef 100644 --- a/pkg/claude/hooks.go +++ b/pkg/claude/hooks.go @@ -1,6 +1,6 @@ package claude -import "encoding/json" +import "github.com/segmentio/encoding/json" // HooksConfig is the top-level hooks configuration type HooksConfig struct { diff --git a/pkg/claude/parse_sessions.go b/pkg/claude/parse_sessions.go new file mode 100644 index 0000000..f0e30a4 --- /dev/null +++ b/pkg/claude/parse_sessions.go @@ -0,0 +1,145 @@ +package claude + +import ( + "sort" + + "github.com/flanksource/commons/logger" +) + +var parseLog = logger.GetLogger("claude") + +// ParsedTranscript is one JSONL transcript (a root session file or a nested +// sub-agent transcript) parsed into its ordered entries and agent-stamped tool +// uses. Sub-agent transcripts carry the agent identity recovered from the +// filename and the agent-.meta.json sidecar. +type ParsedTranscript struct { + Path string + IsAgent bool + AgentID string + AgentType string + AgentDesc string + Entries []HistoryEntry + ToolUses []ToolUse +} + +// ParsedSession groups a root session transcript with its sub-agent transcripts +// under one session id. Transcripts[0] is the root; the remainder are sub-agents +// discovered under /subagents/. It is the input the pkg/session +// unified model is built from. +type ParsedSession struct { + SessionID string + Transcripts []ParsedTranscript +} + +// ParseTranscript parses a single transcript file into a ParsedTranscript +// (entries + agent-stamped, token-bearing tool uses) and returns the root +// session id derived from the path. It is the single-file counterpart to +// ParseSessions, used by the persistent summary cache to (re)build one file. +func ParseTranscript(path string) (ParsedTranscript, string, error) { + entries, err := ReadHistoryFileWithOptions(path, ReadOptions{KeepRaw: false}) + if err != nil { + return ParsedTranscript{}, "", err + } + projectsDir := GetProjectsDir() + t := ParsedTranscript{ + Path: path, + IsAgent: isAgentTranscript(path), + Entries: entries, + ToolUses: stampToolUses(ExtractToolUsesWithTokens(entries), projectsDir, path), + } + sessionID := sessionIDFromTranscriptPath(path) + if t.IsAgent { + t.AgentID = agentIDFromPath(path) + t.AgentType, t.AgentDesc = readAgentMeta(path) + } else { + // Root sessions: prefer the in-file sessionId (authoritative) over the + // filename-derived id. + for _, e := range entries { + if e.SessionID != "" { + sessionID = e.SessionID + break + } + } + } + return t, sessionID, nil +} + +// ParseSessions discovers the in-scope session transcripts (root + sub-agents +// when filter.IncludeAgents) and returns them grouped by root session id, each +// transcript parsed into entries + token/cost-bearing, agent-stamped tool uses. +// +// Unlike ParseHistory it does NOT flatten across sessions or drop per-transcript +// structure, so callers can reconstruct the agent hierarchy and message stream. +// Unreadable transcripts are logged at Warn and skipped (never silently +// dropped). +func ParseSessions(currentDir string, searchAll bool, filter Filter) ([]ParsedSession, error) { + projectsDir := GetProjectsDir() + + rootFiles, err := FindSessionFiles(projectsDir, currentDir, searchAll) + if err != nil { + return nil, err + } + + var agentFiles []string + if filter.IncludeAgents { + if agentFiles, err = FindAgentTranscripts(projectsDir, currentDir, searchAll); err != nil { + return nil, err + } + } + + bySession := make(map[string]*ParsedSession) + order := make([]string, 0) + addTranscript := func(file string, isAgent bool) { + id := sessionIDFromTranscriptPath(file) + if !filter.MatchesSessionID(id) { + return + } + entries, err := ReadHistoryFileWithOptions(file, ReadOptions{KeepRaw: filter.KeepRaw}) + if err != nil { + parseLog.Warnf("skipping unreadable transcript %s: %v", file, err) + return + } + if len(entries) == 0 { + return + } + toolUses := stampToolUses(ExtractToolUsesWithTokens(entries), projectsDir, file) + t := ParsedTranscript{ + Path: file, + IsAgent: isAgent, + Entries: entries, + ToolUses: toolUses, + } + if isAgent { + t.AgentID = agentIDFromPath(file) + t.AgentType, t.AgentDesc = readAgentMeta(file) + } + ps, ok := bySession[id] + if !ok { + ps = &ParsedSession{SessionID: id} + bySession[id] = ps + order = append(order, id) + } + ps.Transcripts = append(ps.Transcripts, t) + } + + for _, file := range rootFiles { + addTranscript(file, false) + } + for _, file := range agentFiles { + addTranscript(file, true) + } + + out := make([]ParsedSession, 0, len(order)) + for _, id := range order { + ps := bySession[id] + // Root transcripts first, then sub-agents, each group stable by path. + sort.SliceStable(ps.Transcripts, func(i, j int) bool { + if ps.Transcripts[i].IsAgent != ps.Transcripts[j].IsAgent { + return !ps.Transcripts[i].IsAgent + } + return ps.Transcripts[i].Path < ps.Transcripts[j].Path + }) + out = append(out, *ps) + } + return out, nil +} diff --git a/pkg/claude/plan.go b/pkg/claude/plan.go index e4b7c1e..c946bb9 100644 --- a/pkg/claude/plan.go +++ b/pkg/claude/plan.go @@ -1,7 +1,7 @@ package claude import ( - "encoding/json" + "github.com/segmentio/encoding/json" "path/filepath" "strings" ) diff --git a/pkg/claude/reader.go b/pkg/claude/reader.go index 6f1eb76..addceb3 100644 --- a/pkg/claude/reader.go +++ b/pkg/claude/reader.go @@ -2,21 +2,34 @@ package claude import ( "bufio" - "encoding/json" "fmt" "io" "os" "strings" + + "github.com/segmentio/encoding/json" ) -// ReadHistoryFile reads all entries from a JSONL history file +// ReadOptions controls optional reader behavior. +type ReadOptions struct { + KeepRaw bool +} + +// ReadHistoryFile reads all entries from a JSONL history file. +// It preserves raw JSONL lines for backwards compatibility. func ReadHistoryFile(path string) ([]HistoryEntry, error) { + return ReadHistoryFileWithOptions(path, ReadOptions{KeepRaw: true}) +} + +// ReadHistoryFileWithOptions reads all entries from a JSONL history file with +// caller-selected optional fields. +func ReadHistoryFileWithOptions(path string, opts ReadOptions) ([]HistoryEntry, error) { f, err := os.Open(path) if err != nil { return nil, err } defer func() { _ = f.Close() }() - return ReadHistory(f) + return ReadHistoryWithOptions(f, opts) } // ReadHistory reads all entries from a JSONL reader. It uses the same @@ -24,7 +37,13 @@ func ReadHistoryFile(path string) ([]HistoryEntry, error) { // input and on-disk session files surface the same set of synthetic // rows (session init, hooks, result/turn summaries, etc.). func ReadHistory(r io.Reader) ([]HistoryEntry, error) { - return readJSONL(r, true) + return ReadHistoryWithOptions(r, ReadOptions{KeepRaw: true}) +} + +// ReadHistoryWithOptions reads Claude history JSONL with caller-selected +// optional fields. +func ReadHistoryWithOptions(r io.Reader, opts ReadOptions) ([]HistoryEntry, error) { + return readJSONL(r, true, opts) } // ReadStreamJSON reads Claude Code stream-json JSONL. @@ -36,7 +55,7 @@ func ReadHistory(r io.Reader) ([]HistoryEntry, error) { // these into history rows. Unrecognized (type, subtype) tuples are counted // via RecordUnhandledStreamType and otherwise ignored — they never error. func ReadStreamJSON(r io.Reader) ([]HistoryEntry, error) { - return readJSONL(r, false) + return readJSONL(r, false, ReadOptions{KeepRaw: true}) } // readJSONL is the shared scanner used by both ReadHistory and ReadStreamJSON. @@ -45,12 +64,16 @@ func ReadStreamJSON(r io.Reader) ([]HistoryEntry, error) { // implicitly a HistoryEntry) are unmarshaled directly into a HistoryEntry. // Stream-json sets it false: every line carries a `type` and is routed by // dispatchEvent. -func readJSONL(r io.Reader, fallbackToHistoryEntry bool) ([]HistoryEntry, error) { +func readJSONL(r io.Reader, fallbackToHistoryEntry bool, opts ReadOptions) ([]HistoryEntry, error) { var entries []HistoryEntry scanner := bufio.NewScanner(r) scanner.Buffer(make([]byte, 1024*1024), 10*1024*1024) lineNo := 0 + // lastTS tracks the most recent successfully-parsed line timestamp so a + // synthetic ParseError row can inherit it — otherwise ParseError rows have no + // timestamp, sort last, and are the first discarded by the row limit. + lastTS := "" for scanner.Scan() { lineNo++ line := scanner.Bytes() @@ -60,23 +83,33 @@ func readJSONL(r io.Reader, fallbackToHistoryEntry bool) ([]HistoryEntry, error) var sj streamJSONLine if err := json.Unmarshal(line, &sj); err != nil { - entries = append(entries, parseErrorEntry(lineNo, line, err)) + entries = append(entries, parseErrorEntry(lineNo, line, err, lastTS)) continue } if fallbackToHistoryEntry && sj.Type == "" { var entry HistoryEntry if err := json.Unmarshal(line, &entry); err != nil { - entries = append(entries, parseErrorEntry(lineNo, line, err)) + entries = append(entries, parseErrorEntry(lineNo, line, err, lastTS)) continue } - entry.RawLine = append(json.RawMessage(nil), line...) + if entry.Timestamp != "" { + lastTS = entry.Timestamp + } + if opts.KeepRaw { + entry.RawLine = append(json.RawMessage(nil), line...) + } entries = append(entries, entry) continue } + if sj.timestamp() != "" { + lastTS = sj.timestamp() + } for _, entry := range dispatchEvent(sj, line, lineNo) { - entry.RawLine = append(json.RawMessage(nil), line...) + if opts.KeepRaw { + entry.RawLine = append(json.RawMessage(nil), line...) + } entries = append(entries, entry) } } @@ -103,6 +136,7 @@ type streamJSONLine struct { CWD string `json:"cwd,omitempty"` GitBranch string `json:"gitBranch,omitempty"` Slug string `json:"slug,omitempty"` + Error string `json:"error,omitempty"` Attachment json.RawMessage `json:"attachment,omitempty"` } @@ -125,6 +159,13 @@ var knownSessionStorageTypes = map[string]bool{ "last-prompt": true, "permission-mode": true, "agent-name": true, + // Operational/streaming state with no unique row-level content — the real + // content surfaces via the actual user/assistant messages. Listed so they + // don't pollute the unhandled-types diagnostic. + "mode": true, // active mode marker (e.g. {"mode":"normal"}) + "bridge-session": true, // cloud bridge-session linkage + "progress": true, // intermediate streaming progress, superseded by the final message + "queue-operation": true, // message-queue bookkeeping; dequeued content appears as a real message } // planAttachment is the plan-mode attachment Claude Code writes when entering @@ -172,7 +213,7 @@ func dispatchEvent(sj streamJSONLine, raw []byte, lineNo int) []HistoryEntry { } var msg Message if err := json.Unmarshal(sj.Message, &msg); err != nil { - return []HistoryEntry{parseErrorEntry(lineNo, raw, err)} + return []HistoryEntry{parseErrorEntry(lineNo, raw, err, sj.timestamp())} } out := []HistoryEntry{{ SessionID: sj.sessionID(), @@ -217,6 +258,16 @@ func dispatchEvent(sj streamJSONLine, raw []byte, lineNo int) []HistoryEntry { })) case "away_summary": return single(syntheticEntry(sj, "AwaySummary", raw, []string{"content"})) + case "compact_boundary": + return single(syntheticEntry(sj, "CompactBoundary", raw, []string{ + "content", "compactMetadata", "level", + })) + case "local_command": + return single(syntheticEntry(sj, "LocalCommand", raw, []string{"content", "level"})) + case "scheduled_task_fire": + return single(syntheticEntry(sj, "ScheduledTaskFire", raw, []string{"content"})) + case "informational": + return single(syntheticEntry(sj, "Informational", raw, []string{"content", "level"})) } case "result": @@ -230,6 +281,12 @@ func dispatchEvent(sj streamJSONLine, raw []byte, lineNo int) []HistoryEntry { case "ai-title": return single(syntheticEntry(sj, "SessionTitle", raw, []string{"aiTitle"})) + case "pr-link": + // Workflow state: links the session to a pull request. + return single(syntheticEntry(sj, "PrLink", raw, []string{ + "prNumber", "prUrl", "prRepository", + })) + case "attachment": return attachmentEntry(sj) } @@ -253,12 +310,7 @@ func single(e HistoryEntry) []HistoryEntry { return []HistoryEntry{e} } // carries a top-level "error" field (e.g. invalid_request, 4xx/5xx from the // model API). The error would otherwise be invisible in history output. func apiErrorFromAssistantLine(sj streamJSONLine, raw []byte) (HistoryEntry, bool) { - var full map[string]any - if err := json.Unmarshal(raw, &full); err != nil { - return HistoryEntry{}, false - } - errStr, _ := full["error"].(string) - if errStr == "" { + if sj.Error == "" { return HistoryEntry{}, false } return syntheticEntry(sj, "ApiError", raw, []string{ @@ -267,8 +319,10 @@ func apiErrorFromAssistantLine(sj streamJSONLine, raw []byte) (HistoryEntry, boo } // parseErrorEntry builds a synthetic ParseError row for a line that failed -// to unmarshal. The line content is truncated to keep the row scannable. -func parseErrorEntry(lineNo int, raw []byte, err error) HistoryEntry { +// to unmarshal. The line content is truncated to keep the row scannable. ts is +// the surrounding lines' timestamp (RFC3339), inherited so the row sorts among +// its neighbors rather than last. +func parseErrorEntry(lineNo int, raw []byte, err error, ts string) HistoryEntry { preview := string(raw) if len(preview) > 200 { preview = preview[:197] + "..." @@ -280,6 +334,7 @@ func parseErrorEntry(lineNo int, raw []byte, err error) HistoryEntry { } inputJSON, _ := json.Marshal(input) return HistoryEntry{ + Timestamp: ts, Message: Message{ Role: MessageRoleAssistant, Content: []ContentBlock{{ @@ -412,7 +467,7 @@ func (it *StreamJSONIterator) Next() bool { var sj streamJSONLine if err := json.Unmarshal(line, &sj); err != nil { - it.current = parseErrorEntry(it.lineNo, line, err) + it.current = parseErrorEntry(it.lineNo, line, err, "") it.current.RawLine = append(json.RawMessage(nil), line...) return true } diff --git a/pkg/claude/reader_test.go b/pkg/claude/reader_test.go index 6be136d..e3f1ab9 100644 --- a/pkg/claude/reader_test.go +++ b/pkg/claude/reader_test.go @@ -3,6 +3,8 @@ package claude import ( "strings" "testing" + + "github.com/segmentio/encoding/json" ) func TestReadHistory(t *testing.T) { @@ -28,6 +30,34 @@ func TestReadHistory(t *testing.T) { } } +func TestReadHistoryWithOptionsCanSkipRawLines(t *testing.T) { + jsonl := `{"uuid":"1","sessionId":"s1","timestamp":"2024-01-15T10:00:00Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"tu-1","name":"Bash","input":{"command":"pwd"}}]}}` + + withRaw, err := ReadHistory(strings.NewReader(jsonl)) + if err != nil { + t.Fatalf("ReadHistory failed: %v", err) + } + if len(withRaw) != 1 || len(withRaw[0].RawLine) == 0 { + t.Fatalf("ReadHistory should keep raw lines by default, got %+v", withRaw) + } + + withoutRaw, err := ReadHistoryWithOptions(strings.NewReader(jsonl), ReadOptions{}) + if err != nil { + t.Fatalf("ReadHistoryWithOptions failed: %v", err) + } + if len(withoutRaw) != 1 { + t.Fatalf("expected 1 entry, got %d", len(withoutRaw)) + } + if len(withoutRaw[0].RawLine) != 0 { + t.Fatalf("ReadHistoryWithOptions without KeepRaw should omit raw line, got %q", string(withoutRaw[0].RawLine)) + } + + uses := ExtractToolUses(withoutRaw) + if len(uses) != 1 || len(uses[0].RawEntry) != 0 { + t.Fatalf("tool use should not carry raw entry when KeepRaw is false: %+v", uses) + } +} + func TestReadHistory_EmptyLines(t *testing.T) { jsonl := `{"uuid":"1","sessionId":"s1","timestamp":"2024-01-15T10:00:00Z","message":{"role":"user","content":[]}} @@ -62,6 +92,11 @@ not valid json if len(parseErr) != 1 || parseErr[0].Name != "ParseError" { t.Errorf("entry[1] expected ParseError, got %+v", parseErr) } + // The ParseError row inherits the surrounding timestamp so it sorts among its + // neighbors instead of last (where the row limit would discard it first). + if entries[1].Timestamp != "2024-01-15T10:00:00Z" { + t.Errorf("ParseError timestamp = %q, want inherited 2024-01-15T10:00:00Z", entries[1].Timestamp) + } if entries[2].UUID != "2" { t.Errorf("entry[2] should be the post-bad-line assistant message, got UUID=%s", entries[2].UUID) } @@ -190,6 +225,98 @@ func TestReadStreamJSON_UnhandledTypes(t *testing.T) { if _, ok := snap["agent-name"]; ok { t.Errorf("agent-name is a known-but-skipped type, should NOT be in unhandled snapshot, got %v", snap) } + + // Operational state types are classified (not reported) so the diagnostic + // stays signal-heavy. + ResetUnhandledStreamTypes() + state := `{"type":"mode","mode":"normal"} +{"type":"bridge-session","bridgeSessionId":"cse_x"} +{"type":"progress","x":1} +{"type":"queue-operation","operation":"enqueue"}` + stateEntries, err := ReadStreamJSON(strings.NewReader(state)) + if err != nil { + t.Fatalf("ReadStreamJSON(state) failed: %v", err) + } + if len(stateEntries) != 0 { + t.Errorf("operational state types should produce no rows, got %d", len(stateEntries)) + } + if got := SnapshotUnhandledStreamTypes(); len(got) != 0 { + t.Errorf("operational state types should not be reported as unhandled, got %v", got) + } +} + +// TestReadStreamJSON_PrLinkSurfaced verifies a pr-link line becomes a PrLink +// synthetic row carrying the PR fields, rather than being dropped as unhandled. +func TestReadStreamJSON_PrLinkSurfaced(t *testing.T) { + ResetUnhandledStreamTypes() + input := `{"type":"pr-link","sessionId":"s","prNumber":133,"prUrl":"https://github.com/o/r/pull/133","prRepository":"o/r"}` + entries, err := ReadStreamJSON(strings.NewReader(input)) + if err != nil { + t.Fatalf("ReadStreamJSON failed: %v", err) + } + if len(entries) != 1 { + t.Fatalf("expected 1 PrLink entry, got %d", len(entries)) + } + uses := entries[0].Message.GetToolUses() + if len(uses) != 1 || uses[0].Name != "PrLink" { + t.Fatalf("expected a PrLink tool_use row, got %+v", uses) + } + var input2 map[string]any + if err := json.Unmarshal(uses[0].Input, &input2); err != nil { + t.Fatalf("unmarshal PrLink input: %v", err) + } + if input2["prUrl"] != "https://github.com/o/r/pull/133" || input2["prRepository"] != "o/r" { + t.Errorf("PrLink input missing PR fields: %v", input2) + } + if got := SnapshotUnhandledStreamTypes(); got["pr-link"] != 0 { + t.Errorf("pr-link should be handled, not counted unhandled: %v", got) + } +} + +// TestReadStreamJSON_ContentSystemSubtypes verifies the content-bearing system +// subtypes surface as synthetic rows (carrying their content) rather than being +// dropped as unhandled. +func TestReadStreamJSON_ContentSystemSubtypes(t *testing.T) { + ResetUnhandledStreamTypes() + input := `{"type":"system","subtype":"compact_boundary","content":"Conversation compacted","uuid":"c"} +{"type":"system","subtype":"local_command","content":"ok","uuid":"l"} +{"type":"system","subtype":"scheduled_task_fire","content":"resuming /loop","uuid":"s"} +{"type":"system","subtype":"informational","content":"Remote Control disconnected","uuid":"i"}` + + entries, err := ReadStreamJSON(strings.NewReader(input)) + if err != nil { + t.Fatalf("ReadStreamJSON failed: %v", err) + } + wantRows := map[string]string{ + "CompactBoundary": "Conversation compacted", + "LocalCommand": "ok", + "ScheduledTaskFire": "resuming /loop", + "Informational": "Remote Control disconnected", + } + if len(entries) != len(wantRows) { + t.Fatalf("expected %d rows, got %d", len(wantRows), len(entries)) + } + for _, e := range entries { + uses := e.Message.GetToolUses() + if len(uses) != 1 { + t.Fatalf("entry has %d tool uses, want 1", len(uses)) + } + wantContent, ok := wantRows[uses[0].Name] + if !ok { + t.Errorf("unexpected row %q", uses[0].Name) + continue + } + var in map[string]any + if err := json.Unmarshal(uses[0].Input, &in); err != nil { + t.Fatalf("unmarshal %s input: %v", uses[0].Name, err) + } + if in["content"] != wantContent { + t.Errorf("%s content = %v, want %q", uses[0].Name, in["content"], wantContent) + } + } + if got := SnapshotUnhandledStreamTypes(); len(got) != 0 { + t.Errorf("content system subtypes should be handled, got unhandled: %v", got) + } } func TestReadHistory_SessionFileEvents(t *testing.T) { diff --git a/pkg/claude/session.go b/pkg/claude/session.go index 8fc4cdb..2e8b3de 100644 --- a/pkg/claude/session.go +++ b/pkg/claude/session.go @@ -1,7 +1,7 @@ package claude import ( - "encoding/json" + "github.com/segmentio/encoding/json" "os" "path/filepath" "strings" @@ -251,6 +251,7 @@ func hasSuffixFold(s, suffix string) bool { // ParseResult contains the results of parsing Claude Code session history type ParseResult struct { ToolUses []ToolUse + Costs []SessionCost SessionsFound int SessionsScanned int } @@ -346,12 +347,18 @@ func ParseHistory(currentDir string, searchAll bool, filter Filter) (*ParseResul var allToolUses []ToolUse for _, sessionFile := range sessionFiles { - entries, err := ReadHistoryFile(sessionFile) + entries, err := ReadHistoryFileWithOptions(sessionFile, ReadOptions{KeepRaw: filter.KeepRaw}) if err != nil { + parseLog.Warnf("skipping unreadable transcript %s: %v", sessionFile, err) continue } if len(entries) > 0 { result.SessionsScanned++ + projectPath := ExtractProjectPath(sessionFile) + projectRoot := FindProjectRoot(projectPath) + if filter.IncludeCosts { + result.Costs = append(result.Costs, costsFromEntries(sessionFile, entries, projectRoot, filter.Since)...) + } toolUses := stampToolUses(ExtractToolUses(entries), projectsDir, sessionFile) allToolUses = append(allToolUses, toolUses...) } @@ -423,8 +430,9 @@ func ParseHistoryTools(currentDir string, searchAll bool, filter Filter) ([]tool var allToolUses []ToolUse uses := make(map[string][]HistoryEntry) for _, sessionFile := range sessionFiles { - entries, err := ReadHistoryFile(sessionFile) + entries, err := ReadHistoryFileWithOptions(sessionFile, ReadOptions{KeepRaw: filter.KeepRaw}) if err != nil { + parseLog.Warnf("skipping unreadable transcript %s: %v", sessionFile, err) continue } if len(entries) == 0 { @@ -471,81 +479,86 @@ func ParseCostsWithFilter(currentDir string, searchAll bool, since *time.Time, f } sessionFiles = filterSessionFilesBySessionID(sessionFiles, filter) + var result []SessionCost + for _, sessionFile := range sessionFiles { + projectPath := ExtractProjectPath(sessionFile) + projectRoot := FindProjectRoot(projectPath) + + entries, err := ReadHistoryFileWithOptions(sessionFile, ReadOptions{}) + if err != nil { + continue + } + result = append(result, costsFromEntries(sessionFile, entries, projectRoot, since)...) + } + return result, nil +} + +func costsFromEntries(sessionFile string, entries []HistoryEntry, projectRoot string, since *time.Time) []SessionCost { type sessionKey struct { sessionID string file string } + project := filepath.Base(projectRoot) costs := make(map[sessionKey]*SessionCost) filesets := make(map[sessionKey]map[string]bool) var order []sessionKey - for _, sessionFile := range sessionFiles { - projectPath := ExtractProjectPath(sessionFile) - projectRoot := FindProjectRoot(projectPath) - project := filepath.Base(projectRoot) - - entries, err := ReadHistoryFile(sessionFile) - if err != nil { + for _, entry := range entries { + ts, _ := entry.ParseTimestamp() + if since != nil && !ts.IsZero() && ts.Before(*since) { continue } - for _, entry := range entries { - ts, _ := entry.ParseTimestamp() - if since != nil && !ts.IsZero() && ts.Before(*since) { - continue - } + key := sessionKey{sessionID: entry.SessionID, file: sessionFile} - key := sessionKey{sessionID: entry.SessionID, file: sessionFile} - - // Collect file paths from tool uses in all messages - for _, tu := range ExtractToolUses([]HistoryEntry{entry}) { - tu.ProjectRoot = projectRoot - if p := tu.ExtractPath(); p != "" { - if filesets[key] == nil { - filesets[key] = make(map[string]bool) - } - filesets[key][p] = true + // Collect file paths from tool uses in all messages. + for _, tu := range ExtractToolUses([]HistoryEntry{entry}) { + tu.ProjectRoot = projectRoot + if p := tu.ExtractPath(); p != "" { + if filesets[key] == nil { + filesets[key] = make(map[string]bool) } + filesets[key][p] = true } + } - if !entry.IsAssistantMessage() || entry.Message.Usage == nil { - continue - } - if ts.IsZero() { - continue - } - - sc, ok := costs[key] - if !ok { - sc = &SessionCost{ - SessionID: entry.SessionID, - Project: project, - Start: ts, - End: ts, - } - costs[key] = sc - order = append(order, key) - } + if !entry.IsAssistantMessage() || entry.Message.Usage == nil { + continue + } + if ts.IsZero() { + continue + } - if ts.Before(sc.Start) { - sc.Start = ts - } - if ts.After(sc.End) { - sc.End = ts + sc, ok := costs[key] + if !ok { + sc = &SessionCost{ + SessionID: entry.SessionID, + Project: project, + Start: ts, + End: ts, } + costs[key] = sc + order = append(order, key) + } - model := entry.Message.Model - if model != "" { - sc.Model = model - } - if tier := entry.Message.Usage.ServiceTier; tier != "" { - sc.Tier = tier - } + if ts.Before(sc.Start) { + sc.Start = ts + } + if ts.After(sc.End) { + sc.End = ts + } - sc.Tokens.Add(entry.Message.Usage, model) - sc.Messages++ + model := entry.Message.Model + if model != "" { + sc.Model = model + } + if tier := entry.Message.Usage.ServiceTier; tier != "" { + sc.Tier = tier } + + sc.Tokens.Add(entry.Message.Usage, model) + sc.Messages++ } result := make([]SessionCost, 0, len(order)) @@ -556,7 +569,7 @@ func ParseCostsWithFilter(currentDir string, searchAll bool, since *time.Time, f } result = append(result, *sc) } - return result, nil + return result } // ParseCostsDetailed extends ParseCosts with context categorization and per-tool token breakdown. @@ -587,7 +600,7 @@ func ParseCostsDetailedWithFilter(currentDir string, searchAll bool, since *time projectRoot := FindProjectRoot(projectPath) project := filepath.Base(projectRoot) - entries, err := ReadHistoryFile(sessionFile) + entries, err := ReadHistoryFileWithOptions(sessionFile, ReadOptions{}) if err != nil { continue } diff --git a/pkg/claude/stdin.go b/pkg/claude/stdin.go index 52594dc..a170da1 100644 --- a/pkg/claude/stdin.go +++ b/pkg/claude/stdin.go @@ -1,7 +1,7 @@ package claude import ( - "encoding/json" + "github.com/segmentio/encoding/json" "os" ) diff --git a/pkg/claude/tools/generic.go b/pkg/claude/tools/generic.go index 4ca2a9f..1c761cd 100644 --- a/pkg/claude/tools/generic.go +++ b/pkg/claude/tools/generic.go @@ -1,7 +1,7 @@ package tools import ( - "encoding/json" + "github.com/segmentio/encoding/json" "strings" "github.com/flanksource/clicky" diff --git a/pkg/claude/tools/tool.go b/pkg/claude/tools/tool.go index b536f43..c08e9f4 100644 --- a/pkg/claude/tools/tool.go +++ b/pkg/claude/tools/tool.go @@ -1,7 +1,6 @@ package tools import ( - "encoding/json" "fmt" "path/filepath" "strings" @@ -10,6 +9,7 @@ import ( "github.com/flanksource/clicky" "github.com/flanksource/clicky/api" "github.com/flanksource/clicky/api/icons" + "github.com/segmentio/encoding/json" ) // Tool is the interface all tool types implement. diff --git a/pkg/claude/tooluse.go b/pkg/claude/tooluse.go index 294a339..e1f0ad1 100644 --- a/pkg/claude/tooluse.go +++ b/pkg/claude/tooluse.go @@ -1,7 +1,6 @@ package claude import ( - "encoding/json" "fmt" "os" "path/filepath" @@ -13,6 +12,7 @@ import ( "github.com/flanksource/captain/pkg/claude/tools" captainCollections "github.com/flanksource/captain/pkg/collections" "github.com/flanksource/commons/collections" + "github.com/segmentio/encoding/json" ) // ToolUse represents a single tool invocation extracted from history @@ -42,13 +42,15 @@ type ToolUse struct { // Filter defines criteria for filtering tool uses type Filter struct { - Tools []string - Paths []string - Since *time.Time - Before *time.Time - Limit int - SessionID string // exact or prefix match against ToolUse.SessionID - SessionIDs []string // exact or prefix match against ToolUse.SessionID + Tools []string + Paths []string + Since *time.Time + Before *time.Time + Limit int + SessionID string // exact or prefix match against ToolUse.SessionID + SessionIDs []string // exact or prefix match against ToolUse.SessionID + KeepRaw bool // retain raw JSONL lines for --raw output + IncludeCosts bool // aggregate session costs while parsing history // IncludeAgents, when set, makes ParseHistory also read nested sub-agent // transcripts (/subagents/agent-*.jsonl) for the in-scope sessions. IncludeAgents bool diff --git a/pkg/cli/ai.go b/pkg/cli/ai.go index 5de1dba..905df9e 100644 --- a/pkg/cli/ai.go +++ b/pkg/cli/ai.go @@ -11,10 +11,14 @@ import ( "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/ai/middleware" + "github.com/flanksource/captain/pkg/ai/pricing" "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/captain/pkg/collections" "github.com/flanksource/captain/pkg/captainconfig" "github.com/flanksource/captain/pkg/claude" "github.com/flanksource/captain/pkg/claude/tools" + dbcontext "github.com/flanksource/commons-db/context" + "github.com/flanksource/commons-db/shell" ) // loadSavedAI returns the saved AI defaults from ~/.captain.yaml. Errors are @@ -23,18 +27,19 @@ import ( func loadSavedAI() captainconfig.AIDefaults { cfg, _, err := captainconfig.Load() if err != nil { - log.Debugf("captainconfig load: %v (continuing with zero defaults)", err) + log.Warnf("captainconfig load: %v (continuing with zero defaults)", err) return captainconfig.AIDefaults{} } return cfg.AI } type AIProviderOptions struct { - Model string `flag:"model" help:"Model name, e.g. claude-sonnet-4, gemini-2.0-flash (defaults to the value saved by 'captain configure')" short:"m"` - Backend string `flag:"backend" help:"Force backend: anthropic|gemini|openai|claude-cli|claude-agent|codex-cli|gemini-cli (default: inferred from model or saved by 'captain configure')" short:"b"` - APIKey string `flag:"api-key" help:"API key (env: ANTHROPIC_API_KEY, GEMINI_API_KEY, GOOGLE_API_KEY)"` - NoCache bool `flag:"no-cache" help:"Disable response caching"` - Budget string `flag:"budget" help:"Max spend in USD, 0=unlimited" default:"0"` + Model string `flag:"model" help:"Model name(s), e.g. claude-sonnet-5 or a comma-separated primary,fallback list like claude-sonnet-5,gpt-4o (defaults to the value saved by 'captain configure')" short:"m"` + Fallback []string `flag:"fallback" help:"Model to try if the primary is unavailable (repeatable; comma-separated allowed)"` + Backend string `flag:"backend" help:"Force backend: anthropic|gemini|openai|deepseek|claude-cli|claude-agent|claude-cmux|codex-cli|codex-cmux|gemini-cli (default: inferred from model or saved by 'captain configure')" short:"b"` + APIKey string `flag:"api-key" help:"API key (env: ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, GOOGLE_API_KEY, DEEPSEEK_API_KEY)"` + NoCache bool `flag:"no-cache" help:"Disable response caching"` + Budget string `flag:"budget" help:"Max spend in USD, 0=unlimited" default:"0"` } // parseFloatFlag parses a numeric string flag, returning a descriptive error @@ -72,8 +77,9 @@ func (o AIProviderOptions) ToConfig() (ai.Config, error) { budget = saved.BudgetUSD } + m := api.Model{Name: model, Backend: ai.Backend(backend), Fallbacks: fallbackModelsFromFlags(o.Fallback)} return ai.Config{ - Model: api.Model{Name: model, Backend: ai.Backend(backend)}, + Model: m.ExpandCSV(), Budget: api.Budget{Cost: budget}, APIKey: o.APIKey, NoCache: o.NoCache || saved.NoCache, @@ -221,8 +227,8 @@ func (o AIRuntimeOptions) ToRequest(systemPrompt, appendSystemPrompt, userPrompt return ai.Request{ Prompt: api.Prompt{System: systemPrompt, AppendSystem: appendSystemPrompt, User: userPrompt}, - Model: api.Model{Temperature: temperaturePtr, Effort: api.Effort(effort)}, - Budget: api.Budget{MaxTokens: maxTokens}, + Model: api.Model{Temperature: temperaturePtr, Effort: api.Effort(effort), NoCache: o.NoCache || saved.NoCache}, + Budget: api.Budget{MaxTokens: maxTokens, MaxTurns: o.MaxTurns}, Memory: api.Memory{ Skills: o.SkillDirs, SkipHooks: o.NoHooks || saved.NoHooks, @@ -234,7 +240,6 @@ func (o AIRuntimeOptions) ToRequest(systemPrompt, appendSystemPrompt, userPrompt }, Permissions: perms, SessionID: o.Resume, - MaxTurns: o.MaxTurns, }, nil } @@ -244,7 +249,13 @@ func (o AIPromptOptions) ToRequest() (ai.Request, error) { return o.AIRuntimeOptions.ToRequest(o.System, o.AppendSystem, o.Prompt) } +// RunAIPrompt is a deprecated alias for `captain prompt run`. It routes through +// the same shared render + execute core (renderPromptSource + executePromptRequest) +// so there is one implementation; the positional `.prompt` file, --prompt/-p, and +// stdin all still work. func RunAIPrompt(opts AIPromptOptions) (any, error) { + log.Warnf("`captain ai prompt` is deprecated; use `captain prompt run` (it accepts a .prompt file, id, --prompt/-p, or stdin)") + var stdin string if claude.IsStdinPiped() { b, err := io.ReadAll(os.Stdin) @@ -254,64 +265,160 @@ func RunAIPrompt(opts AIPromptOptions) (any, error) { stdin = string(b) } - tmpl, usedStdin, err := resolvePromptTemplate(opts, stdin) + ctx := context.Background() + req, cfg, err := renderPromptSource(ctx, opts.File, opts, "", stdin) if err != nil { return nil, err } + if req.Prompt.User == "" { + return nil, fmt.Errorf("prompt text required (use --prompt/-p, a file arg, or pipe via stdin)") + } + if cfg.Model.Name == "" { + return nil, fmt.Errorf("no model: pass --model or run 'captain configure' to set a default") + } + if err := req.Validate(); err != nil { + return nil, err + } + return executePromptRequest(ctx, req, cfg, runtimeTimeout(req.Budget.Timeout), opts.NoStream) +} + +func executePromptRequest(parent context.Context, req ai.Request, cfg ai.Config, timeout time.Duration, noStream bool) (any, error) { + ctx, cancel := runContext(parent, req, timeout) + defer cancel() - data, err := parseVars(opts.Var) + p, cleanup, err := buildProvider(ctx, &req, cfg) if err != nil { return nil, err } - if s := strings.TrimSpace(stdin); s != "" && !usedStdin { - data["input"] = s + defer cleanup() + + if streamer, ok := p.(ai.StreamingProvider); ok && !noStream { + return runStreaming(ctx, streamer, req) } + return runBuffered(ctx, p, req) +} - fileReq, fileCfg, err := tmpl.Render(data, nil) - if err != nil { - return nil, err +// runContext derives the timeout-bounded context for a prompt execution. A +// non-empty req.Budget.Timeout overrides the caller-supplied timeout; a +// non-positive timeout falls back to 120s. +func runContext(parent context.Context, req ai.Request, timeout time.Duration) (context.Context, context.CancelFunc) { + if parent == nil { + parent = context.Background() + } + if req.Budget.Timeout != "" { + timeout = runtimeTimeout(req.Budget.Timeout) + } + if timeout <= 0 { + timeout = 120 * time.Second } + return context.WithTimeout(parent, timeout) +} - req, cfg, err := overlayCLI(fileReq, fileCfg, opts) - if err != nil { - return nil, err +// buildProvider constructs the logging-wrapped AI provider for req/cfg. When +// req.Setup is present it runs the shell preparation (mutating req's cwd/env to +// the prepared sandbox) and returns its cleanup; callers MUST defer the returned +// cleanup. ctx should already carry the run timeout. +// warnIfLikelyModelTypo emits a "did you mean" hint when the model name is not a +// known catalog id but is a close (edit-distance ≤ 2) match to one — catching +// typos like "claud-sonnet-4" even when an explicit backend is configured (so +// InferBackend's suggestion never fires). Non-blocking: an unrecognized model may +// still be a valid provider/OpenRouter id, so the run proceeds. +func warnIfLikelyModelTypo(model string) { + if suggestion, ok := suggestKnownModel(model); ok { + log.Warnf("model %q is not a recognized model; did you mean %q?", model, suggestion) } - cwd, err := os.Getwd() - if err != nil { - return nil, fmt.Errorf("get working directory: %w", err) +} + +// suggestKnownModel returns the closest known model to model and true when it is +// unrecognized-but-close (edit-distance ≤ 2) — a likely typo. A model known to +// the catalog or the pricing registry, or one far from any known name (a +// plausibly-valid id we simply don't list), returns ("", false). +// +// The catalog is checked first (in-memory, no I/O); only a catalog miss consults +// the pricing registry, which loads from its disk cache (fetching once if stale) +// and degrades to catalog-only if unavailable. +func suggestKnownModel(model string) (string, bool) { + if model == "" { + return "", false } - if err := normalizePromptContextDir(&req, cwd); err != nil { - return nil, err + for _, m := range ai.Catalog() { + if m.ID == model || baseModelName(m.ID) == model { + return "", false // known catalog model + } } - if req.Prompt.User == "" { - return nil, fmt.Errorf("prompt text required (use --prompt/-p, a file arg, or pipe via stdin)") + if pricing.Contains(model) { + return "", false // known pricing-registry (e.g. OpenRouter) model } - if cfg.Model.Name == "" { - return nil, fmt.Errorf("no model: pass --model or run 'captain configure' to set a default") + return closestModel(model, knownModelNames()) +} + +// knownModelNames is every model name captain can suggest: catalog canonical ids +// and their base names, plus the pricing registry's ids. +func knownModelNames() []string { + catalog := ai.Catalog() + names := make([]string, 0, len(catalog)*2+pricing.RegistrySize()) + for _, m := range catalog { + names = append(names, m.ID, baseModelName(m.ID)) } - if err := req.Validate(); err != nil { - return nil, err + for _, mi := range pricing.ListModels("") { + names = append(names, mi.ModelID, baseModelName(mi.ModelID)) } + return names +} - p, err := ai.NewProvider(cfg) - if err != nil { - return nil, err +// closestModel returns the nearest candidate to model and true when it is a +// likely typo (edit-distance ≤ 2, not an exact match). +func closestModel(model string, candidates []string) (string, bool) { + lower := strings.ToLower(model) + best, bestDist := "", -1 + for _, cand := range candidates { + if cand == model { + return "", false + } + if d := collections.Levenshtein(lower, strings.ToLower(cand)); bestDist < 0 || d < bestDist { + best, bestDist = cand, d + } } - if p, err = middleware.Wrap(p, middleware.WithLogging()); err != nil { - return nil, err + if best != "" && bestDist >= 0 && bestDist <= 2 { + return best, true } + return "", false +} - timeout, _ := time.ParseDuration(opts.Timeout) - if timeout <= 0 { - timeout = 120 * time.Second +func baseModelName(id string) string { + if i := strings.LastIndex(id, "/"); i >= 0 { + return id[i+1:] } - ctx, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() + return id +} - if streamer, ok := p.(ai.StreamingProvider); ok && !opts.NoStream { - return runStreaming(ctx, streamer, req) +func buildProvider(ctx context.Context, req *ai.Request, cfg ai.Config) (ai.Provider, func(), error) { + for _, c := range cfg.Model.Candidates() { + warnIfLikelyModelTypo(c.Name) } - return runBuffered(ctx, p, req) + cleanup := func() {} + if req.NoCache { + cfg.NoCache = true + } + if req.Setup != nil { + setup, err := shell.Prepare(dbcontext.NewContext(ctx), req.Setup) + if err != nil { + return nil, cleanup, err + } + cleanup = func() { _ = setup.Cleanup() } + req.SetCwd(setup.Cwd) + req.Setup.Env = setup.Env + } + p, err := ai.NewProvider(cfg) + if err != nil { + cleanup() + return nil, func() {}, err + } + if p, err = middleware.Wrap(p, middleware.WithLogging(), middleware.WithSchemaValidation()); err != nil { + cleanup() + return nil, func() {}, err + } + return p, cleanup, nil } func runBuffered(ctx context.Context, p ai.Provider, req ai.Request) (any, error) { @@ -327,7 +434,7 @@ func runBuffered(ctx context.Context, p ai.Provider, req ai.Request) (any, error Text: resp.Text, Model: model, Backend: backend, - Dir: input.Context.Dir, + Dir: input.Cwd(), SessionID: input.SessionID, Input: input, InputTokens: resp.Usage.InputTokens, @@ -392,7 +499,7 @@ func runStreaming(ctx context.Context, sp ai.StreamingProvider, req ai.Request) Text: text, Model: model, Backend: backend, - Dir: input.Context.Dir, + Dir: input.Cwd(), SessionID: input.SessionID, Input: input, InputTokens: usage.InputTokens, diff --git a/pkg/cli/ai_agent.go b/pkg/cli/ai_agent.go index 8641aaa..d6f0694 100644 --- a/pkg/cli/ai_agent.go +++ b/pkg/cli/ai_agent.go @@ -66,12 +66,12 @@ func scopeFromFlag(s string) (agent.Scope, error) { // buildAgentPlugins assembles the verify/worktree/judge plugins from the flags. // The worktree plugin owns the commit (it commits the branch on teardown), so // --commit requires --worktree. -func buildAgentPlugins(opts AIAgentOptions, p ai.Provider) ([]agent.Plugin, *worktree.Plugin, error) { +func buildAgentPlugins(opts AIAgentOptions, p ai.Provider) ([]any, *worktree.Plugin, error) { if opts.Commit && !opts.Worktree { return nil, nil, fmt.Errorf("--commit requires --worktree (captain commits the isolated branch, not your working tree)") } - var plugins []agent.Plugin + var hooks []any var wt *worktree.Plugin if opts.Worktree { branch := opts.Branch @@ -80,9 +80,16 @@ func buildAgentPlugins(opts AIAgentOptions, p ai.Provider) ([]agent.Plugin, *wor } wt = &worktree.Plugin{Branch: branch} if opts.Commit { - wt.CommitMsg = "captain: " + commitSubject(opts.Prompt) + // --commit: merge the isolated branch into trunk once the run + // succeeds, then remove the worktree. + wt.Merge = worktree.WorktreeMergeOnSuccess + wt.Cleanup = worktree.WorktreeCleanupOnMerge + } else { + // --worktree alone: never merge, and only clean up a worktree whose + // changes verified — otherwise keep it around for inspection. + wt.Cleanup = worktree.WorktreeCleanupOnVerify } - plugins = append(plugins, wt) + hooks = append(hooks, wt) } for _, cmd := range opts.Verify { @@ -90,7 +97,7 @@ func buildAgentPlugins(opts AIAgentOptions, p ai.Provider) ([]agent.Plugin, *wor if cmd == "" { continue } - plugins = append(plugins, verify.New("verify:"+cmd, &verify.CmdVerifier{Cmd: "sh", Args: []string{"-c", cmd}})) + hooks = append(hooks, verify.New("verify:"+cmd, &verify.CmdVerifier{Cmd: "sh", Args: []string{"-c", cmd}})) } if opts.Judge != "" { @@ -101,10 +108,10 @@ func buildAgentPlugins(opts AIAgentOptions, p ai.Provider) ([]agent.Plugin, *wor return map[string]any{"cwd": cwd, "changed": strings.Join(changed, ", "), "rubric": opts.Judge} }, } - plugins = append(plugins, verify.New("judge", judge)) + hooks = append(hooks, verify.New("judge", judge)) } - return plugins, wt, nil + return hooks, wt, nil } func RunAIAgent(opts AIAgentOptions) (any, error) { @@ -142,7 +149,7 @@ func RunAIAgent(opts AIAgentOptions) (any, error) { return nil, fmt.Errorf("backend %s does not support the streaming agent loop", cfg.Model.Backend) } - plugins, wt, err := buildAgentPlugins(opts, p) + hooks, _, err := buildAgentPlugins(opts, p) if err != nil { return nil, err } @@ -153,23 +160,15 @@ func RunAIAgent(opts AIAgentOptions) (any, error) { } renderer := newLineRenderer(os.Stderr, 8) - runner := &agent.Runner{ - Provider: sp, - Plugins: plugins, - Loop: ai.LoopOptions{ - MaxIterations: opts.MaxIterations, - OnEvent: func(_ int, ev ai.Event) { renderEvent(os.Stderr, renderer, ev) }, - }, - Build: func(_ *agent.RunContext, _ int, _ *ai.LoopIteration, feedback string) ai.Request { - req := baseReq - if feedback != "" { - req.Prompt.User = opts.Prompt + "\n\n[verifier feedback]\n" + feedback + "\n\nFix the issues above and continue." - } - return req - }, - Repo: cwd, - Cwd: cwd, - Scope: scope, + runner := &agent.Runner[string]{ + Provider: sp, + Request: baseReq, + Hooks: hooks, + MaxIterations: opts.MaxIterations, + Repo: cwd, + Cwd: cwd, + Scope: scope, + OnEvent: func(_ int, ev ai.Event) { renderEvent(os.Stderr, renderer, ev) }, } timeout, _ := time.ParseDuration(opts.Timeout) @@ -181,24 +180,22 @@ func RunAIAgent(opts AIAgentOptions) (any, error) { start := time.Now() result, runErr := runner.Run(ctx) - if result == nil { - return nil, runErr - } + ws := result.Response.Workspace res := AIAgentResult{ - ChangedFiles: result.ChangedFiles, - SessionID: result.SessionID, - Duration: time.Since(start).Round(time.Millisecond).String(), - Passed: verdictsPassed(result.Verdicts, runErr), + Duration: time.Since(start).Round(time.Millisecond).String(), + Passed: verifyPassed(result.Verdicts), + } + if ws != nil { + res.ChangedFiles = ws.Changed + res.SessionID = ws.SessionID + res.Branch = ws.Branch } if result.Loop != nil { res.Iterations = len(result.Loop.Iterations) res.StopReason = result.Loop.StopReason res.CostUSD = result.Loop.TotalCost } - if wt != nil && wt.Result != nil { - res.Branch = wt.Result.Branch - } // A failed loop/verify is surfaced through the result (Passed=false), not as // a command error, so --format output is still rendered. A genuine provider // or plugin error is returned. @@ -207,21 +204,3 @@ func RunAIAgent(opts AIAgentOptions) (any, error) { } return res, nil } - -// verdictsPassed reports whether the last verifier verdict was OK. With no -// verifiers, the run passed when the loop returned no error. -func verdictsPassed(verdicts []agent.Verdict, runErr error) bool { - if len(verdicts) == 0 { - return runErr == nil - } - return verdicts[len(verdicts)-1].OK -} - -// commitSubject derives a one-line, length-capped commit subject from the prompt. -func commitSubject(s string) string { - s = strings.TrimSpace(firstLine(s)) - if len(s) > 72 { - s = s[:72] - } - return s -} diff --git a/pkg/cli/ai_agent_test.go b/pkg/cli/ai_agent_test.go index a714e6a..17fa15b 100644 --- a/pkg/cli/ai_agent_test.go +++ b/pkg/cli/ai_agent_test.go @@ -5,12 +5,15 @@ import ( "testing" "github.com/flanksource/captain/pkg/ai/agent" + "github.com/flanksource/captain/pkg/ai/agent/worktree" ) -func pluginNames(ps []agent.Plugin) []string { - out := make([]string, len(ps)) - for i, p := range ps { - out[i] = p.Name() +func pluginNames(hooks []any) []string { + out := make([]string, len(hooks)) + for i, h := range hooks { + if n, ok := h.(interface{ Name() string }); ok { + out[i] = n.Name() + } } return out } @@ -64,14 +67,31 @@ func TestBuildAgentPlugins_WorktreeBranchAndCommit(t *testing.T) { if !strings.HasPrefix(wt.Branch, "captain/agent-") { t.Errorf("default branch = %q, want captain/agent- prefix", wt.Branch) } - if wt.CommitMsg != "captain: fix the failing lint" { - t.Errorf("CommitMsg = %q, want one-line prompt subject", wt.CommitMsg) + if wt.Merge != worktree.WorktreeMergeOnSuccess { + t.Errorf("Merge = %q, want %q", wt.Merge, worktree.WorktreeMergeOnSuccess) + } + if wt.Cleanup != worktree.WorktreeCleanupOnMerge { + t.Errorf("Cleanup = %q, want %q", wt.Cleanup, worktree.WorktreeCleanupOnMerge) } if names := pluginNames(plugins); len(names) != 1 || names[0] != "worktree" { t.Errorf("plugins = %v, want [worktree]", names) } } +func TestBuildAgentPlugins_WorktreeWithoutCommit(t *testing.T) { + opts := AIAgentOptions{Worktree: true} + _, wt, err := buildAgentPlugins(opts, nil) + if err != nil { + t.Fatalf("buildAgentPlugins: %v", err) + } + if wt.Merge != "" { + t.Errorf("Merge = %q, want the zero value (never merge without --commit)", wt.Merge) + } + if wt.Cleanup != worktree.WorktreeCleanupOnVerify { + t.Errorf("Cleanup = %q, want %q", wt.Cleanup, worktree.WorktreeCleanupOnVerify) + } +} + func TestBuildAgentPlugins_VerifyAndJudge(t *testing.T) { opts := AIAgentOptions{ Verify: []string{"make lint", " ", "go test ./..."}, @@ -91,33 +111,14 @@ func TestBuildAgentPlugins_VerifyAndJudge(t *testing.T) { } } -func TestVerdictsPassed(t *testing.T) { - if !verdictsPassed(nil, nil) { - t.Error("no verdicts + no error should pass") +func TestVerifyPassed(t *testing.T) { + if !verifyPassed(nil) { + t.Error("no verdicts should pass") } - if verdictsPassed(nil, errSentinel) { - t.Error("no verdicts + error should fail") + if !verifyPassed([]agent.VerifyResult{{Valid: false}, {Valid: true}}) { + t.Error("last verdict valid should pass") } - if !verdictsPassed([]agent.Verdict{{OK: false}, {OK: true}}, nil) { - t.Error("last verdict OK should pass") - } - if verdictsPassed([]agent.Verdict{{OK: true}, {OK: false}}, nil) { - t.Error("last verdict not OK should fail") - } -} - -func TestCommitSubject(t *testing.T) { - if got := commitSubject(" one line \nrest"); got != "one line" { - t.Errorf("commitSubject = %q, want %q", got, "one line") - } - long := strings.Repeat("x", 100) - if got := commitSubject(long); len(got) != 72 { - t.Errorf("commitSubject len = %d, want 72 (capped)", len(got)) + if verifyPassed([]agent.VerifyResult{{Valid: true}, {Valid: false}}) { + t.Error("last verdict not valid should fail") } } - -var errSentinel = errSentinelType("boom") - -type errSentinelType string - -func (e errSentinelType) Error() string { return string(e) } diff --git a/pkg/cli/ai_catalog.go b/pkg/cli/ai_catalog.go index 4200827..0fdcf93 100644 --- a/pkg/cli/ai_catalog.go +++ b/pkg/cli/ai_catalog.go @@ -1,15 +1,10 @@ package cli -import ( - "sort" - - "github.com/flanksource/captain/pkg/ai" - "github.com/flanksource/clicky/aichat" -) +import "github.com/flanksource/captain/pkg/ai" // agentCatalogModels returns the model list for a CLI/agent backend from -// clicky/aichat's static catalog — the key-free source of truth shared with the -// chat menu and shell completion. CLI/agent backends authenticate internally +// captain's static catalog — the key-free source of truth shared with the chat +// menu and shell completion. CLI/agent backends authenticate internally // (subscription/OAuth via the installed binary), so enumerating their models // must never require the parent provider's API key. // @@ -19,26 +14,5 @@ import ( // which the claude-agent provider de-prefixes itself). claude-cli shares the // claude-agent provider, so it shares its catalog entries. func agentCatalogModels(b ai.Backend) []ai.ModelDef { - want := b - if want == ai.BackendClaudeCLI { - want = ai.BackendClaudeAgent - } - - out := []ai.ModelDef{} - for _, m := range aichat.Catalog() { - if m.Engine != aichat.EngineAgent || m.Backend != want { - continue - } - id := m.ID - if m.AgentModel != "" { - id = m.AgentModel - } - label := m.Label - if label == "" { - label = id - } - out = append(out, ai.ModelDef{ID: id, Name: label, Backend: b}) - } - sort.SliceStable(out, func(i, j int) bool { return out[i].ID < out[j].ID }) - return out + return ai.AgentCatalogModels(b) } diff --git a/pkg/cli/ai_catalog_test.go b/pkg/cli/ai_catalog_test.go index 472f405..89fa766 100644 --- a/pkg/cli/ai_catalog_test.go +++ b/pkg/cli/ai_catalog_test.go @@ -5,23 +5,21 @@ import ( "testing" "github.com/flanksource/captain/pkg/ai" - "github.com/flanksource/clicky/aichat" ) // installTestCatalog swaps in a deterministic catalog for the duration of the -// test so the assertions don't drift with clicky's shipped model list. The -// catalog mixes a genkit (API) entry with agent entries for two backends so the -// filtering — agent-engine only, exact backend match — is actually exercised. +// test so the assertions don't drift with the shipped model list. The catalog +// mixes an API entry with agent entries for two backends so exact backend +// filtering is exercised. func installTestCatalog(t *testing.T) { t.Helper() - prev := aichat.Catalog() - t.Cleanup(func() { _ = aichat.SetModelCatalog(prev) }) + t.Cleanup(ai.ResetModelCatalog) - if err := aichat.SetModelCatalog([]aichat.Model{ - {ID: "anthropic/claude-sonnet-4-5", Provider: aichat.ProviderAnthropic, Label: "Claude Sonnet 4.5"}, - {ID: "claude-agent-opus", Engine: aichat.EngineAgent, Backend: ai.BackendClaudeAgent, Provider: "claude-agent", Label: "Claude Agent · Opus"}, - {ID: "claude-agent-sonnet", Engine: aichat.EngineAgent, Backend: ai.BackendClaudeAgent, Provider: "claude-agent", Label: "Claude Agent · Sonnet"}, - {ID: "codex-gpt-5-codex", Engine: aichat.EngineAgent, Backend: ai.BackendCodexCLI, AgentModel: "gpt-5-codex", Provider: "codex-cli", Label: "Codex · GPT-5"}, + if err := ai.SetModelCatalog([]ai.Model{ + {ID: "anthropic/claude-sonnet-4-5", Backend: ai.BackendAnthropic, Label: "Claude Sonnet 4.5"}, + {ID: "claude-agent-opus", Backend: ai.BackendClaudeAgent, Label: "Claude Agent · Opus"}, + {ID: "claude-agent-sonnet", Backend: ai.BackendClaudeAgent, Label: "Claude Agent · Sonnet"}, + {ID: "codex-gpt-5-codex", Backend: ai.BackendCodexCLI, AgentModel: "gpt-5-codex", Label: "Codex · GPT-5"}, }); err != nil { t.Fatalf("SetModelCatalog: %v", err) } diff --git a/pkg/cli/ai_filters.go b/pkg/cli/ai_filters.go index 3644cc3..71303c8 100644 --- a/pkg/cli/ai_filters.go +++ b/pkg/cli/ai_filters.go @@ -6,7 +6,6 @@ import ( "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/ai/agent" capapi "github.com/flanksource/captain/pkg/api" - "github.com/flanksource/clicky/aichat" "github.com/flanksource/clicky/api" "github.com/flanksource/clicky/entity" ) @@ -77,19 +76,19 @@ func backendFilterOptions() map[string]api.Textable { return out } -// modelOptions suggests the clicky/aichat model catalog as bare model names that -// captain's --model accepts (InferBackend matches bare prefixes). Genkit ids are -// "provider/model" so the provider prefix is stripped; agent ids already carry a -// captain-recognised backend prefix (claude-agent-*, codex-*) and are used +// modelOptions suggests the captain model catalog as bare model names that +// captain's --model accepts (InferBackend matches bare prefixes). API ids are +// "provider/model" so the provider prefix is stripped; agent ids already carry +// a captain-recognised backend prefix (claude-agent-*, codex-*) and are used // verbatim — using their AgentModel slug instead would misroute (e.g. -// "gpt-5-codex" infers OpenAI, not codex). Completion is suggest-only: arbitrary -// models are still accepted, so the catalog need not be exhaustive. +// "gpt-5-codex" infers OpenAI, not codex). Completion is suggest-only: +// arbitrary models are still accepted, so the catalog need not be exhaustive. func modelFilterOptions() map[string]api.Textable { - catalog := aichat.Catalog() + catalog := ai.Catalog() out := make(map[string]api.Textable, len(catalog)) for _, m := range catalog { id := m.ID - if m.Engine == aichat.EngineGenkit { + if !m.IsAgent() { if i := strings.IndexByte(id, '/'); i >= 0 { id = id[i+1:] } diff --git a/pkg/cli/ai_models.go b/pkg/cli/ai_models.go index 3a24a5f..57e479d 100644 --- a/pkg/cli/ai_models.go +++ b/pkg/cli/ai_models.go @@ -11,63 +11,9 @@ import ( "github.com/flanksource/captain/pkg/ai/pricing" ) -// legacyModelPrefixes hides model IDs that are either superseded by a newer -// generation (so almost no one should be picking them) or aren't chat -// completions at all (image/audio/embedding/moderation endpoints). Used by -// both the `ai models` listing and the `configure` wizard's model picker so -// the two views stay consistent. -// -// `--filter` (or any explicit substring filter) overrides the blacklist — -// "ai models -f gpt-3.5" or a user typing "grok-3" into the picker will -// still see those entries. -var legacyModelPrefixes = []string{ - // OpenAI legacy - "gpt-3", - "gpt-4", // covers gpt-4, gpt-4o, gpt-4.1, gpt-4-turbo, ... - "gpt-5-", // hides every gpt-5 variant (mini, nano, codex, pro, ...) but keeps the bare "gpt-5", "gpt-5.1", "gpt-5.2", "gpt-5.3" - "o1", - "o3-", - "codex-mini", - // OpenAI non-chat endpoints - "dall-", - "whisper", - "tts-", - "text-embedding", - "text-moderation", - "omni-moderation", - "babbage", - "davinci", - "chatgpt-", - "computer-use-preview", - // Claude legacy (3.x and earlier 4-line latests/dated) - "claude-3", - "claude-2", - "claude-instant", - "claude-sonnet-4-0", - "claude-sonnet-4-2", - "claude-opus-4-0", - "claude-opus-4-1", - // Gemini legacy - "gemini-1", - "gemini-2.0", - // Grok legacy (3-line is two generations behind grok-4) - "grok-3", - "grok-code-fast-1", -} - -func isLegacyModelID(id string) bool { - idLower := strings.ToLower(id) - for _, p := range legacyModelPrefixes { - if strings.HasPrefix(idLower, p) { - return true - } - } - return false -} - type AIModelsOptions struct { Filter string `flag:"filter" help:"Filter models by name substring" short:"f"` - Backend string `flag:"backend" help:"Filter by backend: anthropic|gemini|openai|claude-cli|claude-agent|codex-cli|gemini-cli" short:"b"` + Backend string `flag:"backend" help:"Filter by backend: anthropic|gemini|openai|deepseek|claude-cli|claude-agent|claude-cmux|codex-cli|codex-cmux|gemini-cli" short:"b"` Limit int `flag:"limit" help:"Maximum models to show" default:"50" short:"l"` All bool `flag:"all" help:"Include all OpenRouter models" short:"a"` } @@ -150,7 +96,7 @@ func runLiveModels(opts AIModelsOptions) (any, error) { // Hide legacy/non-chat IDs unless the user asked for them by // name via --filter. Filtering by user intent overrides the // blacklist so "ai models -f gpt-3.5" still works. - if opts.Filter == "" && isLegacyModelID(m.ID) { + if opts.Filter == "" && ai.IsLegacyModelID(m.ID) { continue } diff --git a/pkg/cli/ai_models_test.go b/pkg/cli/ai_models_test.go index 17035f0..ac59c23 100644 --- a/pkg/cli/ai_models_test.go +++ b/pkg/cli/ai_models_test.go @@ -6,6 +6,8 @@ import ( "net/http/httptest" "strings" "testing" + + "github.com/flanksource/captain/pkg/ai" ) type aiModelsRewriteTransport struct { @@ -132,6 +134,7 @@ func TestIsLegacyModelID(t *testing.T) { "gpt-5-pro": true, "o1": true, "o1-pro": true, + "o3": true, "o3-pro": true, "o3-mini": true, "codex-mini-latest": true, @@ -178,12 +181,13 @@ func TestIsLegacyModelID(t *testing.T) { "claude-haiku-4-5": false, "gemini-2.5-flash": false, "gemini-2.5-pro": false, + "gemini-3.0-pro": false, "gemini-3-pro-preview": false, "grok-4": false, "grok-4-fast": false, } for id, want := range cases { - if got := isLegacyModelID(id); got != want { + if got := ai.IsLegacyModelID(id); got != want { t.Errorf("isLegacyModelID(%q) = %v, want %v", id, got, want) } } diff --git a/pkg/cli/ai_prompt_file.go b/pkg/cli/ai_prompt_file.go index 404ce1f..c67e4d9 100644 --- a/pkg/cli/ai_prompt_file.go +++ b/pkg/cli/ai_prompt_file.go @@ -63,6 +63,18 @@ func overlayCLI(base ai.Request, baseCfg ai.Config, o AIPromptOptions) (ai.Reque req := base bm := base.Model + if bm.Name == "" { + bm.Name = baseCfg.Model.Name + } + if bm.Backend == "" { + bm.Backend = baseCfg.Model.Backend + } + if bm.Temperature == nil { + bm.Temperature = baseCfg.Model.Temperature + } + if bm.Effort == "" { + bm.Effort = baseCfg.Model.Effort + } m := bm m.Name = firstNonEmpty(o.Model, bm.Name, saved.Model) m.Backend = api.Backend(firstNonEmpty(o.Backend, string(bm.Backend), saved.Backend)) @@ -71,10 +83,14 @@ func overlayCLI(base ai.Request, baseCfg ai.Config, o AIPromptOptions) (ai.Reque m.Temperature = &t } m.Effort = api.Effort(firstNonEmpty(o.Effort, string(bm.Effort), saved.ReasoningEffort)) - req.Model = m + m.NoCache = o.NoCache || bm.NoCache || saved.NoCache + m.Fallbacks = firstFallbacks(o.Fallback, bm.Fallbacks) + req.Model = m.ExpandCSV() - req.Budget.MaxTokens = firstPositive(o.MaxTokens, base.Budget.MaxTokens, saved.MaxTokens, 4096) - req.Budget.Cost = firstPositiveFloat(budget, base.Budget.Cost, saved.BudgetUSD) + req.Budget.MaxTokens = firstPositive(o.MaxTokens, base.Budget.MaxTokens, baseCfg.Budget.MaxTokens, saved.MaxTokens, 4096) + req.Budget.Cost = firstPositiveFloat(budget, base.Budget.Cost, baseCfg.Budget.Cost, saved.BudgetUSD) + req.Budget.MaxTurns = firstPositive(o.MaxTurns, base.Budget.MaxTurns) + req.Budget.Timeout = firstNonEmpty(o.Timeout, base.Budget.Timeout) if o.System != "" { req.Prompt.System = o.System @@ -110,23 +126,20 @@ func overlayCLI(base ai.Request, baseCfg ai.Config, o AIPromptOptions) (ai.Reque if o.Resume != "" { req.SessionID = o.Resume } - if o.MaxTurns > 0 { - req.MaxTurns = o.MaxTurns - } // Config mirrors the resolved model + budget; runtime-only knobs from CLI+saved. cfg := baseCfg cfg.Model = req.Model cfg.Budget = req.Budget cfg.APIKey = o.APIKey - cfg.NoCache = o.NoCache || saved.NoCache + cfg.NoCache = req.NoCache return req, cfg, nil } // normalizePromptContextDir makes the prompt command's workspace explicit before // providers see the request. Empty means the invocation cwd; relative values are // interpreted from that same cwd so SDK child-process directories cannot change -// the meaning of context.dir: . +// the meaning of setup.cwd: . func normalizePromptContextDir(req *ai.Request, cwd string) error { if cwd == "" { return fmt.Errorf("working directory is required") @@ -138,18 +151,41 @@ func normalizePromptContextDir(req *ai.Request, cwd string) error { } cwd = abs } - if req.Context.Dir == "" { - req.Context.Dir = filepath.Clean(cwd) + if req.Cwd() == "" { + req.SetCwd(filepath.Clean(cwd)) return nil } - if filepath.IsAbs(req.Context.Dir) { - req.Context.Dir = filepath.Clean(req.Context.Dir) + if filepath.IsAbs(req.Cwd()) { + req.SetCwd(filepath.Clean(req.Cwd())) return nil } - req.Context.Dir = filepath.Clean(filepath.Join(cwd, req.Context.Dir)) + req.SetCwd(filepath.Clean(filepath.Join(cwd, req.Cwd()))) return nil } +// fallbackModelsFromFlags turns repeated (and optionally comma-separated) --fallback +// values into name-only fallback Models, in the order given. +func fallbackModelsFromFlags(flags []string) []api.Model { + var out []api.Model + for _, flag := range flags { + for _, name := range strings.Split(flag, ",") { + if name = strings.TrimSpace(name); name != "" { + out = append(out, api.Model{Name: name}) + } + } + } + return out +} + +// firstFallbacks implements the CLI-over-frontmatter precedence for the fallback +// list: the --fallback flags win when present, otherwise the frontmatter list stands. +func firstFallbacks(flags []string, frontmatter []api.Model) []api.Model { + if models := fallbackModelsFromFlags(flags); len(models) > 0 { + return models + } + return frontmatter +} + // firstNonEmpty returns the first non-empty string, or "" when all are empty. func firstNonEmpty(vals ...string) string { for _, v := range vals { diff --git a/pkg/cli/ai_prompt_file_test.go b/pkg/cli/ai_prompt_file_test.go index 9254d6e..d88b76c 100644 --- a/pkg/cli/ai_prompt_file_test.go +++ b/pkg/cli/ai_prompt_file_test.go @@ -8,6 +8,7 @@ import ( "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/commons-db/shell" ) func TestParseVars(t *testing.T) { @@ -204,6 +205,71 @@ func TestOverlayCLI_BooleansOR(t *testing.T) { } } +func fallbackNames(models []api.Model) []string { + if len(models) == 0 { + return nil + } + out := make([]string, len(models)) + for i, m := range models { + out[i] = m.Name + } + return out +} + +func TestOverlayCLI_ModelCSVExpandsToFallbacks(t *testing.T) { + isolateSavedAI(t) + opts := AIPromptOptions{} + opts.Model = "claude-primary-5,gpt-4o,gemini-2.0-flash" + + req, cfg, err := overlayCLI(baseFileReq(), ai.Config{}, opts) + if err != nil { + t.Fatal(err) + } + if req.Model.Name != "claude-primary-5" { + t.Errorf("Model.Name = %q, want CSV head claude-primary-5", req.Model.Name) + } + if got := fallbackNames(req.Model.Fallbacks); !reflect.DeepEqual(got, []string{"gpt-4o", "gemini-2.0-flash"}) { + t.Errorf("req fallbacks = %v, want [gpt-4o gemini-2.0-flash]", got) + } + if got := fallbackNames(cfg.Model.Fallbacks); !reflect.DeepEqual(got, []string{"gpt-4o", "gemini-2.0-flash"}) { + t.Errorf("cfg fallbacks = %v, want mirrored into config", got) + } +} + +func TestOverlayCLI_FallbackFlagOverridesFrontmatter(t *testing.T) { + isolateSavedAI(t) + base := baseFileReq() + base.Model.Fallbacks = []api.Model{{Name: "frontmatter-fallback"}} + opts := AIPromptOptions{} + opts.Fallback = []string{"cli-fallback-a", "cli-fallback-b,cli-fallback-c"} // repeatable + comma-split + + req, _, err := overlayCLI(base, ai.Config{}, opts) + if err != nil { + t.Fatal(err) + } + want := []string{"cli-fallback-a", "cli-fallback-b", "cli-fallback-c"} + if got := fallbackNames(req.Model.Fallbacks); !reflect.DeepEqual(got, want) { + t.Errorf("fallbacks = %v, want CLI flags %v (override frontmatter)", got, want) + } +} + +func TestOverlayCLI_FrontmatterFallbacksStandWithoutFlag(t *testing.T) { + isolateSavedAI(t) + base := baseFileReq() + base.Model.Fallbacks = []api.Model{{Name: "gpt-4o", Effort: api.EffortHigh}} + + req, _, err := overlayCLI(base, ai.Config{}, AIPromptOptions{}) + if err != nil { + t.Fatal(err) + } + if got := fallbackNames(req.Model.Fallbacks); !reflect.DeepEqual(got, []string{"gpt-4o"}) { + t.Errorf("fallbacks = %v, want frontmatter [gpt-4o] when no --fallback", got) + } + if req.Model.Fallbacks[0].Effort != api.EffortHigh { + t.Errorf("frontmatter fallback effort = %q, want preserved high", req.Model.Fallbacks[0].Effort) + } +} + func TestNormalizePromptContextDir(t *testing.T) { cwd := filepath.Join(t.TempDir(), "repo") if err := os.MkdirAll(cwd, 0o755); err != nil { @@ -223,12 +289,12 @@ func TestNormalizePromptContextDir(t *testing.T) { } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - req := ai.Request{Context: api.Context{Dir: tc.dir}} + req := ai.Request{Setup: &shell.Setup{Cwd: tc.dir}} if err := normalizePromptContextDir(&req, cwd); err != nil { t.Fatalf("normalizePromptContextDir: %v", err) } - if req.Context.Dir != tc.want { - t.Errorf("Context.Dir = %q, want %q", req.Context.Dir, tc.want) + if req.Cwd() != tc.want { + t.Errorf("Setup.Cwd = %q, want %q", req.Cwd(), tc.want) } }) } diff --git a/pkg/cli/ai_test.go b/pkg/cli/ai_test.go index 1f5fcec..9164d23 100644 --- a/pkg/cli/ai_test.go +++ b/pkg/cli/ai_test.go @@ -12,6 +12,7 @@ import ( "github.com/flanksource/captain/pkg/ai" "github.com/flanksource/captain/pkg/api" "github.com/flanksource/captain/pkg/captainconfig" + "github.com/flanksource/commons-db/shell" ) type promptResultProvider struct{} @@ -177,8 +178,8 @@ func TestAIPromptOptions_ToRequest_PassesScalars(t *testing.T) { if req.Effort != api.EffortHigh { t.Errorf("ReasoningEffort = %q", req.Effort) } - if req.MaxTurns != 7 { - t.Errorf("MaxTurns = %d", req.MaxTurns) + if req.Budget.MaxTurns != 7 { + t.Errorf("MaxTurns = %d", req.Budget.MaxTurns) } if req.SessionID != "sess-123" { t.Errorf("SessionID = %q (from --resume)", req.SessionID) @@ -315,10 +316,10 @@ func TestBackendHelpEnumeratesAllBackends(t *testing.T) { func TestRunBuffered_JSONIncludesFullInputSpec(t *testing.T) { req := ai.Request{ - Model: api.Model{Name: "claude-sonnet-4-6", Backend: api.BackendAnthropic, Effort: api.EffortMedium}, - Prompt: api.Prompt{System: "be precise", User: "summarize"}, - Budget: api.Budget{MaxTokens: 2048}, - Context: api.Context{Dir: "/repo"}, + Model: api.Model{Name: "claude-sonnet-4-6", Backend: api.BackendAnthropic, Effort: api.EffortMedium}, + Prompt: api.Prompt{System: "be precise", User: "summarize"}, + Budget: api.Budget{MaxTokens: 2048}, + Setup: &shell.Setup{Cwd: "/repo"}, Permissions: api.Permissions{ Presets: []api.Preset{api.PresetEdit}, Tools: api.Tools{Allow: []string{"Read"}}, @@ -363,9 +364,9 @@ func TestRunBuffered_JSONIncludesFullInputSpec(t *testing.T) { if input["model"] != "claude-sonnet-4-6" || input["backend"] != "anthropic" || input["effort"] != "medium" { t.Fatalf("json input model fields = %#v", input) } - context, ok := input["context"].(map[string]any) - if !ok || context["dir"] != "/repo" { - t.Fatalf("json input.context = %#v, want dir /repo", input["context"]) + setup, ok := input["setup"].(map[string]any) + if !ok || setup["cwd"] != "/repo" { + t.Fatalf("json input.setup = %#v, want cwd /repo", input["setup"]) } if input["sessionId"] != "resume-1" || encoded["sessionId"] != "resume-1" || encoded["dir"] != "/repo" { t.Fatalf("json session/dir fields = top %#v input %#v", encoded, input) @@ -379,7 +380,7 @@ func TestRunStreaming_JSONIncludesFullInputSpec(t *testing.T) { req := ai.Request{ Model: api.Model{Name: "gpt-5-codex", Backend: api.BackendCodexCLI, Effort: api.EffortHigh}, Prompt: api.Prompt{User: "fix tests"}, - Context: api.Context{Dir: "/repo"}, + Setup: &shell.Setup{Cwd: "/repo"}, Permissions: api.Permissions{MCP: api.MCP{Disabled: true}}, } diff --git a/pkg/cli/configure.go b/pkg/cli/configure.go index bec23d1..087a1b0 100644 --- a/pkg/cli/configure.go +++ b/pkg/cli/configure.go @@ -206,9 +206,12 @@ func backendOptions() []huh.Option[string] { huh.NewOption("Anthropic API", string(ai.BackendAnthropic)), huh.NewOption("Google Gemini API", string(ai.BackendGemini)), huh.NewOption("OpenAI API", string(ai.BackendOpenAI)), + huh.NewOption("DeepSeek API", string(ai.BackendDeepSeek)), huh.NewOption("Claude CLI", string(ai.BackendClaudeCLI)), huh.NewOption("Claude Agent (SDK)", string(ai.BackendClaudeAgent)), + huh.NewOption("Claude cmux", string(ai.BackendClaudeCmux)), huh.NewOption("Codex CLI", string(ai.BackendCodexCLI)), + huh.NewOption("Codex cmux", string(ai.BackendCodexCmux)), huh.NewOption("Gemini CLI", string(ai.BackendGeminiCLI)), } } @@ -240,7 +243,7 @@ func modelOptionsFor(b ai.Backend) []huh.Option[string] { // live list. filtered := make([]ai.ModelDef, 0, len(models)) for _, m := range models { - if isLegacyModelID(m.ID) { + if ai.IsLegacyModelID(m.ID) { continue } filtered = append(filtered, m) @@ -269,11 +272,13 @@ func modelHuhOptions(models []ai.ModelDef) []huh.Option[string] { func defaultModelFor(b ai.Backend) string { switch b { case ai.BackendAnthropic: - return "claude-sonnet-4-5" + return "claude-sonnet-5" case ai.BackendClaudeCLI, ai.BackendClaudeAgent: return "claude-agent-sonnet" case ai.BackendOpenAI: return "gpt-5.5" + case ai.BackendDeepSeek: + return "deepseek-reasoner" case ai.BackendCodexCLI: return "gpt-5-codex" case ai.BackendGemini, ai.BackendGeminiCLI: diff --git a/pkg/cli/configure_test.go b/pkg/cli/configure_test.go index 7b42df1..2545e53 100644 --- a/pkg/cli/configure_test.go +++ b/pkg/cli/configure_test.go @@ -38,7 +38,7 @@ func TestBuildConfigFromForm_TogglesInvert(t *testing.T) { NoMemory: true, }, } - if got != want { + if !reflect.DeepEqual(got, want) { t.Errorf("buildConfigFromForm()\n got = %+v\n want = %+v", got, want) } } @@ -107,8 +107,9 @@ func TestModelOptionsFor_NoKeyShowsErrorRow(t *testing.T) { t.Setenv("OPENAI_API_KEY", "") t.Setenv("ANTHROPIC_API_KEY", "") t.Setenv("GEMINI_API_KEY", "") + t.Setenv("DEEPSEEK_API_KEY", "") - for _, b := range []ai.Backend{ai.BackendAnthropic, ai.BackendOpenAI, ai.BackendGemini} { + for _, b := range []ai.Backend{ai.BackendAnthropic, ai.BackendOpenAI, ai.BackendGemini, ai.BackendDeepSeek} { opts := modelOptionsFor(b) if len(opts) != 1 { t.Errorf("backend=%s: expected 1 sentinel row, got %d (%+v)", b, len(opts), opts) @@ -142,7 +143,7 @@ func TestModelOptionsFor_CLIBackendsUseCatalogWithoutKey(t *testing.T) { func TestDefaultModelFor_HardcodedPerBackend(t *testing.T) { cases := map[ai.Backend]string{ - ai.BackendAnthropic: "claude-sonnet-4-5", + ai.BackendAnthropic: "claude-sonnet-5", ai.BackendClaudeCLI: "claude-agent-sonnet", ai.BackendClaudeAgent: "claude-agent-sonnet", ai.BackendOpenAI: "gpt-5.5", diff --git a/pkg/cli/cost.go b/pkg/cli/cost.go index 85908cb..7dea21c 100644 --- a/pkg/cli/cost.go +++ b/pkg/cli/cost.go @@ -8,6 +8,7 @@ import ( "time" "github.com/flanksource/captain/pkg/claude" + "github.com/flanksource/captain/pkg/session" ) type CostOptions struct { @@ -96,19 +97,19 @@ func RunCost(opts CostOptions) (any, error) { Project: s.Project, Model: s.Model, Tier: s.Tier, - Input: formatTokens(s.Tokens.InputTokens), - Output: formatTokens(s.Tokens.OutputTokens), - CacheRead: formatTokens(s.Tokens.CacheReadTokens), - CacheWrite: formatTokens(s.Tokens.CacheWriteTokens), + Input: session.FormatTokens(s.Tokens.InputTokens), + Output: session.FormatTokens(s.Tokens.OutputTokens), + CacheRead: session.FormatTokens(s.Tokens.CacheReadTokens), + CacheWrite: session.FormatTokens(s.Tokens.CacheWriteTokens), Msgs: s.Messages, - APICost: formatCost(s.Tokens.TotalCost), + APICost: session.FormatCost(s.Tokens.TotalCost), Time: claude.FormatTimeAgo(&s.End), }) } return CostResult{ - TotalAPICost: formatCost(total.TotalCost), - TotalTokens: formatTokens(total.TotalTokens()), + TotalAPICost: session.FormatCost(total.TotalCost), + TotalTokens: session.FormatTokens(total.TotalTokens()), Rows: rows, }, nil } @@ -156,8 +157,8 @@ func aggregateToolCosts(sessions []claude.SessionCost) ToolCostResult { rows = append(rows, ToolCostRow{ Tool: m.Tool, Calls: m.CallCount, - Input: formatTokens(m.InputTokens), - Output: formatTokens(m.OutputTokens), + Input: session.FormatTokens(m.InputTokens), + Output: session.FormatTokens(m.OutputTokens), Errors: m.ErrorCount, }) } @@ -167,7 +168,7 @@ func aggregateToolCosts(sessions []claude.SessionCost) ToolCostResult { }) return ToolCostResult{ - TotalTokens: formatTokens(total), + TotalTokens: session.FormatTokens(total), Rows: rows, } } @@ -193,7 +194,7 @@ func aggregateCategoryCosts(sessions []claude.SessionCost) CategoryCostResult { } rows = append(rows, CategoryCostRow{ Category: string(cat), - Tokens: formatTokens(tokens), + Tokens: session.FormatTokens(tokens), Percent: fmt.Sprintf("%.1f%%", pct), }) } @@ -203,7 +204,7 @@ func aggregateCategoryCosts(sessions []claude.SessionCost) CategoryCostResult { }) return CategoryCostResult{ - TotalTokens: formatTokens(grand), + TotalTokens: session.FormatTokens(grand), Rows: rows, } } @@ -338,21 +339,3 @@ func mergeInto(g *claude.SessionCost, s claude.SessionCost) { g.Tier = s.Tier } } - -func formatTokens(n int) string { - switch { - case n >= 1_000_000: - return fmt.Sprintf("%.1fM", float64(n)/1e6) - case n >= 1_000: - return fmt.Sprintf("%.1fK", float64(n)/1e3) - default: - return fmt.Sprintf("%d", n) - } -} - -func formatCost(cost float64) string { - if cost < 0.01 { - return fmt.Sprintf("$%.4f", cost) - } - return fmt.Sprintf("$%.2f", cost) -} diff --git a/pkg/cli/history.go b/pkg/cli/history.go index af80148..90d0ae2 100644 --- a/pkg/cli/history.go +++ b/pkg/cli/history.go @@ -14,6 +14,7 @@ import ( "github.com/flanksource/captain/pkg/claude" "github.com/flanksource/captain/pkg/claude/tools" captainCollections "github.com/flanksource/captain/pkg/collections" + "github.com/flanksource/captain/pkg/session" "github.com/flanksource/clicky/api" "github.com/flanksource/commons/collections" ) @@ -38,22 +39,24 @@ type HistoryOptions struct { Summary bool `flag:"summary" help:"Show aggregate summary instead of individual tool uses"` Cost bool `flag:"cost" help:"Include per-row token breakdown and dollar cost in row detail"` Raw bool `flag:"raw" help:"Include the raw Claude session JSONL line in row detail"` - Debug bool `flag:"debug" help:"Include original Claude history struct in results"` Agents bool `flag:"agents" help:"Include tool calls from nested sub-agents (Task/Agent); --agents=false for the main thread only" default:"true"` Plans bool `flag:"plans" help:"Include writes to plan files (~/.claude/plans); --plans=true to show them"` Ignored bool `flag:"ignored" help:"Include writes to gitignored / out-of-repo files; --ignored=true to show them"` } func RunHistory(opts HistoryOptions) (any, error) { + // Surface stream types the parser can't handle on every path — not just the + // piped/--file path — so unknown Claude Code line types are never silently + // dropped when scanning on-disk sessions. + claude.ResetUnhandledStreamTypes() + defer reportUnhandledStreamTypes() + if opts.File == "-" || opts.File == "/dev/stdin" || (opts.File == "" && claude.IsStdinPiped()) { data, err := io.ReadAll(os.Stdin) if err != nil { return nil, err } - claude.ResetUnhandledStreamTypes() - out, err := runHistoryFromReader(data, opts) - reportUnhandledStreamTypes() - return out, err + return runHistoryFromReader(data, opts) } if opts.File != "" { @@ -61,10 +64,7 @@ func RunHistory(opts HistoryOptions) (any, error) { if err != nil { return nil, err } - claude.ResetUnhandledStreamTypes() - out, err := runHistoryFromReader(data, opts) - reportUnhandledStreamTypes() - return out, err + return runHistoryFromReader(data, opts) } var sessionIDs []string @@ -86,6 +86,8 @@ func RunHistory(opts HistoryOptions) (any, error) { Since: &opts.Since, SessionID: firstSessionID(sessionIDs), SessionIDs: sessionIDs, + KeepRaw: opts.Raw, + IncludeCosts: useStructuredOutput() && !opts.Summary, IncludeAgents: opts.Agents, } @@ -95,8 +97,9 @@ func RunHistory(opts HistoryOptions) (any, error) { showClaude := opts.Claude || (!opts.Claude && !opts.Codex) showCodex := opts.Codex || (!opts.Claude && !opts.Codex) + showClaude, showCodex = narrowHistorySources(cwd, opts.All, showClaude, showCodex, filter) - allToolUses, err := gatherToolUses(cwd, opts.All, showClaude, showCodex, filter) + allToolUses, parsedCosts, err := gatherHistory(cwd, opts.All, showClaude, showCodex, filter) if err != nil { return nil, err } @@ -115,18 +118,24 @@ func RunHistory(opts HistoryOptions) (any, error) { } if showClaude { - costs, _ = claude.ParseCostsWithFilter(cwd, opts.All, &opts.Since, filter) - costs = filterCostsBySessionID(costs, sessionIDs) + costs = filterCostsBySessionID(parsedCosts, sessionIDs) } var tl []tools.Tool - switch { - case opts.Cost && showClaude && !showCodex: - tl, err = claude.ParseHistoryTools(cwd, opts.All, filter) + if opts.Cost && showClaude { + // Per-row cost needs the token-linked tool build. Use it for the Claude + // portion regardless of whether Codex history is also in scope (Codex + // rows carry no per-row cost), then re-sort the merged list by time. + claudeTools, err := claude.ParseHistoryTools(cwd, opts.All, filter) if err != nil { return nil, err } - default: + tl = claudeTools + if showCodex { + tl = append(tl, claude.ToolUsesToTools(codexToolUses(allToolUses))...) + sortToolsByTime(tl) + } + } else { tl = claude.ToolUsesToTools(allToolUses) } @@ -176,12 +185,18 @@ func lastSessionTools(tl []tools.Tool) []tools.Tool { // tags each with its source, and applies the filter (including any session ID) // to both. It is the shared front-end for the history and changes commands. func gatherToolUses(cwd string, searchAll, showClaude, showCodex bool, filter claude.Filter) ([]claude.ToolUse, error) { + uses, _, err := gatherHistory(cwd, searchAll, showClaude, showCodex, filter) + return uses, err +} + +func gatherHistory(cwd string, searchAll, showClaude, showCodex bool, filter claude.Filter) ([]claude.ToolUse, []claude.SessionCost, error) { var allToolUses []claude.ToolUse + var costs []claude.SessionCost if showClaude { parseResult, err := claude.ParseHistory(cwd, searchAll, filter) if err != nil { - return nil, err + return nil, nil, err } for i := range parseResult.ToolUses { if parseResult.ToolUses[i].Source == "" { @@ -189,6 +204,7 @@ func gatherToolUses(cwd string, searchAll, showClaude, showCodex bool, filter cl } } allToolUses = append(allToolUses, parseResult.ToolUses...) + costs = append(costs, parseResult.Costs...) } if showCodex { @@ -200,7 +216,7 @@ func gatherToolUses(cwd string, searchAll, showClaude, showCodex bool, filter cl } } - return allToolUses, nil + return allToolUses, costs, nil } // collectCodexHistory loads codex sessions and returns their tool uses @@ -219,19 +235,9 @@ func collectCodexHistory(cwd string, searchAll bool, filter claude.Filter) ([]hi var out []history.ToolUse for _, f := range files { - info, infoErr := history.ReadCodexSessionMeta(f) - if infoErr == nil && info != nil { - if info.ID != "" && !filter.MatchesSessionID(info.ID) { - continue - } - if !searchAll && info.CWD != "" && !codexCWDMatchesProject(info.CWD, matchRoot) { - continue - } - // When a session-id filter is set but the metadata has no id yet, fall - // through to full parsing: older/live schemas may only expose the session - // id on later events. + if !codexHistoryCandidateMatches(f, searchAll, matchRoot, filter) { + continue } - uses, err := history.ExtractCodexToolUses(f) if err != nil || len(uses) == 0 { continue @@ -247,6 +253,144 @@ func collectCodexHistory(cwd string, searchAll bool, filter claude.Filter) ([]hi return out, nil } +func narrowHistorySources(cwd string, searchAll, showClaude, showCodex bool, filter claude.Filter) (bool, bool) { + if !showClaude || !showCodex || !filter.HasSessionIDFilter() { + return showClaude, showCodex + } + + claudeMatch := claudeHistoryHasSession(cwd, searchAll, filter) + if claudeMatch && hasSingleCanonicalSessionFilter(filter) { + return true, false + } + codexMatch := codexHistoryHasSession(cwd, searchAll, filter) + + switch { + case claudeMatch && !codexMatch: + return true, false + case codexMatch && !claudeMatch: + return false, true + default: + return showClaude, showCodex + } +} + +func hasSingleCanonicalSessionFilter(filter claude.Filter) bool { + var ids []string + seen := map[string]bool{} + add := func(id string) { + id = strings.TrimSpace(id) + if id == "" { + return + } + key := strings.ToLower(id) + if seen[key] { + return + } + seen[key] = true + ids = append(ids, id) + } + if strings.TrimSpace(filter.SessionID) != "" { + add(filter.SessionID) + } + for _, id := range filter.SessionIDs { + add(id) + } + if len(ids) != 1 { + return false + } + return canonicalUUIDArgRE.MatchString(ids[0]) +} + +func claudeHistoryHasSession(cwd string, searchAll bool, filter claude.Filter) bool { + projectsDir := claude.GetProjectsDir() + files, err := claude.FindSessionFiles(projectsDir, cwd, searchAll) + if err != nil { + return false + } + if filter.IncludeAgents { + if agentFiles, err := claude.FindAgentTranscripts(projectsDir, cwd, searchAll); err == nil { + files = append(files, agentFiles...) + } + } + for _, f := range files { + if filter.MatchesSessionID(claudeSessionIDFromPath(f)) { + return true + } + } + return false +} + +func claudeSessionIDFromPath(path string) string { + parts := strings.Split(filepath.ToSlash(path), "/") + for i, part := range parts { + if part == "subagents" && i > 0 { + return parts[i-1] + } + } + base := filepath.Base(path) + return strings.TrimSuffix(base, filepath.Ext(base)) +} + +func codexHistoryHasSession(cwd string, searchAll bool, filter claude.Filter) bool { + files, err := history.FindCodexSessionFiles() + if err != nil { + return false + } + projectInfo := claude.FindProjectInfo(cwd) + matchRoot := projectInfo.Root + if matchRoot == "" { + matchRoot = cwd + } + for _, f := range files { + if codexHistoryCandidateMatches(f, searchAll, matchRoot, filter) { + return true + } + } + return false +} + +func codexHistoryCandidateMatches(file string, searchAll bool, matchRoot string, filter claude.Filter) bool { + info, infoErr := history.ReadCodexSessionMeta(file) + if infoErr == nil && info != nil { + if info.ID != "" && !filter.MatchesSessionID(info.ID) { + return false + } + if filter.HasSessionIDFilter() && info.ID == "" && !codexFileNameMatchesSessionFilter(file, filter) { + return false + } + if !searchAll && info.CWD != "" && !codexCWDMatchesProject(info.CWD, matchRoot) { + return false + } + return true + } + if filter.HasSessionIDFilter() && !codexFileNameMatchesSessionFilter(file, filter) { + return false + } + return true +} + +func codexFileNameMatchesSessionFilter(file string, filter claude.Filter) bool { + name := strings.ToLower(filepath.Base(file)) + var filters []string + if strings.TrimSpace(filter.SessionID) != "" { + filters = append(filters, strings.ToLower(strings.TrimSpace(filter.SessionID))) + } + for _, id := range filter.SessionIDs { + if strings.TrimSpace(id) != "" { + filters = append(filters, strings.ToLower(strings.TrimSpace(id))) + } + } + if len(filters) == 0 { + return true + } + for _, id := range filters { + if strings.Contains(name, id) { + return true + } + } + return false +} + func codexUsesMatchSession(uses []history.ToolUse, filter claude.Filter) bool { if !filter.HasSessionIDFilter() { return true @@ -273,6 +417,32 @@ func sortToolUsesByTime(uses []claude.ToolUse) { }) } +// codexToolUses returns the Codex-sourced subset of a mixed tool-use slice. +func codexToolUses(uses []claude.ToolUse) []claude.ToolUse { + var out []claude.ToolUse + for _, tu := range uses { + if tu.Source == "codex" { + out = append(out, tu) + } + } + return out +} + +// sortToolsByTime orders tools oldest-first; tools without a timestamp sort last. +func sortToolsByTime(tl []tools.Tool) { + sort.SliceStable(tl, func(i, j int) bool { + ti := tl[i].Base().Timestamp + tj := tl[j].Base().Timestamp + if ti == nil { + return false + } + if tj == nil { + return true + } + return ti.Before(*tj) + }) +} + func runHistoryAll(tl []tools.Tool, opts HistoryOptions, classifier *bash.CategoryClassifier, costs []claude.SessionCost) (any, error) { filtered := filterTools(tl, opts, classifier) @@ -281,8 +451,8 @@ func runHistoryAll(tl []tools.Tool, opts HistoryOptions, classifier *bash.Catego return nil, nil } - result := HistoryResultAll{ - Results: make([]ScanResultRow, 0, len(filtered)), + result := session.HistoryResultAll{ + Results: make([]session.ScanResultRow, 0, len(filtered)), } for _, t := range filtered { @@ -300,12 +470,12 @@ func runHistoryAll(tl []tools.Tool, opts HistoryOptions, classifier *bash.Catego } analysis := AnalyzeToolUse(t) - row := ScanResultRow{ + row := session.ScanResultRow{ Project: projectName, Tool: t.Name(), Summary: firstLine(t.Pretty().String()), Subject: t.Pretty(), - Detail: buildRowDetail(t, opts), + Detail: session.BuildRowDetail(t, session.RowOptions{Cost: opts.Cost, Raw: opts.Raw}), Paths: FormatPathsWithIcons(analysis.ReadPaths, analysis.WritePaths), ReadPaths: analysis.ReadPaths, WritePaths: analysis.WritePaths, @@ -314,7 +484,7 @@ func runHistoryAll(tl []tools.Tool, opts HistoryOptions, classifier *bash.Catego Approved: approved, Agent: toolAgentLabel(base), Time: base.PrettyTimestamp(), - Cost: rowCost(base, opts), + Cost: session.RowCost(base, session.RowOptions{Cost: opts.Cost, Raw: opts.Raw}), } if opts.Raw { row.Raw = base.RawEntry @@ -340,8 +510,8 @@ func runHistorySingle(tl []tools.Tool, opts HistoryOptions, classifier *bash.Cat return nil, nil } - result := HistoryResult{ - Results: make([]ScanResultRowSingle, 0, len(filtered)), + result := session.HistoryResult{ + Results: make([]session.ScanResultRowSingle, 0, len(filtered)), } for _, t := range filtered { @@ -358,11 +528,11 @@ func runHistorySingle(tl []tools.Tool, opts HistoryOptions, classifier *bash.Cat } analysis := AnalyzeToolUse(t) - row := ScanResultRowSingle{ + row := session.ScanResultRowSingle{ Tool: t.Name(), Summary: firstLine(t.Pretty().String()), Subject: t.Pretty(), - Detail: buildRowDetail(t, opts), + Detail: session.BuildRowDetail(t, session.RowOptions{Cost: opts.Cost, Raw: opts.Raw}), Paths: FormatPathsWithIcons(analysis.ReadPaths, analysis.WritePaths), ReadPaths: analysis.ReadPaths, WritePaths: analysis.WritePaths, @@ -371,7 +541,7 @@ func runHistorySingle(tl []tools.Tool, opts HistoryOptions, classifier *bash.Cat Approved: approved, Agent: toolAgentLabel(base), Time: base.PrettyTimestamp(), - Cost: rowCost(base, opts), + Cost: session.RowCost(base, session.RowOptions{Cost: opts.Cost, Raw: opts.Raw}), } if opts.Raw { row.Raw = base.RawEntry @@ -597,7 +767,7 @@ func matchApprovedFilter(filter string, denied bool) bool { } } -func applyCostSummaryAll(result *HistoryResultAll, costs []claude.SessionCost) { +func applyCostSummaryAll(result *session.HistoryResultAll, costs []claude.SessionCost) { var totals claude.TokenSummary var minStart, maxEnd time.Time @@ -616,17 +786,17 @@ func applyCostSummaryAll(result *HistoryResultAll, costs []claude.SessionCost) { } result.Tokens = totals.TotalTokens() - result.InputTokens = formatTokens(totals.InputTokens) - result.OutputTokens = formatTokens(totals.OutputTokens) - result.CacheRead = formatTokens(totals.CacheReadTokens) - result.CacheWrite = formatTokens(totals.CacheWriteTokens) - result.Cost = formatCost(totals.TotalCost) + result.InputTokens = session.FormatTokens(totals.InputTokens) + result.OutputTokens = session.FormatTokens(totals.OutputTokens) + result.CacheRead = session.FormatTokens(totals.CacheReadTokens) + result.CacheWrite = session.FormatTokens(totals.CacheWriteTokens) + result.Cost = session.FormatCost(totals.TotalCost) if !minStart.IsZero() && !maxEnd.IsZero() { result.Duration = formatDuration(maxEnd.Sub(minStart)) } } -func applyCostSummarySingle(result *HistoryResult, costs []claude.SessionCost) { +func applyCostSummarySingle(result *session.HistoryResult, costs []claude.SessionCost) { var totals claude.TokenSummary var minStart, maxEnd time.Time @@ -645,11 +815,11 @@ func applyCostSummarySingle(result *HistoryResult, costs []claude.SessionCost) { } result.Tokens = totals.TotalTokens() - result.InputTokens = formatTokens(totals.InputTokens) - result.OutputTokens = formatTokens(totals.OutputTokens) - result.CacheRead = formatTokens(totals.CacheReadTokens) - result.CacheWrite = formatTokens(totals.CacheWriteTokens) - result.Cost = formatCost(totals.TotalCost) + result.InputTokens = session.FormatTokens(totals.InputTokens) + result.OutputTokens = session.FormatTokens(totals.OutputTokens) + result.CacheRead = session.FormatTokens(totals.CacheReadTokens) + result.CacheWrite = session.FormatTokens(totals.CacheWriteTokens) + result.Cost = session.FormatCost(totals.TotalCost) if !minStart.IsZero() && !maxEnd.IsZero() { result.Duration = formatDuration(maxEnd.Sub(minStart)) } @@ -749,7 +919,9 @@ func reportUnhandledStreamTypes() { for i, k := range keys { parts[i] = fmt.Sprintf("%s=%d", k, snap[k]) } - fmt.Fprintf(os.Stderr, "unhandled stream types: %s\n", strings.Join(parts, ", ")) + // Warn (not raw stderr) so the diagnostic is suppressible via log level while + // still visible by default — un-parseable line types must not vanish silently. + log.Warnf("unhandled stream types: %s", strings.Join(parts, ", ")) } func formatDuration(d time.Duration) string { diff --git a/pkg/cli/history_cost_test.go b/pkg/cli/history_cost_test.go new file mode 100644 index 0000000..88f4ade --- /dev/null +++ b/pkg/cli/history_cost_test.go @@ -0,0 +1,72 @@ +package cli + +import ( + "os" + "path/filepath" + "testing" + "time" + + "github.com/flanksource/captain/pkg/claude" + "github.com/flanksource/captain/pkg/session" +) + +// TestRunHistory_CostWithoutClaudeFlag is the F5 regression: `history --cost` +// with the default (both-source) scope must still compute per-row cost. The old +// code only took the token-linked path when Codex was explicitly out of scope +// (`showClaude && !showCodex`), so a bare `--cost` left the Cost column blank. +func TestRunHistory_CostWithoutClaudeFlag(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + project := filepath.Join(home, "work", "project") + if err := os.MkdirAll(project, 0o755); err != nil { + t.Fatal(err) + } + t.Chdir(project) + + sessionFile := filepath.Join(home, ".claude", "projects", claude.NormalizePath(project), "sess-cost.jsonl") + writeJSONL(t, sessionFile, map[string]any{ + "type": "assistant", + "sessionId": "sess-cost", + "uuid": "a1", + "timestamp": "2026-06-01T10:00:01Z", + "cwd": project, + "message": map[string]any{ + "role": "assistant", + "model": "claude-opus-4", + "usage": map[string]any{"input_tokens": 1000, "output_tokens": 500}, + "content": []any{map[string]any{ + "type": "tool_use", + "id": "tu-1", + "name": "Read", + "input": map[string]any{"file_path": "README.md"}, + }}, + }, + }) + + // Cost:true, no Claude/Codex filter → both sources in scope (reproduces F5). + out, err := RunHistory(HistoryOptions{ + Cost: true, + Since: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), + Limit: 100, + Agents: true, + }) + if err != nil { + t.Fatalf("RunHistory: %v", err) + } + result, ok := out.(session.HistoryResult) + if !ok { + t.Fatalf("RunHistory returned %T, want HistoryResult", out) + } + if len(result.Results) == 0 { + t.Fatal("no history rows returned") + } + var withCost int + for _, row := range result.Results { + if row.Cost != "" { + withCost++ + } + } + if withCost == 0 { + t.Errorf("no row carried a cost with --cost and default (both-source) scope; F5 regression") + } +} diff --git a/pkg/cli/history_detail.go b/pkg/cli/history_detail.go deleted file mode 100644 index b088066..0000000 --- a/pkg/cli/history_detail.go +++ /dev/null @@ -1,131 +0,0 @@ -package cli - -import ( - "bytes" - "encoding/json" - - "github.com/flanksource/captain/pkg/claude/tools" - "github.com/flanksource/clicky" - "github.com/flanksource/clicky/api" -) - -// buildRowDetail composes the row-detail Textable rendered by the table view. -// The base detail (denial reasons etc.) is rendered first, followed by an -// optional cost breakdown (--cost) and raw JSONL line (--raw). -func buildRowDetail(t tools.Tool, opts HistoryOptions) api.Textable { - base := t.Detail() - if !opts.Cost && !opts.Raw { - return base - } - - out := clicky.Text("") - first := true - addTextable := func(child api.Textable) { - if !first { - out = out.Append("\n") - } - out = out.Add(child) - first = false - } - addText := func(section api.Text) { - addTextable(§ion) - } - - if base != nil { - addTextable(base) - } - if opts.Cost { - if section, ok := costSection(t.Base()); ok { - addText(section) - } - } - if opts.Raw { - if section, ok := rawSection(t.Base()); ok { - addText(section) - } - } - - if first { - return base - } - return &out -} - -// rowCost returns the formatted total cost for a row when --cost is set, -// or the empty string otherwise (so the Cost column hides itself). -func rowCost(b *tools.BaseTool, opts HistoryOptions) string { - if !opts.Cost || b == nil || len(b.Models) == 0 { - return "" - } - cost := b.Models.TotalCost() - if cost == 0 { - return "" - } - return formatCost(cost) -} - -// costSection renders per-model token & cost breakdown using clicky Badges. -func costSection(b *tools.BaseTool) (api.Text, bool) { - if b == nil || len(b.Models) == 0 { - return clicky.Text(""), false - } - - section := clicky.Text("").Append("Cost", "font-bold") - for _, m := range b.Models { - section = section.Append("\n") - section = appendModelBadges(section, m) - } - - if len(b.Models) > 1 { - section = section.Append("\n") - section = section.Append("Total", "font-bold").Append(" ") - section = section. - Add(api.Badge("In:"+formatTokens(b.Models.TotalInput()), "bg-blue-100")). - Add(api.Badge("Out:"+formatTokens(b.Models.TotalOutput()), "bg-purple-100")). - Add(api.Badge("Cache:"+formatTokens(b.Models.TotalCacheRead()), "bg-amber-100")). - Add(api.Badge(formatCost(b.Models.TotalCost()), "bg-green-100")) - } - - return section, true -} - -func appendModelBadges(section api.Text, m tools.ModelUsage) api.Text { - if m.Model != "" { - section = section.Add(api.Badge(m.Model, "bg-gray-200")) - } - if m.ServiceTier != "" { - section = section.Add(api.Badge(m.ServiceTier, "bg-gray-100")) - } - if m.InputTokens > 0 { - section = section.Add(api.Badge("In:"+formatTokens(m.InputTokens), "bg-blue-100")) - } - if m.OutputTokens > 0 { - section = section.Add(api.Badge("Out:"+formatTokens(m.OutputTokens), "bg-purple-100")) - } - if m.CacheReadInputTokens > 0 { - section = section.Add(api.Badge("CacheRead:"+formatTokens(m.CacheReadInputTokens), "bg-amber-100")) - } - if m.CacheCreationInputTokens > 0 { - section = section.Add(api.Badge("CacheWrite:"+formatTokens(m.CacheCreationInputTokens), "bg-amber-200")) - } - if m.Cost > 0 { - section = section.Add(api.Badge(formatCost(m.Cost), "bg-green-100")) - } - return section -} - -func rawSection(b *tools.BaseTool) (api.Text, bool) { - if b == nil || len(b.RawEntry) == 0 { - return clicky.Text(""), false - } - var buf bytes.Buffer - body := string(b.RawEntry) - if err := json.Indent(&buf, b.RawEntry, "", " "); err == nil { - body = buf.String() - } - section := clicky.Text(""). - Append("Raw", "font-bold"). - NewLine(). - Add(clicky.CodeBlock("json", body)) - return section, true -} diff --git a/pkg/cli/main_test.go b/pkg/cli/main_test.go new file mode 100644 index 0000000..df10637 --- /dev/null +++ b/pkg/cli/main_test.go @@ -0,0 +1,17 @@ +package cli + +import ( + "os" + "testing" +) + +// TestMain disables the embedded-postgres session store by default so unit tests +// degrade to uncached summarization instead of booting a postgres server (slow, +// and not permitted in the sandbox). Integration tests that want a real store +// set CAPTAIN_SESSION_DB_URL to a DSN before running. +func TestMain(m *testing.M) { + if _, ok := os.LookupEnv("CAPTAIN_SESSION_DB_URL"); !ok { + _ = os.Setenv("CAPTAIN_SESSION_DB_URL", "off") + } + os.Exit(m.Run()) +} diff --git a/pkg/cli/model_suggest_test.go b/pkg/cli/model_suggest_test.go new file mode 100644 index 0000000..7c7e7f9 --- /dev/null +++ b/pkg/cli/model_suggest_test.go @@ -0,0 +1,36 @@ +package cli + +import "testing" + +// TestClosestModel checks the "did you mean" typo core: a close misspelling of a +// known name suggests it; an exact match or a far-off (plausibly-valid) name does +// not. Candidates are fixed so the test is independent of catalog/registry state. +func TestClosestModel(t *testing.T) { + known := []string{ + "anthropic/claude-sonnet-5", "claude-sonnet-5", + "anthropic/claude-opus-4-8", "claude-opus-4-8", + "openai/gpt-5.5", "gpt-5.5", + } + cases := []struct { + model string + wantOK bool + wantBest string + }{ + {"claud-sonnet-5", true, "claude-sonnet-5"}, // 1 edit — a typo + {"claude-opus-4-9", true, "claude-opus-4-8"}, // 1 edit — a typo + {"claude-sonnet-5", false, ""}, // exact base — known + {"anthropic/claude-sonnet-5", false, ""}, // exact canonical id — known + {"gpt-4o-mini-2024-07-18", false, ""}, // far from every candidate + {"", false, ""}, // empty + } + for _, tc := range cases { + got, ok := closestModel(tc.model, known) + if ok != tc.wantOK { + t.Errorf("closestModel(%q) ok = %v, want %v (got %q)", tc.model, ok, tc.wantOK, got) + continue + } + if tc.wantOK && got != tc.wantBest { + t.Errorf("closestModel(%q) = %q, want %q", tc.model, got, tc.wantBest) + } + } +} diff --git a/pkg/cli/permission_catalog.go b/pkg/cli/permission_catalog.go new file mode 100644 index 0000000..30978be --- /dev/null +++ b/pkg/cli/permission_catalog.go @@ -0,0 +1,221 @@ +package cli + +import ( + "encoding/json" + "net/http" + "os" + "path/filepath" + "sort" + "strings" + + "github.com/flanksource/captain/pkg/api" +) + +func handlePermissionCatalog(baseCwd string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + dir := strings.TrimSpace(r.URL.Query().Get("dir")) + if dir == "" { + dir = strings.TrimSpace(r.URL.Query().Get("cwd")) + } + if dir == "" { + dir = baseCwd + } + if !filepath.IsAbs(dir) { + dir = filepath.Join(baseCwd, dir) + } + w.Header().Set("Content-Type", "application/json") + if err := json.NewEncoder(w).Encode(buildPermissionCatalog(dir)); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + } + } +} + +func buildPermissionCatalog(dir string) api.PermissionCatalog { + home, _ := os.UserHomeDir() + catalog := api.PermissionCatalog{ + Tools: builtinPermissionTools(), + } + + mcp := map[string]api.PermissionCatalogItem{} + addMCPServers(mcp, filepath.Join(dir, ".mcp.json"), "workspace") + if home != "" { + addMCPServers(mcp, filepath.Join(home, ".claude.json"), "claude") + } + catalog.MCP = sortedCatalogItems(mcp) + + plugins := map[string]api.PermissionCatalogItem{} + if home != "" { + addPluginDirs(plugins, filepath.Join(home, ".codex", "plugins"), "codex") + addClaudeInstalledPlugins(plugins, filepath.Join(home, ".claude", "plugins", "installed_plugins.json")) + } + catalog.Plugins = sortedCatalogItems(plugins) + + skills := map[string]api.PermissionCatalogItem{} + addWorkspaceSkills(skills, dir) + if home != "" { + addSkillDirs(skills, filepath.Join(home, ".claude", "skills"), "claude") + addSkillDirs(skills, filepath.Join(home, ".agents", "skills"), "agents") + } + catalog.Skills = sortedCatalogItems(skills) + + return catalog +} + +func builtinPermissionTools() []api.PermissionCatalogItem { + return []api.PermissionCatalogItem{ + {ID: "Read", Label: "Read", Group: "Files", Description: "Read files from the workspace.", Source: "builtin", Available: true, DefaultMode: "auto"}, + {ID: "Edit", Label: "Edit", Group: "Files", Description: "Apply targeted file edits.", Source: "builtin", Available: true, DefaultMode: "auto"}, + {ID: "Write", Label: "Write", Group: "Files", Description: "Write a new file.", Source: "builtin", Available: true, DefaultMode: "auto"}, + {ID: "MultiEdit", Label: "MultiEdit", Group: "Files", Description: "Apply several edits to one file.", Source: "builtin", Available: true, DefaultMode: "auto"}, + {ID: "Glob", Label: "Glob", Group: "Files", Description: "Find files by glob pattern.", Source: "builtin", Available: true, DefaultMode: "auto"}, + {ID: "Grep", Label: "Grep", Group: "Files", Description: "Search file contents.", Source: "builtin", Available: true, DefaultMode: "auto"}, + {ID: "Bash", Label: "Bash", Group: "Shell", Description: "Run shell commands.", Source: "builtin", Available: true, DefaultMode: "ask"}, + {ID: "WebSearch", Label: "WebSearch", Group: "Web", Description: "Search the web.", Source: "builtin", Available: true, DefaultMode: "ask"}, + {ID: "WebFetch", Label: "WebFetch", Group: "Web", Description: "Fetch a web page.", Source: "builtin", Available: true, DefaultMode: "ask"}, + {ID: "TodoWrite", Label: "TodoWrite", Group: "Planning", Description: "Track task progress.", Source: "builtin", Available: true, DefaultMode: "auto"}, + } +} + +func addMCPServers(out map[string]api.PermissionCatalogItem, path, source string) { + data, err := os.ReadFile(path) + if err != nil { + return + } + var raw struct { + MCPServers map[string]json.RawMessage `json:"mcpServers"` + } + if err := json.Unmarshal(data, &raw); err != nil { + return + } + for name := range raw.MCPServers { + addCatalogItem(out, api.PermissionCatalogItem{ + ID: name, + Label: name, + Group: "MCP", + Source: source, + SourcePath: path, + Configured: true, + Available: true, + DefaultMode: "enabled", + }) + } +} + +func addPluginDirs(out map[string]api.PermissionCatalogItem, dir, source string) { + entries, err := os.ReadDir(dir) + if err != nil { + return + } + for _, entry := range entries { + if !entry.IsDir() || strings.HasPrefix(entry.Name(), ".") { + continue + } + path := filepath.Join(dir, entry.Name()) + addCatalogItem(out, api.PermissionCatalogItem{ + ID: path, + Label: entry.Name(), + Group: "Plugins", + Source: source, + SourcePath: path, + Configured: true, + Available: true, + DefaultMode: "enabled", + }) + } +} + +func addClaudeInstalledPlugins(out map[string]api.PermissionCatalogItem, path string) { + data, err := os.ReadFile(path) + if err != nil { + return + } + var raw struct { + Plugins map[string]json.RawMessage `json:"plugins"` + } + if err := json.Unmarshal(data, &raw); err != nil { + return + } + for name := range raw.Plugins { + addCatalogItem(out, api.PermissionCatalogItem{ + ID: name, + Label: name, + Group: "Plugins", + Source: "claude", + SourcePath: path, + Configured: true, + Available: true, + DefaultMode: "enabled", + }) + } +} + +func addWorkspaceSkills(out map[string]api.PermissionCatalogItem, dir string) { + path := filepath.Join(dir, ".skills") + if info, err := os.Stat(path); err == nil && info.IsDir() { + addCatalogItem(out, api.PermissionCatalogItem{ + ID: "$CWD/.skills", + Label: "$CWD/.skills", + Group: "Skills", + Source: "workspace", + SourcePath: path, + Configured: true, + Available: true, + DefaultMode: "enabled", + }) + } +} + +func addSkillDirs(out map[string]api.PermissionCatalogItem, dir, source string) { + entries, err := os.ReadDir(dir) + if err != nil { + return + } + for _, entry := range entries { + if !entry.IsDir() || strings.HasPrefix(entry.Name(), ".") { + continue + } + path := filepath.Join(dir, entry.Name()) + addCatalogItem(out, api.PermissionCatalogItem{ + ID: path, + Label: entry.Name(), + Group: "Skills", + Source: source, + SourcePath: path, + Configured: true, + Available: true, + DefaultMode: "enabled", + }) + } +} + +func addCatalogItem(out map[string]api.PermissionCatalogItem, item api.PermissionCatalogItem) { + if strings.TrimSpace(item.ID) == "" { + return + } + if existing, ok := out[item.ID]; ok { + if existing.SourcePath == "" { + existing.SourcePath = item.SourcePath + } + if existing.Source == "" { + existing.Source = item.Source + } + existing.Configured = existing.Configured || item.Configured + existing.Available = existing.Available || item.Available + out[item.ID] = existing + return + } + out[item.ID] = item +} + +func sortedCatalogItems(items map[string]api.PermissionCatalogItem) []api.PermissionCatalogItem { + keys := make([]string, 0, len(items)) + for key := range items { + keys = append(keys, key) + } + sort.Strings(keys) + out := make([]api.PermissionCatalogItem, 0, len(keys)) + for _, key := range keys { + out = append(out, items[key]) + } + return out +} diff --git a/pkg/cli/permission_catalog_test.go b/pkg/cli/permission_catalog_test.go new file mode 100644 index 0000000..25723e1 --- /dev/null +++ b/pkg/cli/permission_catalog_test.go @@ -0,0 +1,66 @@ +package cli + +import ( + "os" + "path/filepath" + "testing" + + "github.com/flanksource/captain/pkg/api" +) + +func TestBuildPermissionCatalog(t *testing.T) { + home := t.TempDir() + workspace := t.TempDir() + t.Setenv("HOME", home) + + mustWrite(t, filepath.Join(workspace, ".mcp.json"), `{"mcpServers":{"filesystem":{},"gavel":{}}}`) + if err := os.Mkdir(filepath.Join(workspace, ".skills"), 0o755); err != nil { + t.Fatalf("mkdir workspace .skills: %v", err) + } + mustWrite(t, filepath.Join(home, ".claude.json"), `{"mcpServers":{"ado":{},"gavel":{}}}`) + if err := os.MkdirAll(filepath.Join(home, ".codex", "plugins", "captain"), 0o755); err != nil { + t.Fatalf("mkdir codex plugin: %v", err) + } + if err := os.MkdirAll(filepath.Join(home, ".claude", "skills", "review"), 0o755); err != nil { + t.Fatalf("mkdir claude skill: %v", err) + } + + catalog := buildPermissionCatalog(workspace) + + if !hasCatalogID(catalog.Tools, "Read") || !hasCatalogID(catalog.Tools, "Bash") { + t.Fatalf("tools missing builtins: %+v", catalog.Tools) + } + for _, want := range []string{"filesystem", "gavel", "ado"} { + if !hasCatalogID(catalog.MCP, want) { + t.Fatalf("mcp missing %q: %+v", want, catalog.MCP) + } + } + if !hasCatalogID(catalog.Plugins, filepath.Join(home, ".codex", "plugins", "captain")) { + t.Fatalf("plugins missing captain: %+v", catalog.Plugins) + } + if !hasCatalogID(catalog.Skills, "$CWD/.skills") { + t.Fatalf("skills missing workspace .skills: %+v", catalog.Skills) + } + if !hasCatalogID(catalog.Skills, filepath.Join(home, ".claude", "skills", "review")) { + t.Fatalf("skills missing claude skill: %+v", catalog.Skills) + } +} + +func mustWrite(t *testing.T, path, data string) { + t.Helper() + if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { + t.Fatalf("mkdir %s: %v", filepath.Dir(path), err) + } + if err := os.WriteFile(path, []byte(data), 0o644); err != nil { + t.Fatalf("write %s: %v", path, err) + } +} + +func hasCatalogID(items []api.PermissionCatalogItem, id string) bool { + for _, item := range items { + if item.ID == id { + return true + } + } + return false +} diff --git a/pkg/cli/plan.go b/pkg/cli/plan.go index 6bdc588..5a02138 100644 --- a/pkg/cli/plan.go +++ b/pkg/cli/plan.go @@ -1,6 +1,7 @@ package cli import ( + "context" "fmt" "os" "sort" @@ -8,6 +9,7 @@ import ( "github.com/flanksource/captain/pkg/ai/history" "github.com/flanksource/captain/pkg/claude" + captainsession "github.com/flanksource/captain/pkg/session" "github.com/flanksource/clicky" "github.com/flanksource/clicky/api" "github.com/flanksource/clicky/api/icons" @@ -46,8 +48,23 @@ func RunPlan(opts PlanOptions) (PlanResult, error) { id := strings.TrimSpace(opts.SessionID) if id != "" { - // A session id can name a session in any project, so search everywhere. - candidates, err := discoverSessionCandidates("", true, source) + if candidate, ok, err := findSessionCandidateByID(id, source); err != nil { + return PlanResult{}, err + } else if ok { + plan, err := resolveSessionPlan(candidate) + if err != nil { + return PlanResult{}, err + } + if plan == nil { + return PlanResult{}, fmt.Errorf("session %q has no plan", id) + } + plan.pathOnly = opts.PathOnly + return *plan, nil + } + + // A hashed session key cannot be found from the transcript filename, so + // keep the older all-project scan as a fallback for that less-common form. + candidates, err := discoverSessionCandidates(context.Background(), "", true, source) if err != nil { return PlanResult{}, err } @@ -66,7 +83,7 @@ func RunPlan(opts PlanOptions) (PlanResult, error) { return *plan, nil } - candidates, err := discoverSessionCandidates(cwd, opts.All, source) + candidates, err := discoverSessionCandidates(context.Background(), cwd, opts.All, source) if err != nil { return PlanResult{}, err } @@ -150,57 +167,17 @@ func resolveCodexPlan(candidate sessionCandidate) (*PlanResult, error) { if err != nil { return nil, err } - content := latestCodexPlan(uses) - if content == "" { + plan := captainsession.CodexPlanFromToolUses(uses) + if plan == nil || strings.TrimSpace(plan.Content) == "" { return nil, nil } return &PlanResult{ SessionID: candidate.record.ID, Source: "codex", - Content: content, + Content: plan.Content, }, nil } -// latestCodexPlan renders the most recent Codex update_plan checklist as markdown. -// Codex keeps its plan inline (no file), revising it via update_plan; the last -// revision is the final plan. -func latestCodexPlan(uses []history.ToolUse) string { - var steps []any - for _, use := range uses { - if use.Tool != "TodoWrite" { - continue - } - if todos, ok := use.Input["todos"].([]any); ok && len(todos) > 0 { - steps = todos - } - } - if len(steps) == 0 { - return "" - } - var b strings.Builder - for _, raw := range steps { - step, ok := raw.(map[string]any) - if !ok { - continue - } - text, _ := step["step"].(string) - if text == "" { - text, _ = step["content"].(string) - } - status, _ := step["status"].(string) - mark := " " - suffix := "" - switch status { - case "completed", "done": - mark = "x" - case "in_progress": - suffix = " _(in progress)_" - } - fmt.Fprintf(&b, "- [%s] %s%s\n", mark, text, suffix) - } - return strings.TrimRight(b.String(), "\n") -} - // shortenHomePath rewrites a leading home directory to ~ for display. func shortenHomePath(path string) string { home, err := os.UserHomeDir() diff --git a/pkg/cli/plan_test.go b/pkg/cli/plan_test.go index f4867a2..138d705 100644 --- a/pkg/cli/plan_test.go +++ b/pkg/cli/plan_test.go @@ -56,6 +56,23 @@ func TestRunPlanClaudePrefersDiskContent(t *testing.T) { assert.Equal(t, "# Tidy otter\n\non-disk body", got.Content) } +func TestRunPlanClaudeDefaultSourceUsesDirectSessionLookup(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + project := filepath.Join(home, "work", "proj") + require.NoError(t, os.MkdirAll(project, 0o755)) + t.Chdir(project) + + planPath := filepath.Join(home, ".claude", "plans", "quick-plan.md") + claudePlanSession(t, home, project, "sess-direct", "quick-plan", planPath, "# direct lookup") + + got, err := RunPlan(PlanOptions{SessionID: "sess-direct"}) + require.NoError(t, err) + assert.Equal(t, "sess-direct", got.SessionID) + assert.Equal(t, "claude", got.Source) + assert.Equal(t, "# direct lookup", got.Content) +} + func TestRunPlanClaudeInlineWhenMissingOnDisk(t *testing.T) { home := t.TempDir() t.Setenv("HOME", home) diff --git a/pkg/cli/prompt_entity.go b/pkg/cli/prompt_entity.go new file mode 100644 index 0000000..14497bf --- /dev/null +++ b/pkg/cli/prompt_entity.go @@ -0,0 +1,1376 @@ +package cli + +import ( + "context" + "crypto/sha256" + "encoding/base64" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "io" + "io/fs" + "net/http" + "os" + "path/filepath" + "sort" + "strconv" + "strings" + "sync" + "time" + + "github.com/flanksource/captain/pkg/ai" + promptlib "github.com/flanksource/captain/pkg/ai/prompt" + "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/captain/pkg/captainconfig" + "github.com/flanksource/clicky" + clickyapi "github.com/flanksource/clicky/api" + clickyrpc "github.com/flanksource/clicky/rpc" + dp "github.com/google/dotprompt/go/dotprompt" +) + +type promptDirsContextKey struct{} + +var registerPromptEntityOnce sync.Once + +type PromptListOptions struct { + Query string `flag:"query" help:"Search prompt name, description, model, or path"` + Source string `flag:"source" help:"Filter by source: all|embedded|local|"` +} + +type PromptVariable struct { + Name string `json:"name"` + Type string `json:"type,omitempty"` + Description string `json:"description,omitempty"` + Required bool `json:"required,omitempty"` +} + +type PromptSummary struct { + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + SourceKind string `json:"sourceKind"` + SourceID string `json:"sourceId"` + Source string `json:"source"` + Path string `json:"path"` + RelPath string `json:"relPath"` + Writable bool `json:"writable"` + Model string `json:"model,omitempty"` + Backend string `json:"backend,omitempty"` + Variables []PromptVariable `json:"variables,omitempty"` + ParseError string `json:"parseError,omitempty"` + UpdatedAt string `json:"updatedAt,omitempty"` +} + +func (p PromptSummary) GetID() string { return p.ID } +func (p PromptSummary) GetName() string { return p.Name } + +func (p PromptSummary) Columns() []clickyapi.ColumnDef { + return []clickyapi.ColumnDef{ + clickyapi.Column("name").Label("Name").Build(), + clickyapi.Column("source").Label("Source").Build(), + clickyapi.Column("relPath").Label("Path").MaxWidth(54).Build(), + clickyapi.Column("model").Label("Model").Build(), + clickyapi.Column("description").Label("Description").MaxWidth(80).Build(), + } +} + +func (p PromptSummary) Row() map[string]any { + return map[string]any{ + "name": p.Name, + "source": p.Source, + "relPath": p.RelPath, + "model": p.Model, + "description": p.Description, + } +} + +type PromptDetail struct { + PromptSummary + Content string `json:"content"` + InputSchema map[string]any `json:"inputSchema,omitempty"` + InputDefault map[string]any `json:"inputDefault,omitempty"` + OutputSchema map[string]any `json:"outputSchema,omitempty"` + Metadata map[string]any `json:"metadata,omitempty"` +} + +type PromptWriteRequest struct { + Target string `json:"target"` + RelPath string `json:"relPath"` + Name string `json:"name"` + Content string `json:"content"` +} + +type PromptRenderRequest struct { + Variables map[string]any `json:"variables,omitempty"` + Spec *api.Spec `json:"spec,omitempty"` +} + +type PromptRenderResult struct { + ID string `json:"id"` + Name string `json:"name"` + Model string `json:"model,omitempty"` + Backend string `json:"backend,omitempty"` + User string `json:"user,omitempty"` + System string `json:"system,omitempty"` + Input ai.Request `json:"input"` + Config ai.Config `json:"config"` + InputSchema map[string]any `json:"inputSchema,omitempty"` + InputDefault map[string]any `json:"inputDefault,omitempty"` + OutputSchema map[string]any `json:"outputSchema,omitempty"` + ValidationError string `json:"validationError,omitempty"` +} + +// PromptActionFlags is the full flag surface for `captain prompt run|render` — +// the same knobs as `captain ai prompt` (AIRuntimeOptions) plus the prompt-body +// fields — so the two commands are one. The positional (a .prompt filepath or a +// registry id) is the prompt source; --prompt/-p and stdin are alternatives. +type PromptActionFlags struct { + AIRuntimeOptions + + Prompt string `flag:"prompt" help:"Prompt text (or @file); alternative to the positional" short:"p"` + System string `flag:"system" help:"System prompt" short:"s"` + AppendSystem string `flag:"append-system" help:"Append text to the default system prompt"` + Var []string `flag:"var" help:"Template variable key=value (repeatable)" short:"V"` + Vars string `flag:"vars" help:"JSON object of template variables (HTTP callers)"` + Timeout string `flag:"timeout" help:"Request timeout" default:"120s"` + NoStream bool `flag:"no-stream" help:"Disable streaming; print only the final text (CLI)"` +} + +func (PromptActionFlags) ClickyActionFlags() {} + +type promptSource struct { + Kind string + ID string + Label string + Root string + WalkRoot string + FS fs.FS + Writable bool + Implicit bool +} + +type promptRecord struct { + Source promptSource + ID string + Path string + Rel string +} + +type promptRef struct { + Kind string + SourceID string + RelPath string +} + +type promptInspection struct { + Metadata map[string]any + InputSchema map[string]any + InputDefault map[string]any + OutputSchema map[string]any + Variables []PromptVariable +} + +func RegisterPromptEntity() { + registerPromptEntityOnce.Do(func() { + clicky.NewEntity[PromptSummary, PromptListOptions, PromptDetail]("prompt"). + Aliases("prompts"). + ToolGroup("captain.prompts"). + ListWithContext(listPrompts). + GetWithContext(getPrompt). + CreateWithContext(createPrompt). + UpdateWithContext(updatePrompt). + DeleteWithContext(deletePrompt). + WithAction(clicky.ActionWithFlagsAndContext("render", PromptActionFlags{}, renderPromptAction). + WithShort("Render a prompt (id, .prompt file, --prompt/-p, or stdin) without calling a model"). + WithOptionalID()). + WithAction(clicky.ActionWithFlagsAndContext("run", PromptActionFlags{}, runPromptAction). + WithShort("Run a prompt (id, .prompt file, --prompt/-p, or stdin)"). + WithOptionalID()). + Register() + }) +} + +func ContextWithPromptDirs(ctx context.Context, dirs []string) context.Context { + return context.WithValue(ctx, promptDirsContextKey{}, append([]string(nil), dirs...)) +} + +func PromptDirsMiddleware(next http.Handler, dirs []string) http.Handler { + if len(dirs) == 0 { + return next + } + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + next.ServeHTTP(w, r.WithContext(ContextWithPromptDirs(r.Context(), dirs))) + }) +} + +func listPrompts(ctx context.Context, opts PromptListOptions) ([]PromptSummary, error) { + records, err := listPromptRecords(ctx) + if err != nil { + return nil, err + } + filter := strings.ToLower(strings.TrimSpace(opts.Query)) + sourceFilter := strings.ToLower(strings.TrimSpace(opts.Source)) + var out []PromptSummary + for _, record := range records { + summary, err := promptSummary(record) + if err != nil { + return nil, err + } + if !promptSourceMatches(summary, sourceFilter) || !promptMatches(summary, filter) { + continue + } + out = append(out, summary) + } + sort.SliceStable(out, func(i, j int) bool { + if out[i].SourceKind != out[j].SourceKind { + return out[i].SourceKind < out[j].SourceKind + } + return out[i].RelPath < out[j].RelPath + }) + return out, nil +} + +func getPrompt(ctx context.Context, id string) (PromptDetail, error) { + record, err := resolvePromptRecord(ctx, id) + if err != nil { + return PromptDetail{}, err + } + return promptDetail(record) +} + +func createPrompt(ctx context.Context, body map[string]any) (PromptDetail, error) { + var req PromptWriteRequest + if err := decodePromptBody(ctx, body, &req); err != nil { + return PromptDetail{}, err + } + return writeNewLocalPrompt(ctx, req) +} + +func writeNewLocalPrompt(ctx context.Context, req PromptWriteRequest) (PromptDetail, error) { + sources, err := buildPromptSources(ctx) + if err != nil { + return PromptDetail{}, err + } + source, ok := firstWritableSource(sources) + if req.Target != "" { + source, ok = writableSourceByID(sources, req.Target) + } + if !ok { + return PromptDetail{}, fmt.Errorf("no writable prompt source configured") + } + rel, err := normalizeWriteRelPath(req.RelPath, req.Name) + if err != nil { + return PromptDetail{}, err + } + full, err := safeLocalPromptPath(source, rel) + if err != nil { + return PromptDetail{}, err + } + if strings.TrimSpace(req.Content) == "" { + return PromptDetail{}, fmt.Errorf("prompt content cannot be empty") + } + if _, err := os.Stat(full); err == nil { + return PromptDetail{}, fmt.Errorf("prompt %s already exists", rel) + } else if !errors.Is(err, fs.ErrNotExist) { + return PromptDetail{}, fmt.Errorf("stat %s: %w", full, err) + } + if err := os.MkdirAll(filepath.Dir(full), 0o755); err != nil { + return PromptDetail{}, fmt.Errorf("ensure prompt directory: %w", err) + } + if err := os.WriteFile(full, []byte(req.Content), 0o644); err != nil { + return PromptDetail{}, fmt.Errorf("write prompt: %w", err) + } + return promptDetail(promptRecord{Source: source, ID: encodePromptID(source.Kind, source.ID, rel), Path: full, Rel: rel}) +} + +func updatePrompt(ctx context.Context, id string, body map[string]any) (PromptDetail, error) { + record, err := resolvePromptRecord(ctx, id) + if err != nil { + return PromptDetail{}, err + } + var req PromptWriteRequest + if err := decodePromptBody(ctx, body, &req); err != nil { + return PromptDetail{}, err + } + if strings.TrimSpace(req.Content) == "" { + return PromptDetail{}, fmt.Errorf("prompt content cannot be empty") + } + if !record.Source.Writable { + if strings.TrimSpace(req.RelPath) == "" { + req.RelPath = localForkRelPath(record) + } + return writeNewLocalPrompt(ctx, req) + } + full, err := safeLocalPromptPath(record.Source, record.Rel) + if err != nil { + return PromptDetail{}, err + } + if err := os.WriteFile(full, []byte(req.Content), 0o644); err != nil { + return PromptDetail{}, fmt.Errorf("write prompt: %w", err) + } + return promptDetail(record) +} + +// localForkRelPath derives the destination path for a read-only (embedded) +// prompt saved into a writable source, stripping the source walk root so an +// embedded "testdata/commit.prompt" lands as "commit.prompt". +func localForkRelPath(record promptRecord) string { + rel := record.Rel + if root := record.Source.WalkRoot; root != "" { + rel = strings.TrimPrefix(rel, root+"/") + } + return rel +} + +func deletePrompt(ctx context.Context, id string) error { + record, err := resolvePromptRecord(ctx, id) + if err != nil { + return err + } + if !record.Source.Writable { + return fmt.Errorf("embedded prompts are read-only") + } + full, err := safeLocalPromptPath(record.Source, record.Rel) + if err != nil { + return err + } + if err := os.Remove(full); err != nil { + return fmt.Errorf("delete prompt: %w", err) + } + return nil +} + +// renderPromptAction renders a prompt for `captain prompt render`. HTTP callers +// pass a structured api.Spec in the body (rich overlay via overlayRuntimeSpec); +// the CLI passes flat flags (overlayCLI) plus filepath/-p/stdin sources. +func renderPromptAction(ctx context.Context, id string, flags map[string]string) (PromptRenderResult, error) { + if _, isHTTP := clickyrpc.RequestFromContext(ctx); isHTTP { + req, err := readRenderRequest(ctx, flags) + if err != nil { + return PromptRenderResult{}, err + } + return renderPrompt(ctx, id, req) + } + opts, err := actionFlagsToOptions(flags) + if err != nil { + return PromptRenderResult{}, err + } + return renderPromptCLI(ctx, id, opts, flags["vars"], readStdinIfCLI(ctx)) +} + +// renderPrompt is the HTTP/Spec render path: overlay a structured api.Spec (the +// web UI's rich runtime overrides) onto the rendered template. +func renderPrompt(ctx context.Context, id string, renderReq PromptRenderRequest) (PromptRenderResult, error) { + record, err := resolvePromptRecord(ctx, id) + if err != nil { + return PromptRenderResult{}, err + } + content, err := readPromptContent(record) + if err != nil { + return PromptRenderResult{}, err + } + vars := renderReq.Variables + if vars == nil { + vars = map[string]any{} + } + req, cfg, err := promptlib.Load(content).Render(vars, nil) + if err != nil { + return PromptRenderResult{}, err + } + req.Prompt.Source = record.Rel + if renderReq.Spec != nil { + overlayRuntimeSpec(&req, &cfg, *renderReq.Spec) + } + applyPromptDefaults(&req, &cfg) + cwd, err := os.Getwd() + if err != nil { + return PromptRenderResult{}, fmt.Errorf("get working directory: %w", err) + } + if err := normalizePromptContextDir(&req, cwd); err != nil { + return PromptRenderResult{}, err + } + return finalizeRenderResult(record, content, req, cfg) +} + +// renderPromptCLI is the CLI render path: load from id | .prompt filepath | -p | +// stdin and overlay the flat CLI flags (overlayCLI). +func renderPromptCLI(ctx context.Context, id string, opts AIPromptOptions, varsJSON, stdin string) (PromptRenderResult, error) { + content, source, usedStdin, record, err := loadPromptContent(ctx, id, opts, stdin) + if err != nil { + return PromptRenderResult{}, err + } + vars, err := promptVars(opts, varsJSON, stdin, usedStdin) + if err != nil { + return PromptRenderResult{}, err + } + req, cfg, err := renderLoadedContent(content, source, vars, opts) + if err != nil { + return PromptRenderResult{}, err + } + return finalizeRenderResult(record, content, req, cfg) +} + +// finalizeRenderResult packages the rendered request/config + prompt detail into +// a PromptRenderResult and sets the validation error (shared by both paths). +func finalizeRenderResult(record promptRecord, content string, req ai.Request, cfg ai.Config) (PromptRenderResult, error) { + // Normalize a comma-separated model into a clean primary + fallbacks so the + // displayed Model is a single name, then catch a mistyped model (primary or any + // fallback) at render time, not just on run. + req.Model = req.ExpandCSV() + cfg.Model = cfg.Model.ExpandCSV() + for _, c := range cfg.Model.Candidates() { + warnIfLikelyModelTypo(c.Name) + } + detail, err := promptDetailFromContent(record, content) + if err != nil { + return PromptRenderResult{}, err + } + result := PromptRenderResult{ + ID: detail.ID, + Name: detail.Name, + Model: cfg.Model.Name, + Backend: string(cfg.Model.Backend), + User: req.Prompt.User, + System: req.Prompt.System, + Input: req, + Config: cfg, + InputSchema: detail.InputSchema, + InputDefault: detail.InputDefault, + OutputSchema: detail.OutputSchema, + } + switch { + case req.Prompt.User == "" && !req.IsVerifyOnly(): + result.ValidationError = "prompt text required" + case cfg.Model.Name == "": + result.ValidationError = "no model: set prompt frontmatter, pass a model override, or run 'captain configure'" + default: + if err := req.Validate(); err != nil { + result.ValidationError = err.Error() + } + } + return result, nil +} + +func overlayRuntimeSpec(req *ai.Request, cfg *ai.Config, spec api.Spec) { + if spec.Name != "" { + req.Name = spec.Name + cfg.Model.Name = spec.Name + } + if spec.ID != "" { + req.ID = spec.ID + cfg.Model.ID = spec.ID + } + if spec.Backend != "" { + req.Backend = spec.Backend + cfg.Model.Backend = spec.Backend + } + if spec.Temperature != nil { + req.Temperature = spec.Temperature + cfg.Model.Temperature = spec.Temperature + } + if spec.Effort != "" { + req.Effort = spec.Effort + cfg.Model.Effort = spec.Effort + } + if len(spec.Fallbacks) > 0 { + req.Fallbacks = spec.Fallbacks + cfg.Model.Fallbacks = spec.Fallbacks + } + req.NoCache = req.NoCache || spec.NoCache + cfg.NoCache = cfg.NoCache || spec.NoCache + if spec.Budget.Cost > 0 { + req.Budget.Cost = spec.Budget.Cost + cfg.Budget.Cost = spec.Budget.Cost + } + if spec.Budget.MaxTokens > 0 { + req.Budget.MaxTokens = spec.Budget.MaxTokens + cfg.Budget.MaxTokens = spec.Budget.MaxTokens + } + if spec.Budget.MaxTurns > 0 { + req.Budget.MaxTurns = spec.Budget.MaxTurns + cfg.Budget.MaxTurns = spec.Budget.MaxTurns + } + if spec.Budget.Timeout != "" { + req.Budget.Timeout = spec.Budget.Timeout + cfg.Budget.Timeout = spec.Budget.Timeout + } + + if spec.Prompt.User != "" { + req.Prompt.User = spec.Prompt.User + } + if spec.Prompt.System != "" { + req.Prompt.System = spec.Prompt.System + } + if spec.Prompt.AppendSystem != "" { + req.Prompt.AppendSystem = spec.Prompt.AppendSystem + } + if spec.Prompt.Source != "" { + req.Prompt.Source = spec.Prompt.Source + } + req.Prompt.Metadata = mergeStringMaps(req.Prompt.Metadata, spec.Prompt.Metadata) + if len(spec.Prompt.SchemaJSON) > 0 { + req.Prompt.SchemaJSON = spec.Prompt.SchemaJSON + } + if spec.Prompt.SchemaStrictness != "" { + req.Prompt.SchemaStrictness = spec.Prompt.SchemaStrictness + } + if spec.Workflow != nil { + req.Workflow = spec.Workflow + } + + if spec.Permissions.Mode != "" { + req.Permissions.Mode = spec.Permissions.Mode + } + req.Permissions.Presets = mergePresets(req.Permissions.Presets, spec.Permissions.Presets) + toolPolicies := spec.Permissions.Tools.Policies() + if len(toolPolicies) > 0 { + req.Permissions.Tools.Allow = nil + req.Permissions.Tools.Deny = nil + req.Permissions.Tools.Modes = nil + for _, tool := range sortedStringKeys(toolPolicies) { + switch toolPolicies[tool] { + case api.ToolPolicyAllow: + req.Permissions.Tools.Allow = append(req.Permissions.Tools.Allow, tool) + case api.ToolPolicyDeny: + req.Permissions.Tools.Deny = append(req.Permissions.Tools.Deny, tool) + case api.ToolPolicyAsk: + if req.Permissions.Tools.Modes == nil { + req.Permissions.Tools.Modes = map[string]api.ToolMode{} + } + req.Permissions.Tools.Modes[tool] = api.ToolModeAsk + case api.ToolPolicyAuto: + if req.Permissions.Tools.Modes == nil { + req.Permissions.Tools.Modes = map[string]api.ToolMode{} + } + req.Permissions.Tools.Modes[tool] = api.ToolModeEnabled + } + } + } + req.Permissions.Tools.Modes = mergeToolModes(req.Permissions.Tools.Modes, spec.Permissions.Tools.Modes) + req.Permissions.MCP.Disabled = req.Permissions.MCP.Disabled || spec.Permissions.MCP.Disabled + if servers := spec.Permissions.MCP.EnabledServers(); len(servers) > 0 { + req.Permissions.MCP.Servers = servers + } + if len(spec.Permissions.Plugins) > 0 { + req.Permissions.Plugins = enabledResourcePolicies(spec.Permissions.Plugins) + } + + skills := append([]string(nil), spec.Memory.Skills...) + skills = append(skills, spec.Permissions.Skills.Enabled()...) + if len(skills) > 0 { + req.Memory.Skills = dedupeStrings(skills) + } + req.Memory.SkipProject = req.Memory.SkipProject || spec.Memory.SkipProject + req.Memory.SkipUser = req.Memory.SkipUser || spec.Memory.SkipUser + req.Memory.SkipSkills = req.Memory.SkipSkills || spec.Memory.SkipSkills + req.Memory.SkipHooks = req.Memory.SkipHooks || spec.Memory.SkipHooks + req.Memory.SkipMemory = req.Memory.SkipMemory || spec.Memory.SkipMemory + req.Memory.Bare = req.Memory.Bare || spec.Memory.Bare + + if spec.Setup != nil { + req.Setup = spec.Setup + } + + if spec.SessionID != "" { + req.SessionID = spec.SessionID + cfg.SessionID = spec.SessionID + } +} + +func applyPromptDefaults(req *ai.Request, cfg *ai.Config) { + saved := loadSavedAI() + if req.Name == "" { + req.Name = firstNonEmpty(cfg.Model.Name, saved.Model) + } + if req.Backend == "" { + req.Backend = api.Backend(firstNonEmpty(string(cfg.Model.Backend), saved.Backend)) + } + if req.Effort == "" { + req.Effort = api.Effort(firstNonEmpty(string(cfg.Model.Effort), saved.ReasoningEffort)) + } + req.NoCache = req.NoCache || saved.NoCache + if req.Budget.MaxTokens == 0 { + req.Budget.MaxTokens = firstPositive(cfg.Budget.MaxTokens, saved.MaxTokens, 4096) + } + if req.Budget.Cost == 0 { + req.Budget.Cost = firstPositiveFloat(cfg.Budget.Cost, saved.BudgetUSD) + } + + cfg.Model = req.Model + cfg.Budget = req.Budget + cfg.NoCache = req.NoCache +} + +func mergeStringMaps(base, overlay map[string]string) map[string]string { + if len(overlay) == 0 { + return base + } + out := make(map[string]string, len(base)+len(overlay)) + for k, v := range base { + out[k] = v + } + for k, v := range overlay { + out[k] = v + } + return out +} + +func mergeToolModes(base, overlay map[string]api.ToolMode) map[string]api.ToolMode { + if len(overlay) == 0 { + return base + } + out := make(map[string]api.ToolMode, len(base)+len(overlay)) + for k, v := range base { + out[k] = v + } + for k, v := range overlay { + out[k] = v + } + return out +} + +func mergePresets(base, overlay []api.Preset) []api.Preset { + if len(overlay) == 0 { + return base + } + seen := make(map[api.Preset]bool, len(base)+len(overlay)) + out := make([]api.Preset, 0, len(base)+len(overlay)) + for _, preset := range base { + if seen[preset] { + continue + } + seen[preset] = true + out = append(out, preset) + } + for _, preset := range overlay { + if seen[preset] { + continue + } + seen[preset] = true + out = append(out, preset) + } + return out +} + +func sortedStringKeys[V any](m map[string]V) []string { + keys := make([]string, 0, len(m)) + for key := range m { + if key != "" { + keys = append(keys, key) + } + } + sort.Strings(keys) + return keys +} + +func enabledResourcePolicies(in api.ResourcePolicies) api.ResourcePolicies { + out := api.ResourcePolicies{} + for _, key := range sortedStringKeys(in) { + if in[key] == api.ResourceEnabled { + out[key] = api.ResourceEnabled + } + } + return out +} + +func dedupeStrings(in []string) []string { + seen := map[string]bool{} + var out []string + for _, item := range in { + if item == "" || seen[item] { + continue + } + seen[item] = true + out = append(out, item) + } + return out +} + +func readRenderRequest(ctx context.Context, flags map[string]string) (PromptRenderRequest, error) { + var req PromptRenderRequest + if err := decodePromptBody(ctx, map[string]any{}, &req); err != nil { + return PromptRenderRequest{}, err + } + if req.Variables == nil { + req.Variables = map[string]any{} + } + if err := mergePromptActionFlags(&req, flags); err != nil { + return PromptRenderRequest{}, err + } + return req, nil +} + +func mergePromptActionFlags(req *PromptRenderRequest, flags map[string]string) error { + if len(flags) == 0 { + return nil + } + if raw := strings.TrimSpace(flags["vars"]); raw != "" { + var vars map[string]any + if err := json.Unmarshal([]byte(raw), &vars); err != nil { + return fmt.Errorf("parse --vars JSON: %w", err) + } + req.Variables = vars + } + if v := strings.TrimSpace(flags["model"]); v != "" { + ensureRenderSpec(req).Name = v + } + if v := strings.TrimSpace(flags["fallback"]); v != "" { + ensureRenderSpec(req).Fallbacks = fallbackModelsFromFlags([]string{v}) + } + if v := strings.TrimSpace(flags["backend"]); v != "" { + ensureRenderSpec(req).Backend = api.Backend(v) + } + if v := strings.TrimSpace(flags["timeout"]); v != "" { + ensureRenderSpec(req).Budget.Timeout = v + } + if v := strings.TrimSpace(flags["max-tokens"]); v != "" { + n, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("invalid --max-tokens %q: %w", v, err) + } + ensureRenderSpec(req).Budget.MaxTokens = n + } + return nil +} + +func ensureRenderSpec(req *PromptRenderRequest) *api.Spec { + if req.Spec == nil { + req.Spec = &api.Spec{} + } + return req.Spec +} + +func decodePromptBody(ctx context.Context, flat map[string]any, dst any) error { + if r, ok := clickyrpc.RequestFromContext(ctx); ok && r.Body != nil { + body, err := io.ReadAll(r.Body) + if err != nil { + return fmt.Errorf("read request body: %w", err) + } + r.Body = io.NopCloser(strings.NewReader(string(body))) + if len(strings.TrimSpace(string(body))) > 0 { + decoder := json.NewDecoder(strings.NewReader(string(body))) + decoder.DisallowUnknownFields() + if err := decoder.Decode(dst); err != nil { + return fmt.Errorf("decode request body: %w", err) + } + return nil + } + } + if len(flat) == 0 { + return nil + } + data, err := json.Marshal(flat) + if err != nil { + return err + } + decoder := json.NewDecoder(strings.NewReader(string(data))) + decoder.DisallowUnknownFields() + if err := decoder.Decode(dst); err != nil { + return fmt.Errorf("decode command body: %w", err) + } + return nil +} + +func runtimeTimeout(raw string) time.Duration { + timeout, _ := time.ParseDuration(raw) + if timeout <= 0 { + return 120 * time.Second + } + return timeout +} + +func listPromptRecords(ctx context.Context) ([]promptRecord, error) { + sources, err := buildPromptSources(ctx) + if err != nil { + return nil, err + } + var records []promptRecord + for _, source := range sources { + recs, err := listPromptRecordsFromSource(source) + if err != nil { + return nil, err + } + records = append(records, recs...) + } + return records, nil +} + +func listPromptRecordsFromSource(source promptSource) ([]promptRecord, error) { + var records []promptRecord + add := func(rel string, info fs.FileInfo) { + rel = filepath.ToSlash(rel) + path := rel + if source.Root != "" { + path = filepath.Join(source.Root, filepath.FromSlash(rel)) + } + updatedAt := "" + if info != nil && !info.ModTime().IsZero() { + updatedAt = info.ModTime().Format(time.RFC3339) + } + records = append(records, promptRecord{ + Source: source, + ID: encodePromptID(source.Kind, source.ID, rel), + Path: path + "\x00" + updatedAt, + Rel: rel, + }) + } + + if source.FS != nil { + err := fs.WalkDir(source.FS, source.WalkRoot, func(path string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + if d.IsDir() { + return nil + } + if !strings.HasSuffix(path, ".prompt") { + return nil + } + info, _ := d.Info() + add(path, info) + return nil + }) + return records, err + } + + err := filepath.WalkDir(source.Root, func(path string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + name := d.Name() + if d.IsDir() { + if name == ".git" || name == "node_modules" || name == "vendor" || name == "dist" { + return filepath.SkipDir + } + return nil + } + if d.Type()&fs.ModeSymlink != 0 || !strings.HasSuffix(name, ".prompt") { + return nil + } + rel, err := filepath.Rel(source.Root, path) + if err != nil { + return err + } + info, _ := d.Info() + add(rel, info) + return nil + }) + if errors.Is(err, fs.ErrNotExist) && source.Implicit { + return records, nil + } + return records, err +} + +func resolvePromptRecord(ctx context.Context, id string) (promptRecord, error) { + if looksLikePromptPath(id) { + return filePromptRecord(id) + } + ref, err := decodePromptID(id) + if err != nil { + return promptRecord{}, err + } + sources, err := buildPromptSources(ctx) + if err != nil { + return promptRecord{}, err + } + for _, source := range sources { + if source.Kind != ref.Kind || source.ID != ref.SourceID { + continue + } + path := ref.RelPath + if source.Root != "" { + path = filepath.Join(source.Root, filepath.FromSlash(ref.RelPath)) + } + return promptRecord{Source: source, ID: id, Path: path, Rel: ref.RelPath}, nil + } + return promptRecord{}, fmt.Errorf("prompt source %q not found", ref.SourceID) +} + +// looksLikePromptPath reports whether id is a filesystem path rather than a +// base64 registry id. Registry ids are base64-raw-url (no ".", "/", or leading +// "."), so a .prompt suffix, a path separator, or a leading "." marks a path. +func looksLikePromptPath(id string) bool { + return strings.HasSuffix(id, ".prompt") || + strings.ContainsRune(id, os.PathSeparator) || + strings.HasPrefix(id, ".") +} + +// filePromptRecord resolves an ad-hoc .prompt file path (not a registered id) +// into a record readable via readPromptContent/safeLocalPromptPath. Mirrors the +// captain-ai-prompt file loader so `captain prompt run|render ./x.prompt` works. +func filePromptRecord(id string) (promptRecord, error) { + abs, err := filepath.Abs(id) + if err != nil { + return promptRecord{}, err + } + info, err := os.Stat(abs) + if err != nil { + return promptRecord{}, fmt.Errorf("prompt file %s: %w", id, err) + } + if info.IsDir() { + return promptRecord{}, fmt.Errorf("%s is a directory, not a .prompt file", id) + } + return promptRecord{ + Source: promptSource{Kind: "file", ID: "file", Label: "File", Root: filepath.Dir(abs)}, + ID: id, + Path: abs, + Rel: filepath.Base(abs), + }, nil +} + +func promptSummary(record promptRecord) (PromptSummary, error) { + content, err := readPromptContent(record) + if err != nil { + return PromptSummary{}, err + } + summary, err := promptSummaryFromContent(record, content) + if err != nil { + summary = basePromptSummary(record) + summary.ParseError = err.Error() + } + if idx := strings.LastIndex(record.Path, "\x00"); idx >= 0 { + summary.UpdatedAt = strings.TrimPrefix(record.Path[idx+1:], "\x00") + } + return summary, nil +} + +func promptDetail(record promptRecord) (PromptDetail, error) { + content, err := readPromptContent(record) + if err != nil { + return PromptDetail{}, err + } + return promptDetailFromContent(record, content) +} + +func promptDetailFromContent(record promptRecord, content string) (PromptDetail, error) { + summary, err := promptSummaryFromContent(record, content) + if err != nil { + return PromptDetail{}, err + } + inspection, err := inspectPrompt(content, nil) + if err != nil { + return PromptDetail{}, err + } + return PromptDetail{ + PromptSummary: summary, + Content: content, + InputSchema: inspection.InputSchema, + InputDefault: inspection.InputDefault, + OutputSchema: inspection.OutputSchema, + Metadata: inspection.Metadata, + }, nil +} + +func promptSummaryFromContent(record promptRecord, content string) (PromptSummary, error) { + tmpl := promptlib.Load(content) + req, cfg, err := tmpl.Render(map[string]any{}, nil) + if err != nil { + return PromptSummary{}, err + } + inspection, err := inspectPrompt(content, nil) + if err != nil { + return PromptSummary{}, err + } + summary := basePromptSummary(record) + if v, ok := inspection.Metadata["name"].(string); ok && strings.TrimSpace(v) != "" { + summary.Name = strings.TrimSpace(v) + } + if v, ok := inspection.Metadata["description"].(string); ok { + summary.Description = strings.TrimSpace(v) + } + summary.Model = firstNonEmpty(cfg.Model.Name, req.Name) + summary.Backend = firstNonEmpty(string(cfg.Model.Backend), string(req.Backend)) + summary.Variables = inspection.Variables + return summary, nil +} + +func basePromptSummary(record promptRecord) PromptSummary { + name := strings.TrimSuffix(filepath.Base(record.Rel), ".prompt") + return PromptSummary{ + ID: record.ID, + Name: name, + SourceKind: record.Source.Kind, + SourceID: record.Source.ID, + Source: record.Source.Label, + Path: displayPromptPath(record), + RelPath: record.Rel, + Writable: record.Source.Writable, + } +} + +func displayPromptPath(record promptRecord) string { + if idx := strings.LastIndex(record.Path, "\x00"); idx >= 0 { + return record.Path[:idx] + } + return record.Path +} + +func readPromptContent(record promptRecord) (string, error) { + if record.Source.FS != nil { + data, err := fs.ReadFile(record.Source.FS, record.Rel) + if err != nil { + return "", fmt.Errorf("read embedded prompt %s: %w", record.Rel, err) + } + return string(data), nil + } + full, err := safeLocalPromptPath(record.Source, record.Rel) + if err != nil { + return "", err + } + data, err := os.ReadFile(full) + if err != nil { + return "", fmt.Errorf("read prompt %s: %w", full, err) + } + return string(data), nil +} + +func inspectPrompt(content string, data map[string]any) (promptInspection, error) { + if data == nil { + data = map[string]any{} + } + rendered, err := dp.NewDotprompt(nil).Render(content, &dp.DataArgument{Input: data}, nil) + if err != nil { + return promptInspection{}, err + } + metadata := map[string]any{} + if rendered.Raw != nil { + for k, v := range rendered.Raw { + metadata[k] = v + } + } + if rendered.Name != "" { + metadata["name"] = rendered.Name + } + if rendered.Description != "" { + metadata["description"] = rendered.Description + } + if rendered.Model != "" { + metadata["model"] = rendered.Model + } + inputSchema := anyToMap(rendered.Input.Schema) + inputDefault := map[string]any{} + for k, v := range rendered.Input.Default { + inputDefault[k] = v + } + return promptInspection{ + Metadata: metadata, + InputSchema: inputSchema, + InputDefault: inputDefault, + OutputSchema: anyToMap(rendered.Output.Schema), + Variables: variablesFromSchema(inputSchema), + }, nil +} + +func anyToMap(v any) map[string]any { + if v == nil { + return nil + } + data, err := json.Marshal(v) + if err != nil { + return nil + } + var out map[string]any + if err := json.Unmarshal(data, &out); err != nil { + return nil + } + return out +} + +func variablesFromSchema(schema map[string]any) []PromptVariable { + props, _ := schema["properties"].(map[string]any) + if len(props) == 0 { + return nil + } + required := map[string]bool{} + if raw, ok := schema["required"].([]any); ok { + for _, item := range raw { + if s, ok := item.(string); ok { + required[s] = true + } + } + } + keys := make([]string, 0, len(props)) + for k := range props { + keys = append(keys, k) + } + sort.Strings(keys) + var vars []PromptVariable + for _, name := range keys { + prop, _ := props[name].(map[string]any) + item := PromptVariable{Name: name, Required: required[name]} + if v, ok := prop["type"].(string); ok { + item.Type = v + } + if v, ok := prop["description"].(string); ok { + item.Description = v + } + vars = append(vars, item) + } + return vars +} + +func promptSourceMatches(summary PromptSummary, source string) bool { + switch source { + case "", "all": + return true + case "embedded": + return summary.SourceKind == "embedded" + case "local": + return summary.SourceKind == "local" + default: + return summary.SourceID == source || strings.EqualFold(summary.Source, source) + } +} + +func promptMatches(summary PromptSummary, filter string) bool { + if filter == "" { + return true + } + haystack := strings.ToLower(strings.Join([]string{ + summary.Name, + summary.Description, + summary.Source, + summary.Path, + summary.RelPath, + summary.Model, + summary.Backend, + }, "\n")) + return strings.Contains(haystack, filter) +} + +func buildPromptSources(ctx context.Context) ([]promptSource, error) { + sources := []promptSource{{ + Kind: "embedded", + ID: "embedded", + Label: "Embedded examples", + WalkRoot: "testdata", + FS: promptlib.Examples, + Writable: false, + }} + + seen := map[string]bool{} + addLocal := func(raw, base string) error { + dir, err := resolvePromptDir(raw, base) + if err != nil { + return err + } + if seen[dir] { + return nil + } + seen[dir] = true + sources = append(sources, promptSource{ + Kind: "local", + ID: hashPromptDir(dir), + Label: dir, + Root: dir, + Writable: true, + }) + return nil + } + + cfg, exists, err := captainconfig.Load() + if err != nil { + return nil, err + } + if exists { + configPath, err := captainconfig.Path() + if err != nil { + return nil, err + } + base := filepath.Dir(configPath) + for _, dir := range cfg.Prompts.Dirs { + if err := addLocal(dir, base); err != nil { + return nil, err + } + } + } + cwd, err := os.Getwd() + if err != nil { + return nil, err + } + for _, dir := range promptDirsFromContext(ctx) { + if err := addLocal(dir, cwd); err != nil { + return nil, err + } + } + if _, ok := firstWritableSource(sources); !ok { + dir := filepath.Join(cwd, ".captain", "prompts") + sources = append(sources, promptSource{ + Kind: "local", + ID: hashPromptDir(dir), + Label: dir, + Root: dir, + Writable: true, + Implicit: true, + }) + } + return sources, nil +} + +func promptDirsFromContext(ctx context.Context) []string { + if ctx == nil { + return nil + } + if dirs, ok := ctx.Value(promptDirsContextKey{}).([]string); ok { + return dirs + } + return nil +} + +func resolvePromptDir(raw, base string) (string, error) { + dir := strings.TrimSpace(raw) + if dir == "" { + return "", fmt.Errorf("prompt dir cannot be empty") + } + if strings.HasPrefix(dir, "~") { + home, err := os.UserHomeDir() + if err != nil { + return "", err + } + switch { + case dir == "~": + dir = home + case strings.HasPrefix(dir, "~/"): + dir = filepath.Join(home, dir[2:]) + default: + return "", fmt.Errorf("unsupported home-relative prompt dir %q", raw) + } + } + if !filepath.IsAbs(dir) { + dir = filepath.Join(base, dir) + } + abs, err := filepath.Abs(dir) + if err != nil { + return "", err + } + info, err := os.Stat(abs) + if err != nil { + return "", fmt.Errorf("prompt dir %s: %w", abs, err) + } + if !info.IsDir() { + return "", fmt.Errorf("prompt dir %s is not a directory", abs) + } + if resolved, err := filepath.EvalSymlinks(abs); err == nil { + abs = resolved + } + return filepath.Clean(abs), nil +} + +func writableSourceByID(sources []promptSource, id string) (promptSource, bool) { + for _, source := range sources { + if source.ID == id && source.Writable { + return source, true + } + } + return promptSource{}, false +} + +func firstWritableSource(sources []promptSource) (promptSource, bool) { + for _, source := range sources { + if source.Writable { + return source, true + } + } + return promptSource{}, false +} + +func safeLocalPromptPath(source promptSource, rel string) (string, error) { + cleanRel := strings.TrimPrefix(filepath.Clean(filepath.FromSlash(rel)), string(filepath.Separator)) + if cleanRel == "." || cleanRel == "" || filepath.IsAbs(rel) || strings.HasPrefix(cleanRel, ".."+string(filepath.Separator)) || cleanRel == ".." { + return "", fmt.Errorf("invalid prompt path %q", rel) + } + if filepath.Ext(cleanRel) != ".prompt" { + return "", fmt.Errorf("prompt path must end with .prompt") + } + full := filepath.Join(source.Root, cleanRel) + abs, err := filepath.Abs(full) + if err != nil { + return "", err + } + relToRoot, err := filepath.Rel(source.Root, abs) + if err != nil { + return "", err + } + if strings.HasPrefix(relToRoot, ".."+string(filepath.Separator)) || relToRoot == ".." || filepath.IsAbs(relToRoot) { + return "", fmt.Errorf("prompt path escapes source root") + } + if info, err := os.Lstat(abs); err == nil && info.Mode()&fs.ModeSymlink != 0 { + return "", fmt.Errorf("prompt symlinks are not supported") + } + return abs, nil +} + +func normalizeWriteRelPath(relPath, name string) (string, error) { + rel := strings.TrimSpace(relPath) + if rel == "" { + rel = slugPromptName(name) + } + if rel == "" { + return "", fmt.Errorf("prompt name or path required") + } + if !strings.HasSuffix(rel, ".prompt") { + rel += ".prompt" + } + rel = filepath.ToSlash(filepath.Clean(filepath.FromSlash(rel))) + if strings.HasPrefix(rel, "../") || rel == ".." || strings.HasPrefix(rel, "/") { + return "", fmt.Errorf("invalid prompt path %q", relPath) + } + return rel, nil +} + +func slugPromptName(name string) string { + name = strings.ToLower(strings.TrimSpace(name)) + var b strings.Builder + lastDash := false + for _, r := range name { + ok := (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') + if ok { + b.WriteRune(r) + lastDash = false + continue + } + if !lastDash { + b.WriteRune('-') + lastDash = true + } + } + return strings.Trim(b.String(), "-") +} + +func encodePromptID(kind, sourceID, rel string) string { + return base64.RawURLEncoding.EncodeToString([]byte(kind + "\x00" + sourceID + "\x00" + filepath.ToSlash(rel))) +} + +func decodePromptID(id string) (promptRef, error) { + data, err := base64.RawURLEncoding.DecodeString(id) + if err != nil { + return promptRef{}, fmt.Errorf("invalid prompt id: %w", err) + } + parts := strings.SplitN(string(data), "\x00", 3) + if len(parts) != 3 || parts[0] == "" || parts[1] == "" || parts[2] == "" { + return promptRef{}, fmt.Errorf("invalid prompt id") + } + return promptRef{Kind: parts[0], SourceID: parts[1], RelPath: filepath.ToSlash(parts[2])}, nil +} + +func hashPromptDir(dir string) string { + sum := sha256.Sum256([]byte(dir)) + return hex.EncodeToString(sum[:])[:12] +} + +func ValidatePromptDirs(dirs []string) error { + cwd, err := os.Getwd() + if err != nil { + return err + } + for _, dir := range dirs { + if _, err := resolvePromptDir(dir, cwd); err != nil { + return err + } + } + return nil +} + +var _ clicky.EntityItem = PromptSummary{} +var _ clickyapi.TableProvider = PromptSummary{} diff --git a/pkg/cli/prompt_entity_test.go b/pkg/cli/prompt_entity_test.go new file mode 100644 index 0000000..b576fce --- /dev/null +++ b/pkg/cli/prompt_entity_test.go @@ -0,0 +1,441 @@ +package cli + +import ( + "context" + "fmt" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/captain/pkg/captainconfig" + "github.com/flanksource/commons-db/shell" +) + +func TestPromptEntityListsEmbeddedExamples(t *testing.T) { + isolateCaptainConfig(t) + + prompts, err := listPrompts(context.Background(), PromptListOptions{Source: "embedded"}) + if err != nil { + t.Fatalf("listPrompts() err = %v", err) + } + + var commit *PromptSummary + for i := range prompts { + if prompts[i].RelPath == "testdata/commit.prompt" { + commit = &prompts[i] + break + } + } + if commit == nil { + t.Fatalf("embedded commit.prompt not found in %d prompts", len(prompts)) + } + if commit.Writable { + t.Fatalf("embedded prompt reported writable") + } + if commit.Model != "claude-sonnet-4-6" { + t.Fatalf("embedded prompt model = %q, want claude-sonnet-4-6", commit.Model) + } + if len(commit.Variables) != 1 || commit.Variables[0].Name != "diff" { + t.Fatalf("embedded prompt variables = %+v, want diff", commit.Variables) + } +} + +func TestPromptEntityUsesProjectPromptDirFallback(t *testing.T) { + isolateCaptainConfig(t) + cwd := t.TempDir() + t.Chdir(cwd) + defaultDir := filepath.Join(cwd, ".captain", "prompts") + + local, err := listPrompts(context.Background(), PromptListOptions{Source: "local"}) + if err != nil { + t.Fatalf("listPrompts(local) err = %v", err) + } + if len(local) != 0 { + t.Fatalf("local prompt count = %d, want 0", len(local)) + } + if _, err := os.Stat(defaultDir); !os.IsNotExist(err) { + t.Fatalf("default prompt dir stat err = %v, want not exist", err) + } + + created, err := createPrompt(context.Background(), map[string]any{ + "name": "Fallback", + "content": `--- +name: Fallback +--- +{{role "user"}} +Hello from fallback +`, + }) + if err != nil { + t.Fatalf("createPrompt() err = %v", err) + } + if !created.Writable { + t.Fatalf("created prompt reported read-only") + } + wantPath := filepath.Join(defaultDir, "fallback.prompt") + if created.Path != wantPath { + t.Fatalf("created path = %q, want %q", created.Path, wantPath) + } + if _, err := os.Stat(wantPath); err != nil { + t.Fatalf("created prompt missing at fallback path: %v", err) + } +} + +func TestPromptEntityCreatesUpdatesRendersAndDeletesLocalPrompt(t *testing.T) { + isolateCaptainConfig(t) + + dir := t.TempDir() + ctx := ContextWithPromptDirs(context.Background(), []string{dir}) + content := `--- +name: Greeting +description: Test prompt +model: claude-sonnet-4-6 +input: + schema: + name: string +--- +{{role "user"}} +Hello {{name}} +` + + created, err := createPrompt(ctx, map[string]any{ + "name": "Greeting", + "content": content, + }) + if err != nil { + t.Fatalf("createPrompt() err = %v", err) + } + if !created.Writable { + t.Fatalf("created prompt reported read-only") + } + if created.RelPath != "greeting.prompt" { + t.Fatalf("created relPath = %q, want greeting.prompt", created.RelPath) + } + if _, err := os.Stat(filepath.Join(dir, "greeting.prompt")); err != nil { + t.Fatalf("created prompt file missing: %v", err) + } + + localPrompts, err := listPrompts(ctx, PromptListOptions{Source: "local", Query: "greet"}) + if err != nil { + t.Fatalf("list local prompts: %v", err) + } + if len(localPrompts) != 1 { + t.Fatalf("local prompt count = %d, want 1", len(localPrompts)) + } + if err := captainconfig.Save(captainconfig.Config{AI: captainconfig.AIDefaults{ + Backend: "codex-cli", + Model: "gpt-5-codex", + }}); err != nil { + t.Fatalf("save config: %v", err) + } + + rendered, err := renderPrompt(ctx, created.ID, PromptRenderRequest{ + Variables: map[string]any{"name": "Ada"}, + }) + if err != nil { + t.Fatalf("renderPrompt() err = %v", err) + } + if rendered.ValidationError != "" { + t.Fatalf("render validation error = %q", rendered.ValidationError) + } + if !strings.Contains(rendered.User, "Hello Ada") { + t.Fatalf("rendered user prompt = %q, want greeting", rendered.User) + } + if rendered.Model != "claude-sonnet-4-6" || rendered.Backend != "anthropic" { + t.Fatalf("rendered model/backend = %s/%s, want claude-sonnet-4-6/anthropic", rendered.Model, rendered.Backend) + } + if rendered.Input.Cwd() == "" || !filepath.IsAbs(rendered.Input.Cwd()) { + t.Fatalf("rendered setup cwd = %q, want absolute", rendered.Input.Cwd()) + } + + updated, err := updatePrompt(ctx, created.ID, map[string]any{ + "content": strings.Replace(content, "Hello {{name}}", "Goodbye {{name}}", 1), + }) + if err != nil { + t.Fatalf("updatePrompt() err = %v", err) + } + if !strings.Contains(updated.Content, "Goodbye") { + t.Fatalf("updated content did not persist: %q", updated.Content) + } + + if err := deletePrompt(ctx, created.ID); err != nil { + t.Fatalf("deletePrompt() err = %v", err) + } + if _, err := os.Stat(filepath.Join(dir, "greeting.prompt")); !os.IsNotExist(err) { + t.Fatalf("deleted prompt stat err = %v, want not exist", err) + } +} + +func TestPromptEntityExposesOutputSchema(t *testing.T) { + isolateCaptainConfig(t) + + dir := t.TempDir() + ctx := ContextWithPromptDirs(context.Background(), []string{dir}) + content := `--- +name: Structured +model: claude-sonnet-4-6 +input: + schema: + topic: string +output: + schema: + answer: string + score: integer +--- +{{role "user"}} +Summarize {{topic}} +` + + created, err := createPrompt(ctx, map[string]any{"name": "Structured", "content": content}) + if err != nil { + t.Fatalf("createPrompt() err = %v", err) + } + + // get → PromptDetail carries the frontmatter output.schema. + detail, err := getPrompt(ctx, created.ID) + if err != nil { + t.Fatalf("getPrompt() err = %v", err) + } + assertSchemaHasProps(t, "detail.OutputSchema", detail.OutputSchema, "answer", "score") + + // render → PromptRenderResult carries the same output schema. + rendered, err := renderPrompt(ctx, created.ID, PromptRenderRequest{ + Variables: map[string]any{"topic": "Go"}, + }) + if err != nil { + t.Fatalf("renderPrompt() err = %v", err) + } + if rendered.ValidationError != "" { + t.Fatalf("render validation error = %q", rendered.ValidationError) + } + assertSchemaHasProps(t, "rendered.OutputSchema", rendered.OutputSchema, "answer", "score") +} + +// assertSchemaHasProps checks a JSON-Schema map exposes the given top-level +// properties, tolerating the exact picoschema-expanded shape. +func assertSchemaHasProps(t *testing.T, label string, schema map[string]any, keys ...string) { + t.Helper() + if schema == nil { + t.Fatalf("%s is nil, want an object schema", label) + } + props, ok := schema["properties"].(map[string]any) + if !ok { + t.Fatalf("%s.properties = %T, want map[string]any", label, schema["properties"]) + } + for _, k := range keys { + if _, ok := props[k]; !ok { + t.Fatalf("%s.properties missing %q; got %v", label, k, props) + } + } +} + +func TestUpdateEmbeddedPromptForksToLocal(t *testing.T) { + isolateCaptainConfig(t) + + dir := t.TempDir() + ctx := ContextWithPromptDirs(context.Background(), []string{dir}) + + embedded, err := findEmbeddedPrompt(ctx, "testdata/commit.prompt") + if err != nil { + t.Fatal(err) + } + if embedded.Writable { + t.Fatalf("embedded prompt reported writable") + } + + original, err := getPrompt(ctx, embedded.ID) + if err != nil { + t.Fatalf("getPrompt(embedded) err = %v", err) + } + newContent := original.Content + "\n{{! local override }}\n" + + forked, err := updatePrompt(ctx, embedded.ID, map[string]any{"content": newContent}) + if err != nil { + t.Fatalf("updatePrompt(embedded) err = %v", err) + } + if !forked.Writable || forked.SourceKind != "local" { + t.Fatalf("forked prompt = kind %q writable %v, want local writable", forked.SourceKind, forked.Writable) + } + if forked.ID == embedded.ID { + t.Fatalf("forked prompt kept embedded id %q", forked.ID) + } + if forked.RelPath != "commit.prompt" { + t.Fatalf("forked relPath = %q, want commit.prompt (testdata/ stripped)", forked.RelPath) + } + if !strings.Contains(forked.Content, "local override") { + t.Fatalf("forked content did not persist edit: %q", forked.Content) + } + if _, err := os.Stat(filepath.Join(dir, "commit.prompt")); err != nil { + t.Fatalf("forked prompt file missing: %v", err) + } + + stillEmbedded, err := getPrompt(ctx, embedded.ID) + if err != nil { + t.Fatalf("getPrompt(embedded) after fork err = %v", err) + } + if strings.Contains(stillEmbedded.Content, "local override") { + t.Fatalf("embedded prompt was mutated by fork") + } + + if _, err := updatePrompt(ctx, embedded.ID, map[string]any{"content": newContent}); err == nil { + t.Fatalf("second fork of same prompt should fail with already-exists") + } +} + +func findEmbeddedPrompt(ctx context.Context, relPath string) (PromptSummary, error) { + prompts, err := listPrompts(ctx, PromptListOptions{Source: "embedded"}) + if err != nil { + return PromptSummary{}, err + } + for _, prompt := range prompts { + if prompt.RelPath == relPath { + return prompt, nil + } + } + return PromptSummary{}, fmt.Errorf("embedded prompt %q not found", relPath) +} + +func TestRenderPromptAppliesRuntimeSpec(t *testing.T) { + isolateCaptainConfig(t) + + dir := t.TempDir() + cwd := t.TempDir() + t.Chdir(cwd) + ctx := ContextWithPromptDirs(context.Background(), []string{dir}) + content := `--- +name: Runtime Spec +model: claude-sonnet-4-6 +--- +{{role "user"}} +Hello {{name}} +` + created, err := createPrompt(ctx, map[string]any{ + "name": "Runtime Spec", + "content": content, + }) + if err != nil { + t.Fatalf("createPrompt() err = %v", err) + } + + temp := 0.2 + rendered, err := renderPrompt(ctx, created.ID, PromptRenderRequest{ + Variables: map[string]any{"name": "Ada"}, + Spec: &api.Spec{ + Model: api.Model{ + Name: "gpt-4o", + ID: "openai/gpt-4o", + Backend: api.BackendOpenAI, + Temperature: &temp, + Effort: api.EffortLow, + NoCache: true, + }, + Prompt: api.Prompt{ + System: "runtime system", + AppendSystem: "runtime append", + Source: "runtime-source", + Metadata: map[string]string{"surface": "prompt-ui"}, + }, + Budget: api.Budget{Cost: 0.5, MaxTokens: 1234, MaxTurns: 4, Timeout: "90s"}, + Permissions: api.Permissions{ + Mode: api.PermissionAcceptEdits, + Presets: []api.Preset{api.PresetEdit}, + Tools: api.Tools{ + Allow: []string{"Read"}, + Deny: []string{"Bash"}, + Modes: map[string]api.ToolMode{"Bash": api.ToolModeDisabled}, + }, + MCP: api.MCP{ + Disabled: true, + Servers: []string{"filesystem"}, + Modes: api.ResourcePolicies{"gavel": api.ResourceDisabled}, + }, + Plugins: api.ResourcePolicies{"/plugins": api.ResourceEnabled}, + Skills: api.ResourcePolicies{"/permission-skills": api.ResourceEnabled}, + }, + Memory: api.Memory{ + Skills: []string{"/skills"}, + SkipUser: true, + SkipMemory: true, + Bare: true, + }, + Setup: &shell.Setup{ + Cwd: "workspace", + DotEnv: []string{".env"}, + Checkout: &shell.Checkout{ + Mode: shell.CheckoutLocal, + Path: "/repo", + Ref: "abc123", + Worktree: &shell.Worktree{ + Mode: shell.WorktreeNew, + Prefix: "runtime-branch", + Keep: true, + }, + }, + }, + SessionID: "sess-runtime", + }, + }) + if err != nil { + t.Fatalf("renderPrompt() err = %v", err) + } + if rendered.ValidationError != "" { + t.Fatalf("render validation error = %q", rendered.ValidationError) + } + if rendered.Model != "gpt-4o" || rendered.Backend != "openai" { + t.Fatalf("rendered model/backend = %s/%s, want gpt-4o/openai", rendered.Model, rendered.Backend) + } + if rendered.Config.Model.ID != "openai/gpt-4o" { + t.Fatalf("config model ID = %q, want openai/gpt-4o", rendered.Config.Model.ID) + } + if rendered.Input.Temperature == nil || *rendered.Input.Temperature != temp { + t.Fatalf("temperature = %v, want %v", rendered.Input.Temperature, temp) + } + if rendered.Input.Budget.Cost != 0.5 || rendered.Input.Budget.MaxTokens != 1234 || + rendered.Input.Budget.MaxTurns != 4 || rendered.Input.Budget.Timeout != "90s" { + t.Fatalf("budget = %+v, want cost/maxTokens override", rendered.Input.Budget) + } + if !rendered.Input.Model.NoCache || !rendered.Config.NoCache { + t.Fatalf("noCache = input %v config %v, want true", rendered.Input.Model.NoCache, rendered.Config.NoCache) + } + if rendered.Input.Prompt.System != "runtime system" || rendered.Input.Prompt.AppendSystem != "runtime append" { + t.Fatalf("prompt system fields = %+v, want runtime overrides", rendered.Input.Prompt) + } + if rendered.Input.Prompt.Source != "runtime-source" || rendered.Input.Prompt.Metadata["surface"] != "prompt-ui" { + t.Fatalf("prompt source/metadata = %+v, want runtime overrides", rendered.Input.Prompt) + } + if rendered.Input.Permissions.Mode != api.PermissionAcceptEdits || + rendered.Input.Permissions.Tools.Modes["Bash"] != api.ToolModeDisabled || + !rendered.Input.Permissions.MCP.Disabled { + t.Fatalf("permissions = %+v, want runtime overrides", rendered.Input.Permissions) + } + if rendered.Input.Permissions.Plugins["/plugins"] != api.ResourceEnabled { + t.Fatalf("plugins = %+v, want enabled runtime plugin", rendered.Input.Permissions.Plugins) + } + if !strings.Contains(strings.Join(rendered.Input.Memory.Skills, ","), "/permission-skills") { + t.Fatalf("skills = %+v, want permission skills merged into memory skills", rendered.Input.Memory.Skills) + } + if !rendered.Input.Memory.SkipUser || !rendered.Input.Memory.SkipMemory || !rendered.Input.Memory.Bare { + t.Fatalf("memory = %+v, want runtime overrides", rendered.Input.Memory) + } + if rendered.Input.Cwd() != filepath.Join(cwd, "workspace") { + t.Fatalf("setup cwd = %q, want cwd-relative runtime dir", rendered.Input.Cwd()) + } + if rendered.Input.Setup == nil || rendered.Input.Setup.Checkout == nil || rendered.Input.Setup.Checkout.Ref != "abc123" { + t.Fatalf("setup checkout = %+v, want runtime git checkout overlay", rendered.Input.Setup) + } + if rendered.Input.Setup.Checkout.Worktree == nil || !rendered.Input.Setup.Checkout.Worktree.Keep { + t.Fatalf("worktree setup = %+v, want runtime worktree overlay", rendered.Input.Setup.Checkout.Worktree) + } + if rendered.Input.SessionID != "sess-runtime" { + t.Fatalf("runtime session = input=%+v", rendered.Input) + } +} + +func isolateCaptainConfig(t *testing.T) { + t.Helper() + path := filepath.Join(t.TempDir(), ".captain.yaml") + captainconfig.SetPathForTesting(path) + t.Cleanup(func() { captainconfig.SetPathForTesting("") }) +} diff --git a/pkg/cli/prompt_run.go b/pkg/cli/prompt_run.go new file mode 100644 index 0000000..a553786 --- /dev/null +++ b/pkg/cli/prompt_run.go @@ -0,0 +1,230 @@ +package cli + +import ( + "context" + "errors" + "fmt" + "time" + + "github.com/flanksource/captain/pkg/ai" + "github.com/flanksource/captain/pkg/ai/agent" + "github.com/flanksource/captain/pkg/ai/agent/verify" + clickyrpc "github.com/flanksource/clicky/rpc" + "github.com/flanksource/clicky/task" + flanksourceContext "github.com/flanksource/commons/context" + "github.com/google/uuid" +) + +// PromptRunResult is the unified result of the "run" action. Over HTTP (serve) +// it carries the async handle (RunID + Status "running") — the web UI then +// streams from /api/captain/prompt/runs/{runId}/stream. On the CLI it carries the +// synchronous result (Text + tokens/cost). One type serves both transports. +type PromptRunResult struct { + RunID string `json:"runId,omitempty"` + Status string `json:"status,omitempty" pretty:"label=Status"` + Model string `json:"model,omitempty" pretty:"label=Model"` + Backend string `json:"backend,omitempty" pretty:"label=Backend"` + + Text string `json:"text,omitempty" pretty:"label=Response"` + SessionID string `json:"sessionId,omitempty" pretty:"label=Session"` + InputTokens int `json:"inputTokens,omitempty" pretty:"label=Input Tokens"` + OutputTokens int `json:"outputTokens,omitempty" pretty:"label=Output Tokens"` + CostUSD float64 `json:"costUSD,omitempty" pretty:"label=Cost USD"` + Duration string `json:"duration,omitempty" pretty:"label=Duration"` +} + +// PromptRunSummary is the terminal payload of a run: the SSE stream ends with it +// and the task's typed result carries it. +type PromptRunSummary struct { + RunID string `json:"runId,omitempty"` + SessionID string `json:"sessionId,omitempty"` + Model string `json:"model,omitempty"` + Backend string `json:"backend,omitempty"` + InputTokens int `json:"inputTokens,omitempty"` + OutputTokens int `json:"outputTokens,omitempty"` + CostUSD float64 `json:"costUSD,omitempty"` + Duration string `json:"duration,omitempty"` + Success bool `json:"success"` + Error string `json:"error,omitempty"` +} + +// runPromptAction renders the prompt (from an id | .prompt filepath | --prompt | +// stdin), then executes it — synchronously on the CLI (returns the text + cost) +// or asynchronously over HTTP (returns a run handle to stream from). This is the +// single prompt-run implementation; `captain ai prompt` is a deprecated alias. +func runPromptAction(ctx context.Context, id string, flags map[string]string) (PromptRunResult, error) { + _, isHTTP := clickyrpc.RequestFromContext(ctx) + + var rendered PromptRenderResult + var opts AIPromptOptions + if isHTTP { + req, err := readRenderRequest(ctx, flags) + if err != nil { + return PromptRunResult{}, err + } + if rendered, err = renderPrompt(ctx, id, req); err != nil { + return PromptRunResult{}, err + } + } else { + var err error + if opts, err = actionFlagsToOptions(flags); err != nil { + return PromptRunResult{}, err + } + if rendered, err = renderPromptCLI(ctx, id, opts, flags["vars"], readStdinIfCLI(ctx)); err != nil { + return PromptRunResult{}, err + } + } + if rendered.ValidationError != "" { + return PromptRunResult{}, errors.New(rendered.ValidationError) + } + + if isHTTP { + return launchAsyncRun(id, rendered), nil + } + return executeSyncRun(ctx, rendered, opts) +} + +// launchAsyncRun starts the background clicky task + SSE stream and returns the +// run handle (the serve/web-UI contract). +func launchAsyncRun(id string, rendered PromptRenderResult) PromptRunResult { + runID := uuid.NewString() + stream := promptRuns.create(runID) + timeout := runtimeTimeout(rendered.Input.Budget.Timeout) + + group := task.StartGroup[PromptRunSummary]( + "prompt "+rendered.Name, + task.WithGroupID(runID), + task.WithKind("prompt"), + task.WithLabels(map[string]string{ + "promptId": id, + "model": rendered.Model, + "backend": rendered.Backend, + }), + ) + group.Add("execute", func(_ flanksourceContext.Context, t *task.Task) (PromptRunSummary, error) { + return runPromptStream(t, rendered, timeout, runID, stream) + }) + return PromptRunResult{RunID: runID, Status: "running", Model: rendered.Model, Backend: rendered.Backend} +} + +// executeSyncRun runs the prompt in-process (CLI) — live output to stderr, final +// result returned — and persists the realized prompt for the launched session. +func executeSyncRun(ctx context.Context, rendered PromptRenderResult, opts AIPromptOptions) (PromptRunResult, error) { + out, err := executePromptRequest(ctx, rendered.Input, rendered.Config, runtimeTimeout(rendered.Input.Budget.Timeout), opts.NoStream) + if err != nil { + return PromptRunResult{}, err + } + r, _ := out.(AIPromptResult) + if r.SessionID != "" { + if st := sessionStore(); st != nil { + st.upsertPrompt(StoredPrompt{ + SessionID: r.SessionID, + Model: r.Model, + Backend: r.Backend, + Realized: rendered, + }) + } + } + return PromptRunResult{ + Status: "completed", + Model: r.Model, + Backend: r.Backend, + Text: r.Text, + SessionID: r.SessionID, + InputTokens: r.InputTokens, + OutputTokens: r.Output, + CostUSD: r.CostUSD, + Duration: r.Duration, + }, nil +} + +// runPromptStream drives a single streaming iteration, converting each ai.Event +// into a SessionEntry frame (published to stream) while driving the task's live +// status. It runs on clicky's worker goroutine and derives its context from the +// task (t.Context()), not the HTTP request, so the run outlives the POST. +func runPromptStream(t *task.Task, rendered PromptRenderResult, timeout time.Duration, runID string, stream *runStream) (PromptRunSummary, error) { + ctx, cancel := runContext(t.Context(), rendered.Input, timeout) + defer cancel() + ctx = ai.ContextWithLogger(ctx, t) + + req := rendered.Input + cfg := rendered.Config + p, cleanup, err := buildProvider(ctx, &req, cfg) + if err != nil { + return failRun(t, stream, err) + } + defer cleanup() + + streamer, ok := p.(ai.StreamingProvider) + if !ok && !req.IsVerifyOnly() { + return failRun(t, stream, fmt.Errorf("backend %s does not support streaming", rendered.Backend)) + } + + start := time.Now() + acc := newPromptEventAccumulator(stream.publish, t, rendered.Model, rendered.Backend) + acc.cwd = req.Cwd() + + // Drive the generate→verify loop declared by spec.Workflow via the hook + // runner: no verify ⇒ a single generation; verify commands re-run on failure + // (feedback appended) up to maxIterations; a body-less spec verifies only. + runner := &agent.Runner[string]{ + Provider: streamer, + Request: req, + Hooks: verify.HooksForWorkflow(req.Workflow), + MaxIterations: verify.MaxIterationsForWorkflow(req.Workflow), + Repo: req.Cwd(), + Cwd: req.Cwd(), + Scope: verify.ScopeForWorkflow(req.Workflow), + OnEvent: acc.handle, + } + runResult, err := runner.Run(ctx) + if err != nil { + return failRun(t, stream, err) + } + loop := runResult.Loop + + session := acc.sessionID + if session == "" && runResult.Response.Workspace != nil { + session = runResult.Response.Workspace.SessionID + } + if session == "" && loop != nil && len(loop.Iterations) > 0 { + session = loop.Iterations[0].SessionID + } + // Persist the realized prompt for this launched session so `sessions get` can + // show what produced it. External (non-captain) sessions have no such record. + if session != "" { + if st := sessionStore(); st != nil { + st.upsertPrompt(StoredPrompt{ + SessionID: session, + RunID: runID, + Model: acc.model, + Backend: rendered.Backend, + Realized: rendered, + }) + } + } + passed := verifyPassed(runResult.Verdicts) + summary := PromptRunSummary{ + RunID: runID, + SessionID: session, + Model: acc.model, + Backend: rendered.Backend, + InputTokens: acc.usage.InputTokens, + OutputTokens: acc.usage.OutputTokens, + CostUSD: acc.cost, + Duration: time.Since(start).Round(time.Millisecond).String(), + Success: passed, + } + if !passed { + summary.Error = verifyReason(runResult.Verdicts) + } + stream.complete(summary) + t.Success() + return summary, nil +} + +func failRun(t *task.Task, stream *runStream, err error) (PromptRunSummary, error) { + stream.fail(err.Error()) + _, _ = t.FailedWithError(err) + return PromptRunSummary{Error: err.Error()}, err +} diff --git a/pkg/cli/prompt_run_events.go b/pkg/cli/prompt_run_events.go new file mode 100644 index 0000000..cafb6f3 --- /dev/null +++ b/pkg/cli/prompt_run_events.go @@ -0,0 +1,245 @@ +package cli + +import ( + "fmt" + "strings" + + "github.com/flanksource/captain/pkg/ai" + "github.com/flanksource/captain/pkg/session" + "github.com/segmentio/encoding/json" +) + +// taskSink is the subset of *task.Task the accumulator drives. Injecting it as +// an interface keeps the ai.Event → session.Message mapping unit-testable +// without a live clicky task. +type taskSink interface { + SetDescription(string) + SetProgress(value, maximum int) + Infof(format string, args ...interface{}) + Warnf(format string, args ...interface{}) + Errorf(format string, args ...interface{}) +} + +// promptEventAccumulator converts the ai.Event stream of one prompt run into +// unified session.Message frames (the shape SessionViewer consumes) and drives +// the backing task's live status. It coalesces consecutive text/reasoning deltas +// into a single message keyed by a stable id so the viewer replaces-in-place, +// and correlates each tool call with its later result via ToolCallID. +type promptEventAccumulator struct { + emit func(session.Message) + task taskSink + + sessionID string + model string + backend string + cwd string + + toolByID map[string]*session.Message + + seq int // monotonic turn counter for text/reasoning/error ids + textID string // non-empty while a text turn is in flight + textBuf strings.Builder + thinkID string // non-empty while a reasoning turn is in flight + thinkBuf strings.Builder + + tools int + usage ai.Usage + cost float64 +} + +func newPromptEventAccumulator(emit func(session.Message), t taskSink, model, backend string) *promptEventAccumulator { + return &promptEventAccumulator{ + emit: emit, + task: t, + model: model, + backend: backend, + toolByID: map[string]*session.Message{}, + } +} + +// handle maps a single ai.Event. It matches the ai.LoopOptions.OnEvent +// signature; the iteration index is unused (prompt runs are single-iteration). +func (a *promptEventAccumulator) handle(_ int, ev ai.Event) { + if ev.Model != "" { + a.model = ev.Model + } + switch ev.Kind { + case ai.EventSystem: + if ev.SessionID != "" { + a.sessionID = ev.SessionID + } + a.task.SetDescription("starting") + if ev.SessionID != "" { + a.task.Infof("session %s", ev.SessionID) + } + case ai.EventThinking: + a.appendThinking(ev.Text) + a.task.SetDescription("thinking") + case ai.EventText: + a.appendText(ev.Text) + a.task.SetDescription("responding") + case ai.EventToolUse: + a.flush() + a.emitToolUse(ev) + case ai.EventToolResult: + a.emitToolResult(ev) + case ai.EventPermission: + a.task.Warnf("permission: %s awaiting approval", ev.Tool) + case ai.EventError: + a.flush() + a.emitError(ev) + case ai.EventResult: + a.flush() + if ev.Usage != nil { + a.usage = *ev.Usage + } + a.cost = ev.CostUSD + a.task.SetDescription("done") + } +} + +// provenance is the transcript metadata carried on each live message. +func (a *promptEventAccumulator) provenance() *session.Provenance { + return &session.Provenance{SessionID: a.sessionID, CWD: a.cwd, Model: a.model, Source: a.backend} +} + +func (a *promptEventAccumulator) appendText(delta string) { + if delta == "" { + return + } + if a.thinkID != "" { + a.thinkID = "" + a.thinkBuf.Reset() + } + if a.textID == "" { + a.textID = a.nextID("text") + } + a.textBuf.WriteString(delta) + a.emit(session.Message{ + ID: a.textID, + Role: "assistant", + Parts: []session.Part{{Type: session.PartText, Text: a.textBuf.String()}}, + Provenance: a.provenance(), + }) +} + +func (a *promptEventAccumulator) appendThinking(delta string) { + if delta == "" { + return + } + if a.textID != "" { + a.textID = "" + a.textBuf.Reset() + } + if a.thinkID == "" { + a.thinkID = a.nextID("think") + } + a.thinkBuf.WriteString(delta) + a.emit(session.Message{ + ID: a.thinkID, + Role: "assistant", + Parts: []session.Part{{Type: session.PartReasoning, Text: a.thinkBuf.String()}}, + Provenance: a.provenance(), + }) +} + +// flush finalizes any in-flight text/reasoning turn so the next one starts a +// fresh id. +func (a *promptEventAccumulator) flush() { + a.textID = "" + a.textBuf.Reset() + a.thinkID = "" + a.thinkBuf.Reset() +} + +func (a *promptEventAccumulator) emitToolUse(ev ai.Event) { + a.tools++ + msg := &session.Message{ + ID: a.toolID(ev.ToolCallID), + Role: "assistant", + Parts: []session.Part{{ + Type: session.PartTool, + ToolName: ev.Tool, + ToolCallID: ev.ToolCallID, + State: session.ToolStateInputAvailable, + Input: mapToRaw(ev.Input), + }}, + Provenance: a.provenance(), + } + if ev.ToolCallID != "" { + a.toolByID[ev.ToolCallID] = msg + } + a.task.SetProgress(a.tools, 0) + a.task.SetDescription("tool: " + ev.Tool) + a.task.Infof("tool %s", ev.Tool) + a.emit(*msg) +} + +func (a *promptEventAccumulator) emitToolResult(ev ai.Event) { + msg := a.toolByID[ev.ToolCallID] + if msg == nil { + msg = &session.Message{ + ID: a.toolID(ev.ToolCallID), + Role: "assistant", + Parts: []session.Part{{Type: session.PartTool, ToolCallID: ev.ToolCallID}}, + Provenance: a.provenance(), + } + if ev.ToolCallID != "" { + a.toolByID[ev.ToolCallID] = msg + } + } + text, state := ev.Text, session.ToolStateOutputAvailable + if !ev.Success { + a.task.Warnf("tool %s failed", msg.Parts[0].ToolName) + text = "[error] " + ev.Text + state = session.ToolStateOutputError + } + // Re-emit the same id so the viewer merges the output into the tool row. + msg.Parts[0].Output = textToRaw(text) + msg.Parts[0].State = state + a.emit(*msg) +} + +func (a *promptEventAccumulator) emitError(ev ai.Event) { + a.task.Errorf("%s", ev.Error) + a.emit(session.Message{ + ID: a.nextID("error"), + Role: "assistant", + Parts: []session.Part{{Type: session.PartText, Text: ev.Error}}, + Provenance: a.provenance(), + }) +} + +func (a *promptEventAccumulator) nextID(kind string) string { + a.seq++ + return fmt.Sprintf("%s-%d", kind, a.seq) +} + +// toolID keys a tool message by its ToolCallID so the call and its later result +// share an identity. Falls back to a monotonic id when the backend omits one. +func (a *promptEventAccumulator) toolID(id string) string { + if id != "" { + return id + } + return a.nextID("tool") +} + +// mapToRaw encodes a tool input map as a Part's Input JSON; empty → nil. +func mapToRaw(m map[string]any) json.RawMessage { + if len(m) == 0 { + return nil + } + if b, err := json.Marshal(m); err == nil { + return b + } + return nil +} + +// textToRaw encodes tool output text as a JSON string, the form the viewer +// renders directly. +func textToRaw(s string) json.RawMessage { + if b, err := json.Marshal(s); err == nil { + return b + } + return nil +} diff --git a/pkg/cli/prompt_run_events_test.go b/pkg/cli/prompt_run_events_test.go new file mode 100644 index 0000000..86360f0 --- /dev/null +++ b/pkg/cli/prompt_run_events_test.go @@ -0,0 +1,137 @@ +package cli + +import ( + "strings" + "testing" + + "github.com/flanksource/captain/pkg/ai" + "github.com/flanksource/captain/pkg/session" + "github.com/segmentio/encoding/json" +) + +type fakeTaskSink struct{} + +func (fakeTaskSink) SetDescription(string) {} +func (fakeTaskSink) SetProgress(int, int) {} +func (fakeTaskSink) Infof(string, ...interface{}) {} +func (fakeTaskSink) Warnf(string, ...interface{}) {} +func (fakeTaskSink) Errorf(string, ...interface{}) {} + +func collectEntries(model, backend string, events ...ai.Event) []session.Message { + var out []session.Message + acc := newPromptEventAccumulator(func(m session.Message) { out = append(out, m) }, fakeTaskSink{}, model, backend) + for _, ev := range events { + acc.handle(0, ev) + } + return out +} + +// partText decodes a tool part's JSON-string Output back to plain text. +func partText(raw json.RawMessage) string { + var s string + _ = json.Unmarshal(raw, &s) + return s +} + +func TestPromptRunAccumulator_CoalescesTextDeltas(t *testing.T) { + msgs := collectEntries("m", "b", + ai.Event{Kind: ai.EventText, Text: "Hello "}, + ai.Event{Kind: ai.EventText, Text: "world"}, + ) + if len(msgs) != 2 { + t.Fatalf("want one frame per delta (2), got %d", len(msgs)) + } + if msgs[0].ID != msgs[1].ID { + t.Fatalf("text deltas must share an id: %q vs %q", msgs[0].ID, msgs[1].ID) + } + if got := msgs[1].Parts[0].Text; got != "Hello world" { + t.Fatalf("coalesced text = %q, want %q", got, "Hello world") + } +} + +func TestPromptRunAccumulator_ThinkingAndTextAreSeparateTurns(t *testing.T) { + msgs := collectEntries("m", "b", + ai.Event{Kind: ai.EventThinking, Text: "hmm"}, + ai.Event{Kind: ai.EventText, Text: "answer"}, + ) + if len(msgs) != 2 { + t.Fatalf("want 2 frames, got %d", len(msgs)) + } + if msgs[0].ID == msgs[1].ID { + t.Fatalf("thinking and text must not share an id") + } + if msgs[0].Parts[0].Type != session.PartReasoning { + t.Fatalf("first frame part type = %q, want reasoning", msgs[0].Parts[0].Type) + } + if msgs[1].Parts[0].Type != session.PartText { + t.Fatalf("second frame part type = %q, want text", msgs[1].Parts[0].Type) + } +} + +func TestPromptRunAccumulator_CorrelatesToolResult(t *testing.T) { + msgs := collectEntries("m", "claude", + ai.Event{Kind: ai.EventToolUse, Tool: "Bash", Input: map[string]any{"command": "ls"}, ToolCallID: "t1"}, + ai.Event{Kind: ai.EventToolResult, Text: "file.txt", Success: true, ToolCallID: "t1"}, + ) + if len(msgs) != 2 { + t.Fatalf("want 2 frames (use + result), got %d", len(msgs)) + } + for i, m := range msgs { + if m.ID != "t1" { + t.Fatalf("frame %d id = %q, want tool call id t1", i, m.ID) + } + if m.Parts[0].Type != session.PartTool { + t.Fatalf("frame %d part type = %q, want a tool part", i, m.Parts[0].Type) + } + } + if got := partText(msgs[1].Parts[0].Output); got != "file.txt" { + t.Fatalf("tool output = %q, want file.txt", got) + } + if msgs[1].Parts[0].ToolName != "Bash" { + t.Fatalf("result frame must carry original tool name, got %q", msgs[1].Parts[0].ToolName) + } + if msgs[1].Parts[0].State != session.ToolStateOutputAvailable { + t.Fatalf("result state = %q, want output-available", msgs[1].Parts[0].State) + } +} + +func TestPromptRunAccumulator_MarksFailedToolResult(t *testing.T) { + msgs := collectEntries("m", "claude", + ai.Event{Kind: ai.EventToolUse, Tool: "Bash", ToolCallID: "t1"}, + ai.Event{Kind: ai.EventToolResult, Text: "boom", Success: false, ToolCallID: "t1"}, + ) + last := msgs[len(msgs)-1].Parts[0] + if resp := partText(last.Output); !strings.HasPrefix(resp, "[error]") { + t.Fatalf("failed tool output = %q, want [error] prefix", resp) + } + if last.State != session.ToolStateOutputError { + t.Fatalf("failed tool state = %q, want output-error", last.State) + } +} + +func TestPromptRunAccumulator_EmitsErrorFrame(t *testing.T) { + msgs := collectEntries("m", "b", + ai.Event{Kind: ai.EventError, Error: "rate limited"}, + ) + if len(msgs) != 1 { + t.Fatalf("want 1 error frame, got %d", len(msgs)) + } + if got := msgs[0].Parts[0].Text; got != "rate limited" { + t.Fatalf("error frame text = %q, want rate limited", got) + } +} + +func TestPromptRunAccumulator_CapturesSessionAndUsage(t *testing.T) { + acc := newPromptEventAccumulator(func(session.Message) {}, fakeTaskSink{}, "m", "b") + acc.handle(0, ai.Event{Kind: ai.EventSystem, SessionID: "sess-1"}) + acc.handle(0, ai.Event{Kind: ai.EventResult, Usage: &ai.Usage{InputTokens: 10, OutputTokens: 4}, CostUSD: 0.02}) + if acc.sessionID != "sess-1" { + t.Fatalf("sessionID = %q, want sess-1", acc.sessionID) + } + if acc.usage.InputTokens != 10 || acc.usage.OutputTokens != 4 { + t.Fatalf("usage = %+v, want 10/4", acc.usage) + } + if acc.cost != 0.02 { + t.Fatalf("cost = %v, want 0.02", acc.cost) + } +} diff --git a/pkg/cli/prompt_run_stream.go b/pkg/cli/prompt_run_stream.go new file mode 100644 index 0000000..80a456d --- /dev/null +++ b/pkg/cli/prompt_run_stream.go @@ -0,0 +1,275 @@ +package cli + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "sync" + "time" + + "github.com/flanksource/captain/pkg/session" +) + +// runSubBuffer bounds each SSE subscriber's channel. A subscriber that can't +// keep up is dropped (and reconnects to replay) rather than stalling the run. +const runSubBuffer = 64 + +// runStream is the in-process pub/sub buffer for one prompt run's session.Message +// frames. Every frame is buffered for replay to late/reconnecting subscribers +// and fanned out to current subscribers. +type runStream struct { + mu sync.Mutex + entries []session.Message + subs map[chan session.Message]struct{} + done bool + summary *PromptRunSummary + errMsg string + endedAt time.Time +} + +func newRunStream() *runStream { + return &runStream{subs: map[chan session.Message]struct{}{}} +} + +// publish appends a frame and fans it out. A subscriber whose buffer is full is +// dropped (it can reconnect and replay) rather than blocking the producer. +func (s *runStream) publish(e session.Message) { + s.mu.Lock() + defer s.mu.Unlock() + if s.done { + return + } + s.entries = append(s.entries, e) + for ch := range s.subs { + select { + case ch <- e: + default: + delete(s.subs, ch) + close(ch) + } + } +} + +// complete marks the run finished successfully and closes all subscribers. +func (s *runStream) complete(sum PromptRunSummary) { s.finish(&sum, "") } + +// fail marks the run finished with an error and closes all subscribers. +func (s *runStream) fail(msg string) { s.finish(nil, msg) } + +func (s *runStream) finish(sum *PromptRunSummary, errMsg string) { + s.mu.Lock() + defer s.mu.Unlock() + if s.done { + return + } + s.done = true + s.summary = sum + s.errMsg = errMsg + s.endedAt = time.Now() + for ch := range s.subs { + delete(s.subs, ch) + close(ch) + } +} + +// subscribe atomically snapshots the replay buffer and registers a live channel +// under one lock, so no frame is missed between replay and live delivery. When +// the run already finished, ch is nil and the terminal state is returned. +func (s *runStream) subscribe() (replay []session.Message, ch chan session.Message, done bool, summary *PromptRunSummary, errMsg string) { + s.mu.Lock() + defer s.mu.Unlock() + replay = append([]session.Message(nil), s.entries...) + if s.done { + return replay, nil, true, s.summary, s.errMsg + } + ch = make(chan session.Message, runSubBuffer) + s.subs[ch] = struct{}{} + return replay, ch, false, nil, "" +} + +func (s *runStream) unsubscribe(ch chan session.Message) { + if ch == nil { + return + } + s.mu.Lock() + defer s.mu.Unlock() + if _, ok := s.subs[ch]; ok { + delete(s.subs, ch) + close(ch) + } +} + +func (s *runStream) state() (bool, *PromptRunSummary, string) { + s.mu.Lock() + defer s.mu.Unlock() + return s.done, s.summary, s.errMsg +} + +func (s *runStream) snapshot() ([]session.Message, bool, *PromptRunSummary, string) { + s.mu.Lock() + defer s.mu.Unlock() + return append([]session.Message(nil), s.entries...), s.done, s.summary, s.errMsg +} + +func (s *runStream) terminalAt() (bool, time.Time) { + s.mu.Lock() + defer s.mu.Unlock() + return s.done, s.endedAt +} + +// runBroker owns the live runStreams keyed by run id. +type runBroker struct { + mu sync.Mutex + runs map[string]*runStream +} + +var promptRuns = &runBroker{runs: map[string]*runStream{}} + +func (b *runBroker) create(runID string) *runStream { + b.mu.Lock() + defer b.mu.Unlock() + s := newRunStream() + b.runs[runID] = s + return s +} + +func (b *runBroker) get(runID string) (*runStream, bool) { + b.mu.Lock() + defer b.mu.Unlock() + s, ok := b.runs[runID] + return s, ok +} + +// prunePromptRuns periodically evicts finished runs older than the retention +// window (aligned with clicky's ~10min task GC) until ctx is cancelled. +func prunePromptRuns(ctx context.Context, b *runBroker) { + ticker := time.NewTicker(time.Minute) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + b.prune(15 * time.Minute) + } + } +} + +// prune drops finished runs whose end time is older than maxAge. Live runs are +// always retained. +func (b *runBroker) prune(maxAge time.Duration) { + cutoff := time.Now().Add(-maxAge) + b.mu.Lock() + defer b.mu.Unlock() + for id, s := range b.runs { + if done, end := s.terminalAt(); done && !end.IsZero() && end.Before(cutoff) { + delete(b.runs, id) + } + } +} + +type promptRunSnapshotBody struct { + Entries []session.Message `json:"entries"` + Done bool `json:"done"` + Summary *PromptRunSummary `json:"summary,omitempty"` + Error string `json:"error,omitempty"` +} + +// handlePromptRunStream streams a run's session.Message frames as SSE: +// +// event: entry data: (one per frame; replayed on connect) +// event: done data: (terminal, success) +// event: error data: {"error": "..."} (terminal, failure) +func handlePromptRunStream(b *runBroker) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + stream, ok := b.get(r.PathValue("runId")) + if !ok { + http.Error(w, "unknown run", http.StatusNotFound) + return + } + flusher, ok := w.(http.Flusher) + if !ok { + http.Error(w, "streaming unsupported", http.StatusInternalServerError) + return + } + setSSEHeaders(w) + + replay, ch, done, summary, errMsg := stream.subscribe() + defer stream.unsubscribe(ch) + for _, e := range replay { + writeSSE(w, "entry", e) + } + if done { + writeTerminal(w, summary, errMsg) + flusher.Flush() + return + } + flusher.Flush() + + heartbeat := time.NewTicker(15 * time.Second) + defer heartbeat.Stop() + for { + select { + case <-r.Context().Done(): + return + case e, open := <-ch: + if !open { + if d, sum, em := stream.state(); d { + writeTerminal(w, sum, em) + flusher.Flush() + } + return + } + writeSSE(w, "entry", e) + flusher.Flush() + case <-heartbeat.C: + fmt.Fprint(w, ": ping\n\n") + flusher.Flush() + } + } + } +} + +// handlePromptRunSnapshot returns the full buffered state for initial load or +// reconnect fallback. +func handlePromptRunSnapshot(b *runBroker) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + stream, ok := b.get(r.PathValue("runId")) + if !ok { + http.Error(w, "unknown run", http.StatusNotFound) + return + } + entries, done, summary, errMsg := stream.snapshot() + w.Header().Set("Content-Type", "application/json") + _ = json.NewEncoder(w).Encode(promptRunSnapshotBody{Entries: entries, Done: done, Summary: summary, Error: errMsg}) + } +} + +func setSSEHeaders(w http.ResponseWriter) { + h := w.Header() + h.Set("Content-Type", "text/event-stream") + h.Set("Cache-Control", "no-cache") + h.Set("Connection", "keep-alive") + h.Set("X-Accel-Buffering", "no") +} + +func writeSSE(w http.ResponseWriter, event string, v any) { + data, err := json.Marshal(v) + if err != nil { + log.Warnf("prompt run stream: dropping %q frame: marshal failed: %v", event, err) + return + } + fmt.Fprintf(w, "event: %s\ndata: %s\n\n", event, data) +} + +func writeTerminal(w http.ResponseWriter, summary *PromptRunSummary, errMsg string) { + switch { + case errMsg != "": + writeSSE(w, "error", map[string]string{"error": errMsg}) + case summary != nil: + writeSSE(w, "done", summary) + default: + writeSSE(w, "done", map[string]string{"status": "completed"}) + } +} diff --git a/pkg/cli/prompt_run_stream_test.go b/pkg/cli/prompt_run_stream_test.go new file mode 100644 index 0000000..f296a28 --- /dev/null +++ b/pkg/cli/prompt_run_stream_test.go @@ -0,0 +1,151 @@ +package cli + +import ( + "encoding/json" + "fmt" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/flanksource/captain/pkg/session" +) + +func TestRunStream_ReplayThenLive(t *testing.T) { + s := newRunStream() + s.publish(session.Message{ID: "a"}) + s.publish(session.Message{ID: "b"}) + + replay, ch, done, _, _ := s.subscribe() + if done { + t.Fatal("stream should not be done") + } + if len(replay) != 2 || replay[0].ID != "a" || replay[1].ID != "b" { + t.Fatalf("replay = %+v, want [a b]", replay) + } + + s.publish(session.Message{ID: "c"}) + select { + case e := <-ch: + if e.ID != "c" { + t.Fatalf("live frame = %q, want c", e.ID) + } + case <-time.After(time.Second): + t.Fatal("did not receive live frame") + } + + s.complete(PromptRunSummary{RunID: "r", Success: true}) + if _, open := <-ch; open { + t.Fatal("channel should be closed after complete") + } +} + +func TestRunStream_SubscribeAfterDone(t *testing.T) { + s := newRunStream() + s.publish(session.Message{ID: "a"}) + s.complete(PromptRunSummary{RunID: "r", Success: true, Duration: "1s"}) + + replay, ch, done, summary, errMsg := s.subscribe() + if !done || ch != nil { + t.Fatalf("subscribe after done: done=%v ch=%v, want done + nil ch", done, ch) + } + if len(replay) != 1 { + t.Fatalf("replay len = %d, want 1", len(replay)) + } + if summary == nil || !summary.Success { + t.Fatalf("summary = %+v, want Success", summary) + } + if errMsg != "" { + t.Fatalf("errMsg = %q, want empty", errMsg) + } +} + +func TestRunStream_Fail(t *testing.T) { + s := newRunStream() + s.fail("boom") + _, _, done, summary, errMsg := s.subscribe() + if !done || summary != nil || errMsg != "boom" { + t.Fatalf("fail state: done=%v summary=%v err=%q", done, summary, errMsg) + } +} + +func TestRunStream_DropsSlowSubscriber(t *testing.T) { + s := newRunStream() + _, ch, _, _, _ := s.subscribe() + + // Never drain ch; publish more than the buffer. The producer must not block. + pumped := make(chan struct{}) + go func() { + for i := 0; i < runSubBuffer+10; i++ { + s.publish(session.Message{ID: fmt.Sprintf("e%d", i)}) + } + close(pumped) + }() + select { + case <-pumped: + case <-time.After(2 * time.Second): + t.Fatal("producer blocked on a slow subscriber") + } + + // The subscriber was dropped once full, so ch is closed; range terminates. + drained := 0 + for range ch { + drained++ + } + if drained > runSubBuffer { + t.Fatalf("drained %d, want <= buffer %d (subscriber should be dropped)", drained, runSubBuffer) + } +} + +func TestRunBroker_PruneRemovesFinishedOldRuns(t *testing.T) { + b := &runBroker{runs: map[string]*runStream{}} + b.create("live") + old := b.create("old") + old.complete(PromptRunSummary{RunID: "old"}) + old.mu.Lock() + old.endedAt = time.Now().Add(-time.Hour) + old.mu.Unlock() + + b.prune(15 * time.Minute) + + if _, ok := b.get("old"); ok { + t.Fatal("old finished run should be pruned") + } + if _, ok := b.get("live"); !ok { + t.Fatal("live run must be retained") + } +} + +func TestHandlePromptRunSnapshot(t *testing.T) { + b := &runBroker{runs: map[string]*runStream{}} + s := b.create("r1") + s.publish(session.Message{ID: "a"}) + s.complete(PromptRunSummary{RunID: "r1", Success: true, Model: "m"}) + + req := httptest.NewRequest(http.MethodGet, "/api/captain/prompt/runs/r1", nil) + req.SetPathValue("runId", "r1") + rec := httptest.NewRecorder() + handlePromptRunSnapshot(b)(rec, req) + + if rec.Code != http.StatusOK { + t.Fatalf("status = %d, want 200", rec.Code) + } + var body promptRunSnapshotBody + if err := json.Unmarshal(rec.Body.Bytes(), &body); err != nil { + t.Fatalf("decode: %v", err) + } + if !body.Done || len(body.Entries) != 1 || body.Summary == nil || body.Summary.Model != "m" { + t.Fatalf("snapshot body = %+v", body) + } +} + +func TestHandlePromptRunSnapshot_NotFound(t *testing.T) { + b := &runBroker{runs: map[string]*runStream{}} + req := httptest.NewRequest(http.MethodGet, "/api/captain/prompt/runs/none", nil) + req.SetPathValue("runId", "none") + rec := httptest.NewRecorder() + handlePromptRunSnapshot(b)(rec, req) + if rec.Code != http.StatusNotFound { + t.Fatalf("status = %d, want 404", rec.Code) + } +} diff --git a/pkg/cli/prompt_schema.go b/pkg/cli/prompt_schema.go new file mode 100644 index 0000000..ee226ed --- /dev/null +++ b/pkg/cli/prompt_schema.go @@ -0,0 +1,215 @@ +package cli + +import ( + "encoding/json" + "fmt" + "io" + "sync" + "time" + + "github.com/flanksource/captain/pkg/ai" + "github.com/flanksource/captain/pkg/api" + clickyrpc "github.com/flanksource/clicky/rpc" + "github.com/spf13/cobra" +) + +// AttachPromptSchemaFlag adds `captain prompt --schema` to the generated prompt +// entity root. The prompt command itself is generated by clicky.GenerateCLI, so +// this hook wraps the generated list RunE after registration. +func AttachPromptSchemaFlag(root *cobra.Command) error { + promptCmd, _, err := root.Find([]string{"prompt"}) + if err != nil { + return fmt.Errorf("find prompt command: %w", err) + } + if promptCmd == nil || promptCmd.Name() != "prompt" { + return fmt.Errorf("find prompt command: got %v", promptCmd) + } + + var schema bool + promptCmd.Flags().BoolVar(&schema, "schema", false, "Print prompt/spec editor JSON schemas and exit") + originalArgs := promptCmd.Args + originalRunE := promptCmd.RunE + promptCmd.Args = func(cmd *cobra.Command, args []string) error { + if schema { + if len(args) > 0 { + return fmt.Errorf("--schema takes no positional arguments (got %v)", args) + } + return nil + } + if originalArgs != nil { + return originalArgs(cmd, args) + } + return nil + } + promptCmd.RunE = func(cmd *cobra.Command, args []string) error { + if schema { + return WritePromptSchema(cmd.OutOrStdout()) + } + if originalRunE != nil { + return originalRunE(cmd, args) + } + return cmd.Help() + } + return nil +} + +func WritePromptSchema(w io.Writer) error { + doc, err := PromptSchemaDocument() + if err != nil { + return err + } + enc := json.NewEncoder(w) + enc.SetIndent("", " ") + return enc.Encode(doc) +} + +// PromptSchemaDocument assembles the prompt/spec editor schema document from the +// live runtime: the cmux "extra args" reflected from Go structs (cached, since +// they never change within a process) and the available backends/models probed +// from the environment via whoami (cached with a short TTL so a long-running +// serve process reflects key/model changes without re-probing per request). +func PromptSchemaDocument() (map[string]any, error) { + adapters, err := cachedSchemaAdapters(time.Now()) + if err != nil { + return nil, err + } + return buildPromptSchemaDocument(adapters) +} + +// probeSchemaAdapters is the live probe used to source backends and models. It is +// a package var so tests can substitute a deterministic, network-free stub. +var probeSchemaAdapters = func() ([]AdapterStatus, error) { + return ProbeAdapters(WhoamiOptions{Models: true}, osAuthProbe()) +} + +const schemaAdapterCacheTTL = 60 * time.Second + +var ( + schemaAdapterMu sync.Mutex + schemaAdapterCache []AdapterStatus + schemaAdapterAt time.Time +) + +// cachedSchemaAdapters returns the probed adapters, reusing a cached probe within +// the TTL. A probe error is never cached: the next call retries so a transient +// failure does not permanently empty the schema. +func cachedSchemaAdapters(now time.Time) ([]AdapterStatus, error) { + schemaAdapterMu.Lock() + defer schemaAdapterMu.Unlock() + if schemaAdapterCache != nil && now.Sub(schemaAdapterAt) < schemaAdapterCacheTTL { + return schemaAdapterCache, nil + } + adapters, err := probeSchemaAdapters() + if err != nil { + return nil, err + } + schemaAdapterCache = adapters + schemaAdapterAt = now + return adapters, nil +} + +// reflectedSchemaBytes holds the JSON of the reflection-derived schemas. They are +// process-immutable, so they are reflected once and re-parsed into a fresh map +// per document (parsing yields an independent copy that conditional injection can +// mutate without corrupting the cache). +type reflectedSchemaBytes struct { + spec []byte + prompt []byte + promptAction []byte + args map[api.Backend][]byte // per-backend cmux "extra args" schema +} + +var reflectedSchemas = sync.OnceValues(func() (reflectedSchemaBytes, error) { + spec, err := json.Marshal(api.Schema(&api.Spec{})) + if err != nil { + return reflectedSchemaBytes{}, fmt.Errorf("reflect spec schema: %w", err) + } + prompt, err := json.Marshal(api.Schema(&api.Prompt{})) + if err != nil { + return reflectedSchemaBytes{}, fmt.Errorf("reflect prompt schema: %w", err) + } + action, err := json.Marshal(clickyrpc.SchemaForStruct(PromptActionFlags{})) + if err != nil { + return reflectedSchemaBytes{}, fmt.Errorf("reflect promptAction schema: %w", err) + } + args, err := backendArgSchemasJSON() + if err != nil { + return reflectedSchemaBytes{}, err + } + return reflectedSchemaBytes{spec: spec, prompt: prompt, promptAction: action, args: args}, nil +}) + +// promptSchemaExampleSpec is a portable, self-consistent example: no machine paths, +// a model resolved from the catalog default, and cliArgs that only use fields the +// selected backend (claude-cmux) actually accepts. +func promptSchemaExampleSpec() map[string]any { + return map[string]any{ + "model": exampleModelName(), + "backend": string(api.BackendClaudeCmux), + "effort": string(api.EffortMedium), + "temperature": 0.2, + "noCache": true, + "prompt": map[string]any{ + "user": "Update the prompt runtime editor and keep the payload compact.", + "system": "Answer with direct implementation guidance.", + "appendSystem": "Prefer existing clicky-ui primitives.", + "source": "storybook/demo.prompt", + "metadata": map[string]any{ + "surface": "prompt-workbench", + "owner": "captain", + }, + }, + "budget": map[string]any{ + "cost": 0.5, + "maxTokens": 8000, + "maxTurns": 6, + "timeout": "30m", + }, + "permissions": map[string]any{ + "mode": string(api.PermissionAcceptEdits), + "presets": []string{string(api.PresetEdit)}, + "tools": map[string]any{ + "Read": "allow", + "Edit": "ask", + "Bash": "deny", + }, + "mcp": map[string]any{ + "filesystem": "enabled", + "gavel": "disabled", + }, + "plugins": map[string]any{ + ".claude/plugins/example": "disabled", + }, + "skills": map[string]any{ + ".agents/skills/example-skill": "enabled", + }, + }, + "memory": map[string]any{ + "skipHooks": true, + "skills": []string{".agents/skills/example-skill"}, + }, + "setup": map[string]any{ + "cwd": ".", + "baseDir": ".shell", + "dotenv": []string{".env", ".env.local"}, + "env": []string{ + "CAPTAIN_RUNTIME=storybook", + "GAVEL_PROFILE=local", + }, + }, + "cliArgs": map[string]any{ + "addDir": []string{"packages/ui"}, + "mcpConfig": []string{"./mcp.json"}, + }, + } +} + +// exampleModelName resolves the catalog default to the bare model slug used in the +// spec's `model` field (e.g. "claude-sonnet-5"), falling back to the raw id. +func exampleModelName() string { + m, err := ai.LookupModel(ai.DefaultModelID) + if err != nil { + return ai.DefaultModelID + } + return m.BareID() +} diff --git a/pkg/cli/prompt_schema_build.go b/pkg/cli/prompt_schema_build.go new file mode 100644 index 0000000..84222fe --- /dev/null +++ b/pkg/cli/prompt_schema_build.go @@ -0,0 +1,251 @@ +package cli + +import ( + "encoding/json" + "fmt" + "strings" + + "github.com/flanksource/captain/pkg/ai" + "github.com/flanksource/captain/pkg/api" + clickyrpc "github.com/flanksource/clicky/rpc" +) + +// buildPromptSchemaDocument is the pure assembler (no I/O), taking a probed +// adapter set so tests can drive it with a deterministic, network-free stub. +func buildPromptSchemaDocument(adapters []AdapterStatus) (map[string]any, error) { + adapters = withCatalogModelFallback(adapters) + + reflected, err := reflectedSchemas() + if err != nil { + return nil, err + } + + specMap, err := unmarshalMap(reflected.spec) + if err != nil { + return nil, fmt.Errorf("decode spec schema: %w", err) + } + promptMap, err := unmarshalMap(reflected.prompt) + if err != nil { + return nil, fmt.Errorf("decode prompt schema: %w", err) + } + actionMap, err := unmarshalMap(reflected.promptAction) + if err != nil { + return nil, fmt.Errorf("decode promptAction schema: %w", err) + } + + if err := injectSpecConditionals(specMap, adapters, reflected.args); err != nil { + return nil, err + } + backends, err := buildBackendsCatalog(adapters, reflected.args) + if err != nil { + return nil, err + } + + return map[string]any{ + "schemaVersion": 2, + "source": "captain prompt --schema", + "spec": specMap, + "prompt": promptMap, + "promptAction": actionMap, + "backends": backends, + "models": flatModels(adapters), + "examples": map[string]any{ + "spec": promptSchemaExampleSpec(), + }, + }, nil +} + +// backendArgSchemasJSON reflects each backend's cmux "extra args" option struct +// into a JSON schema, keyed by backend. Backends without cmux options +// (CLIOptionsFor fails loud) are simply absent — this is the source of truth for +// "which backends have args". +func backendArgSchemasJSON() (map[api.Backend][]byte, error) { + out := map[api.Backend][]byte{} + for _, b := range api.AllBackends() { + opts, err := api.CLIOptionsFor(b) + if err != nil { + continue // backend has no cmux args + } + raw, err := json.Marshal(clickyrpc.SchemaForStruct(opts)) + if err != nil { + return nil, fmt.Errorf("reflect %s cli args: %w", b, err) + } + out[b] = raw + } + return out, nil +} + +// buildBackendsCatalog renders every backend as a catalog entry: its kind, auth +// env vars, live auth/model status from the probe, and (where available) its +// args schema. This replaces the old duplicated claudeCLIArgs/codexCLIArgs keys. +func buildBackendsCatalog(adapters []AdapterStatus, argsByBackend map[api.Backend][]byte) ([]map[string]any, error) { + out := make([]map[string]any, 0, len(adapters)) + for _, a := range adapters { + b := api.Backend(a.Backend) + entry := map[string]any{ + "backend": a.Backend, + "kind": b.Kind(), + "authenticated": a.Authenticated, + "ready": a.Ready(), + } + if env := api.AuthEnvVars(b); len(env) > 0 { + entry["authEnvVars"] = env + } + if a.Binary != "" { + entry["binary"] = a.Binary + } + if a.BinaryMissing != "" { + entry["binaryMissing"] = a.BinaryMissing + } + if len(a.Models) > 0 { + entry["models"] = a.Models + } + if a.ModelError != "" { + entry["modelError"] = a.ModelError + } + if raw, ok := argsByBackend[b]; ok { + argsMap, err := unmarshalMap(raw) + if err != nil { + return nil, fmt.Errorf("decode %s args schema: %w", b, err) + } + entry["args"] = argsMap + } + out = append(out, entry) + } + return out, nil +} + +// injectSpecConditionals adds one JSON-Schema if/then per backend to the spec so +// that, once a backend is chosen, `cliArgs` is constrained to that backend's args +// ($ref into $defs, or forbidden for non-cmux backends) and `model` is restricted +// to that backend's available models. The allOf sits at the spec root beside the +// invopop $ref (both apply as in-place applicators under draft 2020-12); cmux arg +// schemas are added under the root $defs and referenced, so the same schema +// appears in backends[].args without source duplication. +func injectSpecConditionals(specMap map[string]any, adapters []AdapterStatus, argsByBackend map[api.Backend][]byte) error { + defs, _ := specMap["$defs"].(map[string]any) + if defs == nil { + defs = map[string]any{} + specMap["$defs"] = defs + } + + allOf := make([]any, 0, len(adapters)) + for _, a := range adapters { + b := api.Backend(a.Backend) + thenProps := map[string]any{} + + if raw, ok := argsByBackend[b]; ok { + name := argDefName(b) + argsMap, err := unmarshalMap(raw) + if err != nil { + return fmt.Errorf("decode %s args schema: %w", b, err) + } + defs[name] = argsMap + thenProps["cliArgs"] = map[string]any{"$ref": "#/$defs/" + name} + } else { + // Non-cmux providers ignore cliArgs; forbid it so a misplaced value + // is a validation error rather than silently dropped. + thenProps["cliArgs"] = false + } + + if len(a.Models) > 0 { + thenProps["model"] = map[string]any{"enum": toAnySlice(a.Models)} + } + + allOf = append(allOf, map[string]any{ + "if": map[string]any{ + "required": []any{"backend"}, + "properties": map[string]any{"backend": map[string]any{"const": a.Backend}}, + }, + "then": map[string]any{"properties": thenProps}, + }) + } + specMap["allOf"] = allOf + return nil +} + +// withCatalogModelFallback fills a backend's model list from the static catalog +// when it is unauthenticated and the live probe returned nothing, so the editor +// still offers model choices instead of an empty enum. The catalog answered, so +// the "set your key" hint is cleared. CLI/agent backends already list catalog +// models regardless of auth, so this only affects unauthenticated API backends +// (and no-ops where the catalog has no entry, e.g. the cmux backends). +func withCatalogModelFallback(adapters []AdapterStatus) []AdapterStatus { + out := make([]AdapterStatus, len(adapters)) + for i, a := range adapters { + if !a.Authenticated && len(a.Models) == 0 { + if ids := catalogModelIDs(api.Backend(a.Backend)); len(ids) > 0 { + a.Models = ids + a.ModelError = "" + } + } + out[i] = a + } + return out +} + +// catalogModelIDs returns the catalog's model slugs for a backend, bare (no +// provider prefix) to match how spec.model names models. +func catalogModelIDs(b api.Backend) []string { + var out []string + for _, m := range ai.Catalog() { + if m.Backend == b { + out = append(out, m.BareID()) + } + } + return out +} + +// flatModels is a convenience union of every available model across adapters. +func flatModels(adapters []AdapterStatus) []map[string]any { + out := []map[string]any{} + for _, a := range adapters { + for _, id := range a.Models { + out = append(out, map[string]any{ + "id": id, + "backend": a.Backend, + "ready": a.Ready(), + }) + } + } + return out +} + +// argDefName is the $defs key for a backend's args schema, e.g. +// "claude-cmux" -> "claudeCmuxArgs". +func argDefName(b api.Backend) string { + parts := strings.Split(string(b), "-") + var sb strings.Builder + for i, p := range parts { + if i == 0 { + sb.WriteString(p) + continue + } + sb.WriteString(upperFirst(p)) + } + sb.WriteString("Args") + return sb.String() +} + +func upperFirst(s string) string { + if s == "" { + return s + } + return strings.ToUpper(s[:1]) + s[1:] +} + +func unmarshalMap(raw []byte) (map[string]any, error) { + var m map[string]any + if err := json.Unmarshal(raw, &m); err != nil { + return nil, err + } + return m, nil +} + +func toAnySlice(ss []string) []any { + out := make([]any, len(ss)) + for i, s := range ss { + out[i] = s + } + return out +} diff --git a/pkg/cli/prompt_schema_http.go b/pkg/cli/prompt_schema_http.go new file mode 100644 index 0000000..3f04c04 --- /dev/null +++ b/pkg/cli/prompt_schema_http.go @@ -0,0 +1,26 @@ +package cli + +import ( + "encoding/json" + "net/http" +) + +// handlePromptSchema serves the prompt/spec editor schema document +// (PromptSchemaDocument): the reflected spec/prompt schemas plus the dynamic +// backends[] catalog (each with its per-backend cliArgs schema and available +// models) and the if/then conditionals. The webapp SpecEditor drives its +// per-backend CLI-arg options from this one cached document instead of +// re-fetching a flat schema per backend. +func handlePromptSchema() http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + doc, err := PromptSchemaDocument() + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + w.Header().Set("Content-Type", "application/json") + if err := json.NewEncoder(w).Encode(doc); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + } + } +} diff --git a/pkg/cli/prompt_schema_http_test.go b/pkg/cli/prompt_schema_http_test.go new file mode 100644 index 0000000..cc5dddc --- /dev/null +++ b/pkg/cli/prompt_schema_http_test.go @@ -0,0 +1,43 @@ +package cli + +import ( + "encoding/json" + "net/http" + "net/http/httptest" + "testing" + "time" +) + +func TestHandlePromptSchemaServesDocument(t *testing.T) { + prevProbe := probeSchemaAdapters + prevCache, prevAt := schemaAdapterCache, schemaAdapterAt + t.Cleanup(func() { + probeSchemaAdapters = prevProbe + schemaAdapterCache, schemaAdapterAt = prevCache, prevAt + }) + stub := stubbedSchemaAdapters(t) + probeSchemaAdapters = func() ([]AdapterStatus, error) { return stub, nil } + schemaAdapterCache, schemaAdapterAt = nil, time.Time{} + + req := httptest.NewRequest(http.MethodGet, "/api/captain/ai/prompt/schema", nil) + rec := httptest.NewRecorder() + handlePromptSchema()(rec, req) + + if rec.Code != http.StatusOK { + t.Fatalf("status = %d, want 200; body: %s", rec.Code, rec.Body.String()) + } + if ct := rec.Header().Get("Content-Type"); ct != "application/json" { + t.Errorf("Content-Type = %q, want application/json", ct) + } + + var doc map[string]any + if err := json.Unmarshal(rec.Body.Bytes(), &doc); err != nil { + t.Fatalf("response is not valid JSON: %v", err) + } + if _, ok := doc["backends"].([]any); !ok { + t.Fatalf("response has no backends[] array: %#v", doc["backends"]) + } + if _, ok := doc["spec"].(map[string]any); !ok { + t.Fatalf("response has no spec schema object") + } +} diff --git a/pkg/cli/prompt_schema_test.go b/pkg/cli/prompt_schema_test.go new file mode 100644 index 0000000..cec64cb --- /dev/null +++ b/pkg/cli/prompt_schema_test.go @@ -0,0 +1,248 @@ +package cli + +import ( + "bytes" + "encoding/json" + "io" + "strings" + "testing" + "time" + + "github.com/flanksource/captain/pkg/api" + "github.com/spf13/cobra" +) + +// fakeSchemaProbe reports no API keys and no CLI login files but all CLI binaries +// present. This keeps the probe hermetic (fetchAPIModels makes no network call +// without an API key) while CLI/agent backends still list their static catalog +// models, giving a deterministic adapter set. +func fakeSchemaProbe() authProbe { + return authProbe{ + getenv: func(string) string { return "" }, + lookPath: func(bin string) (string, error) { return "/usr/local/bin/" + bin, nil }, + fileExists: func(string) bool { return false }, + home: "/home/test", + } +} + +func stubbedSchemaAdapters(t *testing.T) []AdapterStatus { + t.Helper() + adapters, err := ProbeAdapters(WhoamiOptions{Models: true}, fakeSchemaProbe()) + if err != nil { + t.Fatalf("ProbeAdapters: %v", err) + } + return adapters +} + +func TestPromptSchemaDocumentBackendsAndConditionals(t *testing.T) { + doc, err := buildPromptSchemaDocument(stubbedSchemaAdapters(t)) + if err != nil { + t.Fatalf("buildPromptSchemaDocument: %v", err) + } + if doc["schemaVersion"].(int) != 2 { + t.Fatalf("schemaVersion = %v, want 2", doc["schemaVersion"]) + } + + backends := doc["backends"].([]map[string]any) + if len(backends) != len(api.AllBackends()) { + t.Fatalf("backends length = %d, want %d", len(backends), len(api.AllBackends())) + } + byName := map[string]map[string]any{} + for _, e := range backends { + byName[e["backend"].(string)] = e + } + for _, b := range api.AllBackends() { + e, ok := byName[string(b)] + if !ok { + t.Fatalf("backends[] missing %q", b) + } + _, hasArgs := e["args"] + wantArgs := b == api.BackendClaudeCmux || b == api.BackendCodexCmux + if hasArgs != wantArgs { + t.Errorf("backend %s args present = %v, want %v", b, hasArgs, wantArgs) + } + } + + // codex-cli's models come from the static catalog (one entry, AgentModel + // "gpt-5-codex") - an independent baseline unaffected by API keys. + codexModels := byName[string(api.BackendCodexCLI)]["models"].([]string) + if !contains(codexModels, "gpt-5-codex") { + t.Errorf("codex-cli models = %v, want to contain gpt-5-codex", codexModels) + } + + // anthropic is unauthenticated in the fake probe, so its models fall back to + // the catalog and the "set your key" hint is cleared. + anthropic := byName[string(api.BackendAnthropic)] + anthropicModels, _ := anthropic["models"].([]string) + if !contains(anthropicModels, "claude-sonnet-5") { + t.Errorf("unauthenticated anthropic models = %v, want catalog fallback incl claude-sonnet-5", anthropicModels) + } + if _, hasErr := anthropic["modelError"]; hasErr { + t.Errorf("anthropic should carry no modelError once the catalog answers") + } + + spec := doc["spec"].(map[string]any) + allOf := spec["allOf"].([]any) + if len(allOf) != len(api.AllBackends()) { + t.Fatalf("spec.allOf length = %d, want %d", len(allOf), len(api.AllBackends())) + } + thenByBackend := map[string]map[string]any{} + for _, c := range allOf { + cm := c.(map[string]any) + backend := cm["if"].(map[string]any)["properties"].(map[string]any)["backend"].(map[string]any)["const"].(string) + thenByBackend[backend] = cm["then"].(map[string]any)["properties"].(map[string]any) + } + + // cmux backends: cliArgs constrained by a $ref into $defs. + defs := spec["$defs"].(map[string]any) + for _, b := range []api.Backend{api.BackendClaudeCmux, api.BackendCodexCmux} { + name := argDefName(b) + if _, ok := defs[name]; !ok { + t.Errorf("spec.$defs missing %q", name) + } + ref := thenByBackend[string(b)]["cliArgs"].(map[string]any)["$ref"].(string) + if ref != "#/$defs/"+name { + t.Errorf("backend %s cliArgs $ref = %q, want #/$defs/%s", b, ref, name) + } + } + // non-cmux backend: cliArgs forbidden. + if forbidden := thenByBackend[string(api.BackendAnthropic)]["cliArgs"]; forbidden != false { + t.Errorf("anthropic then.cliArgs = %v, want false", forbidden) + } + + // Every backend's model enum matches that backend's live model list; backends + // with no models carry no model constraint. + for _, e := range backends { + backend := e["backend"].(string) + models, _ := e["models"].([]string) + enumWrap, hasEnum := thenByBackend[backend]["model"] + if len(models) == 0 { + if hasEnum { + t.Errorf("backend %s has a model enum but no models", backend) + } + continue + } + enum := enumWrap.(map[string]any)["enum"].([]any) + if len(enum) != len(models) { + t.Fatalf("backend %s enum length %d != models length %d", backend, len(enum), len(models)) + } + for i := range models { + if enum[i].(string) != models[i] { + t.Errorf("backend %s enum[%d] = %q, want %q", backend, i, enum[i], models[i]) + } + } + } +} + +func TestPromptSchemaExampleIsPortable(t *testing.T) { + ex := promptSchemaExampleSpec() + + raw, err := json.Marshal(ex) + if err != nil { + t.Fatalf("marshal example: %v", err) + } + if bytes.Contains(raw, []byte("/Users/")) { + t.Errorf("example leaks a machine home path: %s", raw) + } + + model := ex["model"].(string) + if strings.Contains(model, "/") { + t.Errorf("example model %q should be a bare slug (no provider prefix)", model) + } + if _, err := api.InferBackend(model); err != nil { + t.Errorf("example model %q does not resolve to a backend: %v", model, err) + } + + // The example selects claude-cmux, so its cliArgs must validate as + // ClaudeCmuxOptions — matching the schema's per-backend conditional. + argsRaw, err := json.Marshal(ex["cliArgs"]) + if err != nil { + t.Fatalf("marshal example cliArgs: %v", err) + } + dec := json.NewDecoder(bytes.NewReader(argsRaw)) + dec.DisallowUnknownFields() + var opts api.ClaudeCmuxOptions + if err := dec.Decode(&opts); err != nil { + t.Errorf("example cliArgs are not valid ClaudeCmuxOptions: %v", err) + } +} + +func TestCachedSchemaAdaptersReusesWithinTTL(t *testing.T) { + prevProbe := probeSchemaAdapters + prevCache, prevAt := schemaAdapterCache, schemaAdapterAt + t.Cleanup(func() { + probeSchemaAdapters = prevProbe + schemaAdapterCache, schemaAdapterAt = prevCache, prevAt + }) + + stub := stubbedSchemaAdapters(t) + calls := 0 + probeSchemaAdapters = func() ([]AdapterStatus, error) { + calls++ + return stub, nil + } + schemaAdapterCache, schemaAdapterAt = nil, time.Time{} + + base := time.Unix(1_000_000, 0) + if _, err := cachedSchemaAdapters(base); err != nil { + t.Fatalf("cachedSchemaAdapters: %v", err) + } + if _, err := cachedSchemaAdapters(base.Add(10 * time.Second)); err != nil { + t.Fatalf("cachedSchemaAdapters: %v", err) + } + if calls != 1 { + t.Errorf("probe called %d times within TTL, want 1", calls) + } + if _, err := cachedSchemaAdapters(base.Add(2 * schemaAdapterCacheTTL)); err != nil { + t.Fatalf("cachedSchemaAdapters: %v", err) + } + if calls != 2 { + t.Errorf("probe called %d times after TTL expiry, want 2", calls) + } +} + +func TestWritePromptSchemaEmitsValidJSON(t *testing.T) { + prevProbe := probeSchemaAdapters + prevCache, prevAt := schemaAdapterCache, schemaAdapterAt + t.Cleanup(func() { + probeSchemaAdapters = prevProbe + schemaAdapterCache, schemaAdapterAt = prevCache, prevAt + }) + stub := stubbedSchemaAdapters(t) + probeSchemaAdapters = func() ([]AdapterStatus, error) { return stub, nil } + schemaAdapterCache, schemaAdapterAt = nil, time.Time{} + + var buf bytes.Buffer + if err := WritePromptSchema(&buf); err != nil { + t.Fatalf("WritePromptSchema: %v", err) + } + var decoded map[string]any + if err := json.Unmarshal(buf.Bytes(), &decoded); err != nil { + t.Fatalf("schema output is not valid JSON: %v\n%s", err, buf.String()) + } + if decoded["source"] != "captain prompt --schema" { + t.Errorf("source = %v", decoded["source"]) + } + if decoded["schemaVersion"].(float64) != 2 { + t.Errorf("schemaVersion = %v, want 2", decoded["schemaVersion"]) + } +} + +func TestPromptSchemaFlagRejectsPositionalArgs(t *testing.T) { + root := &cobra.Command{Use: "captain"} + root.AddCommand(&cobra.Command{Use: "prompt", RunE: func(*cobra.Command, []string) error { return nil }}) + if err := AttachPromptSchemaFlag(root); err != nil { + t.Fatalf("AttachPromptSchemaFlag: %v", err) + } + + root.SetArgs([]string{"prompt", "--schema", "unexpected"}) + root.SetOut(io.Discard) + root.SetErr(io.Discard) + err := root.Execute() + if err == nil { + t.Fatal("expected an error when --schema is given positional arguments") + } + if !strings.Contains(err.Error(), "positional") { + t.Errorf("error = %q, want it to mention positional arguments", err) + } +} diff --git a/pkg/cli/prompt_source.go b/pkg/cli/prompt_source.go new file mode 100644 index 0000000..ffd4dbc --- /dev/null +++ b/pkg/cli/prompt_source.go @@ -0,0 +1,196 @@ +package cli + +import ( + "context" + "encoding/json" + "fmt" + "io" + "os" + "strconv" + "strings" + + "github.com/flanksource/captain/pkg/ai" + promptlib "github.com/flanksource/captain/pkg/ai/prompt" + "github.com/flanksource/captain/pkg/claude" + clickyrpc "github.com/flanksource/clicky/rpc" +) + +// readStdinIfCLI returns piped stdin, but only on the CLI path — there is no +// process stdin over HTTP. +func readStdinIfCLI(ctx context.Context) string { + if _, isHTTP := clickyrpc.RequestFromContext(ctx); isHTTP { + return "" + } + if !claude.IsStdinPiped() { + return "" + } + b, err := io.ReadAll(os.Stdin) + if err != nil { + return "" + } + return string(b) +} + +// loadPromptContent resolves the prompt source for the unified prompt commands. +// Precedence: the positional (a .prompt filepath or a registry id) > --prompt/-p +// text > piped stdin. usedStdin reports whether stdin became the prompt body (so +// the caller does not also expose it as the {{input}} variable). +func loadPromptContent(ctx context.Context, id string, opts AIPromptOptions, stdin string) (content, source string, usedStdin bool, record promptRecord, err error) { + switch { + case strings.TrimSpace(id) != "": + record, err := resolvePromptRecord(ctx, id) // .prompt filepath or registry id + if err != nil { + return "", "", false, promptRecord{}, err + } + if record.Source.Kind == "file" { + log.Debugf("prompt source: file %s (positional %q)", record.Path, id) + } else { + log.Debugf("prompt source: registry id %q → %s/%s", id, record.Source.Kind, record.Rel) + } + c, err := readPromptContent(record) + if err != nil { + return "", "", false, promptRecord{}, err + } + return c, record.Rel, false, record, nil + case opts.Prompt != "": + log.Debugf("prompt source: inline --prompt/-p (%d chars)", len(opts.Prompt)) + return opts.Prompt, "", false, promptRecord{Rel: "inline.prompt"}, nil + case strings.TrimSpace(stdin) != "": + log.Debugf("prompt source: stdin (%d chars)", len(stdin)) + return stdin, "", true, promptRecord{Rel: "stdin.prompt"}, nil + default: + return "", "", false, promptRecord{}, fmt.Errorf("prompt required: pass a .prompt file/id, --prompt/-p text, or pipe via stdin") + } +} + +// promptVars builds the template data from --var key=value pairs and a --vars +// JSON blob; unused stdin is exposed as {{input}}. +func promptVars(opts AIPromptOptions, varsJSON, stdin string, usedStdin bool) (map[string]any, error) { + data := map[string]any{} + if s := strings.TrimSpace(varsJSON); s != "" { + if err := json.Unmarshal([]byte(s), &data); err != nil { + return nil, fmt.Errorf("parse --vars JSON: %w", err) + } + } + kv, err := parseVars(opts.Var) + if err != nil { + return nil, err + } + for k, v := range kv { + data[k] = v + } + if s := strings.TrimSpace(stdin); s != "" && !usedStdin { + data["input"] = s + } + return data, nil +} + +// renderLoadedContent renders already-loaded .prompt content with vars, overlays +// the CLI options, tags the source, and normalizes the context dir. +func renderLoadedContent(content, source string, vars map[string]any, opts AIPromptOptions) (ai.Request, ai.Config, error) { + fileReq, fileCfg, err := promptlib.Load(content).Render(vars, nil) + if err != nil { + return ai.Request{}, ai.Config{}, err + } + req, cfg, err := overlayCLI(fileReq, fileCfg, opts) + if err != nil { + return ai.Request{}, ai.Config{}, err + } + req.Prompt.Source = source + cwd, err := os.Getwd() + if err != nil { + return ai.Request{}, ai.Config{}, fmt.Errorf("get working directory: %w", err) + } + if err := normalizePromptContextDir(&req, cwd); err != nil { + return ai.Request{}, ai.Config{}, err + } + return req, cfg, nil +} + +// renderPromptSource is the single render pipeline shared by run and the +// deprecated ai-prompt alias: load content → render → overlay → normalize. +func renderPromptSource(ctx context.Context, id string, opts AIPromptOptions, varsJSON, stdin string) (ai.Request, ai.Config, error) { + content, source, usedStdin, _, err := loadPromptContent(ctx, id, opts, stdin) + if err != nil { + return ai.Request{}, ai.Config{}, err + } + vars, err := promptVars(opts, varsJSON, stdin, usedStdin) + if err != nil { + return ai.Request{}, ai.Config{}, err + } + return renderLoadedContent(content, source, vars, opts) +} + +// actionFlagsToOptions reconstructs the typed AIPromptOptions from the entity +// action's stringly-typed flag map (clicky CSV-encodes []string and "true"/"false" +// for bool), so the render/run core can reuse overlayCLI. +func actionFlagsToOptions(f map[string]string) (AIPromptOptions, error) { + var o AIPromptOptions + o.Model = f["model"] + o.Fallback = flagSlice(f["fallback"]) + o.Backend = f["backend"] + o.APIKey = f["api-key"] + o.NoCache = flagBool(f["no-cache"]) + o.Budget = f["budget"] + mt, err := flagInt("max-tokens", f["max-tokens"]) + if err != nil { + return o, err + } + o.MaxTokens = mt + o.Temperature = f["temperature"] + o.Effort = f["effort"] + turns, err := flagInt("max-turns", f["max-turns"]) + if err != nil { + return o, err + } + o.MaxTurns = turns + o.Resume = f["resume"] + o.Edit = flagBool(f["edit"]) + o.AllowedTools = flagSlice(f["allowed-tools"]) + o.DisallowedTools = flagSlice(f["disallowed-tools"]) + o.PermissionMode = f["permission-mode"] + o.NoMCP = flagBool(f["no-mcp"]) + o.NoHooks = flagBool(f["no-hooks"]) + o.NoSkills = flagBool(f["no-skills"]) + o.SkillDirs = flagSlice(f["skill-dir"]) + o.NoUser = flagBool(f["no-user"]) + o.NoProject = flagBool(f["no-project"]) + o.NoMemory = flagBool(f["no-memory"]) + o.Bare = flagBool(f["bare"]) + o.Prompt = f["prompt"] + o.System = f["system"] + o.AppendSystem = f["append-system"] + o.Var = flagSlice(f["var"]) + o.Timeout = f["timeout"] + o.NoStream = flagBool(f["no-stream"]) + return o, nil +} + +func flagBool(s string) bool { return strings.EqualFold(strings.TrimSpace(s), "true") } + +func flagInt(name, s string) (int, error) { + s = strings.TrimSpace(s) + if s == "" { + return 0, nil + } + n, err := strconv.Atoi(s) + if err != nil { + return 0, fmt.Errorf("invalid --%s %q: %w", name, s, err) + } + return n, nil +} + +func flagSlice(s string) []string { + s = strings.TrimSpace(s) + if s == "" { + return nil + } + parts := strings.Split(s, ",") + out := make([]string, 0, len(parts)) + for _, p := range parts { + if p = strings.TrimSpace(p); p != "" { + out = append(out, p) + } + } + return out +} diff --git a/pkg/cli/prompt_source_test.go b/pkg/cli/prompt_source_test.go new file mode 100644 index 0000000..2e6ff09 --- /dev/null +++ b/pkg/cli/prompt_source_test.go @@ -0,0 +1,93 @@ +package cli + +import ( + "context" + "os" + "path/filepath" + "testing" +) + +func TestActionFlagsToOptions_DecodesSlicesBoolsInts(t *testing.T) { + f := map[string]string{ + "model": "gpt-4o", + "backend": "openai", + "no-stream": "true", + "edit": "true", + "allowed-tools": "Read,Write", + "skill-dir": "/a,/b", + "max-tokens": "1234", + "var": "a=1,b=2", + "prompt": "hi", + "permission-mode": "plan", + } + o, err := actionFlagsToOptions(f) + if err != nil { + t.Fatalf("actionFlagsToOptions: %v", err) + } + if o.Model != "gpt-4o" || o.Backend != "openai" || o.Prompt != "hi" || o.PermissionMode != "plan" { + t.Fatalf("scalars = %+v", o) + } + if !o.NoStream || !o.Edit { + t.Errorf("bools not decoded: NoStream=%v Edit=%v", o.NoStream, o.Edit) + } + if o.MaxTokens != 1234 { + t.Errorf("max-tokens = %d, want 1234", o.MaxTokens) + } + if len(o.AllowedTools) != 2 || o.AllowedTools[0] != "Read" || o.AllowedTools[1] != "Write" { + t.Errorf("allowed-tools = %v", o.AllowedTools) + } + if len(o.SkillDirs) != 2 || o.SkillDirs[0] != "/a" { + t.Errorf("skill-dir = %v", o.SkillDirs) + } + if len(o.Var) != 2 || o.Var[0] != "a=1" { + t.Errorf("var = %v", o.Var) + } + if _, err := actionFlagsToOptions(map[string]string{"max-tokens": "nope"}); err == nil { + t.Error("expected error on non-numeric max-tokens") + } +} + +func TestLooksLikePromptPath(t *testing.T) { + paths := []string{"foo.prompt", "./foo.prompt", "/abs/foo.prompt", "dir/foo", ".hidden"} + for _, p := range paths { + if !looksLikePromptPath(p) { + t.Errorf("%q should look like a path", p) + } + } + ids := []string{"Zm9vAGJhcgBiYXoucHJvbXB0", "abc123"} // base64-raw-url ids + for _, id := range ids { + if looksLikePromptPath(id) { + t.Errorf("%q should look like an id, not a path", id) + } + } +} + +func TestLoadPromptContent_Sources(t *testing.T) { + ctx := context.Background() + dir := t.TempDir() + path := filepath.Join(dir, "greet.prompt") + body := "---\nmodel: claude-opus-4\n---\n{{role \"user\"}}\nHello\n" + if err := os.WriteFile(path, []byte(body), 0o644); err != nil { + t.Fatal(err) + } + + // filepath positional + content, _, usedStdin, _, err := loadPromptContent(ctx, path, AIPromptOptions{}, "") + if err != nil || content != body || usedStdin { + t.Fatalf("file source: content=%q usedStdin=%v err=%v", content, usedStdin, err) + } + // --prompt/-p text (positional empty) + content, _, _, _, err = loadPromptContent(ctx, "", AIPromptOptions{AIRuntimeOptions: AIRuntimeOptions{}, Prompt: "inline body"}, "") + if err != nil || content != "inline body" { + t.Fatalf("prompt source: content=%q err=%v", content, err) + } + // stdin + content, _, usedStdin, _, err = loadPromptContent(ctx, "", AIPromptOptions{}, "piped body") + if err != nil || content != "piped body" || !usedStdin { + t.Fatalf("stdin source: content=%q usedStdin=%v err=%v", content, usedStdin, err) + } + // nothing + if _, _, _, _, err = loadPromptContent(ctx, "", AIPromptOptions{}, ""); err == nil { + t.Error("expected error when no source is given") + } +} diff --git a/pkg/cli/prompt_workflow.go b/pkg/cli/prompt_workflow.go new file mode 100644 index 0000000..aedc712 --- /dev/null +++ b/pkg/cli/prompt_workflow.go @@ -0,0 +1,30 @@ +package cli + +import ( + "github.com/flanksource/captain/pkg/ai/agent" + "github.com/flanksource/captain/pkg/ai/agent/verify" +) + +// verifyPassed reports whether the last verify verdict passed. With no verify +// hooks, the run passed. +func verifyPassed(verdicts []agent.VerifyResult) bool { + if len(verdicts) == 0 { + return true + } + return verdicts[len(verdicts)-1].Valid +} + +// verifyReason surfaces the last failing verifier's reason in a run summary. +func verifyReason(verdicts []agent.VerifyResult) string { + if len(verdicts) == 0 { + return "" + } + last := verdicts[len(verdicts)-1] + if last.Valid { + return "" + } + if vd, ok := last.Output.(verify.Verdict); ok && vd.Reason != "" { + return vd.Reason + } + return "verification failed" +} diff --git a/pkg/cli/secret_catalog.go b/pkg/cli/secret_catalog.go new file mode 100644 index 0000000..a3cc00e --- /dev/null +++ b/pkg/cli/secret_catalog.go @@ -0,0 +1,227 @@ +package cli + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "sort" + "strings" + "unicode/utf8" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" +) + +type secretResource struct { + Name string `json:"name"` + Keys []string `json:"keys,omitempty"` +} + +type secretKeyPreview struct { + Key string `json:"key"` + Value string `json:"value"` +} + +func handleSecretResources() http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + kind, err := secretKindFromRequest(r) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + client, namespace, err := kubernetesClient(r.URL.Query().Get("namespace")) + if err != nil { + http.Error(w, err.Error(), http.StatusServiceUnavailable) + return + } + resources, err := listSecretResources(r.Context(), client, namespace, kind) + if err != nil { + http.Error(w, err.Error(), http.StatusServiceUnavailable) + return + } + writeJSON(w, resources) + } +} + +func handleSecretPreview() http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + kind, err := secretKindFromRequest(r) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + name := strings.TrimSpace(r.URL.Query().Get("name")) + if name == "" { + http.Error(w, "name is required", http.StatusBadRequest) + return + } + client, namespace, err := kubernetesClient(r.URL.Query().Get("namespace")) + if err != nil { + http.Error(w, err.Error(), http.StatusServiceUnavailable) + return + } + previews, err := loadSecretPreview(r.Context(), client, namespace, kind, name) + if err != nil { + http.Error(w, err.Error(), http.StatusServiceUnavailable) + return + } + writeJSON(w, previews) + } +} + +func secretKindFromRequest(r *http.Request) (string, error) { + switch kind := strings.TrimSpace(strings.ToLower(r.URL.Query().Get("kind"))); kind { + case "", "secret": + return "secret", nil + case "configmap": + return "configmap", nil + default: + return "", fmt.Errorf("kind must be secret or configmap") + } +} + +func kubernetesClient(namespaceOverride string) (kubernetes.Interface, string, error) { + loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() + config := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, &clientcmd.ConfigOverrides{}) + restConfig, err := config.ClientConfig() + if err != nil { + return nil, "", fmt.Errorf("loading kubeconfig: %w", err) + } + namespace, _, err := config.Namespace() + if err != nil { + return nil, "", fmt.Errorf("loading kube namespace: %w", err) + } + if namespace = strings.TrimSpace(namespace); namespace == "" { + namespace = "default" + } + if override := strings.TrimSpace(namespaceOverride); override != "" { + namespace = override + } + client, err := kubernetes.NewForConfig(restConfig) + if err != nil { + return nil, "", fmt.Errorf("creating kubernetes client: %w", err) + } + return client, namespace, nil +} + +func listSecretResources(ctx context.Context, client kubernetes.Interface, namespace, kind string) ([]secretResource, error) { + switch kind { + case "secret": + list, err := client.CoreV1().Secrets(namespace).List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, fmt.Errorf("listing secrets: %w", err) + } + out := make([]secretResource, 0, len(list.Items)) + for _, item := range list.Items { + out = append(out, secretResource{Name: item.Name, Keys: sortedByteMapKeys(item.Data)}) + } + sortSecretResources(out) + return out, nil + case "configmap": + list, err := client.CoreV1().ConfigMaps(namespace).List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, fmt.Errorf("listing configmaps: %w", err) + } + out := make([]secretResource, 0, len(list.Items)) + for _, item := range list.Items { + out = append(out, secretResource{Name: item.Name, Keys: sortedConfigMapKeys(item)}) + } + sortSecretResources(out) + return out, nil + default: + return nil, fmt.Errorf("kind must be secret or configmap") + } +} + +func loadSecretPreview(ctx context.Context, client kubernetes.Interface, namespace, kind, name string) ([]secretKeyPreview, error) { + switch kind { + case "secret": + item, err := client.CoreV1().Secrets(namespace).Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("getting secret %s: %w", name, err) + } + return previewsForByteData(item.Data), nil + case "configmap": + item, err := client.CoreV1().ConfigMaps(namespace).Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("getting configmap %s: %w", name, err) + } + return previewsForConfigMap(*item), nil + default: + return nil, fmt.Errorf("kind must be secret or configmap") + } +} + +func previewsForByteData(data map[string][]byte) []secretKeyPreview { + keys := sortedByteMapKeys(data) + out := make([]secretKeyPreview, 0, len(keys)) + for _, key := range keys { + out = append(out, secretKeyPreview{Key: key, Value: maskPreviewBytes(data[key])}) + } + return out +} + +func previewsForConfigMap(item corev1.ConfigMap) []secretKeyPreview { + keys := sortedConfigMapKeys(item) + out := make([]secretKeyPreview, 0, len(keys)) + for _, key := range keys { + if value, ok := item.Data[key]; ok { + out = append(out, secretKeyPreview{Key: key, Value: maskKey(value)}) + continue + } + out = append(out, secretKeyPreview{Key: key, Value: byteCountPreview(item.BinaryData[key])}) + } + return out +} + +func sortedByteMapKeys(data map[string][]byte) []string { + keys := make([]string, 0, len(data)) + for key := range data { + keys = append(keys, key) + } + sort.Strings(keys) + return keys +} + +func sortedConfigMapKeys(item corev1.ConfigMap) []string { + seen := map[string]struct{}{} + for key := range item.Data { + seen[key] = struct{}{} + } + for key := range item.BinaryData { + seen[key] = struct{}{} + } + keys := make([]string, 0, len(seen)) + for key := range seen { + keys = append(keys, key) + } + sort.Strings(keys) + return keys +} + +func sortSecretResources(resources []secretResource) { + sort.Slice(resources, func(i, j int) bool { + return resources[i].Name < resources[j].Name + }) +} + +func maskPreviewBytes(value []byte) string { + if !utf8.Valid(value) { + return byteCountPreview(value) + } + return maskKey(string(value)) +} + +func byteCountPreview(value []byte) string { + return fmt.Sprintf("%d bytes", len(value)) +} + +func writeJSON(w http.ResponseWriter, value any) { + w.Header().Set("Content-Type", "application/json") + if err := json.NewEncoder(w).Encode(value); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + } +} diff --git a/pkg/cli/secret_catalog_test.go b/pkg/cli/secret_catalog_test.go new file mode 100644 index 0000000..0ea50fc --- /dev/null +++ b/pkg/cli/secret_catalog_test.go @@ -0,0 +1,44 @@ +package cli + +import ( + "testing" + + corev1 "k8s.io/api/core/v1" +) + +func TestPreviewsForByteDataMasksTextAndBinary(t *testing.T) { + previews := previewsForByteData(map[string][]byte{ + "token": []byte("sk-ant-api03-ABCDEFGH"), + "binary": {0xff, 0xfe, 0xfd}, + }) + + if len(previews) != 2 { + t.Fatalf("got %d previews, want 2: %+v", len(previews), previews) + } + if previews[0].Key != "binary" || previews[0].Value != "3 bytes" { + t.Fatalf("binary preview = %+v", previews[0]) + } + if previews[1].Key != "token" || previews[1].Value != maskKey("sk-ant-api03-ABCDEFGH") { + t.Fatalf("token preview = %+v", previews[1]) + } +} + +func TestConfigMapKeysIncludeBinaryData(t *testing.T) { + item := corev1.ConfigMap{ + Data: map[string]string{"workspace": "/repo/workspace"}, + BinaryData: map[string][]byte{"cert": {0x01, 0x02}}, + } + + keys := sortedConfigMapKeys(item) + if len(keys) != 2 || keys[0] != "cert" || keys[1] != "workspace" { + t.Fatalf("keys = %+v", keys) + } + + previews := previewsForConfigMap(item) + if previews[0].Key != "cert" || previews[0].Value != "2 bytes" { + t.Fatalf("cert preview = %+v", previews[0]) + } + if previews[1].Key != "workspace" || previews[1].Value != maskKey("/repo/workspace") { + t.Fatalf("workspace preview = %+v", previews[1]) + } +} diff --git a/pkg/cli/serve.go b/pkg/cli/serve.go index 9fab916..cadf1f5 100644 --- a/pkg/cli/serve.go +++ b/pkg/cli/serve.go @@ -21,12 +21,16 @@ import ( "github.com/flanksource/clicky/aichat" "github.com/flanksource/clicky/rpc" + rpchttp "github.com/flanksource/clicky/rpc/http" + "github.com/flanksource/clicky/task" "github.com/spf13/cobra" ) -// all: keeps the committed dist/.gitkeep placeholder in the embed so the binary -// compiles without a built webapp (dist is gitignored and built on demand or in -// the release workflow). When index.html is absent, serve.go reports it at runtime. +// The built webapp is committed under webapp/dist (see .gitignore) because the +// vite build depends on a local clicky-ui link: dependency that is unavailable +// in CI and in the goreleaser release job, so the binary embeds the checked-in +// dist rather than building it. all: ensures dotfiles are embedded too. When +// index.html is absent, serve.go reports it at runtime. // //go:embed all:webapp/dist var captainWebappFS embed.FS @@ -38,13 +42,14 @@ type ServeOptions struct { UIPort int Open bool ThreadsFile string + PromptDirs []string } func NewServeCommand(version string) *cobra.Command { opts := ServeOptions{ Host: "localhost", - Port: 8080, - UIPort: 5173, + Port: 9020, + UIPort: 5183, ThreadsFile: ".captain/chat-threads.json", } @@ -74,6 +79,7 @@ proxies /api back to this Go process.`, cmd.Flags().IntVar(&opts.UIPort, "ui-port", opts.UIPort, "Port for the Vite dev server when --dev is set") cmd.Flags().BoolVar(&opts.Open, "open", false, "Open the web UI in the default browser") cmd.Flags().StringVar(&opts.ThreadsFile, "threads-file", opts.ThreadsFile, "Path to persisted chat thread JSON") + cmd.Flags().StringArrayVar(&opts.PromptDirs, "prompt-dir", nil, "Additional local directory containing .prompt files (repeatable)") return cmd } @@ -91,6 +97,9 @@ func (o ServeOptions) validate() error { if strings.TrimSpace(o.ThreadsFile) == "" { return fmt.Errorf("threads file cannot be empty") } + if err := ValidatePromptDirs(o.PromptDirs); err != nil { + return err + } return nil } @@ -142,9 +151,28 @@ func RunServe(ctx context.Context, rootCmd *cobra.Command, opts ServeOptions, ve }) defer chat.Close() + // Prompt runs are tracked as clicky task groups. Disable terminal rendering: + // serve runs on a TTY, so otherwise the task manager draws progress bars over + // the server log. Concurrency is the global manager's worker pool (4), which + // is plenty for parallel prompt runs. + task.SetNoRender(true) + mux := http.NewServeMux() rpcServer.RegisterRoutes(mux) mux.HandleFunc("POST /api/captain/chat/threads/from-agent", handleThreadFromAgent(threadStore)) + mux.HandleFunc("GET /api/captain/sessions/live", handleSessionsLive()) + mux.HandleFunc("GET /api/captain/sessions/{id}", handleSessionGet()) + mux.HandleFunc("GET /api/captain/ai/permissions/catalog", handlePermissionCatalog(cwd)) + mux.HandleFunc("GET /api/captain/ai/prompt/schema", handlePromptSchema()) + mux.HandleFunc("GET /api/captain/secrets/resources", handleSecretResources()) + mux.HandleFunc("GET /api/captain/secrets/preview", handleSecretPreview()) + // Task tracking: /api/captain/tasks, /tasks/stream, /tasks/{id}; plus the + // run-list SSE the clicky-ui useTaskRuns hook subscribes to. + task.RegisterHandlers(mux, "/api/captain") + mux.Handle("GET /api/captain/tasks/runs/stream", task.RunsSSEHandler(nil)) + // Live session history for a prompt run. + mux.Handle("GET /api/captain/prompt/runs/{runId}/stream", handlePromptRunStream(promptRuns)) + mux.Handle("GET /api/captain/prompt/runs/{runId}", handlePromptRunSnapshot(promptRuns)) mux.Handle("/api/chat", chat.Handler()) mux.Handle("/api/chat/", chat.Handler()) @@ -157,7 +185,7 @@ func RunServe(ctx context.Context, rootCmd *cobra.Command, opts ServeOptions, ve addr := fmt.Sprintf("%s:%d", opts.Host, opts.Port) httpSrv := &http.Server{ Addr: addr, - Handler: mux, + Handler: rpchttp.TimingMiddleware(PromptDirsMiddleware(mux, opts.PromptDirs)), ReadTimeout: 30 * time.Second, // /api/chat streams SSE; a fixed write timeout truncates long turns. IdleTimeout: 60 * time.Second, @@ -166,6 +194,8 @@ func RunServe(ctx context.Context, rootCmd *cobra.Command, opts ServeOptions, ve ctx, stop := signal.NotifyContext(ctx, os.Interrupt, syscall.SIGTERM) defer stop() + go prunePromptRuns(ctx, promptRuns) + errCh := make(chan error, 1) go func() { fmt.Fprintf(stdout, "Captain API listening on http://%s\n", addr) @@ -215,6 +245,61 @@ func RunServe(ctx context.Context, rootCmd *cobra.Command, opts ServeOptions, ve } } +func handleSessionsLive() http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + query := r.URL.Query() + opts := SessionLiveOptions{ + Source: strings.TrimSpace(query.Get("source")), + Query: strings.TrimSpace(query.Get("q")), + Limit: 100, + } + if opts.Source == "" { + opts.Source = "all" + } + if raw := strings.TrimSpace(query.Get("all")); raw != "" { + opts.All, _ = strconv.ParseBool(raw) + } + if raw := strings.TrimSpace(query.Get("limit")); raw != "" { + limit, err := strconv.Atoi(raw) + if err != nil { + http.Error(w, fmt.Sprintf("invalid limit %q", raw), http.StatusBadRequest) + return + } + opts.Limit = limit + } + + result, err := RunSessionLive(r.Context(), opts) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + writeServeJSON(w, http.StatusOK, result) + } +} + +// handleSessionGet serves the unified session model for one session id at +// GET /api/captain/sessions/{id}, so the web UI can render the same model the +// CLI `sessions get` returns. +func handleSessionGet() http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + id := strings.TrimSpace(r.PathValue("id")) + if id == "" { + http.Error(w, "session id is required", http.StatusBadRequest) + return + } + source := strings.TrimSpace(r.URL.Query().Get("source")) + if source == "" { + source = "all" + } + s, err := RunSessionGet(r.Context(), SessionGetOptions{ID: id, Source: source}) + if err != nil { + http.Error(w, err.Error(), http.StatusNotFound) + return + } + writeServeJSON(w, http.StatusOK, s) + } +} + func handleThreadFromAgent(store aichat.ThreadStore) http.HandlerFunc { type request struct { Title string `json:"title"` diff --git a/pkg/cli/serve_test.go b/pkg/cli/serve_test.go index d0af3f6..139c165 100644 --- a/pkg/cli/serve_test.go +++ b/pkg/cli/serve_test.go @@ -4,9 +4,13 @@ import ( "encoding/json" "net/http" "net/http/httptest" + "os" "path/filepath" "strings" "testing" + + "github.com/flanksource/captain/pkg/claude" + "github.com/flanksource/captain/pkg/session" ) func TestHandleThreadFromAgentCreatesThread(t *testing.T) { @@ -57,3 +61,44 @@ func TestHandleThreadFromAgentRequiresProviderSession(t *testing.T) { t.Fatalf("body = %q", rec.Body.String()) } } + +func TestHandleSessionGetReturnsUnifiedModel(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + project := filepath.Join(home, "work", "project") + if err := os.MkdirAll(project, 0o755); err != nil { + t.Fatal(err) + } + t.Chdir(project) + markProjectRoot(t, project) + + writeJSONL(t, filepath.Join(home, ".claude", "projects", claude.NormalizePath(project), "sess-web.jsonl"), + map[string]any{ + "type": "assistant", "sessionId": "sess-web", "uuid": "a1", + "timestamp": "2026-07-06T10:00:00Z", "cwd": project, + "message": map[string]any{ + "role": "assistant", "model": "claude-opus-4", + "content": []any{map[string]any{"type": "text", "text": "hello from the model"}}, + }, + }, + ) + + req := httptest.NewRequest(http.MethodGet, "/api/captain/sessions/sess-web", nil) + req.SetPathValue("id", "sess-web") + rec := httptest.NewRecorder() + handleSessionGet()(rec, req) + + if rec.Code != http.StatusOK { + t.Fatalf("status = %d, body = %s", rec.Code, rec.Body.String()) + } + var got session.Session + if err := json.Unmarshal(rec.Body.Bytes(), &got); err != nil { + t.Fatalf("unmarshal: %v (body=%s)", err, rec.Body.String()) + } + if got.ID != "sess-web" || got.Source != "claude" { + t.Fatalf("session = %+v", got) + } + if len(got.Messages) == 0 || got.Messages[0].Parts[0].Text != "hello from the model" { + t.Fatalf("messages = %+v", got.Messages) + } +} diff --git a/pkg/cli/session_cache.go b/pkg/cli/session_cache.go new file mode 100644 index 0000000..f448663 --- /dev/null +++ b/pkg/cli/session_cache.go @@ -0,0 +1,106 @@ +package cli + +import ( + "context" + "fmt" + "os" + "runtime" + "sync" + + "github.com/flanksource/captain/pkg/session" + rpchttp "github.com/flanksource/clicky/rpc/http" +) + +// sessionFileRef identifies a session file and its source for summarization. +type sessionFileRef struct { + source string + path string +} + +// summarizeSessionFileCached returns the persisted summary for a session file, +// reusing the stored row when the file's mtime+size are unchanged and otherwise +// rebuilding the rich rows (root + sub-agents) and upserting them. When the +// store is unavailable it degrades to building the summary uncached. +func summarizeSessionFileCached(ref sessionFileRef) (SessionRecord, error) { + info, err := os.Stat(ref.path) + if err != nil { + return SessionRecord{}, err + } + if info.IsDir() { + return SessionRecord{}, fmt.Errorf("%s is a directory", ref.path) + } + modUnix, size := info.ModTime().UnixNano(), info.Size() + + st := sessionStore() + if st != nil { + if row, ok := st.lookupFresh(ref.path, modUnix, size); ok { + return row.toRecord(), nil + } + } + + rows, err := session.RowsFromFile(ref.path, ref.source) + if err != nil { + return SessionRecord{}, err + } + if st != nil { + st.upsertRows(rows) + } + for _, r := range rows { + if r.Path == ref.path { + return recordFromRow(r), nil + } + } + if len(rows) > 0 { + return recordFromRow(rows[0]), nil + } + return SessionRecord{}, fmt.Errorf("no summary for %s", ref.path) +} + +// summarizeSessionRefs sampled-summarizes files concurrently (bounded by +// GOMAXPROCS) through the summary cache, preserving input order. Files that +// fail to summarize or yield no session id are dropped. It records the "parse" +// phase for the wall time of the whole batch. +func summarizeSessionRefs(ctx context.Context, refs []sessionFileRef) []sessionCandidate { + defer rpchttp.Track(ctx, "parse")() + + records := make([]SessionRecord, len(refs)) + found := make([]bool, len(refs)) + + workers := runtime.GOMAXPROCS(0) + if workers > len(refs) { + workers = len(refs) + } + if workers < 1 { + workers = 1 + } + + jobs := make(chan int) + var wg sync.WaitGroup + for w := 0; w < workers; w++ { + wg.Add(1) + go func() { + defer wg.Done() + for i := range jobs { + record, err := summarizeSessionFileCached(refs[i]) + if err != nil || record.ID == "" { + continue + } + records[i] = record + found[i] = true + } + }() + } + for i := range refs { + jobs <- i + } + close(jobs) + wg.Wait() + + candidates := make([]sessionCandidate, 0, len(refs)) + for i := range refs { + if found[i] { + candidates = append(candidates, sessionCandidate{record: records[i], path: refs[i].path}) + } + } + return candidates +} diff --git a/pkg/cli/session_cache_test.go b/pkg/cli/session_cache_test.go new file mode 100644 index 0000000..420abcd --- /dev/null +++ b/pkg/cli/session_cache_test.go @@ -0,0 +1,83 @@ +package cli + +import ( + "context" + "fmt" + "path/filepath" + "testing" +) + +// claudeSummaryRow is a minimal on-disk claude session line carrying the given +// session id, enough for the fast summarizer to extract an ID. +func claudeSummaryRow(id string) map[string]any { + return map[string]any{ + "type": "user", + "sessionId": id, + "timestamp": "2026-06-01T10:00:00Z", + "message": map[string]any{ + "role": "user", + "content": []any{map[string]any{"type": "text", "text": "hi"}}, + }, + } +} + +// TestSummarizeSessionFileCachedDegradesUncached checks the store-disabled path +// (TestMain sets CAPTAIN_SESSION_DB_URL=off): summarization still works, uses the +// in-file session id, and reflects the current content on every call (no stale +// cache). Cache reuse/invalidation against a real DB is covered by the gated +// integration test. +func TestSummarizeSessionFileCachedDegradesUncached(t *testing.T) { + path := filepath.Join(t.TempDir(), "aa.jsonl") + ref := sessionFileRef{source: "claude", path: path} + + writeJSONL(t, path, claudeSummaryRow("aa")) + first, err := summarizeSessionFileCached(ref) + if err != nil { + t.Fatalf("first summarize: %v", err) + } + if first.ID != "aa" { + t.Fatalf("first.ID = %q, want aa (from the in-file sessionId)", first.ID) + } + + // With no store, a rewritten file is re-read every time (uncached). + writeJSONL(t, path, claudeSummaryRow("bb")) + again, err := summarizeSessionFileCached(ref) + if err != nil { + t.Fatalf("second summarize: %v", err) + } + if again.ID != "bb" { + t.Fatalf("second.ID = %q, want bb (uncached re-read)", again.ID) + } +} + +func TestSummarizeSessionRefsParallelFindsEverySession(t *testing.T) { + dir := t.TempDir() + const count = 60 + refs := make([]sessionFileRef, 0, count) + want := make(map[string]bool, count) + for i := 0; i < count; i++ { + id := fmt.Sprintf("sess-%03d", i) + path := filepath.Join(dir, id+".jsonl") + writeJSONL(t, path, claudeSummaryRow(id)) + refs = append(refs, sessionFileRef{source: "claude", path: path}) + want[id] = true + } + + got := summarizeSessionRefs(context.Background(), refs) + if len(got) != count { + t.Fatalf("got %d candidates, want %d", len(got), count) + } + seen := make(map[string]bool, count) + for i, candidate := range got { + seen[candidate.record.ID] = true + // Order must match the input refs so downstream sorting is deterministic. + if candidate.path != refs[i].path { + t.Fatalf("candidate[%d].path = %q, want %q (order not preserved)", i, candidate.path, refs[i].path) + } + } + for id := range want { + if !seen[id] { + t.Fatalf("session %q missing from parallel summary", id) + } + } +} diff --git a/pkg/cli/session_filter_test.go b/pkg/cli/session_filter_test.go index a8f1e5f..55679cf 100644 --- a/pkg/cli/session_filter_test.go +++ b/pkg/cli/session_filter_test.go @@ -98,6 +98,86 @@ func TestCollectCodexHistoryFiltersByMetadata(t *testing.T) { assert.Empty(t, uses) } +func TestNarrowHistorySourcesUsesSingleClaudeMatch(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + repo := t.TempDir() + require.NoError(t, os.WriteFile(filepath.Join(repo, "go.mod"), []byte("module example.com/repo\n"), 0o644)) + + writeClaudeHistoryFixture(t, home, repo, "095ba120-06f4-4a34-a091-8e0cfa53c20e") + writeCodexHistoryFixture(t, home, "other", "019e0365-dc2a-7ad0-a5a8-78936481a928", repo, "skip") + + showClaude, showCodex := narrowHistorySources(repo, false, true, true, claude.Filter{ + SessionID: "095ba120-06f4-4a34-a091-8e0cfa53c20e", + IncludeAgents: true, + }) + assert.True(t, showClaude) + assert.False(t, showCodex) +} + +func TestNarrowHistorySourcesUsesSingleCodexMatch(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + repo := t.TempDir() + require.NoError(t, os.WriteFile(filepath.Join(repo, "go.mod"), []byte("module example.com/repo\n"), 0o644)) + + writeCodexHistoryFixture(t, home, "match", "095ba120-06f4-4a34-a091-8e0cfa53c20e", repo, "hello") + + showClaude, showCodex := narrowHistorySources(repo, false, true, true, claude.Filter{ + SessionID: "095ba120-06f4-4a34-a091-8e0cfa53c20e", + }) + assert.False(t, showClaude) + assert.True(t, showCodex) +} + +func TestNarrowHistorySourcesKeepsAmbiguousMatches(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + repo := t.TempDir() + require.NoError(t, os.WriteFile(filepath.Join(repo, "go.mod"), []byte("module example.com/repo\n"), 0o644)) + + sessionID := "095ba120-06f4-4a34-a091-8e0cfa53c20e" + writeClaudeHistoryFixture(t, home, repo, sessionID) + writeCodexHistoryFixture(t, home, "match", sessionID, repo, "hello") + + showClaude, showCodex := narrowHistorySources(repo, false, true, true, claude.Filter{ + SessionID: "095ba120", + }) + assert.True(t, showClaude) + assert.True(t, showCodex) +} + +func TestNarrowHistorySourcesFullClaudeUUIDSkipsCodexAmbiguityScan(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + repo := t.TempDir() + require.NoError(t, os.WriteFile(filepath.Join(repo, "go.mod"), []byte("module example.com/repo\n"), 0o644)) + + sessionID := "095ba120-06f4-4a34-a091-8e0cfa53c20e" + writeClaudeHistoryFixture(t, home, repo, sessionID) + writeCodexHistoryFixture(t, home, "match", sessionID, repo, "hello") + + showClaude, showCodex := narrowHistorySources(repo, false, true, true, claude.Filter{ + SessionID: sessionID, + }) + assert.True(t, showClaude) + assert.False(t, showCodex) +} + +func TestCodexFileNameMatchesSessionFilter(t *testing.T) { + sessionID := "095ba120-06f4-4a34-a091-8e0cfa53c20e" + filter := claude.Filter{SessionID: sessionID} + + assert.False(t, codexFileNameMatchesSessionFilter( + "/tmp/rollout-2026-07-02-unrelated.jsonl", + filter, + )) + assert.True(t, codexFileNameMatchesSessionFilter( + fmt.Sprintf("/tmp/rollout-%s.jsonl", sessionID), + filter, + )) +} + func writeCodexHistoryFixture(t *testing.T, home, name, sessionID, cwd, message string) { t.Helper() dir := filepath.Join(home, ".codex", "sessions", "2026", "06", "29") @@ -111,3 +191,15 @@ func writeCodexHistoryFixture(t *testing.T, home, name, sessionID, cwd, message ) require.NoError(t, os.WriteFile(filepath.Join(dir, name+".jsonl"), []byte(content), 0o644)) } + +func writeClaudeHistoryFixture(t *testing.T, home, repo, sessionID string) { + t.Helper() + dir := filepath.Join(home, ".claude", "projects", claude.NormalizePath(repo)) + require.NoError(t, os.MkdirAll(dir, 0o755)) + content := fmt.Sprintf( + `{"type":"assistant","sessionId":%q,"uuid":"u1","timestamp":"2026-06-29T10:00:00Z","cwd":%q,"message":{"role":"assistant","content":[{"type":"tool_use","id":"tu-1","name":"Bash","input":{"command":"pwd"}}]}}`+"\n", + sessionID, + repo, + ) + require.NoError(t, os.WriteFile(filepath.Join(dir, sessionID+".jsonl"), []byte(content), 0o644)) +} diff --git a/pkg/cli/session_live.go b/pkg/cli/session_live.go new file mode 100644 index 0000000..c117028 --- /dev/null +++ b/pkg/cli/session_live.go @@ -0,0 +1,308 @@ +package cli + +import ( + "context" + "fmt" + "os" + "strings" + "time" + + "github.com/flanksource/captain/pkg/claude" + rpchttp "github.com/flanksource/clicky/rpc/http" +) + +var discoverSessionProcesses = discoverAgentProcesses + +const defaultSessionLiveLimit = 25 + +func RunSessionLive(ctx context.Context, opts SessionLiveOptions) (SessionLiveResult, error) { + source, err := normalizeSessionSource(opts.Source) + if err != nil { + return SessionLiveResult{}, err + } + cwd, err := os.Getwd() + if err != nil { + return SessionLiveResult{}, err + } + + scope := "current" + if opts.All { + scope = "all" + } + limit := opts.Limit + if limit <= 0 && !opts.Full { + limit = defaultSessionLiveLimit + } + records, err := discoverLiveSessionRecords(ctx, cwd, opts.All, source, limit, opts.Full) + if err != nil { + return SessionLiveResult{}, err + } + + stopEnrich := rpchttp.Track(ctx, "enrich") + processes, _ := discoverSessionProcesses() + if !opts.All { + processes = filterAgentProcessesByProject(processes, sessionProjectRoot(cwd)) + } + records = enrichSessionsWithLive(records, processes) + filtered := make([]SessionRecord, 0, len(records)) + for _, record := range records { + if sessionMatchesQuery(record, opts.Query) { + filtered = append(filtered, record) + } + } + sortSessionRecords(filtered) + total := len(filtered) + summary := summarizeSessionDashboard(filtered) + stopEnrich() + if !opts.Full && limit > 0 && len(filtered) > limit { + filtered = filtered[:limit] + } + + return SessionLiveResult{ + Sessions: filtered, + Total: total, + Source: source, + Scope: scope, + Summary: summary, + }, nil +} + +func discoverLiveSessionRecords(ctx context.Context, cwd string, searchAll bool, source string, limit int, full bool) ([]SessionRecord, error) { + if full { + list, err := RunSessionList(ctx, SessionListOptions{ + Source: source, + All: searchAll, + Query: "", + Limit: 0, + }) + if err != nil { + return nil, err + } + return list.Sessions, nil + } + + candidates, err := discoverLiveSessionCandidates(ctx, cwd, searchAll, source, limit) + if err != nil { + return nil, err + } + records := make([]SessionRecord, 0, len(candidates)) + for _, candidate := range candidates { + records = append(records, candidate.record) + } + sortSessionRecords(records) + return records, nil +} + +func sessionProjectRoot(cwd string) string { + if cwd == "" { + return "" + } + projectInfo := claude.FindProjectInfo(cwd) + if projectInfo.Root != "" { + return projectInfo.Root + } + return cwd +} + +func filterAgentProcessesByProject(processes []agentProcess, projectRoot string) []agentProcess { + if projectRoot == "" { + return processes + } + filtered := make([]agentProcess, 0, len(processes)) + for _, proc := range processes { + if sessionRecordMatchesProject(SessionRecord{CWD: proc.CWD}, projectRoot) { + filtered = append(filtered, proc) + } + } + return filtered +} + +func enrichSessionsWithLive(records []SessionRecord, processes []agentProcess) []SessionRecord { + out := make([]SessionRecord, len(records)) + copy(out, records) + matched := make(map[int]bool) + for i := range out { + idx := bestLiveMatch(out[i], processes, matched) + if idx < 0 { + out[i].Health = deriveSessionHealth(out[i]) + continue + } + matched[idx] = true + out[i].Live = processes[idx].wire() + if out[i].CWD == "" { + out[i].CWD = processes[idx].CWD + } + if out[i].StartedAt == nil && processes[idx].StartedAt != nil { + out[i].StartedAt = processes[idx].StartedAt + } + out[i].Health = deriveSessionHealth(out[i]) + } + for i, proc := range processes { + if matched[i] { + continue + } + record := SessionRecord{ + Key: fmt.Sprintf("live-%s-%d", proc.Source, proc.PID), + ID: fmt.Sprintf("pid:%d", proc.PID), + Source: proc.Source, + CWD: proc.CWD, + StartedAt: proc.StartedAt, + DetailAvailable: false, + Live: proc.wire(), + } + record.Health = deriveSessionHealth(record) + out = append(out, record) + } + sortSessionRecords(out) + return out +} + +func bestLiveMatch(record SessionRecord, processes []agentProcess, matched map[int]bool) int { + if record.Source == "" { + return -1 + } + best := -1 + for i, proc := range processes { + if matched[i] || proc.Source != record.Source { + continue + } + if record.CWD != "" && proc.CWD != "" && samePath(record.CWD, proc.CWD) { + return i + } + if best < 0 && record.CWD == "" { + best = i + } + } + return best +} + +func samePath(a, b string) bool { + return strings.TrimRight(a, "/") == strings.TrimRight(b, "/") +} + +func deriveSessionHealth(record SessionRecord) []SessionHealthWire { + var health []SessionHealthWire + if record.Context != nil { + switch { + case record.Context.FreePercent < 8: + health = append(health, SessionHealthWire{ + Kind: "low_context", + Severity: "critical", + Message: "Context below 8% free", + }) + case record.Context.FreePercent < 15: + health = append(health, SessionHealthWire{ + Kind: "low_context", + Severity: "warning", + Message: "Context below 15% free", + }) + } + } + if record.CostUSD >= 5 { + health = append(health, SessionHealthWire{ + Kind: "cost_spike", + Severity: "warning", + Message: "Estimated session cost is above $5", + }) + } + if record.Live != nil { + switch strings.ToLower(record.Live.Status) { + case "zombie": + health = append(health, SessionHealthWire{ + Kind: "zombie", + Severity: "critical", + Message: "Process is a zombie", + }) + case "stopped": + health = append(health, SessionHealthWire{ + Kind: "stopped", + Severity: "warning", + Message: "Process is stopped", + }) + } + if record.Live.Active && record.EndedAt != nil && time.Since(*record.EndedAt) > 10*time.Minute { + health = append(health, SessionHealthWire{ + Kind: "idle", + Severity: "warning", + Message: "Live process has no recent session activity", + }) + } + } + return health +} + +func summarizeSessionDashboard(records []SessionRecord) SessionDashboardWire { + summary := SessionDashboardWire{TotalSessions: len(records)} + lowestSet := false + for _, record := range records { + if record.Live != nil { + summary.LiveSessions++ + if record.Live.Active { + summary.ActiveSessions++ + } + switch strings.ToLower(record.Live.Status) { + case "stopped", "zombie": + summary.StoppedSessions++ + } + } + if len(record.Health) > 0 { + summary.AlertSessions++ + } + if record.Tokens != nil { + summary.InputTokens += record.Tokens.InputTokens + summary.OutputTokens += record.Tokens.OutputTokens + summary.CacheReadTokens += record.Tokens.CacheReadTokens + summary.CacheCreationTokens += record.Tokens.CacheCreationTokens + summary.TotalTokens += record.Tokens.TotalTokens + } + summary.CostUSD += record.CostUSD + if record.Context != nil { + if !lowestSet || record.Context.FreePercent < *summary.LowestContextFree { + value := record.Context.FreePercent + summary.LowestContextFree = &value + lowestSet = true + } + } + } + if summary.TotalTokens == 0 { + summary.TotalTokens = summary.InputTokens + summary.OutputTokens + summary.CacheReadTokens + summary.CacheCreationTokens + } + return summary +} + +func healthMatchesQuery(health []SessionHealthWire, query string) bool { + query = strings.ToLower(strings.TrimSpace(query)) + if query == "" { + return true + } + for _, signal := range health { + if strings.Contains(strings.ToLower(signal.Kind), query) || + strings.Contains(strings.ToLower(signal.Severity), query) || + strings.Contains(strings.ToLower(signal.Message), query) { + return true + } + } + return false +} + +func liveMatchesQuery(live *SessionLiveWire, query string) bool { + if live == nil { + return false + } + query = strings.ToLower(strings.TrimSpace(query)) + if query == "" { + return true + } + values := []string{ + fmt.Sprintf("%d", live.PID), + live.Status, + live.CWD, + live.Command, + } + for _, value := range values { + if strings.Contains(strings.ToLower(value), query) { + return true + } + } + return false +} diff --git a/pkg/cli/session_live_summary.go b/pkg/cli/session_live_summary.go new file mode 100644 index 0000000..f82d257 --- /dev/null +++ b/pkg/cli/session_live_summary.go @@ -0,0 +1,90 @@ +package cli + +import ( + "context" + "os" + "sort" + + "github.com/flanksource/captain/pkg/ai/history" + "github.com/flanksource/captain/pkg/claude" + rpchttp "github.com/flanksource/clicky/rpc/http" +) + +type liveSessionFile struct { + source string + path string + modUnix int64 +} + +func discoverLiveSessionCandidates(ctx context.Context, cwd string, searchAll bool, source string, limit int) ([]sessionCandidate, error) { + stopFind := rpchttp.Track(ctx, "find") + files, err := discoverLiveSessionFiles(cwd, searchAll, source) + stopFind() + if err != nil { + return nil, err + } + sort.Slice(files, func(i, j int) bool { + if files[i].modUnix == files[j].modUnix { + return files[i].path > files[j].path + } + return files[i].modUnix > files[j].modUnix + }) + if limit > 0 && len(files) > limit { + files = files[:limit] + } + + refs := make([]sessionFileRef, len(files)) + for i, file := range files { + refs[i] = sessionFileRef{source: file.source, path: file.path} + } + return summarizeSessionRefs(ctx, refs), nil +} + +func discoverLiveSessionFiles(cwd string, searchAll bool, source string) ([]liveSessionFile, error) { + var files []liveSessionFile + if source == "all" || source == "claude" { + claudeFiles, err := claude.FindSessionFiles(claude.GetProjectsDir(), cwd, searchAll) + if err != nil { + return nil, err + } + files = appendSessionFiles(files, "claude", claudeFiles) + } + if source == "all" || source == "codex" { + codexFiles, err := history.FindCodexSessionFiles() + if err != nil { + return nil, err + } + matchRoot := cwd + if cwd != "" { + projectInfo := claude.FindProjectInfo(cwd) + if projectInfo.Root != "" { + matchRoot = projectInfo.Root + } + } + for _, file := range codexFiles { + if !searchAll { + meta, err := history.ReadCodexSessionMeta(file) + if err != nil || meta == nil || !codexMetaMatchesProject(meta, matchRoot) { + continue + } + } + files = appendSessionFiles(files, "codex", []string{file}) + } + } + return files, nil +} + +func appendSessionFiles(out []liveSessionFile, source string, paths []string) []liveSessionFile { + for _, path := range paths { + info, err := os.Stat(path) + if err != nil || info.IsDir() { + continue + } + out = append(out, liveSessionFile{ + source: source, + path: path, + modUnix: info.ModTime().UnixNano(), + }) + } + return out +} diff --git a/pkg/cli/session_process.go b/pkg/cli/session_process.go new file mode 100644 index 0000000..0bdf3cf --- /dev/null +++ b/pkg/cli/session_process.go @@ -0,0 +1,217 @@ +package cli + +import ( + "bytes" + "os" + "os/exec" + "runtime" + "strconv" + "strings" + "time" +) + +type agentProcess struct { + Source string + PID int + Status string + Active bool + CPUPercent float64 + MemoryPercent float64 + StartedAt *time.Time + CWD string + Command string +} + +func (p agentProcess) wire() *SessionLiveWire { + return &SessionLiveWire{ + PID: p.PID, + Status: p.Status, + Active: p.Active, + CPUPercent: p.CPUPercent, + MemoryPercent: p.MemoryPercent, + StartedAt: p.StartedAt, + CWD: p.CWD, + Command: p.Command, + } +} + +func discoverAgentProcesses() ([]agentProcess, error) { + if runtime.GOOS == "windows" { + return nil, nil + } + out, err := exec.Command("ps", "-eo", "pid=,pcpu=,pmem=,stat=,lstart=,command=").Output() + if err != nil { + return nil, err + } + lines := bytes.Split(out, []byte{'\n'}) + processes := make([]agentProcess, 0) + for _, raw := range lines { + line := strings.TrimSpace(string(raw)) + if line == "" { + continue + } + proc, ok := parseAgentProcessLine(line) + if !ok { + continue + } + processes = append(processes, proc) + } + cwds := processCWDs(processIDs(processes)) + for i := range processes { + processes[i].CWD = cwds[processes[i].PID] + } + return processes, nil +} + +func parseAgentProcessLine(line string) (agentProcess, bool) { + fields := strings.Fields(line) + if len(fields) < 10 { + return agentProcess{}, false + } + pid, err := strconv.Atoi(fields[0]) + if err != nil || pid <= 0 { + return agentProcess{}, false + } + command := strings.Join(fields[9:], " ") + source := processSource(command) + if source == "" { + return agentProcess{}, false + } + cpu, _ := strconv.ParseFloat(fields[1], 64) + mem, _ := strconv.ParseFloat(fields[2], 64) + stat := fields[3] + start := parseProcessStart(strings.Join(fields[4:9], " ")) + status, active := processStatus(stat) + return agentProcess{ + Source: source, + PID: pid, + Status: status, + Active: active, + CPUPercent: cpu, + MemoryPercent: mem, + StartedAt: start, + Command: command, + }, true +} + +func processSource(command string) string { + lower := strings.ToLower(command) + if strings.Contains(lower, "captain") || strings.Contains(lower, "ctop") || strings.Contains(lower, "claude-manager") { + return "" + } + if strings.Contains(lower, "claude.app") { + return "" + } + if commandNameMatches(lower, "claude") { + return "claude" + } + if strings.Contains(lower, "codex-darwin") || + strings.Contains(lower, "codex-linux") || + strings.Contains(lower, "codex-win") || + commandNameMatches(lower, "codex") { + return "codex" + } + return "" +} + +func commandNameMatches(command, name string) bool { + fields := strings.Fields(command) + for _, field := range fields { + base := field + if idx := strings.LastIndex(base, "/"); idx >= 0 { + base = base[idx+1:] + } + base = strings.Trim(base, `"'`) + if base == name { + return true + } + } + return false +} + +func processStatus(stat string) (string, bool) { + switch { + case strings.Contains(stat, "Z"): + return "zombie", false + case strings.Contains(stat, "T"): + return "stopped", false + case strings.Contains(stat, "S"): + return "sleeping", true + default: + return "active", true + } +} + +func parseProcessStart(value string) *time.Time { + if value == "" { + return nil + } + t, err := time.Parse("Mon Jan 2 15:04:05 2006", value) + if err != nil { + return nil + } + return &t +} + +func processIDs(processes []agentProcess) []int { + pids := make([]int, 0, len(processes)) + for _, proc := range processes { + if proc.PID > 0 { + pids = append(pids, proc.PID) + } + } + return pids +} + +func processCWDs(pids []int) map[int]string { + cwds := make(map[int]string, len(pids)) + if runtime.GOOS == "linux" { + for _, pid := range pids { + if pid <= 0 { + continue + } + cwd, err := os.Readlink("/proc/" + strconv.Itoa(pid) + "/cwd") + if err == nil { + cwds[pid] = cwd + } + } + return cwds + } + var pidList []string + for _, pid := range pids { + if pid > 0 { + pidList = append(pidList, strconv.Itoa(pid)) + } + } + if len(pidList) == 0 { + return cwds + } + out, err := exec.Command("lsof", "-a", "-d", "cwd", "-F", "pn", "-p", strings.Join(pidList, ",")).Output() + if err != nil { + return cwds + } + return parseLsofCWDs(out) +} + +func parseLsofCWDs(out []byte) map[int]string { + cwds := make(map[int]string) + currentPID := 0 + for _, raw := range bytes.Split(out, []byte{'\n'}) { + line := strings.TrimSpace(string(raw)) + if line == "" { + continue + } + switch line[0] { + case 'p': + pid, err := strconv.Atoi(strings.TrimPrefix(line, "p")) + if err == nil { + currentPID = pid + } + case 'n': + if currentPID > 0 { + cwds[currentPID] = strings.TrimPrefix(line, "n") + } + } + } + return cwds +} diff --git a/pkg/cli/session_process_test.go b/pkg/cli/session_process_test.go new file mode 100644 index 0000000..2af20a8 --- /dev/null +++ b/pkg/cli/session_process_test.go @@ -0,0 +1,38 @@ +package cli + +import "testing" + +func TestParseAgentProcessLine(t *testing.T) { + line := "12345 2.5 1.2 S+ Mon Jun 1 10:00:00 2026 /usr/local/bin/codex --model gpt-5" + proc, ok := parseAgentProcessLine(line) + if !ok { + t.Fatal("expected codex process") + } + if proc.Source != "codex" || proc.PID != 12345 || proc.Status != "sleeping" || !proc.Active { + t.Fatalf("process = %+v", proc) + } + if proc.CPUPercent != 2.5 || proc.MemoryPercent != 1.2 { + t.Fatalf("usage = %v/%v", proc.CPUPercent, proc.MemoryPercent) + } + if proc.StartedAt == nil { + t.Fatal("missing start time") + } +} + +func TestParseAgentProcessLineIgnoresCaptain(t *testing.T) { + line := "12345 0.0 0.1 S+ Mon Jun 1 10:00:00 2026 captain sessions live" + if _, ok := parseAgentProcessLine(line); ok { + t.Fatal("captain process should not be reported as an agent process") + } +} + +func TestParseLsofCWDs(t *testing.T) { + out := []byte("p123\nn/Users/moshe/project-a\np456\nn/Users/moshe/project-b\n") + cwds := parseLsofCWDs(out) + if cwds[123] != "/Users/moshe/project-a" { + t.Fatalf("pid 123 cwd = %q", cwds[123]) + } + if cwds[456] != "/Users/moshe/project-b" { + t.Fatalf("pid 456 cwd = %q", cwds[456]) + } +} diff --git a/pkg/cli/session_store.go b/pkg/cli/session_store.go new file mode 100644 index 0000000..bed2e92 --- /dev/null +++ b/pkg/cli/session_store.go @@ -0,0 +1,507 @@ +package cli + +import ( + "encoding/json" + "errors" + "fmt" + "net" + "os" + "path/filepath" + "strconv" + "strings" + "sync" + "syscall" + "time" + + "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/captain/pkg/session" + commonsdb "github.com/flanksource/commons-db/db" + "gorm.io/gorm" + "gorm.io/gorm/clause" +) + +// StoredSession is one persisted transcript summary — a root session or a +// sub-agent (linked by ParentID) — invalidated by the file's ModUnix+Size. The +// rich fields are stored as Postgres jsonb. +type StoredSession struct { + Path string `gorm:"primaryKey;column:path"` + ID string `gorm:"index;column:id"` + ParentID *string `gorm:"index;column:parent_id"` + Source string `gorm:"column:source"` + IsAgent bool `gorm:"column:is_agent"` + AgentType string `gorm:"column:agent_type"` + AgentDesc string `gorm:"column:agent_desc"` + + ModUnix int64 `gorm:"column:mod_unix"` + Size int64 `gorm:"column:size"` + + Project string `gorm:"column:project"` + CWD string `gorm:"column:cwd"` + Model string `gorm:"column:model"` + + Git session.GitState `gorm:"serializer:json;type:jsonb;column:git"` + Provider ProviderInfo `gorm:"serializer:json;type:jsonb;column:provider"` + + StartedAt *time.Time `gorm:"column:started_at"` + EndedAt *time.Time `gorm:"column:ended_at"` + + Cost api.Cost `gorm:"serializer:json;type:jsonb;column:cost"` + Usage api.Usage `gorm:"serializer:json;type:jsonb;column:usage"` + Files session.ChangedFiles `gorm:"serializer:json;type:jsonb;column:files"` + Approvals session.ApprovalStats `gorm:"serializer:json;type:jsonb;column:approvals"` + + ToolCalls int `gorm:"column:tool_calls"` + MessageCount int `gorm:"column:message_count"` + ContextTokens int `gorm:"column:context_tokens"` + + Slug string `gorm:"column:slug"` + PlanPath string `gorm:"column:plan_path"` + PlanSlug string `gorm:"column:plan_slug"` + Plan *session.Plan `gorm:"serializer:json;type:jsonb;column:plan"` + + UpdatedAt time.Time +} + +func (StoredSession) TableName() string { return "captain_sessions" } + +// ProviderInfo is the provider block stored as jsonb. +type ProviderInfo struct { + Name string `json:"name,omitempty"` + Version string `json:"version,omitempty"` + ReasoningEffort string `json:"reasoningEffort,omitempty"` + Backend string `json:"backend,omitempty"` +} + +// StoredPrompt is the realized prompt for a captain-launched session, keyed by +// session id and written by the prompt-run path. +type StoredPrompt struct { + SessionID string `gorm:"primaryKey;column:session_id"` + RunID string `gorm:"column:run_id"` + Model string `gorm:"column:model"` + Backend string `gorm:"column:backend"` + Realized PromptRenderResult `gorm:"serializer:json;type:jsonb;column:realized"` + CreatedAt time.Time +} + +func (StoredPrompt) TableName() string { return "captain_session_prompts" } + +// sessionDB wraps the gorm handle; a nil *sessionDB means "no store — uncached". +type sessionDB struct{ gdb *gorm.DB } + +var ( + storeOnce sync.Once + store *sessionDB +) + +const ( + captainSessionEnvDSN = "CAPTAIN_SESSION_DB_URL" + gavelCacheEnvDSN = "GAVEL_GITHUB_CACHE_DSN" + + gavelDBModeDSN = "dsn" + gavelDBModeEmbedded = "embedded" +) + +// sessionStore returns the persistent session store, opening it once. It returns +// nil (and logs a single Warn) when the DB is unavailable, so callers degrade to +// uncached summarization. +func sessionStore() *sessionDB { + storeOnce.Do(func() { store = openSessionStore() }) + return store +} + +func openSessionStore() *sessionDB { + dsn, source, disabled, err := configuredSessionDSN() + if disabled { + return nil // explicitly disabled (tests, or users who opt out) + } + if err != nil { + log.Warnf("gavel session store unavailable: %v; falling back to captain session store", err) + } + if dsn == "" { + dir, err := sessionDBDir() + if err != nil { + // WORKAROUND(session-cache): user-approved degrade-to-uncached when the + // summary DB can't be opened; summarization still works, just uncached. + log.Warnf("session store unavailable: %v; continuing uncached", err) + return nil + } + embeddedDSN, _, err := commonsdb.StartEmbedded(commonsdb.EmbeddedConfig{DataDir: dir}) + if err != nil { + log.Warnf("session store unavailable: %v; continuing uncached", err) + return nil + } + dsn = embeddedDSN // shared daemon: leave running, don't call stop() + source = "captain embedded session DB" + } + log.Debugf("session store using %s", source) + gdb, _, err := commonsdb.SetupDB(dsn, "session-cache") + if err != nil { + log.Warnf("session store unavailable: %v; continuing uncached", err) + return nil + } + if err := gdb.AutoMigrate(&StoredSession{}, &StoredPrompt{}); err != nil { + log.Warnf("session store migrate failed: %v; continuing uncached", err) + return nil + } + return &sessionDB{gdb: gdb} +} + +func configuredSessionDSN() (dsn string, source string, disabled bool, err error) { + if dsn := strings.TrimSpace(os.Getenv(gavelCacheEnvDSN)); dsn != "" { + return dsn, gavelCacheEnvDSN, false, nil + } + + if dsn := os.Getenv(captainSessionEnvDSN); dsn != "" { + if dsn == "off" { + return "", "", true, nil + } + return dsn, captainSessionEnvDSN, false, nil + } + + dsn, source, err = gavelConfiguredSessionDSN() + return dsn, source, false, err +} + +// sessionDBDir is the embedded-postgres data directory (shared across processes). +func sessionDBDir() (string, error) { + cache, err := os.UserCacheDir() + if err != nil { + return "", err + } + return filepath.Join(cache, "captain", "session-db"), nil +} + +type gavelDBConfig struct { + Mode string `json:"mode"` + DSN string `json:"dsn,omitempty"` +} + +func gavelSessionDSN() (string, string, error) { + if dsn := strings.TrimSpace(os.Getenv(gavelCacheEnvDSN)); dsn != "" { + return dsn, gavelCacheEnvDSN, nil + } + return gavelConfiguredSessionDSN() +} + +func gavelConfiguredSessionDSN() (string, string, error) { + cfg, path, err := loadGavelDBConfig() + if err != nil { + return "", "", err + } + switch cfg.Mode { + case "": + return "", "", nil + case gavelDBModeDSN: + if strings.TrimSpace(cfg.DSN) == "" { + return "", "", fmt.Errorf("%s has mode=%s but empty dsn", path, gavelDBModeDSN) + } + return cfg.DSN, path, nil + case gavelDBModeEmbedded: + running, err := findRunningGavelEmbeddedPostgres() + if err != nil { + return "", "", err + } + if running != nil { + return gavelEmbeddedDSN(running.Port), path, nil + } + dataDir, err := gavelEmbeddedDataDir() + if err != nil { + return "", "", err + } + dsn, _, err := commonsdb.StartEmbedded(commonsdb.EmbeddedConfig{ + DataDir: dataDir, + Database: "gavel", + }) + if err != nil { + return "", "", err + } + return dsn, path, nil + default: + return "", "", fmt.Errorf("%s has unsupported mode %q", path, cfg.Mode) + } +} + +func loadGavelDBConfig() (gavelDBConfig, string, error) { + path, err := gavelDBConfigPath() + if err != nil { + return gavelDBConfig{}, "", err + } + b, err := os.ReadFile(path) + if err != nil { + if errors.Is(err, os.ErrNotExist) { + return gavelDBConfig{}, path, nil + } + return gavelDBConfig{}, path, fmt.Errorf("read %s: %w", path, err) + } + var cfg gavelDBConfig + if err := json.Unmarshal(b, &cfg); err != nil { + return gavelDBConfig{}, path, fmt.Errorf("parse %s: %w", path, err) + } + return cfg, path, nil +} + +func gavelDBConfigPath() (string, error) { + dir, err := gavelStateDir() + if err != nil { + return "", err + } + return filepath.Join(dir, "db.json"), nil +} + +func gavelEmbeddedDataDir() (string, error) { + dir, err := gavelStateDir() + if err != nil { + return "", err + } + return filepath.Join(dir, "embedded-pg"), nil +} + +func gavelStateDir() (string, error) { + home, err := os.UserHomeDir() + if err != nil { + return "", fmt.Errorf("resolve home dir: %w", err) + } + dir := filepath.Join(home, ".config", "gavel") + if err := os.MkdirAll(dir, 0o755); err != nil { + return "", fmt.Errorf("create gavel state dir %s: %w", dir, err) + } + return dir, nil +} + +type runningGavelEmbeddedPostgres struct { + PID int + Port int +} + +func findRunningGavelEmbeddedPostgres() (*runningGavelEmbeddedPostgres, error) { + dataDir, err := gavelEmbeddedDataDir() + if err != nil { + return nil, err + } + pidPath := filepath.Join(dataDir, "data", "postmaster.pid") + raw, err := os.ReadFile(pidPath) + if err != nil { + if errors.Is(err, os.ErrNotExist) { + return nil, nil + } + return nil, fmt.Errorf("read %s: %w", pidPath, err) + } + lines := strings.Split(string(raw), "\n") + const postmasterLinePort = 3 + if len(lines) <= postmasterLinePort { + return nil, fmt.Errorf("%s has %d lines, need >%d", pidPath, len(lines), postmasterLinePort) + } + pid, err := strconv.Atoi(strings.TrimSpace(lines[0])) + if err != nil || pid <= 0 { + return nil, fmt.Errorf("%s: invalid pid %q: %w", pidPath, lines[0], err) + } + port, err := strconv.Atoi(strings.TrimSpace(lines[postmasterLinePort])) + if err != nil || port <= 0 || port > 65535 { + return nil, fmt.Errorf("%s: invalid port %q: %w", pidPath, lines[postmasterLinePort], err) + } + if !processAlive(pid) || !tcpPortReachable("localhost", port) { + return nil, nil + } + return &runningGavelEmbeddedPostgres{PID: pid, Port: port}, nil +} + +func gavelEmbeddedDSN(port int) string { + return fmt.Sprintf("postgres://postgres:postgres@localhost:%d/gavel?sslmode=disable", port) +} + +func processAlive(pid int) bool { + if pid <= 0 { + return false + } + p, err := os.FindProcess(pid) + if err != nil { + return false + } + return p.Signal(syscall.Signal(0)) == nil +} + +func tcpPortReachable(host string, port int) bool { + conn, err := net.DialTimeout("tcp", net.JoinHostPort(host, strconv.Itoa(port)), 200*time.Millisecond) + if err != nil { + return false + } + _ = conn.Close() + return true +} + +// lookupFresh returns the stored row for path when it exists and its mtime+size +// still match the file (a fresh cache hit). +func (s *sessionDB) lookupFresh(path string, modUnix, size int64) (*StoredSession, bool) { + var row StoredSession + if err := s.gdb.Where("path = ?", path).First(&row).Error; err != nil { + return nil, false + } + if row.ModUnix != modUnix || row.Size != size { + return nil, false + } + return &row, true +} + +// upsertRows persists each Row (one transcript), stamping the file's mtime+size. +func (s *sessionDB) upsertRows(rows []session.Row) { + for _, r := range rows { + stored, ok := storedFromRow(r) + if !ok { + continue + } + if err := s.gdb.Clauses(clause.OnConflict{ + Columns: []clause.Column{{Name: "path"}}, + UpdateAll: true, + }).Create(&stored).Error; err != nil { + log.Warnf("session store upsert %s: %v", r.Path, err) + } + } +} + +// prompt returns the realized-prompt record for a session id, if any. +func (s *sessionDB) prompt(sessionID string) (*StoredPrompt, bool) { + var p StoredPrompt + if err := s.gdb.Where("session_id = ?", sessionID).First(&p).Error; err != nil { + return nil, false + } + return &p, true +} + +// upsertPrompt records the realized prompt for a launched session. +func (s *sessionDB) upsertPrompt(p StoredPrompt) { + if err := s.gdb.Clauses(clause.OnConflict{ + Columns: []clause.Column{{Name: "session_id"}}, + UpdateAll: true, + }).Create(&p).Error; err != nil { + log.Warnf("session store upsert prompt %s: %v", p.SessionID, err) + } +} + +// storedBase maps a session.Row to a StoredSession without the file identity +// (ModUnix/Size) — the fields shared by persistence and projection. +func storedBase(r session.Row) StoredSession { + var parent *string + if r.ParentID != "" { + p := r.ParentID + parent = &p + } + row := StoredSession{ + Path: r.Path, + ID: r.ID, + ParentID: parent, + Source: r.Source, + IsAgent: r.IsAgent, + AgentType: r.AgentType, + AgentDesc: r.AgentDesc, + Project: r.Project, + CWD: r.CWD, + Model: r.Model, + Git: r.Git, + Provider: ProviderInfo{Name: r.Provider, Version: r.Version, ReasoningEffort: r.ReasoningEffort}, + StartedAt: r.StartedAt, + EndedAt: r.EndedAt, + Cost: r.Cost, + Usage: r.Usage, + Files: r.Files, + Approvals: r.Approvals, + ToolCalls: r.ToolCalls, + MessageCount: r.Messages, + ContextTokens: r.ContextTokens, + } + if r.Plan != nil { + row.PlanPath = r.Plan.Path + row.PlanSlug = r.Plan.Slug + plan := *r.Plan + row.Plan = &plan + } + return row +} + +// storedFromRow maps a session.Row to a StoredSession, stamping the transcript +// file's mtime+size. Returns ok=false when the file can't be stat'd. +func storedFromRow(r session.Row) (StoredSession, bool) { + info, err := os.Stat(r.Path) + if err != nil { + return StoredSession{}, false + } + row := storedBase(r) + row.ModUnix = info.ModTime().UnixNano() + row.Size = info.Size() + return row, true +} + +const ( + claudeContextWindow = 1_000_000 + codexContextWindow = 200_000 +) + +// contextWindow returns the model context window for a source. +func contextWindow(source string) int { + if source == "codex" { + return codexContextWindow + } + return claudeContextWindow +} + +// freeContextPercent is 100 minus the used fraction of the window, clamped. +func freeContextPercent(used, window int) int { + if window <= 0 { + return 0 + } + if used < 0 { + used = 0 + } + free := 100 - int(float64(used)/float64(window)*100) + if free < 0 { + return 0 + } + if free > 100 { + return 100 + } + return free +} + +// recordFromRow projects a session.Row straight to a SessionRecord (miss path, +// where the store may be unavailable). +func recordFromRow(r session.Row) SessionRecord { + return storedBase(r).toRecord() +} + +// toRecord projects a StoredSession to the SessionRecord list/live wire shape. +func (row StoredSession) toRecord() SessionRecord { + rec := SessionRecord{ + Key: sessionRecordKey(row.Source, row.Path), + ID: row.ID, + Source: row.Source, + Model: row.Model, + ReasoningEffort: row.Provider.ReasoningEffort, + Version: row.Provider.Version, + Provider: row.Provider.Name, + GitBranch: row.Git.Branch, + CWD: row.CWD, + StartedAt: row.StartedAt, + EndedAt: row.EndedAt, + ToolCalls: row.ToolCalls, + Messages: row.MessageCount, + DetailAvailable: true, + CostUSD: row.Cost.Total(), + } + if u := row.Usage; u.TotalTokens() > 0 { + rec.Tokens = &SessionTokensWire{ + InputTokens: u.InputTokens, + OutputTokens: u.OutputTokens, + CacheReadTokens: u.CacheReadTokens, + CacheCreationTokens: u.CacheWriteTokens, + TotalTokens: u.TotalTokens(), + } + } + if row.ContextTokens > 0 { + window := contextWindow(row.Source) + rec.Context = &SessionContextWire{ + UsedTokens: row.ContextTokens, + WindowTokens: window, + FreePercent: freeContextPercent(row.ContextTokens, window), + } + } + return rec +} diff --git a/pkg/cli/session_store_test.go b/pkg/cli/session_store_test.go new file mode 100644 index 0000000..926697f --- /dev/null +++ b/pkg/cli/session_store_test.go @@ -0,0 +1,184 @@ +package cli + +import ( + "os" + "path/filepath" + "testing" + + "github.com/flanksource/captain/pkg/api" + "github.com/flanksource/captain/pkg/session" + commonsdb "github.com/flanksource/commons-db/db" +) + +// TestRecordFromRow_ProjectsRichFields verifies the Row→SessionRecord projection +// carries git/provider/cost/tokens and derives the context-free percent. +func TestRecordFromRow_ProjectsRichFields(t *testing.T) { + r := session.Row{ + ID: "s1", + Source: "claude", + Model: "claude-opus-4", + Git: session.GitState{Branch: "main"}, + Provider: "anthropic", + Version: "1.2.3", + ReasoningEffort: "high", + Usage: api.Usage{InputTokens: 1000, OutputTokens: 500}, + Cost: api.Cost{InputCost: 0.015, OutputCost: 0.0375}, + ContextTokens: 940_000, // 94% of the 1M window → 6% free + ToolCalls: 3, + Messages: 2, + } + rec := recordFromRow(r) + + if rec.ID != "s1" || rec.GitBranch != "main" || rec.Provider != "anthropic" || rec.ReasoningEffort != "high" { + t.Fatalf("record meta = %+v", rec) + } + if rec.Context == nil || rec.Context.FreePercent != 6 || rec.Context.WindowTokens != 1_000_000 { + t.Fatalf("context = %+v, want 6%% free of 1M", rec.Context) + } + if rec.Tokens == nil || rec.Tokens.InputTokens != 1000 || rec.Tokens.OutputTokens != 500 { + t.Fatalf("tokens = %+v", rec.Tokens) + } + if rec.CostUSD == 0 { + t.Errorf("cost not projected") + } + if rec.ToolCalls != 3 || rec.Messages != 2 { + t.Errorf("counts = %d/%d, want 3/2", rec.ToolCalls, rec.Messages) + } +} + +func TestStoredBase_PersistsInlinePlan(t *testing.T) { + r := session.Row{ + ID: "codex-plan", + Source: "codex", + Plan: &session.Plan{ + Content: "- [x] inspect\n- [ ] test", + Explicit: true, + Events: []session.PlanEvent{{Kind: session.PlanWrite}}, + }, + } + + stored := storedBase(r) + + if stored.Plan == nil { + t.Fatal("stored plan is nil") + } + if stored.Plan.Content != r.Plan.Content || !stored.Plan.Explicit { + t.Fatalf("stored plan = %+v, want %+v", stored.Plan, r.Plan) + } +} + +func TestGavelSessionDSNPrefersEnv(t *testing.T) { + t.Setenv(gavelCacheEnvDSN, "postgres://env-dsn") + + dsn, source, err := gavelSessionDSN() + if err != nil { + t.Fatalf("gavelSessionDSN: %v", err) + } + if dsn != "postgres://env-dsn" || source != gavelCacheEnvDSN { + t.Fatalf("dsn/source = %q/%q", dsn, source) + } +} + +func TestConfiguredSessionDSNPrefersGavelEnvOverCaptainEnv(t *testing.T) { + t.Setenv(gavelCacheEnvDSN, "postgres://gavel-dsn") + t.Setenv(captainSessionEnvDSN, "postgres://captain-dsn") + + dsn, source, disabled, err := configuredSessionDSN() + if err != nil { + t.Fatalf("configuredSessionDSN: %v", err) + } + if disabled { + t.Fatal("configuredSessionDSN unexpectedly disabled") + } + if dsn != "postgres://gavel-dsn" || source != gavelCacheEnvDSN { + t.Fatalf("dsn/source = %q/%q", dsn, source) + } +} + +func TestConfiguredSessionDSNFallsBackToCaptainEnv(t *testing.T) { + t.Setenv(gavelCacheEnvDSN, "") + t.Setenv(captainSessionEnvDSN, "postgres://captain-dsn") + + dsn, source, disabled, err := configuredSessionDSN() + if err != nil { + t.Fatalf("configuredSessionDSN: %v", err) + } + if disabled { + t.Fatal("configuredSessionDSN unexpectedly disabled") + } + if dsn != "postgres://captain-dsn" || source != captainSessionEnvDSN { + t.Fatalf("dsn/source = %q/%q", dsn, source) + } +} + +func TestGavelSessionDSNFromDBConfig(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + t.Setenv(gavelCacheEnvDSN, "") + dir := filepath.Join(home, ".config", "gavel") + if err := os.MkdirAll(dir, 0o755); err != nil { + t.Fatalf("mkdir: %v", err) + } + path := filepath.Join(dir, "db.json") + if err := os.WriteFile(path, []byte(`{"mode":"dsn","dsn":"postgres://configured-dsn"}`), 0o600); err != nil { + t.Fatalf("write config: %v", err) + } + + dsn, source, err := gavelSessionDSN() + if err != nil { + t.Fatalf("gavelSessionDSN: %v", err) + } + if dsn != "postgres://configured-dsn" || source != path { + t.Fatalf("dsn/source = %q/%q", dsn, source) + } +} + +// TestSessionStoreRoundTrip exercises the real gorm store: fresh miss inserts, +// unchanged hit is served from the row (parent-linked child included), a changed +// file invalidates, and a realized prompt round-trips. Gated on a Postgres DSN. +func TestSessionStoreRoundTrip(t *testing.T) { + dsn := os.Getenv("CAPTAIN_SESSION_DB_URL") + if dsn == "" || dsn == "off" { + t.Skip("set CAPTAIN_SESSION_DB_URL to a Postgres DSN to run the session store integration test") + } + gdb, _, err := commonsdb.SetupDB(dsn, "session-cache-test") + if err != nil { + t.Fatalf("open db: %v", err) + } + if err := gdb.AutoMigrate(&StoredSession{}, &StoredPrompt{}); err != nil { + t.Fatalf("migrate: %v", err) + } + gdb.Exec("TRUNCATE captain_sessions, captain_session_prompts") + st := &sessionDB{gdb: gdb} + + // A root session with one sub-agent transcript. + dir := t.TempDir() + rootPath := filepath.Join(dir, "root.jsonl") + writeJSONL(t, rootPath, map[string]any{ + "type": "assistant", "sessionId": "root", "uuid": "r1", "cwd": "/repo", "gitBranch": "main", + "message": map[string]any{"role": "assistant", "model": "claude-opus-4", + "usage": map[string]any{"input_tokens": 1000, "output_tokens": 500}, + "content": []any{map[string]any{"type": "text", "text": "hi"}}}, + }) + + rows, err := session.RowsFromFile(rootPath, "claude") + if err != nil { + t.Fatalf("rows: %v", err) + } + st.upsertRows(rows) + + info, _ := os.Stat(rootPath) + if _, ok := st.lookupFresh(rootPath, info.ModTime().UnixNano(), info.Size()); !ok { + t.Fatal("expected a fresh hit after upsert") + } + // A changed size invalidates. + if _, ok := st.lookupFresh(rootPath, info.ModTime().UnixNano(), info.Size()+1); ok { + t.Fatal("size change must invalidate the row") + } + + // Realized-prompt round-trip. + st.upsertPrompt(StoredPrompt{SessionID: "root", RunID: "run-1", Model: "claude-opus-4", Backend: "claude_cli"}) + if p, ok := st.prompt("root"); !ok || p.RunID != "run-1" { + t.Fatalf("prompt = %+v, ok=%v", p, ok) + } +} diff --git a/pkg/cli/session_summary.go b/pkg/cli/session_summary.go new file mode 100644 index 0000000..5fb7ff1 --- /dev/null +++ b/pkg/cli/session_summary.go @@ -0,0 +1,23 @@ +package cli + +import ( + "path/filepath" + "strings" +) + +// sessionRecordMatchesProject reports whether a session's cwd falls under the +// project root (the record is in scope for the current project). +func sessionRecordMatchesProject(record SessionRecord, projectRoot string) bool { + if projectRoot == "" { + return true + } + cwd := record.CWD + if cwd == "" { + return false + } + rel, err := filepath.Rel(projectRoot, cwd) + if err == nil && (rel == "." || (!strings.HasPrefix(rel, ".."+string(filepath.Separator)) && rel != "..")) { + return true + } + return strings.HasPrefix(cwd, projectRoot+string(filepath.Separator)) +} diff --git a/pkg/cli/sessions.go b/pkg/cli/sessions.go index 30da4eb..41850c6 100644 --- a/pkg/cli/sessions.go +++ b/pkg/cli/sessions.go @@ -1,6 +1,7 @@ package cli import ( + "context" "crypto/sha256" "encoding/hex" "encoding/json" @@ -13,6 +14,8 @@ import ( "github.com/flanksource/captain/pkg/ai/history" "github.com/flanksource/captain/pkg/claude" + "github.com/flanksource/captain/pkg/session" + rpchttp "github.com/flanksource/clicky/rpc/http" ) type SessionListOptions struct { @@ -23,7 +26,7 @@ type SessionListOptions struct { } type SessionGetOptions struct { - ID string `flag:"id" args:"true" help:"Session key or session id" required:"true"` + ID string `flag:"id" args:"true" help:"Session key or session id"` Source string `flag:"source" help:"Restrict source: all, claude, codex" default:"all"` } @@ -36,62 +39,165 @@ type SessionListResult struct { Scope string `json:"scope"` } +type SessionLiveOptions struct { + Source string `flag:"source" help:"Filter source: all, claude, codex" default:"all"` + All bool `flag:"all" help:"Include sessions from all projects" short:"a"` + Query string `flag:"q" help:"Search session id, model, cwd, branch, provider, pid, or health"` + Limit int `flag:"limit" help:"Maximum sessions to return" default:"25" short:"l"` + Full bool `flag:"full" help:"Parse all matching history exactly; ignores --limit"` +} + +type SessionLiveResult struct { + Sessions []SessionRecord `json:"sessions"` + Total int `json:"total"` + Source string `json:"source"` + Scope string `json:"scope"` + Summary SessionDashboardWire `json:"summary"` +} + type SessionRecord struct { - Key string `json:"key"` - ID string `json:"id"` - Source string `json:"source"` - StartedAt *time.Time `json:"startedAt,omitempty"` - EndedAt *time.Time `json:"endedAt,omitempty"` - Model string `json:"model,omitempty"` - ReasoningEffort string `json:"reasoningEffort,omitempty"` - Version string `json:"version,omitempty"` - GitBranch string `json:"gitBranch,omitempty"` - Provider string `json:"provider,omitempty"` - CWD string `json:"cwd,omitempty"` - ToolCalls int `json:"toolCalls"` - Messages int `json:"messages"` - Entries []SessionEntryWire `json:"entries,omitempty"` -} - -type SessionEntryWire struct { - Type string `json:"type,omitempty"` - ToolUse *SessionToolUseWire `json:"tool_use,omitempty"` - Message *SessionMessageWire `json:"message,omitempty"` - Timestamp string `json:"timestamp,omitempty"` - CWD string `json:"cwd,omitempty"` - SessionID string `json:"sessionId,omitempty"` - UUID string `json:"uuid,omitempty"` - IsAPIErrorMessage bool `json:"isApiErrorMessage,omitempty"` - APIErrorStatus int `json:"apiErrorStatus,omitempty"` - Error string `json:"error,omitempty"` -} - -type SessionMessageWire struct { - Role string `json:"role,omitempty"` - StopReason string `json:"stop_reason,omitempty"` - Content []SessionContentWire `json:"content,omitempty"` -} - -type SessionContentWire struct { - Type string `json:"type,omitempty"` - Text string `json:"text,omitempty"` - Thinking string `json:"thinking,omitempty"` - Name string `json:"name,omitempty"` - Input map[string]any `json:"input,omitempty"` - ID string `json:"id,omitempty"` -} - -type SessionToolUseWire struct { - Tool string `json:"tool,omitempty"` - Input map[string]any `json:"input,omitempty"` - Timestamp string `json:"timestamp,omitempty"` - CWD string `json:"cwd,omitempty"` - SessionID string `json:"session_id,omitempty"` - ToolUseID string `json:"tool_use_id,omitempty"` - Source string `json:"source,omitempty"` - Model string `json:"model,omitempty"` - ReasoningEffort string `json:"reasoning_effort,omitempty"` - Response string `json:"response,omitempty"` + Key string `json:"key"` + ID string `json:"id"` + Source string `json:"source"` + StartedAt *time.Time `json:"startedAt,omitempty"` + EndedAt *time.Time `json:"endedAt,omitempty"` + Model string `json:"model,omitempty"` + ReasoningEffort string `json:"reasoningEffort,omitempty"` + Version string `json:"version,omitempty"` + GitBranch string `json:"gitBranch,omitempty"` + Provider string `json:"provider,omitempty"` + CWD string `json:"cwd,omitempty"` + ToolCalls int `json:"toolCalls"` + Messages int `json:"messages"` + DetailAvailable bool `json:"detailAvailable"` + Tokens *SessionTokensWire `json:"tokens,omitempty"` + Context *SessionContextWire `json:"context,omitempty"` + CostUSD float64 `json:"costUsd,omitempty"` + Live *SessionLiveWire `json:"live,omitempty"` + Health []SessionHealthWire `json:"health,omitempty"` +} + +type SessionTokensWire struct { + InputTokens int `json:"inputTokens,omitempty"` + OutputTokens int `json:"outputTokens,omitempty"` + CacheReadTokens int `json:"cacheReadTokens,omitempty"` + CacheCreationTokens int `json:"cacheCreationTokens,omitempty"` + TotalTokens int `json:"totalTokens,omitempty"` +} + +type SessionContextWire struct { + UsedTokens int `json:"usedTokens,omitempty"` + WindowTokens int `json:"windowTokens,omitempty"` + FreePercent int `json:"freePercent"` +} + +type SessionLiveWire struct { + PID int `json:"pid,omitempty"` + Status string `json:"status,omitempty"` + Active bool `json:"active"` + CPUPercent float64 `json:"cpuPercent,omitempty"` + MemoryPercent float64 `json:"memoryPercent,omitempty"` + StartedAt *time.Time `json:"startedAt,omitempty"` + CWD string `json:"cwd,omitempty"` + Command string `json:"command,omitempty"` +} + +type SessionHealthWire struct { + Kind string `json:"kind"` + Severity string `json:"severity"` + Message string `json:"message"` +} + +type SessionDashboardWire struct { + TotalSessions int `json:"totalSessions"` + LiveSessions int `json:"liveSessions"` + ActiveSessions int `json:"activeSessions"` + StoppedSessions int `json:"stoppedSessions"` + AlertSessions int `json:"alertSessions"` + InputTokens int `json:"inputTokens,omitempty"` + OutputTokens int `json:"outputTokens,omitempty"` + CacheReadTokens int `json:"cacheReadTokens,omitempty"` + CacheCreationTokens int `json:"cacheCreationTokens,omitempty"` + TotalTokens int `json:"totalTokens,omitempty"` + CostUSD float64 `json:"costUsd,omitempty"` + LowestContextFree *int `json:"lowestContextFree,omitempty"` +} + +func (t SessionTokensWire) String() string { + if t.TotalTokens > 0 { + return compactSessionInt(t.TotalTokens) + } + total := t.InputTokens + t.OutputTokens + t.CacheReadTokens + t.CacheCreationTokens + if total > 0 { + return compactSessionInt(total) + } + return "" +} + +func (c SessionContextWire) String() string { + if c.WindowTokens > 0 { + return fmt.Sprintf("%d%% free", c.FreePercent) + } + if c.FreePercent > 0 { + return fmt.Sprintf("%d%% free", c.FreePercent) + } + return "" +} + +func (l SessionLiveWire) String() string { + if l.PID == 0 && l.Status == "" && l.Command == "" { + return "" + } + parts := make([]string, 0, 4) + if l.PID > 0 { + parts = append(parts, fmt.Sprintf("pid %d", l.PID)) + } + if l.Status != "" { + parts = append(parts, l.Status) + } + if l.CPUPercent > 0 { + parts = append(parts, fmt.Sprintf("%.1f%% cpu", l.CPUPercent)) + } + if l.MemoryPercent > 0 { + parts = append(parts, fmt.Sprintf("%.1f%% mem", l.MemoryPercent)) + } + if command := compactSessionCommand(l.Command); command != "" { + parts = append(parts, command) + } + return strings.Join(parts, " ") +} + +func (h SessionHealthWire) String() string { + if h.Kind == "" { + return h.Message + } + if h.Severity == "" { + return h.Kind + } + return h.Severity + ":" + h.Kind +} + +func compactSessionCommand(command string) string { + fields := strings.Fields(command) + if len(fields) == 0 { + return "" + } + base := filepath.Base(strings.Trim(fields[0], `"'`)) + if len(fields) > 1 { + return base + " ..." + } + return base +} + +func compactSessionInt(value int) string { + switch { + case value >= 1_000_000: + return fmt.Sprintf("%.1fM", float64(value)/1_000_000) + case value >= 1_000: + return fmt.Sprintf("%dk", value/1_000) + default: + return fmt.Sprintf("%d", value) + } } type sessionCandidate struct { @@ -99,7 +205,7 @@ type sessionCandidate struct { path string } -func RunSessionList(opts SessionListOptions) (SessionListResult, error) { +func RunSessionList(ctx context.Context, opts SessionListOptions) (SessionListResult, error) { source, err := normalizeSessionSource(opts.Source) if err != nil { return SessionListResult{}, err @@ -109,7 +215,7 @@ func RunSessionList(opts SessionListOptions) (SessionListResult, error) { return SessionListResult{}, err } - candidates, err := discoverSessionCandidates(cwd, opts.All, source) + candidates, err := discoverSessionCandidates(ctx, cwd, opts.All, source) if err != nil { return SessionListResult{}, err } @@ -137,31 +243,128 @@ func RunSessionList(opts SessionListOptions) (SessionListResult, error) { }, nil } -func RunSessionGet(opts SessionGetOptions) (SessionRecord, error) { +// RunSessionGet returns the unified session model for a session id. The viewer +// consumes this model natively — one shape for both Claude and Codex, carrying +// the agent hierarchy, cost, changed files, plan events, approvals, and the +// message stream (with per-message provenance and the raw JSONL line). +func RunSessionGet(ctx context.Context, opts SessionGetOptions) (*session.Session, error) { source, err := normalizeSessionSource(opts.Source) if err != nil { - return SessionRecord{}, err + return nil, err } id := strings.TrimSpace(opts.ID) if id == "" { - return SessionRecord{}, fmt.Errorf("id is required") + return nil, fmt.Errorf("id is required") + } + + stopFind := rpchttp.Track(ctx, "find") + candidate, found, err := findSessionCandidateByID(id, source) + stopFind() + if err != nil { + return nil, err + } else if found { + return buildUnifiedSession(ctx, candidate) } - candidates, err := discoverSessionCandidates("", true, source) + candidates, err := discoverSessionCandidates(ctx, "", true, source) if err != nil { - return SessionRecord{}, err + return nil, err } for _, candidate := range candidates { if candidate.record.Key != id && candidate.record.ID != id && !strings.HasPrefix(candidate.record.ID, id) { continue } - record, err := loadSessionDetail(candidate) + return buildUnifiedSession(ctx, candidate) + } + return nil, fmt.Errorf("session %q not found", id) +} + +// buildUnifiedSession builds the pkg/session model for a resolved candidate: a +// Claude session (root + sub-agent transcripts, resolved by id) or a Codex +// session file. +func buildUnifiedSession(ctx context.Context, candidate sessionCandidate) (*session.Session, error) { + defer rpchttp.Track(ctx, "parse")() + s, err := buildSessionModel(candidate) + if err != nil { + return nil, err + } + persistSessionRows(candidate, s) + attachStoredPrompt(s) + return s, nil +} + +func buildSessionModel(candidate sessionCandidate) (*session.Session, error) { + switch candidate.record.Source { + case "claude": + id := candidate.record.ID + if id == "" { + id = sessionIDFromFile(candidate.path) + } + sessions, err := session.Build("", true, claude.Filter{ + SessionIDs: []string{id}, + KeepRaw: true, + IncludeAgents: true, + }) + if err != nil { + return nil, err + } + for _, s := range sessions { + if s.ID == id { + return s, nil + } + } + if len(sessions) > 0 { + return sessions[0], nil + } + return nil, fmt.Errorf("session %q not found", id) + case "codex": + sessions := session.BuildCodex([]string{candidate.path}) + if len(sessions) == 0 { + return nil, fmt.Errorf("codex session %q not parseable", candidate.path) + } + return sessions[0], nil + default: + return nil, fmt.Errorf("unknown session source %q", candidate.record.Source) + } +} + +// persistSessionRows upserts the session's rows (root + sub-agents linked by +// parent) so the store's hierarchy is populated on a detailed read. +func persistSessionRows(candidate sessionCandidate, s *session.Session) { + st := sessionStore() + if st == nil { + return + } + switch candidate.record.Source { + case "claude": + parsed, err := claude.ParseSessions("", true, claude.Filter{SessionIDs: []string{s.ID}, IncludeAgents: true}) if err != nil { - return SessionRecord{}, err + return + } + for _, ps := range parsed { + if ps.SessionID == s.ID { + st.upsertRows(session.Rows(ps)) + } + } + case "codex": + if r, ok := session.CodexRow(candidate.path); ok { + st.upsertRows([]session.Row{r}) + } + } +} + +// attachStoredPrompt attaches the realized prompt (for captain-launched +// sessions) from the store to the session model. +func attachStoredPrompt(s *session.Session) { + st := sessionStore() + if st == nil || s.ID == "" { + return + } + if p, ok := st.prompt(s.ID); ok { + if raw, err := json.Marshal(p.Realized); err == nil { + s.Prompt = raw } - return record, nil } - return SessionRecord{}, fmt.Errorf("session %q not found", id) } func normalizeSessionSource(source string) (string, error) { @@ -176,17 +379,17 @@ func normalizeSessionSource(source string) (string, error) { } } -func discoverSessionCandidates(cwd string, searchAll bool, source string) ([]sessionCandidate, error) { +func discoverSessionCandidates(ctx context.Context, cwd string, searchAll bool, source string) ([]sessionCandidate, error) { var candidates []sessionCandidate if source == "all" || source == "claude" { - claudeSessions, err := discoverClaudeSessions(cwd, searchAll) + claudeSessions, err := discoverClaudeSessions(ctx, cwd, searchAll) if err != nil { return nil, err } candidates = append(candidates, claudeSessions...) } if source == "all" || source == "codex" { - codexSessions, err := discoverCodexSessions(cwd, searchAll) + codexSessions, err := discoverCodexSessions(ctx, cwd, searchAll) if err != nil { return nil, err } @@ -195,293 +398,147 @@ func discoverSessionCandidates(cwd string, searchAll bool, source string) ([]ses return candidates, nil } -func discoverClaudeSessions(cwd string, searchAll bool) ([]sessionCandidate, error) { - files, err := claude.FindSessionFiles(claude.GetProjectsDir(), cwd, searchAll) - if err != nil { - return nil, err +func findSessionCandidateByID(id string, source string) (sessionCandidate, bool, error) { + id = strings.TrimSpace(id) + if id == "" { + return sessionCandidate{}, false, nil } - candidates := make([]sessionCandidate, 0, len(files)) - for _, file := range files { - entries, err := claude.ReadHistoryFile(file) - if err != nil { - continue + if source == "all" || source == "claude" { + candidate, ok, err := findClaudeSessionCandidateByID(id) + if err != nil || ok { + return candidate, ok, err } - record := summarizeClaudeSession(file, entries) - candidates = append(candidates, sessionCandidate{record: record, path: file}) } - return candidates, nil + if source == "all" || source == "codex" { + candidate, ok, err := findCodexSessionCandidateByID(id) + if err != nil || ok { + return candidate, ok, err + } + } + return sessionCandidate{}, false, nil } -func discoverCodexSessions(cwd string, searchAll bool) ([]sessionCandidate, error) { - files, err := history.FindCodexSessionFiles() - if err != nil { - return nil, err +func findClaudeSessionCandidateByID(id string) (sessionCandidate, bool, error) { + if hasPathOrGlobMeta(id) { + return sessionCandidate{}, false, nil } - matchRoot := cwd - if cwd != "" { - projectInfo := claude.FindProjectInfo(cwd) - if projectInfo.Root != "" { - matchRoot = projectInfo.Root - } + projectsDir := claude.GetProjectsDir() + if _, err := os.Stat(projectsDir); os.IsNotExist(err) { + return sessionCandidate{}, false, nil + } else if err != nil { + return sessionCandidate{}, false, err } - candidates := make([]sessionCandidate, 0, len(files)) + files, err := filepath.Glob(filepath.Join(projectsDir, "*", id+"*.jsonl")) + if err != nil { + return sessionCandidate{}, false, err + } + sort.Strings(files) for _, file := range files { - uses, err := history.ExtractCodexToolUses(file) - if err != nil || len(uses) == 0 { + sessionID := sessionIDFromFile(file) + if sessionID != id && !strings.HasPrefix(sessionID, id) { continue } - if !searchAll && !codexSessionMatchesProject(uses, matchRoot) { - continue - } - record := summarizeCodexSession(file, uses) - candidates = append(candidates, sessionCandidate{record: record, path: file}) - } - return candidates, nil -} - -func summarizeClaudeSession(file string, entries []claude.HistoryEntry) SessionRecord { - record := SessionRecord{ - Key: sessionRecordKey("claude", file), - ID: sessionIDFromFile(file), - Source: "claude", - } - for _, entry := range entries { - ts, err := entry.ParseTimestamp() - if err == nil { - extendSessionRange(&record, ts) - } - if entry.SessionID != "" { - record.ID = entry.SessionID - } - if record.Model == "" && entry.Message.Model != "" { - record.Model = entry.Message.Model - } - if record.Version == "" && entry.Version != "" { - record.Version = entry.Version - } - if record.GitBranch == "" && entry.GitBranch != "" { - record.GitBranch = entry.GitBranch - } - if record.CWD == "" && entry.CWD != "" { - record.CWD = entry.CWD - } - if entry.Message.Role == claude.MessageRoleUser || entry.Message.Role == claude.MessageRoleAssistant { - if len(messageTextBlocks(entry)) > 0 { - record.Messages++ - } - } - record.ToolCalls += len(entry.Message.GetToolUses()) + return sessionCandidate{ + record: minimalSessionRecord("claude", file, sessionID), + path: file, + }, true, nil } - return record + return sessionCandidate{}, false, nil } -func summarizeCodexSession(file string, uses []history.ToolUse) SessionRecord { - record := SessionRecord{ - Key: sessionRecordKey("codex", file), - Source: "codex", - } - for _, use := range uses { - if use.SessionID != "" { - record.ID = use.SessionID - } - if use.Timestamp != nil { - extendSessionRange(&record, *use.Timestamp) - } - if record.CWD == "" && use.CWD != "" { - record.CWD = use.CWD - } - if record.Model == "" && use.Model != "" { - record.Model = use.Model - } - if record.ReasoningEffort == "" && use.ReasoningEffort != "" { - record.ReasoningEffort = use.ReasoningEffort - } - if use.Tool == "Assistant" || use.Tool == "Reasoning" { - record.Messages++ - } else { - record.ToolCalls++ - } +func findCodexSessionCandidateByID(id string) (sessionCandidate, bool, error) { + files, err := history.FindCodexSessionFiles() + if err != nil { + return sessionCandidate{}, false, err } - if meta, err := history.ReadCodexSessionInfo(file); err == nil && meta != nil { - if record.ID == "" { - record.ID = meta.ID + sort.Strings(files) + for _, file := range files { + key := sessionRecordKey("codex", file) + fileID := sessionIDFromFile(file) + if key == id || fileID == id || (fileID != "" && strings.HasPrefix(fileID, id)) { + return sessionCandidate{ + record: minimalSessionRecord("codex", file, fileID), + path: file, + }, true, nil + } + meta, err := history.ReadCodexSessionMeta(file) + if err != nil || meta == nil || meta.ID == "" { + continue } - if record.CWD == "" { + if meta.ID == id || strings.HasPrefix(meta.ID, id) { + record := minimalSessionRecord("codex", file, meta.ID) record.CWD = meta.CWD - } - record.Provider = meta.ModelProvider - record.Version = meta.CLIVersion - record.GitBranch = meta.GitBranch - if record.Model == "" { - record.Model = meta.Model - } - if record.ReasoningEffort == "" { - record.ReasoningEffort = meta.ReasoningEffort - } - if record.StartedAt == nil && meta.StartedAt != nil { + record.Provider = meta.ModelProvider + record.Version = meta.CLIVersion + record.GitBranch = meta.GitBranch record.StartedAt = meta.StartedAt + return sessionCandidate{record: record, path: file}, true, nil } } - if record.ID == "" { - record.ID = sessionIDFromFile(file) - } - return record + return sessionCandidate{}, false, nil } -func loadSessionDetail(candidate sessionCandidate) (SessionRecord, error) { - record := candidate.record - switch record.Source { - case "claude": - entries, err := claude.ReadHistoryFile(candidate.path) - if err != nil { - return SessionRecord{}, err - } - record = summarizeClaudeSession(candidate.path, entries) - record.Entries = claudeEntriesForViewer(entries) - case "codex": - uses, err := history.ExtractCodexToolUses(candidate.path) - if err != nil { - return SessionRecord{}, err - } - record = summarizeCodexSession(candidate.path, uses) - record.Entries = codexEntriesForViewer(uses) - default: - return SessionRecord{}, fmt.Errorf("unknown session source %q", record.Source) +func minimalSessionRecord(source, file, id string) SessionRecord { + return SessionRecord{ + Key: sessionRecordKey(source, file), + ID: id, + Source: source, + DetailAvailable: true, } - return record, nil } -func claudeEntriesForViewer(entries []claude.HistoryEntry) []SessionEntryWire { - toolUses := claude.ExtractToolUsesWithTokens(entries) - toolByID := make(map[string]claude.ToolUse, len(toolUses)) - for _, use := range toolUses { - if use.ToolUseID != "" { - toolByID[use.ToolUseID] = use - } - } - - var out []SessionEntryWire - for entryIndex, entry := range entries { - if blocks := messageTextBlocks(entry); len(blocks) > 0 { - out = append(out, SessionEntryWire{ - Type: string(entry.Message.Role), - Message: &SessionMessageWire{Role: string(entry.Message.Role), StopReason: string(entry.Message.StopReason), Content: blocks}, - Timestamp: entry.Timestamp, - CWD: entry.CWD, - SessionID: entry.SessionID, - UUID: entry.UUID, - }) - } - - for blockIndex, block := range entry.Message.Content { - if block.Type != claude.ContentTypeToolUse { - continue - } - use, ok := toolByID[block.ID] - if !ok { - use = claude.ToolUse{ - Tool: block.Name, - Input: rawJSONMap(block.Input), - SessionID: entry.SessionID, - ToolUseID: block.ID, - Source: "claude", - } - if ts, err := entry.ParseTimestamp(); err == nil { - use.Timestamp = &ts - } - } - if use.Source == "" { - use.Source = "claude" - } - if use.Model == "" { - use.Model = entry.Message.Model - } - if use.CWD == "" { - use.CWD = entry.CWD - } - out = append(out, SessionEntryWire{ - Type: "assistant", - ToolUse: claudeToolUseForViewer(use), - Timestamp: entry.Timestamp, - CWD: entry.CWD, - SessionID: entry.SessionID, - UUID: fallbackUUID(entry.UUID, entryIndex, blockIndex), - }) - } - } - return out +func hasPathOrGlobMeta(s string) bool { + return strings.ContainsAny(s, `/\*?[`) } -func codexEntriesForViewer(uses []history.ToolUse) []SessionEntryWire { - out := make([]SessionEntryWire, 0, len(uses)) - for i, use := range uses { - out = append(out, SessionEntryWire{ - Type: "assistant", - ToolUse: codexToolUseForViewer(use), - Timestamp: formatOptionalTime(use.Timestamp), - CWD: use.CWD, - SessionID: use.SessionID, - UUID: fmt.Sprintf("codex-%d", i), - }) +func discoverClaudeSessions(ctx context.Context, cwd string, searchAll bool) ([]sessionCandidate, error) { + stopFind := rpchttp.Track(ctx, "find") + files, err := claude.FindSessionFiles(claude.GetProjectsDir(), cwd, searchAll) + stopFind() + if err != nil { + return nil, err } - return out -} - -func messageTextBlocks(entry claude.HistoryEntry) []SessionContentWire { - var blocks []SessionContentWire - for _, block := range entry.Message.Content { - switch block.Type { - case claude.ContentTypeText: - if block.Text != "" { - blocks = append(blocks, SessionContentWire{Type: "text", Text: block.Text, ID: block.ID}) - } - case claude.ContentTypeThinking, claude.ContentTypeRedactedThinking: - if block.Thinking != "" { - blocks = append(blocks, SessionContentWire{Type: "thinking", Thinking: block.Thinking, ID: block.ID}) - } - } + refs := make([]sessionFileRef, len(files)) + for i, file := range files { + refs[i] = sessionFileRef{source: "claude", path: file} } - return blocks + return summarizeSessionRefs(ctx, refs), nil } -func claudeToolUseForViewer(use claude.ToolUse) *SessionToolUseWire { - return &SessionToolUseWire{ - Tool: use.Tool, - Input: use.Input, - Timestamp: formatOptionalTime(use.Timestamp), - CWD: use.CWD, - SessionID: use.SessionID, - ToolUseID: use.ToolUseID, - Source: use.Source, - Model: use.Model, - ReasoningEffort: use.ReasoningEffort, - Response: use.Response, +func discoverCodexSessions(ctx context.Context, cwd string, searchAll bool) ([]sessionCandidate, error) { + stopFind := rpchttp.Track(ctx, "find") + files, err := history.FindCodexSessionFiles() + if err != nil { + stopFind() + return nil, err } -} - -func codexToolUseForViewer(use history.ToolUse) *SessionToolUseWire { - return &SessionToolUseWire{ - Tool: use.Tool, - Input: use.Input, - Timestamp: formatOptionalTime(use.Timestamp), - CWD: use.CWD, - SessionID: use.SessionID, - ToolUseID: use.ToolUseID, - Source: use.Source, - Model: use.Model, - ReasoningEffort: use.ReasoningEffort, - Response: use.Response, + matchRoot := cwd + if cwd != "" { + projectInfo := claude.FindProjectInfo(cwd) + if projectInfo.Root != "" { + matchRoot = projectInfo.Root + } } + refs := make([]sessionFileRef, 0, len(files)) + for _, file := range files { + if !searchAll { + meta, err := history.ReadCodexSessionMeta(file) + if err != nil || meta == nil || !codexMetaMatchesProject(meta, matchRoot) { + continue + } + } + refs = append(refs, sessionFileRef{source: "codex", path: file}) + } + stopFind() + return summarizeSessionRefs(ctx, refs), nil } -func rawJSONMap(raw json.RawMessage) map[string]any { - if len(raw) == 0 { - return nil +func codexMetaMatchesProject(meta *history.CodexSessionInfo, projectRoot string) bool { + if meta == nil { + return false } - var out map[string]any - _ = json.Unmarshal(raw, &out) - return out + return sessionRecordMatchesProject(SessionRecord{CWD: meta.CWD}, projectRoot) } func sessionRecordKey(source, path string) string { @@ -489,20 +546,6 @@ func sessionRecordKey(source, path string) string { return source + "-" + hex.EncodeToString(sum[:])[:16] } -func extendSessionRange(record *SessionRecord, ts time.Time) { - if ts.IsZero() { - return - } - if record.StartedAt == nil || ts.Before(*record.StartedAt) { - t := ts - record.StartedAt = &t - } - if record.EndedAt == nil || ts.After(*record.EndedAt) { - t := ts - record.EndedAt = &t - } -} - func sessionMatchesQuery(record SessionRecord, query string) bool { query = strings.ToLower(strings.TrimSpace(query)) if query == "" { @@ -525,6 +568,9 @@ func sessionMatchesQuery(record SessionRecord, query string) bool { return true } } + if liveMatchesQuery(record.Live, query) || healthMatchesQuery(record.Health, query) { + return true + } return false } @@ -543,17 +589,3 @@ func sessionSortTime(record SessionRecord) time.Time { } return time.Time{} } - -func formatOptionalTime(t *time.Time) string { - if t == nil || t.IsZero() { - return "" - } - return t.Format(time.RFC3339) -} - -func fallbackUUID(base string, entryIndex, blockIndex int) string { - if base != "" { - return fmt.Sprintf("%s-tool-%d", base, blockIndex) - } - return fmt.Sprintf("entry-%d-tool-%d", entryIndex, blockIndex) -} diff --git a/pkg/cli/sessions_test.go b/pkg/cli/sessions_test.go index fce6c1d..14989b0 100644 --- a/pkg/cli/sessions_test.go +++ b/pkg/cli/sessions_test.go @@ -1,13 +1,16 @@ package cli import ( + "context" "encoding/json" "os" "path/filepath" "strings" "testing" + "time" "github.com/flanksource/captain/pkg/claude" + rpchttp "github.com/flanksource/clicky/rpc/http" ) func TestRunSessionListAndGetClaude(t *testing.T) { @@ -68,7 +71,7 @@ func TestRunSessionListAndGetClaude(t *testing.T) { }, ) - list, err := RunSessionList(SessionListOptions{Source: "claude", Limit: 10}) + list, err := RunSessionList(context.Background(), SessionListOptions{Source: "claude", Limit: 10}) if err != nil { t.Fatalf("RunSessionList: %v", err) } @@ -86,21 +89,25 @@ func TestRunSessionListAndGetClaude(t *testing.T) { t.Fatal("empty session key") } - detail, err := RunSessionGet(SessionGetOptions{ID: session.Key}) + detail, err := RunSessionGet(context.Background(), SessionGetOptions{ID: session.Key}) if err != nil { t.Fatalf("RunSessionGet: %v", err) } - if len(detail.Entries) != 2 { - t.Fatalf("entries = %+v", detail.Entries) + if detail.Source != "claude" || detail.ID != "sess-claude" { + t.Fatalf("session detail meta = %+v", detail) } - if got := detail.Entries[0].Message.Content[0].Text; got != "inspect this repo" { + entries := detail.ToReplayEntries() + if len(entries) != 2 { + t.Fatalf("entries = %+v", entries) + } + if got := entries[0].Message.Content[0].Text; got != "inspect this repo" { t.Fatalf("first message text = %q", got) } - if detail.Entries[1].ToolUse == nil { - t.Fatalf("second entry should be tool use: %+v", detail.Entries[1]) + if entries[1].ToolUse == nil { + t.Fatalf("second entry should be tool use: %+v", entries[1]) } - if detail.Entries[1].ToolUse.Response != "README contents" { - t.Fatalf("tool response = %q", detail.Entries[1].ToolUse.Response) + if entries[1].ToolUse.Response != "README contents" { + t.Fatalf("tool response = %q", entries[1].ToolUse.Response) } } @@ -116,12 +123,13 @@ func TestRunSessionListCodexScope(t *testing.T) { if err != nil { t.Fatal(err) } + markProjectRoot(t, actualProject) other := filepath.Join(filepath.Dir(actualProject), "other") writeCodexSession(t, filepath.Join(home, ".codex", "sessions", "2026", "06", "rollout-current.jsonl"), "codex-current", actualProject) writeCodexSession(t, filepath.Join(home, ".codex", "sessions", "2026", "06", "rollout-other.jsonl"), "codex-other", other) - current, err := RunSessionList(SessionListOptions{Source: "codex", Limit: 10}) + current, err := RunSessionList(context.Background(), SessionListOptions{Source: "codex", Limit: 10}) if err != nil { t.Fatalf("RunSessionList current: %v", err) } @@ -129,7 +137,7 @@ func TestRunSessionListCodexScope(t *testing.T) { t.Fatalf("current sessions = %+v", current) } - all, err := RunSessionList(SessionListOptions{Source: "codex", All: true, Limit: 10}) + all, err := RunSessionList(context.Background(), SessionListOptions{Source: "codex", All: true, Limit: 10}) if err != nil { t.Fatalf("RunSessionList all: %v", err) } @@ -141,12 +149,224 @@ func TestRunSessionListCodexScope(t *testing.T) { func TestRunSessionGetUnknown(t *testing.T) { home := t.TempDir() t.Setenv("HOME", home) - _, err := RunSessionGet(SessionGetOptions{ID: "missing"}) + _, err := RunSessionGet(context.Background(), SessionGetOptions{ID: "missing"}) if err == nil || !strings.Contains(err.Error(), "not found") { t.Fatalf("err = %v", err) } } +func TestFindSessionCandidateByIDClaudeFilename(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + project := filepath.Join(home, "work", "project") + sessionFile := filepath.Join(home, ".claude", "projects", claude.NormalizePath(project), "sess-fast.jsonl") + if err := os.MkdirAll(filepath.Dir(sessionFile), 0o755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(sessionFile, []byte("{not-json"), 0o644); err != nil { + t.Fatal(err) + } + + candidate, ok, err := findSessionCandidateByID("sess-fast", "all") + if err != nil { + t.Fatalf("findSessionCandidateByID: %v", err) + } + if !ok { + t.Fatal("expected candidate") + } + if candidate.path != sessionFile { + t.Fatalf("candidate.path = %q, want %q", candidate.path, sessionFile) + } + if candidate.record.ID != "sess-fast" || candidate.record.Source != "claude" { + t.Fatalf("candidate.record = %+v", candidate.record) + } +} + +func TestRunSessionLiveEnrichesSummaryWithProcessHealth(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + project := filepath.Join(home, "work", "project") + if err := os.MkdirAll(project, 0o755); err != nil { + t.Fatal(err) + } + t.Chdir(project) + + writeJSONL(t, filepath.Join(home, ".claude", "projects", claude.NormalizePath(project), "sess-live.jsonl"), + map[string]any{ + "type": "user", + "sessionId": "sess-live", + "timestamp": "2026-06-01T10:00:00Z", + "cwd": project, + "message": map[string]any{ + "role": "user", + "content": []any{map[string]any{"type": "text", "text": "run something"}}, + }, + }, + map[string]any{ + "type": "assistant", + "sessionId": "sess-live", + "timestamp": "2026-06-01T10:00:02Z", + "cwd": project, + "message": map[string]any{ + "role": "assistant", + "model": "claude-sonnet-4", + "content": []any{map[string]any{"type": "text", "text": "working"}}, + "usage": map[string]any{ + "input_tokens": 930000, + "cache_read_input_tokens": 10000, + "cache_creation_input_tokens": 0, + "output_tokens": 1000, + }, + }, + }, + ) + + started := time.Date(2026, 6, 1, 9, 59, 0, 0, time.UTC) + orig := discoverSessionProcesses + discoverSessionProcesses = func() ([]agentProcess, error) { + return []agentProcess{{ + Source: "claude", + PID: 12345, + Status: "active", + Active: true, + CPUPercent: 2.5, + MemoryPercent: 1.25, + StartedAt: &started, + CWD: project, + Command: "claude", + }}, nil + } + t.Cleanup(func() { discoverSessionProcesses = orig }) + + result, err := RunSessionLive(context.Background(), SessionLiveOptions{Source: "claude", Limit: 10}) + if err != nil { + t.Fatalf("RunSessionLive: %v", err) + } + if result.Total != 1 || len(result.Sessions) != 1 { + t.Fatalf("live sessions = %+v", result) + } + session := result.Sessions[0] + if session.Live == nil || session.Live.PID != 12345 { + t.Fatalf("live state = %+v", session.Live) + } + if session.Context == nil || session.Context.FreePercent != 6 { + t.Fatalf("context = %+v", session.Context) + } + if !hasHealth(session.Health, "low_context", "critical") { + t.Fatalf("health = %+v", session.Health) + } + if result.Summary.ActiveSessions != 1 || result.Summary.AlertSessions != 1 { + t.Fatalf("summary = %+v", result.Summary) + } + if result.Summary.LowestContextFree == nil || *result.Summary.LowestContextFree != 6 { + t.Fatalf("lowest context = %+v", result.Summary.LowestContextFree) + } +} + +func TestRunSessionLiveScopesUnmatchedProcessesToCurrentProject(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + project := filepath.Join(home, "work", "project") + otherProject := filepath.Join(home, "work", "other") + if err := os.MkdirAll(project, 0o755); err != nil { + t.Fatal(err) + } + if err := os.MkdirAll(otherProject, 0o755); err != nil { + t.Fatal(err) + } + t.Chdir(project) + markProjectRoot(t, project) + + orig := discoverSessionProcesses + discoverSessionProcesses = func() ([]agentProcess, error) { + return []agentProcess{ + {Source: "codex", PID: 100, Status: "sleeping", Active: true, CWD: project, Command: "codex"}, + {Source: "claude", PID: 200, Status: "sleeping", Active: true, CWD: otherProject, Command: "claude"}, + }, nil + } + t.Cleanup(func() { discoverSessionProcesses = orig }) + + result, err := RunSessionLive(context.Background(), SessionLiveOptions{Source: "all", Limit: 10}) + if err != nil { + t.Fatalf("RunSessionLive: %v", err) + } + if result.Total != 1 || len(result.Sessions) != 1 { + t.Fatalf("live sessions = %+v", result) + } + if result.Sessions[0].Live == nil || result.Sessions[0].Live.PID != 100 { + t.Fatalf("scoped live session = %+v", result.Sessions[0]) + } + + all, err := RunSessionLive(context.Background(), SessionLiveOptions{Source: "all", All: true, Limit: 10}) + if err != nil { + t.Fatalf("RunSessionLive all: %v", err) + } + if all.Total != 2 { + t.Fatalf("all project live sessions = %+v", all) + } +} + +func TestRunSessionLiveRecordsPhaseTimings(t *testing.T) { + home := t.TempDir() + t.Setenv("HOME", home) + project := filepath.Join(home, "work", "project") + if err := os.MkdirAll(project, 0o755); err != nil { + t.Fatal(err) + } + t.Chdir(project) + + writeJSONL(t, filepath.Join(home, ".claude", "projects", claude.NormalizePath(project), "sess-timing.jsonl"), + map[string]any{ + "type": "user", + "sessionId": "sess-timing", + "timestamp": "2026-06-01T10:00:00Z", + "cwd": project, + "message": map[string]any{ + "role": "user", + "content": []any{map[string]any{"type": "text", "text": "hi"}}, + }, + }, + ) + + orig := discoverSessionProcesses + discoverSessionProcesses = func() ([]agentProcess, error) { return nil, nil } + t.Cleanup(func() { discoverSessionProcesses = orig }) + + ctx, timings := rpchttp.WithTimings(context.Background()) + if _, err := RunSessionLive(ctx, SessionLiveOptions{Source: "claude", Limit: 10}); err != nil { + t.Fatalf("RunSessionLive: %v", err) + } + + header := timings.Header() + for _, phase := range []string{"find", "parse", "enrich"} { + if !strings.Contains(header, phase+";dur=") { + t.Fatalf("Header() = %q, missing phase %q", header, phase) + } + } +} + +// markProjectRoot writes a project marker in dir so claude.FindProjectInfo +// resolves dir as the project root deterministically. Without it, a temp project +// dir has no marker and FindProjectInfo walks to the filesystem root — under +// `go test ./...` a concurrent package's test can leave a go.mod/.git in the +// shared temp root, resolving matchRoot above the project and letting +// sibling-project sessions leak into the current scope. +func markProjectRoot(t *testing.T, dir string) { + t.Helper() + if err := os.WriteFile(filepath.Join(dir, "go.mod"), []byte("module test\n"), 0o644); err != nil { + t.Fatal(err) + } +} + +func hasHealth(signals []SessionHealthWire, kind, severity string) bool { + for _, signal := range signals { + if signal.Kind == kind && signal.Severity == severity { + return true + } + } + return false +} + func writeCodexSession(t *testing.T, path, id, cwd string) { t.Helper() writeJSONL(t, path, diff --git a/pkg/cli/stdin_test.go b/pkg/cli/stdin_test.go index 40d01e2..c38fe4c 100644 --- a/pkg/cli/stdin_test.go +++ b/pkg/cli/stdin_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/flanksource/captain/pkg/claude" + "github.com/flanksource/captain/pkg/session" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -197,7 +198,7 @@ func TestRunHistoryFromReader_ClaudeJSONL(t *testing.T) { result, err := runHistoryFromReader(data, HistoryOptions{Limit: 10}) require.NoError(t, err) - histResult, ok := result.(HistoryResult) + histResult, ok := result.(session.HistoryResult) require.True(t, ok, "expected HistoryResult, got %T", result) require.Len(t, histResult.Results, 1) assert.Equal(t, "Bash", histResult.Results[0].Tool) @@ -213,14 +214,14 @@ func TestRunHistoryFromReader_ApprovedFilter(t *testing.T) { t.Run("no filter returns all", func(t *testing.T) { result, err := runHistoryFromReader(data, HistoryOptions{Limit: 100}) require.NoError(t, err) - histResult := result.(HistoryResult) + histResult := result.(session.HistoryResult) assert.Equal(t, 3, histResult.Total) }) t.Run("approved=true filters out denied", func(t *testing.T) { result, err := runHistoryFromReader(data, HistoryOptions{Limit: 100, Approved: "true"}) require.NoError(t, err) - histResult := result.(HistoryResult) + histResult := result.(session.HistoryResult) assert.Equal(t, 2, histResult.Total) for _, r := range histResult.Results { assert.Equal(t, "✓", r.Approved) @@ -230,7 +231,7 @@ func TestRunHistoryFromReader_ApprovedFilter(t *testing.T) { t.Run("approved=false shows only denied", func(t *testing.T) { result, err := runHistoryFromReader(data, HistoryOptions{Limit: 100, Approved: "false"}) require.NoError(t, err) - histResult := result.(HistoryResult) + histResult := result.(session.HistoryResult) assert.Equal(t, 1, histResult.Total) assert.Contains(t, histResult.Results[0].Approved, "✗") }) @@ -238,7 +239,7 @@ func TestRunHistoryFromReader_ApprovedFilter(t *testing.T) { t.Run("text filter matches command content before limit", func(t *testing.T) { result, err := runHistoryFromReader(data, HistoryOptions{Limit: 1, TextFilter: "allowed"}) require.NoError(t, err) - histResult := result.(HistoryResult) + histResult := result.(session.HistoryResult) assert.Equal(t, 1, histResult.Total) require.Len(t, histResult.Results, 1) assert.Contains(t, histResult.Results[0].Summary, "allowed") @@ -264,7 +265,7 @@ func TestRunHistoryFromReader_CategoryAliases(t *testing.T) { }) require.NoError(t, err) - histResult := result.(HistoryResult) + histResult := result.(session.HistoryResult) require.Len(t, histResult.Results, 1) assert.Equal(t, "Task", histResult.Results[0].Tool) assert.Equal(t, "plan", histResult.Results[0].Category) diff --git a/pkg/cli/summary.go b/pkg/cli/summary.go index d85610c..50454cd 100644 --- a/pkg/cli/summary.go +++ b/pkg/cli/summary.go @@ -8,6 +8,7 @@ import ( "github.com/flanksource/captain/pkg/bash" "github.com/flanksource/captain/pkg/claude" + "github.com/flanksource/captain/pkg/session" ) type SummaryResult struct { @@ -140,7 +141,7 @@ func toUsageSummaries(counts map[string]int, tokens map[string]int) []UsageSumma tokens: t, } if t > 0 { - us.Tokens = formatTokens(t) + us.Tokens = session.FormatTokens(t) } result = append(result, us) } diff --git a/pkg/cli/webapp/dist/.gitkeep b/pkg/cli/webapp/dist/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/pkg/cli/webapp/dist/assets/FixtureFrontmatterDialog-DBdNoV8I.js b/pkg/cli/webapp/dist/assets/FixtureFrontmatterDialog-DBdNoV8I.js new file mode 100644 index 0000000..b865324 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/FixtureFrontmatterDialog-DBdNoV8I.js @@ -0,0 +1,9 @@ +import{p as z,s as L,c as O,r as b,j as o,M as _,S as Y,U as $,J as j,a as D,B as P,I as v,b as U,d as k,e as V}from"./index-Bz3KHWSS.js";const S=new Set(["backend","budget","effort","id","model","noCache","temperature"]),W=new Set(["maxConcurrent","cacheTTL"]);function C(e){const t=E(e);if(!t.hasFrontmatter)return{ok:!0,hasFrontmatter:!1,frontmatter:{},raw:"",body:e};if(!t.closed)return{ok:!1,hasFrontmatter:!0,error:"Frontmatter closing delimiter not found",raw:t.raw,body:t.body};const r=re(t.raw);return r.ok?{ok:!0,hasFrontmatter:!0,frontmatter:r.value,raw:t.raw,body:t.body}:{ok:!1,hasFrontmatter:!0,error:r.error,raw:t.raw,body:t.body}}function J(e){const t=g(e.ai),r=X(t),n=G(t),i=g(e.verify);return{runtime:r,aiExtras:n,verify:i}}function K(e,t){const r=C(e),n=r.body,i=r.ok?r.frontmatter:{},s=H(i,t);return ee(s,n)}function B(e,t){const r=E(e),n=r.hasFrontmatter?r.body:e;return t.trim()===""?n:`--- +${t.endsWith(` +`)?t:`${t} +`}--- +${n}`}function H(e,t){const r=N(e,["ai","verify"]),n=g(e.ai),i={...ne(n),...q(t.runtime),...Q(t.aiExtras)},s=Z(t.verify);return y(i)&&(r.ai=i),y(s)&&(r.verify=s),r}function X(e){const t={},r=c(e.model);r&&(t.model=r);const n=c(e.backend);n&&(t.backend=n);const i=c(e.id);i&&(t.id=i);const s=c(e.effort);s&&(t.effort=s);const a=d(e.temperature);a!=null&&(t.temperature=a),e.noCache===!0&&(t.noCache=!0);const l=g(e.budget),u=d(e.maxTokens)??d(l.maxTokens),f=d(l.cost),x=d(l.maxTurns),h=c(l.timeout);return(u!=null||f!=null||x!=null||h)&&(t.budget={...f!=null?{cost:f}:{},...u!=null?{maxTokens:u}:{},...x!=null?{maxTurns:x}:{},...h?{timeout:h}:{}}),t}function q(e){var t;const r=O(e),n={};for(const s of S){const a=r[s];a!=null&&(s!=="budget"||y(g(a)))&&(n[s]=a)}const i=(t=r.budget)==null?void 0:t.maxTokens;return i!=null&&(delete n.budget,n.maxTokens=i),n}function G(e){const t=d(e.maxConcurrent),r=c(e.cacheTTL);return{...t!=null?{maxConcurrent:t}:{},...r?{cacheTTL:r}:{}}}function Q(e){return{...d(e.maxConcurrent)!=null?{maxConcurrent:d(e.maxConcurrent)}:{},...c(e.cacheTTL)?{cacheTTL:c(e.cacheTTL)}:{}}}function Z(e){const t=c(e.scope),r=d(e.threshold),n=Array.isArray(e.disabled)?e.disabled.filter(i=>c(i)!==""):void 0;return{...t?{scope:t}:{},...r!=null?{threshold:r}:{},...n?.length?{disabled:n}:{}}}function ee(e,t){if(!y(e))return t;const r=L(e,{lineWidth:0,collectionStyle:"block"});return`--- +${r.endsWith(` +`)?r:`${r} +`}--- +${t}`}function E(e){const t=te(e);if(T(t[0]??"")!=="---")return{hasFrontmatter:!1};for(let r=1;r!r.has(n)))}function g(e){return w(e)?e:{}}function c(e){return typeof e=="string"&&e.trim()?e.trim():void 0}function d(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function y(e){return Object.keys(e).length>0}function w(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}const se={runtime:{},aiExtras:{},verify:{}},oe={type:"object",properties:{maxConcurrent:{type:"integer",title:"Max concurrent",minimum:1,multipleOf:1},cacheTTL:{type:"string",title:"Cache TTL"}}},ae={type:"object",properties:{scope:{type:"string",title:"Scope",enum:["diff","all","changed"],"x-enum-display":"segmented"},threshold:{type:"integer",title:"Threshold",minimum:0,maximum:100,multipleOf:1},disabled:{type:"array",title:"Disabled checks",items:{type:"string"}}}};function ce({open:e,markdown:t,onChange:r,onClose:n,size:i,options:s}){const a=b.useMemo(()=>C(t),[t]),l=b.useMemo(()=>a.ok?J(a.frontmatter):se,[a]),[u,f]=b.useState(l),[x,h]=b.useState(a.raw),A=s?.aiExtrasSchema??oe,M=s?.verifySchema??ae;b.useEffect(()=>{e&&(f(l),h(a.raw))},[l,e,a.raw]);const R=a.ok?JSON.stringify(u)!==JSON.stringify(l):x!==a.raw,I=()=>{const m=a.ok?K(t,u):B(t,x);r(m),n()};return o.jsx(_,{open:e,onClose:n,confirmClose:R,title:"Fixture frontmatter",size:"full",className:"h-[92vh]",footer:o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsx("span",{className:"text-xs text-muted-foreground",children:a.ok?"ai / verify":"YAML source"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(k,{type:"button",variant:"outline",size:"sm",onClick:n,children:"Cancel"}),o.jsxs(k,{type:"button",size:"sm",onClick:I,children:[o.jsx(v,{icon:V,className:"size-4"}),"Save frontmatter"]})]})]}),children:a.ok?o.jsxs("div",{className:"grid min-h-0 gap-4 xl:grid-cols-[minmax(0,1fr)_minmax(18rem,24rem)]",children:[o.jsx(Y,{value:u.runtime,onChange:m=>f(p=>({...p,runtime:m})),models:s?.models,families:s?.families,tools:s?.tools,permissionCatalog:s?.permissionCatalog,secretSelector:s?.secretSelector,cliOptions:s?.cliOptions,sections:["model"],title:"AI",eyebrow:"Fixture frontmatter",className:"rounded-md border border-border bg-card"}),o.jsxs("div",{className:"grid content-start gap-4",children:[o.jsx(F,{title:"AI extras",icon:$,children:o.jsx(j,{schema:A,value:u.aiExtras,onChange:m=>f(p=>({...p,aiExtras:m})),size:i,showPreferencesMenu:!1,persistPreferences:!1,layout:{mode:"stacked",valueMaxWidth:"100%"}})}),o.jsx(F,{title:"Verify scoring",icon:D,children:o.jsx(j,{schema:M,value:u.verify,onChange:m=>f(p=>({...p,verify:m})),size:i,showPreferencesMenu:!1,persistPreferences:!1,layout:{mode:"stacked",valueMaxWidth:"100%"}})})]})]}):o.jsxs("div",{className:"grid gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(P,{variant:"status",status:"error",size:"xs",clickToCopy:!1,children:"YAML error"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:a.error})]}),o.jsxs("label",{className:"grid gap-2 text-xs text-muted-foreground",children:[o.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[o.jsx(v,{icon:U,className:"size-4"}),"Frontmatter source"]}),o.jsx("textarea",{"aria-label":"Frontmatter source",value:x,onChange:m=>h(m.currentTarget.value),spellCheck:!1,className:"min-h-80 w-full resize-y rounded-md border border-input bg-background px-3 py-2 font-mono text-xs leading-5 text-foreground shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"})]})]})})}function F({title:e,icon:t,children:r}){return o.jsxs("section",{className:"overflow-hidden rounded-md border border-border bg-card",children:[o.jsxs("div",{className:"flex min-h-10 items-center gap-2 border-b border-border bg-muted/30 px-3 py-2",children:[o.jsx(v,{icon:t,className:"size-4 text-muted-foreground"}),o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-normal text-muted-foreground",children:e})]}),o.jsx("div",{className:"p-3",children:r})]})}export{ce as FixtureFrontmatterDialog}; diff --git a/pkg/cli/webapp/dist/assets/apl-B4CMkyY2.js b/pkg/cli/webapp/dist/assets/apl-B4CMkyY2.js new file mode 100644 index 0000000..548bbc3 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/apl-B4CMkyY2.js @@ -0,0 +1 @@ +var l={"+":["conjugate","add"],"−":["negate","subtract"],"×":["signOf","multiply"],"÷":["reciprocal","divide"],"⌈":["ceiling","greaterOf"],"⌊":["floor","lesserOf"],"∣":["absolute","residue"],"⍳":["indexGenerate","indexOf"],"?":["roll","deal"],"⋆":["exponentiate","toThePowerOf"],"⍟":["naturalLog","logToTheBase"],"○":["piTimes","circularFuncs"],"!":["factorial","binomial"],"⌹":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"≤":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"≥":[null,"greaterThanOrEqual"],"≠":[null,"notEqual"],"≡":["depth","match"],"≢":[null,"notMatch"],"∈":["enlist","membership"],"⍷":[null,"find"],"∪":["unique","union"],"∩":[null,"intersection"],"∼":["not","without"],"∨":[null,"or"],"∧":[null,"and"],"⍱":[null,"nor"],"⍲":[null,"nand"],"⍴":["shapeOf","reshape"],",":["ravel","catenate"],"⍪":[null,"firstAxisCatenate"],"⌽":["reverse","rotate"],"⊖":["axis1Reverse","axis1Rotate"],"⍉":["transpose",null],"↑":["first","take"],"↓":[null,"drop"],"⊂":["enclose","partitionWithAxis"],"⊃":["diclose","pick"],"⌷":[null,"index"],"⍋":["gradeUp",null],"⍒":["gradeDown",null],"⊤":["encode",null],"⊥":["decode",null],"⍕":["format","formatByExample"],"⍎":["execute",null],"⊣":["stop","left"],"⊢":["pass","right"]},t=/[\.\/⌿⍀¨⍣]/,a=/⍬/,i=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,u=/←/,o=/[⍝#].*$/,s=function(r){var n;return n=!1,function(e){return n=e,e===r?n==="\\":!0}};const f={name:"apl",startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(r,n){var e;return r.eatSpace()?null:(e=r.next(),e==='"'||e==="'"?(r.eatWhile(s(e)),r.next(),n.prev=!0,"string"):/[\[{\(]/.test(e)?(n.prev=!1,null):/[\]}\)]/.test(e)?(n.prev=!0,null):a.test(e)?(n.prev=!1,"atom"):/[¯\d]/.test(e)?(n.func?(n.func=!1,n.prev=!1):n.prev=!0,r.eatWhile(/[\w\.]/),"number"):t.test(e)||u.test(e)?"operator":i.test(e)?(n.func=!0,n.prev=!1,l[e]?"variableName.function.standard":"variableName.function"):o.test(e)?(r.skipToEnd(),"comment"):e==="∘"&&r.peek()==="."?(r.next(),"variableName.function"):(r.eatWhile(/[\w\$_]/),n.prev=!0,"keyword"))}};export{f as apl}; diff --git a/pkg/cli/webapp/dist/assets/asciiarmor-Df11BRmG.js b/pkg/cli/webapp/dist/assets/asciiarmor-Df11BRmG.js new file mode 100644 index 0000000..2df0396 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/asciiarmor-Df11BRmG.js @@ -0,0 +1 @@ +function t(e){var r=e.match(/^\s*\S/);return e.skipToEnd(),r?"error":null}const i={name:"asciiarmor",token:function(e,r){var n;if(r.state=="top")return e.sol()&&(n=e.match(/^-----BEGIN (.*)?-----\s*$/))?(r.state="headers",r.type=n[1],"tag"):t(e);if(r.state=="headers"){if(e.sol()&&e.match(/^\w+:/))return r.state="header","atom";var o=t(e);return o&&(r.state="body"),o}else{if(r.state=="header")return e.skipToEnd(),r.state="headers","string";if(r.state=="body")return e.sol()&&(n=e.match(/^-----END (.*)?-----\s*$/))?n[1]!=r.type?"error":(r.state="end","tag"):e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error");if(r.state=="end")return t(e)}},blankLine:function(e){e.state=="headers"&&(e.state="body")},startState:function(){return{state:"top",type:null}}};export{i as asciiArmor}; diff --git a/pkg/cli/webapp/dist/assets/asn1-EdZsLKOL.js b/pkg/cli/webapp/dist/assets/asn1-EdZsLKOL.js new file mode 100644 index 0000000..8ec4903 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/asn1-EdZsLKOL.js @@ -0,0 +1 @@ +function u(i){for(var s={},c=i.split(" "),T=0;T?$/.test(i)?(n.extenExten=!0,n.extenStart=!1,"strong"):(n.extenStart=!1,e.skipToEnd(),"error");if(n.extenExten)return n.extenExten=!1,n.extenPriority=!0,e.eatWhile(/[^,]/),n.extenInclude&&(e.skipToEnd(),n.extenPriority=!1,n.extenInclude=!1),n.extenSame&&(n.extenPriority=!1,n.extenSame=!1,n.extenApplication=!0),"tag";if(n.extenPriority)return n.extenPriority=!1,n.extenApplication=!0,e.next(),n.extenSame?null:(e.eatWhile(/[^,]/),"number");if(n.extenApplication){if(e.eatWhile(/,/),i=e.current(),i===",")return null;if(e.eatWhile(/\w/),i=e.current().toLowerCase(),n.extenApplication=!1,c.indexOf(i)!==-1)return"def"}else return l(e,n);return null},languageData:{commentTokens:{line:";",block:{open:";--",close:"--;"}}}};export{s as asterisk}; diff --git a/pkg/cli/webapp/dist/assets/bash-atvbtKCR.js b/pkg/cli/webapp/dist/assets/bash-atvbtKCR.js new file mode 100644 index 0000000..8d91197 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/bash-atvbtKCR.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse(`{"displayName":"Shell","name":"shellscript","patterns":[{"include":"#initial_context"}],"repository":{"alias_statement":{"begin":"(?:(?:[ \\\\t]*+)(alias)(?:[ \\\\t]*+)((?:(?:((?&;<>\\\\(\\\\)\\\\$\`\\\\\\\\\\"'<\\\\|]+)(?!>))"},{"include":"#normal_context"}]},"arithmetic_double":{"patterns":[{"begin":"\\\\(\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"end":"\\\\)(?:\\\\s*)\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"arithmetic_no_dollar":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"array_access_inline":{"captures":{"1":{"name":"punctuation.section.array.shell"},"2":{"patterns":[{"include":"#special_expansion"},{"include":"#string"},{"include":"#variable"}]},"3":{"name":"punctuation.section.array.shell"}},"match":"(?:(\\\\[)([^\\\\[\\\\]]+)(\\\\]))"},"array_value":{"begin":"(?:[ \\\\t]*+)(?:((?|#|\\\\n|$|;|[ \\\\t]))(?!nocorrect |nocorrect\\t|nocorrect$|readonly |readonly\\t|readonly$|function |function\\t|function$|foreach |foreach\\t|foreach$|coproc |coproc\\t|coproc$|logout |logout\\t|logout$|export |export\\t|export$|select |select\\t|select$|repeat |repeat\\t|repeat$|pushd |pushd\\t|pushd$|until |until\\t|until$|while |while\\t|while$|local |local\\t|local$|case |case\\t|case$|done |done\\t|done$|elif |elif\\t|elif$|else |else\\t|else$|esac |esac\\t|esac$|popd |popd\\t|popd$|then |then\\t|then$|time |time\\t|time$|for |for\\t|for$|end |end\\t|end$|fi |fi\\t|fi$|do |do\\t|do$|in |in\\t|in$|if |if\\t|if$))(?:((?<=^|;|&|[ \\\\t])(?:readonly|declare|typeset|export|local)(?=[ \\\\t]|;|&|$))|((?!\\"|'|\\\\\\\\\\\\n?$)(?:[^!'\\"<> \\\\t\\\\n\\\\r]+?)))(?:(?= |\\\\t)|(?:(?=;|\\\\||&|\\\\n|\\\\)|\\\\\`|\\\\{|\\\\}|[ \\\\t]*#|\\\\])(?]+))"},{"begin":"(?:(?:\\\\G|(?|#|\\\\n|$|;|[ \\\\t]))(?!nocorrect |nocorrect\\t|nocorrect$|readonly |readonly\\t|readonly$|function |function\\t|function$|foreach |foreach\\t|foreach$|coproc |coproc\\t|coproc$|logout |logout\\t|logout$|export |export\\t|export$|select |select\\t|select$|repeat |repeat\\t|repeat$|pushd |pushd\\t|pushd$|until |until\\t|until$|while |while\\t|while$|local |local\\t|local$|case |case\\t|case$|done |done\\t|done$|elif |elif\\t|elif$|else |else\\t|else$|esac |esac\\t|esac$|popd |popd\\t|popd$|then |then\\t|then$|time |time\\t|time$|for |for\\t|for$|end |end\\t|end$|fi |fi\\t|fi$|do |do\\t|do$|in |in\\t|in$|if |if\\t|if$)(?!\\\\\\\\\\\\n?$)))","beginCaptures":{},"end":"(?=;|\\\\||&|\\\\n|\\\\)|\\\\\`|\\\\{|\\\\}|[ \\\\t]*#|\\\\])(?|&&|\\\\|\\\\|","name":"keyword.operator.logical.shell"},{"match":"(?[>=]?|==|!=|^|\\\\|{1,2}|&{1,2}|\\\\?|\\\\:|,|=|[*/%+\\\\-&^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[xX][0-9A-Fa-f]+","name":"constant.numeric.hex.shell"},{"match":";","name":"punctuation.separator.semicolon.range"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9a-zA-Z@_]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"},{"match":"(?[>=]?|==|!=|^|\\\\|{1,2}|&{1,2}|\\\\?|\\\\:|,|=|[*/%+\\\\-&^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[xX][0-9A-Fa-f]+","name":"constant.numeric.hex.shell"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9a-zA-Z@_]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"}]},"misc_ranges":{"patterns":[{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#subshell_dollar"},{"begin":"(?|#|\\\\n|$|;|[ \\\\t]))))","beginCaptures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"contentName":"string.unquoted.argument constant.other.option","end":"(?:(?=[ \\\\t])|(?:(?=;|\\\\||&|\\\\n|\\\\)|\\\\\`|\\\\{|\\\\}|[ \\\\t]*#|\\\\])(?>?)(?:[ \\\\t]*+)([^ \\t\\n>&;<>\\\\(\\\\)\\\\$\`\\\\\\\\\\"'<\\\\|]+))"},"redirect_number":{"captures":{"1":{"name":"keyword.operator.redirect.stdout.shell"},"2":{"name":"keyword.operator.redirect.stderr.shell"},"3":{"name":"keyword.operator.redirect.$3.shell"}},"match":"(?<=[ \\\\t])(?:(?:(1)|(2)|(\\\\d+))(?=>))"},"redirection":{"patterns":[{"begin":"[><]\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.interpolated.process-substitution.shell","patterns":[{"include":"#initial_context"}]},{"match":"(?])(&>|\\\\d*>&\\\\d*|\\\\d*(>>|>|<)|\\\\d*<&|\\\\d*<>)(?![<>])","name":"keyword.operator.redirect.shell"}]},"regex_comparison":{"match":"\\\\=~","name":"keyword.operator.logical.regex.shell"},"regexp":{"patterns":[{"match":"(?:.+)"}]},"simple_options":{"captures":{"0":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"match":"(?:[ \\\\t]++)(\\\\-)(\\\\w+)"}]}},"match":"(?:(?:[ \\\\t]++)\\\\-(?:\\\\w+))*"},"simple_unquoted":{"match":"[^ \\\\t\\\\n>&;<>\\\\(\\\\)\\\\$\`\\\\\\\\\\"'<\\\\|]","name":"string.unquoted.shell"},"special_expansion":{"match":"!|:[-=?]?|\\\\*|@|##|#|%%|%|\\\\/","name":"keyword.operator.expansion.shell"},"start_of_command":{"match":"(?:(?:[ \\\\t]*+)(?:(?!(?:!|&|\\\\||\\\\(|\\\\)|\\\\{|\\\\[|<|>|#|\\\\n|$|;|[ \\\\t]))(?!nocorrect |nocorrect\\t|nocorrect$|readonly |readonly\\t|readonly$|function |function\\t|function$|foreach |foreach\\t|foreach$|coproc |coproc\\t|coproc$|logout |logout\\t|logout$|export |export\\t|export$|select |select\\t|select$|repeat |repeat\\t|repeat$|pushd |pushd\\t|pushd$|until |until\\t|until$|while |while\\t|while$|local |local\\t|local$|case |case\\t|case$|done |done\\t|done$|elif |elif\\t|elif$|else |else\\t|else$|esac |esac\\t|esac$|popd |popd\\t|popd$|then |then\\t|then$|time |time\\t|time$|for |for\\t|for$|end |end\\t|end$|fi |fi\\t|fi$|do |do\\t|do$|in |in\\t|in$|if |if\\t|if$)(?!\\\\\\\\\\\\n?$)))"},"string":{"patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.shell"},{"begin":"\\\\$?\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.double.shell","patterns":[{"match":"\\\\\\\\[\\\\$\\\\n\`\\"\\\\\\\\]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"\\\\$'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.dollar.shell","patterns":[{"match":"\\\\\\\\(?:a|b|e|f|n|r|t|v|\\\\\\\\|')","name":"constant.character.escape.ansi-c.shell"},{"match":"\\\\\\\\[0-9]{3}\\"","name":"constant.character.escape.octal.shell"},{"match":"\\\\\\\\x[0-9a-fA-F]{2}\\"","name":"constant.character.escape.hex.shell"},{"match":"\\\\\\\\c.\\"","name":"constant.character.escape.control-char.shell"}]}]},"subshell_dollar":{"patterns":[{"begin":"(?:\\\\$\\\\()","beginCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"name":"meta.scope.subshell","patterns":[{"include":"#parenthese"},{"include":"#initial_context"}]}]},"support":{"patterns":[{"match":"(?<=^|;|&|\\\\s)(?::|\\\\.)(?=\\\\s|;|&|$)","name":"support.function.builtin.shell"}]},"typical_statements":{"patterns":[{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#while_statement"},{"include":"#function_definition"},{"include":"#command_statement"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#normal_context"}]},"variable":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{"name":"variable.parameter.positional.all.shell"}},"match":"(?:(\\\\$)(\\\\@(?!\\\\w)))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"variable.parameter.positional.shell"}},"match":"(?:(\\\\$)([0-9](?!\\\\w)))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.language.special.shell"},"2":{"name":"variable.language.special.shell"}},"match":"(?:(\\\\$)([-*#?$!0_](?!\\\\w)))"},{"begin":"(?:(\\\\$)(\\\\{)(?:[ \\\\t]*+)(?=\\\\d))","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"contentName":"meta.parameter-expansion","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"[0-9]+","name":"variable.parameter.positional.shell"},{"match":"(?<+-.,[]".split("");const r={name:"brainfuck",startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(i,n){if(i.eatSpace())return null;i.sol()&&(n.commentLine=!1);var e=i.next().toString();if(f.indexOf(e)!==-1){if(n.commentLine===!0)return i.eol()&&(n.commentLine=!1),"comment";if(e==="]"||e==="[")return e==="["?n.left++:n.right++,"bracket";if(e==="+"||e==="-")return"keyword";if(e==="<"||e===">")return"atom";if(e==="."||e===",")return"def"}else return n.commentLine=!0,i.eol()&&(n.commentLine=!1),"comment";i.eol()&&(n.commentLine=!1)}};export{r as brainfuck}; diff --git a/pkg/cli/webapp/dist/assets/clike-B9uivgTg.js b/pkg/cli/webapp/dist/assets/clike-B9uivgTg.js new file mode 100644 index 0000000..18846a7 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/clike-B9uivgTg.js @@ -0,0 +1 @@ +function O(e,n,t,l,s,d){this.indented=e,this.column=n,this.type=t,this.info=l,this.align=s,this.prev=d}function D(e,n,t,l){var s=e.indented;return e.context&&e.context.type=="statement"&&t!="statement"&&(s=e.context.indented),e.context=new O(s,n,t,l,null,e.context)}function x(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}function V(e,n,t){if(n.prevToken=="variable"||n.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,t))||n.typeAtEndOfLine&&e.column()==e.indentation())return!0}function P(e){for(;;){if(!e||e.type=="top")return!0;if(e.type=="}"&&e.prev.info!="namespace")return!1;e=e.prev}}function h(e){var n=e.statementIndentUnit,t=e.dontAlignCalls,l=e.keywords||{},s=e.types||{},d=e.builtin||{},b=e.blockKeywords||{},_=e.defKeywords||{},w=e.atoms||{},y=e.hooks||{},te=e.multiLineStrings,re=e.indentStatements!==!1,ie=e.indentSwitch!==!1,F=e.namespaceSeparator,oe=e.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,ae=e.numberStart||/[\d\.]/,le=e.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,j=e.isOperatorChar||/[+\-*&%=<>!?|\/]/,B=e.isIdentifierChar||/[\w\$_\xa1-\uffff]/,U=e.isReservedIdentifier||!1,p,E;function K(i,a){var c=i.next();if(y[c]){var o=y[c](i,a);if(o!==!1)return o}if(c=='"'||c=="'")return a.tokenize=ce(c),a.tokenize(i,a);if(ae.test(c)){if(i.backUp(1),i.match(le))return"number";i.next()}if(oe.test(c))return p=c,null;if(c=="/"){if(i.eat("*"))return a.tokenize=A,A(i,a);if(i.eat("/"))return i.skipToEnd(),"comment"}if(j.test(c)){for(;!i.match(/^\/[\/*]/,!1)&&i.eat(j););return"operator"}if(i.eatWhile(B),F)for(;i.match(F);)i.eatWhile(B);var u=i.current();return m(l,u)?(m(b,u)&&(p="newstatement"),m(_,u)&&(E=!0),"keyword"):m(s,u)?"type":m(d,u)||U&&U(u)?(m(b,u)&&(p="newstatement"),"builtin"):m(w,u)?"atom":"variable"}function ce(i){return function(a,c){for(var o=!1,u,v=!1;(u=a.next())!=null;){if(u==i&&!o){v=!0;break}o=!o&&u=="\\"}return(v||!(o||te))&&(c.tokenize=null),"string"}}function A(i,a){for(var c=!1,o;o=i.next();){if(o=="/"&&c){a.tokenize=null;break}c=o=="*"}return"comment"}function $(i,a){e.typeFirstDefinitions&&i.eol()&&P(a.context)&&(a.typeAtEndOfLine=V(i,a,i.pos))}return{name:e.name,startState:function(i){return{tokenize:null,context:new O(-i,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(i,a){var c=a.context;if(i.sol()&&(c.align==null&&(c.align=!1),a.indented=i.indentation(),a.startOfLine=!0),i.eatSpace())return $(i,a),null;p=E=null;var o=(a.tokenize||K)(i,a);if(o=="comment"||o=="meta")return o;if(c.align==null&&(c.align=!0),p==";"||p==":"||p==","&&i.match(/^\s*(?:\/\/.*)?$/,!1))for(;a.context.type=="statement";)x(a);else if(p=="{")D(a,i.column(),"}");else if(p=="[")D(a,i.column(),"]");else if(p=="(")D(a,i.column(),")");else if(p=="}"){for(;c.type=="statement";)c=x(a);for(c.type=="}"&&(c=x(a));c.type=="statement";)c=x(a)}else p==c.type?x(a):re&&((c.type=="}"||c.type=="top")&&p!=";"||c.type=="statement"&&p=="newstatement")&&D(a,i.column(),"statement",i.current());if(o=="variable"&&(a.prevToken=="def"||e.typeFirstDefinitions&&V(i,a,i.start)&&P(a.context)&&i.match(/^\s*\(/,!1))&&(o="def"),y.token){var u=y.token(i,a,o);u!==void 0&&(o=u)}return o=="def"&&e.styleDefs===!1&&(o="variable"),a.startOfLine=!1,a.prevToken=E?"def":o||p,$(i,a),o},indent:function(i,a,c){if(i.tokenize!=K&&i.tokenize!=null||i.typeAtEndOfLine&&P(i.context))return null;var o=i.context,u=a&&a.charAt(0),v=u==o.type;if(o.type=="statement"&&u=="}"&&(o=o.prev),e.dontIndentStatements)for(;o.type=="statement"&&e.dontIndentStatements.test(o.info);)o=o.prev;if(y.indent){var q=y.indent(i,o,a,c.unit);if(typeof q=="number")return q}var se=o.prev&&o.prev.info=="switch";if(e.allmanIndentation&&/[{(]/.test(u)){for(;o.type!="top"&&o.type!="}";)o=o.prev;return o.indented}return o.type=="statement"?o.indented+(u=="{"?0:n||c.unit):o.align&&(!t||o.type!=")")?o.column+(v?0:1):o.type==")"&&!v?o.indented+(n||c.unit):o.indented+(v?0:c.unit)+(!v&&se&&!/^(?:case|default)\b/.test(a)?c.unit:0)},languageData:{indentOnInput:ie?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:Object.keys(l).concat(Object.keys(s)).concat(Object.keys(d)).concat(Object.keys(w)),...e.languageData}}}function r(e){for(var n={},t=e.split(" "),l=0;l!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,n){return e.match('""')?(n.tokenize=J,n.tokenize(e,n)):!1},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"character":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(e,n){var t=n.context;return t.type=="}"&&t.align&&e.eat(">")?(n.context=new O(t.indented,t.column,t.type,t.info,null,t.prev),"operator"):!1},"/":function(e,n){return e.eat("*")?(n.tokenize=S(1),n.tokenize(e,n)):!1}},languageData:{closeBrackets:{brackets:["(","[","{","'",'"','"""']}}});function de(e){return function(n,t){for(var l=!1,s,d=!1;!n.eol();){if(!e&&!l&&n.match('"')){d=!0;break}if(e&&n.match('"""')){d=!0;break}s=n.next(),!l&&s=="$"&&n.match("{")&&n.skipTo("}"),l=!l&&s=="\\"&&!e}return(d||!e)&&(t.tokenize=null),"string"}}const _e=h({name:"kotlin",keywords:r("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:r("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(ul?|l|f)?/i,blockKeywords:r("catch class do else finally for if where try while enum"),defKeywords:r("class val var object interface fun"),atoms:r("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,n){return n.prevToken=="."?"variable":"operator"},'"':function(e,n){return n.tokenize=de(e.match('""')),n.tokenize(e,n)},"/":function(e,n){return e.eat("*")?(n.tokenize=S(1),n.tokenize(e,n)):!1},indent:function(e,n,t,l){var s=t&&t.charAt(0);if((e.prevToken=="}"||e.prevToken==")")&&t=="")return e.indented;if(e.prevToken=="operator"&&t!="}"&&e.context.type!="}"||e.prevToken=="variable"&&s=="."||(e.prevToken=="}"||e.prevToken==")")&&s==".")return l*2+n.indented;if(n.align&&n.type=="}")return n.indented+(e.context.type==(t||"").charAt(0)?0:l)}},languageData:{closeBrackets:{brackets:["(","[","{","'",'"','"""']}}}),xe=h({name:"shader",keywords:r("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:r("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:r("for while do if else struct"),builtin:r("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:r("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":g}}),Se=h({name:"nesc",keywords:r(T+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:I,blockKeywords:r(N),atoms:r("null true false"),hooks:{"#":g}}),Te=h({name:"objectivec",keywords:r(T+" "+Q),types:X,builtin:r(Z),blockKeywords:r(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:r(z+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:r("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:C,hooks:{"#":g,"*":M}}),Ie=h({name:"objectivecpp",keywords:r(T+" "+Q+" "+H),types:X,builtin:r(Z),blockKeywords:r(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:r(z+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:r("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:C,hooks:{"#":g,"*":M,u:k,U:k,L:k,R:k,0:f,1:f,2:f,3:f,4:f,5:f,6:f,7:f,8:f,9:f,token:function(e,n,t){if(t=="variable"&&e.peek()=="("&&(n.prevToken==";"||n.prevToken==null||n.prevToken=="}")&&Y(e.current()))return"def"}},namespaceSeparator:"::"}),Ne=h({name:"squirrel",keywords:r("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:I,blockKeywords:r("case catch class else for foreach if switch try while"),defKeywords:r("function local class"),typeFirstDefinitions:!0,atoms:r("true false null"),hooks:{"#":g}});var L=null;function ee(e){return function(n,t){for(var l=!1,s,d=!1;!n.eol();){if(!l&&n.match('"')&&(e=="single"||n.match('""'))){d=!0;break}if(!l&&n.match("``")){L=ee(e),d=!0;break}s=n.next(),l=e=="single"&&!l&&s=="\\"}return d&&(t.tokenize=null),"string"}}const De=h({name:"ceylon",keywords:r("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var n=e.charAt(0);return n===n.toUpperCase()&&n!==n.toLowerCase()},blockKeywords:r("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:r("class dynamic function interface module object package value"),builtin:r("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:r("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,n){return n.tokenize=ee(e.match('""')?"triple":"single"),n.tokenize(e,n)},"`":function(e,n){return!L||!e.match("`")?!1:(n.tokenize=L,L=null,n.tokenize(e,n))},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"string.special":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},token:function(e,n,t){if((t=="variable"||t=="type")&&n.prevToken==".")return"variableName.special"}},languageData:{closeBrackets:{brackets:["(","[","{","'",'"','"""']}}});function pe(e){(e.interpolationStack||(e.interpolationStack=[])).push(e.tokenize)}function ne(e){return(e.interpolationStack||(e.interpolationStack=[])).pop()}function he(e){return e.interpolationStack?e.interpolationStack.length:0}function R(e,n,t,l){var s=!1;if(n.eat(e))if(n.eat(e))s=!0;else return"string";function d(b,_){for(var w=!1;!b.eol();){if(!l&&!w&&b.peek()=="$")return pe(_),_.tokenize=ye,"string";var y=b.next();if(y==e&&!w&&(!s||b.match(e+e))){_.tokenize=null;break}w=!l&&!w&&y=="\\"}return"string"}return t.tokenize=d,d(n,t)}function ye(e,n){return e.eat("$"),e.eat("{")?n.tokenize=null:n.tokenize=me,null}function me(e,n){return e.eatWhile(/[\w_]/),n.tokenize=ne(n),"variable"}const Le=h({name:"dart",keywords:r("this super static final const abstract class extends external factory implements mixin get native set typedef with enum throw rethrow assert break case continue default in return new deferred async await covariant try catch finally do else for if switch while import library export part of show hide is as extension on yield late required sealed base interface when inline"),blockKeywords:r("try catch finally do else for if switch while"),builtin:r("void bool num int double dynamic var String Null Never"),atoms:r("true false null"),number:/^(?:0x[a-f\d_]+|(?:[\d_]+\.?[\d_]*|\.[\d_]+)(?:e[-+]?[\d_]+)?)/i,hooks:{"@":function(e){return e.eatWhile(/[\w\$_\.]/),"meta"},"'":function(e,n){return R("'",e,n,!1)},'"':function(e,n){return R('"',e,n,!1)},r:function(e,n){var t=e.peek();return t=="'"||t=='"'?R(e.next(),e,n,!0):!1},"}":function(e,n){return he(n)>0?(n.tokenize=ne(n),null):!1},"/":function(e,n){return e.eat("*")?(n.tokenize=S(1),n.tokenize(e,n)):!1},token:function(e,n,t){if(t=="variable"){var l=RegExp("^[_$]*[A-Z][a-zA-Z0-9_$]*$","g");if(l.test(e.current()))return"type"}}}});export{ke as c,De as ceylon,h as clike,ge as cpp,we as csharp,Le as dart,be as java,_e as kotlin,Se as nesC,Te as objectiveC,Ie as objectiveCpp,ve as scala,xe as shader,Ne as squirrel}; diff --git a/pkg/cli/webapp/dist/assets/clojure-BMjYHr_A.js b/pkg/cli/webapp/dist/assets/clojure-BMjYHr_A.js new file mode 100644 index 0000000..985d06c --- /dev/null +++ b/pkg/cli/webapp/dist/assets/clojure-BMjYHr_A.js @@ -0,0 +1 @@ +var d=["false","nil","true"],l=[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],u=["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],p=["->","->>","as->","binding","bound-fn","case","catch","comment","cond","cond->","cond->>","condp","def","definterface","defmethod","defn","defmacro","defprotocol","defrecord","defstruct","deftype","do","doseq","dotimes","doto","extend","extend-protocol","extend-type","fn","for","future","if","if-let","if-not","if-some","let","letfn","locking","loop","ns","proxy","reify","struct-map","some->","some->>","try","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn"],f=o(d),m=o(l),h=o(u),y=o(p),b=/^(?:[\\\[\]\s"(),;@^`{}~]|$)/,v=/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,g=/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,k=/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/;function s(t,e){if(t.eatSpace()||t.eat(","))return["space",null];if(t.match(v))return[null,"number"];if(t.match(g))return[null,"string.special"];if(t.eat(/^"/))return(e.tokenize=x)(t,e);if(t.eat(/^[(\[{]/))return["open","bracket"];if(t.eat(/^[)\]}]/))return["close","bracket"];if(t.eat(/^;/))return t.skipToEnd(),["space","comment"];if(t.eat(/^[#'@^`~]/))return[null,"meta"];var r=t.match(k),n=r&&r[0];return n?n==="comment"&&e.lastToken==="("?(e.tokenize=w)(t,e):a(n,f)||n.charAt(0)===":"?["symbol","atom"]:a(n,m)||a(n,h)?["symbol","keyword"]:e.lastToken==="("?["symbol","builtin"]:["symbol","variable"]:(t.next(),t.eatWhile(function(i){return!a(i,b)}),[null,"error"])}function x(t,e){for(var r=!1,n;n=t.next();){if(n==='"'&&!r){e.tokenize=s;break}r=!r&&n==="\\"}return[null,"string"]}function w(t,e){for(var r=1,n;n=t.next();)if(n===")"&&r--,n==="("&&r++,r===0){t.backUp(1),e.tokenize=s;break}return["space","comment"]}function o(t){for(var e={},r=0;r >= "),N={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,symbol:/[\w*+\-]/};function F(E,T){return E==="0"&&T.eat(/x/i)?(T.eatWhile(N.hex),!0):((E=="+"||E=="-")&&N.digit.test(T.peek())&&(T.eat(N.sign),E=T.next()),N.digit.test(E)?(T.eat(E),T.eatWhile(N.digit),T.peek()=="."&&(T.eat("."),T.eatWhile(N.digit)),T.eat(N.exponent)&&(T.eat(N.sign),T.eatWhile(N.digit)),!0):!1)}const Y={name:"cobol",startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(E,T){if(T.indentStack==null&&E.sol()&&(T.indentation=6),E.eatSpace())return null;var I=null;switch(T.mode){case"string":for(var R=!1;(R=E.next())!=null;)if((R=='"'||R=="'")&&!E.match(/['"]/,!1)){T.mode=!1;break}I=C;break;default:var O=E.next(),A=E.column();if(A>=0&&A<=5)I=B;else if(A>=72&&A<=79)E.skipToEnd(),I=i;else if(O=="*"&&A==6)E.skipToEnd(),I=e;else if(O=='"'||O=="'")T.mode="string",I=C;else if(O=="'"&&!N.digit_or_colon.test(E.peek()))I=D;else if(O==".")I=t;else if(F(O,E))I=G;else{if(E.current().match(N.symbol))for(;A<71&&E.eat(N.symbol)!==void 0;)A++;U&&U.propertyIsEnumerable(E.current().toUpperCase())?I=n:P&&P.propertyIsEnumerable(E.current().toUpperCase())?I=M:S&&S.propertyIsEnumerable(E.current().toUpperCase())?I=D:I=null}}return I},indent:function(E){return E.indentStack==null?E.indentation:E.indentStack.indent}};export{Y as cobol}; diff --git a/pkg/cli/webapp/dist/assets/coffeescript-S37ZYGWr.js b/pkg/cli/webapp/dist/assets/coffeescript-S37ZYGWr.js new file mode 100644 index 0000000..ca71cbf --- /dev/null +++ b/pkg/cli/webapp/dist/assets/coffeescript-S37ZYGWr.js @@ -0,0 +1 @@ +var k="error";function p(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var g=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,y=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,h=/^[_A-Za-z$][_A-Za-z$0-9]*/,w=/^@[_A-Za-z$][_A-Za-z$0-9]*/,z=p(["and","or","not","is","isnt","in","instanceof","typeof"]),l=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],a=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],x=p(l.concat(a));l=p(l);var b=/^('{3}|\"{3}|['\"])/,A=/^(\/{3}|\/)/,S=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],O=p(S);function u(e,n){if(e.sol()){n.scope.align===null&&(n.scope.align=!1);var i=n.scope.offset;if(e.eatSpace()){var f=e.indentation();return f>i&&n.scope.type=="coffee"?"indent":f0&&v(e,n)}if(e.eatSpace())return null;var r=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return n.tokenize=R,n.tokenize(e,n);if(r==="#")return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var c=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(c=!0),e.match(/^-?\d+\.\d*/)&&(c=!0),e.match(/^-?\.\d+/)&&(c=!0),c)return e.peek()=="."&&e.backUp(1),"number";var o=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(o=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(o=!0),e.match(/^-?0(?![\dx])/i)&&(o=!0),o)return"number"}if(e.match(b))return n.tokenize=t(e.current(),!1,"string"),n.tokenize(e,n);if(e.match(A)){if(e.current()!="/"||e.match(/^.*\//,!1))return n.tokenize=t(e.current(),!0,"string.special"),n.tokenize(e,n);e.backUp(1)}return e.match(g)||e.match(z)?"operator":e.match(y)?"punctuation":e.match(O)?"atom":e.match(w)||n.prop&&e.match(h)?"property":e.match(x)?"keyword":e.match(h)?"variable":(e.next(),k)}function t(e,n,i){return function(f,r){for(;!f.eol();)if(f.eatWhile(/[^'"\/\\]/),f.eat("\\")){if(f.next(),n&&f.eol())return i}else{if(f.match(e))return r.tokenize=u,i;f.eat(/['"\/]/)}return n&&(r.tokenize=u),i}}function R(e,n){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){n.tokenize=u;break}e.eatWhile("#")}return"comment"}function d(e,n,i="coffee"){for(var f=0,r=!1,c=null,o=n.scope;o;o=o.prev)if(o.type==="coffee"||o.type=="}"){f=o.offset+e.indentUnit;break}i!=="coffee"?(r=null,c=e.column()+e.current().length):n.scope.align&&(n.scope.align=!1),n.scope={offset:f,type:i,prev:n.scope,align:r,alignOffset:c}}function v(e,n){if(n.scope.prev)if(n.scope.type==="coffee"){for(var i=e.indentation(),f=!1,r=n.scope;r;r=r.prev)if(i===r.offset){f=!0;break}if(!f)return!0;for(;n.scope.prev&&n.scope.offset!==i;)n.scope=n.scope.prev;return!1}else return n.scope=n.scope.prev,!1}function E(e,n){var i=n.tokenize(e,n),f=e.current();f==="return"&&(n.dedent=!0),((f==="->"||f==="=>")&&e.eol()||i==="indent")&&d(e,n);var r="[({".indexOf(f);if(r!==-1&&d(e,n,"])}".slice(r,r+1)),l.exec(f)&&d(e,n),f=="then"&&v(e,n),i==="dedent"&&v(e,n))return k;if(r="])}".indexOf(f),r!==-1){for(;n.scope.type=="coffee"&&n.scope.prev;)n.scope=n.scope.prev;n.scope.type==f&&(n.scope=n.scope.prev)}return n.dedent&&e.eol()&&(n.scope.type=="coffee"&&n.scope.prev&&(n.scope=n.scope.prev),n.dedent=!1),i=="indent"||i=="dedent"?null:i}const Z={name:"coffeescript",startState:function(){return{tokenize:u,scope:{offset:0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,n){var i=n.scope.align===null&&n.scope;i&&e.sol()&&(i.align=!1);var f=E(e,n);return f&&f!="comment"&&(i&&(i.align=!0),n.prop=f=="punctuation"&&e.current()=="."),f},indent:function(e,n){if(e.tokenize!=u)return 0;var i=e.scope,f=n&&"])}".indexOf(n.charAt(0))>-1;if(f)for(;i.type=="coffee"&&i.prev;)i=i.prev;var r=f&&i.type===n.charAt(0);return i.align?i.alignOffset-(r?1:0):(r?i.prev:i).offset},languageData:{commentTokens:{line:"#"}}};export{Z as coffeeScript}; diff --git a/pkg/cli/webapp/dist/assets/commonlisp-DBKNyK5s.js b/pkg/cli/webapp/dist/assets/commonlisp-DBKNyK5s.js new file mode 100644 index 0000000..0273ed2 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/commonlisp-DBKNyK5s.js @@ -0,0 +1 @@ +var u=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/,c=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,f=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,d=/[^\s'`,@()\[\]";]/,l;function i(e){for(var n;n=e.next();)if(n=="\\")e.next();else if(!d.test(n)){e.backUp(1);break}return e.current()}function o(e,n){if(e.eatSpace())return l="ws",null;if(e.match(f))return"number";var t=e.next();if(t=="\\"&&(t=e.next()),t=='"')return(n.tokenize=p)(e,n);if(t=="(")return l="open","bracket";if(t==")")return l="close","bracket";if(t==";")return e.skipToEnd(),l="ws","comment";if(/['`,@]/.test(t))return null;if(t=="|")return e.skipTo("|")?(e.next(),"variableName"):(e.skipToEnd(),"error");if(t=="#"){var t=e.next();return t=="("?(l="open","bracket"):/[+\-=\.']/.test(t)||/\d/.test(t)&&e.match(/^\d*#/)?null:t=="|"?(n.tokenize=x)(e,n):t==":"?(i(e),"meta"):t=="\\"?(e.next(),i(e),"string.special"):"error"}else{var r=i(e);return r=="."?null:(l="symbol",r=="nil"||r=="t"||r.charAt(0)==":"?"atom":n.lastType=="open"&&(u.test(r)||c.test(r))?"keyword":r.charAt(0)=="&"?"variableName.special":"variableName")}}function p(e,n){for(var t=!1,r;r=e.next();){if(r=='"'&&!t){n.tokenize=o;break}t=!t&&r=="\\"}return"string"}function x(e,n){for(var t,r;t=e.next();){if(t=="#"&&r=="|"){n.tokenize=o;break}r=t}return l="ws","comment"}const s={name:"commonlisp",startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:o}},token:function(e,n){e.sol()&&typeof n.ctx.indentTo!="number"&&(n.ctx.indentTo=n.ctx.start+1),l=null;var t=n.tokenize(e,n);return l!="ws"&&(n.ctx.indentTo==null?l=="symbol"&&c.test(e.current())?n.ctx.indentTo=n.ctx.start+e.indentUnit:n.ctx.indentTo="next":n.ctx.indentTo=="next"&&(n.ctx.indentTo=e.column()),n.lastType=l),l=="open"?n.ctx={prev:n.ctx,start:e.column(),indentTo:null}:l=="close"&&(n.ctx=n.ctx.prev||n.ctx),t},indent:function(e){var n=e.ctx.indentTo;return typeof n=="number"?n:e.ctx.start+1},languageData:{commentTokens:{line:";;",block:{open:"#|",close:"|#"}},closeBrackets:{brackets:["(","[","{",'"']}}};export{s as commonLisp}; diff --git a/pkg/cli/webapp/dist/assets/core-3OglTz8x.js b/pkg/cli/webapp/dist/assets/core-3OglTz8x.js new file mode 100644 index 0000000..be3e493 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/core-3OglTz8x.js @@ -0,0 +1,146 @@ +import{createOnigurumaEngine as qe,getDefaultWasmLoader as In,loadWasm as Ln}from"./engine-oniguruma-DwXy4luw.js";import{w as O,F as q,I as Pe,R as Gn,T as On,E as ct}from"./index-C3Ux1Lgv.js";import{e as co}from"./index-C3Ux1Lgv.js";import{w as ze,s as Gt,f as Fn,a as Mn,b as Rn,h as Bn,c as Pn}from"./index-vBeBfY-6.js";import{c as lt,z as Dn}from"./index-DIIxsTGV.js";import{s as te}from"./index-C9q4Fmxx.js";let U=class extends Error{constructor(t){super(t),this.name="ShikiError"}};const jn=/^>|^->||--!>|"],Wn=["<",">"];function Hn(e,t,n,r){return r.settings.bogusComments?"":"";function s(a){return te(a,Object.assign({},r.settings.characterReferences,{subset:Wn}))}}function Vn(e,t,n,r){return""}const $=Ft(1),Ot=Ft(-1),qn=[];function Ft(e){return t;function t(n,r,s){const a=n?n.children:qn;let o=(r||0)+e,i=a[o];if(!s)for(;i&&ze(i);)o+=e,i=a[o];return i}}const zn={}.hasOwnProperty;function Mt(e){return t;function t(n,r,s){return zn.call(e,n.tagName)&&e[n.tagName](n,r,s)}}const Je=Mt({body:Qn,caption:Te,colgroup:Te,dd:Yn,dt:Zn,head:Te,html:Jn,li:Xn,optgroup:er,option:tr,p:Kn,rp:ut,rt:ut,tbody:rr,td:ft,tfoot:sr,th:ft,thead:nr,tr:ar});function Te(e,t,n){const r=$(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ze(r.value.charAt(0)))}function Jn(e,t,n){const r=$(n,t);return!r||r.type!=="comment"}function Qn(e,t,n){const r=$(n,t);return!r||r.type!=="comment"}function Kn(e,t,n){const r=$(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Xn(e,t,n){const r=$(n,t);return!r||r.type==="element"&&r.tagName==="li"}function Zn(e,t,n){const r=$(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Yn(e,t,n){const r=$(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ut(e,t,n){const r=$(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function er(e,t,n){const r=$(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function tr(e,t,n){const r=$(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function nr(e,t,n){const r=$(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function rr(e,t,n){const r=$(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function sr(e,t,n){return!$(n,t)}function ar(e,t,n){const r=$(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function ft(e,t,n){const r=$(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const or=Mt({body:lr,colgroup:ur,head:cr,html:ir,tbody:fr});function ir(e){const t=$(e,-1);return!t||t.type!=="comment"}function cr(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function lr(e){const t=$(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&ze(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function ur(e,t,n){const r=Ot(n,t),s=$(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Je(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function fr(e,t,n){const r=Ot(n,t),s=$(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Je(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const fe={name:[[` +\f\r &/=>`.split(""),` +\f\r "&'/=>\``.split("")],[`\0 +\f\r "&'/<=>`.split(""),`\0 +\f\r "&'/<=>\``.split("")]],unquoted:[[` +\f\r &>`.split(""),`\0 +\f\r "&'<=>\``.split("")],[`\0 +\f\r "&'<=>\``.split(""),`\0 +\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function gr(e,t,n,r){const s=r.schema,a=s.space==="svg"?!1:r.settings.omitOptionalTags;let o=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const i=[];let c;s.space==="html"&&e.tagName==="svg"&&(r.schema=Gt);const l=pr(r,e.properties),u=r.all(s.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=s,u&&(o=!1),(l||!a||!or(e,t,n))&&(i.push("<",e.tagName,l?" "+l:""),o&&(s.space==="svg"||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&i.push(" "),i.push("/")),i.push(">")),i.push(u),!o&&(!a||!Je(e,t,n))&&i.push(""),i.join("")}function pr(e,t){const n=[];let r=-1,s;if(t){for(s in t)if(t[s]!==null&&t[s]!==void 0){const a=hr(e,s,t[s]);a&&n.push(a)}}for(;++rlt(n,e.alternative)&&(o=e.alternative),i=o+te(n,Object.assign({},e.settings.characterReferences,{subset:(o==="'"?fe.single:fe.double)[s][a],attribute:!0}))+o),c+(i&&"="+i))}const dr=["<","&"];function Rt(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:te(e.value,Object.assign({},r.settings.characterReferences,{subset:dr}))}function mr(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Rt(e,t,n,r)}function Cr(e,t,n,r){return r.all(e)}const yr=Dn("type",{invalid:br,unknown:kr,handlers:{comment:Hn,doctype:Vn,element:gr,raw:mr,root:Cr,text:Rt}});function br(e){throw new Error("Expected node, not `"+e+"`")}function kr(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const wr={},Sr={},vr=[];function _r(e,t){const n=t||wr,r=n.quote||'"',s=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Er,all:xr,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Pn,characterReferences:n.characterReferences||Sr,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Gt:Bn,quote:r,alternative:s}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Er(e,t,n){return yr(e,t,n,this)}function xr(e){const t=[],n=e&&e.children||vr;let r=-1;for(;++rnew RegExp(Qe`[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[${pt}]{2}[\u{E0030}-\u{E0039}${pt}]{1,3}\u{E007F}|${gt}(?:\u200D${gt})*`,"gu"),L=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function we(e,t,n,r){const s=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),a=[!1];let o=0,i="";for(const c of e.matchAll(s)){const{0:l,groups:{$skip:u}}=c;if(!u&&(!r||r===L.DEFAULT==!o)){n instanceof Function?i+=n(c,{context:o?L.CHAR_CLASS:L.DEFAULT,negated:a[a.length-1]}):i+=n;continue}l[0]==="["?(o++,a.push(l[1]==="^")):l==="]"&&o&&(o--,a.pop()),i+=l}return i}function Ar(e,t,n,r){we(e,t,n,r)}function Nr(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const s=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let a=0,o;for(;o=s.exec(e);){const{0:i,groups:{$skip:c}}=o;if(!c&&(!r||r===L.DEFAULT==!a))return o;i==="["?a++:i==="]"&&a&&a--,s.lastIndex==o.index&&s.lastIndex++}return null}function ge(e,t,n){return!!Nr(e,t,0,n)}function Tr(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,s=0,a=1,o;for(;o=n.exec(e);){const[i]=o;if(i==="[")s++;else if(s)i==="]"&&s--;else if(i==="(")a++;else if(i===")"&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}const K="$E$";class Ke extends RegExp{_captureMap;_namesByIndex;constructor(t,n,r){if(t instanceof RegExp&&r)throw new Error("Cannot provide options when copying a regexp");const s=!!r?.useEmulationGroups,a=s?Ir(t):null;super(a?.expression||t,n);const o=s?a:t instanceof Ke?t:null;o&&(this._captureMap=o._captureMap,this._namesByIndex=o._namesByIndex)}exec(t){const n=RegExp.prototype.exec.call(this,t);if(!n||!this._captureMap)return n;const r=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);for(let a=1;ao){n[o]=r[a];const i=this._namesByIndex[o];i&&(n.groups[i]=r[a],this.hasIndices&&(n.indices.groups[i]=s[a])),this.hasIndices&&(n.indices[o]=s[a])}}else n.push(r[a]),this.hasIndices&&n.indices.push(s[a]);return n}}function Ir(e){const t=K.replace(/\$/g,"\\$"),n=[{exclude:!1}],r={0:""};let s=0;return e=we(e,String.raw`\((?:(?!\?)|\?<(?![=!])(?[^>]+)>)(?(?:\$(?[1-9]\d*))?${t})?`,({0:a,groups:{name:o,mark:i,transfer:c}})=>i?(n.push({exclude:!0,transfer:c&&+c}),a.slice(0,-i.length)):(s++,o&&(r[s]=o),n.push({exclude:!1}),a),L.DEFAULT),{_captureMap:n,_namesByIndex:r,expression:e}}const Lr=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Gr(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const ht=new RegExp(String.raw`(?${Lr})|(?\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Or(e,t){if(!/\(\?>/.test(e))return e;const n="(?>",r=`(?:(?=(${t?.useEmulationGroups?K:""}`,s=[0];let a=0,o=0,i=NaN,c;do{c=!1;let l=0,u=0,f=!1,h;for(ht.lastIndex=Number.isNaN(i)?0:i+r.length;h=ht.exec(e);){const{0:g,index:d,groups:{capturingStart:b,noncapturingStart:m}}=h;if(g==="[")l++;else if(l)g==="]"&&l--;else if(g===n&&!f)i=d,f=!0;else if(f&&m)u++;else if(b)f?u++:(a++,s.push(a+o));else if(g===")"&&f){if(!u){o++,e=`${e.slice(0,i)}${r}${e.slice(i+n.length,d)}))<$$${o+a}>)${e.slice(d+1)}`,c=!0;break}u--}}}while(c);return e=we(e,String.raw`\\(?[1-9]\d*)|<\$\$(?\d+)>`,({0:l,groups:{backrefNum:u,wrappedBackrefNum:f}})=>{if(u){const h=+u;if(h>s.length-1)throw new Error(`Backref "${l}" greater than number of captures`);return`\\${s[h]}`}return`\\${f}`},L.DEFAULT),e}const Bt=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Ie=new RegExp(String.raw` +\\(?: \d+ + | c[A-Za-z] + | [gk]<[^>]+> + | [pPu]\{[^\}]+\} + | u[A-Fa-f\d]{4} + | x[A-Fa-f\d]{2} + ) +| \((?: \? (?: [:=!>] + | <(?:[=!]|[^>]+>) + | [A-Za-z\-]+: + | \(DEFINE\) + ))? +| (?${Bt})(?[?+]?)(?[?*+\{]?) +| \\?. +`.replace(/\s+/g,""),"gsu");function Fr(e){if(!new RegExp(`${Bt}\\+`).test(e))return e;const t=[];let n=null,r=null,s="",a=0,o;for(Ie.lastIndex=0;o=Ie.exec(e);){const{0:i,index:c,groups:{qBase:l,qMod:u,invalidQ:f}}=o;if(i==="[")a||(r=c),a++;else if(i==="]")a?a--:r=null;else if(!a)if(u==="+"&&s&&!s.startsWith("(")){if(f)throw new Error(`Invalid quantifier "${i}"`);let h=-1;if(/^\{\d+\}$/.test(l))e=Gr(e,c+l.length,u,"");else{if(s===")"||s==="]"){const g=s===")"?n:r;if(g===null)throw new Error(`Invalid unmatched "${s}"`);e=`${e.slice(0,g)}(?>${e.slice(g,c)}${l})${e.slice(c+i.length)}`}else e=`${e.slice(0,c-s.length)}(?>${s}${l})${e.slice(c+i.length)}`;h+=4}Ie.lastIndex+=h}else i[0]==="("?t.push(c):i===")"&&(n=t.length?t.pop():null);s=i}return e}const I=String.raw,Mr=I`\\g<(?[^>&]+)&R=(?[^>]+)>`,De=I`\(\?R=(?[^\)]+)\)|${Mr}`,Se=I`\(\?<(?![=!])(?[^>]+)>`,H=new RegExp(I`${Se}|${De}|\(\?|\\?.`,"gsu"),Le="Cannot use multiple overlapping recursions",je=new RegExp(I`(?:\$[1-9]\d*)?${K.replace(/\$/g,I`\$`)}`,"y");function Rr(e,t){if(!new RegExp(De,"su").test(e))return e;if(ge(e,I`\(\?\(DEFINE\)`,L.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const n=!!t?.useEmulationGroups,r=ge(e,I`\\[1-9]`,L.DEFAULT),s=new Map,a=[];let o=!1,i=0,c=0,l;for(H.lastIndex=0;l=H.exec(e);){const{0:u,groups:{captureName:f,rDepth:h,gRNameOrNum:g,gRDepth:d}}=l;if(u==="[")i++;else if(i)u==="]"&&i--;else if(h){if(dt(h),o)throw new Error(Le);if(r)throw new Error("Numbered backrefs cannot be used with global recursion");const b=e.slice(0,l.index),m=e.slice(H.lastIndex);if(ge(m,De,L.DEFAULT))throw new Error(Le);return mt(b,m,+h,!1,n)}else if(g){dt(d);let b=!1;for(const B of a)if(B.name===g||B.num===+g){if(b=!0,B.hasRecursedWithin)throw new Error(Le);break}if(!b)throw new Error(I`Recursive \g cannot be used outside the referenced group "\g<${g}&R=${d}>"`);const m=s.get(g),w=Tr(e,m);if(r&&ge(w,I`${Se}|\((?!\?)`,L.DEFAULT))throw new Error("Numbered backrefs cannot be used with recursion of capturing groups");const k=e.slice(m,l.index),v=w.slice(k.length+u.length),F=mt(k,v,+d,!0,n),M=e.slice(0,m),X=e.slice(m+w.length);e=`${M}${F}${X}`,H.lastIndex+=F.length-u.length-k.length-v.length,a.forEach(B=>B.hasRecursedWithin=!0),o=!0}else if(f)c++,s.set(String(c),H.lastIndex),s.set(f,H.lastIndex),a.push({num:c,name:f});else if(u.startsWith("(")){const b=u==="(";b&&(c++,s.set(String(c),H.lastIndex+(n?Br(e,H.lastIndex):0))),a.push(b?{num:c}:{})}else u===")"&&a.pop()}return e}function dt(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function mt(e,t,n,r,s){const a=new Set;r&&Ar(e+t,Se,({groups:{captureName:i}})=>{a.add(i)},L.DEFAULT);const o=n-1;return`${e}${Ct(`(?:${e}`,o,r?a:null,"forward",s)}(?:)${Ct(`${t})`,o,r?a:null,"backward",s)}${t}`}function Ct(e,t,n,r,s){const o=c=>r==="backward"?t-c+2-1:c+2;let i="";for(let c=0;c[^>]+)>${s?I`|(?\()(?!\?)(?:${je.source})?`:""}`,({0:u,index:f,groups:{captureName:h,backref:g,unnamed:d}})=>{if(g&&n&&!n.has(g))return u;if(d)return`(${K}`;const b=`_$${l}`;return h?`(?<${h}${b}>${s?K:""}`:I`\k<${g}${b}>`},L.DEFAULT)}return i}function Br(e,t){je.lastIndex=t;const n=je.exec(e);return n?n[0].length:0}var x=String.fromCodePoint,y=String.raw,Pr=(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),Dr=(()=>{try{new RegExp("","v")}catch{return!1}return!0})();function de(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function me(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Ue(e,t){return yt[e]>=yt[t]}function W(e,t){if(!e)throw new Error(t??"Value expected");return e}var yt={ES2025:2025,ES2024:2024,ES2018:2018},jr={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function Pt(e){if(e?.target!==void 0&&!jr[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e?.rules}};return t.target==="auto"&&(t.target=Pr?"ES2025":Dr?"ES2024":"ES2018"),t}var Ur=new Set([x(304),x(305)]);function Dt(e){if(Ur.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),s=qr.get(n),a=Hr.get(n),o=Vr.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),s&&t.add(s),t.add(n),a&&t.add(a),[...t]}var jt=new Set(`C Other +Cc Control cntrl +Cf Format +Cn Unassigned +Co Private_Use +Cs Surrogate +L Letter +LC Cased_Letter +Ll Lowercase_Letter +Lm Modifier_Letter +Lo Other_Letter +Lt Titlecase_Letter +Lu Uppercase_Letter +M Mark Combining_Mark +Mc Spacing_Mark +Me Enclosing_Mark +Mn Nonspacing_Mark +N Number +Nd Decimal_Number digit +Nl Letter_Number +No Other_Number +P Punctuation punct +Pc Connector_Punctuation +Pd Dash_Punctuation +Pe Close_Punctuation +Pf Final_Punctuation +Pi Initial_Punctuation +Po Other_Punctuation +Ps Open_Punctuation +S Symbol +Sc Currency_Symbol +Sk Modifier_Symbol +Sm Math_Symbol +So Other_Symbol +Z Separator +Zl Line_Separator +Zp Paragraph_Separator +Zs Space_Separator +ASCII +ASCII_Hex_Digit AHex +Alphabetic Alpha +Any +Assigned +Bidi_Control Bidi_C +Bidi_Mirrored Bidi_M +Case_Ignorable CI +Cased +Changes_When_Casefolded CWCF +Changes_When_Casemapped CWCM +Changes_When_Lowercased CWL +Changes_When_NFKC_Casefolded CWKCF +Changes_When_Titlecased CWT +Changes_When_Uppercased CWU +Dash +Default_Ignorable_Code_Point DI +Deprecated Dep +Diacritic Dia +Emoji +Emoji_Component EComp +Emoji_Modifier EMod +Emoji_Modifier_Base EBase +Emoji_Presentation EPres +Extended_Pictographic ExtPict +Extender Ext +Grapheme_Base Gr_Base +Grapheme_Extend Gr_Ext +Hex_Digit Hex +IDS_Binary_Operator IDSB +IDS_Trinary_Operator IDST +ID_Continue IDC +ID_Start IDS +Ideographic Ideo +Join_Control Join_C +Logical_Order_Exception LOE +Lowercase Lower +Math +Noncharacter_Code_Point NChar +Pattern_Syntax Pat_Syn +Pattern_White_Space Pat_WS +Quotation_Mark QMark +Radical +Regional_Indicator RI +Sentence_Terminal STerm +Soft_Dotted SD +Terminal_Punctuation Term +Unified_Ideograph UIdeo +Uppercase Upper +Variation_Selector VS +White_Space space +XID_Continue XIDC +XID_Start XIDS`.split(/\s/)),Ut=new Map;for(const e of jt)Ut.set(ve(e),e);var Wr=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji","RGI_Emoji_Flag_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence"]),Wt=new Map;for(const e of Wr)Wt.set(ve(e),e);var Hr=new Map([["s",x(383)],[x(383),"s"]]),Vr=new Map([[x(223),x(7838)],[x(107),x(8490)],[x(229),x(8491)],[x(969),x(8486)]]),qr=new Map([V(453),V(456),V(459),V(498),...Ge(8072,8079),...Ge(8088,8095),...Ge(8104,8111),V(8124),V(8140),V(8188)]),Ht=new Map([["alnum",y`[\p{Alpha}\p{Nd}]`],["alpha",y`\p{Alpha}`],["ascii",y`\p{ASCII}`],["blank",y`[\p{Zs}\t]`],["cntrl",y`\p{cntrl}`],["digit",y`\p{Nd}`],["graph",y`[\P{space}&&\P{cntrl}&&\P{Cn}&&\P{Cs}]`],["lower",y`\p{Lower}`],["print",y`[[\P{space}&&\P{cntrl}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",y`[\p{P}\p{S}]`],["space",y`\p{space}`],["upper",y`\p{Upper}`],["word",y`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",y`\p{AHex}`]]),zr=new Set(["alnum","blank","graph","print","word","xdigit"]);function Jr(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function ve(e){return e.replace(/[- _]+/g,"").toLowerCase()}function V(e){const t=x(e);return[t.toLowerCase(),t]}function Ge(e,t){return Jr(e,t).map(n=>V(n))}var Vt=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),C={Alternator:"Alternator",Assertion:"Assertion",Backreference:"Backreference",Character:"Character",CharacterClassClose:"CharacterClassClose",CharacterClassHyphen:"CharacterClassHyphen",CharacterClassIntersector:"CharacterClassIntersector",CharacterClassOpen:"CharacterClassOpen",CharacterSet:"CharacterSet",Directive:"Directive",GroupClose:"GroupClose",GroupOpen:"GroupOpen",Subroutine:"Subroutine",Quantifier:"Quantifier",VariableLengthCharacterSet:"VariableLengthCharacterSet",EscapedNumber:"EscapedNumber"},A={any:"any",digit:"digit",dot:"dot",hex:"hex",non_newline:"non_newline",posix:"posix",property:"property",space:"space",word:"word"},_e={flags:"flags",keep:"keep"},N={absent_repeater:"absent_repeater",atomic:"atomic",capturing:"capturing",group:"group",lookahead:"lookahead",lookbehind:"lookbehind"},bt=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]),qt=y`\[\^?`,zt=`c.? | C(?:-.?)?|${y`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${y`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${y`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${y`o\{[^\}]*\}?`}|${y`\d{1,3}`}`,Jt=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,pe=new RegExp(y` + \\ (?: + ${zt} + | [gk]<[^>]*>? + | [gk]'[^']*'? + | . + ) + | \( (?: \? (?: + [:=!>(] + | <[=!] + | <[^>]*> + | '[^']*' + | ~\|? + | # (?:[^)\\] | \\.?)* + | [imx\-]+[:)] + )?)? + | ${Jt.source} + | ${qt} + | . +`.replace(/\s+/g,""),"gsu"),Oe=new RegExp(y` + \\ (?: + ${zt} + | . + ) + | \[:[^:]*:\] + | ${qt} + | && + | . +`.replace(/\s+/g,""),"gsu");function Qt(e,t="",n){if(n={captureGroup:!1,singleline:!1,...n},typeof e!="string")throw new Error("String expected as pattern");if(!/^[imxDSW]*$/.test(t))throw new Error(`Flags "${t}" includes unsupported value`);const r=t.includes("x"),s=[r],a={captureGroup:n.captureGroup,getCurrentModX:()=>s.at(-1),numOpenGroups:0,popModX(){s.pop()},pushModX(f){s.push(f)},replaceCurrentModX(f){s[s.length-1]=f},singleline:n.singleline};let o=[],i;for(pe.lastIndex=0;i=pe.exec(e);){const f=Qr(a,e,i[0],pe.lastIndex);f.tokens?o.push(...f.tokens):f.token&&o.push(f.token),f.lastIndex!==void 0&&(pe.lastIndex=f.lastIndex)}const c=[];let l=0;o.forEach(f=>{f.type===C.GroupOpen&&(f.kind===N.capturing?f.number=++l:f.raw==="("&&c.push(f))}),l||c.forEach((f,h)=>{f.kind=N.capturing,f.number=h+1});const u=l||c.length;return o=o.map(f=>f.type===C.EscapedNumber?ss(f,u):f).flat(),{tokens:o,flags:{ignoreCase:t.includes("i"),dotAll:t.includes("m"),extended:r,digitIsAscii:t.includes("D"),spaceIsAscii:t.includes("S"),wordIsAscii:t.includes("W")},rules:n}}function Qr(e,t,n,r){const[s,a,o]=n;if(s==="["){const i=Kr(t,n,r);return{tokens:i.tokens,lastIndex:i.lastIndex}}if(s==="\\"){if("AbBGzZ".includes(a))return{token:S(C.Assertion,n,{kind:n})};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:S(C.Subroutine,n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:S(C.Backreference,n)}}if(a==="K")return{token:S(C.Directive,n,{kind:_e.keep})};if(a==="N")return{token:S(C.CharacterSet,n,{kind:A.non_newline})};if(a==="O")return{token:S(C.CharacterSet,n,{kind:A.any})};if("RX".includes(a))return{token:S(C.VariableLengthCharacterSet,n,{kind:n})};if("yY".includes(a))throw new Error(`Unsupported grapheme boundary "${n}"`);const i=Kt(n,{inCharClass:!1});return Array.isArray(i)?{tokens:i}:{token:i}}if(s==="("){if(o==="#"){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if("-imx".includes(o))return{token:Yr(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:S(C.GroupOpen,n,{kind:N.group})};if(n==="(?>")return{token:S(C.GroupOpen,n,{kind:N.atomic})};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?\^?)(?[a-z]+):\]/.exec(e);if(!t||!Ht.get(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return S(C.CharacterSet,e,{kind:A.posix,negate:!!t.groups.negate,value:t.groups.name})}return e==="-"?S(C.CharacterClassHyphen,e):e==="&&"?S(C.CharacterClassIntersector,e):(Xt(e),S(C.Character,e,{value:e.codePointAt(0)}))}function Kt(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Zr(e);if("dDhHsSwW".includes(n))return ts(e);if(e.startsWith(y`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return ns(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(i=>parseInt(i,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),a=new TextEncoder;return[...s].map(i=>{const c=[...a.encode(i)].map(l=>`\\x${l.toString(16)}`).join("");return S(C.Character,c,{value:i.codePointAt(0)})})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return S(C.Character,e,{value:rs(e)});if(bt.has(n))return S(C.Character,e,{value:bt.get(n)});if(/\d/.test(n))return S(C.EscapedNumber,e,{inCharClass:t});if(e==="\\")throw new Error(y`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return S(C.Character,e,{value:e.codePointAt(1)});throw new Error(`Unexpected escape "${e}"`)}function S(e,t,n){return{type:e,raw:t,...n}}function Zr(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return S(C.Character,e,{value:t.toUpperCase().codePointAt(0)-64})}function Yr(e,t){let{on:n,off:r}=/^\(\?(?[imx]*)(?:-(?[imx\-]*))?/.exec(e).groups;r??="";const s=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),a=kt(n),o=kt(r),i={};if(a&&(i.enable=a),o&&(i.disable=o),e.endsWith(")"))return t.replaceCurrentModX(s),S(C.Directive,e,{kind:_e.flags,flags:i});if(e.endsWith(":")){t.pushModX(s),t.numOpenGroups++;const c=S(C.GroupOpen,e,{kind:N.group});return(a||o)&&(c.flags=i),c}throw new Error(`Unexpected flag modifier "${e}"`)}function es(e){const t={};if(e[0]==="{"){const{min:n,max:r}=/^\{(?\d*)(?:,(?\d*))?/.exec(e).groups,s=1e5;if(+n>s||+r>s)throw new Error("Quantifier value unsupported in Oniguruma");t.min=+n,t.max=r===void 0?+n:r===""?1/0:+r,t.greedy=!e.endsWith("?"),t.possessive=!1}else t.min=e[0]==="+"?1:0,t.max=e[0]==="?"?1:1/0,t.greedy=e[1]!=="?",t.possessive=e[1]==="+";return S(C.Quantifier,e,t)}function ts(e){const t=e[1].toLowerCase();return S(C.CharacterSet,e,{kind:{d:A.digit,h:A.hex,s:A.space,w:A.word}[t],negate:e[1]!==t})}function ns(e){const{p:t,neg:n,value:r}=/^\\(?

[pP])\{(?\^?)(?[^}]+)/.exec(e).groups,s=t==="P"&&!n||t==="p"&&!!n;return S(C.CharacterSet,e,{kind:A.property,negate:s,value:r})}function kt(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function rs(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function ss(e,t){const{raw:n,inCharClass:r}=e,s=n.slice(1);if(!r&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=t))return[S(C.Backreference,n)];const a=[],o=s.match(/^[0-7]+|\d/g);for(let i=0;i127)throw new Error(y`Octal encoded byte above 177 unsupported "${n}"`)}else l=c.codePointAt(0);a.push(S(C.Character,(i===0?"\\":"")+c,{value:l}))}return a}function Xt(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`)}function Xe({alternatives:e},t){return e.length===1&&e[0].elements.length===1&&(!t||t(e[0].elements[0]))}function as({type:e}){return e===p.Assertion||e===p.Directive}function os(e){const t=[p.Character,p.CharacterClass,p.CharacterSet];return t.includes(e.type)||e.type===p.Quantifier&&e.min&&t.includes(e.element.type)}function Zt({type:e}){return e===p.CapturingGroup||e===p.Group}function ue({type:e,kind:t}){return e===p.Assertion&&(t===_.lookahead||t===_.lookbehind)}function ne(e,t,n){let r=e.node;for(;r.parent;)r=r.parent;function s(o,i){for(let c=0;c!!n[w]),d=g&&n[g],b=typeof d=="function"?d:d?.enter,m=d?.exit;if(b?.(h,t),!f)switch(o.type){case p.Regex:a(o.pattern,o,"pattern"),a(o.flags,o,"flags");break;case p.Alternative:case p.CharacterClass:s(o.elements,o);break;case p.Assertion:ue(o)&&s(o.alternatives,o);break;case p.Backreference:case p.Character:case p.CharacterSet:case p.Directive:case p.Flags:case p.Recursion:case p.Subroutine:case p.VariableLengthCharacterSet:break;case p.AbsentFunction:case p.CapturingGroup:case p.Group:case p.Pattern:s(o.alternatives,o);break;case p.CharacterClassIntersection:s(o.classes,o);break;case p.CharacterClassRange:a(o.min,o,"min"),a(o.max,o,"max");break;case p.Quantifier:a(o.element,o,"element");break;default:throw new Error(`Unexpected node type "${o.type}"`)}return m?.(h,t),u}a(e.node,e.parent,e.key,e.container)}var wt={AnyGroup:"AnyGroup",AnyNode:"AnyNode"};function is(e){const t=[wt.AnyNode];return(Zt(e)||ue(e))&&t.push(wt.AnyGroup),t.push(e.type),t}function cs(e,t){"parent"in t&&(e.parent=t)}var p={AbsentFunction:"AbsentFunction",Alternative:"Alternative",Assertion:"Assertion",Backreference:"Backreference",CapturingGroup:"CapturingGroup",Character:"Character",CharacterClass:"CharacterClass",CharacterClassIntersection:"CharacterClassIntersection",CharacterClassRange:"CharacterClassRange",CharacterSet:"CharacterSet",Directive:"Directive",Flags:"Flags",Group:"Group",Pattern:"Pattern",Quantifier:"Quantifier",Regex:"Regex",Subroutine:"Subroutine",VariableLengthCharacterSet:"VariableLengthCharacterSet",Recursion:"Recursion"},ls={repeater:"repeater"},_={line_end:"line_end",line_start:"line_start",lookahead:"lookahead",lookbehind:"lookbehind",search_start:"search_start",string_end:"string_end",string_end_newline:"string_end_newline",string_start:"string_start",word_boundary:"word_boundary"},E=A,he=_e,Ce={grapheme:"grapheme",newline:"newline"};function Yt({tokens:e,flags:t,rules:n},r){const s={skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,verbose:!1,...r},a={capturingGroups:[],current:0,hasNumberedRef:!1,namedGroupsByName:new Map,parent:null,skipBackrefValidation:s.skipBackrefValidation,skipLookbehindValidation:s.skipLookbehindValidation,skipPropertyNameValidation:s.skipPropertyNameValidation,subroutines:[],token:null,tokens:e,verbose:s.verbose,walk:o};function o(g,d){const b=e[a.current];switch(a.parent=g,a.token=b,a.current++,b.type){case C.Alternator:return z();case C.Assertion:return ys(b);case C.Backreference:return us(a);case C.Character:return nn(b.value,{useLastValid:!!d.isCheckingRangeEnd});case C.CharacterClassHyphen:return fs(a,d);case C.CharacterClassOpen:return gs(a,d);case C.CharacterSet:return ps(a);case C.Directive:return Ss(b);case C.GroupOpen:return hs(a,d);case C.Quantifier:return ds(a);case C.Subroutine:return ms(a);case C.VariableLengthCharacterSet:return $s(b.kind);default:throw new Error(`Unexpected token type "${b.type}"`)}}const i=Es(_s(),vs(t));let c=i.pattern.alternatives[0];for(;a.currentl.length)throw new Error("Subroutine uses a group number that's not defined")}else if(f.has(g)){if(f.get(g).length>1)throw new Error(y`Subroutine uses a duplicate group name "\g<${g}>"`)}else throw new Error(y`Subroutine uses a group name that's not defined "\g<${g}>"`);return ne({node:i},null,{AnyNode({node:g,parent:d}){g.parent=d}}),i}function us(e){const{raw:t}=e.token,n=/^\\k[<']/.test(t),r=n?t.slice(3,-1):t.slice(1),s=(a,o=!1)=>{const i=e.capturingGroups.length;let c=!1;if(a>i)if(e.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,We(o?i+1-a:a,{orphan:c})};if(n){const a=/^(?-?)0*(?[1-9]\d*)$/.exec(r);if(a)return s(+a.groups.num,!!a.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${t}"`);return We(r)}return s(+r)}function fs(e,t){const{parent:n,tokens:r,walk:s}=e,a=n.elements.at(-1),o=r[e.current];if(!t.isCheckingRangeEnd&&a&&a.type!==p.CharacterClass&&a.type!==p.CharacterClassRange&&o&&o.type!==C.CharacterClassOpen&&o.type!==C.CharacterClassClose&&o.type!==C.CharacterClassIntersector){const i=s(n,{...t,isCheckingRangeEnd:!0});if(a.type===p.Character&&i.type===p.Character)return n.elements.pop(),ws(a,i);throw new Error("Invalid character class range")}return nn(45)}function gs(e,t){const{token:n,tokens:r,verbose:s,walk:a}=e,o=r[e.current];let i=He({negate:n.negate});const c=i.elements[0];let l=St(o);for(;l.type!==C.CharacterClassClose;){if(l.type===C.CharacterClassIntersector)c.classes.push(He({negate:!1,baseOnly:!0})),e.current++;else{const u=c.classes.at(-1);u.elements.push(a(u,t))}l=St(r[e.current],o)}if(s||Is(c),c.classes.length===1){const u=c.classes[0];u.negate=i.negate!==u.negate,i=u}return e.current++,i}function ps({token:e,skipPropertyNameValidation:t}){let{kind:n,negate:r,value:s}=e;if(n===A.property){const a=ve(s);if(zr.has(a))n=A.posix,s=a;else return Y(s,{negate:r,skipPropertyNameValidation:t})}return n===A.posix?{type:p.CharacterSet,kind:E.posix,negate:r,value:s}:Ve(n,{negate:r})}function hs(e,t){const{token:n,tokens:r,capturingGroups:s,namedGroupsByName:a,skipLookbehindValidation:o,verbose:i,walk:c}=e;let l=bs(n);const u=l.type===p.AbsentFunction,f=l.kind===_.lookbehind,h=f&&l.negate;if(l.type===p.CapturingGroup&&(s.push(l),l.name&&me(a,l.name,[]).push(l)),u&&t.isInAbsentFunction)throw new Error("Nested absent function not supported by Oniguruma");let g=vt(r[e.current]);for(;g.type!==C.GroupClose;){if(g.type===C.Alternator)l.alternatives.push(z()),e.current++;else{const d=l.alternatives.at(-1),b=c(d,{...t,isInAbsentFunction:t.isInAbsentFunction||u,isInLookbehind:t.isInLookbehind||f,isInNegLookbehind:t.isInNegLookbehind||h});if(d.elements.push(b),(f||t.isInLookbehind)&&!o){const m="Lookbehind includes a pattern not allowed by Oniguruma";if(h||t.isInNegLookbehind){if(b.kind===_.lookahead||b.type===p.CapturingGroup)throw new Error(m)}else if(b.kind===_.lookahead||b.kind===_.lookbehind&&b.negate)throw new Error(m)}}g=vt(r[e.current])}return i||(l=Ns(l)),e.current++,l}function ds({token:e,parent:t}){const{min:n,max:r,greedy:s,possessive:a}=e,o=t.elements.at(-1);if(!o||o.type===p.Assertion||o.type===p.Directive)throw new Error("Quantifier requires a repeatable token");const i=rn(o,n,r,s,a);return t.elements.pop(),i}function ms(e){const{token:t,capturingGroups:n,subroutines:r}=e;let s=t.raw.slice(3,-1);const a=/^(?[-+]?)0*(?[1-9]\d*)$/.exec(s);if(a){const i=+a.groups.num,c=n.length;if(e.hasNumberedRef=!0,s={"":i,"+":c+i,"-":c+1-i}[a.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);const o=xs(s);return r.push(o),o}function Cs(e){return{type:p.AbsentFunction,kind:e,alternatives:[z()]}}function z(){return{type:p.Alternative,elements:[]}}function en(e,t){const n=!!t?.negate;return{type:p.Assertion,kind:e,...e===_.word_boundary&&{negate:n}}}function ys({kind:e}){return en(W({"^":_.line_start,$:_.line_end,"\\A":_.string_start,"\\b":_.word_boundary,"\\B":_.word_boundary,"\\G":_.search_start,"\\z":_.string_end,"\\Z":_.string_end_newline}[e],`Unexpected assertion kind "${e}"`),{negate:e===y`\B`})}function We(e,t){const n=!!t?.orphan;return{type:p.Backreference,...n&&{orphan:n},ref:e}}function bs({flags:e,kind:t,name:n,negate:r,number:s}){switch(t){case N.absent_repeater:return Cs(ls.repeater);case N.atomic:return R({atomic:!0});case N.capturing:return tn(s,n);case N.group:return R({flags:e});case N.lookahead:case N.lookbehind:return ae({behind:t===N.lookbehind,negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function tn(e,t){const n=t!==void 0;if(n&&!Ts(t))throw new Error(`Group name "${t}" invalid in Oniguruma`);return{type:p.CapturingGroup,number:e,...n&&{name:t},alternatives:[z()]}}function nn(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:p.Character,value:e}}function He(e){const t={baseOnly:!1,negate:!1,...e};return{type:p.CharacterClass,negate:t.negate,elements:t.baseOnly?[]:[ks()]}}function ks(){return{type:p.CharacterClassIntersection,classes:[He({negate:!1,baseOnly:!0})]}}function ws(e,t){if(t.valuer[0].toUpperCase()+r.slice(1).toLowerCase())}function Ns(e){const t=e.alternatives[0].elements[0];return e.type===p.Group&&Xe(e,n=>n.type===p.Group)&&!(e.atomic&&t.flags)&&!(e.flags&&(t.atomic||t.flags))?(e.atomic?t.atomic=!0:e.flags&&(t.flags=e.flags),t):e}function Ts(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Is(e){for(let t=0;ta.kind===he.flags);for(let a=n+1;ad.type===p.Group)&&f.alternatives.length===1?f:s.pattern;if(r.parent!==g||g.alternatives.length>1)throw new Error(y`Uses "\K" in a way that's unsupported`);o(j(ae({behind:!0}),i()))}},Flags({node:e,parent:t}){["digitIsAscii","extended","spaceIsAscii","wordIsAscii"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},Pattern:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,s=!1;for(const a of e.alternatives)if(a.elements.length===1&&a.elements[0].kind===_.search_start)a.elements.pop();else{const o=un(a.elements);o?(r=!0,Array.isArray(o)?n.push(...o):n.push(o)):s=!0}r&&!s&&n.forEach(a=>t.add(a))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(y`Uses "\G" in a way that requires non-strict accuracy`)}},Quantifier({node:e}){if(e.element.type===p.Quantifier){const t=j(R(),[e.element]);t.parent=e,e.element=t}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Me(n)&&(n=Fe(n,t),e.ref=n)},VariableLengthCharacterSet({node:e,replaceWith:t},{accuracy:n,minTargetEs2024:r}){const{kind:s}=e;if(s===Ce.newline)t(G(`(?>\r +?|[ +\v\f…\u2028\u2029])`));else if(s===Ce.grapheme){if(n==="strict")throw new Error(y`Use of "\X" requires non-strict accuracy`);const a=r?y`\p{RGI_Emoji}`:$r().source.replace(/\\u\{/g,"\\x{");t(G(y`(?>\r\n|${a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}))}else throw new Error(`Unexpected varcharset kind "${s}"`)}},an={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:s}=e;r||n.set(e,[...t.get(s).map(({node:a})=>a)])},CapturingGroup:{enter({node:e,replaceWith:t,skip:n},{groupOriginByCopy:r,groupsByName:s,multiplexCapturesToLeftByRef:a,openRefs:o,reffedNodesByReferencer:i}){const c=r.get(e);if(c&&o.has(e.number)){const u=_t(e.number);i.set(u,o.get(e.number)),t(u),n();return}o.set(e.number,e),a.set(e.number,[]),e.name&&me(a,e.name,[]);const l=a.get(e.name??e.number);for(let u=0;uf.type===p.Group&&!!f.flags)),u=l?de(t.globalFlags,l):t.globalFlags;Fs(u,t.currentFlags)||(c=j(R({flags:Bs(u)}),[i]))}r(c),o||gn(c,e,t,an)}},Gs={Backreference({node:e,replaceWith:t},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}const s=n.reffedNodesByReferencer.get(e).filter(a=>Ms(a,e));if(!s.length)t(j(ae({negate:!0})));else if(s.length>1){const a=s.map(o=>oe(z(),[We(o.number)]));t(oe(R(),a))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Recursion({node:e},t){e.ref!==0&&(e.ref=t.reffedNodesByReferencer.get(e).number)},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;rn.parent=e),e[Ze(e)]=t,e}function Fs(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Ms(e,t){let n=t;do{if(n.type===p.Pattern)return!1;if(n.type===p.Alternative)continue;if(n===e)return!1;const r=ln(n.parent);for(const s of r){if(s===n)break;if(s===e||fn(s,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function on(e,t,n,r){const s=Array.isArray(e)?[]:{};for(const[a,o]of Object.entries(e))a==="parent"?s.parent=Array.isArray(n)?r:n:o&&typeof o=="object"?s[a]=on(o,t,s,n):(a==="type"&&o===p.CapturingGroup&&t.set(s,t.get(e)??e),s[a]=o);return s}function _t(e){return{type:p.Recursion,ref:e}}function Rs(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Fe(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function Ze(e){for(const t of["alternatives","classes","elements"])if(e[t])return t;return null}function cn(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(s=>{r.enable?.[s]&&(delete n.disable[s],n.enable[s]=!0),r.disable?.[s]&&(n.disable[s]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Bs({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function ln(e){if(!e)throw new Error("Node expected");if(e.type===p.Quantifier)return[e.element];const t=Ze(e);return t&&e[t]}function un(e){const t=e.find(n=>n.kind===_.search_start||Ps(n,{negate:!1})||!as(n));if(!t)return null;if(t.kind===_.search_start)return t;if(ue(t))return t.alternatives[0].elements[0];if(Zt(t)){const n=[];for(const r of t.alternatives){const s=un(r.elements);if(!s)return null;Array.isArray(s)?n.push(...s):n.push(s)}return n}return null}function fn(e,t){const n=ln(e)??[];for(const r of n)if(r===t||fn(r,t))return!0;return!1}function Ps(e,t){const n={negate:null,...t};return ue(e)&&(n.negate===null||e.negate===n.negate)&&Xe(e,r=>r.kind===_.search_start)}function Me(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function G(e,t){const r=Yt(Qt(e),t).pattern.alternatives;return r.length>1||r[0].elements.length>1?oe(R(),r):r[0].elements[0]}function j(e,t){const n=Ze(e);return e[n][0].parent=e,t&&oe(e[n][0],t),e}function Re(e,t){return e.negate=t,e}function gn(e,{parent:t,key:n,container:r},s,a){ne({node:e,parent:t,key:n,container:r},s,a)}function Ds(e,t){const n=Pt(t),r=Ue(n.target,"ES2024"),s=Ue(n.target,"ES2025"),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw new Error("Invalid recursionLimit; use 2-20");let o=null,i=null;if(!s){const g=[e.flags.ignoreCase];ne({node:e},{getCurrentModI:()=>g.at(-1),popModI(){g.pop()},pushModI(d){g.push(d)},setHasCasedChar(){g.at(-1)?o=!0:i=!0}},js)}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!i)};let l=null;const u={accuracy:n.accuracy,appliedGlobalFlags:c,avoidSubclass:n.avoidSubclass,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,recursionLimit:a,useAppliedIgnoreCase:!!(!s&&o&&i),useFlagMods:s,useFlagV:r,verbose:n.verbose};function f(g){switch(u.lastNode=l,l=g,g.type){case p.Regex:return{pattern:f(g.pattern),flags:f(g.flags),options:{...g.options}};case p.Alternative:return g.elements.map(f).join("");case p.Assertion:return qs(g,u,f);case p.Backreference:return zs(g,u);case p.CapturingGroup:return Js(g,u,f);case p.Character:return Qs(g,u);case p.CharacterClass:return Ks(g,u,f);case p.CharacterClassIntersection:if(!u.useFlagV)throw new Error("Use of class intersection requires min target ES2024");return g.classes.map(f).join("&&");case p.CharacterClassRange:return Xs(g,u);case p.CharacterSet:return Zs(g,u);case p.Flags:return Ys(g,u);case p.Group:return ea(g,u,f);case p.Pattern:return g.alternatives.map(f).join("|");case p.Quantifier:return f(g.element)+sa(g);case p.Recursion:return ta(g,u);default:throw new Error(`Unexpected node type "${g.type}"`)}}const h=f(e);return r||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h}var js={AnyGroup:{enter({node:e},t){const n=t.getCurrentModI();t.pushModI(e.flags?de({ignoreCase:n},e.flags).ignoreCase:n)},exit(e,t){t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Ye(x(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),pn(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===E.property&&Vt.has(e.value)&&t.setHasCasedChar()}},Us=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Ws=new Set(["-","\\","]","^","["]),Hs=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Et=new Map([[9,y`\t`],[10,y`\n`],[11,y`\v`],[12,y`\f`],[13,y`\r`],[8232,y`\u2028`],[8233,y`\u2029`],[65279,y`\uFEFF`]]),Vs=new RegExp("^\\p{Cased}$","u");function Ye(e){return Vs.test(e)}function qs(e,t,n){const{kind:r,negate:s,alternatives:a}=e;if(ue(e))return`(?${`${r===_.lookahead?"":"<"}${s?"!":"="}`}${a.map(n).join("|")})`;if(r===_.string_end)return"$";if(r===_.string_start)return"^";if(r===_.word_boundary)return s?y`\B`:y`\b`;throw new Error(`Unexpected assertion kind "${r}"`)}function zs({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e}function Js({name:e,number:t,alternatives:n,_originNumber:r},s,a){return s.captureMap.set(t,{ignoreCase:s.currentFlags.ignoreCase}),`(${e?`?<${e}>`:""}${!s.avoidSubclass&&r?`${r1?`[${s.join("")}]`:s[0]}return n}function Ks({negate:e,parent:t,elements:n},r,s){const a=()=>`[${e?"^":""}${n.map(s).join("")}]`;if(!r.inCharClass){r.inCharClass=!0;const i=a();return r.inCharClass=!1,i}const o=n[0]?.type;if(!e&&o&&((!r.useFlagV||!r.verbose)&&t.type===p.CharacterClass&&o!==p.CharacterClassIntersection||!r.verbose&&t.type===p.CharacterClassIntersection&&n.length===1&&o!==p.CharacterClass&&o!==p.CharacterClassRange))return n.map(s).join("");if(!r.useFlagV&&t.type===p.CharacterClass)throw new Error("Use of nested character class requires min target ES2024");return a()}function Xs(e,t){const n=e.min.value,r=e.max.value,s={isAfterBackref:!1,inCharClass:!0,useFlagV:t.useFlagV},a=ee(n,s),o=ee(r,s),i=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=pn(e);na(c).forEach(u=>{i.add(Array.isArray(u)?`${ee(u[0],s)}-${ee(u[1],s)}`:ee(u,s))})}return`${a}-${o}${[...i].join("")}`}function Zs({kind:e,negate:t,value:n,key:r},s){if(e===E.dot)return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":y`[^\n]`;if(e===E.digit)return t?y`\D`:y`\d`;if(e===E.property){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&Vt.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?y`\P`:y`\p`}{${r?`${r}=`:""}${n}}`}if(e===E.word)return t?y`\W`:y`\w`;throw new Error(`Unexpected character set kind "${e}"`)}function Ys(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")}function ea({atomic:e,flags:t,parent:n,alternatives:r},s,a){const o=s.currentFlags;t&&(s.currentFlags=de(o,t));const i=r.map(a).join("|"),c=!s.verbose&&r.length===1&&n.type!==p.Quantifier&&!e&&(!s.useFlagMods||!t)?i:`(?${ra(e,t,s.useFlagMods)}${i})`;return s.currentFlags=o,c}function ta({ref:e},t){const n=t.recursionLimit;return e===0?`(?R=${n})`:y`\g<${e}&R=${n}>`}function pn(e,t){const n=!!t?.firstOnly,r=e.min.value,s=e.max.value,a=[];if(r<65&&(s===65535||s>=131071)||r===65536&&s>=131071)return a;for(let o=r;o<=s;o++){const i=x(o);if(!Ye(i))continue;const c=Dt(i).filter(l=>{const u=l.codePointAt(0);return us});if(c.length&&(a.push(...c),n))break}return a}function ee(e,{isAfterBackref:t,inCharClass:n,useFlagV:r}){if(Et.has(e))return Et.get(e);if(e<32||e>126&&e<160||e>262143||t&&aa(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const s=n?r?Hs:Ws:Us,a=x(e);return(s.has(a)?"\\":"")+a}function na(e){const t=e.map(s=>s.codePointAt(0)).sort((s,a)=>s-a),n=[];let r=null;for(let s=0;s";let r="";if(t&&n){const{enable:s,disable:a}=t;r=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(a?"-":"")+(a?.ignoreCase?"i":"")+(a?.dotAll?"s":"")}return`${r}:`}function sa({min:e,max:t,greedy:n,possessive:r}){let s;return!e&&t===1?s="?":!e&&t===1/0?s="*":e===1&&t===1/0?s="+":e===t?s=`{${e}}`:s=`{${e},${t===1/0?"":t}}`,s+(r?"+":n?"":"?")}function aa(e){return e>47&&e<58}var oa=class hn extends Ke{#e;rawArgs;constructor(t,n,r){if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");super(t,n),t instanceof hn?(this.#e=t.#e,this.rawArgs=t.rawArgs):(this.#e=null,this.rawArgs={pattern:t.source,flags:t.flags,options:{}}),n!==void 0&&(this.rawArgs.flags=n)}else{const s={strategy:null,useEmulationGroups:!1,...r};super(t,n,{useEmulationGroups:s.useEmulationGroups}),this.#e=s.strategy,this.rawArgs={pattern:t,flags:n??"",options:{...s.strategy&&{strategy:s.strategy},...s.useEmulationGroups&&{useEmulationGroups:!0}}}}}exec(t){const n=super.exec,r=this.global||this.sticky,s=this.lastIndex;if(this.#e==="search_start_clip"&&r&&s){this.lastIndex=0;const a=n.call(this,t.slice(s));return a&&(ia(a,this,t,s),this.lastIndex+=s),a}return n.call(this,t)}};function ia(e,t,n,r){if(e.input=n,e.index+=r,t.hasIndices){const s=e.indices;for(let o=0;o{const i=a[o];i&&(a[o]=[i[0]+r,i[1]+r])})}}function ca(e,t){const n=Pt(t),r=n.avoidSubclass,s=Qt(e,n.flags,{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}),a=Yt(s,{skipBackrefValidation:n.rules.allowOrphanBackrefs,verbose:n.verbose}),o=Ls(a,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:r,bestEffortTarget:n.target}),i=Ds(o,n),c={useEmulationGroups:!r},l={pattern:Or(Fr(Rr(i.pattern,c)),c),flags:`${n.hasIndices?"d":""}${n.global?"g":""}${i.flags}${i.options.disable.v?"u":"v"}`},u=!r&&l.pattern.includes(K),f=o._strategy;return(u||f)&&(l.options={...f&&{strategy:f},...u&&{useEmulationGroups:u}}),l}function la(e,t){const n=ca(e,t);return n.options?new oa(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}const xt=4294967295;class ua{constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:r=!1,cache:s,regexConstructor:a}=n;if(!a)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(o=>{if(typeof o!="string")return o;const i=s?.get(o);if(i){if(i instanceof RegExp)return i;if(r)return null;throw i}try{const c=a(o);return s?.set(o,c),c}catch(c){if(s?.set(o,c),r)return null;throw c}})}regexps;findNextMatchSync(t,n,r){const s=typeof t=="string"?t:t.content,a=[];function o(i,c,l=0){return{index:i,captureIndices:c.indices.map(u=>u==null?{start:xt,end:xt,length:0}:{start:u[0]+l,end:u[1]+l,length:u[1]-u[0]})}}for(let i=0;ic[1].index));for(const[c,l,u]of a)if(l.index===i)return o(c,l,u)}return null}}function dn(e,t){return la(e,{global:!0,hasIndices:!0,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function fa(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>dn(n,{target:t.target}),{createScanner(n){return new ua(n,t)},createString(n){return{content:n}}}}function ga(e){return O("import `createOnigurumaEngine` from `@shikijs/engine-oniguruma` or `shiki/engine/oniguruma` instead"),qe(e)}function Qa(e){return O("import `createOnigurumaEngine` from `@shikijs/engine-oniguruma` or `shiki/engine/oniguruma` instead"),qe(e)}function Ka(e){return O("import `loadWasm` from `@shikijs/engine-oniguruma` or `shiki/engine/oniguruma` instead"),Ln(e)}function pa(e){return Array.isArray(e)?e:[e]}function Ee(e,t=!1){const n=e.split(/(\r?\n)/g);let r=0;const s=[];for(let a=0;an&&r.push({...e,content:e.content.slice(n,s),offset:e.offset+n}),n=s;return nr-s);return n.length?e.map(r=>r.flatMap(s=>{const a=n.filter(o=>s.offseto-s.offset).sort((o,i)=>o-i);return a.length?ha(s,a):s})):e}async function bn(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function ye(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[s,a]of Object.entries(t?.colorReplacements||{}))typeof a=="string"?n[s]=a:s===r&&Object.assign(n,a);return n}function J(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function kn(e){const t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&q.Italic&&(t["font-style"]="italic"),e.fontStyle&q.Bold&&(t["font-weight"]="bold"),e.fontStyle&q.Underline&&(t["text-decoration"]="underline")),t}function ma(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function Ca(e){const t=Ee(e,!0).map(([s])=>s);function n(s){if(s===e.length)return{line:t.length-1,character:t[t.length-1].length};let a=s,o=0;for(const i of t){if(a[r,Pe])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,s]=t;this.lang=r,this._stacks={[s]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}get scopes(){return O("GrammarState.scopes is deprecated, use GrammarState.getScopes() instead"),$t(this._stacks[this.theme])}getScopes(t=this.theme){return $t(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function $t(e){const t=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);const a=s?.nameScopesList?.scopeName;a&&t.push(a),s.parent&&r(s.parent)}return r(e),t}function ya(e,t){if(!(e instanceof re))throw new T("Invalid grammar state");return e.getInternalStack(t)}function ba(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new T(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...s.indexToPos(o),offset:o}}else{const i=s.lines[o.line];if(i===void 0)throw new T(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${s.lines.length}`);if(o.character<0||o.character>i.length)throw new T(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${i.length}`);return{...o,offset:s.posToIndex(o.line,o.character)}}};const s=Ca(n.source),a=(n.options.decorations||[]).map(o=>({...o,start:r(o.start),end:r(o.end)}));ka(a),e.set(n.meta,{decorations:a,converter:s,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const s=t(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return da(n,s)},code(n){if(!this.options.decorations?.length)return;const r=t(this),s=Array.from(n.children).filter(u=>u.type==="element"&&u.tagName==="span");if(s.length!==r.converter.lines.length)throw new T(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function a(u,f,h,g){const d=s[u];let b="",m=-1,w=-1;if(f===0&&(m=0),h===0&&(w=0),h===Number.POSITIVE_INFINITY&&(w=d.children.length),m===-1||w===-1)for(let v=0;vb);return u.tagName=f.tagName||"span",u.properties={...u.properties,...g,class:u.properties.class},f.properties?.class&&yn(u,f.properties.class),u=d(u,h)||u,u}const c=[],l=r.decorations.sort((u,f)=>f.start.offset-u.start.offset);for(const u of l){const{start:f,end:h}=u;if(f.line===h.line)a(f.line,f.character,h.character,u);else if(f.lineo(g,u));a(h.line,0,h.character,u)}}c.forEach(u=>u())}}}function ka(e){for(let t=0;tn.end.offset)throw new T(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;rNumber.parseInt(o));a.length===3&&!a.some(o=>Number.isNaN(o))&&(s={type:"rgb",rgb:a})}else if(r==="5"){const a=Number.parseInt(e[t+n]);Number.isNaN(a)||(s={type:"table",index:Number(a)})}return[n,s]}function va(e){const t=[];for(let n=0;n=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Q[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Q[s-100+8]}})}return t}function _a(){let e=null,t=null,n=new Set;return{parse(r){const s=[];let a=0;do{const o=Sa(r,a),i=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(i.length>0&&s.push({value:i,foreground:e,background:t,decorations:new Set(n)}),o.sequence){const c=va(o.sequence);for(const l of c)l.type==="resetAll"?(e=null,t=null,n.clear()):l.type==="resetForegroundColor"?e=null:l.type==="resetBackgroundColor"?t=null:l.type==="resetDecoration"&&n.delete(l.value);for(const l of c)l.type==="setForegroundColor"?e=l.value:l.type==="setBackgroundColor"?t=l.value:l.type==="setDecoration"&&n.add(l.value)}a=o.position}while(aMath.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let l=0;l[i,e.colors?.[`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`]]))),o=_a();return s.map(i=>o.parse(i[0]).map(c=>{let l,u;c.decorations.has("reverse")?(l=c.background?a.value(c.background):e.bg,u=c.foreground?a.value(c.foreground):e.fg):(l=c.foreground?a.value(c.foreground):e.fg,u=c.background?a.value(c.background):void 0),l=J(l,r),u=J(u,r),c.decorations.has("dim")&&(l=Aa(l));let f=q.None;return c.decorations.has("bold")&&(f|=q.Bold),c.decorations.has("italic")&&(f|=q.Italic),c.decorations.has("underline")&&(f|=q.Underline),{content:c.value,offset:i[1],color:l,bgColor:u,fontStyle:f}}))}function Aa(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){const r=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${r}`}else return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(r=>`${r}${r}`).join("")}80`;const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function $e(e,t,n={}){const{lang:r="text",theme:s=e.getLoadedThemes()[0]}=n;if(et(r)||tt(s))return Ee(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:a,colorMap:o}=e.setTheme(s);if(r==="ansi")return $a(a,t,n);const i=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==i.name)throw new U(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(a.name))throw new U(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Na(t,i,a,o,n)}function vn(...e){if(e.length===2)return ie(e[1]);const[t,n,r={}]=e,{lang:s="text",theme:a=t.getLoadedThemes()[0]}=r;if(et(s)||tt(a))throw new U("Plain language does not have grammar state");if(s==="ansi")throw new U("ANSI language does not have grammar state");const{theme:o,colorMap:i}=t.setTheme(a),c=t.getLanguage(s);return new re(ke(n,c,o,i,r).stateStack,c.name,o.name)}function Na(e,t,n,r,s){const a=ke(e,t,n,r,s),o=new re(ke(e,t,n,r,s).stateStack,t.name,n.name);return xe(a.tokens,o),a.tokens}function ke(e,t,n,r,s){const a=ye(n,s),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:i=500}=s,c=Ee(e);let l=s.grammarState?ya(s.grammarState,n.name)??Pe:s.grammarContextCode!=null?ke(s.grammarContextCode,t,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Pe,u=[];const f=[];for(let h=0,g=c.length;h0&&d.length>=o){u=[],f.push([{content:d,offset:b,color:"",fontStyle:0}]);continue}let m,w,k;s.includeExplanation&&(m=t.tokenizeLine(d,l),w=m.tokens,k=0);const v=t.tokenizeLine2(d,l,i),F=v.tokens.length/2;for(let M=0;MNe.trim());break;case"object":Z=P.scope;break;default:continue}ot.push({settings:P,selectors:Z.map(Ne=>Ne.split(/ /))})}Ae.explanation=[];let it=0;for(;X+it({scopeName:t}))}function Ia(e,t){const n=[];for(let r=0,s=t.length;r=0&&s>=0;)Nt(e[r],n[s])&&(r-=1),s-=1;return r===-1}function Ga(e,t,n){const r=[];for(const{selectors:s,settings:a}of e)for(const o of s)if(La(o,t,n)){r.push(a);break}return r}function nt(e,t,n){const r=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),s=r.map(c=>{const l=$e(e,t,{...n,theme:c.theme}),u=ie(l),f=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:l,state:u,theme:f}}),a=Oa(...s.map(c=>c.tokens)),o=a[0].map((c,l)=>c.map((u,f)=>{const h={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=u.explanation),a.forEach((g,d)=>{const{content:b,explanation:m,offset:w,...k}=g[l][f];h.variants[r[d].color]=k}),h})),i=s[0].state?new re(Object.fromEntries(s.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),s[0].state.lang):void 0;return i&&xe(o,i),o}function Oa(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;rc[r]),a=t.map(()=>[]);t.forEach((c,l)=>c.push(a[l]));const o=s.map(()=>0),i=s.map(c=>c[0]);for(;i.every(c=>c);){const c=Math.min(...i.map(l=>l.content.length));for(let l=0;lm[1]).map(m=>({color:m[0],theme:m[1]})).sort((m,w)=>m.color===l?-1:w.color===l?1:0);if(f.length===0)throw new U("`themes` option must not be empty");const h=nt(e,t,n);if(c=ie(h),l&&!f.find(m=>m.color===l))throw new U(`\`themes\` option must contain the defaultColor key \`${l}\``);const g=f.map(m=>e.getTheme(m.theme)),d=f.map(m=>m.color);a=h.map(m=>m.map(w=>Fa(w,d,u,l))),c&&xe(a,c);const b=f.map(m=>ye(m.theme,n));s=f.map((m,w)=>(w===0&&l?"":`${u+m.color}:`)+(J(g[w].fg,b[w])||"inherit")).join(";"),r=f.map((m,w)=>(w===0&&l?"":`${u+m.color}-bg:`)+(J(g[w].bg,b[w])||"inherit")).join(";"),o=`shiki-themes ${g.map(m=>m.name).join(" ")}`,i=l?void 0:[s,r].join(";")}else if("theme"in n){const l=ye(n.theme,n);a=$e(e,t,n);const u=e.getTheme(n.theme);r=J(u.bg,l),s=J(u.fg,l),o=u.name,c=ie(a)}else throw new U("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:s,bg:r,themeName:o,rootStyle:i,grammarState:c}}function Fa(e,t,n,r){const s={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(c=>kn(e.variants[c])),o=new Set(a.flatMap(c=>Object.keys(c))),i={};return a.forEach((c,l)=>{for(const u of o){const f=c[u]||"inherit";if(l===0&&r)i[u]=f;else{const h=u==="color"?"":u==="background-color"?"-bg":`-${u}`,g=n+t[l]+(u==="color"?"":h);i[g]=f}}}),s.htmlStyle=i,s}function le(e,t,n,r={meta:{},options:n,codeToHast:(s,a)=>le(e,s,a),codeToTokens:(s,a)=>ce(e,s,a)}){let s=t;for(const g of be(n))s=g.preprocess?.call(r,s,n)||s;let{tokens:a,fg:o,bg:i,themeName:c,rootStyle:l,grammarState:u}=ce(e,s,n);const{mergeWhitespaces:f=!0}=n;f===!0?a=Ra(a):f==="never"&&(a=Ba(a));const h={...r,get source(){return s}};for(const g of be(n))a=g.tokens?.call(h,a)||a;return Ma(a,{...n,fg:o,bg:i,themeName:c,rootStyle:l},h,u)}function Ma(e,t,n,r=ie(e)){const s=be(t),a=[],o={type:"root",children:[]},{structure:i="classic",tabindex:c="0"}=t;let l={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...c!==!1&&c!=null?{tabindex:c.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([d])=>!d.startsWith("_")))},children:[]},u={type:"element",tagName:"code",properties:{},children:a};const f=[],h={...n,structure:i,addClassToHast:yn,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return l},get code(){return u},get lines(){return f}};if(e.forEach((d,b)=>{b&&(i==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):i==="classic"&&a.push({type:"text",value:` +`}));let m={type:"element",tagName:"span",properties:{class:"line"},children:[]},w=0;for(const k of d){let v={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};typeof k.htmlStyle=="string"&&O("`htmlStyle` as a string is deprecated. Use an object instead.");const F=ma(k.htmlStyle||kn(k));F&&(v.properties.style=F);for(const M of s)v=M?.span?.call(h,v,b+1,w,m,k)||v;i==="inline"?o.children.push(v):i==="classic"&&m.children.push(v),w+=k.content.length}if(i==="classic"){for(const k of s)m=k?.line?.call(h,m,b+1)||m;f.push(m),a.push(m)}}),i==="classic"){for(const d of s)u=d?.code?.call(h,u)||u;l.children.push(u);for(const d of s)l=d?.pre?.call(h,l)||l;o.children.push(l)}let g=o;for(const d of s)g=d?.root?.call(h,g)||g;return r&&xe(g,r),g}function Ra(e){return e.map(t=>{const n=[];let r="",s=0;return t.forEach((a,o)=>{const c=!(a.fontStyle&&a.fontStyle&q.Underline);c&&a.content.match(/^\s+$/)&&t[o+1]?(s||(s=a.offset),r+=a.content):r?(c?n.push({...a,offset:s,content:r+a.content}):n.push({content:r,offset:s},a),s=0,r=""):n.push(a)}),n})}function Ba(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,s,a,o]=r;if(!s&&!o)return n;const i=[{...n,offset:n.offset+s.length,content:a}];return s&&i.unshift({content:s,offset:n.offset}),o&&i.push({content:o,offset:n.offset+s.length+a.length}),i}))}function _n(e,t,n){const r={meta:{},options:n,codeToHast:(a,o)=>le(e,a,o),codeToTokens:(a,o)=>ce(e,a,o)};let s=_r(le(e,t,n,r));for(const a of be(n))s=a.postprocess?.call(r,s,n)||s;return s}const Tt={light:"#333333",dark:"#bbbbbb"},It={light:"#fffffe",dark:"#1e1e1e"},Lt="__shiki_resolved";function rt(e){if(e?.[Lt])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const i=t.settings?t.settings.find(c=>!c.name&&!c.scope):void 0;i?.settings?.foreground&&(r=i.settings.foreground),i?.settings?.background&&(n=i.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Tt.light:Tt.dark),n||(n=t.type==="light"?It.light:It.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let s=0;const a=new Map;function o(i){if(a.has(i))return a.get(i);s+=1;const c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${c}`]?o(i):(a.set(i,c),c)}t.settings=t.settings.map(i=>{const c=i.settings?.foreground&&!i.settings.foreground.startsWith("#"),l=i.settings?.background&&!i.settings.background.startsWith("#");if(!c&&!l)return i;const u={...i,settings:{...i.settings}};if(c){const f=o(i.settings.foreground);t.colorReplacements[f]=i.settings.foreground,u.settings.foreground=f}if(l){const f=o(i.settings.background);t.colorReplacements[f]=i.settings.background,u.settings.background=f}return u});for(const i of Object.keys(t.colors||{}))if((i==="editor.foreground"||i==="editor.background"||i.startsWith("terminal.ansi"))&&!t.colors[i]?.startsWith("#")){const c=o(t.colors[i]);t.colorReplacements[c]=t.colors[i],t.colors[i]=c}return Object.defineProperty(t,Lt,{enumerable:!1,writable:!1,value:!0}),t}async function En(e){return Array.from(new Set((await Promise.all(e.filter(t=>!mn(t)).map(async t=>await bn(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function xn(e){return(await Promise.all(e.map(async n=>Cn(n)?null:rt(await bn(n))))).filter(n=>!!n)}class Pa extends Gn{constructor(t,n,r,s={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=s,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=rt(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=On.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){if(this._alias[t]){const n=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],n.has(t))throw new T(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(a=>{this._alias[a]=t.name}),this._loadedLanguagesCache=null,n.size)for(const a of n)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const n=Array.from(this._langGraph.entries()),r=n.filter(([s,a])=>!a);if(r.length){const s=n.filter(([a,o])=>o&&o.embeddedLangs?.some(i=>r.map(([c])=>c).includes(i))).filter(a=>!r.includes(a));throw new T(`Missing languages ${r.map(([a])=>`\`${a}\``).join(", ")}, required by ${s.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[s,a]of n)this._resolver.addLanguage(a);for(const[s,a]of n)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const n of t.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class Da{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let s=1;s<=n.length;s++){const a=n.slice(0,s).join(".");r=[...r,...this._injections.get(a)||[]]}return r}}let se=0;function $n(e){se+=1,e.warnings!==!1&&se>=10&&se%10===0&&console.warn(`[Shiki] ${se} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new T("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(rt),s=new Da(e.engine,n),a=new Pa(s,r,n,e.langAlias);let o;function i(k){m();const v=a.getGrammar(typeof k=="string"?k:k.name);if(!v)throw new T(`Language \`${k}\` not found, you may need to load it first`);return v}function c(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};m();const v=a.getTheme(k);if(!v)throw new T(`Theme \`${k}\` not found, you may need to load it first`);return v}function l(k){m();const v=c(k);o!==k&&(a.setTheme(v),o=k);const F=a.getColorMap();return{theme:v,colorMap:F}}function u(){return m(),a.getLoadedThemes()}function f(){return m(),a.getLoadedLanguages()}function h(...k){m(),a.loadLanguages(k.flat(1))}async function g(...k){return h(await En(k))}function d(...k){m();for(const v of k.flat(1))a.loadTheme(v)}async function b(...k){return m(),d(await xn(k))}function m(){if(t)throw new T("Shiki instance has been disposed")}function w(){t||(t=!0,a.dispose(),se-=1)}return{setTheme:l,getTheme:c,getLanguage:i,getLoadedThemes:u,getLoadedLanguages:f,loadLanguage:g,loadLanguageSync:h,loadTheme:b,loadThemeSync:d,dispose:w,[Symbol.dispose]:w}}async function An(e={}){e.loadWasm&&O("`loadWasm` option is deprecated. Use `engine: createOnigurumaEngine(loadWasm)` instead.");const[t,n,r]=await Promise.all([xn(e.themes||[]),En(e.langs||[]),e.engine||qe(e.loadWasm||In())]);return $n({...e,themes:t,langs:n,engine:r})}function Xa(e={}){return O("`getShikiInternal` is deprecated. Use `createShikiInternal` instead."),An(e)}async function st(e={}){const t=await An(e);return{getLastGrammarState:(...n)=>vn(t,...n),codeToTokensBase:(n,r)=>$e(t,n,r),codeToTokensWithThemes:(n,r)=>nt(t,n,r),codeToTokens:(n,r)=>ce(t,n,r),codeToHast:(n,r)=>le(t,n,r),codeToHtml:(n,r)=>_n(t,n,r),...t,getInternalContext:()=>t}}function Za(e={}){const t=$n(e);return{getLastGrammarState:(...n)=>vn(t,...n),codeToTokensBase:(n,r)=>$e(t,n,r),codeToTokensWithThemes:(n,r)=>nt(t,n,r),codeToTokens:(n,r)=>ce(t,n,r),codeToHast:(n,r)=>le(t,n,r),codeToHtml:(n,r)=>_n(t,n,r),...t,getInternalContext:()=>t}}function ja(e){let t;async function n(r={}){if(t){const s=await t;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else return t=e({...r,themes:r.themes||[],langs:r.langs||[]}),t}return n}const Ya=ja(st);function eo(e={}){return O("`getHighlighterCore` is deprecated. Use `createHighlighterCore` or `getSingletonHighlighterCore` instead."),st(e)}function to(e,t,n){let r,s,a;if(t)O("`createdBundledHighlighter` signature with `bundledLanguages` and `bundledThemes` is deprecated. Use the options object signature instead."),r=e,s=t,a=()=>ga(n);else{const i=e;r=i.langs,s=i.themes,a=i.engine}async function o(i){function c(g){if(typeof g=="string"){if(mn(g))return[];const d=r[g];if(!d)throw new U(`Language \`${g}\` is not included in this bundle. You may want to load it from external source.`);return d}return g}function l(g){if(Cn(g))return"none";if(typeof g=="string"){const d=s[g];if(!d)throw new U(`Theme \`${g}\` is not included in this bundle. You may want to load it from external source.`);return d}return g}const u=(i.themes??[]).map(g=>l(g)),f=(i.langs??[]).map(g=>c(g)),h=await st({engine:i.engine??a(),...i,themes:u,langs:f});return{...h,loadLanguage(...g){return h.loadLanguage(...g.map(c))},loadTheme(...g){return h.loadTheme(...g.map(l))}}}return o}function Ua(e){let t;async function n(r={}){if(t){const s=await t;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else return t=e({...r,themes:r.themes||[],langs:r.langs||[]}),t}return n}function no(e){const t=Ua(e);return{getSingletonHighlighter(n){return t(n)},async codeToHtml(n,r){return(await t({langs:[r.lang],themes:"theme"in r?[r.theme]:Object.values(r.themes)})).codeToHtml(n,r)},async codeToHast(n,r){return(await t({langs:[r.lang],themes:"theme"in r?[r.theme]:Object.values(r.themes)})).codeToHast(n,r)},async codeToTokens(n,r){return(await t({langs:[r.lang],themes:"theme"in r?[r.theme]:Object.values(r.themes)})).codeToTokens(n,r)},async codeToTokensBase(n,r){return(await t({langs:[r.lang],themes:[r.theme]})).codeToTokensBase(n,r)},async codeToTokensWithThemes(n,r){return(await t({langs:[r.lang],themes:Object.values(r.themes).filter(Boolean)})).codeToTokensWithThemes(n,r)},async getLastGrammarState(n,r){return(await t({langs:[r.lang],themes:[r.theme]})).getLastGrammarState(n,r)}}}function ro(e){return O("import `createJavaScriptRegexEngine` from `@shikijs/engine-javascript` or `shiki/engine/javascript` instead"),fa(e)}function so(e){return O("import `defaultJavaScriptRegexConstructor` from `@shikijs/engine-javascript` or `shiki/engine/javascript` instead"),dn(e)}function ao(e={}){const{name:t="css-variables",variablePrefix:n="--shiki-",fontStyle:r=!0}=e,s=o=>e.variableDefaults?.[o]?`var(${n}${o}, ${e.variableDefaults[o]})`:`var(${n}${o})`,a={name:t,type:"dark",colors:{"editor.foreground":s("foreground"),"editor.background":s("background"),"terminal.ansiBlack":s("ansi-black"),"terminal.ansiRed":s("ansi-red"),"terminal.ansiGreen":s("ansi-green"),"terminal.ansiYellow":s("ansi-yellow"),"terminal.ansiBlue":s("ansi-blue"),"terminal.ansiMagenta":s("ansi-magenta"),"terminal.ansiCyan":s("ansi-cyan"),"terminal.ansiWhite":s("ansi-white"),"terminal.ansiBrightBlack":s("ansi-bright-black"),"terminal.ansiBrightRed":s("ansi-bright-red"),"terminal.ansiBrightGreen":s("ansi-bright-green"),"terminal.ansiBrightYellow":s("ansi-bright-yellow"),"terminal.ansiBrightBlue":s("ansi-bright-blue"),"terminal.ansiBrightMagenta":s("ansi-bright-magenta"),"terminal.ansiBrightCyan":s("ansi-bright-cyan"),"terminal.ansiBrightWhite":s("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:s("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:s("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:s("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:s("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:s("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:s("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:s("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:s("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:s("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:s("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:s("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:s("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:s("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:s("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:s("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:s("token-changed")}}]};return r||(a.tokenColors=a.tokenColors?.map(o=>(o.settings?.fontStyle&&delete o.settings.fontStyle,o))),a}export{q as FontStyle,U as ShikiError,ct as StackElementMetadata,yn as addClassToHast,J as applyColorReplacements,le as codeToHast,_n as codeToHtml,ce as codeToTokens,$e as codeToTokensBase,nt as codeToTokensWithThemes,ao as createCssVariablesTheme,st as createHighlighterCore,Za as createHighlighterCoreSync,ro as createJavaScriptRegexEngine,ga as createOnigurumaEngine,Ca as createPositionConverter,An as createShikiInternal,$n as createShikiInternalSync,no as createSingletonShorthands,Qa as createWasmOnigEngine,to as createdBundledHighlighter,so as defaultJavaScriptRegexConstructor,co as enableDeprecationWarnings,eo as getHighlighterCore,Xa as getShikiInternal,Ya as getSingletonHighlighterCore,kn as getTokenStyleObject,_r as hastToHtml,tt as isNoneTheme,et as isPlainLang,mn as isSpecialLang,Cn as isSpecialTheme,Ka as loadWasm,Ua as makeSingletonHighlighter,ja as makeSingletonHighlighterCore,bn as normalizeGetter,rt as normalizeTheme,ye as resolveColorReplacements,Ee as splitLines,ha as splitToken,da as splitTokens,ma as stringifyTokenStyle,pa as toArray,$a as tokenizeAnsiWithTheme,Na as tokenizeWithTheme,Ma as tokensToHast,ba as transformerDecorations,O as warnDeprecated}; diff --git a/pkg/cli/webapp/dist/assets/crystal-SjHAIU92.js b/pkg/cli/webapp/dist/assets/crystal-SjHAIU92.js new file mode 100644 index 0000000..59402da --- /dev/null +++ b/pkg/cli/webapp/dist/assets/crystal-SjHAIU92.js @@ -0,0 +1 @@ +function l(n,e){return new RegExp((e?"":"^")+"(?:"+n.join("|")+")"+(e?"$":"\\b"))}function o(n,e,r){return r.tokenize.push(n),n(e,r)}var v=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,z=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,g=/^(?:\[\][?=]?)/,b=/^(?:\.(?:\.{2})?|->|[?:])/,p=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,d=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,E=l(["abstract","alias","as","asm","begin","break","case","class","def","do","else","elsif","end","ensure","enum","extend","for","fun","if","include","instance_sizeof","lib","macro","module","next","of","out","pointerof","private","protected","rescue","return","require","select","sizeof","struct","super","then","type","typeof","uninitialized","union","unless","until","when","while","with","yield","__DIR__","__END_LINE__","__FILE__","__LINE__"]),S=l(["true","false","nil","self"]),T=["def","fun","macro","class","module","struct","lib","enum","union","do","for"],A=l(T),s=["if","unless","case","while","until","begin","then"],O=l(s),x=["end","else","elsif","rescue","ensure"],K=l(x),I=["\\)","\\}","\\]"],D=new RegExp("^(?:"+I.join("|")+")$"),w={def:y,fun:y,macro:N,class:c,module:c,struct:c,lib:c,enum:c,union:c},k={"[":"]","{":"}","(":")","<":">"};function _(n,e){if(n.eatSpace())return null;if(e.lastToken!="\\"&&n.match("{%",!1))return o(f("%","%"),n,e);if(e.lastToken!="\\"&&n.match("{{",!1))return o(f("{","}"),n,e);if(n.peek()=="#")return n.skipToEnd(),"comment";var r;if(n.match(p))return n.eat(/[?!]/),r=n.current(),n.eat(":")?"atom":e.lastToken=="."?"property":E.test(r)?(A.test(r)?!(r=="fun"&&e.blocks.indexOf("lib")>=0)&&!(r=="def"&&e.lastToken=="abstract")&&(e.blocks.push(r),e.currentIndent+=1):(e.lastStyle=="operator"||!e.lastStyle)&&O.test(r)?(e.blocks.push(r),e.currentIndent+=1):r=="end"&&(e.blocks.pop(),e.currentIndent-=1),w.hasOwnProperty(r)&&e.tokenize.push(w[r]),"keyword"):S.test(r)?"atom":"variable";if(n.eat("@"))return n.peek()=="["?o(h("[","]","meta"),n,e):(n.eat("@"),n.match(p)||n.match(d),"propertyName");if(n.match(d))return"tag";if(n.eat(":"))return n.eat('"')?o(F('"',"atom",!1),n,e):n.match(p)||n.match(d)||n.match(v)||n.match(z)||n.match(g)?"atom":(n.eat(":"),"operator");if(n.eat('"'))return o(F('"',"string",!0),n,e);if(n.peek()=="%"){var t="string",u=!0,i;if(n.match("%r"))t="string.special",i=n.next();else if(n.match("%w"))u=!1,i=n.next();else if(n.match("%q"))u=!1,i=n.next();else if(i=n.match(/^%([^\w\s=])/))i=i[1];else{if(n.match(/^%[a-zA-Z_\u009F-\uFFFF][\w\u009F-\uFFFF]*/))return"meta";if(n.eat("%"))return"operator"}return k.hasOwnProperty(i)&&(i=k[i]),o(F(i,t,u),n,e)}return(r=n.match(/^<<-('?)([A-Z]\w*)\1/))?o(Z(r[2],!r[1]),n,e):n.eat("'")?(n.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),n.eat("'"),"atom"):n.eat("0")?(n.eat("x")?n.match(/^[0-9a-fA-F_]+/):n.eat("o")?n.match(/^[0-7_]+/):n.eat("b")&&n.match(/^[01_]+/),"number"):n.eat(/^\d/)?(n.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?/),"number"):n.match(v)?(n.eat("="),"operator"):n.match(z)||n.match(b)?"operator":(r=n.match(/[({[]/,!1))?(r=r[0],o(h(r,k[r],null),n,e)):n.eat("\\")?(n.next(),"meta"):(n.next(),null)}function h(n,e,r,t){return function(u,i){if(!t&&u.match(n))return i.tokenize[i.tokenize.length-1]=h(n,e,r,!0),i.currentIndent+=1,r;var a=_(u,i);return u.current()===e&&(i.tokenize.pop(),i.currentIndent-=1,a=r),a}}function f(n,e,r){return function(t,u){return!r&&t.match("{"+n)?(u.currentIndent+=1,u.tokenize[u.tokenize.length-1]=f(n,e,!0),"meta"):t.match(e+"}")?(u.currentIndent-=1,u.tokenize.pop(),"meta"):_(t,u)}}function N(n,e){if(n.eatSpace())return null;var r;if(r=n.match(p)){if(r=="def")return"keyword";n.eat(/[?!]/)}return e.tokenize.pop(),"def"}function y(n,e){return n.eatSpace()?null:(n.match(p)?n.eat(/[!?]/):n.match(v)||n.match(z)||n.match(g),e.tokenize.pop(),"def")}function c(n,e){return n.eatSpace()?null:(n.match(d),e.tokenize.pop(),"def")}function F(n,e,r){return function(t,u){for(var i=!1;t.peek();)if(i)t.next(),i=!1;else{if(t.match("{%",!1))return u.tokenize.push(f("%","%")),e;if(t.match("{{",!1))return u.tokenize.push(f("{","}")),e;if(r&&t.match("#{",!1))return u.tokenize.push(h("#{","}","meta")),e;var a=t.next();if(a==n)return u.tokenize.pop(),e;i=r&&a=="\\"}return e}}function Z(n,e){return function(r,t){if(r.sol()&&(r.eatSpace(),r.match(n)))return t.tokenize.pop(),"string";for(var u=!1;r.peek();)if(u)r.next(),u=!1;else{if(r.match("{%",!1))return t.tokenize.push(f("%","%")),"string";if(r.match("{{",!1))return t.tokenize.push(f("{","}")),"string";if(e&&r.match("#{",!1))return t.tokenize.push(h("#{","}","meta")),"string";u=r.next()=="\\"&&e}return"string"}}const P={name:"crystal",startState:function(){return{tokenize:[_],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(n,e){var r=e.tokenize[e.tokenize.length-1](n,e),t=n.current();return r&&r!="comment"&&(e.lastToken=t,e.lastStyle=r),r},indent:function(n,e,r){return e=e.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,""),K.test(e)||D.test(e)?r.unit*(n.currentIndent-1):r.unit*n.currentIndent},languageData:{indentOnInput:l(I.concat(x),!0),commentTokens:{line:"#"}}};export{P as crystal}; diff --git a/pkg/cli/webapp/dist/assets/css-BPhBrDlE.js b/pkg/cli/webapp/dist/assets/css-BPhBrDlE.js new file mode 100644 index 0000000..317aac6 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/css-BPhBrDlE.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse(`{"displayName":"CSS","name":"css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#combinators"},{"include":"#selector"},{"include":"#at-rules"},{"include":"#rule-list"}],"repository":{"at-rules":{"patterns":[{"begin":"\\\\A(?:\\\\xEF\\\\xBB\\\\xBF)?(?i:(?=\\\\s*@charset\\\\b))","end":";|(?=$)","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.charset.css","patterns":[{"captures":{"1":{"name":"invalid.illegal.not-lowercase.charset.css"},"2":{"name":"invalid.illegal.leading-whitespace.charset.css"},"3":{"name":"invalid.illegal.no-whitespace.charset.css"},"4":{"name":"invalid.illegal.whitespace.charset.css"},"5":{"name":"invalid.illegal.not-double-quoted.charset.css"},"6":{"name":"invalid.illegal.unclosed-string.charset.css"},"7":{"name":"invalid.illegal.unexpected-characters.charset.css"}},"match":"\\\\G((?!@charset)@\\\\w+)|\\\\G(\\\\s+)|(@charset\\\\S[^;]*)|(?<=@charset)(\\\\x20{2,}|\\\\t+)|(?<=@charset\\\\x20)([^\\";]+)|(\\"[^\\"]+$)|(?<=\\")([^;]+)"},{"captures":{"1":{"name":"keyword.control.at-rule.charset.css"},"2":{"name":"punctuation.definition.keyword.css"}},"match":"((@)charset)(?=\\\\s)"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"\\"|$","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.double.css","patterns":[{"begin":"(?:\\\\G|^)(?=(?:[^\\"])+$)","end":"$","name":"invalid.illegal.unclosed.string.css"}]}]},{"begin":"(?i)((@)import)(?:\\\\s+|$|(?=['\\"]|/\\\\*))","beginCaptures":{"1":{"name":"keyword.control.at-rule.import.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":";","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.import.css","patterns":[{"begin":"\\\\G\\\\s*(?=/\\\\*)","end":"(?<=\\\\*/)\\\\s*","patterns":[{"include":"#comment-block"}]},{"include":"#string"},{"include":"#url"},{"include":"#media-query-list"}]},{"begin":"(?i)((@)font-face)(?=\\\\s*|{|/\\\\*|$)","beginCaptures":{"1":{"name":"keyword.control.at-rule.font-face.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":"(?!\\\\G)","name":"meta.at-rule.font-face.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#rule-list"}]},{"begin":"(?i)(@)page(?=[\\\\s:{]|/\\\\*|$)","captures":{"0":{"name":"keyword.control.at-rule.page.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*($|[:{;]))","name":"meta.at-rule.page.css","patterns":[{"include":"#rule-list"}]},{"begin":"(?i)(?=@media(\\\\s|\\\\(|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)media","beginCaptures":{"0":{"name":"keyword.control.at-rule.media.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[{;])","name":"meta.at-rule.media.header.css","patterns":[{"include":"#media-query-list"}]},{"begin":"{","beginCaptures":{"0":{"name":"punctuation.section.media.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.media.end.bracket.curly.css"}},"name":"meta.at-rule.media.body.css","patterns":[{"include":"$self"}]}]},{"begin":"(?i)(?=@counter-style([\\\\s'\\"{;]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)counter-style","beginCaptures":{"0":{"name":"keyword.control.at-rule.counter-style.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*{)","name":"meta.at-rule.counter-style.header.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"captures":{"0":{"patterns":[{"include":"#escapes"}]}},"match":"(?:[-a-zA-Z_]|[^\\\\x00-\\\\x7F])(?:[-a-zA-Z0-9_]|[^\\\\x00-\\\\x7F]|\\\\\\\\(?:[0-9a-fA-F]{1,6}|.))*","name":"variable.parameter.style-name.css"}]},{"begin":"{","beginCaptures":{"0":{"name":"punctuation.section.property-list.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.property-list.end.bracket.curly.css"}},"name":"meta.at-rule.counter-style.body.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#rule-list-innards"}]}]},{"begin":"(?i)(?=@document([\\\\s'\\"{;]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)document","beginCaptures":{"0":{"name":"keyword.control.at-rule.document.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[{;])","name":"meta.at-rule.document.header.css","patterns":[{"begin":"(?i)(?>>","name":"invalid.deprecated.combinator.css"},{"match":">>|>|\\\\+|~","name":"keyword.operator.combinator.css"}]},"commas":{"match":",","name":"punctuation.separator.list.comma.css"},"comment-block":{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.css"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.css"}},"name":"comment.block.css"},"escapes":{"patterns":[{"match":"\\\\\\\\[0-9a-fA-F]{1,6}","name":"constant.character.escape.codepoint.css"},{"begin":"\\\\\\\\$\\\\s*","end":"^(?<:=]|\\\\)|/\\\\*) # Terminates cleanly"},"media-query":{"begin":"\\\\G","end":"(?=\\\\s*[{;])","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#media-types"},{"match":"(?i)(?<=\\\\s|^|,|\\\\*/)(only|not)(?=\\\\s|{|/\\\\*|$)","name":"keyword.operator.logical.$1.media.css"},{"match":"(?i)(?<=\\\\s|^|\\\\*/|\\\\))and(?=\\\\s|/\\\\*|$)","name":"keyword.operator.logical.and.media.css"},{"match":",(?:(?:\\\\s*,)+|(?=\\\\s*[;){]))","name":"invalid.illegal.comma.css"},{"include":"#commas"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.css"}},"patterns":[{"include":"#media-features"},{"include":"#media-feature-keywords"},{"match":":","name":"punctuation.separator.key-value.css"},{"match":">=|<=|=|<|>","name":"keyword.operator.comparison.css"},{"captures":{"1":{"name":"constant.numeric.css"},"2":{"name":"keyword.operator.arithmetic.css"},"3":{"name":"constant.numeric.css"}},"match":"(\\\\d+)\\\\s*(/)\\\\s*(\\\\d+)","name":"meta.ratio.css"},{"include":"#numeric-values"},{"include":"#comment-block"}]}]},"media-query-list":{"begin":"(?=\\\\s*[^{;])","end":"(?=\\\\s*[{;])","patterns":[{"include":"#media-query"}]},"media-types":{"captures":{"1":{"name":"support.constant.media.css"},"2":{"name":"invalid.deprecated.constant.media.css"}},"match":"(?xi)\\n(?<=^|\\\\s|,|\\\\*/)\\n(?:\\n # Valid media types\\n (all|print|screen|speech)\\n |\\n # Deprecated in Media Queries 4: http://dev.w3.org/csswg/mediaqueries/#media-types\\n (aural|braille|embossed|handheld|projection|tty|tv)\\n)\\n(?=$|[{,\\\\s;]|/\\\\*)"},"numeric-values":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.constant.css"}},"match":"(#)(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\\\b","name":"constant.other.color.rgb-value.hex.css"},{"captures":{"1":{"name":"keyword.other.unit.percentage.css"},"2":{"name":"keyword.other.unit.\${2:/downcase}.css"}},"match":"(?xi) (?+~|]|/\\\\*)|(?:[-a-zA-Z_0-9]|[^\\\\x00-\\\\x7F]|\\\\\\\\(?:[0-9a-fA-F]{1,6}|.))*(?:[!\\"'%&(*;+~|]|/\\\\*)","name":"entity.other.attribute-name.class.css"},{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"patterns":[{"include":"#escapes"}]}},"match":"(\\\\#)(-?(?![0-9])(?:[-a-zA-Z0-9_]|[^\\\\x00-\\\\x7F]|\\\\\\\\(?:[0-9a-fA-F]{1,6}|.))+)(?=$|[\\\\s,.\\\\#)\\\\[:{>+~|]|/\\\\*)","name":"entity.other.attribute-name.id.css"},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.entity.begin.bracket.square.css"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.entity.end.bracket.square.css"}},"name":"meta.attribute-selector.css","patterns":[{"include":"#comment-block"},{"include":"#string"},{"captures":{"1":{"name":"storage.modifier.ignore-case.css"}},"match":"(?<=[\\"'\\\\s]|^|\\\\*/)\\\\s*([iI])\\\\s*(?=[\\\\s\\\\]]|/\\\\*|$)"},{"captures":{"1":{"name":"string.unquoted.attribute-value.css","patterns":[{"include":"#escapes"}]}},"match":"(?<==)\\\\s*((?!/\\\\*)(?:[^\\\\\\\\\\"'\\\\s\\\\]]|\\\\\\\\.)+)"},{"include":"#escapes"},{"match":"[~|^$*]?=","name":"keyword.operator.pattern.css"},{"match":"\\\\|","name":"punctuation.separator.css"},{"captures":{"1":{"name":"entity.other.namespace-prefix.css","patterns":[{"include":"#escapes"}]}},"match":"(-?(?!\\\\d)(?:[\\\\w-]|[^\\\\x00-\\\\x7F]|\\\\\\\\(?:[0-9a-fA-F]{1,6}|.))+|\\\\*)(?=\\\\|(?!\\\\s|=|$|\\\\])(?:-?(?!\\\\d)|[\\\\\\\\\\\\w-]|[^\\\\x00-\\\\x7F]))"},{"captures":{"1":{"name":"entity.other.attribute-name.css","patterns":[{"include":"#escapes"}]}},"match":"(-?(?!\\\\d)(?>[\\\\w-]|[^\\\\x00-\\\\x7F]|\\\\\\\\(?:[0-9a-fA-F]{1,6}|.))+)\\\\s*(?=[~|^\\\\]$*=]|/\\\\*)"}]},{"include":"#pseudo-classes"},{"include":"#pseudo-elements"},{"include":"#functional-pseudo-classes"},{"match":"(?\\\\s,.\\\\#|){:\\\\[]|/\\\\*|$)","name":"entity.name.tag.css"},"unicode-range":{"captures":{"0":{"name":"constant.other.unicode-range.css"},"1":{"name":"punctuation.separator.dash.unicode-range.css"}},"match":"(?*\/]/.test(r)?c(null,"select-op"):r=="."&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?c("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?c(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(o.tokenize=te),c("variableName.function","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),c("property","word")):c(null,null)}function $(e){return function(o,r){for(var t=!1,d;(d=o.next())!=null;){if(d==e&&!t){e==")"&&o.backUp(1);break}t=!t&&d=="\\"}return(d==e||!t&&e!=")")&&(r.tokenize=null),c("string","string")}}function te(e,o){return e.next(),e.match(/^\s*[\"\')]/,!1)?o.tokenize=null:o.tokenize=$(")"),c(null,"(")}function D(e,o,r){this.type=e,this.indent=o,this.prev=r}function s(e,o,r,t){return e.context=new D(r,o.indentation()+(t===!1?0:o.indentUnit),e.context),r}function u(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function k(e,o,r){return a[r.context.type](e,o,r)}function h(e,o,r,t){for(var d=t||1;d>0;d--)r.context=r.context.prev;return k(e,o,r)}function L(e){var o=e.current().toLowerCase();V.hasOwnProperty(o)?n="atom":N.hasOwnProperty(o)?n="keyword":n="variable"}var a={};return a.top=function(e,o,r){if(e=="{")return s(r,o,"block");if(e=="}"&&r.context.prev)return u(r);if(oe&&/@component/i.test(e))return s(r,o,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,o,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,o,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&e.charAt(0)=="@")return s(r,o,"at");if(e=="hash")n="builtin";else if(e=="word")n="tag";else{if(e=="variable-definition")return"maybeprop";if(e=="interpolation")return s(r,o,"interpolation");if(e==":")return"pseudo";if(g&&e=="(")return s(r,o,"parens")}return r.context.type},a.block=function(e,o,r){if(e=="word"){var t=o.current().toLowerCase();return O.hasOwnProperty(t)?(n="property","maybeprop"):F.hasOwnProperty(t)?(n=W?"string.special":"property","maybeprop"):g?(n=o.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(n="error","maybeprop")}else return e=="meta"?"block":!g&&(e=="hash"||e=="qualifier")?(n="error","block"):a.top(e,o,r)},a.maybeprop=function(e,o,r){return e==":"?s(r,o,"prop"):k(e,o,r)},a.prop=function(e,o,r){if(e==";")return u(r);if(e=="{"&&g)return s(r,o,"propBlock");if(e=="}"||e=="{")return h(e,o,r);if(e=="(")return s(r,o,"parens");if(e=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(o.current()))n="error";else if(e=="word")L(o);else if(e=="interpolation")return s(r,o,"interpolation");return"prop"},a.propBlock=function(e,o,r){return e=="}"?u(r):e=="word"?(n="property","maybeprop"):r.context.type},a.parens=function(e,o,r){return e=="{"||e=="}"?h(e,o,r):e==")"?u(r):e=="("?s(r,o,"parens"):e=="interpolation"?s(r,o,"interpolation"):(e=="word"&&L(o),"parens")},a.pseudo=function(e,o,r){return e=="meta"?"pseudo":e=="word"?(n="variableName.constant",r.context.type):k(e,o,r)},a.documentTypes=function(e,o,r){return e=="word"&&b.hasOwnProperty(o.current())?(n="tag",r.context.type):a.atBlock(e,o,r)},a.atBlock=function(e,o,r){if(e=="(")return s(r,o,"atBlock_parens");if(e=="}"||e==";")return h(e,o,r);if(e=="{")return u(r)&&s(r,o,g?"block":"top");if(e=="interpolation")return s(r,o,"interpolation");if(e=="word"){var t=o.current().toLowerCase();t=="only"||t=="not"||t=="and"||t=="or"?n="keyword":G.hasOwnProperty(t)?n="attribute":J.hasOwnProperty(t)?n="property":Q.hasOwnProperty(t)?n="keyword":O.hasOwnProperty(t)?n="property":F.hasOwnProperty(t)?n=W?"string.special":"property":V.hasOwnProperty(t)?n="atom":N.hasOwnProperty(t)?n="keyword":n="error"}return r.context.type},a.atComponentBlock=function(e,o,r){return e=="}"?h(e,o,r):e=="{"?u(r)&&s(r,o,g?"block":"top",!1):(e=="word"&&(n="error"),r.context.type)},a.atBlock_parens=function(e,o,r){return e==")"?u(r):e=="{"||e=="}"?h(e,o,r,2):a.atBlock(e,o,r)},a.restricted_atBlock_before=function(e,o,r){return e=="{"?s(r,o,"restricted_atBlock"):e=="word"&&r.stateArg=="@counter-style"?(n="variable","restricted_atBlock_before"):k(e,o,r)},a.restricted_atBlock=function(e,o,r){return e=="}"?(r.stateArg=null,u(r)):e=="word"?(r.stateArg=="@font-face"&&!R.hasOwnProperty(o.current().toLowerCase())||r.stateArg=="@counter-style"&&!ee.hasOwnProperty(o.current().toLowerCase())?n="error":n="property","maybeprop"):"restricted_atBlock"},a.keyframes=function(e,o,r){return e=="word"?(n="variable","keyframes"):e=="{"?s(r,o,"top"):k(e,o,r)},a.at=function(e,o,r){return e==";"?u(r):e=="{"||e=="}"?h(e,o,r):(e=="word"?n="tag":e=="hash"&&(n="builtin"),"at")},a.interpolation=function(e,o,r){return e=="}"?u(r):e=="{"||e==";"?h(e,o,r):(e=="word"?n="variable":e!="variable"&&e!="("&&e!=")"&&(n="error"),"interpolation")},{name:i.name,startState:function(){return{tokenize:null,state:l?"block":"top",stateArg:null,context:new D(l?"block":"top",0,null)}},token:function(e,o){if(!o.tokenize&&e.eatSpace())return null;var r=(o.tokenize||ie)(e,o);return r&&typeof r=="object"&&(w=r[1],r=r[0]),n=r,w!="comment"&&(o.state=a[o.state](w,e,o)),n},indent:function(e,o,r){var t=e.context,d=o&&o.charAt(0),q=t.indent;return t.type=="prop"&&(d=="}"||d==")")&&(t=t.prev),t.prev&&(d=="}"&&(t.type=="block"||t.type=="top"||t.type=="interpolation"||t.type=="restricted_atBlock")?(t=t.prev,q=t.indent):(d==")"&&(t.type=="parens"||t.type=="atBlock_parens")||d=="{"&&(t.type=="at"||t.type=="atBlock"))&&(q=Math.max(0,t.indent-r.unit))),q},languageData:{indentOnInput:/^\s*\}$/,commentTokens:{line:re,block:{open:"/*",close:"*/"}},autocomplete:M}}}function p(i){for(var l={},m=0;m=&|~%^]/;const g={name:"cypher",startState:function(){return{tokenize:p,context:null,indent:0,col:0}},token:function(n,e){if(n.sol()&&(e.context&&e.context.align==null&&(e.context.align=!1),e.indent=n.indentation()),n.eatSpace())return null;var t=e.tokenize(n,e);if(t!=="comment"&&e.context&&e.context.align==null&&e.context.type!=="pattern"&&(e.context.align=!0),i==="(")o(e,")",n.column());else if(i==="[")o(e,"]",n.column());else if(i==="{")o(e,"}",n.column());else if(/[\]\}\)]/.test(i)){for(;e.context&&e.context.type==="pattern";)c(e);e.context&&i===e.context.type&&c(e)}else i==="."&&e.context&&e.context.type==="pattern"?c(e):/atom|string|variable/.test(t)&&e.context&&(/[\}\]]/.test(e.context.type)?o(e,"pattern",n.column()):e.context.type==="pattern"&&!e.context.align&&(e.context.align=!0,e.context.col=n.column()));return t},indent:function(n,e,t){var a=e&&e.charAt(0),r=n.context;if(/[\]\}]/.test(a))for(;r&&r.type==="pattern";)r=r.prev;var s=r&&a===r.type;return r?r.type==="keywords"?null:r.align?r.col+(s?0:1):r.indent+(s?0:t.unit):0}};export{g as cypher}; diff --git a/pkg/cli/webapp/dist/assets/d-pRatUO7H.js b/pkg/cli/webapp/dist/assets/d-pRatUO7H.js new file mode 100644 index 0000000..795e106 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/d-pRatUO7H.js @@ -0,0 +1 @@ +function c(e){for(var n={},t=e.split(" "),i=0;i!?|\/]/,o;function m(e,n){var t=e.next();if(p[t]){var i=p[t](e,n);if(i!==!1)return i}if(t=='"'||t=="'"||t=="`")return n.tokenize=z(t),n.tokenize(e,n);if(/[\[\]{}\(\),;\:\.]/.test(t))return o=t,null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(t=="/"){if(e.eat("+"))return n.tokenize=k,k(e,n);if(e.eat("*"))return n.tokenize=y,y(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(h.test(t))return e.eatWhile(h),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current();return v.propertyIsEnumerable(r)?(d.propertyIsEnumerable(r)&&(o="newstatement"),"keyword"):x.propertyIsEnumerable(r)?(d.propertyIsEnumerable(r)&&(o="newstatement"),"builtin"):g.propertyIsEnumerable(r)?"atom":"variable"}function z(e){return function(n,t){for(var i=!1,r,u=!1;(r=n.next())!=null;){if(r==e&&!i){u=!0;break}i=!i&&r=="\\"}return(u||!(i||_))&&(t.tokenize=null),"string"}}function y(e,n){for(var t=!1,i;i=e.next();){if(i=="/"&&t){n.tokenize=null;break}t=i=="*"}return"comment"}function k(e,n){for(var t=!1,i;i=e.next();){if(i=="/"&&t){n.tokenize=null;break}t=i=="+"}return"comment"}function b(e,n,t,i,r){this.indented=e,this.column=n,this.type=t,this.align=i,this.prev=r}function f(e,n,t){var i=e.indented;return e.context&&e.context.type=="statement"&&(i=e.context.indented),e.context=new b(i,n,t,null,e.context)}function a(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const E={name:"d",startState:function(e){return{tokenize:null,context:new b(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;o=null;var i=(n.tokenize||m)(e,n);if(i=="comment"||i=="meta")return i;if(t.align==null&&(t.align=!0),(o==";"||o==":"||o==",")&&t.type=="statement")a(n);else if(o=="{")f(n,e.column(),"}");else if(o=="[")f(n,e.column(),"]");else if(o=="(")f(n,e.column(),")");else if(o=="}"){for(;t.type=="statement";)t=a(n);for(t.type=="}"&&(t=a(n));t.type=="statement";)t=a(n)}else o==t.type?a(n):((t.type=="}"||t.type=="top")&&o!=";"||t.type=="statement"&&o=="newstatement")&&f(n,e.column(),"statement");return n.startOfLine=!1,i},indent:function(e,n,t){if(e.tokenize!=m&&e.tokenize!=null)return null;var i=e.context,r=n&&n.charAt(0);i.type=="statement"&&r=="}"&&(i=i.prev);var u=r==i.type;return i.type=="statement"?i.indented+(r=="{"?0:w||t.unit):i.align?i.column+(u?0:1):i.indented+(u?0:t.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{E as d}; diff --git a/pkg/cli/webapp/dist/assets/diff-DbItnlRl.js b/pkg/cli/webapp/dist/assets/diff-DbItnlRl.js new file mode 100644 index 0000000..91a492b --- /dev/null +++ b/pkg/cli/webapp/dist/assets/diff-DbItnlRl.js @@ -0,0 +1 @@ +var o={"+":"inserted","-":"deleted","@":"meta"};const r={name:"diff",token:function(n){var e=n.string.search(/[\t ]+?$/);if(!n.sol()||e===0)return n.skipToEnd(),("error "+(o[n.string.charAt(0)]||"")).replace(/ $/,"");var i=o[n.peek()]||n.skipToEnd();return e===-1?n.skipToEnd():n.pos=e,i}};export{r as diff}; diff --git a/pkg/cli/webapp/dist/assets/dockerfile-BKs6k2Af.js b/pkg/cli/webapp/dist/assets/dockerfile-BKs6k2Af.js new file mode 100644 index 0000000..3695b4e --- /dev/null +++ b/pkg/cli/webapp/dist/assets/dockerfile-BKs6k2Af.js @@ -0,0 +1 @@ +import{s as o}from"./simple-mode-GW_nhZxv.js";var e="from",s=new RegExp("^(\\s*)\\b("+e+")\\b","i"),n=["run","cmd","entrypoint","shell"],l=new RegExp("^(\\s*)("+n.join("|")+")(\\s+\\[)","i"),t="expose",x=new RegExp("^(\\s*)("+t+")(\\s+)","i"),g=["arg","from","maintainer","label","env","add","copy","volume","user","workdir","onbuild","stopsignal","healthcheck","shell"],u=[e,t].concat(n).concat(g),r="("+u.join("|")+")",a=new RegExp("^(\\s*)"+r+"(\\s*)(#.*)?$","i"),k=new RegExp("^(\\s*)"+r+"(\\s+)","i");const m=o({start:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:s,token:[null,"keyword"],sol:!0,next:"from"},{regex:a,token:[null,"keyword",null,"error"],sol:!0},{regex:l,token:[null,"keyword",null],sol:!0,next:"array"},{regex:x,token:[null,"keyword",null],sol:!0,next:"expose"},{regex:k,token:[null,"keyword",null],sol:!0,next:"arguments"},{regex:/./,token:null}],from:[{regex:/\s*$/,token:null,next:"start"},{regex:/(\s*)(#.*)$/,token:[null,"error"],next:"start"},{regex:/(\s*\S+\s+)(as)/i,token:[null,"keyword"],next:"start"},{token:null,next:"start"}],single:[{regex:/(?:[^\\']|\\.)/,token:"string"},{regex:/'/,token:"string",pop:!0}],double:[{regex:/(?:[^\\"]|\\.)/,token:"string"},{regex:/"/,token:"string",pop:!0}],array:[{regex:/\]/,token:null,next:"start"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"}],expose:[{regex:/\d+$/,token:"number",next:"start"},{regex:/[^\d]+$/,token:null,next:"start"},{regex:/\d+/,token:"number"},{regex:/[^\d]+/,token:null},{token:null,next:"start"}],arguments:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:/"(?:[^\\"]|\\.)*"?$/,token:"string",next:"start"},{regex:/"/,token:"string",push:"double"},{regex:/'(?:[^\\']|\\.)*'?$/,token:"string",next:"start"},{regex:/'/,token:"string",push:"single"},{regex:/[^#"']+[\\`]$/,token:null},{regex:/[^#"']+$/,token:null,next:"start"},{regex:/[^#"']+/,token:null},{token:null,next:"start"}],languageData:{commentTokens:{line:"#"}}});export{m as dockerFile}; diff --git a/pkg/cli/webapp/dist/assets/dtd-DF_7sFjM.js b/pkg/cli/webapp/dist/assets/dtd-DF_7sFjM.js new file mode 100644 index 0000000..d0b492f --- /dev/null +++ b/pkg/cli/webapp/dist/assets/dtd-DF_7sFjM.js @@ -0,0 +1 @@ +var u;function r(e,n){return u=n,e}function t(e,n){var l=e.next();if(l=="<"&&e.eat("!")){if(e.eatWhile(/[\-]/))return n.tokenize=o,o(e,n);if(e.eatWhile(/[\w]/))return r("keyword","doindent")}else{if(l=="<"&&e.eat("?"))return n.tokenize=a("meta","?>"),r("meta",l);if(l=="#"&&e.eatWhile(/[\w]/))return r("atom","tag");if(l=="|")return r("keyword","separator");if(l.match(/[\(\)\[\]\-\.,\+\?>]/))return r(null,l);if(l.match(/[\[\]]/))return r("rule",l);if(l=='"'||l=="'")return n.tokenize=k(l),n.tokenize(e,n);if(e.eatWhile(/[a-zA-Z\?\+\d]/)){var i=e.current();return i.substr(i.length-1,i.length).match(/\?|\+/)!==null&&e.backUp(1),r("tag","tag")}else return l=="%"||l=="*"?r("number","number"):(e.eatWhile(/[\w\\\-_%.{,]/),r(null,null))}}function o(e,n){for(var l=0,i;(i=e.next())!=null;){if(l>=2&&i==">"){n.tokenize=t;break}l=i=="-"?l+1:0}return r("comment","comment")}function k(e){return function(n,l){for(var i=!1,c;(c=n.next())!=null;){if(c==e&&!i){l.tokenize=t;break}i=!i&&c=="\\"}return r("string","tag")}}function a(e,n){return function(l,i){for(;!l.eol();){if(l.match(n)){i.tokenize=t;break}l.next()}return e}}const f={name:"dtd",startState:function(){return{tokenize:t,baseIndent:0,stack:[]}},token:function(e,n){if(e.eatSpace())return null;var l=n.tokenize(e,n),i=n.stack[n.stack.length-1];return e.current()=="["||u==="doindent"||u=="["?n.stack.push("rule"):u==="endtag"?n.stack[n.stack.length-1]="endtag":e.current()=="]"||u=="]"||u==">"&&i=="rule"?n.stack.pop():u=="["&&n.stack.push("["),l},indent:function(e,n,l){var i=e.stack.length;return n.charAt(0)==="]"?i--:n.substr(n.length-1,n.length)===">"&&(n.substr(0,1)==="<"||u=="doindent"&&n.length>1||(u=="doindent"?i--:u==">"&&n.length>1||u=="tag"&&n!==">"||(u=="tag"&&e.stack[e.stack.length-1]=="rule"?i--:u=="tag"?i++:n===">"&&e.stack[e.stack.length-1]=="rule"&&u===">"?i--:n===">"&&e.stack[e.stack.length-1]=="rule"||(n.substr(0,1)!=="<"&&n.substr(0,1)===">"?i=i-1:n===">"||(i=i-1)))),(u==null||u=="]")&&i--),e.baseIndent+i*l.unit},languageData:{indentOnInput:/^\s*[\]>]$/}};export{f as dtd}; diff --git a/pkg/cli/webapp/dist/assets/dylan-DwRh75JA.js b/pkg/cli/webapp/dist/assets/dylan-DwRh75JA.js new file mode 100644 index 0000000..58860c5 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/dylan-DwRh75JA.js @@ -0,0 +1 @@ +function p(e,i){for(var n=0;n",symbolGlobal:"\\*"+f+"\\*",symbolConstant:"\\$"+f},w={symbolKeyword:"atom",symbolClass:"tag",symbolGlobal:"variableName.standard",symbolConstant:"variableName.constant"};for(var c in a)a.hasOwnProperty(c)&&(a[c]=new RegExp("^"+a[c]));a.keyword=[/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];var u={};u.keyword="keyword";u.definition="def";u.simpleDefinition="def";u.signalingCalls="builtin";var y={},k={};p(["keyword","definition","simpleDefinition","signalingCalls"],function(e){p(t[e],function(i){y[i]=e,k[i]=u[e]})});function d(e,i,n){return i.tokenize=n,n(e,i)}function s(e,i){var n=e.peek();if(n=="'"||n=='"')return e.next(),d(e,i,h(n,"string"));if(n=="/"){if(e.next(),e.eat("*"))return d(e,i,D);if(e.eat("/"))return e.skipToEnd(),"comment";e.backUp(1)}else if(/[+\-\d\.]/.test(n)){if(e.match(/^[+-]?[0-9]*\.[0-9]*([esdx][+-]?[0-9]+)?/i)||e.match(/^[+-]?[0-9]+([esdx][+-]?[0-9]+)/i)||e.match(/^[+-]?\d+/))return"number"}else{if(n=="#")return e.next(),n=e.peek(),n=='"'?(e.next(),d(e,i,h('"',"string"))):n=="b"?(e.next(),e.eatWhile(/[01]/),"number"):n=="x"?(e.next(),e.eatWhile(/[\da-f]/i),"number"):n=="o"?(e.next(),e.eatWhile(/[0-7]/),"number"):n=="#"?(e.next(),"punctuation"):n=="["||n=="("?(e.next(),"bracket"):e.match(/f|t|all-keys|include|key|next|rest/i)?"atom":(e.eatWhile(/[-a-zA-Z]/),"error");if(n=="~")return e.next(),n=e.peek(),n=="="?(e.next(),n=e.peek(),n=="="&&e.next(),"operator"):"operator";if(n==":"){if(e.next(),n=e.peek(),n=="=")return e.next(),"operator";if(n==":")return e.next(),"punctuation"}else{if("[](){}".indexOf(n)!=-1)return e.next(),"bracket";if(".,".indexOf(n)!=-1)return e.next(),"punctuation";if(e.match("end"))return"keyword"}}for(var l in a)if(a.hasOwnProperty(l)){var r=a[l];if(r instanceof Array&&x(r,function(o){return e.match(o)})||e.match(r))return w[l]}return/[+\-*\/^=<>&|]/.test(n)?(e.next(),"operator"):e.match("define")?"def":(e.eatWhile(/[\w\-]/),y.hasOwnProperty(e.current())?k[e.current()]:e.current().match(v)?"variable":(e.next(),"variableName.standard"))}function D(e,i){for(var n=!1,l=!1,r=0,o;o=e.next();){if(o=="/"&&n)if(r>0)r--;else{i.tokenize=s;break}else o=="*"&&l&&r++;n=o=="*",l=o=="/"}return"comment"}function h(e,i){return function(n,l){for(var r=!1,o,b=!1;(o=n.next())!=null;){if(o==e&&!r){b=!0;break}r=!r&&o=="\\"}return(b||!r)&&(l.tokenize=s),i}}const g={name:"dylan",startState:function(){return{tokenize:s,currentIndent:0}},token:function(e,i){if(e.eatSpace())return null;var n=i.tokenize(e,i);return n},languageData:{commentTokens:{block:{open:"/*",close:"*/"}}}};export{g as dylan}; diff --git a/pkg/cli/webapp/dist/assets/ebnf-CDyGwa7X.js b/pkg/cli/webapp/dist/assets/ebnf-CDyGwa7X.js new file mode 100644 index 0000000..0824acd --- /dev/null +++ b/pkg/cli/webapp/dist/assets/ebnf-CDyGwa7X.js @@ -0,0 +1 @@ +var i={slash:0,parenthesis:1},n={comment:0,_string:1,characterClass:2};const l={name:"ebnf",startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(e,c){if(e){switch(c.stack.length===0&&(e.peek()=='"'||e.peek()=="'"?(c.stringType=e.peek(),e.next(),c.stack.unshift(n._string)):e.match("/*")?(c.stack.unshift(n.comment),c.commentType=i.slash):e.match("(*")&&(c.stack.unshift(n.comment),c.commentType=i.parenthesis)),c.stack[0]){case n._string:for(;c.stack[0]===n._string&&!e.eol();)e.peek()===c.stringType?(e.next(),c.stack.shift()):e.peek()==="\\"?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return c.lhs?"property":"string";case n.comment:for(;c.stack[0]===n.comment&&!e.eol();)c.commentType===i.slash&&e.match("*/")||c.commentType===i.parenthesis&&e.match("*)")?(c.stack.shift(),c.commentType=null):e.match(/^.[^\*]*/);return"comment";case n.characterClass:for(;c.stack[0]===n.characterClass&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(".")||c.stack.shift();return"operator"}var t=e.peek();switch(t){case"[":return e.next(),c.stack.unshift(n.characterClass),"bracket";case":":case"|":case";":return e.next(),"operator";case"%":if(e.match("%%"))return"header";if(e.match(/[%][A-Za-z]+/))return"keyword";if(e.match(/[%][}]/))return"bracket";break;case"/":if(e.match(/[\/][A-Za-z]+/))return"keyword";case"\\":if(e.match(/[\][a-z]+/))return"string.special";case".":if(e.match("."))return"atom";case"*":case"-":case"+":case"^":if(e.match(t))return"atom";case"$":if(e.match("$$"))return"builtin";if(e.match(/[$][0-9]+/))return"variableName.special";case"<":if(e.match(/<<[a-zA-Z_]+>>/))return"builtin"}return e.match("//")?(e.skipToEnd(),"comment"):e.match("return")?"operator":e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)?e.match(/(?=[\(.])/)?"variable":e.match(/(?=[\s\n]*[:=])/)?"def":"variableName.special":["[","]","(",")"].indexOf(e.peek())!=-1?(e.next(),"bracket"):(e.eatSpace()||e.next(),null)}}};export{l as ebnf}; diff --git a/pkg/cli/webapp/dist/assets/ecl-Cabwm37j.js b/pkg/cli/webapp/dist/assets/ecl-Cabwm37j.js new file mode 100644 index 0000000..51f4d3a --- /dev/null +++ b/pkg/cli/webapp/dist/assets/ecl-Cabwm37j.js @@ -0,0 +1 @@ +function l(e){for(var n={},t=e.split(" "),r=0;r!?|\/]/,o;function p(e,n){var t=e.next();if(m[t]){var r=m[t](e,n);if(r!==!1)return r}if(t=='"'||t=="'")return n.tokenize=I(t),n.tokenize(e,n);if(/[\[\]{}\(\),;\:\.]/.test(t))return o=t,null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(t=="/"){if(e.eat("*"))return n.tokenize=y,y(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(h.test(t))return e.eatWhile(h),"operator";e.eatWhile(/[\w\$_]/);var i=e.current().toLowerCase();if(g.propertyIsEnumerable(i))return s.propertyIsEnumerable(i)&&(o="newstatement"),"keyword";if(w.propertyIsEnumerable(i))return s.propertyIsEnumerable(i)&&(o="newstatement"),"variable";if(x.propertyIsEnumerable(i))return s.propertyIsEnumerable(i)&&(o="newstatement"),"modifier";if(f.propertyIsEnumerable(i))return s.propertyIsEnumerable(i)&&(o="newstatement"),"type";if(k.propertyIsEnumerable(i))return s.propertyIsEnumerable(i)&&(o="newstatement"),"builtin";for(var a=i.length-1;a>=0&&(!isNaN(i[a])||i[a]=="_");)--a;if(a>0){var d=i.substr(0,a+1);if(f.propertyIsEnumerable(d))return s.propertyIsEnumerable(d)&&(o="newstatement"),"type"}return E.propertyIsEnumerable(i)?"atom":null}function I(e){return function(n,t){for(var r=!1,i,a=!1;(i=n.next())!=null;){if(i==e&&!r){a=!0;break}r=!r&&i=="\\"}return(a||!r)&&(t.tokenize=p),"string"}}function y(e,n){for(var t=!1,r;r=e.next();){if(r=="/"&&t){n.tokenize=p;break}t=r=="*"}return"comment"}function v(e,n,t,r,i){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=i}function c(e,n,t){return e.context=new v(e.indented,n,t,null,e.context)}function u(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const z={name:"ecl",startState:function(e){return{tokenize:null,context:new v(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;o=null;var r=(n.tokenize||p)(e,n);if(r=="comment"||r=="meta")return r;if(t.align==null&&(t.align=!0),(o==";"||o==":")&&t.type=="statement")u(n);else if(o=="{")c(n,e.column(),"}");else if(o=="[")c(n,e.column(),"]");else if(o=="(")c(n,e.column(),")");else if(o=="}"){for(;t.type=="statement";)t=u(n);for(t.type=="}"&&(t=u(n));t.type=="statement";)t=u(n)}else o==t.type?u(n):(t.type=="}"||t.type=="top"||t.type=="statement"&&o=="newstatement")&&c(n,e.column(),"statement");return n.startOfLine=!1,r},indent:function(e,n,t){if(e.tokenize!=p&&e.tokenize!=null)return 0;var r=e.context,i=n&&n.charAt(0);r.type=="statement"&&i=="}"&&(r=r.prev);var a=i==r.type;return r.type=="statement"?r.indented+(i=="{"?0:t.unit):r.align?r.column+(a?0:1):r.indented+(a?0:t.unit)},languageData:{indentOnInput:/^\s*[{}]$/}};export{z as ecl}; diff --git a/pkg/cli/webapp/dist/assets/eiffel-CnydiIhH.js b/pkg/cli/webapp/dist/assets/eiffel-CnydiIhH.js new file mode 100644 index 0000000..4d0273e --- /dev/null +++ b/pkg/cli/webapp/dist/assets/eiffel-CnydiIhH.js @@ -0,0 +1 @@ +function u(e){for(var r={},n=0,t=e.length;n>"]);function f(e,r,n){return n.tokenize.push(e),e(r,n)}function s(e,r){if(e.eatSpace())return null;var n=e.next();return n=='"'||n=="'"?f(p(n,"string"),e,r):n=="-"&&e.eat("-")?(e.skipToEnd(),"comment"):n==":"&&e.eat("=")?"operator":/[0-9]/.test(n)?(e.eatWhile(/[xXbBCc0-9\.]/),e.eat(/[\?\!]/),"variable"):/[a-zA-Z_0-9]/.test(n)?(e.eatWhile(/[a-zA-Z_0-9]/),e.eat(/[\?\!]/),"variable"):/[=+\-\/*^%<>~]/.test(n)?(e.eatWhile(/[=+\-\/*^%<>~]/),"operator"):null}function p(e,r,n){return function(t,o){for(var a=!1,i;(i=t.next())!=null;){if(i==e&&!a){o.tokenize.pop();break}a=!a&&i=="%"}return r}}const d={name:"eiffel",startState:function(){return{tokenize:[s]}},token:function(e,r){var n=r.tokenize[r.tokenize.length-1](e,r);if(n=="variable"){var t=e.current();n=l.propertyIsEnumerable(e.current())?"keyword":c.propertyIsEnumerable(e.current())?"operator":/^[A-Z][A-Z_0-9]*$/g.test(t)?"tag":/^0[bB][0-1]+$/g.test(t)||/^0[cC][0-7]+$/g.test(t)||/^0[xX][a-fA-F0-9]+$/g.test(t)||/^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(t)||/^[0-9]+$/g.test(t)?"number":"variable"}return n},languageData:{commentTokens:{line:"--"}}};export{d as eiffel}; diff --git a/pkg/cli/webapp/dist/assets/elm-vLlmbW-K.js b/pkg/cli/webapp/dist/assets/elm-vLlmbW-K.js new file mode 100644 index 0000000..7e57009 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/elm-vLlmbW-K.js @@ -0,0 +1 @@ +function a(n,t,i){return t(i),i(n,t)}var v=/[a-z]/,g=/[A-Z]/,l=/[a-zA-Z0-9_]/,f=/[0-9]/,o=/[0-9A-Fa-f]/,p=/[-&*+.\\/<>=?^|:]/,w=/[(),[\]{}]/,x=/[ \v\f]/;function r(){return function(n,t){if(n.eatWhile(x))return null;var i=n.next();if(w.test(i))return i==="{"&&n.eat("-")?a(n,t,h(1)):i==="["&&n.match("glsl|")?a(n,t,u):"builtin";if(i==="'")return a(n,t,d);if(i==='"')return n.eat('"')?n.eat('"')?a(n,t,k):"string":a(n,t,E);if(g.test(i))return n.eatWhile(l),"type";if(v.test(i)){var e=n.pos===1;return n.eatWhile(l),e?"def":"variable"}if(f.test(i)){if(i==="0"){if(n.eat(/[xX]/))return n.eatWhile(o),"number"}else n.eatWhile(f);return n.eat(".")&&n.eatWhile(f),n.eat(/[eE]/)&&(n.eat(/[-+]/),n.eatWhile(f)),"number"}return p.test(i)?i==="-"&&n.eat("-")?(n.skipToEnd(),"comment"):(n.eatWhile(p),"keyword"):i==="_"?"keyword":"error"}}function h(n){return n==0?r():function(t,i){for(;!t.eol();){var e=t.next();if(e=="{"&&t.eat("-"))++n;else if(e=="-"&&t.eat("}")&&(--n,n===0))return i(r()),"comment"}return i(h(n)),"comment"}}function k(n,t){for(;!n.eol();){var i=n.next();if(i==='"'&&n.eat('"')&&n.eat('"'))return t(r()),"string"}return"string"}function E(n,t){for(;n.skipTo('\\"');)n.next(),n.next();return n.skipTo('"')?(n.next(),t(r()),"string"):(n.skipToEnd(),t(r()),"error")}function d(n,t){for(;n.skipTo("\\'");)n.next(),n.next();return n.skipTo("'")?(n.next(),t(r()),"string"):(n.skipToEnd(),t(r()),"error")}function u(n,t){for(;!n.eol();){var i=n.next();if(i==="|"&&n.eat("]"))return t(r()),"string"}return"string"}var y={case:1,of:1,as:1,if:1,then:1,else:1,let:1,in:1,type:1,alias:1,module:1,where:1,import:1,exposing:1,port:1};const W={name:"elm",startState:function(){return{f:r()}},copyState:function(n){return{f:n.f}},token:function(n,t){var i=t.f(n,function(m){t.f=m}),e=n.current();return y.hasOwnProperty(e)?"keyword":i},languageData:{commentTokens:{line:"--"}}};export{W as elm}; diff --git a/pkg/cli/webapp/dist/assets/engine-oniguruma-DwXy4luw.js b/pkg/cli/webapp/dist/assets/engine-oniguruma-DwXy4luw.js new file mode 100644 index 0000000..244bcf5 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/engine-oniguruma-DwXy4luw.js @@ -0,0 +1 @@ +class B extends Error{constructor(t){super(t),this.name="ShikiError"}}function W(){return 2147483648}function H(){return typeof performance<"u"?performance.now():Date.now()}const v=(n,t)=>n+(t-n%t)%t;async function I(n){let t,r;const e={};function l(f){r=f,e.HEAPU8=new Uint8Array(f),e.HEAPU32=new Uint32Array(f)}function h(f,c,S){e.HEAPU8.copyWithin(f,c,c+S)}function o(f){try{return t.grow(f-r.byteLength+65535>>>16),l(t.buffer),1}catch{}}function s(f){const c=e.HEAPU8.length;f=f>>>0;const S=W();if(f>S)return!1;for(let A=1;A<=4;A*=2){let p=c*(1+.2/A);p=Math.min(p,f+100663296);const w=Math.min(S,v(Math.max(f,p),65536));if(o(w))return!0}return!1}const i=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function a(f,c,S=1024){const A=c+S;let p=c;for(;f[p]&&!(p>=A);)++p;if(p-c>16&&f.buffer&&i)return i.decode(f.subarray(c,p));let w="";for(;c>10,56320|E&1023)}}return w}function U(f,c){return f?a(e.HEAPU8,f,c):""}const u={emscripten_get_now:H,emscripten_memcpy_big:h,emscripten_resize_heap:s,fd_write:()=>0};async function y(){const c=await n({env:u,wasi_snapshot_preview1:u});t=c.memory,l(t.buffer),Object.assign(e,c),e.UTF8ToString=U}return await y(),e}var x=Object.defineProperty,D=(n,t,r)=>t in n?x(n,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[t]=r,d=(n,t,r)=>(D(n,typeof t!="symbol"?t+"":t,r),r);let g=null;function V(n){throw new B(n.UTF8ToString(n.getLastOnigError()))}class T{constructor(t){d(this,"utf16Length"),d(this,"utf8Length"),d(this,"utf16Value"),d(this,"utf8Value"),d(this,"utf16OffsetToUtf8"),d(this,"utf8OffsetToUtf16");const r=t.length,e=T._utf8ByteLength(t),l=e!==r,h=l?new Uint32Array(r+1):null;l&&(h[r]=e);const o=l?new Uint32Array(e+1):null;l&&(o[e]=r);const s=new Uint8Array(e);let i=0;for(let a=0;a=55296&&U<=56319&&a+1=56320&&f<=57343&&(u=(U-55296<<10)+65536|f-56320,y=!0)}l&&(h[a]=i,y&&(h[a+1]=i),u<=127?o[i+0]=a:u<=2047?(o[i+0]=a,o[i+1]=a):u<=65535?(o[i+0]=a,o[i+1]=a,o[i+2]=a):(o[i+0]=a,o[i+1]=a,o[i+2]=a,o[i+3]=a)),u<=127?s[i++]=u:u<=2047?(s[i++]=192|(u&1984)>>>6,s[i++]=128|(u&63)>>>0):u<=65535?(s[i++]=224|(u&61440)>>>12,s[i++]=128|(u&4032)>>>6,s[i++]=128|(u&63)>>>0):(s[i++]=240|(u&1835008)>>>18,s[i++]=128|(u&258048)>>>12,s[i++]=128|(u&4032)>>>6,s[i++]=128|(u&63)>>>0),y&&a++}this.utf16Length=r,this.utf8Length=e,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=h,this.utf8OffsetToUtf16=o}static _utf8ByteLength(t){let r=0;for(let e=0,l=t.length;e=55296&&h<=56319&&e+1=56320&&i<=57343&&(o=(h-55296<<10)+65536|i-56320,s=!0)}o<=127?r+=1:o<=2047?r+=2:o<=65535?r+=3:r+=4,s&&e++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const _=class{constructor(n){if(d(this,"id",++_.LAST_ID),d(this,"_onigBinding"),d(this,"content"),d(this,"utf16Length"),d(this,"utf8Length"),d(this,"utf16OffsetToUtf8"),d(this,"utf8OffsetToUtf16"),d(this,"ptr"),!g)throw new B("Must invoke loadWasm first.");this._onigBinding=g,this.content=n;const t=new T(n);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!_._sharedPtrInUse?(_._sharedPtr||(_._sharedPtr=g.omalloc(1e4)),_._sharedPtrInUse=!0,g.HEAPU8.set(t.utf8Value,_._sharedPtr),this.ptr=_._sharedPtr):this.ptr=t.createString(g)}convertUtf8OffsetToUtf16(n){return this.utf8OffsetToUtf16?n<0?0:n>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[n]:n}convertUtf16OffsetToUtf8(n){return this.utf16OffsetToUtf8?n<0?0:n>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[n]:n}dispose(){this.ptr===_._sharedPtr?_._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let L=_;d(L,"LAST_ID",0);d(L,"_sharedPtr",0);d(L,"_sharedPtrInUse",!1);class N{constructor(t){if(d(this,"_onigBinding"),d(this,"_ptr"),!g)throw new B("Must invoke loadWasm first.");const r=[],e=[];for(let s=0,i=t.length;s{let e=n;return e=await e,typeof e=="function"&&(e=await e(r)),typeof e=="function"&&(e=await e(r)),F(e)?e=await e.instantiator(r):R(e)?e=await e.default(r):(k(e)&&(e=e.data),j(e)?typeof WebAssembly.instantiateStreaming=="function"?e=await J(e)(r):e=await K(e)(r):z(e)?e=await O(e)(r):e instanceof WebAssembly.Module?e=await O(e)(r):"default"in e&&e.default instanceof WebAssembly.Module&&(e=await O(e.default)(r))),"instance"in e&&(e=e.instance),"exports"in e&&(e=e.exports),e})}return P=t(),P}function O(n){return t=>WebAssembly.instantiate(n,t)}function J(n){return t=>WebAssembly.instantiateStreaming(n,t)}function K(n){return async t=>{const r=await n.arrayBuffer();return WebAssembly.instantiate(r,t)}}let M;function X(n){M=n}function Y(){return M}async function Q(n){return n&&await G(n),{createScanner(t){return new N(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new L(t)}}}async function Z(n){return Q(n)}export{Q as createOnigurumaEngine,Z as createWasmOnigEngine,Y as getDefaultWasmLoader,G as loadWasm,X as setDefaultWasmLoader}; diff --git a/pkg/cli/webapp/dist/assets/erlang-BNw1qcRV.js b/pkg/cli/webapp/dist/assets/erlang-BNw1qcRV.js new file mode 100644 index 0000000..d59e853 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/erlang-BNw1qcRV.js @@ -0,0 +1 @@ +var S=["-type","-spec","-export_type","-opaque"],x=["after","begin","catch","case","cond","end","fun","if","let","of","query","receive","try","when"],z=/[\->,;]/,E=["->",";",","],T=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],R=/[\+\-\*\/<>=\|:!]/,A=["=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"],U=/[<\(\[\{]/,b=["<<","(","[","{"],Z=/[>\)\]\}]/,y=["}","]",")",">>"],m=["is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_record","is_reference","is_tuple","atom","binary","bitstring","boolean","function","integer","list","number","pid","port","record","reference","tuple"],P=["abs","adler32","adler32_combine","alive","apply","atom_to_binary","atom_to_list","binary_to_atom","binary_to_existing_atom","binary_to_list","binary_to_term","bit_size","bitstring_to_list","byte_size","check_process_code","contact_binary","crc32","crc32_combine","date","decode_packet","delete_module","disconnect_node","element","erase","exit","float","float_to_list","garbage_collect","get","get_keys","group_leader","halt","hd","integer_to_list","internal_bif","iolist_size","iolist_to_binary","is_alive","is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_process_alive","is_record","is_reference","is_tuple","length","link","list_to_atom","list_to_binary","list_to_bitstring","list_to_existing_atom","list_to_float","list_to_integer","list_to_pid","list_to_tuple","load_module","make_ref","module_loaded","monitor_node","node","node_link","node_unlink","nodes","notalive","now","open_port","pid_to_list","port_close","port_command","port_connect","port_control","pre_loaded","process_flag","process_info","processes","purge_module","put","register","registered","round","self","setelement","size","spawn","spawn_link","spawn_monitor","spawn_opt","split_binary","statistics","term_to_binary","time","throw","tl","trunc","tuple_size","tuple_to_list","unlink","unregister","whereis"],p=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,q=/[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;function j(e,n){if(n.in_string)return n.in_string=!v(e),t(n,e,"string");if(n.in_atom)return n.in_atom=!h(e),t(n,e,"atom");if(e.eatSpace())return t(n,e,"whitespace");if(!_(n)&&e.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))return u(e.current(),S)?t(n,e,"type"):t(n,e,"attribute");var r=e.next();if(r=="%")return e.skipToEnd(),t(n,e,"comment");if(r==":")return t(n,e,"colon");if(r=="?")return e.eatSpace(),e.eatWhile(p),t(n,e,"macro");if(r=="#")return e.eatSpace(),e.eatWhile(p),t(n,e,"record");if(r=="$")return e.next()=="\\"&&!e.match(q)?t(n,e,"error"):t(n,e,"number");if(r==".")return t(n,e,"dot");if(r=="'"){if(!(n.in_atom=!h(e))){if(e.match(/\s*\/\s*[0-9]/,!1))return e.match(/\s*\/\s*[0-9]/,!0),t(n,e,"fun");if(e.match(/\s*\(/,!1)||e.match(/\s*:/,!1))return t(n,e,"function")}return t(n,e,"atom")}if(r=='"')return n.in_string=!v(e),t(n,e,"string");if(/[A-Z_Ø-ÞÀ-Ö]/.test(r))return e.eatWhile(p),t(n,e,"variable");if(/[a-z_ß-öø-ÿ]/.test(r)){if(e.eatWhile(p),e.match(/\s*\/\s*[0-9]/,!1))return e.match(/\s*\/\s*[0-9]/,!0),t(n,e,"fun");var i=e.current();return u(i,x)?t(n,e,"keyword"):u(i,T)?t(n,e,"operator"):e.match(/\s*\(/,!1)?u(i,P)&&(_(n).token!=":"||_(n,2).token=="erlang")?t(n,e,"builtin"):u(i,m)?t(n,e,"guard"):t(n,e,"function"):Q(e)==":"?i=="erlang"?t(n,e,"builtin"):t(n,e,"function"):u(i,["true","false"])?t(n,e,"boolean"):t(n,e,"atom")}var l=/[0-9]/,o=/[0-9a-zA-Z]/;return l.test(r)?(e.eatWhile(l),e.eat("#")?e.eatWhile(o)||e.backUp(1):e.eat(".")&&(e.eatWhile(l)?e.eat(/[eE]/)&&(e.eat(/[-+]/)?e.eatWhile(l)||e.backUp(2):e.eatWhile(l)||e.backUp(1)):e.backUp(1)),t(n,e,"number")):g(e,U,b)?t(n,e,"open_paren"):g(e,Z,y)?t(n,e,"close_paren"):k(e,z,E)?t(n,e,"separator"):k(e,R,A)?t(n,e,"operator"):t(n,e,null)}function g(e,n,r){if(e.current().length==1&&n.test(e.current())){for(e.backUp(1);n.test(e.peek());)if(e.next(),u(e.current(),r))return!0;e.backUp(e.current().length-1)}return!1}function k(e,n,r){if(e.current().length==1&&n.test(e.current())){for(;n.test(e.peek());)e.next();for(;01&&e[n].type==="fun"&&e[n-1].token==="fun")return e.slice(0,n-1);switch(e[n].token){case"}":return a(e,{g:["{"]});case"]":return a(e,{i:["["]});case")":return a(e,{i:["("]});case">>":return a(e,{i:["<<"]});case"end":return a(e,{i:["begin","case","fun","if","receive","try"]});case",":return a(e,{e:["begin","try","when","->",",","(","[","{","<<"]});case"->":return a(e,{r:["when"],m:["try","if","case","receive"]});case";":return a(e,{E:["case","fun","if","receive","try","when"]});case"catch":return a(e,{e:["try"]});case"of":return a(e,{e:["case"]});case"after":return a(e,{e:["receive","try"]});default:return e}}function a(e,n){for(var r in n)for(var i=e.length-1,l=n[r],o=i-1;-1"?u(c.token,["receive","case","if","try"])?c.column+r.unit+r.unit:c.column+r.unit:u(o.token,b)?o.column+o.token.length:(i=G(e),f(i)?i.column+r.unit:0):0}function C(e){var n=e.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);return f(n)&&n.index===0?n[0]:""}function F(e){var n=e.tokenStack.slice(0,-1),r=d(n,"type",["open_paren"]);return f(n[r])?n[r]:!1}function G(e){var n=e.tokenStack,r=d(n,"type",["open_paren","separator","keyword"]),i=d(n,"type",["operator"]);return f(r)&&f(i)&&r|\.\*\?]+(?=\s|$)/,token:"builtin"},{regex:/[\)><]+\S+(?=\s|$)/,token:"builtin"},{regex:/(?:[\+\-\=\/\*<>])(?=\s|$)/,token:"keyword"},{regex:/\S+/,token:"variable"},{regex:/\s+|./,token:null}],vocabulary:[{regex:/;/,token:"keyword",next:"start"},{regex:/\S+/,token:"tag"},{regex:/\s+|./,token:null}],string:[{regex:/(?:[^\\]|\\.)*?"/,token:"string",next:"start"},{regex:/.*/,token:"string"}],string2:[{regex:/^;/,token:"keyword",next:"start"},{regex:/.*/,token:"string"}],string3:[{regex:/(?:[^\\]|\\.)*?"""/,token:"string",next:"start"},{regex:/.*/,token:"string"}],stack:[{regex:/\)/,token:"bracket",next:"start"},{regex:/--/,token:"bracket"},{regex:/\S+/,token:"meta"},{regex:/\s+|./,token:null}],languageData:{name:"factor",dontIndentStates:["start","vocabulary","string","string3","stack"],commentTokens:{line:"!"}}});export{n as factor}; diff --git a/pkg/cli/webapp/dist/assets/fcl-Kvtd6kyn.js b/pkg/cli/webapp/dist/assets/fcl-Kvtd6kyn.js new file mode 100644 index 0000000..45c8ec3 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/fcl-Kvtd6kyn.js @@ -0,0 +1 @@ +var d={term:!0,method:!0,accu:!0,rule:!0,then:!0,is:!0,and:!0,or:!0,if:!0,default:!0},f={var_input:!0,var_output:!0,fuzzify:!0,defuzzify:!0,function_block:!0,ruleblock:!0},o={end_ruleblock:!0,end_defuzzify:!0,end_function_block:!0,end_fuzzify:!0,end_var:!0},p={true:!0,false:!0,nan:!0,real:!0,min:!0,max:!0,cog:!0,cogs:!0},l=/[+\-*&^%:=<>!|\/]/;function i(e,n){var t=e.next();if(/[\d\.]/.test(t))return t=="."?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):t=="0"?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(t=="/"||t=="("){if(e.eat("*"))return n.tokenize=c,c(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(l.test(t))return e.eatWhile(l),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current().toLowerCase();return d.propertyIsEnumerable(r)||f.propertyIsEnumerable(r)||o.propertyIsEnumerable(r)?"keyword":p.propertyIsEnumerable(r)?"atom":"variable"}function c(e,n){for(var t=!1,r;r=e.next();){if((r=="/"||r==")")&&t){n.tokenize=i;break}t=r=="*"}return"comment"}function a(e,n,t,r,u){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=u}function k(e,n,t){return e.context=new a(e.indented,n,t,null,e.context)}function v(e){if(e.context.prev){var n=e.context.type;return n=="end_block"&&(e.indented=e.context.indented),e.context=e.context.prev}}const x={name:"fcl",startState:function(e){return{tokenize:null,context:new a(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;var r=(n.tokenize||i)(e,n);if(r=="comment")return r;t.align==null&&(t.align=!0);var u=e.current().toLowerCase();return f.propertyIsEnumerable(u)?k(n,e.column(),"end_block"):o.propertyIsEnumerable(u)&&v(n),n.startOfLine=!1,r},indent:function(e,n,t){if(e.tokenize!=i&&e.tokenize!=null)return 0;var r=e.context,u=o.propertyIsEnumerable(n);return r.align?r.column+(u?0:1):r.indented+(u?0:t.unit)},languageData:{commentTokens:{line:"//",block:{open:"(*",close:"*)"}}}};export{x as fcl}; diff --git a/pkg/cli/webapp/dist/assets/forth-Ffai-XNe.js b/pkg/cli/webapp/dist/assets/forth-Ffai-XNe.js new file mode 100644 index 0000000..a7a0bd6 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/forth-Ffai-XNe.js @@ -0,0 +1 @@ +function t(i){var n=[];return i.split(" ").forEach(function(E){n.push({name:E})}),n}var r=t("INVERT AND OR XOR 2* 2/ LSHIFT RSHIFT 0= = 0< < > U< MIN MAX 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP >R R> R@ + - 1+ 1- ABS NEGATE S>D * M* UM* FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT CHAR [CHAR] [ ] BL FIND EXECUTE IMMEDIATE COUNT LITERAL STATE ; DOES> >BODY EVALUATE SOURCE >IN <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL FILL MOVE . CR EMIT SPACE SPACES TYPE U. .R U.R ACCEPT TRUE FALSE <> U> 0<> 0> NIP TUCK ROLL PICK 2>R 2R@ 2R> WITHIN UNUSED MARKER I J TO COMPILE, [COMPILE] SAVE-INPUT RESTORE-INPUT PAD ERASE 2LITERAL DNEGATE D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS M+ M*/ D. D.R 2ROT DU< CATCH THROW FREE RESIZE ALLOCATE CS-PICK CS-ROLL GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL"),O=t("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");function R(i,n){var E;for(E=i.length-1;E>=0;E--)if(i[E].name===n.toUpperCase())return i[E]}const L={name:"forth",startState:function(){return{state:"",base:10,coreWordList:r,immediateWordList:O,wordList:[]}},token:function(i,n){var E;if(i.eatSpace())return null;if(n.state===""){if(i.match(/^(\]|:NONAME)(\s|$)/i))return n.state=" compilation","builtin";if(E=i.match(/^(\:)\s+(\S+)(\s|$)+/),E)return n.wordList.push({name:E[2].toUpperCase()}),n.state=" compilation","def";if(E=i.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i),E)return n.wordList.push({name:E[2].toUpperCase()}),"def";if(E=i.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/),E)return"builtin"}else{if(i.match(/^(\;|\[)(\s)/))return n.state="",i.backUp(1),"builtin";if(i.match(/^(\;|\[)($)/))return n.state="","builtin";if(i.match(/^(POSTPONE)\s+\S+(\s|$)+/))return"builtin"}if(E=i.match(/^(\S+)(\s+|$)/),E)return R(n.wordList,E[1])!==void 0?"variable":E[1]==="\\"?(i.skipToEnd(),"comment"):R(n.coreWordList,E[1])!==void 0?"builtin":R(n.immediateWordList,E[1])!==void 0?"keyword":E[1]==="("?(i.eatWhile(function(e){return e!==")"}),i.eat(")"),"comment"):E[1]===".("?(i.eatWhile(function(e){return e!==")"}),i.eat(")"),"string"):E[1]==='S"'||E[1]==='."'||E[1]==='C"'?(i.eatWhile(function(e){return e!=='"'}),i.eat('"'),"string"):E[1]-68719476735?"number":"atom"}};export{L as forth}; diff --git a/pkg/cli/webapp/dist/assets/fortran-DYz_wnZ1.js b/pkg/cli/webapp/dist/assets/fortran-DYz_wnZ1.js new file mode 100644 index 0000000..ef7d705 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/fortran-DYz_wnZ1.js @@ -0,0 +1 @@ +function r(t){for(var n={},e=0;e\/\:]/,_=/^\.(and|or|eq|lt|le|gt|ge|ne|not|eqv|neqv)\./i;function u(t,n){if(t.match(_))return"operator";var e=t.next();if(e=="!")return t.skipToEnd(),"comment";if(e=='"'||e=="'")return n.tokenize=m(e),n.tokenize(t,n);if(/[\[\]\(\),]/.test(e))return null;if(/\d/.test(e))return t.eatWhile(/[\w\.]/),"number";if(c.test(e))return t.eatWhile(c),"operator";t.eatWhile(/[\w\$_]/);var i=t.current().toLowerCase();return l.hasOwnProperty(i)?"keyword":s.hasOwnProperty(i)||d.hasOwnProperty(i)?"builtin":"variable"}function m(t){return function(n,e){for(var i=!1,a,o=!1;(a=n.next())!=null;){if(a==t&&!i){o=!0;break}i=!i&&a=="\\"}return(o||!i)&&(e.tokenize=null),"string"}}const p={name:"fortran",startState:function(){return{tokenize:null}},token:function(t,n){if(t.eatSpace())return null;var e=(n.tokenize||u)(t,n);return e=="comment"||e=="meta",e}};export{p as fortran}; diff --git a/pkg/cli/webapp/dist/assets/gas-Bneqetm1.js b/pkg/cli/webapp/dist/assets/gas-Bneqetm1.js new file mode 100644 index 0000000..d9ffcb7 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/gas-Bneqetm1.js @@ -0,0 +1 @@ +function v(r){var u=[],b="",o={".abort":"builtin",".align":"builtin",".altmacro":"builtin",".ascii":"builtin",".asciz":"builtin",".balign":"builtin",".balignw":"builtin",".balignl":"builtin",".bundle_align_mode":"builtin",".bundle_lock":"builtin",".bundle_unlock":"builtin",".byte":"builtin",".cfi_startproc":"builtin",".comm":"builtin",".data":"builtin",".def":"builtin",".desc":"builtin",".dim":"builtin",".double":"builtin",".eject":"builtin",".else":"builtin",".elseif":"builtin",".end":"builtin",".endef":"builtin",".endfunc":"builtin",".endif":"builtin",".equ":"builtin",".equiv":"builtin",".eqv":"builtin",".err":"builtin",".error":"builtin",".exitm":"builtin",".extern":"builtin",".fail":"builtin",".file":"builtin",".fill":"builtin",".float":"builtin",".func":"builtin",".global":"builtin",".gnu_attribute":"builtin",".hidden":"builtin",".hword":"builtin",".ident":"builtin",".if":"builtin",".incbin":"builtin",".include":"builtin",".int":"builtin",".internal":"builtin",".irp":"builtin",".irpc":"builtin",".lcomm":"builtin",".lflags":"builtin",".line":"builtin",".linkonce":"builtin",".list":"builtin",".ln":"builtin",".loc":"builtin",".loc_mark_labels":"builtin",".local":"builtin",".long":"builtin",".macro":"builtin",".mri":"builtin",".noaltmacro":"builtin",".nolist":"builtin",".octa":"builtin",".offset":"builtin",".org":"builtin",".p2align":"builtin",".popsection":"builtin",".previous":"builtin",".print":"builtin",".protected":"builtin",".psize":"builtin",".purgem":"builtin",".pushsection":"builtin",".quad":"builtin",".reloc":"builtin",".rept":"builtin",".sbttl":"builtin",".scl":"builtin",".section":"builtin",".set":"builtin",".short":"builtin",".single":"builtin",".size":"builtin",".skip":"builtin",".sleb128":"builtin",".space":"builtin",".stab":"builtin",".string":"builtin",".struct":"builtin",".subsection":"builtin",".symver":"builtin",".tag":"builtin",".text":"builtin",".title":"builtin",".type":"builtin",".uleb128":"builtin",".val":"builtin",".version":"builtin",".vtable_entry":"builtin",".vtable_inherit":"builtin",".warning":"builtin",".weak":"builtin",".weakref":"builtin",".word":"builtin"},i={};function p(){b="#",i.al="variable",i.ah="variable",i.ax="variable",i.eax="variableName.special",i.rax="variableName.special",i.bl="variable",i.bh="variable",i.bx="variable",i.ebx="variableName.special",i.rbx="variableName.special",i.cl="variable",i.ch="variable",i.cx="variable",i.ecx="variableName.special",i.rcx="variableName.special",i.dl="variable",i.dh="variable",i.dx="variable",i.edx="variableName.special",i.rdx="variableName.special",i.si="variable",i.esi="variableName.special",i.rsi="variableName.special",i.di="variable",i.edi="variableName.special",i.rdi="variableName.special",i.sp="variable",i.esp="variableName.special",i.rsp="variableName.special",i.bp="variable",i.ebp="variableName.special",i.rbp="variableName.special",i.ip="variable",i.eip="variableName.special",i.rip="variableName.special",i.cs="keyword",i.ds="keyword",i.ss="keyword",i.es="keyword",i.fs="keyword",i.gs="keyword"}function f(){b="@",o.syntax="builtin",i.r0="variable",i.r1="variable",i.r2="variable",i.r3="variable",i.r4="variable",i.r5="variable",i.r6="variable",i.r7="variable",i.r8="variable",i.r9="variable",i.r10="variable",i.r11="variable",i.r12="variable",i.sp="variableName.special",i.lr="variableName.special",i.pc="variableName.special",i.r13=i.sp,i.r14=i.lr,i.r15=i.pc,u.push(function(l,n){if(l==="#")return n.eatWhile(/\w/),"number"})}r==="x86"?p():(r==="arm"||r==="armv6")&&f();function d(l,n){for(var e=!1,a;(a=l.next())!=null;){if(a===n&&!e)return!1;e=!e&&a==="\\"}return e}function s(l,n){for(var e=!1,a;(a=l.next())!=null;){if(a==="/"&&e){n.tokenize=null;break}e=a==="*"}return"comment"}return{name:"gas",startState:function(){return{tokenize:null}},token:function(l,n){if(n.tokenize)return n.tokenize(l,n);if(l.eatSpace())return null;var e,a,t=l.next();if(t==="/"&&l.eat("*"))return n.tokenize=s,s(l,n);if(t===b)return l.skipToEnd(),"comment";if(t==='"')return d(l,'"'),"string";if(t===".")return l.eatWhile(/\w/),a=l.current().toLowerCase(),e=o[a],e||null;if(t==="=")return l.eatWhile(/\w/),"tag";if(t==="{"||t==="}")return"bracket";if(/\d/.test(t))return t==="0"&&l.eat("x")?(l.eatWhile(/[0-9a-fA-F]/),"number"):(l.eatWhile(/\d/),"number");if(/\w/.test(t))return l.eatWhile(/\w/),l.eat(":")?"tag":(a=l.current().toLowerCase(),e=i[a],e||null);for(var c=0;c]*>?/)?"variable":(n.next(),n.eatWhile(/[^@"<#]/),null)}};export{a as gherkin}; diff --git a/pkg/cli/webapp/dist/assets/github-dark-DHJKELXO.js b/pkg/cli/webapp/dist/assets/github-dark-DHJKELXO.js new file mode 100644 index 0000000..6fa9d42 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/github-dark-DHJKELXO.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#24292e","activityBar.border":"#1b1f23","activityBar.foreground":"#e1e4e8","activityBar.inactiveForeground":"#6a737d","activityBarBadge.background":"#0366d6","activityBarBadge.foreground":"#fff","badge.background":"#044289","badge.foreground":"#c8e1ff","breadcrumb.activeSelectionForeground":"#d1d5da","breadcrumb.focusForeground":"#e1e4e8","breadcrumb.foreground":"#959da5","breadcrumbPicker.background":"#2b3036","button.background":"#176f2c","button.foreground":"#dcffe4","button.hoverBackground":"#22863a","button.secondaryBackground":"#444d56","button.secondaryForeground":"#fff","button.secondaryHoverBackground":"#586069","checkbox.background":"#444d56","checkbox.border":"#1b1f23","debugToolBar.background":"#2b3036","descriptionForeground":"#959da5","diffEditor.insertedTextBackground":"#28a74530","diffEditor.removedTextBackground":"#d73a4930","dropdown.background":"#2f363d","dropdown.border":"#1b1f23","dropdown.foreground":"#e1e4e8","dropdown.listBackground":"#24292e","editor.background":"#24292e","editor.findMatchBackground":"#ffd33d44","editor.findMatchHighlightBackground":"#ffd33d22","editor.focusedStackFrameHighlightBackground":"#2b6a3033","editor.foldBackground":"#58606915","editor.foreground":"#e1e4e8","editor.inactiveSelectionBackground":"#3392FF22","editor.lineHighlightBackground":"#2b3036","editor.linkedEditingBackground":"#3392FF22","editor.selectionBackground":"#3392FF44","editor.selectionHighlightBackground":"#17E5E633","editor.selectionHighlightBorder":"#17E5E600","editor.stackFrameHighlightBackground":"#C6902625","editor.wordHighlightBackground":"#17E5E600","editor.wordHighlightBorder":"#17E5E699","editor.wordHighlightStrongBackground":"#17E5E600","editor.wordHighlightStrongBorder":"#17E5E666","editorBracketHighlight.foreground1":"#79b8ff","editorBracketHighlight.foreground2":"#ffab70","editorBracketHighlight.foreground3":"#b392f0","editorBracketHighlight.foreground4":"#79b8ff","editorBracketHighlight.foreground5":"#ffab70","editorBracketHighlight.foreground6":"#b392f0","editorBracketMatch.background":"#17E5E650","editorBracketMatch.border":"#17E5E600","editorCursor.foreground":"#c8e1ff","editorError.foreground":"#f97583","editorGroup.border":"#1b1f23","editorGroupHeader.tabsBackground":"#1f2428","editorGroupHeader.tabsBorder":"#1b1f23","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#ea4a5a","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#444d56","editorIndentGuide.background":"#2f363d","editorLineNumber.activeForeground":"#e1e4e8","editorLineNumber.foreground":"#444d56","editorOverviewRuler.border":"#1b1f23","editorWarning.foreground":"#ffea7f","editorWhitespace.foreground":"#444d56","editorWidget.background":"#1f2428","errorForeground":"#f97583","focusBorder":"#005cc5","foreground":"#d1d5da","gitDecoration.addedResourceForeground":"#34d058","gitDecoration.conflictingResourceForeground":"#ffab70","gitDecoration.deletedResourceForeground":"#ea4a5a","gitDecoration.ignoredResourceForeground":"#6a737d","gitDecoration.modifiedResourceForeground":"#79b8ff","gitDecoration.submoduleResourceForeground":"#6a737d","gitDecoration.untrackedResourceForeground":"#34d058","input.background":"#2f363d","input.border":"#1b1f23","input.foreground":"#e1e4e8","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#39414a","list.activeSelectionForeground":"#e1e4e8","list.focusBackground":"#044289","list.hoverBackground":"#282e34","list.hoverForeground":"#e1e4e8","list.inactiveFocusBackground":"#1d2d3e","list.inactiveSelectionBackground":"#282e34","list.inactiveSelectionForeground":"#e1e4e8","notificationCenterHeader.background":"#24292e","notificationCenterHeader.foreground":"#959da5","notifications.background":"#2f363d","notifications.border":"#1b1f23","notifications.foreground":"#e1e4e8","notificationsErrorIcon.foreground":"#ea4a5a","notificationsInfoIcon.foreground":"#79b8ff","notificationsWarningIcon.foreground":"#ffab70","panel.background":"#1f2428","panel.border":"#1b1f23","panelInput.border":"#2f363d","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#e1e4e8","panelTitle.inactiveForeground":"#959da5","peekViewEditor.background":"#1f242888","peekViewEditor.matchHighlightBackground":"#ffd33d33","peekViewResult.background":"#1f2428","peekViewResult.matchHighlightBackground":"#ffd33d33","pickerGroup.border":"#444d56","pickerGroup.foreground":"#e1e4e8","progressBar.background":"#0366d6","quickInput.background":"#24292e","quickInput.foreground":"#e1e4e8","scrollbar.shadow":"#0008","scrollbarSlider.activeBackground":"#6a737d88","scrollbarSlider.background":"#6a737d33","scrollbarSlider.hoverBackground":"#6a737d44","settings.headerForeground":"#e1e4e8","settings.modifiedItemIndicator":"#0366d6","sideBar.background":"#1f2428","sideBar.border":"#1b1f23","sideBar.foreground":"#d1d5da","sideBarSectionHeader.background":"#1f2428","sideBarSectionHeader.border":"#1b1f23","sideBarSectionHeader.foreground":"#e1e4e8","sideBarTitle.foreground":"#e1e4e8","statusBar.background":"#24292e","statusBar.border":"#1b1f23","statusBar.debuggingBackground":"#931c06","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#d1d5da","statusBar.noFolderBackground":"#24292e","statusBarItem.prominentBackground":"#282e34","statusBarItem.remoteBackground":"#24292e","statusBarItem.remoteForeground":"#d1d5da","tab.activeBackground":"#24292e","tab.activeBorder":"#24292e","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#e1e4e8","tab.border":"#1b1f23","tab.hoverBackground":"#24292e","tab.inactiveBackground":"#1f2428","tab.inactiveForeground":"#959da5","tab.unfocusedActiveBorder":"#24292e","tab.unfocusedActiveBorderTop":"#1b1f23","tab.unfocusedHoverBackground":"#24292e","terminal.ansiBlack":"#586069","terminal.ansiBlue":"#2188ff","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#79b8ff","terminal.ansiBrightCyan":"#56d4dd","terminal.ansiBrightGreen":"#85e89d","terminal.ansiBrightMagenta":"#b392f0","terminal.ansiBrightRed":"#f97583","terminal.ansiBrightWhite":"#fafbfc","terminal.ansiBrightYellow":"#ffea7f","terminal.ansiCyan":"#39c5cf","terminal.ansiGreen":"#34d058","terminal.ansiMagenta":"#b392f0","terminal.ansiRed":"#ea4a5a","terminal.ansiWhite":"#d1d5da","terminal.ansiYellow":"#ffea7f","terminal.foreground":"#d1d5da","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#586069","terminalCursor.foreground":"#79b8ff","textBlockQuote.background":"#24292e","textBlockQuote.border":"#444d56","textCodeBlock.background":"#2f363d","textLink.activeForeground":"#c8e1ff","textLink.foreground":"#79b8ff","textPreformat.foreground":"#d1d5da","textSeparator.foreground":"#586069","titleBar.activeBackground":"#24292e","titleBar.activeForeground":"#e1e4e8","titleBar.border":"#1b1f23","titleBar.inactiveBackground":"#1f2428","titleBar.inactiveForeground":"#959da5","tree.indentGuidesStroke":"#2f363d","welcomePage.buttonBackground":"#2f363d","welcomePage.buttonHoverBackground":"#444d56"},"displayName":"GitHub Dark","name":"github-dark","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#79b8ff"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#b392f0"}},{"scope":"variable.parameter.function","settings":{"foreground":"#e1e4e8"}},{"scope":"entity.name.tag","settings":{"foreground":"#85e89d"}},{"scope":"keyword","settings":{"foreground":"#f97583"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#f97583"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#e1e4e8"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#9ecbff"}},{"scope":"support","settings":{"foreground":"#79b8ff"}},{"scope":"meta.property-name","settings":{"foreground":"#79b8ff"}},{"scope":"variable","settings":{"foreground":"#ffab70"}},{"scope":"variable.other","settings":{"foreground":"#e1e4e8"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"carriage-return","settings":{"background":"#f97583","content":"^M","fontStyle":"italic underline","foreground":"#24292e"}},{"scope":"message.error","settings":{"foreground":"#fdaeb7"}},{"scope":"string variable","settings":{"foreground":"#79b8ff"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#dbedff"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#dbedff"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#85e89d"}},{"scope":"support.constant","settings":{"foreground":"#79b8ff"}},{"scope":"support.variable","settings":{"foreground":"#79b8ff"}},{"scope":"meta.module-reference","settings":{"foreground":"#79b8ff"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#ffab70"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"markup.quote","settings":{"foreground":"#85e89d"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#e1e4e8"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#e1e4e8"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#79b8ff"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#86181d","foreground":"#fdaeb7"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#144620","foreground":"#85e89d"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#c24e00","foreground":"#ffab70"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#79b8ff","foreground":"#2f363d"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#b392f0"}},{"scope":"meta.diff.header","settings":{"foreground":"#79b8ff"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"meta.output","settings":{"foreground":"#79b8ff"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#d1d5da"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#fdaeb7"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#dbedff"}}],"type":"dark"}'));export{e as default}; diff --git a/pkg/cli/webapp/dist/assets/github-light-DAi9KRSo.js b/pkg/cli/webapp/dist/assets/github-light-DAi9KRSo.js new file mode 100644 index 0000000..28362e1 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/github-light-DAi9KRSo.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#fff","activityBar.border":"#e1e4e8","activityBar.foreground":"#2f363d","activityBar.inactiveForeground":"#959da5","activityBarBadge.background":"#2188ff","activityBarBadge.foreground":"#fff","badge.background":"#dbedff","badge.foreground":"#005cc5","breadcrumb.activeSelectionForeground":"#586069","breadcrumb.focusForeground":"#2f363d","breadcrumb.foreground":"#6a737d","breadcrumbPicker.background":"#fafbfc","button.background":"#159739","button.foreground":"#fff","button.hoverBackground":"#138934","button.secondaryBackground":"#e1e4e8","button.secondaryForeground":"#1b1f23","button.secondaryHoverBackground":"#d1d5da","checkbox.background":"#fafbfc","checkbox.border":"#d1d5da","debugToolBar.background":"#fff","descriptionForeground":"#6a737d","diffEditor.insertedTextBackground":"#34d05822","diffEditor.removedTextBackground":"#d73a4922","dropdown.background":"#fafbfc","dropdown.border":"#e1e4e8","dropdown.foreground":"#2f363d","dropdown.listBackground":"#fff","editor.background":"#fff","editor.findMatchBackground":"#ffdf5d","editor.findMatchHighlightBackground":"#ffdf5d66","editor.focusedStackFrameHighlightBackground":"#28a74525","editor.foldBackground":"#d1d5da11","editor.foreground":"#24292e","editor.inactiveSelectionBackground":"#0366d611","editor.lineHighlightBackground":"#f6f8fa","editor.linkedEditingBackground":"#0366d611","editor.selectionBackground":"#0366d625","editor.selectionHighlightBackground":"#34d05840","editor.selectionHighlightBorder":"#34d05800","editor.stackFrameHighlightBackground":"#ffd33d33","editor.wordHighlightBackground":"#34d05800","editor.wordHighlightBorder":"#24943e99","editor.wordHighlightStrongBackground":"#34d05800","editor.wordHighlightStrongBorder":"#24943e50","editorBracketHighlight.foreground1":"#005cc5","editorBracketHighlight.foreground2":"#e36209","editorBracketHighlight.foreground3":"#5a32a3","editorBracketHighlight.foreground4":"#005cc5","editorBracketHighlight.foreground5":"#e36209","editorBracketHighlight.foreground6":"#5a32a3","editorBracketMatch.background":"#34d05840","editorBracketMatch.border":"#34d05800","editorCursor.foreground":"#044289","editorError.foreground":"#cb2431","editorGroup.border":"#e1e4e8","editorGroupHeader.tabsBackground":"#f6f8fa","editorGroupHeader.tabsBorder":"#e1e4e8","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#d73a49","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#d7dbe0","editorIndentGuide.background":"#eff2f6","editorLineNumber.activeForeground":"#24292e","editorLineNumber.foreground":"#1b1f234d","editorOverviewRuler.border":"#fff","editorWarning.foreground":"#f9c513","editorWhitespace.foreground":"#d1d5da","editorWidget.background":"#f6f8fa","errorForeground":"#cb2431","focusBorder":"#2188ff","foreground":"#444d56","gitDecoration.addedResourceForeground":"#28a745","gitDecoration.conflictingResourceForeground":"#e36209","gitDecoration.deletedResourceForeground":"#d73a49","gitDecoration.ignoredResourceForeground":"#959da5","gitDecoration.modifiedResourceForeground":"#005cc5","gitDecoration.submoduleResourceForeground":"#959da5","gitDecoration.untrackedResourceForeground":"#28a745","input.background":"#fafbfc","input.border":"#e1e4e8","input.foreground":"#2f363d","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#e2e5e9","list.activeSelectionForeground":"#2f363d","list.focusBackground":"#cce5ff","list.hoverBackground":"#ebf0f4","list.hoverForeground":"#2f363d","list.inactiveFocusBackground":"#dbedff","list.inactiveSelectionBackground":"#e8eaed","list.inactiveSelectionForeground":"#2f363d","notificationCenterHeader.background":"#e1e4e8","notificationCenterHeader.foreground":"#6a737d","notifications.background":"#fafbfc","notifications.border":"#e1e4e8","notifications.foreground":"#2f363d","notificationsErrorIcon.foreground":"#d73a49","notificationsInfoIcon.foreground":"#005cc5","notificationsWarningIcon.foreground":"#e36209","panel.background":"#f6f8fa","panel.border":"#e1e4e8","panelInput.border":"#e1e4e8","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#2f363d","panelTitle.inactiveForeground":"#6a737d","pickerGroup.border":"#e1e4e8","pickerGroup.foreground":"#2f363d","progressBar.background":"#2188ff","quickInput.background":"#fafbfc","quickInput.foreground":"#2f363d","scrollbar.shadow":"#6a737d33","scrollbarSlider.activeBackground":"#959da588","scrollbarSlider.background":"#959da533","scrollbarSlider.hoverBackground":"#959da544","settings.headerForeground":"#2f363d","settings.modifiedItemIndicator":"#2188ff","sideBar.background":"#f6f8fa","sideBar.border":"#e1e4e8","sideBar.foreground":"#586069","sideBarSectionHeader.background":"#f6f8fa","sideBarSectionHeader.border":"#e1e4e8","sideBarSectionHeader.foreground":"#2f363d","sideBarTitle.foreground":"#2f363d","statusBar.background":"#fff","statusBar.border":"#e1e4e8","statusBar.debuggingBackground":"#f9826c","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#586069","statusBar.noFolderBackground":"#fff","statusBarItem.prominentBackground":"#e8eaed","statusBarItem.remoteBackground":"#fff","statusBarItem.remoteForeground":"#586069","tab.activeBackground":"#fff","tab.activeBorder":"#fff","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#2f363d","tab.border":"#e1e4e8","tab.hoverBackground":"#fff","tab.inactiveBackground":"#f6f8fa","tab.inactiveForeground":"#6a737d","tab.unfocusedActiveBorder":"#fff","tab.unfocusedActiveBorderTop":"#e1e4e8","tab.unfocusedHoverBackground":"#fff","terminal.ansiBlack":"#24292e","terminal.ansiBlue":"#0366d6","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#005cc5","terminal.ansiBrightCyan":"#3192aa","terminal.ansiBrightGreen":"#22863a","terminal.ansiBrightMagenta":"#5a32a3","terminal.ansiBrightRed":"#cb2431","terminal.ansiBrightWhite":"#d1d5da","terminal.ansiBrightYellow":"#b08800","terminal.ansiCyan":"#1b7c83","terminal.ansiGreen":"#28a745","terminal.ansiMagenta":"#5a32a3","terminal.ansiRed":"#d73a49","terminal.ansiWhite":"#6a737d","terminal.ansiYellow":"#dbab09","terminal.foreground":"#586069","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#d1d5da","terminalCursor.foreground":"#005cc5","textBlockQuote.background":"#fafbfc","textBlockQuote.border":"#e1e4e8","textCodeBlock.background":"#f6f8fa","textLink.activeForeground":"#005cc5","textLink.foreground":"#0366d6","textPreformat.foreground":"#586069","textSeparator.foreground":"#d1d5da","titleBar.activeBackground":"#fff","titleBar.activeForeground":"#2f363d","titleBar.border":"#e1e4e8","titleBar.inactiveBackground":"#f6f8fa","titleBar.inactiveForeground":"#6a737d","tree.indentGuidesStroke":"#e1e4e8","welcomePage.buttonBackground":"#f6f8fa","welcomePage.buttonHoverBackground":"#e1e4e8"},"displayName":"GitHub Light","name":"github-light","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#005cc5"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#6f42c1"}},{"scope":"variable.parameter.function","settings":{"foreground":"#24292e"}},{"scope":"entity.name.tag","settings":{"foreground":"#22863a"}},{"scope":"keyword","settings":{"foreground":"#d73a49"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#d73a49"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#24292e"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#032f62"}},{"scope":"support","settings":{"foreground":"#005cc5"}},{"scope":"meta.property-name","settings":{"foreground":"#005cc5"}},{"scope":"variable","settings":{"foreground":"#e36209"}},{"scope":"variable.other","settings":{"foreground":"#24292e"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"carriage-return","settings":{"background":"#d73a49","content":"^M","fontStyle":"italic underline","foreground":"#fafbfc"}},{"scope":"message.error","settings":{"foreground":"#b31d28"}},{"scope":"string variable","settings":{"foreground":"#005cc5"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#032f62"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#032f62"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#22863a"}},{"scope":"support.constant","settings":{"foreground":"#005cc5"}},{"scope":"support.variable","settings":{"foreground":"#005cc5"}},{"scope":"meta.module-reference","settings":{"foreground":"#005cc5"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#e36209"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"markup.quote","settings":{"foreground":"#22863a"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#24292e"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#24292e"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#005cc5"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#ffeef0","foreground":"#b31d28"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#f0fff4","foreground":"#22863a"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#ffebda","foreground":"#e36209"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#005cc5","foreground":"#f6f8fa"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#6f42c1"}},{"scope":"meta.diff.header","settings":{"foreground":"#005cc5"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"meta.output","settings":{"foreground":"#005cc5"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#586069"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#b31d28"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#032f62"}}],"type":"light"}'));export{e as default}; diff --git a/pkg/cli/webapp/dist/assets/go-B1SYOhNW.js b/pkg/cli/webapp/dist/assets/go-B1SYOhNW.js new file mode 100644 index 0000000..f0a9b1a --- /dev/null +++ b/pkg/cli/webapp/dist/assets/go-B1SYOhNW.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse(`{"displayName":"Go","name":"go","patterns":[{"include":"#statements"}],"repository":{"after_control_variables":{"captures":{"1":{"patterns":[{"include":"#type-declarations-without-brackets"},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"(?:\\\\w+)","name":"variable.other.go"}]}},"comment":"After control variables, to not highlight as a struct/interface (before formatting with gofmt)","match":"(?:(?<=\\\\brange\\\\b|\\\\bswitch\\\\b|\\\\;|\\\\bif\\\\b|\\\\bfor\\\\b|\\\\<|\\\\>|\\\\<\\\\=|\\\\>\\\\=|\\\\=\\\\=|\\\\!\\\\=|\\\\w(?:\\\\+|/|\\\\-|\\\\*|\\\\%)|\\\\w(?:\\\\+|/|\\\\-|\\\\*|\\\\%)\\\\=|\\\\|\\\\||\\\\&\\\\&)(?:\\\\s*)((?![\\\\[\\\\]]+)[[:alnum:]\\\\-\\\\_\\\\!\\\\.\\\\[\\\\]\\\\<\\\\>\\\\=\\\\*/\\\\+\\\\%\\\\:]+)(?:\\\\s*)(?=\\\\{))"},"brackets":{"patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.begin.bracket.curly.go"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.curly.go"}},"patterns":[{"include":"$self"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.begin.bracket.round.go"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"include":"$self"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.begin.bracket.square.go"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.square.go"}},"patterns":[{"include":"$self"}]}]},"built_in_functions":{"comment":"Built-in functions","patterns":[{"match":"\\\\b(append|cap|close|complex|copy|delete|imag|len|panic|print|println|real|recover|min|max|clear)\\\\b(?=\\\\()","name":"entity.name.function.support.builtin.go"},{"begin":"(?:(\\\\bnew\\\\b)(\\\\())","beginCaptures":{"1":{"name":"entity.name.function.support.builtin.go"},"2":{"name":"punctuation.definition.begin.bracket.round.go"}},"comment":"new keyword","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"include":"#functions"},{"include":"#struct_variables_types"},{"include":"#type-declarations"},{"include":"#generic_types"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"},{"include":"$self"}]},{"begin":"(?:(\\\\bmake\\\\b)(?:(\\\\()((?:(?:(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+(?:\\\\([^\\\\)]+\\\\))?)?(?:[\\\\[\\\\]\\\\*]+)?(?:(?!\\\\bmap\\\\b)(?:[\\\\w\\\\.]+))?(\\\\[(?:(?:[\\\\S]+)(?:(?:\\\\,\\\\s*(?:[\\\\S]+))*))?\\\\])?(?:\\\\,)?)?))","beginCaptures":{"1":{"name":"entity.name.function.support.builtin.go"},"2":{"name":"punctuation.definition.begin.bracket.round.go"},"3":{"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#parameter-variable-types"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"comment":"make keyword","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"include":"$self"}]}]},"comments":{"patterns":[{"begin":"(\\\\/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.go"}},"end":"(\\\\*\\\\/)","endCaptures":{"1":{"name":"punctuation.definition.comment.go"}},"name":"comment.block.go"},{"begin":"(\\\\/\\\\/)","beginCaptures":{"1":{"name":"punctuation.definition.comment.go"}},"end":"(?:\\\\n|$)","name":"comment.line.double-slash.go"}]},"const_assignment":{"comment":"constant assignment with const keyword","patterns":[{"captures":{"1":{"patterns":[{"include":"#delimiters"},{"match":"\\\\w+","name":"variable.other.constant.go"}]},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#generic_types"},{"match":"\\\\(","name":"punctuation.definition.begin.bracket.round.go"},{"match":"\\\\)","name":"punctuation.definition.end.bracket.round.go"},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"comment":"single assignment","match":"(?:(?<=\\\\bconst\\\\b)(?:\\\\s*)(\\\\b[\\\\w\\\\.]+(?:\\\\,\\\\s*[\\\\w\\\\.]+)*)(?:\\\\s*)((?:(?:(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+(?:\\\\([^\\\\)]+\\\\))?)?(?!(?:[\\\\[\\\\]\\\\*]+)?\\\\b(?:struct|func|map)\\\\b)(?:[\\\\w\\\\.\\\\[\\\\]\\\\*]+(?:\\\\,\\\\s*[\\\\w\\\\.\\\\[\\\\]\\\\*]+)*)?(?:\\\\s*)(?:\\\\=)?)?)"},{"begin":"(?:(?<=\\\\bconst\\\\b)(?:\\\\s*)(\\\\())","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.round.go"}},"comment":"multi assignment","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"captures":{"1":{"patterns":[{"include":"#delimiters"},{"match":"\\\\w+","name":"variable.other.constant.go"}]},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#generic_types"},{"match":"\\\\(","name":"punctuation.definition.begin.bracket.round.go"},{"match":"\\\\)","name":"punctuation.definition.end.bracket.round.go"},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"match":"(?:(?:^\\\\s*)(\\\\b[\\\\w\\\\.]+(?:\\\\,\\\\s*[\\\\w\\\\.]+)*)(?:\\\\s*)((?:(?:(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+(?:\\\\([^\\\\)]+\\\\))?)?(?!(?:[\\\\[\\\\]\\\\*]+)?\\\\b(?:struct|func|map)\\\\b)(?:[\\\\w\\\\.\\\\[\\\\]\\\\*]+(?:\\\\,\\\\s*[\\\\w\\\\.\\\\[\\\\]\\\\*]+)*)?(?:\\\\s*)(?:\\\\=)?)?)"},{"include":"$self"}]}]},"delimiters":{"patterns":[{"match":"\\\\,","name":"punctuation.other.comma.go"},{"match":"\\\\.(?!\\\\.\\\\.)","name":"punctuation.other.period.go"},{"match":":(?!=)","name":"punctuation.other.colon.go"}]},"double_parentheses_types":{"captures":{"1":{"patterns":[{"include":"#type-declarations-without-brackets"},{"match":"\\\\(","name":"punctuation.definition.begin.bracket.round.go"},{"match":"\\\\)","name":"punctuation.definition.end.bracket.round.go"},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"comment":"double parentheses types","match":"(?:(?\\\\-]+(?:\\\\s*)(?:\\\\/(?:\\\\/|\\\\*).*)?)$)"},{"include":"$self"}]},"function_param_types":{"comment":"function parameter variables and types","patterns":[{"include":"#struct_variables_types"},{"include":"#interface_variables_types"},{"include":"#type-declarations-without-brackets"},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"variable.parameter.go"}]}},"comment":"struct/interface type declaration","match":"((?:(?:\\\\b\\\\w+\\\\,\\\\s*)+)?\\\\b\\\\w+)\\\\s+(?=(?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:[\\\\[\\\\]\\\\*]+)?\\\\b(?:struct|interface)\\\\b\\\\s*\\\\{)"},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"variable.parameter.go"}]}},"comment":"multiple parameters one type -with multilines","match":"(?:(?:(?<=\\\\()|^\\\\s*)((?:(?:\\\\b\\\\w+\\\\,\\\\s*)+)(?:/(?:/|\\\\*).*)?)$)"},{"captures":{"1":{"patterns":[{"include":"#delimiters"},{"match":"\\\\w+","name":"variable.parameter.go"}]},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#parameter-variable-types"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"multiple params and types | multiple params one type | one param one type","match":"(?:((?:(?:\\\\b\\\\w+\\\\,\\\\s*)+)?\\\\b\\\\w+)(?:\\\\s+)((?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:(?:(?:[\\\\w\\\\[\\\\]\\\\.\\\\*]+)?(?:(?:\\\\bfunc\\\\b\\\\((?:[^\\\\)]+)?\\\\))(?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:\\\\s*))+(?:(?:(?:[\\\\w\\\\*\\\\.\\\\[\\\\]]+)|(?:\\\\((?:[^\\\\)]+)?\\\\))))?)|(?:(?:[\\\\[\\\\]\\\\*]+)?[\\\\w\\\\*\\\\.]+(?:\\\\[(?:[^\\\\]]+)\\\\])?(?:[\\\\w\\\\.\\\\*]+)?)+)))"},{"begin":"(?:([\\\\w\\\\.\\\\*]+)?(\\\\[))","beginCaptures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]},"2":{"name":"punctuation.definition.begin.bracket.square.go"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.square.go"}},"patterns":[{"include":"#generic_param_types"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.begin.bracket.round.go"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"include":"#function_param_types"}]},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"other types","match":"([\\\\w\\\\.]+)"},{"include":"$self"}]},"functions":{"begin":"(?:(\\\\bfunc\\\\b)(?=\\\\())","beginCaptures":{"1":{"name":"keyword.function.go"}},"comment":"Functions","end":"(?:(?<=\\\\))(\\\\s*(?:(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?((?:(?:\\\\s*(?:(?:[\\\\[\\\\]\\\\*]+)?[\\\\w\\\\.\\\\*]+)?(?:(?:\\\\[(?:(?:[\\\\w\\\\.\\\\*]+)?(?:\\\\[(?:[^\\\\]]+)?\\\\])?(?:\\\\,\\\\s+)?)+\\\\])|(?:\\\\((?:[^\\\\)]+)?\\\\)))?(?:[\\\\w\\\\.\\\\*]+)?)(?:\\\\s*)(?=\\\\{))|(?:\\\\s*(?:(?:(?:[\\\\[\\\\]\\\\*]+)?(?!\\\\bfunc\\\\b)(?:[\\\\w\\\\.\\\\*]+)(?:\\\\[(?:(?:[\\\\w\\\\.\\\\*]+)?(?:\\\\[(?:[^\\\\]]+)?\\\\])?(?:\\\\,\\\\s+)?)+\\\\])?(?:[\\\\w\\\\.\\\\*]+)?)|(?:\\\\((?:[^\\\\)]+)?\\\\)))))?)","endCaptures":{"1":{"patterns":[{"include":"#type-declarations"}]},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#parameter-variable-types"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"patterns":[{"include":"#parameter-variable-types"}]},"functions_inline":{"captures":{"1":{"name":"keyword.function.go"},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.begin.bracket.round.go"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"include":"#function_param_types"},{"include":"$self"}]},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"\\\\{","name":"punctuation.definition.begin.bracket.curly.go"},{"match":"\\\\}","name":"punctuation.definition.end.bracket.curly.go"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"functions in-line with multi return types","match":"(?:(\\\\bfunc\\\\b)((?:\\\\((?:[^/]*?)\\\\))(?:\\\\s+)(?:\\\\((?:[^/]*?)\\\\)))(?:\\\\s+)(?=\\\\{))"},"generic_param_types":{"comment":"generic parameter variables and types","patterns":[{"include":"#struct_variables_types"},{"include":"#interface_variables_types"},{"include":"#type-declarations-without-brackets"},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"variable.parameter.go"}]}},"comment":"struct/interface type declaration","match":"((?:(?:\\\\b\\\\w+\\\\,\\\\s*)+)?\\\\b\\\\w+)\\\\s+(?=(?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:[\\\\[\\\\]\\\\*]+)?\\\\b(?:struct|interface)\\\\b\\\\s*\\\\{)"},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"variable.parameter.go"}]}},"comment":"multiple parameters one type -with multilines","match":"(?:(?:(?<=\\\\()|^\\\\s*)((?:(?:\\\\b\\\\w+\\\\,\\\\s*)+)(?:/(?:/|\\\\*).*)?)$)"},{"captures":{"1":{"patterns":[{"include":"#delimiters"},{"match":"\\\\w+","name":"variable.parameter.go"}]},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#parameter-variable-types"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]},"3":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"multiple params and types | multiple types one param","match":"(?:((?:(?:\\\\b\\\\w+\\\\,\\\\s*)+)?\\\\b\\\\w+)(?:\\\\s+)((?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:(?:(?:[\\\\w\\\\[\\\\]\\\\.\\\\*]+)?(?:(?:\\\\bfunc\\\\b\\\\((?:[^\\\\)]+)?\\\\))(?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:\\\\s*))+(?:(?:(?:[\\\\w\\\\*\\\\.]+)|(?:\\\\((?:[^\\\\)]+)?\\\\))))?)|(?:(?:(?:[\\\\w\\\\*\\\\.\\\\~]+)|(?:\\\\[(?:(?:[\\\\w\\\\.\\\\*]+)?(?:\\\\[(?:[^\\\\]]+)?\\\\])?(?:\\\\,\\\\s+)?)+\\\\]))(?:[\\\\w\\\\.\\\\*]+)?)+)))"},{"begin":"(?:([\\\\w\\\\.\\\\*]+)?(\\\\[))","beginCaptures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]},"2":{"name":"punctuation.definition.begin.bracket.square.go"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.square.go"}},"patterns":[{"include":"#generic_param_types"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.begin.bracket.round.go"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"include":"#function_param_types"}]},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"other types","match":"(?:\\\\b([\\\\w\\\\.]+))"},{"include":"$self"}]},"generic_types":{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"entity.name.type.go"}]},"2":{"patterns":[{"include":"#parameter-variable-types"}]}},"comment":"Generic support for all types","match":"(?:([\\\\w\\\\.\\\\*]+)(\\\\[(?:[^\\\\]]+)?\\\\]))"},"group-functions":{"comment":"all statements related to functions","patterns":[{"include":"#function_declaration"},{"include":"#functions_inline"},{"include":"#functions"},{"include":"#built_in_functions"},{"include":"#support_functions"}]},"group-types":{"comment":"all statements related to types","patterns":[{"include":"#other_struct_interface_expressions"},{"include":"#type_assertion_inline"},{"include":"#struct_variables_types"},{"include":"#interface_variables_types"},{"include":"#single_type"},{"include":"#multi_types"},{"include":"#struct_interface_declaration"},{"include":"#double_parentheses_types"},{"include":"#switch_types"},{"include":"#type-declarations"}]},"group-variables":{"comment":"all statements related to variables","patterns":[{"include":"#const_assignment"},{"include":"#var_assignment"},{"include":"#variable_assignment"},{"include":"#label_loop_variables"},{"include":"#slice_index_variables"},{"include":"#property_variables"},{"include":"#switch_select_case_variables"},{"include":"#other_variables"}]},"import":{"comment":"import","patterns":[{"begin":"\\\\b(import)\\\\s+","beginCaptures":{"1":{"name":"keyword.control.import.go"}},"comment":"import","end":"(?!\\\\G)","patterns":[{"include":"#imports"}]}]},"imports":{"comment":"import package(s)","patterns":[{"captures":{"1":{"patterns":[{"include":"#delimiters"},{"match":"(?:\\\\w+)","name":"variable.other.import.go"}]},"2":{"name":"string.quoted.double.go"},"3":{"name":"punctuation.definition.string.begin.go"},"4":{"name":"entity.name.import.go"},"5":{"name":"punctuation.definition.string.end.go"}},"match":"(\\\\s*[\\\\w\\\\.]+)?\\\\s*((\\")([^\\"]*)(\\"))"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.imports.begin.bracket.round.go"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.imports.end.bracket.round.go"}},"patterns":[{"include":"#comments"},{"include":"#imports"}]},{"include":"$self"}]},"interface_variables_types":{"begin":"(\\\\binterface\\\\b)\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"keyword.interface.go"},"2":{"name":"punctuation.definition.begin.bracket.curly.go"}},"comment":"interface variable types","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.curly.go"}},"patterns":[{"include":"#interface_variables_types_field"},{"include":"$self"}]},"interface_variables_types_field":{"comment":"interface variable type fields","patterns":[{"include":"#support_functions"},{"include":"#type-declarations-without-brackets"},{"begin":"(?:([\\\\w\\\\.\\\\*]+)?(\\\\[))","beginCaptures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]},"2":{"name":"punctuation.definition.begin.bracket.square.go"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.square.go"}},"patterns":[{"include":"#generic_param_types"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.begin.bracket.round.go"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"include":"#function_param_types"}]},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"comment":"other types","match":"([\\\\w\\\\.]+)"}]},"keywords":{"patterns":[{"comment":"Flow control keywords","match":"\\\\b(break|case|continue|default|defer|else|fallthrough|for|go|goto|if|range|return|select|switch)\\\\b","name":"keyword.control.go"},{"match":"\\\\bchan\\\\b","name":"keyword.channel.go"},{"match":"\\\\bconst\\\\b","name":"keyword.const.go"},{"match":"\\\\bvar\\\\b","name":"keyword.var.go"},{"match":"\\\\bfunc\\\\b","name":"keyword.function.go"},{"match":"\\\\binterface\\\\b","name":"keyword.interface.go"},{"match":"\\\\bmap\\\\b","name":"keyword.map.go"},{"match":"\\\\bstruct\\\\b","name":"keyword.struct.go"},{"match":"\\\\bimport\\\\b","name":"keyword.control.import.go"},{"match":"\\\\btype\\\\b","name":"keyword.type.go"}]},"label_loop_variables":{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"variable.other.label.go"}]}},"comment":"labeled loop variable name","match":"((?:^\\\\s*\\\\w+:\\\\s*$)|(?:^\\\\s*(?:\\\\bbreak\\\\b|\\\\bgoto\\\\b|\\\\bcontinue\\\\b)\\\\s+\\\\w+(?:\\\\s*/(?:/|\\\\*)\\\\s*.*)?$))"},"language_constants":{"captures":{"1":{"name":"constant.language.boolean.go"},"2":{"name":"constant.language.null.go"},"3":{"name":"constant.language.iota.go"}},"comment":"Language constants","match":"\\\\b(?:(true|false)|(nil)|(iota))\\\\b"},"map_types":{"begin":"(?:(\\\\bmap\\\\b)(\\\\[))","beginCaptures":{"1":{"name":"keyword.map.go"},"2":{"name":"punctuation.definition.begin.bracket.square.go"}},"comment":"map types","end":"(?:(\\\\])((?:(?:(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?!(?:[\\\\[\\\\]\\\\*]+)?\\\\b(?:func|struct|map)\\\\b)(?:[\\\\*\\\\[\\\\]]+)?(?:[\\\\w\\\\.]+)(?:\\\\[(?:(?:[\\\\w\\\\.\\\\*\\\\[\\\\]\\\\{\\\\}]+)(?:(?:\\\\,\\\\s*(?:[\\\\w\\\\.\\\\*\\\\[\\\\]\\\\{\\\\}]+))*))?\\\\])?)?)","endCaptures":{"1":{"name":"punctuation.definition.end.bracket.square.go"},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#parameter-variable-types"},{"include":"#functions"},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"\\\\{","name":"punctuation.definition.begin.bracket.curly.go"},{"match":"\\\\}","name":"punctuation.definition.end.bracket.curly.go"},{"match":"\\\\(","name":"punctuation.definition.begin.bracket.round.go"},{"match":"\\\\)","name":"punctuation.definition.end.bracket.round.go"},{"match":"\\\\w+","name":"entity.name.type.go"}]},"multi_types":{"begin":"(\\\\btype\\\\b)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.type.go"},"2":{"name":"punctuation.definition.begin.bracket.round.go"}},"comment":"multi type declaration","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"include":"#struct_variables_types"},{"include":"#interface_variables_types"},{"include":"#type-declarations-without-brackets"},{"include":"#parameter-variable-types"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]},"numeric_literals":{"captures":{"0":{"patterns":[{"begin":"(?=.)","end":"(?:\\\\n|$)","patterns":[{"captures":{"1":{"name":"constant.numeric.decimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"2":{"name":"punctuation.separator.constant.numeric.go"},"3":{"name":"constant.numeric.decimal.point.go"},"4":{"name":"constant.numeric.decimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"5":{"name":"punctuation.separator.constant.numeric.go"},"6":{"name":"keyword.other.unit.exponent.decimal.go"},"7":{"name":"keyword.operator.plus.exponent.decimal.go"},"8":{"name":"keyword.operator.minus.exponent.decimal.go"},"9":{"name":"constant.numeric.exponent.decimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"10":{"name":"keyword.other.unit.imaginary.go"},"11":{"name":"constant.numeric.decimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"12":{"name":"punctuation.separator.constant.numeric.go"},"13":{"name":"keyword.other.unit.exponent.decimal.go"},"14":{"name":"keyword.operator.plus.exponent.decimal.go"},"15":{"name":"keyword.operator.minus.exponent.decimal.go"},"16":{"name":"constant.numeric.exponent.decimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"17":{"name":"keyword.other.unit.imaginary.go"},"18":{"name":"constant.numeric.decimal.point.go"},"19":{"name":"constant.numeric.decimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"20":{"name":"punctuation.separator.constant.numeric.go"},"21":{"name":"keyword.other.unit.exponent.decimal.go"},"22":{"name":"keyword.operator.plus.exponent.decimal.go"},"23":{"name":"keyword.operator.minus.exponent.decimal.go"},"24":{"name":"constant.numeric.exponent.decimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"25":{"name":"keyword.other.unit.imaginary.go"},"26":{"name":"keyword.other.unit.hexadecimal.go"},"27":{"name":"constant.numeric.hexadecimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"28":{"name":"punctuation.separator.constant.numeric.go"},"29":{"name":"constant.numeric.hexadecimal.go"},"30":{"name":"constant.numeric.hexadecimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"31":{"name":"punctuation.separator.constant.numeric.go"},"32":{"name":"keyword.other.unit.exponent.hexadecimal.go"},"33":{"name":"keyword.operator.plus.exponent.hexadecimal.go"},"34":{"name":"keyword.operator.minus.exponent.hexadecimal.go"},"35":{"name":"constant.numeric.exponent.hexadecimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"36":{"name":"keyword.other.unit.imaginary.go"},"37":{"name":"keyword.other.unit.hexadecimal.go"},"38":{"name":"constant.numeric.hexadecimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"39":{"name":"punctuation.separator.constant.numeric.go"},"40":{"name":"keyword.other.unit.exponent.hexadecimal.go"},"41":{"name":"keyword.operator.plus.exponent.hexadecimal.go"},"42":{"name":"keyword.operator.minus.exponent.hexadecimal.go"},"43":{"name":"constant.numeric.exponent.hexadecimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"44":{"name":"keyword.other.unit.imaginary.go"},"45":{"name":"keyword.other.unit.hexadecimal.go"},"46":{"name":"constant.numeric.hexadecimal.go"},"47":{"name":"constant.numeric.hexadecimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"48":{"name":"punctuation.separator.constant.numeric.go"},"49":{"name":"keyword.other.unit.exponent.hexadecimal.go"},"50":{"name":"keyword.operator.plus.exponent.hexadecimal.go"},"51":{"name":"keyword.operator.minus.exponent.hexadecimal.go"},"52":{"name":"constant.numeric.exponent.hexadecimal.go","patterns":[{"match":"(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])","name":"punctuation.separator.constant.numeric.go"}]},"53":{"name":"keyword.other.unit.imaginary.go"}},"match":"(?:(?:(?:(?:(?:\\\\G(?=[0-9.])(?!0[xXbBoO])([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)((?:(?<=[0-9])\\\\.|\\\\.(?=[0-9])))([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)?(?:(?=|<(?!<)|>(?!>))","name":"keyword.operator.comparison.go"},{"match":"(&&|\\\\|\\\\||!)","name":"keyword.operator.logical.go"},{"match":"(=|\\\\+=|\\\\-=|\\\\|=|\\\\^=|\\\\*=|/=|:=|%=|<<=|>>=|&\\\\^=|&=)","name":"keyword.operator.assignment.go"},{"match":"(\\\\+|\\\\-|\\\\*|/|%)","name":"keyword.operator.arithmetic.go"},{"match":"(&(?!\\\\^)|\\\\||\\\\^|&\\\\^|<<|>>|\\\\~)","name":"keyword.operator.arithmetic.bitwise.go"},{"match":"\\\\.\\\\.\\\\.","name":"keyword.operator.ellipsis.go"}]},"other_struct_interface_expressions":{"comment":"struct and interface expression in-line (before curly bracket)","patterns":[{"comment":"after control variables must be added exactly here, do not move it! (changing may not affect tests, so be careful!)","include":"#after_control_variables"},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"entity.name.type.go"}]},"2":{"patterns":[{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.begin.bracket.square.go"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.square.go"}},"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"entity.name.type.go"},{"include":"$self"}]}]}},"match":"(\\\\b[\\\\w\\\\.]+)(\\\\[(?:[^\\\\]]+)?\\\\])?(?=\\\\{)(?\\\\|\\\\&]+\\\\:)|(?:\\\\:\\\\b[\\\\w\\\\.\\\\*\\\\+/\\\\-\\\\%\\\\<\\\\>\\\\|\\\\&]+))(?:\\\\b[\\\\w\\\\.\\\\*\\\\+/\\\\-\\\\%\\\\<\\\\>\\\\|\\\\&]+)?(?:\\\\:\\\\b[\\\\w\\\\.\\\\*\\\\+/\\\\-\\\\%\\\\<\\\\>\\\\|\\\\&]+)?)(?=\\\\])"},"statements":{"patterns":[{"include":"#package_name"},{"include":"#import"},{"include":"#syntax_errors"},{"include":"#group-functions"},{"include":"#group-types"},{"include":"#group-variables"},{"include":"#field_hover"}]},"storage_types":{"patterns":[{"match":"\\\\bbool\\\\b","name":"storage.type.boolean.go"},{"match":"\\\\bbyte\\\\b","name":"storage.type.byte.go"},{"match":"\\\\berror\\\\b","name":"storage.type.error.go"},{"match":"\\\\b(complex(64|128)|float(32|64)|u?int(8|16|32|64)?)\\\\b","name":"storage.type.numeric.go"},{"match":"\\\\brune\\\\b","name":"storage.type.rune.go"},{"match":"\\\\bstring\\\\b","name":"storage.type.string.go"},{"match":"\\\\buintptr\\\\b","name":"storage.type.uintptr.go"},{"match":"\\\\bany\\\\b","name":"entity.name.type.any.go"}]},"string_escaped_char":{"patterns":[{"match":"\\\\\\\\([0-7]{3}|[abfnrtv\\\\\\\\'\\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})","name":"constant.character.escape.go"},{"match":"\\\\\\\\[^0-7xuUabfnrtv\\\\'\\"]","name":"invalid.illegal.unknown-escape.go"}]},"string_literals":{"patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.go"}},"comment":"Interpreted string literals","end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.go"}},"name":"string.quoted.double.go","patterns":[{"include":"#string_escaped_char"},{"include":"#string_placeholder"}]}]},"string_placeholder":{"patterns":[{"match":"%(\\\\[\\\\d+\\\\])?([\\\\+#\\\\-0\\\\x20]{,2}((\\\\d+|\\\\*)?(\\\\.?(\\\\d+|\\\\*|(\\\\[\\\\d+\\\\])\\\\*?)?(\\\\[\\\\d+\\\\])?)?))?[vT%tbcdoqxXUbeEfFgGspw]","name":"constant.other.placeholder.go"}]},"struct_interface_declaration":{"captures":{"1":{"name":"keyword.type.go"},"2":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"comment":"struct, interface type declarations (related to: struct_variables_types, interface_variables_types)","match":"(?:(?:^\\\\s*)(\\\\btype\\\\b)(?:\\\\s*)([\\\\w\\\\.]+))"},"struct_variable_types_fields_multi":{"comment":"struct variable and type fields with multi lines","patterns":[{"begin":"(?:((?:\\\\w+(?:\\\\,\\\\s*\\\\w+)*)(?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:\\\\s+)(?:[\\\\[\\\\]\\\\*]+)?)(\\\\bstruct\\\\b)(?:\\\\s*)(\\\\{))","beginCaptures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"variable.other.property.go"}]},"2":{"name":"keyword.struct.go"},"3":{"name":"punctuation.definition.begin.bracket.curly.go"}},"comment":"struct in struct types","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.curly.go"}},"patterns":[{"include":"#struct_variables_types_fields"},{"include":"$self"}]},{"begin":"(?:((?:\\\\w+(?:\\\\,\\\\s*\\\\w+)*)(?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:\\\\s+)(?:[\\\\[\\\\]\\\\*]+)?)(\\\\binterface\\\\b)(?:\\\\s*)(\\\\{))","beginCaptures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"variable.other.property.go"}]},"2":{"name":"keyword.interface.go"},"3":{"name":"punctuation.definition.begin.bracket.curly.go"}},"comment":"interface in struct types","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.curly.go"}},"patterns":[{"include":"#interface_variables_types_field"},{"include":"$self"}]},{"begin":"(?:((?:\\\\w+(?:\\\\,\\\\s*\\\\w+)*)(?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:\\\\s+)(?:[\\\\[\\\\]\\\\*]+)?)(\\\\bfunc\\\\b)(?:\\\\s*)(\\\\())","beginCaptures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"variable.other.property.go"}]},"2":{"name":"keyword.function.go"},"3":{"name":"punctuation.definition.begin.bracket.round.go"}},"comment":"function in struct types","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"include":"#function_param_types"},{"include":"$self"}]},{"include":"#parameter-variable-types"}]},"struct_variables_types":{"begin":"(\\\\bstruct\\\\b)\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"keyword.struct.go"},"2":{"name":"punctuation.definition.begin.bracket.curly.go"}},"comment":"Struct variable type","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.curly.go"}},"patterns":[{"include":"#struct_variables_types_fields"},{"include":"$self"}]},"struct_variables_types_fields":{"comment":"Struct variable type fields","patterns":[{"include":"#struct_variable_types_fields_multi"},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"one line - single type","match":"(?:(?<=\\\\{)\\\\s*((?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:[\\\\w\\\\.\\\\*\\\\[\\\\]]+))\\\\s*(?=\\\\}))"},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"variable.other.property.go"}]},"2":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"one line - property variables and types","match":"(?:(?<=\\\\{)\\\\s*((?:(?:\\\\w+\\\\,\\\\s*)+)?(?:\\\\w+\\\\s+))((?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:[\\\\w\\\\.\\\\*\\\\[\\\\]]+))\\\\s*(?=\\\\}))"},{"captures":{"1":{"patterns":[{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"variable.other.property.go"}]},"2":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"match":"(?:((?:(?:\\\\w+\\\\,\\\\s*)+)?(?:\\\\w+\\\\s+))?((?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:[\\\\S]+)(?:\\\\;)?))"}]}},"comment":"one line with semicolon(;) without formatting gofmt - single type | property variables and types","match":"(?:(?<=\\\\{)((?:\\\\s*(?:(?:(?:\\\\w+\\\\,\\\\s*)+)?(?:\\\\w+\\\\s+))?(?:(?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:[\\\\S]+)(?:\\\\;)?))+)\\\\s*(?=\\\\}))"},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"one type only","match":"(?:((?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?(?:[\\\\w\\\\.\\\\*]+)\\\\s*)(?:(?=\\\\\`|\\\\/|\\")|$))"},{"captures":{"1":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"variable.other.property.go"}]},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#parameter-variable-types"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"property variables and types","match":"(?:((?:(?:\\\\w+\\\\,\\\\s*)+)?(?:\\\\w+\\\\s+))([^\\\\\`\\"\\\\/]+))"}]},"support_functions":{"captures":{"1":{"name":"entity.name.function.support.go"},"2":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\d\\\\w*","name":"invalid.illegal.identifier.go"},{"match":"\\\\w+","name":"entity.name.function.support.go"}]},"3":{"patterns":[{"include":"#type-declarations-without-brackets"},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"\\\\{","name":"punctuation.definition.begin.bracket.curly.go"},{"match":"\\\\}","name":"punctuation.definition.end.bracket.curly.go"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"comment":"Support Functions","match":"(?:(?:((?<=\\\\.)\\\\b\\\\w+)|(\\\\b\\\\w+))(\\\\[(?:(?:[\\\\w\\\\.\\\\*\\\\[\\\\]\\\\{\\\\}\\"\\\\']+)(?:(?:\\\\,\\\\s*(?:[\\\\w\\\\.\\\\*\\\\[\\\\]\\\\{\\\\}]+))*))?\\\\])?(?=\\\\())"},"switch_select_case_variables":{"captures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"#type-declarations"},{"include":"#support_functions"},{"include":"#variable_assignment"},{"match":"\\\\w+","name":"variable.other.go"}]}},"comment":"variables after case control keyword in switch/select expression, to not scope them as property variables","match":"(?:(?:^\\\\s*(\\\\bcase\\\\b))(?:\\\\s+)([\\\\s\\\\S]+(?:\\\\:)\\\\s*(?:/(?:/|\\\\*).*)?)$)"},"switch_types":{"begin":"(?<=\\\\bswitch\\\\b)(?:\\\\s*)(?:(\\\\w+\\\\s*\\\\:\\\\=)?\\\\s*([\\\\w\\\\.\\\\*\\\\(\\\\)\\\\[\\\\]\\\\+/\\\\-\\\\%\\\\<\\\\>\\\\|\\\\&]+))(\\\\.\\\\(\\\\btype\\\\b\\\\)\\\\s*)(\\\\{)","beginCaptures":{"1":{"patterns":[{"include":"#operators"},{"match":"\\\\w+","name":"variable.other.assignment.go"}]},"2":{"patterns":[{"include":"#support_functions"},{"include":"#type-declarations"},{"match":"\\\\w+","name":"variable.other.go"}]},"3":{"patterns":[{"include":"#delimiters"},{"include":"#brackets"},{"match":"\\\\btype\\\\b","name":"keyword.type.go"}]},"4":{"name":"punctuation.definition.begin.bracket.curly.go"}},"comment":"switch type assertions, only highlights types after case keyword","end":"(?:\\\\})","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.curly.go"}},"patterns":[{"captures":{"1":{"name":"keyword.control.go"},"2":{"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"entity.name.type.go"}]},"3":{"name":"punctuation.other.colon.go"},"4":{"patterns":[{"include":"#comments"}]}},"comment":"types after case keyword with single line","match":"(?:^\\\\s*(\\\\bcase\\\\b))(?:\\\\s+)([\\\\w\\\\.\\\\,\\\\*\\\\=\\\\<\\\\>\\\\!\\\\s]+)(:)(\\\\s*/(?:/|\\\\*)\\\\s*.*)?$"},{"begin":"\\\\bcase\\\\b","beginCaptures":{"0":{"name":"keyword.control.go"}},"comment":"types after case keyword with multi lines","end":"\\\\:","endCaptures":{"0":{"name":"punctuation.other.colon.go"}},"patterns":[{"include":"#type-declarations"},{"match":"\\\\w+","name":"entity.name.type.go"}]},{"include":"$self"}]},"syntax_errors":{"patterns":[{"captures":{"1":{"name":"invalid.illegal.slice.go"}},"comment":"Syntax error using slices","match":"\\\\[\\\\](\\\\s+)"},{"comment":"Syntax error numeric literals","match":"\\\\b0[0-7]*[89]\\\\d*\\\\b","name":"invalid.illegal.numeric.go"}]},"terminators":{"comment":"Terminators","match":";","name":"punctuation.terminator.go"},"type-declarations":{"comment":"includes all type declarations","patterns":[{"include":"#language_constants"},{"include":"#comments"},{"include":"#map_types"},{"include":"#brackets"},{"include":"#delimiters"},{"include":"#keywords"},{"include":"#operators"},{"include":"#runes"},{"include":"#storage_types"},{"include":"#raw_string_literals"},{"include":"#string_literals"},{"include":"#numeric_literals"},{"include":"#terminators"}]},"type-declarations-without-brackets":{"comment":"includes all type declarations without brackets (in some cases, brackets need to be captured manually)","patterns":[{"include":"#language_constants"},{"include":"#comments"},{"include":"#map_types"},{"include":"#delimiters"},{"include":"#keywords"},{"include":"#operators"},{"include":"#runes"},{"include":"#storage_types"},{"include":"#raw_string_literals"},{"include":"#string_literals"},{"include":"#numeric_literals"},{"include":"#terminators"}]},"type_assertion_inline":{"captures":{"1":{"name":"keyword.type.go"},"2":{"patterns":[{"include":"#type-declarations"},{"match":"(?:\\\\w+)","name":"entity.name.type.go"}]}},"comment":"struct/interface types in-line (type assertion) | switch type keyword","match":"(?:(?<=\\\\.\\\\()(?:(\\\\btype\\\\b)|((?:(?:\\\\s*(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+)?[\\\\w\\\\.\\\\[\\\\]\\\\*]+))(?=\\\\)))"},"var_assignment":{"comment":"variable assignment with var keyword","patterns":[{"captures":{"1":{"patterns":[{"include":"#delimiters"},{"match":"\\\\w+","name":"variable.other.assignment.go"}]},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#generic_types"},{"match":"\\\\(","name":"punctuation.definition.begin.bracket.round.go"},{"match":"\\\\)","name":"punctuation.definition.end.bracket.round.go"},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"comment":"single assignment","match":"(?:(?<=\\\\bvar\\\\b)(?:\\\\s*)(\\\\b[\\\\w\\\\.]+(?:\\\\,\\\\s*[\\\\w\\\\.]+)*)(?:\\\\s*)((?:(?:(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+(?:\\\\([^\\\\)]+\\\\))?)?(?!(?:[\\\\[\\\\]\\\\*]+)?\\\\b(?:struct|func|map)\\\\b)(?:[\\\\w\\\\.\\\\[\\\\]\\\\*]+(?:\\\\,\\\\s*[\\\\w\\\\.\\\\[\\\\]\\\\*]+)*)?(?:\\\\s*)(?:\\\\=)?)?)"},{"begin":"(?:(?<=\\\\bvar\\\\b)(?:\\\\s*)(\\\\())","beginCaptures":{"1":{"name":"punctuation.definition.begin.bracket.round.go"}},"comment":"multi assignment","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.round.go"}},"patterns":[{"captures":{"1":{"patterns":[{"include":"#delimiters"},{"match":"\\\\w+","name":"variable.other.assignment.go"}]},"2":{"patterns":[{"include":"#type-declarations-without-brackets"},{"include":"#generic_types"},{"match":"\\\\(","name":"punctuation.definition.begin.bracket.round.go"},{"match":"\\\\)","name":"punctuation.definition.end.bracket.round.go"},{"match":"\\\\[","name":"punctuation.definition.begin.bracket.square.go"},{"match":"\\\\]","name":"punctuation.definition.end.bracket.square.go"},{"match":"\\\\w+","name":"entity.name.type.go"}]}},"match":"(?:(?:^\\\\s*)(\\\\b[\\\\w\\\\.]+(?:\\\\,\\\\s*[\\\\w\\\\.]+)*)(?:\\\\s*)((?:(?:(?:[\\\\*\\\\[\\\\]]+)?(?:\\\\<\\\\-\\\\s*)?\\\\bchan\\\\b(?:\\\\s*\\\\<\\\\-)?\\\\s*)+(?:\\\\([^\\\\)]+\\\\))?)?(?!(?:[\\\\[\\\\]\\\\*]+)?\\\\b(?:struct|func|map)\\\\b)(?:[\\\\w\\\\.\\\\[\\\\]\\\\*]+(?:\\\\,\\\\s*[\\\\w\\\\.\\\\[\\\\]\\\\*]+)*)?(?:\\\\s*)(?:\\\\=)?)?)"},{"include":"$self"}]}]},"variable_assignment":{"comment":"variable assignment","patterns":[{"captures":{"0":{"patterns":[{"include":"#delimiters"},{"match":"\\\\d\\\\w*","name":"invalid.illegal.identifier.go"},{"match":"\\\\w+","name":"variable.other.assignment.go"}]}},"comment":"variable assignment with :=","match":"\\\\b\\\\w+(?:\\\\,\\\\s*\\\\w+)*(?=\\\\s*:=)"},{"captures":{"0":{"patterns":[{"include":"#delimiters"},{"include":"#operators"},{"match":"\\\\d\\\\w*","name":"invalid.illegal.identifier.go"},{"match":"\\\\w+","name":"variable.other.assignment.go"}]}},"comment":"variable assignment with =","match":"\\\\b[\\\\w\\\\.\\\\*]+(?:\\\\,\\\\s*[\\\\w\\\\.\\\\*]+)*(?=\\\\s*=(?!=))"}]}},"scopeName":"source.go"}`)),t=[e];export{t as default}; diff --git a/pkg/cli/webapp/dist/assets/groovy-D9Dt4D0W.js b/pkg/cli/webapp/dist/assets/groovy-D9Dt4D0W.js new file mode 100644 index 0000000..61d6f4c --- /dev/null +++ b/pkg/cli/webapp/dist/assets/groovy-D9Dt4D0W.js @@ -0,0 +1 @@ +function a(e){for(var n={},t=e.split(" "),i=0;i"))return r="->",null;if(/[+\-*&%=<>!?|\/~]/.test(t))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),t=="@")return e.eatWhile(/[\w\$_\.]/),"meta";if(n.lastToken==".")return"property";if(e.eat(":"))return r="proplabel","property";var i=e.current();return z.propertyIsEnumerable(i)?"atom":b.propertyIsEnumerable(i)?(g.propertyIsEnumerable(i)?r="newstatement":x.propertyIsEnumerable(i)&&(r="standalone"),"keyword"):"variable"}k.isBase=!0;function y(e,n,t){var i=!1;if(e!="/"&&n.eat(e))if(n.eat(e))i=!0;else return"string";function o(l,d){for(var f=!1,c,s=!i;(c=l.next())!=null;){if(c==e&&!f){if(!i)break;if(l.match(e+e)){s=!0;break}}if(e=='"'&&c=="$"&&!f){if(l.eat("{"))return d.tokenize.push(m()),"string";if(l.match(/^\w/,!1))return d.tokenize.push(E),"string"}f=!f&&c=="\\"}return s&&d.tokenize.pop(),"string"}return t.tokenize.push(o),o(n,t)}function m(){var e=1;function n(t,i){if(t.peek()=="}"){if(e--,e==0)return i.tokenize.pop(),i.tokenize[i.tokenize.length-1](t,i)}else t.peek()=="{"&&e++;return k(t,i)}return n.isBase=!0,n}function E(e,n){var t=e.match(/^(\.|[\w\$_]+)/);return(!t||!e.match(t[0]=="."?/^[\w$_]/:/^\./))&&n.tokenize.pop(),t?t[0]=="."?null:"variable":n.tokenize[n.tokenize.length-1](e,n)}function v(e,n){for(var t=!1,i;i=e.next();){if(i=="/"&&t){n.tokenize.pop();break}t=i=="*"}return"comment"}function h(e,n){return!e||e=="operator"||e=="->"||/[\.\[\{\(,;:]/.test(e)||e=="newstatement"||e=="keyword"||e=="proplabel"||e=="standalone"&&!n}function w(e,n,t,i,o){this.indented=e,this.column=n,this.type=t,this.align=i,this.prev=o}function p(e,n,t){return e.context=new w(e.indented,n,t,null,e.context)}function u(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const T={name:"groovy",startState:function(e){return{tokenize:[k],context:new w(-e,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0,t.type=="statement"&&!h(n.lastToken,!0)&&(u(n),t=n.context)),e.eatSpace())return null;r=null;var i=n.tokenize[n.tokenize.length-1](e,n);if(i=="comment")return i;if(t.align==null&&(t.align=!0),(r==";"||r==":")&&t.type=="statement")u(n);else if(r=="->"&&t.type=="statement"&&t.prev.type=="}")u(n),n.context.align=!1;else if(r=="{")p(n,e.column(),"}");else if(r=="[")p(n,e.column(),"]");else if(r=="(")p(n,e.column(),")");else if(r=="}"){for(;t.type=="statement";)t=u(n);for(t.type=="}"&&(t=u(n));t.type=="statement";)t=u(n)}else r==t.type?u(n):(t.type=="}"||t.type=="top"||t.type=="statement"&&r=="newstatement")&&p(n,e.column(),"statement");return n.startOfLine=!1,n.lastToken=r||i,i},indent:function(e,n,t){if(!e.tokenize[e.tokenize.length-1].isBase)return null;var i=n&&n.charAt(0),o=e.context;o.type=="statement"&&!h(e.lastToken,!0)&&(o=o.prev);var l=i==o.type;return o.type=="statement"?o.indented+(i=="{"?0:t.unit):o.align?o.column+(l?0:1):o.indented+(l?0:t.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""']}}};export{T as groovy}; diff --git a/pkg/cli/webapp/dist/assets/haskell-Cw1EW3IL.js b/pkg/cli/webapp/dist/assets/haskell-Cw1EW3IL.js new file mode 100644 index 0000000..b8da2a3 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/haskell-Cw1EW3IL.js @@ -0,0 +1 @@ +function f(e,n,t){return n(t),t(e,n)}var g=/[a-z_]/,c=/[A-Z]/,l=/\d/,v=/[0-9A-Fa-f]/,w=/[0-7]/,d=/[a-z_A-Z0-9'\xa1-\uffff]/,o=/[-!#$%&*+.\/<=>?@\\^|~:]/,E=/[(),;[\]`{}]/,h=/[ \t\v\f]/;function i(e,n){if(e.eatWhile(h))return null;var t=e.next();if(E.test(t)){if(t=="{"&&e.eat("-")){var r="comment";return e.eat("#")&&(r="meta"),f(e,n,s(r,1))}return null}if(t=="'")return e.eat("\\"),e.next(),e.eat("'")?"string":"error";if(t=='"')return f(e,n,p);if(c.test(t))return e.eatWhile(d),e.eat(".")?"qualifier":"type";if(g.test(t))return e.eatWhile(d),"variable";if(l.test(t)){if(t=="0"){if(e.eat(/[xX]/))return e.eatWhile(v),"integer";if(e.eat(/[oO]/))return e.eatWhile(w),"number"}e.eatWhile(l);var r="number";return e.match(/^\.\d+/)&&(r="number"),e.eat(/[eE]/)&&(r="number",e.eat(/[-+]/),e.eatWhile(l)),r}return t=="."&&e.eat(".")?"keyword":o.test(t)?t=="-"&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(o))?(e.skipToEnd(),"comment"):(e.eatWhile(o),"variable"):"error"}function s(e,n){return n==0?i:function(t,r){for(var a=n;!t.eol();){var u=t.next();if(u=="{"&&t.eat("-"))++a;else if(u=="-"&&t.eat("}")&&(--a,a==0))return r(i),e}return r(s(e,a)),e}}function p(e,n){for(;!e.eol();){var t=e.next();if(t=='"')return n(i),"string";if(t=="\\"){if(e.eol()||e.eat(h))return n(x),"string";e.eat("&")||e.next()}}return n(i),"error"}function x(e,n){return e.eat("\\")?f(e,n,p):(e.next(),n(i),"error")}var m=(function(){var e={};function n(t){return function(){for(var r=0;r","@","~","=>"),n("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),n("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),n("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3"),e})();const F={name:"haskell",startState:function(){return{f:i}},copyState:function(e){return{f:e.f}},token:function(e,n){var t=n.f(e,function(a){n.f=a}),r=e.current();return m.hasOwnProperty(r)?m[r]:t},languageData:{commentTokens:{line:"--",block:{open:"{-",close:"-}"}}}};export{F as haskell}; diff --git a/pkg/cli/webapp/dist/assets/haxe-H-WmDvRZ.js b/pkg/cli/webapp/dist/assets/haxe-H-WmDvRZ.js new file mode 100644 index 0000000..18be189 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/haxe-H-WmDvRZ.js @@ -0,0 +1 @@ +function o(e){return{type:e,style:"keyword"}}var P=o("keyword a"),W=o("keyword b"),g=o("keyword c"),K=o("operator"),z={type:"atom",style:"atom"},y={type:"attribute",style:"attribute"},c=o("typedef"),B={if:P,while:P,else:W,do:W,try:W,return:g,break:g,continue:g,new:g,throw:g,var:o("var"),inline:y,static:y,using:o("import"),public:y,private:y,cast:o("cast"),import:o("import"),macro:o("macro"),function:o("function"),catch:o("catch"),untyped:o("untyped"),callback:o("cb"),for:o("for"),switch:o("switch"),case:o("case"),default:o("default"),in:K,never:o("property_access"),trace:o("trace"),class:c,abstract:c,enum:c,interface:c,typedef:c,extends:c,implements:c,dynamic:c,true:z,false:z,null:z},E=/[+\-*&%=<>!?|]/;function I(e,r,n){return r.tokenize=n,n(e,r)}function L(e,r){for(var n=!1,i;(i=e.next())!=null;){if(i==r&&!n)return!0;n=!n&&i=="\\"}}var c,N;function p(e,r,n){return c=e,N=n,r}function A(e,r){var n=e.next();if(n=='"'||n=="'")return I(e,r,M(n));if(/[\[\]{}\(\),;\:\.]/.test(n))return p(n);if(n=="0"&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),p("number","number");if(/\d/.test(n)||n=="-"&&e.eat(/\d/))return e.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/),p("number","number");if(r.reAllowed&&n=="~"&&e.eat(/\//))return L(e,"/"),e.eatWhile(/[gimsu]/),p("regexp","string.special");if(n=="/")return e.eat("*")?I(e,r,Q):e.eat("/")?(e.skipToEnd(),p("comment","comment")):(e.eatWhile(E),p("operator",null,e.current()));if(n=="#")return e.skipToEnd(),p("conditional","meta");if(n=="@")return e.eat(/:/),e.eatWhile(/[\w_]/),p("metadata","meta");if(E.test(n))return e.eatWhile(E),p("operator",null,e.current());var i;if(/[A-Z]/.test(n))return e.eatWhile(/[\w_<>]/),i=e.current(),p("type","type",i);e.eatWhile(/[\w_]/);var i=e.current(),u=B.propertyIsEnumerable(i)&&B[i];return u&&r.kwAllowed?p(u.type,u.style,i):p("variable","variable",i)}function M(e){return function(r,n){return L(r,e)&&(n.tokenize=A),p("string","string")}}function Q(e,r){for(var n=!1,i;i=e.next();){if(i=="/"&&n){r.tokenize=A;break}n=i=="*"}return p("comment","comment")}var $={atom:!0,number:!0,variable:!0,string:!0,regexp:!0};function j(e,r,n,i,u,s){this.indented=e,this.column=r,this.type=n,this.prev=u,this.info=s,i!=null&&(this.align=i)}function R(e,r){for(var n=e.localVars;n;n=n.next)if(n.name==r)return!0}function X(e,r,n,i,u){var s=e.cc;for(a.state=e,a.stream=u,a.marked=null,a.cc=s,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var k=s.length?s.pop():x;if(k(n,i)){for(;s.length&&s[s.length-1].lex;)s.pop()();return a.marked?a.marked:n=="variable"&&R(e,i)?"variableName.local":n=="variable"&&Y(e,i)?"variableName.special":r}}}function Y(e,r){if(/[a-z]/.test(r.charAt(0)))return!1;for(var n=e.importedtypes.length,i=0;i=0;e--)a.cc.push(arguments[e])}function t(){return b.apply(null,arguments),!0}function H(e,r){for(var n=r;n;n=n.next)if(n.name==e)return!0;return!1}function S(e){var r=a.state;if(r.context){if(a.marked="def",H(e,r.localVars))return;r.localVars={name:e,next:r.localVars}}else if(r.globalVars){if(H(e,r.globalVars))return;r.globalVars={name:e,next:r.globalVars}}}var ee={name:"this",next:null};function D(){a.state.context||(a.state.localVars=ee),a.state.context={prev:a.state.context,vars:a.state.localVars}}function V(){a.state.localVars=a.state.context.vars,a.state.context=a.state.context.prev}V.lex=!0;function l(e,r){var n=function(){var i=a.state;i.lexical=new j(i.indented,a.stream.column(),e,null,i.lexical,r)};return n.lex=!0,n}function f(){var e=a.state;e.lexical.prev&&(e.lexical.type==")"&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}f.lex=!0;function d(e){function r(n){return n==e?t():e==";"?b():t(r)}return r}function x(e){return e=="@"?t(Z):e=="var"?t(l("vardef"),C,d(";"),f):e=="keyword a"?t(l("form"),h,x,f):e=="keyword b"?t(l("form"),x,f):e=="{"?t(l("}"),D,_,f,V):e==";"?t():e=="attribute"?t(U):e=="function"?t(w):e=="for"?t(l("form"),d("("),l(")"),ae,d(")"),f,x,f):e=="variable"?t(l("stat"),te):e=="switch"?t(l("form"),h,l("}","switch"),d("{"),_,f,f):e=="case"?t(h,d(":")):e=="default"?t(d(":")):e=="catch"?t(l("form"),D,d("("),J,d(")"),x,f,V):e=="import"?t(q,d(";")):e=="typedef"?t(ne):b(l("stat"),h,d(";"),f)}function h(e){return $.hasOwnProperty(e)||e=="type"?t(v):e=="function"?t(w):e=="keyword c"?t(O):e=="("?t(l(")"),O,d(")"),f,v):e=="operator"?t(h):e=="["?t(l("]"),m(O,"]"),f,v):e=="{"?t(l("}"),m(ue,"}"),f,v):t()}function O(e){return e.match(/[;\}\)\],]/)?b():b(h)}function v(e,r){if(e=="operator"&&/\+\+|--/.test(r))return t(v);if(e=="operator"||e==":")return t(h);if(e!=";"){if(e=="(")return t(l(")"),m(h,")"),f,v);if(e==".")return t(ie,v);if(e=="[")return t(l("]"),h,d("]"),f,v)}}function U(e){if(e=="attribute")return t(U);if(e=="function")return t(w);if(e=="var")return t(C)}function Z(e){if(e==":"||e=="variable")return t(Z);if(e=="(")return t(l(")"),m(re,")"),f,x)}function re(e){if(e=="variable")return t()}function q(e,r){if(e=="variable"&&/[A-Z]/.test(r.charAt(0)))return F(r),t();if(e=="variable"||e=="property"||e=="."||r=="*")return t(q)}function ne(e,r){if(e=="variable"&&/[A-Z]/.test(r.charAt(0)))return F(r),t();if(e=="type"&&/[A-Z]/.test(r.charAt(0)))return t()}function te(e){return e==":"?t(f,x):b(v,d(";"),f)}function ie(e){if(e=="variable")return a.marked="property",t()}function ue(e){if(e=="variable"&&(a.marked="property"),$.hasOwnProperty(e))return t(d(":"),h)}function m(e,r){function n(i){return i==","?t(e,n):i==r?t():t(d(r))}return function(i){return i==r?t():b(e,n)}}function _(e){return e=="}"?t():b(x,_)}function C(e,r){return e=="variable"?(S(r),t(T,G)):t()}function G(e,r){if(r=="=")return t(h,G);if(e==",")return t(C)}function ae(e,r){return e=="variable"?(S(r),t(fe,h)):b()}function fe(e,r){if(r=="in")return t()}function w(e,r){if(e=="variable"||e=="type")return S(r),t(w);if(r=="new")return t(w);if(e=="(")return t(l(")"),D,m(J,")"),f,T,x,V)}function T(e){if(e==":")return t(oe)}function oe(e){if(e=="type"||e=="variable")return t();if(e=="{")return t(l("}"),m(le,"}"),f)}function le(e){if(e=="variable")return t(T)}function J(e,r){if(e=="variable")return S(r),t(T)}const ce={name:"haxe",startState:function(e){var r=["Int","Float","String","Void","Std","Bool","Dynamic","Array"],n={tokenize:A,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new j(-e,0,"block",!1),importedtypes:r,context:null,indented:0};return n},token:function(e,r){if(e.sol()&&(r.lexical.hasOwnProperty("align")||(r.lexical.align=!1),r.indented=e.indentation()),e.eatSpace())return null;var n=r.tokenize(e,r);return c=="comment"?n:(r.reAllowed=!!(c=="operator"||c=="keyword c"||c.match(/^[\[{}\(,;:]$/)),r.kwAllowed=c!=".",X(r,n,c,N,e))},indent:function(e,r,n){if(e.tokenize!=A)return 0;var i=r&&r.charAt(0),u=e.lexical;u.type=="stat"&&i=="}"&&(u=u.prev);var s=u.type,k=i==s;return s=="vardef"?u.indented+4:s=="form"&&i=="{"?u.indented:s=="stat"||s=="form"?u.indented+n.unit:u.info=="switch"&&!k?u.indented+(/^(?:case|default)\b/.test(r)?n.unit:2*n.unit):u.align?u.column+(k?0:1):u.indented+(k?0:n.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}},se={name:"hxml",startState:function(){return{define:!1,inString:!1}},token:function(e,r){var u=e.peek(),n=e.sol();if(u=="#")return e.skipToEnd(),"comment";if(n&&u=="-"){var i="variable-2";return e.eat(/-/),e.peek()=="-"&&(e.eat(/-/),i="keyword a"),e.peek()=="D"&&(e.eat(/[D]/),i="keyword c",r.define=!0),e.eatWhile(/[A-Z]/i),i}var u=e.peek();return r.inString==!1&&u=="'"&&(r.inString=!0,e.next()),r.inString==!0?(e.skipTo("'")||e.skipToEnd(),e.peek()=="'"&&(e.next(),r.inString=!1),"string"):(e.next(),null)},languageData:{commentTokens:{line:"#"}}};export{ce as haxe,se as hxml}; diff --git a/pkg/cli/webapp/dist/assets/highlighted-body-OFNGDK62-BAeNppwW.js b/pkg/cli/webapp/dist/assets/highlighted-body-OFNGDK62-BAeNppwW.js new file mode 100644 index 0000000..39eada8 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/highlighted-body-OFNGDK62-BAeNppwW.js @@ -0,0 +1 @@ +import{R as c,L as x,A as d}from"./mermaid-GHXKKRXX-Cue24Ovd.js";import{r as s,j as f}from"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-vBeBfY-6.js";import"./index-DIIxsTGV.js";var b=({code:i,language:e,raw:t,className:m,startLine:u,lineNumbers:n,...g})=>{let{shikiTheme:o}=s.useContext(c),r=x(),[h,a]=s.useState(t);return s.useEffect(()=>{if(!r){a(t);return}let l=r.highlight({code:i,language:e,themes:o},p=>{a(p)});l&&a(l)},[i,e,o,r,t]),f.jsx(d,{className:m,language:e,lineNumbers:n,result:h,startLine:u,...g})};export{b as HighlightedCodeBlockBody}; diff --git a/pkg/cli/webapp/dist/assets/html-C2L_23MC.js b/pkg/cli/webapp/dist/assets/html-C2L_23MC.js new file mode 100644 index 0000000..d869b99 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/html-C2L_23MC.js @@ -0,0 +1 @@ +import t from"./javascript-ySlJ1b_l.js";import e from"./css-BPhBrDlE.js";const n=Object.freeze(JSON.parse(`{"displayName":"HTML","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"comment":"Uses R: to ensure this matches after any other injections.","patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"html","patterns":[{"include":"#xml-processing"},{"include":"#comment"},{"include":"#doctype"},{"include":"#cdata"},{"include":"#tags-valid"},{"include":"#tags-invalid"},{"include":"#entities"}],"repository":{"attribute":{"patterns":[{"begin":"(s(hape|cope|t(ep|art)|ize(s)?|p(ellcheck|an)|elected|lot|andbox|rc(set|doc|lang)?)|h(ttp-equiv|i(dden|gh)|e(ight|aders)|ref(lang)?)|n(o(nce|validate|module)|ame)|c(h(ecked|arset)|ite|o(nt(ent(editable)?|rols)|ords|l(s(pan)?|or))|lass|rossorigin)|t(ype(mustmatch)?|itle|a(rget|bindex)|ranslate)|i(s(map)?|n(tegrity|putmode)|tem(scope|type|id|prop|ref)|d)|op(timum|en)|d(i(sabled|r(name)?)|ownload|e(coding|f(er|ault))|at(etime|a)|raggable)|usemap|p(ing|oster|la(ysinline|ceholder)|attern|reload)|enctype|value|kind|for(m(novalidate|target|enctype|action|method)?)?|w(idth|rap)|l(ist|o(op|w)|a(ng|bel))|a(s(ync)?|c(ce(sskey|pt(-charset)?)|tion)|uto(c(omplete|apitalize)|play|focus)|l(t|low(usermedia|paymentrequest|fullscreen))|bbr)|r(ows(pan)?|e(versed|quired|ferrerpolicy|l|adonly))|m(in(length)?|u(ted|ltiple)|e(thod|dia)|a(nifest|x(length)?)))(?![\\\\w:-])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"comment":"HTML5 attributes, not event handlers","end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"style(?![\\\\w:-])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"comment":"HTML5 style attribute","end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.style.html","patterns":[{"begin":"=","beginCaptures":{"0":{"name":"punctuation.separator.key-value.html"}},"end":"(?<=[^\\\\s=])(?!\\\\s*=)|(?=/?>)","patterns":[{"begin":"(?=[^\\\\s=<>\`/]|/(?!>))","end":"(?!\\\\G)","name":"meta.embedded.line.css","patterns":[{"captures":{"0":{"name":"source.css"}},"match":"([^\\\\s\\"'=<>\`/]|/(?!>))+","name":"string.unquoted.html"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"source.css","end":"(\\")","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"},"1":{"name":"source.css"}},"name":"string.quoted.double.html","patterns":[{"include":"#entities"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"source.css","end":"(')","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"},"1":{"name":"source.css"}},"name":"string.quoted.single.html","patterns":[{"include":"#entities"}]}]},{"match":"=","name":"invalid.illegal.unexpected-equals-sign.html"}]}]},{"begin":"on(s(croll|t(orage|alled)|u(spend|bmit)|e(curitypolicyviolation|ek(ing|ed)|lect))|hashchange|c(hange|o(ntextmenu|py)|u(t|echange)|l(ick|ose)|an(cel|play(through)?))|t(imeupdate|oggle)|in(put|valid)|o(nline|ffline)|d(urationchange|r(op|ag(start|over|e(n(ter|d)|xit)|leave)?)|blclick)|un(handledrejection|load)|p(opstate|lay(ing)?|a(ste|use|ge(show|hide))|rogress)|e(nded|rror|mptied)|volumechange|key(down|up|press)|focus|w(heel|aiting)|l(oad(start|e(nd|d(data|metadata)))?|anguagechange)|a(uxclick|fterprint|bort)|r(e(s(ize|et)|jectionhandled)|atechange)|m(ouse(o(ut|ver)|down|up|enter|leave|move)|essage(error)?)|b(efore(unload|print)|lur))(?![\\\\w:-])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"comment":"HTML5 attributes, event handlers","end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.event-handler.$1.html","patterns":[{"begin":"=","beginCaptures":{"0":{"name":"punctuation.separator.key-value.html"}},"end":"(?<=[^\\\\s=])(?!\\\\s*=)|(?=/?>)","patterns":[{"begin":"(?=[^\\\\s=<>\`/]|/(?!>))","end":"(?!\\\\G)","name":"meta.embedded.line.js","patterns":[{"captures":{"0":{"name":"source.js"},"1":{"patterns":[{"include":"source.js"}]}},"match":"(([^\\\\s\\"'=<>\`/]|/(?!>))+)","name":"string.unquoted.html"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"source.js","end":"(\\")","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"},"1":{"name":"source.js"}},"name":"string.quoted.double.html","patterns":[{"captures":{"0":{"patterns":[{"include":"source.js"}]}},"match":"([^\\\\n\\"/]|/(?![/*]))+"},{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.js"}},"end":"(?=\\")|\\\\n","name":"comment.line.double-slash.js"},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.js"}},"end":"(?=\\")|\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.js"}},"name":"comment.block.js"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"source.js","end":"(')","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"},"1":{"name":"source.js"}},"name":"string.quoted.single.html","patterns":[{"captures":{"0":{"patterns":[{"include":"source.js"}]}},"match":"([^\\\\n'/]|/(?![/*]))+"},{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.js"}},"end":"(?=')|\\\\n","name":"comment.line.double-slash.js"},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.js"}},"end":"(?=')|\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.js"}},"name":"comment.block.js"}]}]},{"match":"=","name":"invalid.illegal.unexpected-equals-sign.html"}]}]},{"begin":"(data-[a-z\\\\-]+)(?![\\\\w:-])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"comment":"HTML5 attributes, data-*","end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.data-x.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"(align|bgcolor|border)(?![\\\\w:-])","beginCaptures":{"0":{"name":"invalid.deprecated.entity.other.attribute-name.html"}},"comment":"HTML attributes, deprecated","end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"([^\\\\x{0020}\\"'<>/=\\\\x{0000}-\\\\x{001F}\\\\x{007F}-\\\\x{009F}\\\\x{FDD0}-\\\\x{FDEF}\\\\x{FFFE}\\\\x{FFFF}\\\\x{1FFFE}\\\\x{1FFFF}\\\\x{2FFFE}\\\\x{2FFFF}\\\\x{3FFFE}\\\\x{3FFFF}\\\\x{4FFFE}\\\\x{4FFFF}\\\\x{5FFFE}\\\\x{5FFFF}\\\\x{6FFFE}\\\\x{6FFFF}\\\\x{7FFFE}\\\\x{7FFFF}\\\\x{8FFFE}\\\\x{8FFFF}\\\\x{9FFFE}\\\\x{9FFFF}\\\\x{AFFFE}\\\\x{AFFFF}\\\\x{BFFFE}\\\\x{BFFFF}\\\\x{CFFFE}\\\\x{CFFFF}\\\\x{DFFFE}\\\\x{DFFFF}\\\\x{EFFFE}\\\\x{EFFFF}\\\\x{FFFFE}\\\\x{FFFFF}\\\\x{10FFFE}\\\\x{10FFFF}]+)","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"comment":"Anything else that is valid","end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.unrecognized.$1.html","patterns":[{"include":"#attribute-interior"}]},{"match":"[^\\\\s>]+","name":"invalid.illegal.character-not-allowed-here.html"}]},"attribute-interior":{"patterns":[{"begin":"=","beginCaptures":{"0":{"name":"punctuation.separator.key-value.html"}},"end":"(?<=[^\\\\s=])(?!\\\\s*=)|(?=/?>)","patterns":[{"match":"([^\\\\s\\"'=<>\`/]|/(?!>))+","name":"string.unquoted.html"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#entities"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.single.html","patterns":[{"include":"#entities"}]},{"match":"=","name":"invalid.illegal.unexpected-equals-sign.html"}]}]},"cdata":{"begin":"","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.cdata.html"},"comment":{"begin":"","name":"comment.block.html","patterns":[{"match":"\\\\G-?>","name":"invalid.illegal.characters-not-allowed-here.html"},{"match":")","name":"invalid.illegal.characters-not-allowed-here.html"},{"match":"--!>","name":"invalid.illegal.characters-not-allowed-here.html"}]},"core-minus-invalid":{"comment":"This should be the root pattern array includes minus #tags-invalid","patterns":[{"include":"#xml-processing"},{"include":"#comment"},{"include":"#doctype"},{"include":"#cdata"},{"include":"#tags-valid"},{"include":"#entities"}]},"doctype":{"begin":"","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.doctype.html","patterns":[{"match":"\\\\G(?i:DOCTYPE)","name":"entity.name.tag.html"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.html"},{"match":"[^\\\\s>]+","name":"entity.other.attribute-name.html"}]},"entities":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.html"},"912":{"name":"punctuation.definition.entity.html"}},"comment":"Yes this is a bit ridiculous, there are quite a lot of these","match":"(&)(?=[a-zA-Z])((a(s(ymp(eq)?|cr|t)|n(d(slope|d|v|and)?|g(s(t|ph)|zarr|e|le|rt(vb(d)?)?|msd(a(h|c|d|e|f|a|g|b))?)?)|c(y|irc|d|ute|E)?|tilde|o(pf|gon)|uml|p(id|os|prox(eq)?|e|E|acir)?|elig|f(r)?|w(conint|int)|l(pha|e(ph|fsym))|acute|ring|grave|m(p|a(cr|lg))|breve)|A(s(sign|cr)|nd|MP|c(y|irc)|tilde|o(pf|gon)|uml|pplyFunction|fr|Elig|lpha|acute|ring|grave|macr|breve))|(B(scr|cy|opf|umpeq|e(cause|ta|rnoullis)|fr|a(ckslash|r(v|wed))|reve)|b(s(cr|im(e)?|ol(hsub|b)?|emi)|n(ot|e(quiv)?)|c(y|ong)|ig(s(tar|qcup)|c(irc|up|ap)|triangle(down|up)|o(times|dot|plus)|uplus|vee|wedge)|o(t(tom)?|pf|wtie|x(h(d|u|D|U)?|times|H(d|u|D|U)?|d(R|l|r|L)|u(R|l|r|L)|plus|D(R|l|r|L)|v(R|h|H|l|r|L)?|U(R|l|r|L)|V(R|h|H|l|r|L)?|minus|box))|Not|dquo|u(ll(et)?|mp(e(q)?|E)?)|prime|e(caus(e)?|t(h|ween|a)|psi|rnou|mptyv)|karow|fr|l(ock|k(1(2|4)|34)|a(nk|ck(square|triangle(down|left|right)?|lozenge)))|a(ck(sim(eq)?|cong|prime|epsilon)|r(vee|wed(ge)?))|r(eve|vbar)|brk(tbrk)?))|(c(s(cr|u(p(e)?|b(e)?))|h(cy|i|eck(mark)?)|ylcty|c(irc|ups(sm)?|edil|a(ps|ron))|tdot|ir(scir|c(eq|le(d(R|circ|S|dash|ast)|arrow(left|right)))?|e|fnint|E|mid)?|o(n(int|g(dot)?)|p(y(sr)?|f|rod)|lon(e(q)?)?|m(p(fn|le(xes|ment))?|ma(t)?))|dot|u(darr(l|r)|p(s|c(up|ap)|or|dot|brcap)?|e(sc|pr)|vee|wed|larr(p)?|r(vearrow(left|right)|ly(eq(succ|prec)|vee|wedge)|arr(m)?|ren))|e(nt(erdot)?|dil|mptyv)|fr|w(conint|int)|lubs(uit)?|a(cute|p(s|c(up|ap)|dot|and|brcup)?|r(on|et))|r(oss|arr))|C(scr|hi|c(irc|onint|edil|aron)|ircle(Minus|Times|Dot|Plus)|Hcy|o(n(tourIntegral|int|gruent)|unterClockwiseContourIntegral|p(f|roduct)|lon(e)?)|dot|up(Cap)?|OPY|e(nterDot|dilla)|fr|lo(seCurly(DoubleQuote|Quote)|ckwiseContourIntegral)|a(yleys|cute|p(italDifferentialD)?)|ross))|(d(s(c(y|r)|trok|ol)|har(l|r)|c(y|aron)|t(dot|ri(f)?)|i(sin|e|v(ide(ontimes)?|onx)?|am(s|ond(suit)?)?|gamma)|Har|z(cy|igrarr)|o(t(square|plus|eq(dot)?|minus)?|ublebarwedge|pf|wn(harpoon(left|right)|downarrows|arrow)|llar)|d(otseq|a(rr|gger))?|u(har|arr)|jcy|e(lta|g|mptyv)|f(isht|r)|wangle|lc(orn|rop)|a(sh(v)?|leth|rr|gger)|r(c(orn|rop)|bkarow)|b(karow|lac)|Arr)|D(s(cr|trok)|c(y|aron)|Scy|i(fferentialD|a(critical(Grave|Tilde|Do(t|ubleAcute)|Acute)|mond))|o(t(Dot|Equal)?|uble(Right(Tee|Arrow)|ContourIntegral|Do(t|wnArrow)|Up(DownArrow|Arrow)|VerticalBar|L(ong(RightArrow|Left(RightArrow|Arrow))|eft(RightArrow|Tee|Arrow)))|pf|wn(Right(TeeVector|Vector(Bar)?)|Breve|Tee(Arrow)?|arrow|Left(RightVector|TeeVector|Vector(Bar)?)|Arrow(Bar|UpArrow)?))|Zcy|el(ta)?|D(otrahd)?|Jcy|fr|a(shv|rr|gger)))|(e(s(cr|im|dot)|n(sp|g)|c(y|ir(c)?|olon|aron)|t(h|a)|o(pf|gon)|dot|u(ro|ml)|p(si(v|lon)?|lus|ar(sl)?)|e|D(ot|Dot)|q(s(im|lant(less|gtr))|c(irc|olon)|u(iv(DD)?|est|als)|vparsl)|f(Dot|r)|l(s(dot)?|inters|l)?|a(ster|cute)|r(Dot|arr)|g(s(dot)?|rave)?|x(cl|ist|p(onentiale|ectation))|m(sp(1(3|4))?|pty(set|v)?|acr))|E(s(cr|im)|c(y|irc|aron)|ta|o(pf|gon)|NG|dot|uml|TH|psilon|qu(ilibrium|al(Tilde)?)|fr|lement|acute|grave|x(ists|ponentialE)|m(pty(SmallSquare|VerySmallSquare)|acr)))|(f(scr|nof|cy|ilig|o(pf|r(k(v)?|all))|jlig|partint|emale|f(ilig|l(ig|lig)|r)|l(tns|lig|at)|allingdotseq|r(own|a(sl|c(1(2|8|3|4|5|6)|78|2(3|5)|3(8|4|5)|45|5(8|6)))))|F(scr|cy|illed(SmallSquare|VerySmallSquare)|o(uriertrf|pf|rAll)|fr))|(G(scr|c(y|irc|edil)|t|opf|dot|T|Jcy|fr|amma(d)?|reater(Greater|SlantEqual|Tilde|Equal(Less)?|FullEqual|Less)|g|breve)|g(s(cr|im(e|l)?)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|irc)|t(c(c|ir)|dot|quest|lPar|r(sim|dot|eq(qless|less)|less|a(pprox|rr)))?|imel|opf|dot|jcy|e(s(cc|dot(o(l)?)?|l(es)?)?|q(slant|q)?|l)?|v(nE|ertneqq)|fr|E(l)?|l(j|E|a)?|a(cute|p|mma(d)?)|rave|g(g)?|breve))|(h(s(cr|trok|lash)|y(phen|bull)|circ|o(ok(leftarrow|rightarrow)|pf|arr|rbar|mtht)|e(llip|arts(uit)?|rcon)|ks(earow|warow)|fr|a(irsp|lf|r(dcy|r(cir|w)?)|milt)|bar|Arr)|H(s(cr|trok)|circ|ilbertSpace|o(pf|rizontalLine)|ump(DownHump|Equal)|fr|a(cek|t)|ARDcy))|(i(s(cr|in(s(v)?|dot|v|E)?)|n(care|t(cal|prod|e(rcal|gers)|larhk)?|odot|fin(tie)?)?|c(y|irc)?|t(ilde)?|i(nfin|i(nt|int)|ota)?|o(cy|ta|pf|gon)|u(kcy|ml)|jlig|prod|e(cy|xcl)|quest|f(f|r)|acute|grave|m(of|ped|a(cr|th|g(part|e|line))))|I(scr|n(t(e(rsection|gral))?|visible(Comma|Times))|c(y|irc)|tilde|o(ta|pf|gon)|dot|u(kcy|ml)|Ocy|Jlig|fr|Ecy|acute|grave|m(plies|a(cr|ginaryI))?))|(j(s(cr|ercy)|c(y|irc)|opf|ukcy|fr|math)|J(s(cr|ercy)|c(y|irc)|opf|ukcy|fr))|(k(scr|hcy|c(y|edil)|opf|jcy|fr|appa(v)?|green)|K(scr|c(y|edil)|Hcy|opf|Jcy|fr|appa))|(l(s(h|cr|trok|im(e|g)?|q(uo(r)?|b)|aquo)|h(ar(d|u(l)?)|blk)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|ub|e(il|dil)|aron)|Barr|t(hree|c(c|ir)|imes|dot|quest|larr|r(i(e|f)?|Par))?|Har|o(ng(left(arrow|rightarrow)|rightarrow|mapsto)|times|z(enge|f)?|oparrow(left|right)|p(f|lus|ar)|w(ast|bar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|r(dhar|ushar))|ur(dshar|uhar)|jcy|par(lt)?|e(s(s(sim|dot|eq(qgtr|gtr)|approx|gtr)|cc|dot(o(r)?)?|g(es)?)?|q(slant|q)?|ft(harpoon(down|up)|threetimes|leftarrows|arrow(tail)?|right(squigarrow|harpoons|arrow(s)?))|g)?|v(nE|ertneqq)|f(isht|loor|r)|E(g)?|l(hard|corner|tri|arr)?|a(ng(d|le)?|cute|t(e(s)?|ail)?|p|emptyv|quo|rr(sim|hk|tl|pl|fs|lp|b(fs)?)?|gran|mbda)|r(har(d)?|corner|tri|arr|m)|g(E)?|m(idot|oust(ache)?)|b(arr|r(k(sl(d|u)|e)|ac(e|k))|brk)|A(tail|arr|rr))|L(s(h|cr|trok)|c(y|edil|aron)|t|o(ng(RightArrow|left(arrow|rightarrow)|rightarrow|Left(RightArrow|Arrow))|pf|wer(RightArrow|LeftArrow))|T|e(ss(Greater|SlantEqual|Tilde|EqualGreater|FullEqual|Less)|ft(Right(Vector|Arrow)|Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|rightarrow|Floor|A(ngleBracket|rrow(RightArrow|Bar)?)))|Jcy|fr|l(eftarrow)?|a(ng|cute|placetrf|rr|mbda)|midot))|(M(scr|cy|inusPlus|opf|u|e(diumSpace|llintrf)|fr|ap)|m(s(cr|tpos)|ho|nplus|c(y|omma)|i(nus(d(u)?|b)?|cro|d(cir|dot|ast)?)|o(dels|pf)|dash|u(ltimap|map)?|p|easuredangle|DDot|fr|l(cp|dr)|a(cr|p(sto(down|up|left)?)?|l(t(ese)?|e)|rker)))|(n(s(hort(parallel|mid)|c(cue|e|r)?|im(e(q)?)?|u(cc(eq)?|p(set(eq(q)?)?|e|E)?|b(set(eq(q)?)?|e|E)?)|par|qsu(pe|be)|mid)|Rightarrow|h(par|arr|Arr)|G(t(v)?|g)|c(y|ong(dot)?|up|edil|a(p|ron))|t(ilde|lg|riangle(left(eq)?|right(eq)?)|gl)|i(s(d)?|v)?|o(t(ni(v(c|a|b))?|in(dot|v(c|a|b)|E)?)?|pf)|dash|u(m(sp|ero)?)?|jcy|p(olint|ar(sl|t|allel)?|r(cue|e(c(eq)?)?)?)|e(s(im|ear)|dot|quiv|ar(hk|r(ow)?)|xist(s)?|Arr)?|v(sim|infin|Harr|dash|Dash|l(t(rie)?|e|Arr)|ap|r(trie|Arr)|g(t|e))|fr|w(near|ar(hk|r(ow)?)|Arr)|V(dash|Dash)|l(sim|t(ri(e)?)?|dr|e(s(s)?|q(slant|q)?|ft(arrow|rightarrow))?|E|arr|Arr)|a(ng|cute|tur(al(s)?)?|p(id|os|prox|E)?|bla)|r(tri(e)?|ightarrow|arr(c|w)?|Arr)|g(sim|t(r)?|e(s|q(slant|q)?)?|E)|mid|L(t(v)?|eft(arrow|rightarrow)|l)|b(sp|ump(e)?))|N(scr|c(y|edil|aron)|tilde|o(nBreakingSpace|Break|t(R(ightTriangle(Bar|Equal)?|everseElement)|Greater(Greater|SlantEqual|Tilde|Equal|FullEqual|Less)?|S(u(cceeds(SlantEqual|Tilde|Equal)?|perset(Equal)?|bset(Equal)?)|quareSu(perset(Equal)?|bset(Equal)?))|Hump(DownHump|Equal)|Nested(GreaterGreater|LessLess)|C(ongruent|upCap)|Tilde(Tilde|Equal|FullEqual)?|DoubleVerticalBar|Precedes(SlantEqual|Equal)?|E(qual(Tilde)?|lement|xists)|VerticalBar|Le(ss(Greater|SlantEqual|Tilde|Equal|Less)?|ftTriangle(Bar|Equal)?))?|pf)|u|e(sted(GreaterGreater|LessLess)|wLine|gative(MediumSpace|Thi(nSpace|ckSpace)|VeryThinSpace))|Jcy|fr|acute))|(o(s(cr|ol|lash)|h(m|bar)|c(y|ir(c)?)|ti(lde|mes(as)?)|S|int|opf|d(sold|iv|ot|ash|blac)|uml|p(erp|lus|ar)|elig|vbar|f(cir|r)|l(c(ir|ross)|t|ine|arr)|a(st|cute)|r(slope|igof|or|d(er(of)?|f|m)?|v|arr)?|g(t|on|rave)|m(i(nus|cron|d)|ega|acr))|O(s(cr|lash)|c(y|irc)|ti(lde|mes)|opf|dblac|uml|penCurly(DoubleQuote|Quote)|ver(B(ar|rac(e|ket))|Parenthesis)|fr|Elig|acute|r|grave|m(icron|ega|acr)))|(p(s(cr|i)|h(i(v)?|one|mmat)|cy|i(tchfork|v)?|o(intint|und|pf)|uncsp|er(cnt|tenk|iod|p|mil)|fr|l(us(sim|cir|two|d(o|u)|e|acir|mn|b)?|an(ck(h)?|kv))|ar(s(im|l)|t|a(llel)?)?|r(sim|n(sim|E|ap)|cue|ime(s)?|o(d|p(to)?|f(surf|line|alar))|urel|e(c(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?)?|E|ap)?|m)|P(s(cr|i)|hi|cy|i|o(incareplane|pf)|fr|lusMinus|artialD|r(ime|o(duct|portion(al)?)|ecedes(SlantEqual|Tilde|Equal)?)?))|(q(scr|int|opf|u(ot|est(eq)?|at(int|ernions))|prime|fr)|Q(scr|opf|UOT|fr))|(R(s(h|cr)|ho|c(y|edil|aron)|Barr|ight(Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|Floor|A(ngleBracket|rrow(Bar|LeftArrow)?))|o(undImplies|pf)|uleDelayed|e(verse(UpEquilibrium|E(quilibrium|lement)))?|fr|EG|a(ng|cute|rr(tl)?)|rightarrow)|r(s(h|cr|q(uo(r)?|b)|aquo)|h(o(v)?|ar(d|u(l)?))|nmid|c(y|ub|e(il|dil)|aron)|Barr|t(hree|imes|ri(e|f|ltri)?)|i(singdotseq|ng|ght(squigarrow|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(tail)?|rightarrows))|Har|o(times|p(f|lus|ar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|ldhar)|uluhar|p(polint|ar(gt)?)|e(ct|al(s|ine|part)?|g)|f(isht|loor|r)|l(har|arr|m)|a(ng(d|e|le)?|c(ute|e)|t(io(nals)?|ail)|dic|emptyv|quo|rr(sim|hk|c|tl|pl|fs|w|lp|ap|b(fs)?)?)|rarr|x|moust(ache)?|b(arr|r(k(sl(d|u)|e)|ac(e|k))|brk)|A(tail|arr|rr)))|(s(s(cr|tarf|etmn|mile)|h(y|c(hcy|y)|ort(parallel|mid)|arp)|c(sim|y|n(sim|E|ap)|cue|irc|polint|e(dil)?|E|a(p|ron))?|t(ar(f)?|r(ns|aight(phi|epsilon)))|i(gma(v|f)?|m(ne|dot|plus|e(q)?|l(E)?|rarr|g(E)?)?)|zlig|o(pf|ftcy|l(b(ar)?)?)|dot(e|b)?|u(ng|cc(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?|p(s(im|u(p|b)|et(neq(q)?|eq(q)?)?)|hs(ol|ub)|1|n(e|E)|2|d(sub|ot)|3|plus|e(dot)?|E|larr|mult)?|m|b(s(im|u(p|b)|et(neq(q)?|eq(q)?)?)|n(e|E)|dot|plus|e(dot)?|E|rarr|mult)?)|pa(des(uit)?|r)|e(swar|ct|tm(n|inus)|ar(hk|r(ow)?)|xt|mi|Arr)|q(su(p(set(eq)?|e)?|b(set(eq)?|e)?)|c(up(s)?|ap(s)?)|u(f|ar(e|f))?)|fr(own)?|w(nwar|ar(hk|r(ow)?)|Arr)|larr|acute|rarr|m(t(e(s)?)?|i(d|le)|eparsl|a(shp|llsetminus))|bquo)|S(scr|hort(RightArrow|DownArrow|UpArrow|LeftArrow)|c(y|irc|edil|aron)?|tar|igma|H(cy|CHcy)|opf|u(c(hThat|ceeds(SlantEqual|Tilde|Equal)?)|p(set|erset(Equal)?)?|m|b(set(Equal)?)?)|OFTcy|q(uare(Su(perset(Equal)?|bset(Equal)?)|Intersection|Union)?|rt)|fr|acute|mallCircle))|(t(s(hcy|c(y|r)|trok)|h(i(nsp|ck(sim|approx))|orn|e(ta(sym|v)?|re(4|fore))|k(sim|ap))|c(y|edil|aron)|i(nt|lde|mes(d|b(ar)?)?)|o(sa|p(cir|f(ork)?|bot)?|ea)|dot|prime|elrec|fr|w(ixt|ohead(leftarrow|rightarrow))|a(u|rget)|r(i(sb|time|dot|plus|e|angle(down|q|left(eq)?|right(eq)?)?|minus)|pezium|ade)|brk)|T(s(cr|trok)|RADE|h(i(nSpace|ckSpace)|e(ta|refore))|c(y|edil|aron)|S(cy|Hcy)|ilde(Tilde|Equal|FullEqual)?|HORN|opf|fr|a(u|b)|ripleDot))|(u(scr|h(ar(l|r)|blk)|c(y|irc)|t(ilde|dot|ri(f)?)|Har|o(pf|gon)|d(har|arr|blac)|u(arr|ml)|p(si(h|lon)?|harpoon(left|right)|downarrow|uparrows|lus|arrow)|f(isht|r)|wangle|l(c(orn(er)?|rop)|tri)|a(cute|rr)|r(c(orn(er)?|rop)|tri|ing)|grave|m(l|acr)|br(cy|eve)|Arr)|U(scr|n(ion(Plus)?|der(B(ar|rac(e|ket))|Parenthesis))|c(y|irc)|tilde|o(pf|gon)|dblac|uml|p(si(lon)?|downarrow|Tee(Arrow)?|per(RightArrow|LeftArrow)|DownArrow|Equilibrium|arrow|Arrow(Bar|DownArrow)?)|fr|a(cute|rr(ocir)?)|ring|grave|macr|br(cy|eve)))|(v(s(cr|u(pn(e|E)|bn(e|E)))|nsu(p|b)|cy|Bar(v)?|zigzag|opf|dash|prop|e(e(eq|bar)?|llip|r(t|bar))|Dash|fr|ltri|a(ngrt|r(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|t(heta|riangle(left|right))|p(hi|i|ropto)|epsilon|kappa|r(ho)?))|rtri|Arr)|V(scr|cy|opf|dash(l)?|e(e|r(yThinSpace|t(ical(Bar|Separator|Tilde|Line))?|bar))|Dash|vdash|fr|bar))|(w(scr|circ|opf|p|e(ierp|d(ge(q)?|bar))|fr|r(eath)?)|W(scr|circ|opf|edge|fr))|(X(scr|i|opf|fr)|x(s(cr|qcup)|h(arr|Arr)|nis|c(irc|up|ap)|i|o(time|dot|p(f|lus))|dtri|u(tri|plus)|vee|fr|wedge|l(arr|Arr)|r(arr|Arr)|map))|(y(scr|c(y|irc)|icy|opf|u(cy|ml)|en|fr|ac(y|ute))|Y(scr|c(y|irc)|opf|uml|Icy|Ucy|fr|acute|Acy))|(z(scr|hcy|c(y|aron)|igrarr|opf|dot|e(ta|etrf)|fr|w(nj|j)|acute)|Z(scr|c(y|aron)|Hcy|opf|dot|e(ta|roWidthSpace)|fr|acute)))(;)","name":"constant.character.entity.named.$2.html"},{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)#[0-9]+(;)","name":"constant.character.entity.numeric.decimal.html"},{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)#[xX][0-9a-fA-F]+(;)","name":"constant.character.entity.numeric.hexadecimal.html"},{"match":"&(?=[a-zA-Z0-9]+;)","name":"invalid.illegal.ambiguous-ampersand.html"}]},"math":{"patterns":[{"begin":"(?i)(<)(math)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.structure.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()","endCaptures":{"0":{"name":"meta.tag.structure.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.structure.$2.html","patterns":[{"begin":"(?)\\\\G","end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]}],"repository":{"attribute":{"patterns":[{"begin":"(s(hift|ymmetric|cript(sizemultiplier|level|minsize)|t(ackalign|retchy)|ide|u(pscriptshift|bscriptshift)|e(parator(s)?|lection)|rc)|h(eight|ref)|n(otation|umalign)|c(haralign|olumn(spa(n|cing)|width|lines|align)|lose|rossout)|i(n(dent(shift(first|last)?|target|align(first|last)?)|fixlinebreakstyle)|d)|o(pen|verflow)|d(i(splay(style)?|r)|e(nomalign|cimalpoint|pth))|position|e(dge|qual(columns|rows))|voffset|f(orm|ence|rame(spacing)?)|width|l(space|ine(thickness|leading|break(style|multchar)?)|o(ngdivstyle|cation)|ength|quote|argeop)|a(c(cent(under)?|tiontype)|l(t(text|img(-(height|valign|width))?)|ign(mentscope)?))|r(space|ow(spa(n|cing)|lines|align)|quote)|groupalign|x(link:href|mlns)|m(in(size|labelspacing)|ovablelimits|a(th(size|color|variant|background)|xsize))|bevelled)(?![\\\\w:-])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"([^\\\\x{0020}\\"'<>/=\\\\x{0000}-\\\\x{001F}\\\\x{007F}-\\\\x{009F}\\\\x{FDD0}-\\\\x{FDEF}\\\\x{FFFE}\\\\x{FFFF}\\\\x{1FFFE}\\\\x{1FFFF}\\\\x{2FFFE}\\\\x{2FFFF}\\\\x{3FFFE}\\\\x{3FFFF}\\\\x{4FFFE}\\\\x{4FFFF}\\\\x{5FFFE}\\\\x{5FFFF}\\\\x{6FFFE}\\\\x{6FFFF}\\\\x{7FFFE}\\\\x{7FFFF}\\\\x{8FFFE}\\\\x{8FFFF}\\\\x{9FFFE}\\\\x{9FFFF}\\\\x{AFFFE}\\\\x{AFFFF}\\\\x{BFFFE}\\\\x{BFFFF}\\\\x{CFFFE}\\\\x{CFFFF}\\\\x{DFFFE}\\\\x{DFFFF}\\\\x{EFFFE}\\\\x{EFFFF}\\\\x{FFFFE}\\\\x{FFFFF}\\\\x{10FFFE}\\\\x{10FFFF}]+)","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"comment":"Anything else that is valid","end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.unrecognized.$1.html","patterns":[{"include":"#attribute-interior"}]},{"match":"[^\\\\s>]+","name":"invalid.illegal.character-not-allowed-here.html"}]},"tags":{"patterns":[{"include":"#comment"},{"include":"#cdata"},{"captures":{"0":{"name":"meta.tag.structure.math.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.structure.math.$2.html"},{"begin":"(?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.structure.math.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.inline.math.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(mi|mn|mo|ms|mspace|mtext|maligngroup|malignmark)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.inline.math.$2.html"},{"begin":"(?i)(<)(mi|mn|mo|ms|mspace|mtext|maligngroup|malignmark)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.inline.math.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.object.math.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(mglyph)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.object.math.$2.html"},{"begin":"(?i)(<)(mglyph)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.object.math.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.other.invalid.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(([\\\\w:]+))(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.other.invalid.html"},{"begin":"(?i)(<)((\\\\w[^\\\\s>]*))(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.other.invalid.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.invalid.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"include":"#tags-invalid"}]}}},"svg":{"patterns":[{"begin":"(?i)(<)(svg)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.structure.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()","endCaptures":{"0":{"name":"meta.tag.structure.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.structure.$2.html","patterns":[{"begin":"(?)\\\\G","end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]}],"repository":{"attribute":{"patterns":[{"begin":"(s(hape-rendering|ystemLanguage|cale|t(yle|itchTiles|op-(color|opacity)|dDeviation|em(h|v)|artOffset|r(i(ng|kethrough-(thickness|position))|oke(-(opacity|dash(offset|array)|width|line(cap|join)|miterlimit))?))|urfaceScale|p(e(cular(Constant|Exponent)|ed)|acing|readMethod)|eed|lope)|h(oriz-(origin-x|adv-x)|eight|anging|ref(lang)?)|y(1|2|ChannelSelector)?|n(umOctaves|ame)|c(y|o(ntentS(criptType|tyleType)|lor(-(interpolation(-filters)?|profile|rendering))?)|ursor|l(ip(-(path|rule)|PathUnits)?|ass)|a(p-height|lcMode)|x)|t(ype|o|ext(-(decoration|anchor|rendering)|Length)|a(rget(X|Y)?|b(index|leValues))|ransform)|i(n(tercept|2)?|d(eographic)?|mage-rendering)|z(oomAndPan)?|o(p(erator|acity)|ver(flow|line-(thickness|position))|ffset|r(i(ent(ation)?|gin)|der))|d(y|i(splay|visor|ffuseConstant|rection)|ominant-baseline|ur|e(scent|celerate)|x)?|u(1|n(i(code(-(range|bidi))?|ts-per-em)|derline-(thickness|position))|2)|p(ing|oint(s(At(X|Y|Z))?|er-events)|a(nose-1|t(h(Length)?|tern(ContentUnits|Transform|Units))|int-order)|r(imitiveUnits|eserveA(spectRatio|lpha)))|e(n(d|able-background)|dgeMode|levation|x(ternalResourcesRequired|ponent))|v(i(sibility|ew(Box|Target))|-(hanging|ideographic|alphabetic|mathematical)|e(ctor-effect|r(sion|t-(origin-(y|x)|adv-y)))|alues)|k(1|2|3|e(y(Splines|Times|Points)|rn(ing|el(Matrix|UnitLength)))|4)?|f(y|il(ter(Res|Units)?|l(-(opacity|rule))?)|o(nt-(s(t(yle|retch)|ize(-adjust)?)|variant|family|weight)|rmat)|lood-(color|opacity)|r(om)?|x)|w(idth(s)?|ord-spacing|riting-mode)|l(i(ghting-color|mitingConeAngle)|ocal|e(ngthAdjust|tter-spacing)|ang)|a(scent|cc(umulate|ent-height)|ttribute(Name|Type)|zimuth|dditive|utoReverse|l(ignment-baseline|phabetic|lowReorder)|rabic-form|mplitude)|r(y|otate|e(s(tart|ult)|ndering-intent|peat(Count|Dur)|quired(Extensions|Features)|f(X|Y|errerPolicy)|l)|adius|x)?|g(1|2|lyph(Ref|-(name|orientation-(horizontal|vertical)))|radient(Transform|Units))|x(1|2|ChannelSelector|-height|link:(show|href|t(ype|itle)|a(ctuate|rcrole)|role)|ml:(space|lang|base))?|m(in|ode|e(thod|dia)|a(sk(ContentUnits|Units)?|thematical|rker(Height|-(start|end|mid)|Units|Width)|x))|b(y|ias|egin|ase(Profile|line-shift|Frequency)|box))(?![\\\\w:-])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"([^\\\\x{0020}\\"'<>/=\\\\x{0000}-\\\\x{001F}\\\\x{007F}-\\\\x{009F}\\\\x{FDD0}-\\\\x{FDEF}\\\\x{FFFE}\\\\x{FFFF}\\\\x{1FFFE}\\\\x{1FFFF}\\\\x{2FFFE}\\\\x{2FFFF}\\\\x{3FFFE}\\\\x{3FFFF}\\\\x{4FFFE}\\\\x{4FFFF}\\\\x{5FFFE}\\\\x{5FFFF}\\\\x{6FFFE}\\\\x{6FFFF}\\\\x{7FFFE}\\\\x{7FFFF}\\\\x{8FFFE}\\\\x{8FFFF}\\\\x{9FFFE}\\\\x{9FFFF}\\\\x{AFFFE}\\\\x{AFFFF}\\\\x{BFFFE}\\\\x{BFFFF}\\\\x{CFFFE}\\\\x{CFFFF}\\\\x{DFFFE}\\\\x{DFFFF}\\\\x{EFFFE}\\\\x{EFFFF}\\\\x{FFFFE}\\\\x{FFFFF}\\\\x{10FFFE}\\\\x{10FFFF}]+)","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"comment":"Anything else that is valid","end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.unrecognized.$1.html","patterns":[{"include":"#attribute-interior"}]},{"match":"[^\\\\s>]+","name":"invalid.illegal.character-not-allowed-here.html"}]},"tags":{"patterns":[{"include":"#comment"},{"include":"#cdata"},{"captures":{"0":{"name":"meta.tag.metadata.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(color-profile|desc|metadata|script|style|title)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.metadata.svg.$2.html"},{"begin":"(?i)(<)(color-profile|desc|metadata|script|style|title)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.metadata.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.structure.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.structure.svg.$2.html"},{"begin":"(?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.structure.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.inline.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.inline.svg.$2.html"},{"begin":"(?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.inline.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.object.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.object.svg.$2.html"},{"begin":"(?i)(<)(a|circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.object.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.other.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.other.svg.$2.html"},{"begin":"(?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.other.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.other.invalid.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(([\\\\w:]+))(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(/>))","name":"meta.element.other.invalid.html"},{"begin":"(?i)(<)((\\\\w[^\\\\s>]*))(?=\\\\s|/?>)(?:(([^\\"'>]|\\"[^\\"]*\\"|'[^']*')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.other.invalid.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)()|(/>)|(?=)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.invalid.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"include":"#tags-invalid"}]}}},"tags-invalid":{"patterns":[{"begin":"(]*))(?)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.$2.html","patterns":[{"include":"#attribute"}]}]},"tags-valid":{"patterns":[{"begin":"(^[ \\\\t]+)?(?=<(?i:style)\\\\b(?!-))","beginCaptures":{"1":{"name":"punctuation.whitespace.embedded.leading.html"}},"end":"(?!\\\\G)([ \\\\t]*$\\\\n?)?","endCaptures":{"1":{"name":"punctuation.whitespace.embedded.trailing.html"}},"patterns":[{"begin":"(?i)(<)(style)(?=\\\\s|/?>)","beginCaptures":{"0":{"name":"meta.tag.metadata.style.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"(?i)((<)/)(style)\\\\s*(>)","endCaptures":{"0":{"name":"meta.tag.metadata.style.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"source.css-ignored-vscode"},"3":{"name":"entity.name.tag.html"},"4":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.embedded.block.html","patterns":[{"begin":"\\\\G","captures":{"1":{"name":"punctuation.definition.tag.end.html"}},"end":"(>)","name":"meta.tag.metadata.style.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?!\\\\G)","end":"(?=)","endCaptures":{"0":{"name":"meta.tag.metadata.script.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.embedded.block.html","patterns":[{"begin":"\\\\G","end":"(?=/)","patterns":[{"begin":"(>)","beginCaptures":{"0":{"name":"meta.tag.metadata.script.start.html"},"1":{"name":"punctuation.definition.tag.end.html"}},"end":"((<))(?=/(?i:script))","endCaptures":{"0":{"name":"meta.tag.metadata.script.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"source.js-ignored-vscode"}},"patterns":[{"begin":"\\\\G","end":"(?=\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t# Tag without type attribute\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | type(?=[\\\\s=])\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t \\t(?!\\\\s*=\\\\s*\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t''\\t\\t\\t\\t\\t\\t\\t\\t# Empty\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | \\"\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t# Values\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | ('|\\"|)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttext/\\t\\t\\t\\t\\t\\t\\t# Text mime-types\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tjavascript(1\\\\.[0-5])?\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | x-javascript\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | jscript\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | livescript\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | (x-)?ecmascript\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | babel\\t\\t\\t\\t\\t\\t# Javascript variant currently\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t \\t\\t\\t\\t\\t\\t\\t\\t# recognized as such\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t \\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | application/\\t\\t\\t\\t\\t# Application mime-types\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t \\t(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(x-)?javascript\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | (x-)?ecmascript\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | module\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t \\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t[\\\\s\\"'>]\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)","name":"meta.tag.metadata.script.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?ix:\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(?=\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttype\\\\s*=\\\\s*\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t('|\\"|)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttext/\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tx-handlebars\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | (x-(handlebars-)?|ng-)?template\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t | html\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t[\\\\s\\"'>]\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t)","end":"((<))(?=/(?i:script))","endCaptures":{"0":{"name":"meta.tag.metadata.script.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"text.html.basic"}},"patterns":[{"begin":"\\\\G","end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.script.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?!\\\\G)","end":"(?=)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.script.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?!\\\\G)","end":"(?=)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(noscript|title)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)()","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(col|hr|input)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(address|article|aside|blockquote|body|button|caption|colgroup|datalist|dd|details|dialog|div|dl|dt|fieldset|figcaption|figure|footer|form|head|header|hgroup|html|h[1-6]|label|legend|li|main|map|menu|meter|nav|ol|optgroup|option|output|p|pre|progress|section|select|slot|summary|table|tbody|td|template|textarea|tfoot|th|thead|tr|ul)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)()","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(area|br|wbr)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|i|ins|kbd|mark|q|rp|rt|ruby|s|samp|small|span|strong|sub|sup|time|u|var)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)()","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(embed|img|param|source|track)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(audio|canvas|iframe|object|picture|video)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)()","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((basefont|isindex))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((center|frameset|noembed|noframes))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)()","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((acronym|big|blink|font|strike|tt|xmp))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)()","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((frame))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((applet))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)()","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((dir|keygen|listing|menuitem|plaintext|spacer))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.no-longer-supported.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)()","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.no-longer-supported.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.$2.end.html","patterns":[{"include":"#attribute"}]},{"include":"#math"},{"include":"#svg"},{"begin":"(<)([a-zA-Z][.0-9_a-zA-Z\\\\x{00B7}\\\\x{00C0}-\\\\x{00D6}\\\\x{00D8}-\\\\x{00F6}\\\\x{00F8}-\\\\x{037D}\\\\x{037F}-\\\\x{1FFF}\\\\x{200C}-\\\\x{200D}\\\\x{203F}-\\\\x{2040}\\\\x{2070}-\\\\x{218F}\\\\x{2C00}-\\\\x{2FEF}\\\\x{3001}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFFD}\\\\x{10000}-\\\\x{EFFFF}]*-[\\\\-.0-9_a-zA-Z\\\\x{00B7}\\\\x{00C0}-\\\\x{00D6}\\\\x{00D8}-\\\\x{00F6}\\\\x{00F8}-\\\\x{037D}\\\\x{037F}-\\\\x{1FFF}\\\\x{200C}-\\\\x{200D}\\\\x{203F}-\\\\x{2040}\\\\x{2070}-\\\\x{218F}\\\\x{2C00}-\\\\x{2FEF}\\\\x{3001}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFFD}\\\\x{10000}-\\\\x{EFFFF}]*)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.custom.start.html","patterns":[{"include":"#attribute"}]},{"begin":"()","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.custom.end.html","patterns":[{"include":"#attribute"}]}]},"xml-processing":{"begin":"(<\\\\?)(xml)","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"}},"end":"(\\\\?>)","name":"meta.tag.metadata.processing.xml.html","patterns":[{"include":"#attribute"}]}},"scopeName":"text.html.basic","embeddedLangs":["javascript","css"]}`)),r=[...t,...e,n];export{r as default}; diff --git a/pkg/cli/webapp/dist/assets/http-DBlCnlav.js b/pkg/cli/webapp/dist/assets/http-DBlCnlav.js new file mode 100644 index 0000000..7b06438 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/http-DBlCnlav.js @@ -0,0 +1 @@ +function u(r,n){return r.skipToEnd(),n.cur=t,"error"}function i(r,n){return r.match(/^HTTP\/\d\.\d/)?(n.cur=f,"keyword"):r.match(/^[A-Z]+/)&&/[ \t]/.test(r.peek())?(n.cur=d,"keyword"):u(r,n)}function f(r,n){var e=r.match(/^\d+/);if(!e)return u(r,n);n.cur=l;var o=Number(e[0]);return o>=100&&o<400?"atom":"error"}function l(r,n){return r.skipToEnd(),n.cur=t,null}function d(r,n){return r.eatWhile(/\S/),n.cur=s,"string.special"}function s(r,n){return r.match(/^HTTP\/\d\.\d$/)?(n.cur=t,"keyword"):u(r,n)}function t(r){return r.sol()&&!r.eat(/[ \t]/)?r.match(/^.*?:/)?"atom":(r.skipToEnd(),"error"):(r.skipToEnd(),"string")}function c(r){return r.skipToEnd(),null}const p={name:"http",token:function(r,n){var e=n.cur;return e!=t&&e!=c&&r.eatSpace()?null:e(r,n)},blankLine:function(r){r.cur=c},startState:function(){return{cur:i}}};export{p as http}; diff --git a/pkg/cli/webapp/dist/assets/idl-BEugSyMb.js b/pkg/cli/webapp/dist/assets/idl-BEugSyMb.js new file mode 100644 index 0000000..a779fbe --- /dev/null +++ b/pkg/cli/webapp/dist/assets/idl-BEugSyMb.js @@ -0,0 +1 @@ +function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var r=["a_correlate","abs","acos","adapt_hist_equal","alog","alog2","alog10","amoeba","annotate","app_user_dir","app_user_dir_query","arg_present","array_equal","array_indices","arrow","ascii_template","asin","assoc","atan","axis","axis","bandpass_filter","bandreject_filter","barplot","bar_plot","beseli","beselj","beselk","besely","beta","biginteger","bilinear","bin_date","binary_template","bindgen","binomial","bit_ffs","bit_population","blas_axpy","blk_con","boolarr","boolean","boxplot","box_cursor","breakpoint","broyden","bubbleplot","butterworth","bytarr","byte","byteorder","bytscl","c_correlate","calendar","caldat","call_external","call_function","call_method","call_procedure","canny","catch","cd","cdf","ceil","chebyshev","check_math","chisqr_cvf","chisqr_pdf","choldc","cholsol","cindgen","cir_3pnt","clipboard","close","clust_wts","cluster","cluster_tree","cmyk_convert","code_coverage","color_convert","color_exchange","color_quan","color_range_map","colorbar","colorize_sample","colormap_applicable","colormap_gradient","colormap_rotation","colortable","comfit","command_line_args","common","compile_opt","complex","complexarr","complexround","compute_mesh_normals","cond","congrid","conj","constrained_min","contour","contour","convert_coord","convol","convol_fft","coord2to3","copy_lun","correlate","cos","cosh","cpu","cramer","createboxplotdata","create_cursor","create_struct","create_view","crossp","crvlength","ct_luminance","cti_test","cursor","curvefit","cv_coord","cvttobm","cw_animate","cw_animate_getp","cw_animate_load","cw_animate_run","cw_arcball","cw_bgroup","cw_clr_index","cw_colorsel","cw_defroi","cw_field","cw_filesel","cw_form","cw_fslider","cw_light_editor","cw_light_editor_get","cw_light_editor_set","cw_orient","cw_palette_editor","cw_palette_editor_get","cw_palette_editor_set","cw_pdmenu","cw_rgbslider","cw_tmpl","cw_zoom","db_exists","dblarr","dcindgen","dcomplex","dcomplexarr","define_key","define_msgblk","define_msgblk_from_file","defroi","defsysv","delvar","dendro_plot","dendrogram","deriv","derivsig","determ","device","dfpmin","diag_matrix","dialog_dbconnect","dialog_message","dialog_pickfile","dialog_printersetup","dialog_printjob","dialog_read_image","dialog_write_image","dictionary","digital_filter","dilate","dindgen","dissolve","dist","distance_measure","dlm_load","dlm_register","doc_library","double","draw_roi","edge_dog","efont","eigenql","eigenvec","ellipse","elmhes","emboss","empty","enable_sysrtn","eof","eos","erase","erf","erfc","erfcx","erode","errorplot","errplot","estimator_filter","execute","exit","exp","expand","expand_path","expint","extract","extract_slice","f_cvf","f_pdf","factorial","fft","file_basename","file_chmod","file_copy","file_delete","file_dirname","file_expand_path","file_gunzip","file_gzip","file_info","file_lines","file_link","file_mkdir","file_move","file_poll_input","file_readlink","file_same","file_search","file_tar","file_test","file_untar","file_unzip","file_which","file_zip","filepath","findgen","finite","fix","flick","float","floor","flow3","fltarr","flush","format_axis_values","forward_function","free_lun","fstat","fulstr","funct","function","fv_test","fx_root","fz_roots","gamma","gamma_ct","gauss_cvf","gauss_pdf","gauss_smooth","gauss2dfit","gaussfit","gaussian_function","gaussint","get_drive_list","get_dxf_objects","get_kbrd","get_login_info","get_lun","get_screen_size","getenv","getwindows","greg2jul","grib","grid_input","grid_tps","grid3","griddata","gs_iter","h_eq_ct","h_eq_int","hanning","hash","hdf","hdf5","heap_free","heap_gc","heap_nosave","heap_refcount","heap_save","help","hilbert","hist_2d","hist_equal","histogram","hls","hough","hqr","hsv","i18n_multibytetoutf8","i18n_multibytetowidechar","i18n_utf8tomultibyte","i18n_widechartomultibyte","ibeta","icontour","iconvertcoord","idelete","identity","idl_base64","idl_container","idl_validname","idlexbr_assistant","idlitsys_createtool","idlunit","iellipse","igamma","igetcurrent","igetdata","igetid","igetproperty","iimage","image","image_cont","image_statistics","image_threshold","imaginary","imap","indgen","int_2d","int_3d","int_tabulated","intarr","interpol","interpolate","interval_volume","invert","ioctl","iopen","ir_filter","iplot","ipolygon","ipolyline","iputdata","iregister","ireset","iresolve","irotate","isa","isave","iscale","isetcurrent","isetproperty","ishft","isocontour","isosurface","isurface","itext","itranslate","ivector","ivolume","izoom","journal","json_parse","json_serialize","jul2greg","julday","keyword_set","krig2d","kurtosis","kw_test","l64indgen","la_choldc","la_cholmprove","la_cholsol","la_determ","la_eigenproblem","la_eigenql","la_eigenvec","la_elmhes","la_gm_linear_model","la_hqr","la_invert","la_least_square_equality","la_least_squares","la_linear_equation","la_ludc","la_lumprove","la_lusol","la_svd","la_tridc","la_trimprove","la_triql","la_trired","la_trisol","label_date","label_region","ladfit","laguerre","lambda","lambdap","lambertw","laplacian","least_squares_filter","leefilt","legend","legendre","linbcg","lindgen","linfit","linkimage","list","ll_arc_distance","lmfit","lmgr","lngamma","lnp_test","loadct","locale_get","logical_and","logical_or","logical_true","lon64arr","lonarr","long","long64","lsode","lu_complex","ludc","lumprove","lusol","m_correlate","machar","make_array","make_dll","make_rt","map","mapcontinents","mapgrid","map_2points","map_continents","map_grid","map_image","map_patch","map_proj_forward","map_proj_image","map_proj_info","map_proj_init","map_proj_inverse","map_set","matrix_multiply","matrix_power","max","md_test","mean","meanabsdev","mean_filter","median","memory","mesh_clip","mesh_decimate","mesh_issolid","mesh_merge","mesh_numtriangles","mesh_obj","mesh_smooth","mesh_surfacearea","mesh_validate","mesh_volume","message","min","min_curve_surf","mk_html_help","modifyct","moment","morph_close","morph_distance","morph_gradient","morph_hitormiss","morph_open","morph_thin","morph_tophat","multi","n_elements","n_params","n_tags","ncdf","newton","noise_hurl","noise_pick","noise_scatter","noise_slur","norm","obj_class","obj_destroy","obj_hasmethod","obj_isa","obj_new","obj_valid","objarr","on_error","on_ioerror","online_help","openr","openu","openw","oplot","oploterr","orderedhash","p_correlate","parse_url","particle_trace","path_cache","path_sep","pcomp","plot","plot3d","plot","plot_3dbox","plot_field","ploterr","plots","polar_contour","polar_surface","polyfill","polyshade","pnt_line","point_lun","polarplot","poly","poly_2d","poly_area","poly_fit","polyfillv","polygon","polyline","polywarp","popd","powell","pref_commit","pref_get","pref_set","prewitt","primes","print","printf","printd","pro","product","profile","profiler","profiles","project_vol","ps_show_fonts","psafm","pseudo","ptr_free","ptr_new","ptr_valid","ptrarr","pushd","qgrid3","qhull","qromb","qromo","qsimp","query_*","query_ascii","query_bmp","query_csv","query_dicom","query_gif","query_image","query_jpeg","query_jpeg2000","query_mrsid","query_pict","query_png","query_ppm","query_srf","query_tiff","query_video","query_wav","r_correlate","r_test","radon","randomn","randomu","ranks","rdpix","read","readf","read_ascii","read_binary","read_bmp","read_csv","read_dicom","read_gif","read_image","read_interfile","read_jpeg","read_jpeg2000","read_mrsid","read_pict","read_png","read_ppm","read_spr","read_srf","read_sylk","read_tiff","read_video","read_wav","read_wave","read_x11_bitmap","read_xwd","reads","readu","real_part","rebin","recall_commands","recon3","reduce_colors","reform","region_grow","register_cursor","regress","replicate","replicate_inplace","resolve_all","resolve_routine","restore","retall","return","reverse","rk4","roberts","rot","rotate","round","routine_filepath","routine_info","rs_test","s_test","save","savgol","scale3","scale3d","scatterplot","scatterplot3d","scope_level","scope_traceback","scope_varfetch","scope_varname","search2d","search3d","sem_create","sem_delete","sem_lock","sem_release","set_plot","set_shading","setenv","sfit","shade_surf","shade_surf_irr","shade_volume","shift","shift_diff","shmdebug","shmmap","shmunmap","shmvar","show3","showfont","signum","simplex","sin","sindgen","sinh","size","skewness","skip_lun","slicer3","slide_image","smooth","sobel","socket","sort","spawn","sph_4pnt","sph_scat","spher_harm","spl_init","spl_interp","spline","spline_p","sprsab","sprsax","sprsin","sprstp","sqrt","standardize","stddev","stop","strarr","strcmp","strcompress","streamline","streamline","stregex","stretch","string","strjoin","strlen","strlowcase","strmatch","strmessage","strmid","strpos","strput","strsplit","strtrim","struct_assign","struct_hide","strupcase","surface","surface","surfr","svdc","svdfit","svsol","swap_endian","swap_endian_inplace","symbol","systime","t_cvf","t_pdf","t3d","tag_names","tan","tanh","tek_color","temporary","terminal_size","tetra_clip","tetra_surface","tetra_volume","text","thin","thread","threed","tic","time_test2","timegen","timer","timestamp","timestamptovalues","tm_test","toc","total","trace","transpose","tri_surf","triangulate","trigrid","triql","trired","trisol","truncate_lun","ts_coef","ts_diff","ts_fcast","ts_smooth","tv","tvcrs","tvlct","tvrd","tvscl","typename","uindgen","uint","uintarr","ul64indgen","ulindgen","ulon64arr","ulonarr","ulong","ulong64","uniq","unsharp_mask","usersym","value_locate","variance","vector","vector_field","vel","velovect","vert_t3d","voigt","volume","voronoi","voxel_proj","wait","warp_tri","watershed","wdelete","wf_draw","where","widget_base","widget_button","widget_combobox","widget_control","widget_displaycontextmenu","widget_draw","widget_droplist","widget_event","widget_info","widget_label","widget_list","widget_propertysheet","widget_slider","widget_tab","widget_table","widget_text","widget_tree","widget_tree_move","widget_window","wiener_filter","window","window","write_bmp","write_csv","write_gif","write_image","write_jpeg","write_jpeg2000","write_nrif","write_pict","write_png","write_ppm","write_spr","write_srf","write_sylk","write_tiff","write_video","write_wav","write_wave","writeu","wset","wshow","wtn","wv_applet","wv_cwt","wv_cw_wavelet","wv_denoise","wv_dwt","wv_fn_coiflet","wv_fn_daubechies","wv_fn_gaussian","wv_fn_haar","wv_fn_morlet","wv_fn_paul","wv_fn_symlet","wv_import_data","wv_import_wavelet","wv_plot3d_wps","wv_plot_multires","wv_pwt","wv_tool_denoise","xbm_edit","xdisplayfile","xdxf","xfont","xinteranimate","xloadct","xmanager","xmng_tmpl","xmtool","xobjview","xobjview_rotate","xobjview_write_image","xpalette","xpcolor","xplot3d","xregistered","xroi","xsq_test","xsurface","xvaredit","xvolume","xvolume_rotate","xvolume_write_image","xyouts","zlib_compress","zlib_uncompress","zoom","zoom_24"],a=t(r),i=["begin","end","endcase","endfor","endwhile","endif","endrep","endforeach","break","case","continue","for","foreach","goto","if","then","else","repeat","until","switch","while","do","pro","function"],_=t(i),o=new RegExp("^[_a-z¡-￿][_a-z0-9¡-￿]*","i"),l=/[+\-*&=<>\/@#~$]/,s=new RegExp("(and|or|eq|lt|le|gt|ge|ne|not)","i");function n(e){return e.eatSpace()?null:e.match(";")?(e.skipToEnd(),"comment"):e.match(/^[0-9\.+-]/,!1)&&(e.match(/^[+-]?0x[0-9a-fA-F]+/)||e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":e.match(/^"([^"]|(""))*"/)||e.match(/^'([^']|(''))*'/)?"string":e.match(_)?"keyword":e.match(a)?"builtin":e.match(o)?"variable":e.match(l)||e.match(s)?"operator":(e.next(),null)}const d={name:"idl",token:function(e){return n(e)},languageData:{autocomplete:r.concat(i)}};export{d as idl}; diff --git a/pkg/cli/webapp/dist/assets/index-B9freypQ.js b/pkg/cli/webapp/dist/assets/index-B9freypQ.js new file mode 100644 index 0000000..b6d8a27 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-B9freypQ.js @@ -0,0 +1 @@ +import{L as p,a as u,k as l,p as n,s as m,t as e,q as b,e as S,m as r}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const c=S.deserialize({version:14,states:"%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",stateData:"$g~OjOS~OQROUROkQO~OWTOXUOZUO`VO~OSXOTWO~OXUO[]OlZO~OY^O~O[_O~OT`O~OYaO~OmcOodO~OmfOogO~O^iOnhO~O_jOphO~ObkOqkOrmO~OcnOsnOtmO~OnpO~OppO~ObkOqkOrrO~OcnOsnOtrO~OWX`~",goto:"!^hPPPiPPPPPPPPPmPPPpPPsy!Q!WTROSRe]Re_QSORYSS[T^Rb[QlfRqlQogRso",nodeNames:"⚠ Content Text Interpolation InterpolationContent }} Entity Attribute VueAttributeName : Identifier @ Is ScriptAttributeValue AttributeScript AttributeScript AttributeName AttributeValue Entity Entity",maxTerm:36,nodeProps:[["isolate",-3,3,13,17,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"'y~RdXY!aYZ!a]^!apq!ars!rwx!w}!O!|!O!P#t!Q![#y![!]$s!_!`%g!b!c%l!c!}#y#R#S#y#T#j#y#j#k%q#k#o#y%W;'S#y;'S;:j$m<%lO#y~!fSj~XY!aYZ!a]^!apq!a~!wOm~~!|Oo~!b#RX`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|!b#qP;=`<%l!|~#yOl~%W$QXY#t`!b}!O!|!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y%W$pP;=`<%l#y~$zXX~`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|~%lO[~~%qOZ~%W%xXY#t`!b}!O&e!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y!b&jX`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|!b'^XW!b`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|",tokenizers:[6,7,new r("b~RP#q#rU~XP#q#r[~aOT~~",17,4),new r("!k~RQvwX#o#p!_~^TU~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOU~~![P;=`<%lm~!bP#o#p!e~!jOk~~",72,2),new r("[~RPwxU~ZOp~~",11,15),new r("[~RPrsU~ZOn~~",11,14),new r("!e~RQvwXwx!_~^Tc~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOc~~![P;=`<%lm~!dOt~~",66,35),new r("!e~RQrsXvw^~^Or~~cTb~Oprq!]r!^;'Sr;'S;=`!^<%lOr~uUOprq!]r!]!^!X!^;'Sr;'S;=`!^<%lOr~!^Ob~~!aP;=`<%lr~",66,33)],topRules:{Content:[0,1],Attribute:[1,7]},tokenPrec:157}),P=b.parser.configure({top:"SingleExpression"}),o=c.configure({props:[m({Text:e.content,Is:e.definitionOperator,AttributeName:e.attributeName,VueAttributeName:e.keyword,Identifier:e.variableName,"AttributeValue ScriptAttributeValue":e.attributeValue,Entity:e.character,"{{ }}":e.brace,"@ :":e.punctuation})]}),s={parser:P},Q=o.configure({wrap:n((O,t)=>O.name=="InterpolationContent"?s:null)}),g=o.configure({wrap:n((O,t)=>O.name=="AttributeScript"?s:null),top:"Attribute"}),y={parser:Q},R={parser:g},a=l();function i(O){return O.configure({dialect:"selfClosing",wrap:n(X)},"vue")}const T=i(a.language);function X(O,t){switch(O.name){case"Attribute":return/^(@|:|v-)/.test(t.read(O.from,O.from+2))?R:null;case"Text":return y}return null}function C(O={}){let t=a;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof p))throw new RangeError("The base option must be the result of calling html(...)");t=O.base}return new u(t.language==a.language?T:i(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["{",'"']}})])}export{C as vue,T as vueLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-BCw4Px7Q.js b/pkg/cli/webapp/dist/assets/index-BCw4Px7Q.js new file mode 100644 index 0000000..3f3f09c --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-BCw4Px7Q.js @@ -0,0 +1 @@ +import{e as r,s as e,t as O,a as s,L as X,i as l,r as Y,c as $,l as S,f as o,o as t}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const Z=e({null:O.null,instanceof:O.operatorKeyword,this:O.self,"new super assert open to with void":O.keyword,"class interface extends implements enum var":O.definitionKeyword,"module package import":O.moduleKeyword,"switch while for if else case default do break continue return try catch finally throw":O.controlKeyword,"requires exports opens uses provides public private protected static transitive abstract final strictfp synchronized native transient volatile throws":O.modifier,IntegerLiteral:O.integer,FloatingPointLiteral:O.float,"StringLiteral TextBlock":O.string,CharacterLiteral:O.character,LineComment:O.lineComment,BlockComment:O.blockComment,BooleanLiteral:O.bool,PrimitiveType:O.standard(O.typeName),TypeName:O.typeName,Identifier:O.variableName,"MethodName/Identifier":O.function(O.variableName),Definition:O.definition(O.variableName),ArithOp:O.arithmeticOperator,LogicOp:O.logicOperator,BitOp:O.bitwiseOperator,CompareOp:O.compareOperator,AssignOp:O.definitionOperator,UpdateOp:O.updateOperator,Asterisk:O.punctuation,Label:O.labelName,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace,".":O.derefOperator,", ;":O.separator}),n={__proto__:null,true:34,false:34,null:42,void:46,byte:48,short:48,int:48,long:48,char:48,float:48,double:48,boolean:48,extends:62,super:64,class:76,this:78,new:84,public:100,protected:102,private:104,abstract:106,static:108,final:110,strictfp:112,default:114,synchronized:116,native:118,transient:120,volatile:122,throws:150,implements:160,interface:166,enum:176,instanceof:238,open:267,module:269,requires:274,transitive:276,exports:278,to:280,opens:282,uses:284,provides:286,with:288,package:292,import:296,if:308,else:310,while:314,for:318,var:325,assert:332,switch:336,case:342,do:346,break:350,continue:354,return:358,throw:364,try:368,catch:372,finally:380},d=r.deserialize({version:14,states:"##jQ]QPOOQ$wQPOOO(bQQO'#H^O*iQQO'#CbOOQO'#Cb'#CbO*pQPO'#CaO*xOSO'#CpOOQO'#Hc'#HcOOQO'#Cu'#CuO,eQPO'#D_O-OQQO'#HmOOQO'#Hm'#HmO/gQQO'#HhO/nQQO'#HhOOQO'#Hh'#HhOOQO'#Hg'#HgO1rQPO'#DUO2PQPO'#GnO4wQPO'#D_O5OQPO'#DzO*pQPO'#E[O5qQPO'#E[OOQO'#DV'#DVO7SQQO'#HaO9^QQO'#EeO9eQPO'#EdO9jQPO'#EfOOQO'#Hb'#HbO7jQQO'#HbO:pQQO'#FhO:wQPO'#ExO:|QPO'#E}O:|QPO'#FPOOQO'#Ha'#HaOOQO'#HY'#HYOOQO'#Gh'#GhOOQO'#HX'#HXO<^QPO'#FiOOQO'#HW'#HWOOQO'#Gg'#GgQ]QPOOOOQO'#Hs'#HsOQQPO'#GSO>]QPO'#GUO=kQPO'#GWO:|QPO'#GXO>dQPO'#GZO?QQQO'#HiO?mQQO'#CuO?tQPO'#HxO@SQPO'#D_O@rQPO'#DpO?wQPO'#DqO@|QPO'#HxOA_QPO'#DpOAgQPO'#IROAlQPO'#E`OOQO'#Hr'#HrOOQO'#Gm'#GmQ$wQPOOOAtQPO'#HsOOQO'#H^'#H^OCsQQO,58{OOQO'#H['#H[OOOO'#Gi'#GiOEfOSO,59[OOQO,59[,59[OOQO'#Hi'#HiOFVQPO,59eOGXQPO,59yOOQO-E:f-E:fO*pQPO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q+q(`Q-s+fQ.O+rQ/g.WR0U/hQ)i%vQ,g)fR/o.mR,h)f`!jP!o'^'h*q+O-^/OT%W!g*|R%]!hW%U!e%V*z-aQ(z%^R,V({S#d`%bR&a#eQ)X%gT*t'`'iR*y'e[!lP!o'^*q-^/OR%X!gR#h`R,b)]R)a%kT-j+]-kQ/V-mR/z/WR/z/X",nodeNames:"⚠ LineComment BlockComment Program ModuleDeclaration MarkerAnnotation Identifier ScopedIdentifier . Annotation ) ( AnnotationArgumentList AssignmentExpression FieldAccess IntegerLiteral FloatingPointLiteral BooleanLiteral CharacterLiteral StringLiteral TextBlock null ClassLiteral void PrimitiveType TypeName ScopedTypeName GenericType TypeArguments AnnotatedType Wildcard extends super , ArrayType ] Dimension [ class this ParenthesizedExpression ObjectCreationExpression new ArgumentList } { ClassBody ; FieldDeclaration Modifiers public protected private abstract static final strictfp default synchronized native transient volatile VariableDeclarator Definition AssignOp ArrayInitializer MethodDeclaration TypeParameters TypeParameter TypeBound FormalParameters ReceiverParameter FormalParameter SpreadParameter Throws throws Block ClassDeclaration Superclass SuperInterfaces implements InterfaceTypeList InterfaceDeclaration interface ExtendsInterfaces InterfaceBody ConstantDeclaration EnumDeclaration enum EnumBody EnumConstant EnumBodyDeclarations AnnotationTypeDeclaration AnnotationTypeBody AnnotationTypeElementDeclaration StaticInitializer ConstructorDeclaration ConstructorBody ExplicitConstructorInvocation ArrayAccess MethodInvocation MethodName MethodReference ArrayCreationExpression Dimension AssignOp BinaryExpression CompareOp CompareOp LogicOp LogicOp BitOp BitOp BitOp ArithOp ArithOp ArithOp BitOp InstanceofExpression instanceof LambdaExpression InferredParameters TernaryExpression LogicOp : UpdateExpression UpdateOp UnaryExpression LogicOp BitOp CastExpression ElementValueArrayInitializer ElementValuePair open module ModuleBody ModuleDirective requires transitive exports to opens uses provides with PackageDeclaration package ImportDeclaration import Asterisk ExpressionStatement LabeledStatement Label IfStatement if else WhileStatement while ForStatement for ForSpec LocalVariableDeclaration var EnhancedForStatement ForSpec AssertStatement assert SwitchStatement switch SwitchBlock SwitchLabel case DoStatement do BreakStatement break ContinueStatement continue ReturnStatement return SynchronizedStatement ThrowStatement throw TryStatement try CatchClause catch CatchFormalParameter CatchType FinallyClause finally TryWithResourcesStatement ResourceSpecification Resource ClassContent",maxTerm:276,nodeProps:[["isolate",-4,1,2,18,19,""],["group",-26,4,47,76,77,82,87,92,145,147,150,151,153,156,158,161,163,165,167,172,174,176,178,180,181,183,191,"Statement",-25,6,13,14,15,16,17,18,19,20,21,22,39,40,41,99,100,102,103,106,118,120,122,125,127,130,"Expression",-7,23,24,25,26,27,29,34,"Type"],["openedBy",10,"(",44,"{"],["closedBy",11,")",45,"}"]],propSources:[Z],skippedNodes:[0,1,2],repeatNodeCount:28,tokenData:"#'f_R!_OX%QXY'fYZ)bZ^'f^p%Qpq'fqr*|rs,^st%Qtu4euv5zvw7[wx8rxyAZyzAwz{Be{|CZ|}Dq}!OE_!O!PFx!P!Q! r!Q!R!,h!R![!0`![!]!>p!]!^!@Q!^!_!@n!_!`!BX!`!a!B{!a!b!Di!b!c!EX!c!}!LT!}#O!Mj#O#P%Q#P#Q!NW#Q#R!Nt#R#S4e#S#T%Q#T#o4e#o#p# h#p#q#!U#q#r##n#r#s#$[#s#y%Q#y#z'f#z$f%Q$f$g'f$g#BY4e#BY#BZ#$x#BZ$IS4e$IS$I_#$x$I_$I|4e$I|$JO#$x$JO$JT4e$JT$JU#$x$JU$KV4e$KV$KW#$x$KW&FU4e&FU&FV#$x&FV;'S4e;'S;=`5t<%lO4eS%VV&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QS%qO&YSS%tVOY&ZYZ%lZr&Zrs&ys;'S&Z;'S;=`'`<%lO&ZS&^VOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QS&vP;=`<%l%QS&|UOY&ZYZ%lZr&Zs;'S&Z;'S;=`'`<%lO&ZS'cP;=`<%l&Z_'mk&YS%yZOX%QXY'fYZ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!Q%Q!Q![4e![!c%Q!c!}4e!}#R%Q#R#S4e#S#T%Q#T#o4e#o#y%Q#y#z'f#z$f%Q$f$g'f$g#BY4e#BY#BZ#$x#BZ$IS4e$IS$I_#$x$I_$I|4e$I|$JO#$x$JO$JT4e$JT$JU#$x$JU$KV4e$KV$KW#$x$KW&FU4e&FU&FV#$x&FV;'S4e;'S;=`5t<%lO4e",tokenizers:[0,1,2,3],topRules:{Program:[0,3],ClassContent:[1,194]},dynamicPrecedences:{27:1,232:-1,243:-1},specialized:[{term:231,get:Q=>n[Q]||-1}],tokenPrec:7144}),_=X.define({name:"java",parser:d.configure({props:[l.add({IfStatement:$({except:/^\s*({|else\b)/}),TryStatement:$({except:/^\s*({|catch|finally)\b/}),LabeledStatement:Y,SwitchBlock:Q=>{let P=Q.textAfter,i=/^\s*\}/.test(P),a=/^\s*(case|default)\b/.test(P);return Q.baseIndent+(i?0:a?1:2)*Q.unit},Block:S({closing:"}"}),BlockComment:()=>null,Statement:$({except:/^{/})}),o.add({"Block SwitchBlock ClassBody ElementValueArrayInitializer ModuleBody EnumBody ConstructorBody InterfaceBody ArrayInitializer":t,BlockComment(Q){return{from:Q.from+2,to:Q.to-2}}})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\})$/}});function m(){return new s(_)}export{m as java,_ as javaLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-BDKKYr4r.js b/pkg/cli/webapp/dist/assets/index-BDKKYr4r.js new file mode 100644 index 0000000..b09e75d --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-BDKKYr4r.js @@ -0,0 +1 @@ +import{a as r,n as i,L as n,i as $,c as y,f as P,o as X,e as m,E as S,s as c,t as O}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const s=110,l=1,f=2,t=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function e(T){return T>=65&&T<=90||T>=97&&T<=122||T>=161}function p(T){return T>=48&&T<=57}const W=new S((T,Q)=>{if(T.next==40){let a=T.peek(-1);(e(a)||p(a)||a==95||a==45)&&T.acceptToken(f,1)}}),d=new S(T=>{if(t.indexOf(T.peek(-1))>-1){let{next:Q}=T;(e(Q)||Q==95||Q==35||Q==46||Q==91||Q==58||Q==45)&&T.acceptToken(s)}}),Z=new S(T=>{if(t.indexOf(T.peek(-1))<0){let{next:Q}=T;if(Q==37&&(T.advance(),T.acceptToken(l)),e(Q)){do T.advance();while(e(T.next));T.acceptToken(l)}}}),w=c({"import charset namespace keyframes media supports when":O.definitionKeyword,"from to selector":O.keyword,NamespaceName:O.namespace,KeyframeName:O.labelName,TagName:O.tagName,ClassName:O.className,PseudoClassName:O.constant(O.className),IdName:O.labelName,"FeatureName PropertyName PropertyVariable":O.propertyName,AttributeName:O.attributeName,NumberLiteral:O.number,KeywordQuery:O.keyword,UnaryQueryOp:O.operatorKeyword,"CallTag ValueName":O.atom,VariableName:O.variableName,"AtKeyword Interpolation":O.special(O.variableName),Callee:O.operatorKeyword,Unit:O.unit,"UniversalSelector NestingSelector":O.definitionOperator,MatchOp:O.compareOperator,"ChildOp SiblingOp, LogicOp":O.logicOperator,BinOp:O.arithmeticOperator,Important:O.modifier,"Comment LineComment":O.blockComment,ColorLiteral:O.color,"ParenthesizedContent StringLiteral":O.string,Escape:O.special(O.string),": ...":O.punctuation,"PseudoOp #":O.derefOperator,"; ,":O.separator,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),z={__proto__:null,lang:40,"nth-child":40,"nth-last-child":40,"nth-of-type":40,"nth-last-of-type":40,dir:40,"host-context":40,and:244,or:244,not:74,only:74,url:86,"url-prefix":86,domain:86,regexp:86,when:117,selector:142,from:172,to:174},h={__proto__:null,"@import":126,"@plugin":126,"@media":152,"@charset":156,"@namespace":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;'S!+v;'S;=`!,t;=`O!+v]!,wXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!+v<%lO!+v]!-gP;=`<%l!+vm!-oU|`Oy!*kyz!+vz;'S!*k;'S;=`!.R;=`<%l!+v<%lO!*km!.UXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!*k<%lO!+vm!.tP;=`<%l!*km!.|Z|`OY!.wYZ%TZw!.wwx!+cxy!.wyz!/oz#O!.w#O#P!1^#P;'S!.w;'S;=`!2e<%lO!.w]!/rWOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W<%lO!/o]!0_RO;'S!/o;'S;=`!0h;=`O!/o]!0kXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!/o<%lO!/o]!1ZP;=`<%l!/om!1cU|`Oy!.wyz!/oz;'S!.w;'S;=`!1u;=`<%l!/o<%lO!.wm!1xXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!.w<%lO!/om!2hP;=`<%l!.w`!2nP;=`<%l$t",tokenizers:[d,Z,W,0,1,2,3,4],topRules:{StyleSheet:[0,5]},specialized:[{term:116,get:T=>z[T]||-1},{term:23,get:T=>h[T]||-1}],tokenPrec:2180}),o=n.define({name:"less",parser:g.configure({props:[$.add({Declaration:y()}),P.add({Block:X})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"@-"}}),u=i(T=>T.name=="VariableName"||T.name=="AtKeyword");function x(){return new r(o,o.data.of({autocomplete:u}))}export{x as less,u as lessCompletionSource,o as lessLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-BGAlGVCv.js b/pkg/cli/webapp/dist/assets/index-BGAlGVCv.js new file mode 100644 index 0000000..d3846fc --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-BGAlGVCv.js @@ -0,0 +1 @@ +import{e as o,E as a,s as Z,t as Q,a as _,L as q,i as l,c as r,f as w,o as V}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const R=1,g=2,b=3,y=4,T=5,s=98,c=101,p=102,t=114,v=69,X=48,W=46,d=43,f=45,Y=35,z=34,x=124,U=60,h=62;function n(O){return O>=48&&O<=57}function e(O){return n(O)||O==95}const G=new a((O,i)=>{if(n(O.next)){let P=!1;do O.advance();while(e(O.next));if(O.next==W){if(P=!0,O.advance(),n(O.next))do O.advance();while(e(O.next));else if(O.next==W||O.next>127||/\w/.test(String.fromCharCode(O.next)))return}if(O.next==c||O.next==v){if(P=!0,O.advance(),(O.next==d||O.next==f)&&O.advance(),!e(O.next))return;do O.advance();while(e(O.next))}if(O.next==p){let $=O.peek(1);if($==X+3&&O.peek(2)==X+2||$==X+6&&O.peek(2)==X+4)O.advance(3),P=!0;else return}P&&O.acceptToken(T)}else if(O.next==s||O.next==t){if(O.next==s&&O.advance(),O.next!=t)return;O.advance();let P=0;for(;O.next==Y;)P++,O.advance();if(O.next!=z)return;O.advance();O:for(;;){if(O.next<0)return;let $=O.next==z;if(O.advance(),$){for(let S=0;S{O.next==x&&O.acceptToken(R,1)}),u=new a(O=>{O.next==U?O.acceptToken(g,1):O.next==h&&O.acceptToken(b,1)}),k=Z({"const macro_rules struct union enum type fn impl trait let static":Q.definitionKeyword,"mod use crate":Q.moduleKeyword,"pub unsafe async mut extern default move":Q.modifier,"for if else loop while match continue break return await":Q.controlKeyword,"as in ref":Q.operatorKeyword,"where _ crate super dyn":Q.keyword,self:Q.self,String:Q.string,Char:Q.character,RawString:Q.special(Q.string),Boolean:Q.bool,Identifier:Q.variableName,"CallExpression/Identifier":Q.function(Q.variableName),BoundIdentifier:Q.definition(Q.variableName),"FunctionItem/BoundIdentifier":Q.function(Q.definition(Q.variableName)),LoopLabel:Q.labelName,FieldIdentifier:Q.propertyName,"CallExpression/FieldExpression/FieldIdentifier":Q.function(Q.propertyName),Lifetime:Q.special(Q.variableName),ScopeIdentifier:Q.namespace,TypeIdentifier:Q.typeName,"MacroInvocation/Identifier MacroInvocation/ScopedIdentifier/Identifier":Q.macroName,"MacroInvocation/TypeIdentifier MacroInvocation/ScopedIdentifier/TypeIdentifier":Q.macroName,'"!"':Q.macroName,UpdateOp:Q.updateOperator,LineComment:Q.lineComment,BlockComment:Q.blockComment,Integer:Q.integer,Float:Q.float,ArithOp:Q.arithmeticOperator,LogicOp:Q.logicOperator,BitOp:Q.bitwiseOperator,CompareOp:Q.compareOperator,"=":Q.definitionOperator,".. ... => ->":Q.punctuation,"( )":Q.paren,"[ ]":Q.squareBracket,"{ }":Q.brace,". DerefOp":Q.derefOperator,"&":Q.operator,", ; ::":Q.separator,"Attribute/...":Q.meta}),j={__proto__:null,self:28,super:32,crate:34,impl:46,true:72,false:72,pub:88,in:92,const:96,unsafe:104,async:108,move:110,if:114,let:118,ref:142,mut:144,_:198,else:200,match:204,as:248,return:252,await:262,break:270,continue:276,while:312,loop:316,for:320,macro_rules:327,mod:334,extern:342,struct:346,where:364,union:379,enum:382,type:390,default:395,fn:396,trait:412,use:420,static:438,dyn:476},E=o.deserialize({version:14,states:"$2xQ]Q_OOP$wOWOOO&sQWO'#CnO)WQWO'#I`OOQP'#I`'#I`OOQQ'#Ie'#IeO)hO`O'#C}OOQR'#Ih'#IhO)sQWO'#IuOOQO'#Hk'#HkO)xQWO'#DpOOQR'#Iw'#IwO)xQWO'#DpO*ZQWO'#DpOOQO'#Iv'#IvO,SQWO'#J`O,ZQWO'#EiOOQV'#Hp'#HpO,cQYO'#F{OOQV'#El'#ElOOQV'#Em'#EmOOQV'#En'#EnO.YQ_O'#EkO0_Q_O'#EoO2gQWOOO4QQ_O'#FPO7hQWO'#J`OOQV'#FY'#FYO7{Q_O'#F^O:WQ_O'#FaOOQO'#F`'#F`O=sQ_O'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lockComment SourceFile ] InnerAttribute ! [ MetaItem self Metavariable super crate Identifier ScopedIdentifier :: QualifiedScope AbstractType impl SelfType MetaType TypeIdentifier ScopedTypeIdentifier ScopeIdentifier TypeArgList TypeBinding = Lifetime String Escape Char Boolean Integer } { Block ; ConstItem Vis pub ( in ) const BoundIdentifier : UnsafeBlock unsafe AsyncBlock async move IfExpression if LetDeclaration let LiteralPattern ArithOp MetaPattern SelfPattern ScopedIdentifier TuplePattern ScopedTypeIdentifier , StructPattern FieldPatternList FieldPattern ref mut FieldIdentifier .. RefPattern SlicePattern CapturedPattern ReferencePattern & MutPattern RangePattern ... OrPattern MacroPattern ParenthesizedTokens TokenBinding Identifier TokenRepetition ArithOp BitOp LogicOp UpdateOp CompareOp -> => ArithOp BracketedTokens BracedTokens _ else MatchExpression match MatchBlock MatchArm Attribute Guard UnaryExpression ArithOp DerefOp LogicOp ReferenceExpression TryExpression BinaryExpression ArithOp ArithOp BitOp BitOp BitOp BitOp LogicOp LogicOp AssignmentExpression TypeCastExpression as ReturnExpression return RangeExpression CallExpression ArgList AwaitExpression await FieldExpression GenericFunction BreakExpression break LoopLabel ContinueExpression continue IndexExpression ArrayExpression TupleExpression MacroInvocation UnitExpression ClosureExpression ParamList Parameter Parameter ParenthesizedExpression StructExpression FieldInitializerList ShorthandFieldInitializer FieldInitializer BaseFieldInitializer MatchArm WhileExpression while LoopExpression loop ForExpression for MacroInvocation MacroDefinition macro_rules MacroRule EmptyStatement ModItem mod DeclarationList AttributeItem ForeignModItem extern StructItem struct TypeParamList ConstrainedTypeParameter TraitBounds HigherRankedTraitBound RemovedTraitBound OptionalTypeParameter ConstParameter WhereClause where LifetimeClause TypeBoundClause FieldDeclarationList FieldDeclaration OrderedFieldDeclarationList UnionItem union EnumItem enum EnumVariantList EnumVariant TypeItem type FunctionItem default fn ParamList Parameter SelfParameter VariadicParameter VariadicParameter ImplItem TraitItem trait AssociatedType LetDeclaration UseDeclaration use ScopedIdentifier UseAsClause ScopedIdentifier UseList ScopedUseList UseWildcard ExternCrateDeclaration StaticItem static ExpressionStatement ExpressionStatement GenericType FunctionType ForLifetimes ParamList VariadicParameter Parameter VariadicParameter Parameter ReferenceType PointerType TupleType UnitType ArrayType MacroInvocation EmptyType DynamicType dyn BoundedType",maxTerm:359,nodeProps:[["isolate",-4,4,6,7,33,""],["group",-42,4,5,14,15,16,17,18,19,33,35,36,37,40,51,53,56,101,107,111,112,113,122,123,125,127,128,130,132,133,134,137,139,140,141,142,143,144,148,149,155,157,159,"Expression",-16,22,24,25,26,27,222,223,230,231,232,233,234,235,236,237,239,"Type",-20,42,161,162,165,166,169,170,172,188,190,194,196,204,205,207,208,209,217,218,220,"Statement",-17,49,60,62,63,64,65,68,74,75,76,77,78,80,81,83,84,99,"Pattern"],["openedBy",9,"[",38,"{",47,"("],["closedBy",12,"]",39,"}",45,")"]],propSources:[k],skippedNodes:[0,6,7,240],repeatNodeCount:32,tokenData:"$%h_R!XOX$nXY5gYZ6iZ]$n]^5g^p$npq5gqr7Xrs9cst:Rtu;Tuv>vvwAQwxCbxy!+Tyz!,Vz{!-X{|!/_|}!0g}!O!1i!O!P!3v!P!Q!8[!Q!R!Bw!R![!Dr![!]#+q!]!^#-{!^!_#.}!_!`#1b!`!a#3o!a!b#6S!b!c#7U!c!}#8W!}#O#:T#O#P#;V#P#Q#Cb#Q#R#Dd#R#S#8W#S#T$n#T#U#8W#U#V#El#V#f#8W#f#g#Ic#g#o#8W#o#p$ S#p#q$!U#q#r$$f#r${$n${$|#8W$|4w$n4w5b#8W5b5i$n5i6S#8W6S;'S$n;'S;=`4s<%lO$nU$u]'_Q'OSOY$nYZ%nZr$nrs&[sz$nz{+O{!P$n!P!Q,z!Q#O$n#O#P&[#P;'S$n;'S;=`4s<%lO$nU%uV'_Q'OSOz&[z{&v{!P&[!P!Q'x!Q;'S&[;'S;=`*s<%lO&[S&aV'OSOz&[z{&v{!P&[!P!Q'x!Q;'S&[;'S;=`*s<%lO&[S&yVOz'`z{&v{!P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!Q,z!Q![#8W![!c$n!c!}#8W!}#O$n#O#P&[#P#R$n#R#S#8W#S#T$n#T#o#8W#o${$n${$|#8W$|4w$n4w5b#8W5b5i$n5i6S#8W6S;'S$n;'S;=`4s<%lO$nV#Kji'_Q'OSOY$nYZ%nZr$nrs&[sz$nz{+O{!P$n!P!Q,z!Q!c$n!c!}#MX!}#O$n#O#P&[#P#R$n#R#S#MX#S#T$n#T#o#MX#o${$n${$|#MX$|4w$n4w5b#MX5b5i$n5i6S#MX6S;'S$n;'S;=`4s<%lO$nV#Mbj'_Q'OS'TPOY$nYZ%nZr$nrs&[sz$nz{+O{!P$n!P!Q,z!Q![#MX![!c$n!c!}#MX!}#O$n#O#P&[#P#R$n#R#S#MX#S#T$n#T#o#MX#o${$n${$|#MX$|4w$n4w5b#MX5b5i$n5i6S#MX6S;'S$n;'S;=`4s<%lO$n_$ ]]wX'_Q'OSOY$nYZ%nZr$nrs&[sz$nz{+O{!P$n!P!Q,z!Q#O$n#O#P&[#P;'S$n;'S;=`4s<%lO$n_$!_a'rX'_Q'OSOY$nYZ%nZr$nrs&[sz$nz{+O{!P$n!P!Q,z!Q!_$n!_!`@O!`#O$n#O#P&[#P#p$n#p#q$#d#q;'S$n;'S;=`4s<%lO$n_$#m]'|X'_Q'OSOY$nYZ%nZr$nrs&[sz$nz{+O{!P$n!P!Q,z!Q#O$n#O#P&[#P;'S$n;'S;=`4s<%lO$n_$$o]vX'_Q'OSOY$nYZ%nZr$nrs&[sz$nz{+O{!P$n!P!Q,z!Q#O$n#O#P&[#P;'S$n;'S;=`4s<%lO$n",tokenizers:[m,u,G,0,1,2,3],topRules:{SourceFile:[0,8]},specialized:[{term:281,get:O=>j[O]||-1}],tokenPrec:15596}),I=q.define({name:"rust",parser:E.configure({props:[l.add({IfExpression:r({except:/^\s*({|else\b)/}),"String BlockComment":()=>null,AttributeItem:O=>O.continue(),"Statement MatchArm":r()}),w.add(O=>{if(/(Block|edTokens|List)$/.test(O.name))return V;if(O.name=="BlockComment")return i=>({from:i.from+2,to:i.to-2})})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:\{|\})$/,closeBrackets:{stringPrefixes:["b","r","br"]}}});function L(){return new _(I)}export{L as rust,I as rustLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-BYIhaTqE.js b/pkg/cli/webapp/dist/assets/index-BYIhaTqE.js new file mode 100644 index 0000000..9db733e --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-BYIhaTqE.js @@ -0,0 +1 @@ +import{e as W,E as i,C as B,s as U,t as n,a as b,p as E,L as C,i as u,l as v,f as M,o as N}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const c=63,D=64,j=1,A=2,y=3,H=4,Z=5,F=6,I=7,z=65,K=66,J=8,OO=9,eO=10,aO=11,rO=12,V=13,tO=19,nO=20,oO=29,PO=33,QO=34,sO=47,lO=0,p=1,m=2,d=3,g=4;class s{constructor(e,a,r){this.parent=e,this.depth=a,this.type=r,this.hash=(e?e.hash+e.hash<<8:0)+a+(a<<4)+r}}s.top=new s(null,-1,lO);function X(O,e){for(let a=0,r=e-O.pos-1;;r--,a++){let o=O.peek(r);if(P(o)||o==-1)return a}}function x(O){return O==32||O==9}function P(O){return O==10||O==13}function _(O){return x(O)||P(O)}function l(O){return O<0||_(O)}const cO=new B({start:s.top,reduce(O,e){return O.type==d&&(e==nO||e==QO)?O.parent:O},shift(O,e,a,r){if(e==y)return new s(O,X(r,r.pos),p);if(e==z||e==Z)return new s(O,X(r,r.pos),m);if(e==c)return O.parent;if(e==tO||e==PO)return new s(O,0,d);if(e==V&&O.type==g)return O.parent;if(e==sO){let o=/[1-9]/.exec(r.read(r.pos,a.pos));if(o)return new s(O,O.depth+ +o[0],g)}return O},hash(O){return O.hash}});function f(O,e,a=0){return O.peek(a)==e&&O.peek(a+1)==e&&O.peek(a+2)==e&&l(O.peek(a+3))}const fO=new i((O,e)=>{if(O.next==-1&&e.canShift(D))return O.acceptToken(D);let a=O.peek(-1);if((P(a)||a<0)&&e.context.type!=d){if(f(O,45))if(e.canShift(c))O.acceptToken(c);else return O.acceptToken(j,3);if(f(O,46))if(e.canShift(c))O.acceptToken(c);else return O.acceptToken(A,3);let r=0;for(;O.next==32;)r++,O.advance();(r{if(e.context.type==d){O.next==63&&(O.advance(),l(O.next)&&O.acceptToken(I));return}if(O.next==45)O.advance(),l(O.next)&&O.acceptToken(e.context.type==p&&e.context.depth==X(O,O.pos-1)?H:y);else if(O.next==63)O.advance(),l(O.next)&&O.acceptToken(e.context.type==m&&e.context.depth==X(O,O.pos-1)?F:Z);else{let a=O.pos;for(;;)if(x(O.next)){if(O.pos==a)return;O.advance()}else if(O.next==33)G(O);else if(O.next==38)$(O);else if(O.next==42){$(O);break}else if(O.next==39||O.next==34){if(T(O,!0))break;return}else if(O.next==91||O.next==123){if(!RO(O))return;break}else{w(O,!0,!1,0);break}for(;x(O.next);)O.advance();if(O.next==58){if(O.pos==a&&e.canShift(oO))return;let r=O.peek(1);l(r)&&O.acceptTokenTo(e.context.type==m&&e.context.depth==X(O,a)?K:z,a)}}},{contextual:!0});function dO(O){return O>32&&O<127&&O!=34&&O!=37&&O!=44&&O!=60&&O!=62&&O!=92&&O!=94&&O!=96&&O!=123&&O!=124&&O!=125}function q(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function Y(O,e){return O.next==37?(O.advance(),q(O.next)&&O.advance(),q(O.next)&&O.advance(),!0):dO(O.next)||e&&O.next==44?(O.advance(),!0):!1}function G(O){if(O.advance(),O.next==60){for(O.advance();;)if(!Y(O,!0)){O.next==62&&O.advance();break}}else for(;Y(O,!1););}function $(O){for(O.advance();!l(O.next)&&S(O.next)!="f";)O.advance()}function T(O,e){let a=O.next,r=!1,o=O.pos;for(O.advance();;){let t=O.next;if(t<0)break;if(O.advance(),t==a)if(t==39)if(O.next==39)O.advance();else break;else break;else if(t==92&&a==34)O.next>=0&&O.advance();else if(P(t)){if(e)return!1;r=!0}else if(e&&O.pos>=o+1024)return!1}return!r}function RO(O){for(let e=[],a=O.pos+1024;;)if(O.next==91||O.next==123)e.push(O.next),O.advance();else if(O.next==39||O.next==34){if(!T(O,!0))return!1}else if(O.next==93||O.next==125){if(e[e.length-1]!=O.next-2)return!1;if(e.pop(),O.advance(),!e.length)return!0}else{if(O.next<0||O.pos>a||P(O.next))return!1;O.advance()}}const SO="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function S(O){return O<33?"u":O>125?"s":SO[O-33]}function k(O,e){let a=S(O);return a!="u"&&!(e&&a=="f")}function w(O,e,a,r){if(S(O.next)=="s"||(O.next==63||O.next==58||O.next==45)&&k(O.peek(1),a))O.advance();else return!1;let o=O.pos;for(;;){let t=O.next,Q=0,R=r+1;for(;_(t);){if(P(t)){if(e)return!1;R=0}else R++;t=O.peek(++Q)}if(!(t>=0&&(t==58?k(O.peek(Q+1),a):t==35?O.peek(Q-1)!=32:k(t,a)))||!a&&R<=r||R==0&&!a&&(f(O,45,Q)||f(O,46,Q)))break;if(e&&S(t)=="f")return!1;for(let h=Q;h>=0;h--)O.advance();if(e&&O.pos>o+1024)return!1}return!0}const iO=new i((O,e)=>{if(O.next==33)G(O),O.acceptToken(rO);else if(O.next==38||O.next==42){let a=O.next==38?eO:aO;$(O),O.acceptToken(a)}else O.next==39||O.next==34?(T(O,!1),O.acceptToken(OO)):w(O,!1,e.context.type==d,e.context.depth)&&O.acceptToken(J)}),kO=new i((O,e)=>{let a=e.context.type==g?e.context.depth:-1,r=O.pos;O:for(;;){let o=0,t=O.next;for(;t==32;)t=O.peek(++o);if(!o&&(f(O,45,o)||f(O,46,o))||!P(t)&&(a<0&&(a=Math.max(e.context.depth+1,o)),oYAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPO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#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:cO,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[bO],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp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~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),L=C.define({name:"yaml",parser:mO.configure({props:[u.add({Stream:O=>{for(let e=O.node.resolve(O.pos,-1);e&&e.to>=O.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.fromO.pos)return null}}return null},FlowMapping:v({closing:"}"}),FlowSequence:v({closing:"]"})}),M.add({"FlowMapping FlowSequence":N,"Item Pair BlockLiteral":(O,e)=>({from:e.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function YO(){return new b(L)}const xO=C.define({name:"yaml-frontmatter",parser:gO.configure({props:[U({DashLine:n.meta})]})});function WO(O){let{language:e,support:a}=O.content instanceof b?O.content:{language:O.content,support:[]};return new b(xO.configure({wrap:E(r=>r.name=="FrontmatterContent"?{parser:L.parser}:r.name=="Body"?{parser:e.parser}:null)}),a)}export{YO as yaml,WO as yamlFrontmatter,L as yamlLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-BjM0cxzn.js b/pkg/cli/webapp/dist/assets/index-BjM0cxzn.js new file mode 100644 index 0000000..4068f8b --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-BjM0cxzn.js @@ -0,0 +1 @@ +import{e as t,E as Z,m as o,s as S,t as e,a as s,L as m,i as d,r as Y,c as a,l as w,f as n,o as V}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const P=1,l=2,q=3,T=82,z=76,_=117,h=85,c=97,j=122,b=65,p=90,v=95,i=48,U=34,R=40,r=41,W=32,x=62,f=new Z(O=>{if(O.next==z||O.next==h?O.advance():O.next==_&&(O.advance(),O.next==i+8&&O.advance()),O.next!=T||(O.advance(),O.next!=U))return;O.advance();let Q="";for(;O.next!=R;){if(O.next==W||O.next<=13||O.next==r)return;Q+=String.fromCharCode(O.next),O.advance()}for(O.advance();;){if(O.next<0)return O.acceptToken(P);if(O.next==r){let $=!0;for(let X=0;$&&X{if(O.next==x)O.peek(1)==x&&O.acceptToken(l,1);else{let Q=!1,$=0;for(;;$++){if(O.next>=b&&O.next<=p)Q=!0;else{if(O.next>=c&&O.next<=j)return;if(O.next!=v&&!(O.next>=i&&O.next<=i+9))break}O.advance()}Q&&$>1&&O.acceptToken(q)}},{extend:!0}),k=S({"typedef struct union enum class typename decltype auto template operator friend noexcept namespace using requires concept import export module __attribute__ __declspec __based":e.definitionKeyword,"extern MsCallModifier MsPointerModifier extern static register thread_local inline const volatile restrict _Atomic mutable constexpr constinit consteval virtual explicit VirtualSpecifier Access":e.modifier,"if else switch for while do case default return break continue goto throw try catch":e.controlKeyword,"co_return co_yield co_await":e.controlKeyword,"new sizeof delete static_assert":e.operatorKeyword,"NULL nullptr":e.null,this:e.self,"True False":e.bool,"TypeSize PrimitiveType":e.standard(e.typeName),TypeIdentifier:e.typeName,FieldIdentifier:e.propertyName,"CallExpression/FieldExpression/FieldIdentifier":e.function(e.propertyName),"ModuleName/Identifier":e.namespace,PartitionName:e.labelName,StatementIdentifier:e.labelName,"Identifier DestructorName":e.variableName,"CallExpression/Identifier":e.function(e.variableName),"CallExpression/ScopedIdentifier/Identifier":e.function(e.variableName),"FunctionDeclarator/Identifier FunctionDeclarator/DestructorName":e.function(e.definition(e.variableName)),NamespaceIdentifier:e.namespace,OperatorName:e.operator,ArithOp:e.arithmeticOperator,LogicOp:e.logicOperator,BitOp:e.bitwiseOperator,CompareOp:e.compareOperator,AssignOp:e.definitionOperator,UpdateOp:e.updateOperator,LineComment:e.lineComment,BlockComment:e.blockComment,Number:e.number,String:e.string,"RawString SystemLibString":e.special(e.string),CharLiteral:e.character,EscapeSequence:e.escape,"UserDefinedLiteral/Identifier":e.literal,PreprocArg:e.meta,"PreprocDirectiveName #include #ifdef #ifndef #if #define #else #endif #elif":e.processingInstruction,MacroName:e.special(e.name),"( )":e.paren,"[ ]":e.squareBracket,"{ }":e.brace,"< >":e.angleBracket,". ->":e.derefOperator,", ;":e.separator}),u={__proto__:null,bool:36,char:36,int:36,float:36,double:36,void:36,size_t:36,ssize_t:36,intptr_t:36,uintptr_t:36,charptr_t:36,int8_t:36,int16_t:36,int32_t:36,int64_t:36,uint8_t:36,uint16_t:36,uint32_t:36,uint64_t:36,char8_t:36,char16_t:36,char32_t:36,char64_t:36,const:70,volatile:72,restrict:74,_Atomic:76,mutable:78,constexpr:80,constinit:82,consteval:84,struct:88,__declspec:92,final:148,override:148,public:152,private:152,protected:152,virtual:154,extern:160,static:162,register:164,inline:166,thread_local:168,__attribute__:172,__based:178,__restrict:180,__uptr:180,__sptr:180,_unaligned:180,__unaligned:180,noexcept:194,requires:198,TRUE:798,true:798,FALSE:800,false:800,typename:218,class:220,template:234,throw:248,__cdecl:256,__clrcall:256,__stdcall:256,__fastcall:256,__thiscall:256,__vectorcall:256,try:260,catch:264,export:282,import:286,case:296,default:298,if:308,else:314,switch:318,do:322,while:324,for:330,return:334,break:338,continue:342,goto:346,co_return:350,co_yield:354,using:362,typedef:366,namespace:380,new:398,delete:400,co_await:402,concept:406,enum:410,static_assert:414,friend:422,union:424,explicit:430,operator:444,module:456,signed:518,unsigned:518,long:518,short:518,decltype:528,auto:530,sizeof:566,NULL:572,nullptr:586,this:588},G={__proto__:null,"<":767},y={__proto__:null,">":135},E={__proto__:null,operator:388,new:576,delete:582},C=t.deserialize({version:14,states:"$<[Q!QQVOOP'gOUOOO([OWO'#CdO,UQUO'#CgO,`QUO'#FjO-vQbO'#CxO.XQUO'#CxO0WQUO'#KaO0_QUO'#CwO0jOpO'#DvO0rQ!dO'#D]OOQR'#JP'#JPO5[QVO'#GUO5iQUO'#JWOOQQ'#JW'#JWO8}QUO'#KtOxQVO'#IbO!(}QVO'#IdO!?SQUO'#IgO!?ZQVO'#IjP!AQO!LQO'#CaP!A]{,UO'#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%2X%3`%3c%3m%3w%3{%5P%5r%5x#CeP%6c%6i%6y%6|%7^%7j%7n%7t%7z$*i$*l$*l%7}%8QP%8a%8dQ#dPa(s#b(p(q(r(t/]/_4rR#dP'`mO[aefwx{!W!X!g!k!n!r!s!v!x#X#Y#[#h#k#n#s#t#u#v#w#x#y#z#{#|#}$P$W$Y$[$g$h$m%_%o&S&U&Y&d&h&z&{'O'Q'R'e'l'm'|(c(e(l)q)w*m*n*q*v*w*{+]+_+m+o+p,U,W,s,v,|-d-e-h-n.W.X.]/U/X/d/k/t/v/{/}0p1T1Y1i1j1t1x2S2U2k2n2q3P3U3X3s4Y4]4b4k5d5o5{6i6m6p6r6t7O7Q7V7l7t7w8o8q8w8}9O9]9a9g9i9v9y9z:V:Y:`:b:g:l:pU%qm%r7[Q&o!`Q(p#^d0X*S0U0V0W0Z5X5Y5Z5^8[R7[3_b}Oaewx{!g&U*v&v$k[!W!X!k!n!r!s!v!x#X#Y#[#h#k#n#s#t#u#v#w#x#y#z#{#|#}$P$W$Y$[$g$h$m%_%o&S&Y&d&h&z&{'O'Q'R'e'l'm'|(c(e(l)q)w*m*n*q*w*{+]+_+m+o+p,U,W,s,v,|-d-e-h-n.W.X.]/U/X/d/k/t/v/{/}1T1i1j1t1x2S2U2k2n2q3P3U3X3s4Y4]4b4k5d5o5{6i6m6p6r6t7O7Q7V7l7t7w8o8q8w8}9O9]9a9g9i9v9y9z:V:Y:`:b:g:l:pS%bf0p#d%lgnp|#O$i%O%P%U%f%j%k%y&u'w'x(T*_*e*g*y+b,q,{-f-w.O.m.t.v0e1R1S1W1[2g2r5k6q;b;c;d;j;k;l;y;z;{;| MacroName LineComment BlockComment PreprocDirective #include String EscapeSequence SystemLibString Identifier ) ( ArgumentList ConditionalExpression AssignmentExpression CallExpression PrimitiveType FieldExpression FieldIdentifier DestructorName TemplateMethod ScopedFieldIdentifier NamespaceIdentifier TemplateType TypeIdentifier ScopedTypeIdentifier ScopedNamespaceIdentifier :: NamespaceIdentifier TypeIdentifier TemplateArgumentList < TypeDescriptor const volatile restrict _Atomic mutable constexpr constinit consteval StructSpecifier struct MsDeclspecModifier __declspec Attribute AttributeName Identifier AttributeArgs { } [ ] UpdateOp ArithOp ArithOp ArithOp LogicOp BitOp BitOp BitOp CompareOp CompareOp CompareOp > CompareOp BitOp UpdateOp , Number CharLiteral AttributeArgs VirtualSpecifier BaseClassClause Access virtual FieldDeclarationList FieldDeclaration extern static register inline thread_local AttributeSpecifier __attribute__ PointerDeclarator MsBasedModifier __based MsPointerModifier FunctionDeclarator ParameterList ParameterDeclaration PointerDeclarator FunctionDeclarator Noexcept noexcept RequiresClause requires True False ParenthesizedExpression CommaExpression LambdaExpression LambdaCaptureSpecifier TemplateParameterList OptionalParameterDeclaration TypeParameterDeclaration typename class VariadicParameterDeclaration VariadicDeclarator ReferenceDeclarator OptionalTypeParameterDeclaration VariadicTypeParameterDeclaration TemplateTemplateParameterDeclaration template AbstractFunctionDeclarator AbstractPointerDeclarator AbstractArrayDeclarator AbstractParenthesizedDeclarator AbstractReferenceDeclarator ThrowSpecifier throw TrailingReturnType CompoundStatement FunctionDefinition MsCallModifier TryStatement try CatchClause catch LinkageSpecification Declaration InitDeclarator InitializerList InitializerPair SubscriptDesignator FieldDesignator ExportDeclaration export ImportDeclaration import ModuleName PartitionName HeaderName CaseStatement case default LabeledStatement StatementIdentifier ExpressionStatement IfStatement if ConditionClause Declaration else SwitchStatement switch DoStatement do while WhileStatement ForStatement for ReturnStatement return BreakStatement break ContinueStatement continue GotoStatement goto CoReturnStatement co_return CoYieldStatement co_yield AttributeStatement ForRangeLoop AliasDeclaration using TypeDefinition typedef PointerDeclarator FunctionDeclarator ArrayDeclarator ParenthesizedDeclarator ThrowStatement NamespaceDefinition namespace ScopedIdentifier Identifier OperatorName operator ArithOp BitOp CompareOp LogicOp new delete co_await ConceptDefinition concept UsingDeclaration enum StaticAssertDeclaration static_assert ConcatenatedString TemplateDeclaration FriendDeclaration friend union FunctionDefinition ExplicitFunctionSpecifier explicit FieldInitializerList FieldInitializer DefaultMethodClause DeleteMethodClause FunctionDefinition OperatorCast operator TemplateInstantiation FunctionDefinition FunctionDefinition Declaration ModuleDeclaration module RequiresExpression RequirementList SimpleRequirement TypeRequirement CompoundRequirement ReturnTypeRequirement ConstraintConjuction LogicOp ConstraintDisjunction LogicOp ArrayDeclarator ParenthesizedDeclarator ReferenceDeclarator TemplateFunction OperatorName StructuredBindingDeclarator ArrayDeclarator ParenthesizedDeclarator ReferenceDeclarator BitfieldClause FunctionDefinition FunctionDefinition Declaration FunctionDefinition Declaration AccessSpecifier UnionSpecifier ClassSpecifier EnumSpecifier SizedTypeSpecifier TypeSize EnumeratorList Enumerator DependentType Decltype decltype auto PlaceholderTypeSpecifier ParameterPackExpansion ParameterPackExpansion FieldIdentifier PointerExpression SubscriptExpression BinaryExpression ArithOp LogicOp LogicOp BitOp UnaryExpression LogicOp BitOp UpdateExpression CastExpression SizeofExpression sizeof CoAwaitExpression CompoundLiteralExpression NULL NewExpression new NewDeclarator DeleteExpression delete ParameterPackExpansion nullptr this UserDefinedLiteral ParamPack #define PreprocArg #if #ifdef #ifndef #else #endif #elif PreprocDirectiveName Macro Program",maxTerm:433,nodeProps:[["group",-35,1,8,11,15,16,17,19,71,72,100,101,102,104,191,208,229,242,243,270,271,272,277,280,281,282,284,285,286,287,290,292,293,294,295,296,"Expression",-13,18,25,26,27,43,255,256,257,258,262,263,265,266,"Type",-19,126,129,147,150,152,153,158,160,163,164,166,168,170,172,174,176,178,179,188,"Statement"],["isolate",-4,4,5,8,10,""],["openedBy",12,"(",52,"{",54,"["],["closedBy",13,")",51,"}",53,"]"]],propSources:[k],skippedNodes:[0,3,4,5,6,7,10,297,298,299,300,301,302,303,304,305,306,308,349,350],repeatNodeCount:43,tokenData:"&AbMfR!UOX$eXY/]YZ5gZ]$e]^1g^p$epq/]qr5}rs8Zst:Ttu$euv!AWvw!Cbwx!Eqxy!Flyz!Gmz{!Hn{|!Iw|}!LX}!O!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,get:O=>u[O]||-1},{term:33,get:O=>G[O]||-1},{term:66,get:O=>y[O]||-1},{term:369,get:O=>E[O]||-1}],tokenPrec:24852}),F=m.define({name:"cpp",parser:C.configure({props:[d.add({IfStatement:a({except:/^\s*({|else\b)/}),TryStatement:a({except:/^\s*({|catch)\b/}),LabeledStatement:Y,CaseStatement:O=>O.baseIndent+O.unit,BlockComment:()=>null,CompoundStatement:w({closing:"}"}),Statement:a({except:/^{/})}),n.add({"DeclarationList CompoundStatement EnumeratorList FieldDeclarationList InitializerList":V,BlockComment(O){return{from:O.from+2,to:O.to-2}}})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\})$/,closeBrackets:{stringPrefixes:["L","u","U","u8","LR","UR","uR","u8R","R"]}}});function N(){return new s(F)}export{N as cpp,F as cppLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-BuM87VDr.js b/pkg/cli/webapp/dist/assets/index-BuM87VDr.js new file mode 100644 index 0000000..8b1f534 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-BuM87VDr.js @@ -0,0 +1 @@ +import{e as V,E as X,s as d,t as $,k as Z,a as R,p as s,L as t,i as y,c,l as U,f as l,o as w}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const W=1,p=2,q=275,u=3,b=276,_=277,f=278,m=4,k=5,G=6,x=7,n=8,h=9,v=10,g=11,j=12,E=13,I=14,N=15,L=16,F=17,C=18,H=19,A=20,K=21,D=22,B=23,M=24,J=25,OO=26,$O=27,QO=28,iO=29,aO=30,TO=31,PO=32,XO=33,SO=34,cO=35,eO=36,oO=37,_O=38,nO=39,zO=40,rO=41,YO=42,VO=43,dO=44,ZO=45,RO=46,sO=47,tO=48,yO=49,UO=50,lO=51,wO=52,WO=53,pO=54,qO=55,uO=56,bO=57,fO=58,mO=59,kO=60,GO=61,xO=62,e=63,hO=64,vO=65,gO=66,jO={abstract:m,and:k,array:G,as:x,true:n,false:n,break:h,case:v,catch:g,clone:j,const:E,continue:I,declare:L,default:N,do:F,echo:C,else:H,elseif:A,enddeclare:K,endfor:D,endforeach:B,endif:M,endswitch:J,endwhile:OO,enum:$O,extends:QO,final:iO,finally:aO,fn:TO,for:PO,foreach:XO,from:SO,function:cO,global:eO,goto:oO,if:_O,implements:nO,include:zO,include_once:rO,instanceof:YO,insteadof:VO,interface:dO,list:ZO,match:RO,namespace:sO,new:tO,null:yO,or:UO,print:lO,readonly:wO,require:WO,require_once:pO,return:qO,switch:uO,throw:bO,trait:fO,try:mO,unset:kO,use:GO,var:xO,public:e,private:e,protected:e,while:hO,xor:vO,yield:gO,__proto__:null};function z(O){let Q=jO[O.toLowerCase()];return Q??-1}function r(O){return O==9||O==10||O==13||O==32}function Y(O){return O>=97&&O<=122||O>=65&&O<=90}function T(O){return O==95||O>=128||Y(O)}function o(O){return O>=48&&O<=55||O>=97&&O<=102||O>=65&&O<=70}const EO={int:!0,integer:!0,bool:!0,boolean:!0,float:!0,double:!0,real:!0,string:!0,array:!0,object:!0,unset:!0,__proto__:null},IO=new X(O=>{if(O.next==40){O.advance();let Q=0;for(;r(O.peek(Q));)Q++;let i="",a;for(;Y(a=O.peek(Q));)i+=String.fromCharCode(a),Q++;for(;r(O.peek(Q));)Q++;O.peek(Q)==41&&EO[i.toLowerCase()]&&O.acceptToken(W)}else if(O.next==60&&O.peek(1)==60&&O.peek(2)==60){for(let a=0;a<3;a++)O.advance();for(;O.next==32||O.next==9;)O.advance();let Q=O.next==39;if(Q&&O.advance(),!T(O.next))return;let i=String.fromCharCode(O.next);for(;O.advance(),!(!T(O.next)&&!(O.next>=48&&O.next<=55));)i+=String.fromCharCode(O.next);if(Q){if(O.next!=39)return;O.advance()}if(O.next!=10&&O.next!=13)return;for(;;){let a=O.next==10||O.next==13;if(O.advance(),O.next<0)return;if(a){for(;O.next==32||O.next==9;)O.advance();let P=!0;for(let S=0;S{O.next<0&&O.acceptToken(f)}),LO=new X((O,Q)=>{O.next==63&&Q.canShift(_)&&O.peek(1)==62&&O.acceptToken(_)});function FO(O){let Q=O.peek(1);if(Q==110||Q==114||Q==116||Q==118||Q==101||Q==102||Q==92||Q==36||Q==34||Q==123)return 2;if(Q>=48&&Q<=55){let i=2,a;for(;i<5&&(a=O.peek(i))>=48&&a<=55;)i++;return i}if(Q==120&&o(O.peek(2)))return o(O.peek(3))?4:3;if(Q==117&&O.peek(2)==123)for(let i=3;;i++){let a=O.peek(i);if(a==125)return i==2?0:i+1;if(!o(a))break}return 0}const CO=new X((O,Q)=>{let i=!1;for(;!(O.next==34||O.next<0||O.next==36&&(T(O.peek(1))||O.peek(1)==123)||O.next==123&&O.peek(1)==36);i=!0){if(O.next==92){let a=FO(O);if(a){if(i)break;return O.acceptToken(u,a)}}else if(!i&&(O.next==91||O.next==45&&O.peek(1)==62&&T(O.peek(2))||O.next==63&&O.peek(1)==45&&O.peek(2)==62&&T(O.peek(3)))&&Q.canShift(b))break;O.advance()}i&&O.acceptToken(q)}),HO=d({"Visibility abstract final static":$.modifier,"for foreach while do if else elseif switch try catch finally return throw break continue default case":$.controlKeyword,"endif endfor endforeach endswitch endwhile declare enddeclare goto match":$.controlKeyword,"and or xor yield unset clone instanceof insteadof":$.operatorKeyword,"function fn class trait implements extends const enum global interface use var":$.definitionKeyword,"include include_once require require_once namespace":$.moduleKeyword,"new from echo print array list as":$.keyword,null:$.null,Boolean:$.bool,VariableName:$.variableName,"NamespaceName/...":$.namespace,"NamedType/...":$.typeName,Name:$.name,"CallExpression/Name":$.function($.variableName),"LabelStatement/Name":$.labelName,"MemberExpression/Name":$.propertyName,"MemberExpression/VariableName":$.special($.propertyName),"ScopedExpression/ClassMemberName/Name":$.propertyName,"ScopedExpression/ClassMemberName/VariableName":$.special($.propertyName),"CallExpression/MemberExpression/Name":$.function($.propertyName),"CallExpression/ScopedExpression/ClassMemberName/Name":$.function($.propertyName),"MethodDeclaration/Name":$.function($.definition($.variableName)),"FunctionDefinition/Name":$.function($.definition($.variableName)),"ClassDeclaration/Name":$.definition($.className),UpdateOp:$.updateOperator,ArithOp:$.arithmeticOperator,"LogicOp IntersectionType/&":$.logicOperator,BitOp:$.bitwiseOperator,CompareOp:$.compareOperator,ControlOp:$.controlOperator,AssignOp:$.definitionOperator,"$ ConcatOp":$.operator,LineComment:$.lineComment,BlockComment:$.blockComment,Integer:$.integer,Float:$.float,String:$.string,ShellExpression:$.special($.string),"=> ->":$.punctuation,"( )":$.paren,"#[ [ ]":$.squareBracket,"${ { }":$.brace,"-> ?->":$.derefOperator,", ; :: : \\":$.separator,"PhpOpen PhpClose":$.processingInstruction}),AO={__proto__:null,static:325,STATIC:325,class:351,CLASS:351},KO=V.deserialize({version:14,states:"%#[Q`OWOOQhQaOOP%oO`OOOOO#t'#Hh'#HhO%tO#|O'#DuOOO#u'#Dx'#DxQ&SOWO'#DxO&XO$VOOOOQ#u'#Dy'#DyO&lQaO'#D}O'[QdO'#EQO+QQdO'#IqO+_QdO'#ERO-RQaO'#EXO/bQ`O'#EUO/gQ`O'#E_O2UQaO'#E_O2]Q`O'#EgO2bQ`O'#EqO-RQaO'#EqO2mQpO'#FOO2rQ`O'#FOOOQS'#Iq'#IqO2wQ`O'#ExOOQS'#Ih'#IhO5SQdO'#IeO9UQeO'#F]O-RQaO'#FlO-RQaO'#FmO-RQaO'#FnO-RQaO'#FoO-RQaO'#FoO-RQaO'#FrOOQO'#Ir'#IrO9cQ`O'#FxOOQO'#Ht'#HtO9kQ`O'#HXO:VQ`O'#FsO:bQ`O'#HfO:mQ`O'#GPO:uQaO'#GQO-RQaO'#G`O-RQaO'#GcO;bOrO'#GfOOQS'#JP'#JPOOQS'#JO'#JOOOQS'#Ie'#IeO/bQ`O'#GmO/bQ`O'#GoO/bQ`O'#GtOhQaO'#GvO;iQ`O'#GwO;nQ`O'#GzO:]Q`O'#G}O;sQeO'#HOO;sQeO'#HPO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+^,Q,T,Y,c,e,g,m-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_T$x{$|Q(q%QQ(v%TQ(y%VR2b1WQ%c!]Q(u%SQ,d(tQ/W,cQ/Y,eQ1Q/XR2_1RQ%q!fR)m%rR/p-O",nodeNames:"⚠ ( HeredocString EscapeSequence abstract LogicOp array as Boolean break case catch clone const continue default declare do echo else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final finally fn for foreach from function global goto if implements include include_once LogicOp insteadof interface list match namespace new null LogicOp print readonly require require_once return switch throw trait try unset use var Visibility while LogicOp yield LineComment BlockComment TextInterpolation PhpClose Text PhpOpen Template TextInterpolation EmptyStatement ; } { Block : LabelStatement Name ExpressionStatement ConditionalExpression LogicOp MatchExpression ) ( ParenthesizedExpression MatchBlock MatchArm , => AssignmentExpression ArrayExpression ValueList & VariadicUnpacking ... Pair [ ] ListExpression ValueList Pair Pair SubscriptExpression MemberExpression -> ?-> Name VariableName DynamicVariable $ ${ CallExpression ArgList NamedArgument SpreadArgument CastExpression UnionType LogicOp IntersectionType OptionalType NamedType QualifiedName \\ NamespaceName Name NamespaceName Name ScopedExpression :: ClassMemberName DynamicMemberName AssignOp UpdateExpression UpdateOp YieldExpression BinaryExpression LogicOp LogicOp LogicOp BitOp BitOp BitOp CompareOp CompareOp BitOp ArithOp ConcatOp ArithOp ArithOp IncludeExpression RequireExpression CloneExpression UnaryExpression ControlOp LogicOp PrintIntrinsic FunctionExpression static ParamList Parameter #[ Attributes Attribute VariadicParameter PropertyParameter PropertyHooks PropertyHook UseList ArrowFunction NewExpression class BaseClause ClassInterfaceClause DeclarationList ConstDeclaration VariableDeclarator PropertyDeclaration VariableDeclarator MethodDeclaration UseDeclaration UseList UseInsteadOfClause UseAsClause UpdateExpression ArithOp ShellExpression ThrowExpression Integer Float String MemberExpression SubscriptExpression UnaryExpression ArithOp Interpolation String IfStatement ColonBlock SwitchStatement Block CaseStatement DefaultStatement ColonBlock WhileStatement EmptyStatement DoStatement ForStatement ForSpec SequenceExpression ForeachStatement ForSpec Pair GotoStatement ContinueStatement BreakStatement ReturnStatement TryStatement CatchDeclarator DeclareStatement EchoStatement UnsetStatement ConstDeclaration FunctionDefinition ClassDeclaration InterfaceDeclaration TraitDeclaration EnumDeclaration EnumBody EnumCase NamespaceDefinition NamespaceUseDeclaration UseGroup UseClause UseClause GlobalDeclaration FunctionStaticDeclaration Program",maxTerm:318,nodeProps:[["group",-36,2,8,49,82,84,86,89,94,95,103,107,108,112,113,116,120,126,132,137,139,140,154,155,156,157,160,161,173,174,188,190,191,192,193,194,200,"Expression",-28,75,79,81,83,201,203,208,210,211,214,217,218,219,220,221,223,224,225,226,227,228,229,230,231,234,235,239,240,"Statement",-4,121,123,124,125,"Type"],["isolate",-4,67,68,71,200,""],["openedBy",70,"phpOpen",77,"{",87,"(",102,"#["],["closedBy",72,"phpClose",78,"}",88,")",165,"]"]],propSources:[HO],skippedNodes:[0],repeatNodeCount:32,tokenData:"!GQ_R!]OX$zXY&^YZ'sZ]$z]^&^^p$zpq&^qr)Rrs+Pst+otu2buv5evw6rwx8Vxy>]yz>yz{?g{|@}|}Bb}!OCO!O!PDh!P!QKT!Q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EY#q;'S$z;'S;=`&W<%lO$zR!EaV$SQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!E}V!oQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!FkV$eQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z",tokenizers:[IO,CO,LO,0,1,2,3,NO],topRules:{Template:[0,73],Program:[1,241]},dynamicPrecedences:{298:1},specialized:[{term:284,get:(O,Q)=>z(O)<<1,external:z},{term:284,get:O=>AO[O]||-1}],tokenPrec:29889}),DO=t.define({name:"php",parser:KO.configure({props:[y.add({IfStatement:c({except:/^\s*({|else\b|elseif\b|endif\b)/}),TryStatement:c({except:/^\s*({|catch\b|finally\b)/}),SwitchBody:O=>{let Q=O.textAfter,i=/^\s*\}/.test(Q),a=/^\s*(case|default)\b/.test(Q);return O.baseIndent+(i?0:a?1:2)*O.unit},ColonBlock:O=>O.baseIndent+O.unit,"Block EnumBody DeclarationList":U({closing:"}"}),ArrowFunction:O=>O.baseIndent+O.unit,"String BlockComment":()=>null,Statement:c({except:/^({|end(for|foreach|switch|while)\b)/})}),l.add({"Block EnumBody DeclarationList SwitchBody ArrayExpression ValueList":w,ColonBlock(O){return{from:O.from+1,to:O.to}},BlockComment(O){return{from:O.from+2,to:O.to-2}}})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*(?:case |default:|end(?:if|for(?:each)?|switch|while)|else(?:if)?|\{|\})$/,wordChars:"$",closeBrackets:{stringPrefixes:["b","B"]}}});function i$(O={}){let Q=[],i;if(O.baseLanguage!==null)if(O.baseLanguage)i=O.baseLanguage;else{let a=Z({matchClosingTags:!1});Q.push(a.support),i=a.language}return new R(DO.configure({wrap:i&&s(a=>a.type.isTop?{parser:i.parser,overlay:P=>P.name=="Text"}:null),top:O.plain?"Program":"Template"}),Q)}export{i$ as php,DO as phpLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-Bz3KHWSS.js b/pkg/cli/webapp/dist/assets/index-Bz3KHWSS.js new file mode 100644 index 0000000..80d7168 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-Bz3KHWSS.js @@ -0,0 +1,269 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/core-3OglTz8x.js","assets/engine-oniguruma-DwXy4luw.js","assets/index-C3Ux1Lgv.js","assets/index-vBeBfY-6.js","assets/index-DIIxsTGV.js","assets/index-C9q4Fmxx.js","assets/xml-e3z08dGr.js","assets/java-xI-RfyKK.js","assets/html-C2L_23MC.js","assets/javascript-ySlJ1b_l.js","assets/css-BPhBrDlE.js","assets/index-q9STU_Ao.js","assets/mermaid-GHXKKRXX-Cue24Ovd.js","assets/index-RgHATUD5.js","assets/index-DAs1rq5_.js","assets/index-DINwPV8Q.js","assets/index-Xjp-wlra.js"])))=>i.map(i=>d[i]); +function y7(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var Gne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yh={exports:{}},Rc={},wh={exports:{}},it={};var ib;function w7(){if(ib)return it;ib=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function x($){return $===null||typeof $!="object"?null:($=h&&$[h]||$["@@iterator"],typeof $=="function"?$:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,b={};function j($,Q,ae){this.props=$,this.context=Q,this.refs=b,this.updater=ae||v}j.prototype.isReactComponent={},j.prototype.setState=function($,Q){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,Q,"setState")},j.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function S(){}S.prototype=j.prototype;function N($,Q,ae){this.props=$,this.context=Q,this.refs=b,this.updater=ae||v}var k=N.prototype=new S;k.constructor=N,y(k,j.prototype),k.isPureReactComponent=!0;var T=Array.isArray,E=Object.prototype.hasOwnProperty,O={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function L($,Q,ae){var ie,de={},ge=null,ve=null;if(Q!=null)for(ie in Q.ref!==void 0&&(ve=Q.ref),Q.key!==void 0&&(ge=""+Q.key),Q)E.call(Q,ie)&&!M.hasOwnProperty(ie)&&(de[ie]=Q[ie]);var Le=arguments.length-2;if(Le===1)de.children=ae;else if(1>>1,Q=P[$];if(0>>1;$s(de,ne))ges(ve,de)?(P[$]=ve,P[ge]=ne,$=ge):(P[$]=de,P[ie]=ne,$=ie);else if(ges(ve,ne))P[$]=ve,P[ge]=ne,$=ge;else break e}}return J}function s(P,J){var ne=P.sortIndex-J.sortIndex;return ne!==0?ne:P.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],p=1,h=null,x=3,v=!1,y=!1,b=!1,j=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(P){for(var J=n(f);J!==null;){if(J.callback===null)r(f);else if(J.startTime<=P)r(f),J.sortIndex=J.expirationTime,t(d,J);else break;J=n(f)}}function T(P){if(b=!1,k(P),!y)if(n(d)!==null)y=!0,W(E);else{var J=n(f);J!==null&&se(T,J.startTime-P)}}function E(P,J){y=!1,b&&(b=!1,S(L),L=-1),v=!0;var ne=x;try{for(k(J),h=n(d);h!==null&&(!(h.expirationTime>J)||P&&!z());){var $=h.callback;if(typeof $=="function"){h.callback=null,x=h.priorityLevel;var Q=$(h.expirationTime<=J);J=e.unstable_now(),typeof Q=="function"?h.callback=Q:h===n(d)&&r(d),k(J)}else r(d);h=n(d)}if(h!==null)var ae=!0;else{var ie=n(f);ie!==null&&se(T,ie.startTime-J),ae=!1}return ae}finally{h=null,x=ne,v=!1}}var O=!1,M=null,L=-1,F=5,U=-1;function z(){return!(e.unstable_now()-UP||125$?(P.sortIndex=ne,t(f,P),n(d)===null&&P===n(f)&&(b?(S(L),L=-1):b=!0,se(T,ne-$))):(P.sortIndex=Q,t(d,P),y||v||(y=!0,W(E))),P},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(P){var J=x;return function(){var ne=x;x=J;try{return P.apply(this,arguments)}finally{x=ne}}}})(kh)),kh}var db;function N7(){return db||(db=1,jh.exports=k7()),jh.exports}var fb;function C7(){if(fb)return cr;fb=1;var e=Qg(),t=N7();function n(a){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+a,m=1;m"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function x(a){return d.call(h,a)?!0:d.call(p,a)?!1:f.test(a)?h[a]=!0:(p[a]=!0,!1)}function v(a,c,m,g){if(m!==null&&m.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return g?!1:m!==null?!m.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function y(a,c,m,g){if(c===null||typeof c>"u"||v(a,c,m,g))return!0;if(g)return!1;if(m!==null)switch(m.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function b(a,c,m,g,_,C,A){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=g,this.attributeNamespace=_,this.mustUseProperty=m,this.propertyName=a,this.type=c,this.sanitizeURL=C,this.removeEmptyString=A}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){j[a]=new b(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var c=a[0];j[c]=new b(c,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){j[a]=new b(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){j[a]=new b(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){j[a]=new b(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){j[a]=new b(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){j[a]=new b(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){j[a]=new b(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){j[a]=new b(a,5,!1,a.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function N(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var c=a.replace(S,N);j[c]=new b(c,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var c=a.replace(S,N);j[c]=new b(c,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var c=a.replace(S,N);j[c]=new b(c,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){j[a]=new b(a,1,!1,a.toLowerCase(),null,!1,!1)}),j.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){j[a]=new b(a,1,!1,a.toLowerCase(),null,!0,!0)});function k(a,c,m,g){var _=j.hasOwnProperty(c)?j[c]:null;(_!==null?_.type!==0:g||!(2D||_[A]!==C[D]){var Z=` +`+_[A].replace(" at new "," at ");return a.displayName&&Z.includes("")&&(Z=Z.replace("",a.displayName)),Z}while(1<=A&&0<=D);break}}}finally{ae=!1,Error.prepareStackTrace=m}return(a=a?a.displayName||a.name:"")?Q(a):""}function de(a){switch(a.tag){case 5:return Q(a.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return a=ie(a.type,!1),a;case 11:return a=ie(a.type.render,!1),a;case 1:return a=ie(a.type,!0),a;default:return""}}function ge(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case M:return"Fragment";case O:return"Portal";case F:return"Profiler";case L:return"StrictMode";case X:return"Suspense";case H:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case z:return(a.displayName||"Context")+".Consumer";case U:return(a._context.displayName||"Context")+".Provider";case V:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case B:return c=a.displayName||null,c!==null?c:ge(a.type)||"Memo";case W:c=a._payload,a=a._init;try{return ge(a(c))}catch{}}return null}function ve(a){var c=a.type;switch(a.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=c.render,a=a.displayName||a.name||"",c.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(c);case 8:return c===L?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function Le(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function je(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function Ue(a){var c=je(a)?"checked":"value",m=Object.getOwnPropertyDescriptor(a.constructor.prototype,c),g=""+a[c];if(!a.hasOwnProperty(c)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var _=m.get,C=m.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return _.call(this)},set:function(A){g=""+A,C.call(this,A)}}),Object.defineProperty(a,c,{enumerable:m.enumerable}),{getValue:function(){return g},setValue:function(A){g=""+A},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function we(a){a._valueTracker||(a._valueTracker=Ue(a))}function ke(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var m=c.getValue(),g="";return a&&(g=je(a)?a.checked?"true":"false":a.value),a=g,a!==m?(c.setValue(a),!0):!1}function Ne(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function xe(a,c){var m=c.checked;return ne({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??a._wrapperState.initialChecked})}function Re(a,c){var m=c.defaultValue==null?"":c.defaultValue,g=c.checked!=null?c.checked:c.defaultChecked;m=Le(c.value!=null?c.value:m),a._wrapperState={initialChecked:g,initialValue:m,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function et(a,c){c=c.checked,c!=null&&k(a,"checked",c,!1)}function Ve(a,c){et(a,c);var m=Le(c.value),g=c.type;if(m!=null)g==="number"?(m===0&&a.value===""||a.value!=m)&&(a.value=""+m):a.value!==""+m&&(a.value=""+m);else if(g==="submit"||g==="reset"){a.removeAttribute("value");return}c.hasOwnProperty("value")?Ie(a,c.type,m):c.hasOwnProperty("defaultValue")&&Ie(a,c.type,Le(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(a.defaultChecked=!!c.defaultChecked)}function st(a,c,m){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var g=c.type;if(!(g!=="submit"&&g!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+a._wrapperState.initialValue,m||c===a.value||(a.value=c),a.defaultValue=c}m=a.name,m!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,m!==""&&(a.name=m)}function Ie(a,c,m){(c!=="number"||Ne(a.ownerDocument)!==a)&&(m==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+m&&(a.defaultValue=""+m))}var _e=Array.isArray;function be(a,c,m,g){if(a=a.options,c){c={};for(var _=0;_"+c.valueOf().toString()+"",c=at.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}});function mt(a,c){if(c){var m=a.firstChild;if(m&&m===a.lastChild&&m.nodeType===3){m.nodeValue=c;return}}a.textContent=c}var pt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ln=["Webkit","ms","Moz","O"];Object.keys(pt).forEach(function(a){ln.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1),pt[c]=pt[a]})});function gr(a,c,m){return c==null||typeof c=="boolean"||c===""?"":m||typeof c!="number"||c===0||pt.hasOwnProperty(a)&&pt[a]?(""+c).trim():c+"px"}function Gr(a,c){a=a.style;for(var m in c)if(c.hasOwnProperty(m)){var g=m.indexOf("--")===0,_=gr(m,c[m],g);m==="float"&&(m="cssFloat"),g?a.setProperty(m,_):a[m]=_}}var gs=ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qt(a,c){if(c){if(gs[a]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(n(137,a));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(n(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(n(61))}if(c.style!=null&&typeof c.style!="object")throw Error(n(62))}}function jt(a,c){if(a.indexOf("-")===-1)return typeof c.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tr=null;function xs(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var tn=null,Un=null,nr=null;function xr(a){if(a=bc(a)){if(typeof tn!="function")throw Error(n(280));var c=a.stateNode;c&&(c=Od(c),tn(a.stateNode,a.type,c))}}function vs(a){Un?nr?nr.push(a):nr=[a]:Un=a}function ht(){if(Un){var a=Un,c=nr;if(nr=Un=null,xr(a),c)for(a=0;a>>=0,a===0?32:31-(tc(a)/nc|0)|0}var Ks=64,jo=4194304;function _s(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function te(a,c){var m=a.pendingLanes;if(m===0)return 0;var g=0,_=a.suspendedLanes,C=a.pingedLanes,A=m&268435455;if(A!==0){var D=A&~_;D!==0?g=_s(D):(C&=A,C!==0&&(g=_s(C)))}else A=m&~_,A!==0?g=_s(A):C!==0&&(g=_s(C));if(g===0)return 0;if(c!==0&&c!==g&&(c&_)===0&&(_=g&-g,C=c&-c,_>=C||_===16&&(C&4194240)!==0))return c;if((g&4)!==0&&(g|=m&16),c=a.entangledLanes,c!==0)for(a=a.entanglements,c&=g;0m;m++)c.push(a);return c}function I(a,c,m){a.pendingLanes|=c,c!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,c=31-Bt(c),a[c]=m}function G(a,c){var m=a.pendingLanes&~c;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=c,a.mutableReadLanes&=c,a.entangledLanes&=c,c=a.entanglements;var g=a.eventTimes;for(a=a.expirationTimes;0=uc),Xx=" ",ev=!1;function tv(a,c){switch(a){case"keyup":return hS.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nv(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ta=!1;function xS(a,c){switch(a){case"compositionend":return nv(c);case"keypress":return c.which!==32?null:(ev=!0,Xx);case"textInput":return a=c.data,a===Xx&&ev?null:a;default:return null}}function vS(a,c){if(Ta)return a==="compositionend"||!ep&&tv(a,c)?(a=qx(),bd=Km=Eo=null,Ta=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1=c)return{node:m,offset:c-a};a=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=cv(m)}}function dv(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?dv(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function fv(){for(var a=window,c=Ne();c instanceof a.HTMLIFrameElement;){try{var m=typeof c.contentWindow.location.href=="string"}catch{m=!1}if(m)a=c.contentWindow;else break;c=Ne(a.document)}return c}function rp(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c&&(c==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||c==="textarea"||a.contentEditable==="true")}function SS(a){var c=fv(),m=a.focusedElem,g=a.selectionRange;if(c!==m&&m&&m.ownerDocument&&dv(m.ownerDocument.documentElement,m)){if(g!==null&&rp(m)){if(c=g.start,a=g.end,a===void 0&&(a=c),"selectionStart"in m)m.selectionStart=c,m.selectionEnd=Math.min(a,m.value.length);else if(a=(c=m.ownerDocument||document)&&c.defaultView||window,a.getSelection){a=a.getSelection();var _=m.textContent.length,C=Math.min(g.start,_);g=g.end===void 0?C:Math.min(g.end,_),!a.extend&&C>g&&(_=g,g=C,C=_),_=uv(m,C);var A=uv(m,g);_&&A&&(a.rangeCount!==1||a.anchorNode!==_.node||a.anchorOffset!==_.offset||a.focusNode!==A.node||a.focusOffset!==A.offset)&&(c=c.createRange(),c.setStart(_.node,_.offset),a.removeAllRanges(),C>g?(a.addRange(c),a.extend(A.node,A.offset)):(c.setEnd(A.node,A.offset),a.addRange(c)))}}for(c=[],a=m;a=a.parentNode;)a.nodeType===1&&c.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m=document.documentMode,Oa=null,sp=null,pc=null,op=!1;function mv(a,c,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;op||Oa==null||Oa!==Ne(g)||(g=Oa,"selectionStart"in g&&rp(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),pc&&mc(pc,g)||(pc=g,g=Sd(sp,"onSelect"),0Pa||(a.current=xp[Pa],xp[Pa]=null,Pa--)}function Nt(a,c){Pa++,xp[Pa]=a.current,a.current=c}var Ao={},Ln=Mo(Ao),sr=Mo(!1),Ti=Ao;function Ia(a,c){var m=a.type.contextTypes;if(!m)return Ao;var g=a.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===c)return g.__reactInternalMemoizedMaskedChildContext;var _={},C;for(C in m)_[C]=c[C];return g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=c,a.__reactInternalMemoizedMaskedChildContext=_),_}function or(a){return a=a.childContextTypes,a!=null}function Md(){Ot(sr),Ot(Ln)}function Ev(a,c,m){if(Ln.current!==Ao)throw Error(n(168));Nt(Ln,c),Nt(sr,m)}function Tv(a,c,m){var g=a.stateNode;if(c=c.childContextTypes,typeof g.getChildContext!="function")return m;g=g.getChildContext();for(var _ in g)if(!(_ in c))throw Error(n(108,ve(a)||"Unknown",_));return ne({},m,g)}function Ad(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ao,Ti=Ln.current,Nt(Ln,a),Nt(sr,sr.current),!0}function Ov(a,c,m){var g=a.stateNode;if(!g)throw Error(n(169));m?(a=Tv(a,c,Ti),g.__reactInternalMemoizedMergedChildContext=a,Ot(sr),Ot(Ln),Nt(Ln,a)):Ot(sr),Nt(sr,m)}var Js=null,Ld=!1,vp=!1;function Mv(a){Js===null?Js=[a]:Js.push(a)}function DS(a){Ld=!0,Mv(a)}function Lo(){if(!vp&&Js!==null){vp=!0;var a=0,c=ue;try{var m=Js;for(ue=1;a>=A,_-=A,Qs=1<<32-Bt(c)+_|m<<_|g,Ys=C+a}else Qs=1<Ye?(hn=Ke,Ke=null):hn=Ke.sibling;var ft=me(ee,Ke,re[Ye],ye);if(ft===null){Ke===null&&(Ke=hn);break}a&&Ke&&ft.alternate===null&&c(ee,Ke),q=C(ft,q,Ye),qe===null?ze=ft:qe.sibling=ft,qe=ft,Ke=hn}if(Ye===re.length)return m(ee,Ke),Ft&&Mi(ee,Ye),ze;if(Ke===null){for(;YeYe?(hn=Ke,Ke=null):hn=Ke.sibling;var zo=me(ee,Ke,ft.value,ye);if(zo===null){Ke===null&&(Ke=hn);break}a&&Ke&&zo.alternate===null&&c(ee,Ke),q=C(zo,q,Ye),qe===null?ze=zo:qe.sibling=zo,qe=zo,Ke=hn}if(ft.done)return m(ee,Ke),Ft&&Mi(ee,Ye),ze;if(Ke===null){for(;!ft.done;Ye++,ft=re.next())ft=he(ee,ft.value,ye),ft!==null&&(q=C(ft,q,Ye),qe===null?ze=ft:qe.sibling=ft,qe=ft);return Ft&&Mi(ee,Ye),ze}for(Ke=g(ee,Ke);!ft.done;Ye++,ft=re.next())ft=Ae(Ke,ee,Ye,ft.value,ye),ft!==null&&(a&&ft.alternate!==null&&Ke.delete(ft.key===null?Ye:ft.key),q=C(ft,q,Ye),qe===null?ze=ft:qe.sibling=ft,qe=ft);return a&&Ke.forEach(function(b7){return c(ee,b7)}),Ft&&Mi(ee,Ye),ze}function Kt(ee,q,re,ye){if(typeof re=="object"&&re!==null&&re.type===M&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case E:e:{for(var ze=re.key,qe=q;qe!==null;){if(qe.key===ze){if(ze=re.type,ze===M){if(qe.tag===7){m(ee,qe.sibling),q=_(qe,re.props.children),q.return=ee,ee=q;break e}}else if(qe.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===W&&$v(ze)===qe.type){m(ee,qe.sibling),q=_(qe,re.props),q.ref=yc(ee,qe,re),q.return=ee,ee=q;break e}m(ee,qe);break}else c(ee,qe);qe=qe.sibling}re.type===M?(q=Di(re.props.children,ee.mode,ye,re.key),q.return=ee,ee=q):(ye=lf(re.type,re.key,re.props,null,ee.mode,ye),ye.ref=yc(ee,q,re),ye.return=ee,ee=ye)}return A(ee);case O:e:{for(qe=re.key;q!==null;){if(q.key===qe)if(q.tag===4&&q.stateNode.containerInfo===re.containerInfo&&q.stateNode.implementation===re.implementation){m(ee,q.sibling),q=_(q,re.children||[]),q.return=ee,ee=q;break e}else{m(ee,q);break}else c(ee,q);q=q.sibling}q=hh(re,ee.mode,ye),q.return=ee,ee=q}return A(ee);case W:return qe=re._init,Kt(ee,q,qe(re._payload),ye)}if(_e(re))return $e(ee,q,re,ye);if(J(re))return De(ee,q,re,ye);$d(ee,re)}return typeof re=="string"&&re!==""||typeof re=="number"?(re=""+re,q!==null&&q.tag===6?(m(ee,q.sibling),q=_(q,re),q.return=ee,ee=q):(m(ee,q),q=ph(re,ee.mode,ye),q.return=ee,ee=q),A(ee)):m(ee,q)}return Kt}var Ba=Fv(!0),Dv=Fv(!1),Fd=Mo(null),Dd=null,Ua=null,kp=null;function Np(){kp=Ua=Dd=null}function Cp(a){var c=Fd.current;Ot(Fd),a._currentValue=c}function Sp(a,c,m){for(;a!==null;){var g=a.alternate;if((a.childLanes&c)!==c?(a.childLanes|=c,g!==null&&(g.childLanes|=c)):g!==null&&(g.childLanes&c)!==c&&(g.childLanes|=c),a===m)break;a=a.return}}function za(a,c){Dd=a,kp=Ua=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&c)!==0&&(ir=!0),a.firstContext=null)}function $r(a){var c=a._currentValue;if(kp!==a)if(a={context:a,memoizedValue:c,next:null},Ua===null){if(Dd===null)throw Error(n(308));Ua=a,Dd.dependencies={lanes:0,firstContext:a}}else Ua=Ua.next=a;return c}var Ai=null;function Ep(a){Ai===null?Ai=[a]:Ai.push(a)}function Bv(a,c,m,g){var _=c.interleaved;return _===null?(m.next=m,Ep(c)):(m.next=_.next,_.next=m),c.interleaved=m,Xs(a,g)}function Xs(a,c){a.lanes|=c;var m=a.alternate;for(m!==null&&(m.lanes|=c),m=a,a=a.return;a!==null;)a.childLanes|=c,m=a.alternate,m!==null&&(m.childLanes|=c),m=a,a=a.return;return m.tag===3?m.stateNode:null}var Ro=!1;function Tp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uv(a,c){a=a.updateQueue,c.updateQueue===a&&(c.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function eo(a,c){return{eventTime:a,lane:c,tag:0,payload:null,callback:null,next:null}}function Po(a,c,m){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(dt&2)!==0){var _=g.pending;return _===null?c.next=c:(c.next=_.next,_.next=c),g.pending=c,Xs(a,m)}return _=g.interleaved,_===null?(c.next=c,Ep(g)):(c.next=_.next,_.next=c),g.interleaved=c,Xs(a,m)}function Bd(a,c,m){if(c=c.updateQueue,c!==null&&(c=c.shared,(m&4194240)!==0)){var g=c.lanes;g&=a.pendingLanes,m|=g,c.lanes=m,fe(a,m)}}function zv(a,c){var m=a.updateQueue,g=a.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var _=null,C=null;if(m=m.firstBaseUpdate,m!==null){do{var A={eventTime:m.eventTime,lane:m.lane,tag:m.tag,payload:m.payload,callback:m.callback,next:null};C===null?_=C=A:C=C.next=A,m=m.next}while(m!==null);C===null?_=C=c:C=C.next=c}else _=C=c;m={baseState:g.baseState,firstBaseUpdate:_,lastBaseUpdate:C,shared:g.shared,effects:g.effects},a.updateQueue=m;return}a=m.lastBaseUpdate,a===null?m.firstBaseUpdate=c:a.next=c,m.lastBaseUpdate=c}function Ud(a,c,m,g){var _=a.updateQueue;Ro=!1;var C=_.firstBaseUpdate,A=_.lastBaseUpdate,D=_.shared.pending;if(D!==null){_.shared.pending=null;var Z=D,oe=Z.next;Z.next=null,A===null?C=oe:A.next=oe,A=Z;var pe=a.alternate;pe!==null&&(pe=pe.updateQueue,D=pe.lastBaseUpdate,D!==A&&(D===null?pe.firstBaseUpdate=oe:D.next=oe,pe.lastBaseUpdate=Z))}if(C!==null){var he=_.baseState;A=0,pe=oe=Z=null,D=C;do{var me=D.lane,Ae=D.eventTime;if((g&me)===me){pe!==null&&(pe=pe.next={eventTime:Ae,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var $e=a,De=D;switch(me=c,Ae=m,De.tag){case 1:if($e=De.payload,typeof $e=="function"){he=$e.call(Ae,he,me);break e}he=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=De.payload,me=typeof $e=="function"?$e.call(Ae,he,me):$e,me==null)break e;he=ne({},he,me);break e;case 2:Ro=!0}}D.callback!==null&&D.lane!==0&&(a.flags|=64,me=_.effects,me===null?_.effects=[D]:me.push(D))}else Ae={eventTime:Ae,lane:me,tag:D.tag,payload:D.payload,callback:D.callback,next:null},pe===null?(oe=pe=Ae,Z=he):pe=pe.next=Ae,A|=me;if(D=D.next,D===null){if(D=_.shared.pending,D===null)break;me=D,D=me.next,me.next=null,_.lastBaseUpdate=me,_.shared.pending=null}}while(!0);if(pe===null&&(Z=he),_.baseState=Z,_.firstBaseUpdate=oe,_.lastBaseUpdate=pe,c=_.shared.interleaved,c!==null){_=c;do A|=_.lane,_=_.next;while(_!==c)}else C===null&&(_.shared.lanes=0);Pi|=A,a.lanes=A,a.memoizedState=he}}function Vv(a,c,m){if(a=c.effects,c.effects=null,a!==null)for(c=0;cm?m:4,a(!0);var g=Rp.transition;Rp.transition={};try{a(!1),c()}finally{ue=m,Rp.transition=g}}function l6(){return Fr().memoizedState}function VS(a,c,m){var g=Do(a);if(m={lane:g,action:m,hasEagerState:!1,eagerState:null,next:null},c6(a))u6(c,m);else if(m=Bv(a,c,m,g),m!==null){var _=Hn();os(m,a,g,_),d6(m,c,g)}}function HS(a,c,m){var g=Do(a),_={lane:g,action:m,hasEagerState:!1,eagerState:null,next:null};if(c6(a))u6(c,_);else{var C=a.alternate;if(a.lanes===0&&(C===null||C.lanes===0)&&(C=c.lastRenderedReducer,C!==null))try{var A=c.lastRenderedState,D=C(A,m);if(_.hasEagerState=!0,_.eagerState=D,es(D,A)){var Z=c.interleaved;Z===null?(_.next=_,Ep(c)):(_.next=Z.next,Z.next=_),c.interleaved=_;return}}catch{}m=Bv(a,c,_,g),m!==null&&(_=Hn(),os(m,a,g,_),d6(m,c,g))}}function c6(a){var c=a.alternate;return a===zt||c!==null&&c===zt}function u6(a,c){kc=Hd=!0;var m=a.pending;m===null?c.next=c:(c.next=m.next,m.next=c),a.pending=c}function d6(a,c,m){if((m&4194240)!==0){var g=c.lanes;g&=a.pendingLanes,m|=g,c.lanes=m,fe(a,m)}}var qd={readContext:$r,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useInsertionEffect:Rn,useLayoutEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useMutableSource:Rn,useSyncExternalStore:Rn,useId:Rn,unstable_isNewReconciler:!1},ZS={readContext:$r,useCallback:function(a,c){return Ns().memoizedState=[a,c===void 0?null:c],a},useContext:$r,useEffect:e6,useImperativeHandle:function(a,c,m){return m=m!=null?m.concat([a]):null,Zd(4194308,4,r6.bind(null,c,a),m)},useLayoutEffect:function(a,c){return Zd(4194308,4,a,c)},useInsertionEffect:function(a,c){return Zd(4,2,a,c)},useMemo:function(a,c){var m=Ns();return c=c===void 0?null:c,a=a(),m.memoizedState=[a,c],a},useReducer:function(a,c,m){var g=Ns();return c=m!==void 0?m(c):c,g.memoizedState=g.baseState=c,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:c},g.queue=a,a=a.dispatch=VS.bind(null,zt,a),[g.memoizedState,a]},useRef:function(a){var c=Ns();return a={current:a},c.memoizedState=a},useState:Yv,useDebugValue:Up,useDeferredValue:function(a){return Ns().memoizedState=a},useTransition:function(){var a=Yv(!1),c=a[0];return a=zS.bind(null,a[1]),Ns().memoizedState=a,[c,a]},useMutableSource:function(){},useSyncExternalStore:function(a,c,m){var g=zt,_=Ns();if(Ft){if(m===void 0)throw Error(n(407));m=m()}else{if(m=c(),pn===null)throw Error(n(349));(Ri&30)!==0||qv(g,c,m)}_.memoizedState=m;var C={value:m,getSnapshot:c};return _.queue=C,e6(Gv.bind(null,g,C,a),[a]),g.flags|=2048,Sc(9,Kv.bind(null,g,C,m,c),void 0,null),m},useId:function(){var a=Ns(),c=pn.identifierPrefix;if(Ft){var m=Ys,g=Qs;m=(g&~(1<<32-Bt(g)-1)).toString(32)+m,c=":"+c+"R"+m,m=Nc++,0<\/script>",a=a.removeChild(a.firstChild)):typeof g.is=="string"?a=A.createElement(m,{is:g.is}):(a=A.createElement(m),m==="select"&&(A=a,g.multiple?A.multiple=!0:g.size&&(A.size=g.size))):a=A.createElementNS(a,m),a[js]=c,a[vc]=g,M6(a,c,!1,!1),c.stateNode=a;e:{switch(A=jt(m,g),m){case"dialog":Tt("cancel",a),Tt("close",a),_=g;break;case"iframe":case"object":case"embed":Tt("load",a),_=g;break;case"video":case"audio":for(_=0;_qa&&(c.flags|=128,g=!0,Ec(C,!1),c.lanes=4194304)}else{if(!g)if(a=zd(A),a!==null){if(c.flags|=128,g=!0,m=a.updateQueue,m!==null&&(c.updateQueue=m,c.flags|=4),Ec(C,!0),C.tail===null&&C.tailMode==="hidden"&&!A.alternate&&!Ft)return Pn(c),null}else 2*ot()-C.renderingStartTime>qa&&m!==1073741824&&(c.flags|=128,g=!0,Ec(C,!1),c.lanes=4194304);C.isBackwards?(A.sibling=c.child,c.child=A):(m=C.last,m!==null?m.sibling=A:c.child=A,C.last=A)}return C.tail!==null?(c=C.tail,C.rendering=c,C.tail=c.sibling,C.renderingStartTime=ot(),c.sibling=null,m=Ut.current,Nt(Ut,g?m&1|2:m&1),c):(Pn(c),null);case 22:case 23:return dh(),g=c.memoizedState!==null,a!==null&&a.memoizedState!==null!==g&&(c.flags|=8192),g&&(c.mode&1)!==0?(_r&1073741824)!==0&&(Pn(c),c.subtreeFlags&6&&(c.flags|=8192)):Pn(c),null;case 24:return null;case 25:return null}throw Error(n(156,c.tag))}function XS(a,c){switch(yp(c),c.tag){case 1:return or(c.type)&&Md(),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return Va(),Ot(sr),Ot(Ln),Lp(),a=c.flags,(a&65536)!==0&&(a&128)===0?(c.flags=a&-65537|128,c):null;case 5:return Mp(c),null;case 13:if(Ot(Ut),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(n(340));Da()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return Ot(Ut),null;case 4:return Va(),null;case 10:return Cp(c.type._context),null;case 22:case 23:return dh(),null;case 24:return null;default:return null}}var Qd=!1,In=!1,e7=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function Za(a,c){var m=a.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(g){Zt(a,c,g)}else m.current=null}function Xp(a,c,m){try{m()}catch(g){Zt(a,c,g)}}var R6=!1;function t7(a,c){if(dp=xd,a=fv(),rp(a)){if("selectionStart"in a)var m={start:a.selectionStart,end:a.selectionEnd};else e:{m=(m=a.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var _=g.anchorOffset,C=g.focusNode;g=g.focusOffset;try{m.nodeType,C.nodeType}catch{m=null;break e}var A=0,D=-1,Z=-1,oe=0,pe=0,he=a,me=null;t:for(;;){for(var Ae;he!==m||_!==0&&he.nodeType!==3||(D=A+_),he!==C||g!==0&&he.nodeType!==3||(Z=A+g),he.nodeType===3&&(A+=he.nodeValue.length),(Ae=he.firstChild)!==null;)me=he,he=Ae;for(;;){if(he===a)break t;if(me===m&&++oe===_&&(D=A),me===C&&++pe===g&&(Z=A),(Ae=he.nextSibling)!==null)break;he=me,me=he.parentNode}he=Ae}m=D===-1||Z===-1?null:{start:D,end:Z}}else m=null}m=m||{start:0,end:0}}else m=null;for(fp={focusedElem:a,selectionRange:m},xd=!1,Pe=c;Pe!==null;)if(c=Pe,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,Pe=a;else for(;Pe!==null;){c=Pe;try{var $e=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if($e!==null){var De=$e.memoizedProps,Kt=$e.memoizedState,ee=c.stateNode,q=ee.getSnapshotBeforeUpdate(c.elementType===c.type?De:ns(c.type,De),Kt);ee.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var re=c.stateNode.containerInfo;re.nodeType===1?re.textContent="":re.nodeType===9&&re.documentElement&&re.removeChild(re.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){Zt(c,c.return,ye)}if(a=c.sibling,a!==null){a.return=c.return,Pe=a;break}Pe=c.return}return $e=R6,R6=!1,$e}function Tc(a,c,m){var g=c.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var _=g=g.next;do{if((_.tag&a)===a){var C=_.destroy;_.destroy=void 0,C!==void 0&&Xp(c,m,C)}_=_.next}while(_!==g)}}function Yd(a,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var m=c=c.next;do{if((m.tag&a)===a){var g=m.create;m.destroy=g()}m=m.next}while(m!==c)}}function eh(a){var c=a.ref;if(c!==null){var m=a.stateNode;a.tag,a=m,typeof c=="function"?c(a):c.current=a}}function P6(a){var c=a.alternate;c!==null&&(a.alternate=null,P6(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&(delete c[js],delete c[vc],delete c[gp],delete c[$S],delete c[FS])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function I6(a){return a.tag===5||a.tag===3||a.tag===4}function $6(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||I6(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function th(a,c,m){var g=a.tag;if(g===5||g===6)a=a.stateNode,c?m.nodeType===8?m.parentNode.insertBefore(a,c):m.insertBefore(a,c):(m.nodeType===8?(c=m.parentNode,c.insertBefore(a,m)):(c=m,c.appendChild(a)),m=m._reactRootContainer,m!=null||c.onclick!==null||(c.onclick=Td));else if(g!==4&&(a=a.child,a!==null))for(th(a,c,m),a=a.sibling;a!==null;)th(a,c,m),a=a.sibling}function nh(a,c,m){var g=a.tag;if(g===5||g===6)a=a.stateNode,c?m.insertBefore(a,c):m.appendChild(a);else if(g!==4&&(a=a.child,a!==null))for(nh(a,c,m),a=a.sibling;a!==null;)nh(a,c,m),a=a.sibling}var _n=null,rs=!1;function Io(a,c,m){for(m=m.child;m!==null;)F6(a,c,m),m=m.sibling}function F6(a,c,m){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(rr,m)}catch{}switch(m.tag){case 5:In||Za(m,c);case 6:var g=_n,_=rs;_n=null,Io(a,c,m),_n=g,rs=_,_n!==null&&(rs?(a=_n,m=m.stateNode,a.nodeType===8?a.parentNode.removeChild(m):a.removeChild(m)):_n.removeChild(m.stateNode));break;case 18:_n!==null&&(rs?(a=_n,m=m.stateNode,a.nodeType===8?hp(a.parentNode,m):a.nodeType===1&&hp(a,m),ac(a)):hp(_n,m.stateNode));break;case 4:g=_n,_=rs,_n=m.stateNode.containerInfo,rs=!0,Io(a,c,m),_n=g,rs=_;break;case 0:case 11:case 14:case 15:if(!In&&(g=m.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){_=g=g.next;do{var C=_,A=C.destroy;C=C.tag,A!==void 0&&((C&2)!==0||(C&4)!==0)&&Xp(m,c,A),_=_.next}while(_!==g)}Io(a,c,m);break;case 1:if(!In&&(Za(m,c),g=m.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=m.memoizedProps,g.state=m.memoizedState,g.componentWillUnmount()}catch(D){Zt(m,c,D)}Io(a,c,m);break;case 21:Io(a,c,m);break;case 22:m.mode&1?(In=(g=In)||m.memoizedState!==null,Io(a,c,m),In=g):Io(a,c,m);break;default:Io(a,c,m)}}function D6(a){var c=a.updateQueue;if(c!==null){a.updateQueue=null;var m=a.stateNode;m===null&&(m=a.stateNode=new e7),c.forEach(function(g){var _=u7.bind(null,a,g);m.has(g)||(m.add(g),g.then(_,_))})}}function ss(a,c){var m=c.deletions;if(m!==null)for(var g=0;g_&&(_=A),g&=~C}if(g=_,g=ot()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*r7(g/1960))-g,10a?16:a,Fo===null)var g=!1;else{if(a=Fo,Fo=null,rf=0,(dt&6)!==0)throw Error(n(331));var _=dt;for(dt|=4,Pe=a.current;Pe!==null;){var C=Pe,A=C.child;if((Pe.flags&16)!==0){var D=C.deletions;if(D!==null){for(var Z=0;Zot()-oh?$i(a,0):sh|=m),lr(a,c)}function Y6(a,c){c===0&&((a.mode&1)===0?c=1:(c=jo,jo<<=1,(jo&130023424)===0&&(jo=4194304)));var m=Hn();a=Xs(a,c),a!==null&&(I(a,c,m),lr(a,m))}function c7(a){var c=a.memoizedState,m=0;c!==null&&(m=c.retryLane),Y6(a,m)}function u7(a,c){var m=0;switch(a.tag){case 13:var g=a.stateNode,_=a.memoizedState;_!==null&&(m=_.retryLane);break;case 19:g=a.stateNode;break;default:throw Error(n(314))}g!==null&&g.delete(c),Y6(a,m)}var X6;X6=function(a,c,m){if(a!==null)if(a.memoizedProps!==c.pendingProps||sr.current)ir=!0;else{if((a.lanes&m)===0&&(c.flags&128)===0)return ir=!1,QS(a,c,m);ir=(a.flags&131072)!==0}else ir=!1,Ft&&(c.flags&1048576)!==0&&Av(c,Pd,c.index);switch(c.lanes=0,c.tag){case 2:var g=c.type;Jd(a,c),a=c.pendingProps;var _=Ia(c,Ln.current);za(c,m),_=Ip(null,c,g,a,_,m);var C=$p();return c.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,or(g)?(C=!0,Ad(c)):C=!1,c.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,Tp(c),_.updater=Kd,c.stateNode=_,_._reactInternals=c,Vp(c,g,a,m),c=qp(null,c,g,!0,C,m)):(c.tag=0,Ft&&C&&bp(c),Vn(null,c,_,m),c=c.child),c;case 16:g=c.elementType;e:{switch(Jd(a,c),a=c.pendingProps,_=g._init,g=_(g._payload),c.type=g,_=c.tag=f7(g),a=ns(g,a),_){case 0:c=Wp(null,c,g,a,m);break e;case 1:c=N6(null,c,g,a,m);break e;case 11:c=y6(null,c,g,a,m);break e;case 14:c=w6(null,c,g,ns(g.type,a),m);break e}throw Error(n(306,g,""))}return c;case 0:return g=c.type,_=c.pendingProps,_=c.elementType===g?_:ns(g,_),Wp(a,c,g,_,m);case 1:return g=c.type,_=c.pendingProps,_=c.elementType===g?_:ns(g,_),N6(a,c,g,_,m);case 3:e:{if(C6(c),a===null)throw Error(n(387));g=c.pendingProps,C=c.memoizedState,_=C.element,Uv(a,c),Ud(c,g,null,m);var A=c.memoizedState;if(g=A.element,C.isDehydrated)if(C={element:g,isDehydrated:!1,cache:A.cache,pendingSuspenseBoundaries:A.pendingSuspenseBoundaries,transitions:A.transitions},c.updateQueue.baseState=C,c.memoizedState=C,c.flags&256){_=Ha(Error(n(423)),c),c=S6(a,c,g,m,_);break e}else if(g!==_){_=Ha(Error(n(424)),c),c=S6(a,c,g,m,_);break e}else for(wr=Oo(c.stateNode.containerInfo.firstChild),yr=c,Ft=!0,ts=null,m=Dv(c,null,g,m),c.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(Da(),g===_){c=to(a,c,m);break e}Vn(a,c,g,m)}c=c.child}return c;case 5:return Hv(c),a===null&&_p(c),g=c.type,_=c.pendingProps,C=a!==null?a.memoizedProps:null,A=_.children,mp(g,_)?A=null:C!==null&&mp(g,C)&&(c.flags|=32),k6(a,c),Vn(a,c,A,m),c.child;case 6:return a===null&&_p(c),null;case 13:return E6(a,c,m);case 4:return Op(c,c.stateNode.containerInfo),g=c.pendingProps,a===null?c.child=Ba(c,null,g,m):Vn(a,c,g,m),c.child;case 11:return g=c.type,_=c.pendingProps,_=c.elementType===g?_:ns(g,_),y6(a,c,g,_,m);case 7:return Vn(a,c,c.pendingProps,m),c.child;case 8:return Vn(a,c,c.pendingProps.children,m),c.child;case 12:return Vn(a,c,c.pendingProps.children,m),c.child;case 10:e:{if(g=c.type._context,_=c.pendingProps,C=c.memoizedProps,A=_.value,Nt(Fd,g._currentValue),g._currentValue=A,C!==null)if(es(C.value,A)){if(C.children===_.children&&!sr.current){c=to(a,c,m);break e}}else for(C=c.child,C!==null&&(C.return=c);C!==null;){var D=C.dependencies;if(D!==null){A=C.child;for(var Z=D.firstContext;Z!==null;){if(Z.context===g){if(C.tag===1){Z=eo(-1,m&-m),Z.tag=2;var oe=C.updateQueue;if(oe!==null){oe=oe.shared;var pe=oe.pending;pe===null?Z.next=Z:(Z.next=pe.next,pe.next=Z),oe.pending=Z}}C.lanes|=m,Z=C.alternate,Z!==null&&(Z.lanes|=m),Sp(C.return,m,c),D.lanes|=m;break}Z=Z.next}}else if(C.tag===10)A=C.type===c.type?null:C.child;else if(C.tag===18){if(A=C.return,A===null)throw Error(n(341));A.lanes|=m,D=A.alternate,D!==null&&(D.lanes|=m),Sp(A,m,c),A=C.sibling}else A=C.child;if(A!==null)A.return=C;else for(A=C;A!==null;){if(A===c){A=null;break}if(C=A.sibling,C!==null){C.return=A.return,A=C;break}A=A.return}C=A}Vn(a,c,_.children,m),c=c.child}return c;case 9:return _=c.type,g=c.pendingProps.children,za(c,m),_=$r(_),g=g(_),c.flags|=1,Vn(a,c,g,m),c.child;case 14:return g=c.type,_=ns(g,c.pendingProps),_=ns(g.type,_),w6(a,c,g,_,m);case 15:return _6(a,c,c.type,c.pendingProps,m);case 17:return g=c.type,_=c.pendingProps,_=c.elementType===g?_:ns(g,_),Jd(a,c),c.tag=1,or(g)?(a=!0,Ad(c)):a=!1,za(c,m),m6(c,g,_),Vp(c,g,_,m),qp(null,c,g,!0,a,m);case 19:return O6(a,c,m);case 22:return j6(a,c,m)}throw Error(n(156,c.tag))};function eb(a,c){return ja(a,c)}function d7(a,c,m,g){this.tag=a,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Br(a,c,m,g){return new d7(a,c,m,g)}function mh(a){return a=a.prototype,!(!a||!a.isReactComponent)}function f7(a){if(typeof a=="function")return mh(a)?1:0;if(a!=null){if(a=a.$$typeof,a===V)return 11;if(a===B)return 14}return 2}function Uo(a,c){var m=a.alternate;return m===null?(m=Br(a.tag,c,a.key,a.mode),m.elementType=a.elementType,m.type=a.type,m.stateNode=a.stateNode,m.alternate=a,a.alternate=m):(m.pendingProps=c,m.type=a.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=a.flags&14680064,m.childLanes=a.childLanes,m.lanes=a.lanes,m.child=a.child,m.memoizedProps=a.memoizedProps,m.memoizedState=a.memoizedState,m.updateQueue=a.updateQueue,c=a.dependencies,m.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},m.sibling=a.sibling,m.index=a.index,m.ref=a.ref,m}function lf(a,c,m,g,_,C){var A=2;if(g=a,typeof a=="function")mh(a)&&(A=1);else if(typeof a=="string")A=5;else e:switch(a){case M:return Di(m.children,_,C,c);case L:A=8,_|=8;break;case F:return a=Br(12,m,c,_|2),a.elementType=F,a.lanes=C,a;case X:return a=Br(13,m,c,_),a.elementType=X,a.lanes=C,a;case H:return a=Br(19,m,c,_),a.elementType=H,a.lanes=C,a;case se:return cf(m,_,C,c);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case U:A=10;break e;case z:A=9;break e;case V:A=11;break e;case B:A=14;break e;case W:A=16,g=null;break e}throw Error(n(130,a==null?a:typeof a,""))}return c=Br(A,m,c,_),c.elementType=a,c.type=g,c.lanes=C,c}function Di(a,c,m,g){return a=Br(7,a,g,c),a.lanes=m,a}function cf(a,c,m,g){return a=Br(22,a,g,c),a.elementType=se,a.lanes=m,a.stateNode={isHidden:!1},a}function ph(a,c,m){return a=Br(6,a,null,c),a.lanes=m,a}function hh(a,c,m){return c=Br(4,a.children!==null?a.children:[],a.key,c),c.lanes=m,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}function m7(a,c,m,g,_){this.tag=c,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ce(0),this.expirationTimes=ce(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ce(0),this.identifierPrefix=g,this.onRecoverableError=_,this.mutableSourceEagerHydrationData=null}function gh(a,c,m,g,_,C,A,D,Z){return a=new m7(a,c,m,D,Z),c===1?(c=1,C===!0&&(c|=8)):c=0,C=Br(3,null,null,c),a.current=C,C.stateNode=a,C.memoizedState={element:g,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tp(C),a}function p7(a,c,m){var g=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_h.exports=C7(),_h.exports}var pb;function S7(){if(pb)return gf;pb=1;var e=A8();return gf.createRoot=e.createRoot,gf.hydrateRoot=e.hydrateRoot,gf}var E7=S7();const L8="clicky-ui-theme",T7="data-theme",Xg=w.createContext(null);function R8(){return typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function O7(){if(typeof window>"u")return"system";const e=window.localStorage.getItem(L8);return e==="light"||e==="dark"||e==="system"?e:"system"}function hb(e){return e==="system"?R8()?"dark":"light":e}function gb(e){typeof document>"u"||document.documentElement.setAttribute(T7,e)}function M7(){const e=w.useContext(Xg);if(!e)throw new Error("useTheme must be used inside ");return e}function A7(){return w.useContext(Xg)}function P8(e){const t=A7(),[n,r]=w.useState(()=>R8()?"dark":"light");return w.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>r(s.matches?"dark":"light");return s.addEventListener("change",i),()=>s.removeEventListener("change",i)},[]),e&&e!=="system"?e:e==="system"?n:t?t.resolvedTheme:n}function L7({children:e,defaultTheme:t="system",storageKey:n=L8}){const[r,s]=w.useState(()=>typeof window>"u"?t:O7()??t),[i,l]=w.useState(()=>hb(r));w.useEffect(()=>{const f=hb(r);l(f),gb(f),typeof window<"u"&&window.localStorage.setItem(n,r)},[r,n]),w.useEffect(()=>{if(r!=="system"||typeof window>"u")return;const f=window.matchMedia("(prefers-color-scheme: dark)"),p=()=>{const h=f.matches?"dark":"light";l(h),gb(h)};return f.addEventListener("change",p),()=>f.removeEventListener("change",p)},[r]);const u=w.useCallback(f=>s(f),[]),d=w.useMemo(()=>({theme:r,resolvedTheme:i,setTheme:u}),[r,i,u]);return o.jsx(Xg.Provider,{value:d,children:e})}const I8="clicky-ui-density",R7="data-density",em=w.createContext(null);function P7(){if(typeof window>"u")return null;const e=window.localStorage.getItem(I8);return e==="compact"||e==="comfortable"||e==="spacious"?e:null}function I7(e){typeof document>"u"||document.documentElement.setAttribute(R7,e)}function $7(){const e=w.useContext(em);if(!e)throw new Error("useDensity must be used inside ");return e}function e2(){const e=w.useContext(em);if(e)return e.density;if(typeof document>"u")return"comfortable";const t=document.documentElement.getAttribute("data-density");return t==="compact"||t==="spacious"?t:"comfortable"}function F7({children:e,defaultDensity:t="comfortable",storageKey:n=I8}){const[r,s]=w.useState(()=>typeof window>"u"?t:P7()??t);w.useEffect(()=>{I7(r),typeof window<"u"&&window.localStorage.setItem(n,r)},[r,n]);const i=w.useCallback(u=>s(u),[]),l=w.useMemo(()=>({density:r,setDensity:i}),[r,i]);return o.jsx(em.Provider,{value:l,children:e})}function $8({density:e,children:t}){const n=w.useMemo(()=>({density:e,setDensity:()=>{}}),[e]);return o.jsx(em.Provider,{value:n,children:t})}function D7(e,t){return t.split(".").reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},e)}function B7(e,t={}){const{defaultKey:n,defaultDir:r="asc",sort:s,onSortChange:i,manual:l=!1,resolvers:u}=t,[d,f]=w.useState(n?{key:n,dir:r}:null),p=s!==void 0,h=p?s:d;function x(y){const b=h?.key===y?h.dir==="asc"?{key:y,dir:"desc"}:null:{key:y,dir:"asc"};p?i?.(b):f(b)}return{sorted:w.useMemo(()=>{if(!e)return[];if(l||!h)return e;const{key:y,dir:b}=h,j=u?.[y],S=N=>j?j(N):D7(N,y);return[...e].sort((N,k)=>{const T=S(N),E=S(k);if(T==null&&E==null)return 0;if(T==null)return 1;if(E==null)return-1;const O=typeof T=="number"&&typeof E=="number"?T-E:String(T).localeCompare(String(E));return b==="asc"?O:-O})},[e,l,h,u]),sort:h,toggle:x}}const U7=new Set(["success","failed","warning","canceled","PASS","FAIL","ERR","SKIP"]);function z7(e){return!!e&&U7.has(e)}function V7(e){const t=e.filter(n=>n.type==="group");return t.length===0?!1:t.every(n=>z7(n.status))}const F8="/api/v1",D8=2e3;function H7(e,t){return`${e}/tasks/stream${t?`?${t}`:""}`}function B8(){return typeof globalThis<"u"&&typeof globalThis.EventSource<"u"}function Z7(e={}){const{id:t,kind:n,basePath:r=F8,enabled:s=!0,pollMs:i=D8,forcePoll:l=!1}=e,[u,d]=w.useState({}),[f,p]=w.useState("idle"),[h,x]=w.useState(!1),v=`${t??""}|${n??""}|${s}`,y=w.useRef(v);return y.current!==v&&(y.current=v),w.useEffect(()=>{if(!s||!t&&!n)return;d({}),x(!1);const b=new URLSearchParams;t&&b.set("tasks",t),n&&b.set("kind",n);const j=b.toString(),S=k=>{d(T=>{const E={...T};for(const O of k)E[O.id]=O;return E})};if(l||!B8()){let k=!1,T;const E=async()=>{try{const O=await fetch(`${r}/tasks/${encodeURIComponent(t??"")}`,{headers:{Accept:"application/json"}});if(O.ok){const M=await O.json();if(S(M),p("polling"),V7(M)){x(!0);return}}}catch{p("connection lost — retrying")}k||(T=setTimeout(E,i))};return E(),()=>{k=!0,T&&clearTimeout(T)}}const N=new EventSource(H7(r,j));return p("connected"),N.addEventListener("task",k=>{try{S([JSON.parse(k.data)])}catch{}}),N.addEventListener("done",()=>{p("complete"),x(!0),N.close()}),N.onerror=()=>p("connection lost — retrying"),()=>N.close()},[t,n,r,s,i,l]),{snapshots:Object.values(u),status:f,isComplete:h}}function U8(e={}){const{kind:t,status:n,labels:r,basePath:s=F8,enabled:i=!0,pollMs:l=D8,forcePoll:u=!1}=e,[d,f]=w.useState([]),[p,h]=w.useState("idle");return w.useEffect(()=>{if(!i)return;const x=new URLSearchParams;t&&x.set("kind",t),n&&x.set("status",n);for(const[b,j]of Object.entries(r??{}))x.append("label",`${b}=${j}`);const v=x.toString();if(u||!B8()){let b=!1,j;const S=async()=>{try{const N=await fetch(`${s}/tasks${v?`?${v}`:""}`,{headers:{Accept:"application/json"}});N.ok&&(f(await N.json()),h("polling"))}catch{h("connection lost — retrying")}b||(j=setTimeout(S,l))};return S(),()=>{b=!0,j&&clearTimeout(j)}}const y=new EventSource(`${s}/tasks/runs/stream${v?`?${v}`:""}`);return h("connected"),y.addEventListener("runs",b=>{try{f(JSON.parse(b.data))}catch{}}),y.onerror=()=>h("connection lost — retrying"),()=>y.close()},[t,n,JSON.stringify(r??{}),s,i,l,u]),{runs:d,status:p}}var Ru=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},W7=class extends Ru{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},t2=new W7,q7={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},K7=class{#e=q7;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Yi=new K7;function G7(e){setTimeout(e,0)}var J7=typeof window>"u"||"Deno"in globalThis;function dr(){}function Q7(e,t){return typeof e=="function"?e(t):e}function z1(e){return typeof e=="number"&&e>=0&&e!==1/0}function z8(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ai(e,t){return typeof e=="function"?e(t):e}function Nr(e,t){return typeof e=="function"?e(t):e}function xb(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==n2(l,t.options))return!1}else if(!pu(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||s&&s!==t.state.fetchStatus||i&&!i(t))}function vb(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(mu(t.options.mutationKey)!==mu(i))return!1}else if(!pu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function n2(e,t){return(t?.queryKeyHashFn||mu)(e)}function mu(e){return JSON.stringify(e,(t,n)=>H1(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function pu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>pu(e[n],t[n])):!1}var Y7=Object.prototype.hasOwnProperty;function V8(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=bb(e)&&bb(t);if(!r&&!(H1(e)&&H1(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,d=r?new Array(u):{};let f=0;for(let p=0;p{Yi.setTimeout(t,e)})}function Z1(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?V8(e,t):t}function e9(e){return e}function t9(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function n9(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var r2=Symbol();function H8(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===r2?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Z8(e,t){return typeof e=="function"?e(...t):!!e}function r9(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var hu=(()=>{let e=()=>J7;return{isServer(){return e()},setIsServer(t){e=t}}})();function W1(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var s9=G7;function o9(){let e=[],t=0,n=u=>{u()},r=u=>{u()},s=s9;const i=u=>{t?e.push(u):s(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&s(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{s=u}}}var Cn=o9(),i9=class extends Ru{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},o0=new i9;function a9(e){return Math.min(1e3*2**e,3e4)}function W8(e){return(e??"online")==="online"?o0.isOnline():!0}var q1=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function q8(e){let t=!1,n=0,r;const s=W1(),i=()=>s.status!=="pending",l=b=>{if(!i()){const j=new q1(b);x(j),e.onCancel?.(j)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>t2.isFocused()&&(e.networkMode==="always"||o0.isOnline())&&e.canRun(),p=()=>W8(e.networkMode)&&e.canRun(),h=b=>{i()||(r?.(),s.resolve(b))},x=b=>{i()||(r?.(),s.reject(b))},v=()=>new Promise(b=>{r=j=>{(i()||f())&&b(j)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),y=()=>{if(i())return;let b;const j=n===0?e.initialPromise:void 0;try{b=j??e.fn()}catch(S){b=Promise.reject(S)}Promise.resolve(b).then(h).catch(S=>{if(i())return;const N=e.retry??(hu.isServer()?0:3),k=e.retryDelay??a9,T=typeof k=="function"?k(n,S):k,E=N===!0||typeof N=="number"&&nf()?void 0:v()).then(()=>{t?x(S):y()})})};return{promise:s,status:()=>s.status,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?y():v().then(y),s)}}var K8=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),z1(this.gcTime)&&(this.#e=Yi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hu.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Yi.clearTimeout(this.#e),this.#e=void 0)}};function l9(e){return{onFetch:(t,n)=>{const r=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let p=!1;const h=y=>{r9(y,()=>t.signal,()=>p=!0)},x=H8(t.options,t.fetchOptions),v=async(y,b,j)=>{if(p)return Promise.reject(t.signal.reason);if(b==null&&y.pages.length)return Promise.resolve(y);const N=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:b,direction:j?"backward":"forward",meta:t.options.meta};return h(O),O})(),k=await x(N),{maxPages:T}=t.options,E=j?n9:t9;return{pages:E(y.pages,k,T),pageParams:E(y.pageParams,b,T)}};if(s&&i.length){const y=s==="backward",b=y?c9:wb,j={pages:i,pageParams:l},S=b(r,j);u=await v(j,S,y)}else{const y=e??i.length;do{const b=d===0?l[0]??r.initialPageParam:wb(r,u);if(d>0&&b==null)break;u=await v(u,b),d++}while(dt.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function wb(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function c9(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var u9=class extends K8{#e;#t;#n;#r;#o;#s;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#r=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=jb(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=jb(this.options);t.data!==void 0&&(this.setState(_b(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=Z1(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(dr).catch(dr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Nr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===r2||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ai(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!z8(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#i||this.#u()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},s=()=>{const d=H8(this.options,t),p=(()=>{const h={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#i=!1,this.options.persister?this.options.persister(d,p,this):d(p)},l=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s};return r(d),d})();(this.#e==="infinite"?l9(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#s=q8({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:d=>{d instanceof q1&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#l({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const d=await this.#s.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#r.config.onSuccess?.(d,this),this.#r.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof q1){if(d.silent)return this.#s.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#r.config.onError?.(d,this),this.#r.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...G8(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,..._b(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Cn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function G8(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:W8(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _b(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function jb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var d9=class extends Ru{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#a=W1(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#o;#s;#a;#i;#u;#l;#p;#d;#f;#c;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),kb(this.#t,this.options)?this.#m():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return K1(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return K1(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),t._defaulted&&!V1(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Nb(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Nr(this.options.enabled,this.#t)!==Nr(t.enabled,this.#t)||ai(this.options.staleTime,this.#t)!==ai(t.staleTime,this.#t))&&this.#g();const s=this.#x();r&&(this.#t!==n||Nr(this.options.enabled,this.#t)!==Nr(t.enabled,this.#t)||s!==this.#c)&&this.#v(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return m9(this,n)&&(this.#r=n,this.#s=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(dr)),t}#g(){this.#y();const e=ai(this.options.staleTime,this.#t);if(hu.isServer()||this.#r.isStale||!z1(e))return;const n=z8(this.#r.dataUpdatedAt,e)+1;this.#d=Yi.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#x(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#c=e,!(hu.isServer()||Nr(this.options.enabled,this.#t)===!1||!z1(this.#c)||this.#c===0)&&(this.#f=Yi.setInterval(()=>{(this.options.refetchIntervalInBackground||t2.isFocused())&&this.#m()},this.#c))}#b(){this.#g(),this.#v(this.#x())}#y(){this.#d!==void 0&&(Yi.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#f!==void 0&&(Yi.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#t,r=this.options,s=this.#r,i=this.#o,l=this.#s,d=e!==n?e.state:this.#n,{state:f}=e;let p={...f},h=!1,x;if(t._optimisticResults){const L=this.hasListeners(),F=!L&&kb(e,t),U=L&&Nb(e,n,t,r);(F||U)&&(p={...p,...G8(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:y,status:b}=p;x=p.data;let j=!1;if(t.placeholderData!==void 0&&x===void 0&&b==="pending"){let L;s?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(L=s.data,j=!0):L=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,L!==void 0&&(b="success",x=Z1(s?.data,L,t),h=!0)}if(t.select&&x!==void 0&&!j)if(s&&x===i?.data&&t.select===this.#u)x=this.#l;else try{this.#u=t.select,x=t.select(x),x=Z1(s?.data,x,t),this.#l=x,this.#i=null}catch(L){this.#i=L}this.#i&&(v=this.#i,x=this.#l,y=Date.now(),b="error");const S=p.fetchStatus==="fetching",N=b==="pending",k=b==="error",T=N&&S,E=x!==void 0,M={status:b,fetchStatus:p.fetchStatus,isPending:N,isSuccess:b==="success",isError:k,isInitialLoading:T,isLoading:T,data:x,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:y,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!N,isLoadingError:k&&!E,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:k&&E,isStale:s2(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Nr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const L=M.data!==void 0,F=M.status==="error"&&!L,U=X=>{F?X.reject(M.error):L&&X.resolve(M.data)},z=()=>{const X=this.#a=M.promise=W1();U(X)},V=this.#a;switch(V.status){case"pending":e.queryHash===n.queryHash&&U(V);break;case"fulfilled":(F||M.data!==V.value)&&z();break;case"rejected":(!F||M.error!==V.reason)&&z();break}}return M}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#s=this.options,this.#o.data!==void 0&&(this.#p=this.#t),V1(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#h.size)return!0;const i=new Set(s??this.#h);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(l=>{const u=l;return this.#r[u]!==e[u]&&i.has(u)})};this.#j({listeners:n()})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#j(e){Cn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function f9(e,t){return Nr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Nr(t.retryOnMount,e)===!1)}function kb(e,t){return f9(e,t)||e.state.data!==void 0&&K1(e,t,t.refetchOnMount)}function K1(e,t,n){if(Nr(t.enabled,e)!==!1&&ai(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&s2(e,t)}return!1}function Nb(e,t,n,r){return(e!==t||Nr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&s2(e,n)}function s2(e,t){return Nr(t.enabled,e)!==!1&&e.isStaleByTime(ai(t.staleTime,e))}function m9(e,t){return!V1(e.getCurrentResult(),t)}var p9=class extends K8{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||h9(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=q8({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#o({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#o({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#r.canStart();try{if(r)t();else{this.#o({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#o({type:"pending",context:l,variables:e,isPaused:s})}const i=await this.#r.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#o({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#o({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Cn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function h9(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var g9=class extends Ru{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new p9({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=xf(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=xf(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=xf(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(s=>s.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=xf(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Cn.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>vb(t,n))}findAll(e={}){return this.getAll().filter(t=>vb(e,t))}notify(e){Cn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Cn.batch(()=>Promise.all(e.map(t=>t.continue().catch(dr))))}};function xf(e){return e.options.scope?.id}var x9=class extends Ru{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,s=t.queryHash??n2(r,t);let i=this.get(s);return i||(i=new u9({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Cn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>xb(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>xb(e,n)):t}notify(e){Cn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Cn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Cn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},J8=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(e={}){this.#e=e.queryCache||new x9,this.#t=e.mutationCache||new g9,this.#n=e.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=t2.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=o0.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ai(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,l=Q7(t,i);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Cn.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Cn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Cn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Cn.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(dr).catch(dr)}invalidateQueries(e,t={}){return Cn.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Cn.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(dr)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(dr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ai(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(dr).catch(dr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(dr).catch(dr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return o0.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(mu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{pu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#o.set(mu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{pu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=n2(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r2&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Q8=w.createContext(void 0),v9=e=>{const t=w.useContext(Q8);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Y8=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),o.jsx(Q8.Provider,{value:e,children:t})),X8=w.createContext(!1),b9=()=>w.useContext(X8);X8.Provider;function y9(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var w9=w.createContext(y9()),_9=()=>w.useContext(w9),j9=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Z8(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},k9=e=>{w.useEffect(()=>{e.clearReset()},[e])},N9=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Z8(n,[e.error,r])),C9=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},S9=(e,t)=>e.isLoading&&e.isFetching&&!t,E9=(e,t)=>e?.suspense&&t.isPending,Cb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function T9(e,t,n){const r=b9(),s=_9(),i=v9(),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const u=i.getQueryCache().get(l.queryHash),d=e.subscribed!==!1;l._optimisticResults=r?"isRestoring":d?"optimistic":void 0,C9(l),j9(l,s,u),k9(s);const f=!i.getQueryCache().get(l.queryHash),[p]=w.useState(()=>new t(i,l)),h=p.getOptimisticResult(l),x=!r&&d;if(w.useSyncExternalStore(w.useCallback(v=>{const y=x?p.subscribe(Cn.batchCalls(v)):dr;return p.updateResult(),y},[p,x]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),w.useEffect(()=>{p.setOptions(l)},[l,p]),E9(l,h))throw Cb(l,p,s);if(N9({result:h,errorResetBoundary:s,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw h.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,h),l.experimental_prefetchInRender&&!hu.isServer()&&S9(h,r)&&(f?Cb(l,p,s):u?.promise)?.catch(dr).finally(()=>{p.updateResult()}),l.notifyOnChangeProps?h:p.trackResult(h)}function vn(e,t){return T9(e,d9)}function Sb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function O9(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Sb(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s{let{children:s,...i}=n,l=null,u=!1;const d=[];Eb(s)&&typeof vf=="function"&&(s=vf(s._payload)),w.Children.forEach(s,x=>{if($9(x)){u=!0;const v=x;let y="child"in v.props?v.props.child:v.props.children;Eb(y)&&typeof vf=="function"&&(y=vf(y._payload)),l=R9(v,y),d.push(l?.props?.children)}else d.push(x)}),l?l=w.cloneElement(l,void 0,d):!u&&w.Children.count(s)===1&&w.isValidElement(s)&&(l=s);const f=l?I9(l):void 0,p=M9(r,f);if(!l){if(s||s===0)throw new Error(u?U9(e):B9(e));return s}const h=P9(i,l.props??{});return l.type!==w.Fragment&&(h.ref=r?p:f),w.cloneElement(l,h)});return t.displayName=`${e}.Slot`,t}var L9=A9("Slot"),e5=Symbol.for("radix.slottable");function Jne(e){const t=n=>"child"in n?n.children(n.child):n.children;return t.displayName=`${e}.Slottable`,t.__radixId=e5,t}var R9=(e,t)=>{if("child"in e.props){const n=e.props.child;return w.isValidElement(n)?w.cloneElement(n,void 0,e.props.children(n.props.children)):null}return w.isValidElement(t)?t:null};function P9(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...u)=>{const d=i(...u);return s(...u),d}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function I9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $9(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===e5}var F9=Symbol.for("react.lazy");function Eb(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===F9&&"_payload"in e&&D9(e._payload)}function D9(e){return typeof e=="object"&&e!==null&&"then"in e}var B9=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,U9=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,vf=Yg[" use ".trim().toString()];function t5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,Ob=n5,r5=(e,t)=>n=>{var r;if(t?.variants==null)return Ob(e,n?.class,n?.className);const{variants:s,defaultVariants:i}=t,l=Object.keys(s).map(f=>{const p=n?.[f],h=i?.[f];if(p===null)return null;const x=Tb(p)||Tb(h);return s[f][x]}),u=n&&Object.entries(n).reduce((f,p)=>{let[h,x]=p;return x===void 0||(f[h]=x),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:h,className:x,...v}=p;return Object.entries(v).every(y=>{let[b,j]=y;return Array.isArray(j)?j.includes({...i,...u}[b]):{...i,...u}[b]===j})?[...f,h,x]:f},[]);return Ob(e,l,d,n?.class,n?.className)},o2="-",z9=e=>{const t=H9(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(o2);return u[0]===""&&u.length!==1&&u.shift(),s5(u,t)||V9(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},s5=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?s5(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(o2);return t.validators.find(({validator:l})=>l(i))?.classGroupId},Mb=/^\[(.+)\]$/,V9=e=>{if(Mb.test(e)){const t=Mb.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},H9=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return W9(Object.entries(e.classGroups),n).forEach(([i,l])=>{G1(l,r,i,t)}),r},G1=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Ab(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(Z9(s)){G1(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,l])=>{G1(l,Ab(t,i),n,r)})})},Ab=(e,t)=>{let n=e;return t.split(o2).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Z9=e=>e.isThemeGetter,W9=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,u])=>[t+l,u])):i);return[n,s]}):e,q9=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,l)=>{n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return s(i,l),l},set(i,l){n.has(i)?n.set(i,l):s(i,l)}}},o5="!",K9=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,l=u=>{const d=[];let f=0,p=0,h;for(let j=0;jp?h-p:void 0;return{modifiers:d,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:b}};return n?u=>n({className:u,parseClassName:l}):l},G9=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},J9=e=>({cache:q9(e.cacheSize),parseClassName:K9(e),...z9(e)}),Q9=/\s+/,Y9=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(Q9);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{modifiers:p,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:v}=n(f);let y=!!v,b=r(y?x.substring(0,v):x);if(!b){if(!y){u=f+(u.length>0?" "+u:u);continue}if(b=r(x),!b){u=f+(u.length>0?" "+u:u);continue}y=!1}const j=G9(p).join(":"),S=h?j+o5:j,N=S+b;if(i.includes(N))continue;i.push(N);const k=s(b,y);for(let T=0;T0?" "+u:u)}return u};function X9(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rh(p),e());return n=J9(f),r=n.cache.get,s=n.cache.set,i=u,u(d)}function u(d){const f=r(d);if(f)return f;const p=Y9(d,n);return s(d,p),p}return function(){return i(X9.apply(null,arguments))}}const Mt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},a5=/^\[(?:([a-z-]+):)?(.+)\]$/i,eE=/^\d+\/\d+$/,tE=new Set(["px","full","screen"]),nE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ro=e=>hl(e)||tE.has(e)||eE.test(e),Vo=e=>Il(e,"length",pE),hl=e=>!!e&&!Number.isNaN(Number(e)),Nh=e=>Il(e,"number",hl),Pc=e=>!!e&&Number.isInteger(Number(e)),aE=e=>e.endsWith("%")&&hl(e.slice(0,-1)),rt=e=>a5.test(e),Ho=e=>nE.test(e),lE=new Set(["length","size","percentage"]),cE=e=>Il(e,lE,l5),uE=e=>Il(e,"position",l5),dE=new Set(["image","url"]),fE=e=>Il(e,dE,gE),mE=e=>Il(e,"",hE),Ic=()=>!0,Il=(e,t,n)=>{const r=a5.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},pE=e=>rE.test(e)&&!sE.test(e),l5=()=>!1,hE=e=>oE.test(e),gE=e=>iE.test(e),Rb=()=>{const e=Mt("colors"),t=Mt("spacing"),n=Mt("blur"),r=Mt("brightness"),s=Mt("borderColor"),i=Mt("borderRadius"),l=Mt("borderSpacing"),u=Mt("borderWidth"),d=Mt("contrast"),f=Mt("grayscale"),p=Mt("hueRotate"),h=Mt("invert"),x=Mt("gap"),v=Mt("gradientColorStops"),y=Mt("gradientColorStopPositions"),b=Mt("inset"),j=Mt("margin"),S=Mt("opacity"),N=Mt("padding"),k=Mt("saturate"),T=Mt("scale"),E=Mt("sepia"),O=Mt("skew"),M=Mt("space"),L=Mt("translate"),F=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",rt,t],V=()=>[rt,t],X=()=>["",ro,Vo],H=()=>["auto",hl,rt],B=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",rt],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[hl,rt];return{cacheSize:500,separator:":",theme:{colors:[Ic],spacing:[ro,Vo],blur:["none","",Ho,rt],brightness:$(),borderColor:[e],borderRadius:["none","","full",Ho,rt],borderSpacing:V(),borderWidth:X(),contrast:$(),grayscale:J(),hueRotate:$(),invert:J(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[aE,Vo],inset:z(),margin:z(),opacity:$(),padding:V(),saturate:$(),scale:$(),sepia:J(),skew:$(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",rt]}],container:["container"],columns:[{columns:[Ho]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...B(),rt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pc,rt]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",rt]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",Pc,rt]}],"grid-cols":[{"grid-cols":[Ic]}],"col-start-end":[{col:["auto",{span:["full",Pc,rt]},rt]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Ic]}],"row-start-end":[{row:["auto",{span:[Pc,rt]},rt]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",rt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",rt]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",rt,t]}],"min-w":[{"min-w":[rt,t,"min","max","fit"]}],"max-w":[{"max-w":[rt,t,"none","full","min","max","fit","prose",{screen:[Ho]},Ho]}],h:[{h:[rt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[rt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[rt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[rt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ho,Vo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Nh]}],"font-family":[{font:[Ic]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",rt]}],"line-clamp":[{"line-clamp":["none",hl,Nh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ro,rt]}],"list-image":[{"list-image":["none",rt]}],"list-style-type":[{list:["none","disc","decimal",rt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ro,Vo]}],"underline-offset":[{"underline-offset":["auto",ro,rt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",rt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",rt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...B(),uE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:W()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[ro,rt]}],"outline-w":[{outline:[ro,Vo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[ro,Vo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ho,mE]}],"shadow-color":[{shadow:[Ic]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Ho,rt]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[h]}],saturate:[{saturate:[k]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",rt]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",rt]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",rt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Pc,rt]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",rt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",rt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",rt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ro,Vo,Nh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},xE=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:s,extend:i={},override:l={}})=>{Wc(e,"cacheSize",t),Wc(e,"prefix",n),Wc(e,"separator",r),Wc(e,"experimentalParseClassName",s);for(const u in l)vE(e[u],l[u]);for(const u in i)bE(e[u],i[u]);return e},Wc=(e,t,n)=>{n!==void 0&&(e[t]=n)},vE=(e,t)=>{if(t)for(const n in t)Wc(e,n,t[n])},bE=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},yE=(e,...t)=>typeof e=="function"?Lb(Rb,e,...t):Lb(()=>xE(Rb(),e),...t),Zo=["density-1","density-2","density-3","density-4"],wE=yE({extend:{classGroups:{h:[{h:["control-h",...Zo]}],w:[{w:["control-h"]}],p:[{p:Zo}],px:[{px:["control-px",...Zo]}],py:[{py:Zo}],m:[{m:Zo}],mt:[{mt:Zo}],mb:[{mb:Zo}],gap:[{gap:Zo}],"font-size":[{text:["density-base"]}]}}});function R(...e){return wE(n5(e))}const Pb=r5("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-control-h px-control-px py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-control-h w-control-h"}},defaultVariants:{variant:"default",size:"default"}}),_E={sm:"size-4",md:"size-6",lg:"size-10"},jE={width:"clamp(1.25rem, 18cqmin, 2.5rem)",height:"clamp(1.25rem, 18cqmin, 2.5rem)"},kE={fontSize:"clamp(0.72rem, 4.5cqmin, 0.9rem)"},i0=w.forwardRef(({className:e,...t},n)=>o.jsxs("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:R("shrink-0",e),...t,children:[o.jsx("circle",{cx:"4",cy:"12",r:"3",children:o.jsx("animate",{id:"clickyLoadDotA",fill:"freeze",attributeName:"opacity",begin:"0;clickyLoadDotC.end-0.25s",dur:"0.75s",values:"1;0.2"})}),o.jsx("circle",{cx:"12",cy:"12",r:"3",opacity:"0.4",children:o.jsx("animate",{fill:"freeze",attributeName:"opacity",begin:"clickyLoadDotA.begin+0.15s",dur:"0.75s",values:"1;0.2"})}),o.jsx("circle",{cx:"20",cy:"12",r:"3",opacity:"0.3",children:o.jsx("animate",{id:"clickyLoadDotC",fill:"freeze",attributeName:"opacity",begin:"clickyLoadDotA.begin+0.3s",dur:"0.75s",values:"1;0.2"})})]}));i0.displayName="LoadingDots";const NE=w.forwardRef(({size:e="responsive",variant:t="inline",label:n,className:r,...s},i)=>{const l=t==="inline"&&e==="responsive"?"sm":e,u=l==="responsive",d=u?"":_E[l],f=u?jE:void 0;return t==="centered"?o.jsxs("div",{ref:i,role:"status","aria-label":"Loading",className:R("flex h-full min-h-32 w-full flex-col items-center justify-center gap-3 text-muted-foreground","[container-type:size]",r),...s,children:[o.jsx(i0,{className:d,style:f}),n!=null&&o.jsx("span",{className:u?void 0:"text-sm",style:u?kE:void 0,children:n})]}):o.jsxs("div",{ref:i,role:"status","aria-label":"Loading",className:R("inline-flex items-center gap-2 text-muted-foreground",r),...s,children:[o.jsx(i0,{className:d,style:f}),n!=null&&o.jsx("span",{className:"text-sm",children:n})]})});NE.displayName="Loading";const Fe=w.forwardRef(({children:e,className:t,disabled:n,loading:r=!1,loadingLabel:s,variant:i,size:l,asChild:u=!1,...d},f)=>{const p=u?L9:"button",h=s!==void 0?s:e;return u?o.jsx(p,{ref:f,"aria-busy":r||void 0,className:R(Pb({variant:i,size:l}),t),disabled:n||r,...d,children:e}):o.jsxs(p,{ref:f,"aria-busy":r||void 0,className:R(Pb({variant:i,size:l}),t),disabled:n||r,...d,children:[r&&o.jsx(i0,{className:"size-4"}),h]})});Fe.displayName="Button";const CE={compact:{xs:14,sm:18,md:24,lg:36,xl:48},comfortable:{xs:16,sm:20,md:28,lg:40,xl:56},spacious:{xs:20,sm:24,md:32,lg:48,xl:64}};function SE(e,t="comfortable"){return CE[t][e]}const EE={emerald:"text-emerald-700 ring-emerald-200/80 dark:text-emerald-400 dark:ring-emerald-500/30",amber:"text-amber-700 ring-amber-200/80 dark:text-amber-400 dark:ring-amber-500/30",rose:"text-rose-700 ring-rose-200/80 dark:text-rose-400 dark:ring-rose-500/30",slate:"text-slate-700 ring-slate-200/80 dark:text-slate-300 dark:ring-slate-500/30",sky:"text-sky-700 ring-sky-200/80 dark:text-sky-400 dark:ring-sky-500/30",violet:"text-violet-700 ring-violet-200/80 dark:text-violet-400 dark:ring-violet-500/30",neutral:"text-foreground ring-border"},TE="1em";function OE(e,t,n,r,s,i,l,u){const d=[typeof r=="number"?`rotate(${r}deg)`:typeof r=="string"?r:"",s==="horizontal"||s==="both"?"scaleX(-1)":"",s==="vertical"||s==="both"?"scaleY(-1)":""].filter(Boolean).join(" ");return o.jsx(e,{...l?{className:l}:{},...t!=null?{width:t}:{},...n!=null?{height:n}:{},...i!=null?{"aria-hidden":!u}:{},...u?{title:u,role:"img"}:{"aria-hidden":!0},...d?{style:{transform:d}}:{}})}function ME(e,t,n,r,s){return o.jsx("span",{className:R("inline-flex shrink-0 items-center justify-center rounded-sm border border-dashed border-muted-foreground/50 text-[0.65em] leading-none text-muted-foreground",r),title:s??e,role:s?"img":void 0,"aria-label":s,"aria-hidden":s?void 0:!0,style:{width:t,height:n},children:"?"})}function K({icon:e,name:t,className:n,width:r,height:s,rotate:i,flip:l,inline:u,title:d,style:f="plain",size:p,tone:h="neutral"}){const x=e2(),v=p!=null?SE(p,x):void 0,y=v!=null?Math.max(8,Math.round(v*.5)):void 0,j=r??s??(f==="badge"?y:v??TE),S=s??j,N=R("inline-block shrink-0 align-[-0.125em]",f==="plain"?n:void 0),k=f==="plain"?d:void 0,T=e?OE(e,j,S,i,l,u,N,k):ME(t,j,S,N,k);if(f==="plain")return T;const E=v!=null?{width:v,height:v}:void 0;return o.jsx("span",{title:d,"aria-label":d,role:d?"img":void 0,className:R("inline-flex items-center justify-center rounded-full bg-background shadow-sm ring-1 ring-inset",EE[h],n),style:E,children:T})}function Zr({icon:e,className:t}){return e==null||e===""||e===!1?null:typeof e=="string"?o.jsx(K,{name:e,className:R("shrink-0",t)}):o.jsx(o.Fragment,{children:e})}const c5=w.forwardRef(({icon:e,label:t,iconClassName:n,className:r,type:s="button",...i},l)=>o.jsx("button",{ref:l,type:s,"aria-label":t,title:t,className:R("inline-flex shrink-0 items-center justify-center rounded-sm border-0 bg-transparent p-0 text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",r),...i,children:o.jsx(K,{icon:e,className:R("text-sm",n)})}));c5.displayName="IconButton";function tm(){return typeof window<"u"}function vi(e){return i2(e)?(e.nodeName||"").toLowerCase():"#document"}function Er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Us(e){var t;return(t=(i2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function i2(e){return tm()?e instanceof Node||e instanceof Er(e).Node:!1}function Qt(e){return tm()?e instanceof Element||e instanceof Er(e).Element:!1}function fn(e){return tm()?e instanceof HTMLElement||e instanceof Er(e).HTMLElement:!1}function a0(e){return!tm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Er(e).ShadowRoot}function Pu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Wr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function AE(e){return/^(table|td|th)$/.test(vi(e))}function nm(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const LE=/transform|translate|scale|rotate|perspective|filter/,RE=/paint|layout|strict|content/,Bi=e=>!!e&&e!=="none";let Ch;function a2(e){const t=Qt(e)?Wr(e):e;return Bi(t.transform)||Bi(t.translate)||Bi(t.scale)||Bi(t.rotate)||Bi(t.perspective)||!rm()&&(Bi(t.backdropFilter)||Bi(t.filter))||LE.test(t.willChange||"")||RE.test(t.contain||"")}function PE(e){let t=po(e);for(;fn(t)&&!uo(t);){if(a2(t))return t;if(nm(t))return null;t=po(t)}return null}function rm(){return Ch==null&&(Ch=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ch}function uo(e){return/^(html|body|#document)$/.test(vi(e))}function Wr(e){return Er(e).getComputedStyle(e)}function sm(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function po(e){if(vi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||a0(e)&&e.host||Us(e);return a0(t)?t.host:t}function u5(e){const t=po(e);return uo(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&Pu(t)?t:u5(t)}function li(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=u5(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),l=Er(s);if(i){const u=J1(l);return t.concat(l,l.visualViewport||[],Pu(s)?s:[],u&&n?li(u):[])}else return t.concat(s,li(s,[],n))}function J1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const IE=["top","right","bottom","left"],mi=Math.min,Cr=Math.max,l0=Math.round,al=Math.floor,Ps=e=>({x:e,y:e}),$E={left:"right",right:"left",bottom:"top",top:"bottom"};function Q1(e,t,n){return Cr(e,mi(t,n))}function ho(e,t){return typeof e=="function"?e(t):e}function go(e){return e.split("-")[0]}function $l(e){return e.split("-")[1]}function l2(e){return e==="x"?"y":"x"}function c2(e){return e==="y"?"height":"width"}function Rs(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function u2(e){return l2(Rs(e))}function FE(e,t,n){n===void 0&&(n=!1);const r=$l(e),s=u2(e),i=c2(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=c0(l)),[l,c0(l)]}function DE(e){const t=c0(e);return[Y1(e),t,Y1(t)]}function Y1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ib=["left","right"],$b=["right","left"],BE=["top","bottom"],UE=["bottom","top"];function zE(e,t,n){switch(e){case"top":case"bottom":return n?t?$b:Ib:t?Ib:$b;case"left":case"right":return t?BE:UE;default:return[]}}function VE(e,t,n,r){const s=$l(e);let i=zE(go(e),n==="start",r);return s&&(i=i.map(l=>l+"-"+s),t&&(i=i.concat(i.map(Y1)))),i}function c0(e){const t=go(e);return $E[t]+e.slice(t.length)}function HE(e){return{top:0,right:0,bottom:0,left:0,...e}}function d5(e){return typeof e!="number"?HE(e):{top:e,right:e,bottom:e,left:e}}function u0(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}var ZE=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],d0=ZE.join(","),f5=typeof Element>"u",Cl=f5?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,f0=!f5&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},m0=function(t,n){var r;n===void 0&&(n=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=s===""||s==="true",l=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):m0(t.parentNode));return l},WE=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},m5=function(t,n,r){if(m0(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(d0));return n&&Cl.call(t,d0)&&s.unshift(t),s=s.filter(r),s},p0=function(t,n,r){for(var s=[],i=Array.from(t);i.length;){var l=i.shift();if(!m0(l,!1))if(l.tagName==="SLOT"){var u=l.assignedElements(),d=u.length?u:l.children,f=p0(d,!0,r);r.flatten?s.push.apply(s,f):s.push({scopeParent:l,candidates:f})}else{var p=Cl.call(l,d0);p&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var h=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),x=!m0(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(h&&x){var v=p0(h===!0?l.children:h.children,!0,r);r.flatten?s.push.apply(s,v):s.push({scopeParent:l,candidates:v})}else i.unshift.apply(i,l.children)}}return s},p5=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},h5=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||WE(t))&&!p5(t)?0:t.tabIndex},qE=function(t,n){var r=h5(t);return r<0&&n&&!p5(t)?0:r},KE=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},g5=function(t){return t.tagName==="INPUT"},GE=function(t){return g5(t)&&t.type==="hidden"},JE=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QE=function(t,n){for(var r=0;rsummary:first-of-type"),u=l?t.parentElement:t;if(Cl.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var f=t.parentElement,p=f0(t);if(f&&!f.shadowRoot&&s(f)===!0)return Fb(t);t.assignedSlot?t=t.assignedSlot:!f&&p!==t.ownerDocument?t=p.host:t=f}t=d}if(tT(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Fb(t);return!1},rT=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},x5=function(t){var n=[],r=[];return t.forEach(function(s,i){var l=!!s.scopeParent,u=l?s.scopeParent:s,d=qE(u,l),f=l?x5(s.candidates):u;d===0?l?n.push.apply(n,f):n.push(u):r.push({documentOrder:i,tabIndex:d,item:s,isScope:l,content:f})}),r.sort(KE).reduce(function(s,i){return i.isScope?s.push.apply(s,i.content):s.push(i.content),s},[]).concat(n)},om=function(t,n){n=n||{};var r;return n.getShadowRoot?r=p0([t],n.includeContainer,{filter:eg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:sT}):r=m5(t,n.includeContainer,eg.bind(null,n)),x5(r)},oT=function(t,n){n=n||{};var r;return n.getShadowRoot?r=p0([t],n.includeContainer,{filter:X1.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=m5(t,n.includeContainer,X1.bind(null,n)),r},v5=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Cl.call(t,d0)===!1?!1:eg(n,t)};function iT(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function b5(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function aT(){return/apple/i.test(navigator.vendor)}function tg(){const e=/android/i;return e.test(iT())||e.test(b5())}function lT(){return b5().includes("jsdom/")}const Db="data-floating-ui-focusable",cT="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Sh="ArrowLeft",Eh="ArrowRight",uT="ArrowUp",dT="ArrowDown";function Qo(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function ur(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&a0(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Yo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Th(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function fT(e){return e.matches("html,body")}function zr(e){return e?.ownerDocument||document}function y5(e){return fn(e)&&e.matches(cT)}function ng(e){return e?e.getAttribute("role")==="combobox"&&y5(e):!1}function h0(e){return e?e.hasAttribute(Db)?e:e.querySelector("["+Db+"]")||e:null}function na(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var i;return s.parentId===t&&(!n||((i=s.context)==null?void 0:i.open))}).flatMap(s=>[s,...na(e,s.id,n)])}function mT(e,t){let n,r=-1;function s(i,l){l>r&&(n=i,r=l),na(e,i).forEach(d=>{s(d.id,l+1)})}return s(t,0),e.find(i=>i.id===n)}function Bb(e,t){var n;let r=[],s=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;s;){const i=e.find(l=>l.id===s);s=i?.parentId,i&&(r=r.concat(i))}return r}function Nn(e){e.preventDefault(),e.stopPropagation()}function pT(e){return"nativeEvent"in e}function w5(e){return e.mozInputSource===0&&e.isTrusted?!0:tg()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function _5(e){return lT()?!1:!tg()&&e.width===0&&e.height===0||tg()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ub(e,t){return["mouse","pen"].includes(e)}var hT=typeof document<"u",gT=function(){},Jt=hT?w.useLayoutEffect:gT;const xT={...Yg};function Ls(e){const t=w.useRef(e);return Jt(()=>{t.current=e}),t}const vT=xT.useInsertionEffect,bT=vT||(e=>e());function Sn(e){const t=w.useRef(()=>{});return bT(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s=e.current.length}function Oh(e,t){return Dn(e,{disabledIndices:t})}function zb(e,t){return Dn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Dn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:i=1}=t===void 0?{}:t,l=n;do l+=r?-i:i;while(l>=0&&l<=e.current.length-1&&Zf(e,l,s));return l}function yT(e,t){let{event:n,orientation:r,loop:s,rtl:i,cols:l,disabledIndices:u,minIndex:d,maxIndex:f,prevIndex:p,stopEvent:h=!1}=t,x=p;if(n.key===uT){if(h&&Nn(n),p===-1)x=f;else if(x=Dn(e,{startingIndex:x,amount:l,decrement:!0,disabledIndices:u}),s&&(p-lv?b:b-l}ru(e,x)&&(x=p)}if(n.key===dT&&(h&&Nn(n),p===-1?x=d:(x=Dn(e,{startingIndex:p,amount:l,disabledIndices:u}),s&&p+l>f&&(x=Dn(e,{startingIndex:p%l-l,amount:l,disabledIndices:u}))),ru(e,x)&&(x=p)),r==="both"){const v=al(p/l);n.key===(i?Sh:Eh)&&(h&&Nn(n),p%l!==l-1?(x=Dn(e,{startingIndex:p,disabledIndices:u}),s&&bf(x,l,v)&&(x=Dn(e,{startingIndex:p-p%l-1,disabledIndices:u}))):s&&(x=Dn(e,{startingIndex:p-p%l-1,disabledIndices:u})),bf(x,l,v)&&(x=p)),n.key===(i?Eh:Sh)&&(h&&Nn(n),p%l!==0?(x=Dn(e,{startingIndex:p,decrement:!0,disabledIndices:u}),s&&bf(x,l,v)&&(x=Dn(e,{startingIndex:p+(l-p%l),decrement:!0,disabledIndices:u}))):s&&(x=Dn(e,{startingIndex:p+(l-p%l),decrement:!0,disabledIndices:u})),bf(x,l,v)&&(x=p));const y=al(f/l)===v;ru(e,x)&&(s&&y?x=n.key===(i?Eh:Sh)?f:Dn(e,{startingIndex:p-p%l-1,disabledIndices:u}):x=p)}return x}function wT(e,t,n){const r=[];let s=0;return e.forEach((i,l)=>{let{width:u,height:d}=i,f=!1;for(n&&(s=0);!f;){const p=[];for(let h=0;hr[h]==null)?(p.forEach(h=>{r[h]=l}),f=!0):s++}}),[...r]}function _T(e,t,n,r,s){if(e===-1)return-1;const i=n.indexOf(e),l=t[e];switch(s){case"tl":return i;case"tr":return l?i+l.width-1:i;case"bl":return l?i+(l.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function jT(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Zf(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Iu=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function j5(e,t){const n=om(e,Iu()),r=n.length;if(r===0)return;const s=Qo(zr(e)),i=n.indexOf(s),l=i===-1?t===1?0:r-1:i+t;return n[l]}function k5(e){return j5(zr(e).body,1)||e}function N5(e){return j5(zr(e).body,-1)||e}function su(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ur(n,r)}function kT(e){om(e,Iu()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Vb(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var pa=A8();const Qne=Jg(pa);function Hb(e,t,n){let{reference:r,floating:s}=e;const i=Rs(t),l=u2(t),u=c2(l),d=go(t),f=i==="y",p=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,x=r[u]/2-s[u]/2;let v;switch(d){case"top":v={x:p,y:r.y-s.height};break;case"bottom":v={x:p,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:h};break;case"left":v={x:r.x-s.width,y:h};break;default:v={x:r.x,y:r.y}}switch($l(t)){case"start":v[l]-=x*(n&&f?-1:1);break;case"end":v[l]+=x*(n&&f?-1:1);break}return v}async function NT(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:x=!1,padding:v=0}=ho(t,e),y=d5(v),j=u[x?h==="floating"?"reference":"floating":h],S=u0(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(j)))==null||n?j:j.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:f,rootBoundary:p,strategy:d})),N=h==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),T=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},E=u0(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:N,offsetParent:k,strategy:d}):N);return{top:(S.top-E.top+y.top)/T.y,bottom:(E.bottom-S.bottom+y.bottom)/T.y,left:(S.left-E.left+y.left)/T.x,right:(E.right-S.right+y.right)/T.x}}const CT=50,ST=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:l}=n,u=l.detectOverflow?l:{...l,detectOverflow:NT},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:h}=Hb(f,r,d),x=r,v=0;const y={};for(let b=0;b({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:p=0}=ho(e,t)||{};if(f==null)return{};const h=d5(p),x={x:n,y:r},v=u2(s),y=c2(v),b=await l.getDimensions(f),j=v==="y",S=j?"top":"left",N=j?"bottom":"right",k=j?"clientHeight":"clientWidth",T=i.reference[y]+i.reference[v]-x[v]-i.floating[y],E=x[v]-i.reference[v],O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let M=O?O[k]:0;(!M||!await(l.isElement==null?void 0:l.isElement(O)))&&(M=u.floating[k]||i.floating[y]);const L=T/2-E/2,F=M/2-b[y]/2-1,U=mi(h[S],F),z=mi(h[N],F),V=U,X=M-b[y]-z,H=M/2-b[y]/2+L,B=Q1(V,H,X),W=!d.arrow&&$l(s)!=null&&H!==B&&i.reference[y]/2-(HH<=0)){var z,V;const H=(((z=i.flip)==null?void 0:z.index)||0)+1,B=M[H];if(B&&(!(h==="alignment"?N!==Rs(B):!1)||U.every(P=>Rs(P.placement)===N?P.overflows[0]>0:!0)))return{data:{index:H,overflows:U},reset:{placement:B}};let W=(V=U.filter(se=>se.overflows[0]<=0).sort((se,P)=>se.overflows[1]-P.overflows[1])[0])==null?void 0:V.placement;if(!W)switch(v){case"bestFit":{var X;const se=(X=U.filter(P=>{if(O){const J=Rs(P.placement);return J===N||J==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(J=>J>0).reduce((J,ne)=>J+ne,0)]).sort((P,J)=>P[1]-J[1])[0])==null?void 0:X[0];se&&(W=se);break}case"initialPlacement":W=u;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function Zb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wb(e){return IE.some(t=>e[t]>=0)}const OT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...i}=ho(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...i,elementContext:"reference"}),u=Zb(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Wb(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...i,altBoundary:!0}),u=Zb(l,n.floating);return{data:{escapedOffsets:u,escaped:Wb(u)}}}default:return{}}}}},C5=new Set(["left","top"]);async function MT(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=go(n),u=$l(n),d=Rs(n)==="y",f=C5.has(l)?-1:1,p=i&&d?-1:1,h=ho(t,e);let{mainAxis:x,crossAxis:v,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof y=="number"&&(v=u==="end"?y*-1:y),d?{x:v*p,y:x*f}:{x:x*f,y:v*p}}const AT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:l,middlewareData:u}=t,d=await MT(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:i+d.y,data:{...d,placement:l}}}}},LT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:i}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:S=>{let{x:N,y:k}=S;return{x:N,y:k}}},...f}=ho(e,t),p={x:n,y:r},h=await i.detectOverflow(t,f),x=Rs(go(s)),v=l2(x);let y=p[v],b=p[x];if(l){const S=v==="y"?"top":"left",N=v==="y"?"bottom":"right",k=y+h[S],T=y-h[N];y=Q1(k,y,T)}if(u){const S=x==="y"?"top":"left",N=x==="y"?"bottom":"right",k=b+h[S],T=b-h[N];b=Q1(k,b,T)}const j=d.fn({...t,[v]:y,[x]:b});return{...j,data:{x:j.x-n,y:j.y-r,enabled:{[v]:l,[x]:u}}}}}},RT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=ho(e,t),p={x:n,y:r},h=Rs(s),x=l2(h);let v=p[x],y=p[h];const b=ho(u,t),j=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(d){const k=x==="y"?"height":"width",T=i.reference[x]-i.floating[k]+j.mainAxis,E=i.reference[x]+i.reference[k]-j.mainAxis;vE&&(v=E)}if(f){var S,N;const k=x==="y"?"width":"height",T=C5.has(go(s)),E=i.reference[h]-i.floating[k]+(T&&((S=l.offset)==null?void 0:S[h])||0)+(T?0:j.crossAxis),O=i.reference[h]+i.reference[k]+(T?0:((N=l.offset)==null?void 0:N[h])||0)-(T?j.crossAxis:0);yO&&(y=O)}return{[x]:v,[h]:y}}}},PT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:l,elements:u}=t,{apply:d=()=>{},...f}=ho(e,t),p=await l.detectOverflow(t,f),h=go(s),x=$l(s),v=Rs(s)==="y",{width:y,height:b}=i.floating;let j,S;h==="top"||h==="bottom"?(j=h,S=x===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(S=h,j=x==="end"?"top":"bottom");const N=b-p.top-p.bottom,k=y-p.left-p.right,T=mi(b-p[j],N),E=mi(y-p[S],k),O=!t.middlewareData.shift;let M=T,L=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=N),O&&!x){const U=Cr(p.left,0),z=Cr(p.right,0),V=Cr(p.top,0),X=Cr(p.bottom,0);v?L=y-2*(U!==0||z!==0?U+z:Cr(p.left,p.right)):M=b-2*(V!==0||X!==0?V+X:Cr(p.top,p.bottom))}await d({...t,availableWidth:L,availableHeight:M});const F=await l.getDimensions(u.floating);return y!==F.width||b!==F.height?{reset:{rects:!0}}:{}}}};function S5(e){const t=Wr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=fn(e),i=s?e.offsetWidth:n,l=s?e.offsetHeight:r,u=l0(n)!==i||l0(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function d2(e){return Qt(e)?e:e.contextElement}function gl(e){const t=d2(e);if(!fn(t))return Ps(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=S5(t);let l=(i?l0(n.width):n.width)/r,u=(i?l0(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const IT=Ps(0);function E5(e){const t=Er(e);return!rm()||!t.visualViewport?IT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $T(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Er(e)?!1:t}function aa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=d2(e);let l=Ps(1);t&&(r?Qt(r)&&(l=gl(r)):l=gl(e));const u=$T(i,n,r)?E5(i):Ps(0);let d=(s.left+u.x)/l.x,f=(s.top+u.y)/l.y,p=s.width/l.x,h=s.height/l.y;if(i){const x=Er(i),v=r&&Qt(r)?Er(r):r;let y=x,b=J1(y);for(;b&&r&&v!==y;){const j=gl(b),S=b.getBoundingClientRect(),N=Wr(b),k=S.left+(b.clientLeft+parseFloat(N.paddingLeft))*j.x,T=S.top+(b.clientTop+parseFloat(N.paddingTop))*j.y;d*=j.x,f*=j.y,p*=j.x,h*=j.y,d+=k,f+=T,y=Er(b),b=J1(y)}}return u0({width:p,height:h,x:d,y:f})}function im(e,t){const n=sm(e).scrollLeft;return t?t.left+n:aa(Us(e)).left+n}function T5(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-im(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function FT(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",l=Us(r),u=t?nm(t.floating):!1;if(r===l||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=Ps(1);const p=Ps(0),h=fn(r);if((h||!h&&!i)&&((vi(r)!=="body"||Pu(l))&&(d=sm(r)),h)){const v=aa(r);f=gl(r),p.x=v.x+r.clientLeft,p.y=v.y+r.clientTop}const x=l&&!h&&!i?T5(l,d):Ps(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+x.x,y:n.y*f.y-d.scrollTop*f.y+p.y+x.y}}function DT(e){return Array.from(e.getClientRects())}function BT(e){const t=Us(e),n=sm(e),r=e.ownerDocument.body,s=Cr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Cr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+im(e);const u=-n.scrollTop;return Wr(r).direction==="rtl"&&(l+=Cr(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:l,y:u}}const qb=25;function UT(e,t){const n=Er(e),r=Us(e),s=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,d=0;if(s){i=s.width,l=s.height;const p=rm();(!p||p&&t==="fixed")&&(u=s.offsetLeft,d=s.offsetTop)}const f=im(r);if(f<=0){const p=r.ownerDocument,h=p.body,x=getComputedStyle(h),v=p.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,y=Math.abs(r.clientWidth-h.clientWidth-v);y<=qb&&(i-=y)}else f<=qb&&(i+=f);return{width:i,height:l,x:u,y:d}}function zT(e,t){const n=aa(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=fn(e)?gl(e):Ps(1),l=e.clientWidth*i.x,u=e.clientHeight*i.y,d=s*i.x,f=r*i.y;return{width:l,height:u,x:d,y:f}}function Kb(e,t,n){let r;if(t==="viewport")r=UT(e,n);else if(t==="document")r=BT(Us(e));else if(Qt(t))r=zT(t,n);else{const s=E5(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return u0(r)}function O5(e,t){const n=po(e);return n===t||!Qt(n)||uo(n)?!1:Wr(n).position==="fixed"||O5(n,t)}function VT(e,t){const n=t.get(e);if(n)return n;let r=li(e,[],!1).filter(u=>Qt(u)&&vi(u)!=="body"),s=null;const i=Wr(e).position==="fixed";let l=i?po(e):e;for(;Qt(l)&&!uo(l);){const u=Wr(l),d=a2(l);!d&&u.position==="fixed"&&(s=null),(i?!d&&!s:!d&&u.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Pu(l)&&!d&&O5(e,l))?r=r.filter(p=>p!==l):s=u,l=po(l)}return t.set(e,r),r}function HT(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?nm(t)?[]:VT(t,this._c):[].concat(n),r],u=Kb(t,l[0],s);let d=u.top,f=u.right,p=u.bottom,h=u.left;for(let x=1;x{l(!1,1e-7)},1e3)}M===1&&!A5(f,e.getBoundingClientRect())&&l(),T=!1}try{n=new IntersectionObserver(E,{...k,root:s.ownerDocument})}catch{n=new IntersectionObserver(E,k)}n.observe(e)}return l(!0),i}function $u(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=d2(e),p=s||i?[...f?li(f):[],...t?li(t):[]]:[];p.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const h=f&&u?JT(f,n):null;let x=-1,v=null;l&&(v=new ResizeObserver(S=>{let[N]=S;N&&N.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var k;(k=v)==null||k.observe(t)})),n()}),f&&!d&&v.observe(f),t&&v.observe(t));let y,b=d?aa(e):null;d&&j();function j(){const S=aa(e);b&&!A5(b,S)&&n(),b=S,y=requestAnimationFrame(j)}return n(),()=>{var S;p.forEach(N=>{s&&N.removeEventListener("scroll",n),i&&N.removeEventListener("resize",n)}),h?.(),(S=v)==null||S.disconnect(),v=null,d&&cancelAnimationFrame(y)}}const QT=AT,YT=LT,XT=TT,eO=PT,tO=OT,Jb=ET,nO=RT,rO=(e,t,n)=>{const r=new Map,s={platform:GT,...n},i={...s.platform,_c:r};return ST(e,t,{...s,platform:i})};var sO=typeof document<"u",oO=function(){},Wf=sO?w.useLayoutEffect:oO;function g0(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!g0(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!g0(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function L5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qb(e,t){const n=L5(e);return Math.round(t*n)/n}function Ah(e){const t=w.useRef(e);return Wf(()=>{t.current=e}),t}function iO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[p,h]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,v]=w.useState(r);g0(x,r)||v(r);const[y,b]=w.useState(null),[j,S]=w.useState(null),N=w.useCallback(P=>{P!==O.current&&(O.current=P,b(P))},[]),k=w.useCallback(P=>{P!==M.current&&(M.current=P,S(P))},[]),T=i||y,E=l||j,O=w.useRef(null),M=w.useRef(null),L=w.useRef(p),F=d!=null,U=Ah(d),z=Ah(s),V=Ah(f),X=w.useCallback(()=>{if(!O.current||!M.current)return;const P={placement:t,strategy:n,middleware:x};z.current&&(P.platform=z.current),rO(O.current,M.current,P).then(J=>{const ne={...J,isPositioned:V.current!==!1};H.current&&!g0(L.current,ne)&&(L.current=ne,pa.flushSync(()=>{h(ne)}))})},[x,t,n,z,V]);Wf(()=>{f===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,h(P=>({...P,isPositioned:!1})))},[f]);const H=w.useRef(!1);Wf(()=>(H.current=!0,()=>{H.current=!1}),[]),Wf(()=>{if(T&&(O.current=T),E&&(M.current=E),T&&E){if(U.current)return U.current(T,E,X);X()}},[T,E,X,U,F]);const B=w.useMemo(()=>({reference:O,floating:M,setReference:N,setFloating:k}),[N,k]),W=w.useMemo(()=>({reference:T,floating:E}),[T,E]),se=w.useMemo(()=>{const P={position:n,left:0,top:0};if(!W.floating)return P;const J=Qb(W.floating,p.x),ne=Qb(W.floating,p.y);return u?{...P,transform:"translate("+J+"px, "+ne+"px)",...L5(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:ne}},[n,u,W.floating,p.x,p.y]);return w.useMemo(()=>({...p,update:X,refs:B,elements:W,floatingStyles:se}),[p,X,B,W,se])}const aO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Jb({element:r.current,padding:s}).fn(n):{}:r?Jb({element:r,padding:s}).fn(n):{}}}},Fu=(e,t)=>{const n=QT(e);return{name:n.name,fn:n.fn,options:[e,t]}},Du=(e,t)=>{const n=YT(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yne=(e,t)=>({fn:nO(e).fn,options:[e,t]}),Bu=(e,t)=>{const n=XT(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xne=(e,t)=>{const n=eO(e);return{name:n.name,fn:n.fn,options:[e,t]}},ere=(e,t)=>{const n=tO(e);return{name:n.name,fn:n.fn,options:[e,t]}},tre=(e,t)=>{const n=aO(e);return{name:n.name,fn:n.fn,options:[e,t]}};function R5(e){const t=w.useRef(void 0),n=w.useCallback(r=>{const s=e.map(i=>{if(i!=null){if(typeof i=="function"){const l=i,u=l(r);return typeof u=="function"?u:()=>{l(null)}}return i.current=r,()=>{i.current=null}}});return()=>{s.forEach(i=>i?.())}},e);return w.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const lO="data-floating-ui-focusable",Yb="active",Xb="selected",Uu="ArrowLeft",zu="ArrowRight",P5="ArrowUp",am="ArrowDown",cO={...Yg};let ey=!1,uO=0;const ty=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+uO++;function dO(){const[e,t]=w.useState(()=>ey?ty():void 0);return Jt(()=>{e==null&&t(ty())},[]),w.useEffect(()=>{ey=!0},[]),e}const fO=cO.useId,f2=fO||dO;function mO(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const pO=w.createContext(null),hO=w.createContext(null),m2=()=>{var e;return((e=w.useContext(pO))==null?void 0:e.id)||null},lm=()=>w.useContext(hO);function gu(e){return"data-floating-ui-"+e}function rg(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}let ny=0;function Ki(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(ny);const i=()=>e?.focus({preventScroll:n});s?i():ny=requestAnimationFrame(i)}function gO(e){return e?.ownerDocument||document}const xl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ry(e){return e==="inert"?xl.inert:e==="aria-hidden"?xl["aria-hidden"]:xl.none}let yf=new WeakSet,wf={},Lh=0;const xO=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function I5(e){return e?a0(e)?e.host:I5(e.parentNode):null}const vO=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=I5(n);return e.contains(r)?r:null}).filter(n=>n!=null);function bO(e,t,n,r){const s="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,l=vO(t,e),u=new Set,d=new Set(l),f=[];wf[s]||(wf[s]=new WeakMap);const p=wf[s];l.forEach(h),x(t),u.clear();function h(v){!v||u.has(v)||(u.add(v),v.parentNode&&h(v.parentNode))}function x(v){!v||d.has(v)||[].forEach.call(v.children,y=>{if(vi(y)!=="script")if(u.has(y))x(y);else{const b=i?y.getAttribute(i):null,j=b!==null&&b!=="false",S=ry(i),N=(S.get(y)||0)+1,k=(p.get(y)||0)+1;S.set(y,N),p.set(y,k),f.push(y),N===1&&j&&yf.add(y),k===1&&y.setAttribute(s,""),!j&&i&&y.setAttribute(i,i==="inert"?"":"true")}})}return Lh++,()=>{f.forEach(v=>{const y=ry(i),j=(y.get(v)||0)-1,S=(p.get(v)||0)-1;y.set(v,j),p.set(v,S),j||(!yf.has(v)&&i&&v.removeAttribute(i),yf.delete(v)),S||v.removeAttribute(s)}),Lh--,Lh||(xl.inert=new WeakMap,xl["aria-hidden"]=new WeakMap,xl.none=new WeakMap,yf=new WeakSet,wf={})}}function sy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=gO(e[0]).body;return bO(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const p2={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},x0=w.forwardRef(function(t,n){const[r,s]=w.useState();Jt(()=>{aT()&&s("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[gu("focus-guard")]:"",style:p2};return o.jsx("span",{...t,...i})}),yO={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$5=w.createContext(null),oy=gu("portal");function wO(e){e===void 0&&(e={});const{id:t,root:n}=e,r=f2(),s=F5(),[i,l]=w.useState(null),u=w.useRef(null);return Jt(()=>()=>{i?.remove(),queueMicrotask(()=>{u.current=null})},[i]),Jt(()=>{if(!r||u.current)return;const d=t?document.getElementById(t):null;if(!d)return;const f=document.createElement("div");f.id=r,f.setAttribute(oy,""),d.appendChild(f),u.current=f,l(f)},[t,r]),Jt(()=>{if(n===null||!r||u.current)return;let d=n||s?.portalNode;d&&!i2(d)&&(d=d.current),d=d||document.body;let f=null;t&&(f=document.createElement("div"),f.id=t,d.appendChild(f));const p=document.createElement("div");p.id=r,p.setAttribute(oy,""),d=f||d,d.appendChild(p),u.current=p,l(p)},[t,n,r,s]),i}function ha(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,i=wO({id:n,root:r}),[l,u]=w.useState(null),d=w.useRef(null),f=w.useRef(null),p=w.useRef(null),h=w.useRef(null),x=l?.modal,v=l?.open,y=!!l&&!l.modal&&l.open&&s&&!!(r||i);return w.useEffect(()=>{if(!i||!s||x)return;function b(j){i&&su(j)&&(j.type==="focusin"?Vb:kT)(i)}return i.addEventListener("focusin",b,!0),i.addEventListener("focusout",b,!0),()=>{i.removeEventListener("focusin",b,!0),i.removeEventListener("focusout",b,!0)}},[i,s,x]),w.useEffect(()=>{i&&(v||Vb(i))},[v,i]),o.jsxs($5.Provider,{value:w.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:h,portalNode:i,setFocusManagerState:u}),[s,i]),children:[y&&i&&o.jsx(x0,{"data-type":"outside",ref:d,onFocus:b=>{if(su(b,i)){var j;(j=p.current)==null||j.focus()}else{const S=l?l.domReference:null,N=N5(S);N?.focus()}}}),y&&i&&o.jsx("span",{"aria-owns":i.id,style:yO}),i&&pa.createPortal(t,i),y&&i&&o.jsx(x0,{"data-type":"outside",ref:f,onFocus:b=>{if(su(b,i)){var j;(j=h.current)==null||j.focus()}else{const S=l?l.domReference:null,N=k5(S);N?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,b.nativeEvent,"focus-out")}}})]})}const F5=()=>w.useContext($5);function iy(e){return w.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const ay=20;let ni=[];function h2(){ni=ni.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function _O(e){h2(),e&&vi(e)!=="body"&&(ni.push(new WeakRef(e)),ni.length>ay&&(ni=ni.slice(-ay)))}function ly(){h2();const e=ni[ni.length-1];return e?.deref()}function jO(e){const t=Iu();return v5(e,t)?e:om(e,t)[0]||e}function cy(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Iu(),i=oT(e,r).filter(u=>{const d=u.getAttribute("data-tabindex")||"";return v5(u,r)||u.hasAttribute("data-tabindex")&&!d.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const kO=w.forwardRef(function(t,n){return o.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:p2})});function ga(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:i=!0,initialFocus:l=0,returnFocus:u=!0,restoreFocus:d=!1,modal:f=!0,visuallyHiddenDismiss:p=!1,closeOnFocusOut:h=!0,outsideElementsInert:x=!1,getInsideElements:v=()=>[]}=e,{open:y,onOpenChange:b,events:j,dataRef:S,elements:{domReference:N,floating:k}}=t,T=Sn(()=>{var ke;return(ke=S.current.floatingContext)==null?void 0:ke.nodeId}),E=Sn(v),O=typeof l=="number"&&l<0,M=ng(N)&&O,L=xO(),F=L?i:!0,U=!F||L&&x,z=Ls(s),V=Ls(l),X=Ls(u),H=lm(),B=F5(),W=w.useRef(null),se=w.useRef(null),P=w.useRef(!1),J=w.useRef(!1),ne=w.useRef(-1),$=w.useRef(-1),Q=B!=null,ae=h0(k),ie=Sn(function(ke){return ke===void 0&&(ke=ae),ke?om(ke,Iu()):[]}),de=Sn(ke=>{const Ne=ie(ke);return z.current.map(xe=>N&&xe==="reference"?N:ae&&xe==="floating"?ae:Ne).filter(Boolean).flat()});w.useEffect(()=>{if(r||!f)return;function ke(xe){if(xe.key==="Tab"){ur(ae,Qo(zr(ae)))&&ie().length===0&&!M&&Nn(xe);const Re=de(),et=Yo(xe);z.current[0]==="reference"&&et===N&&(Nn(xe),xe.shiftKey?Ki(Re[Re.length-1]):Ki(Re[1])),z.current[1]==="floating"&&et===ae&&xe.shiftKey&&(Nn(xe),Ki(Re[0]))}}const Ne=zr(ae);return Ne.addEventListener("keydown",ke),()=>{Ne.removeEventListener("keydown",ke)}},[r,N,ae,f,z,M,ie,de]),w.useEffect(()=>{if(r||!k)return;function ke(Ne){const xe=Yo(Ne),et=ie().indexOf(xe);et!==-1&&(ne.current=et)}return k.addEventListener("focusin",ke),()=>{k.removeEventListener("focusin",ke)}},[r,k,ie]),w.useEffect(()=>{if(r||!h)return;function ke(){J.current=!0,setTimeout(()=>{J.current=!1})}function Ne(et){const Ve=et.relatedTarget,st=et.currentTarget,Ie=Yo(et);queueMicrotask(()=>{const _e=T(),be=!(ur(N,Ve)||ur(k,Ve)||ur(Ve,k)||ur(B?.portalNode,Ve)||Ve!=null&&Ve.hasAttribute(gu("focus-guard"))||H&&(na(H.nodesRef.current,_e).find(Ce=>{var Te,Y;return ur((Te=Ce.context)==null?void 0:Te.elements.floating,Ve)||ur((Y=Ce.context)==null?void 0:Y.elements.domReference,Ve)})||Bb(H.nodesRef.current,_e).find(Ce=>{var Te,Y,Se;return[(Te=Ce.context)==null?void 0:Te.elements.floating,h0((Y=Ce.context)==null?void 0:Y.elements.floating)].includes(Ve)||((Se=Ce.context)==null?void 0:Se.elements.domReference)===Ve})));if(st===N&&ae&&cy(ae,z),d&&st!==N&&!(Ie!=null&&Ie.isConnected)&&Qo(zr(ae))===zr(ae).body){fn(ae)&&ae.focus();const Ce=ne.current,Te=ie(),Y=Te[Ce]||Te[Te.length-1]||ae;fn(Y)&&Y.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(M||!f)&&Ve&&be&&!J.current&&Ve!==ly()&&(P.current=!0,b(!1,et,"focus-out"))})}const xe=!!(!H&&B);function Re(){rg($),S.current.insideReactTree=!0,$.current=window.setTimeout(()=>{S.current.insideReactTree=!1})}if(k&&fn(N))return N.addEventListener("focusout",Ne),N.addEventListener("pointerdown",ke),k.addEventListener("focusout",Ne),xe&&k.addEventListener("focusout",Re,!0),()=>{N.removeEventListener("focusout",Ne),N.removeEventListener("pointerdown",ke),k.removeEventListener("focusout",Ne),xe&&k.removeEventListener("focusout",Re,!0)}},[r,N,k,ae,f,H,B,b,h,d,ie,M,T,z,S]);const ge=w.useRef(null),ve=w.useRef(null),Le=iy([ge,B?.beforeInsideRef]),je=iy([ve,B?.afterInsideRef]);w.useEffect(()=>{var ke,Ne;if(r||!k)return;const xe=Array.from((B==null||(ke=B.portalNode)==null?void 0:ke.querySelectorAll("["+gu("portal")+"]"))||[]),et=(Ne=(H?Bb(H.nodesRef.current,T()):[]).find(Ie=>{var _e;return ng(((_e=Ie.context)==null?void 0:_e.elements.domReference)||null)}))==null||(Ne=Ne.context)==null?void 0:Ne.elements.domReference,Ve=[k,et,...xe,...E(),W.current,se.current,ge.current,ve.current,B?.beforeOutsideRef.current,B?.afterOutsideRef.current,z.current.includes("reference")||M?N:null].filter(Ie=>Ie!=null),st=f||M?sy(Ve,!U,U):sy(Ve);return()=>{st()}},[r,N,k,f,z,B,M,F,U,H,T,E]),Jt(()=>{if(r||!fn(ae))return;const ke=zr(ae),Ne=Qo(ke);queueMicrotask(()=>{const xe=de(ae),Re=V.current,et=(typeof Re=="number"?xe[Re]:Re.current)||ae,Ve=ur(ae,Ne);!O&&!Ve&&y&&Ki(et,{preventScroll:et===ae})})},[r,y,ae,O,de,V]),Jt(()=>{if(r||!ae)return;const ke=zr(ae),Ne=Qo(ke);_O(Ne);function xe(Ve){let{reason:st,event:Ie,nested:_e}=Ve;if(["hover","safe-polygon"].includes(st)&&Ie.type==="mouseleave"&&(P.current=!0),st==="outside-press")if(_e)P.current=!1;else if(w5(Ie)||_5(Ie))P.current=!1;else{let be=!1;document.createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?P.current=!1:P.current=!0}}j.on("openchange",xe);const Re=ke.createElement("span");Re.setAttribute("tabindex","-1"),Re.setAttribute("aria-hidden","true"),Object.assign(Re.style,p2),Q&&N&&N.insertAdjacentElement("afterend",Re);function et(){if(typeof X.current=="boolean"){const Ve=N||ly();return Ve&&Ve.isConnected?Ve:Re}return X.current.current||Re}return()=>{j.off("openchange",xe);const Ve=Qo(ke),st=ur(k,Ve)||H&&na(H.nodesRef.current,T(),!1).some(_e=>{var be;return ur((be=_e.context)==null?void 0:be.elements.floating,Ve)}),Ie=et();queueMicrotask(()=>{const _e=jO(Ie);X.current&&!P.current&&fn(_e)&&(!(_e!==Ve&&Ve!==ke.body)||st)&&_e.focus({preventScroll:!0}),Re.remove()})}},[r,k,ae,X,S,j,H,Q,N,T]),w.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(h2)}),[r]),Jt(()=>{if(!r&&B)return B.setFocusManagerState({modal:f,closeOnFocusOut:h,open:y,onOpenChange:b,domReference:N}),()=>{B.setFocusManagerState(null)}},[r,B,f,y,b,h,N]),Jt(()=>{r||ae&&cy(ae,z)},[r,ae,z]);function Ue(ke){return r||!p||!f?null:o.jsx(kO,{ref:ke==="start"?W:se,onClick:Ne=>b(!1,Ne.nativeEvent),children:typeof p=="string"?p:"Dismiss"})}const we=!r&&F&&(f?!M:!0)&&(Q||f);return o.jsxs(o.Fragment,{children:[we&&o.jsx(x0,{"data-type":"inside",ref:Le,onFocus:ke=>{if(f){const xe=de();Ki(s[0]==="reference"?xe[0]:xe[xe.length-1])}else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(P.current=!1,su(ke,B.portalNode)){const xe=k5(N);xe?.focus()}else{var Ne;(Ne=B.beforeOutsideRef.current)==null||Ne.focus()}}}),!M&&Ue("start"),n,Ue("end"),we&&o.jsx(x0,{"data-type":"inside",ref:je,onFocus:ke=>{if(f)Ki(de()[0]);else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(h&&(P.current=!0),su(ke,B.portalNode)){const xe=N5(N);xe?.focus()}else{var Ne;(Ne=B.afterOutsideRef.current)==null||Ne.focus()}}})]})}function uy(e){return fn(e.target)&&e.target.tagName==="BUTTON"}function NO(e){return fn(e.target)&&e.target.tagName==="A"}function dy(e){return y5(e)}function Vu(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:i}}=e,{enabled:l=!0,event:u="click",toggle:d=!0,ignoreMouse:f=!1,keyboardHandlers:p=!0,stickIfOpen:h=!0}=t,x=w.useRef(),v=w.useRef(!1),y=w.useMemo(()=>({onPointerDown(b){x.current=b.pointerType},onMouseDown(b){const j=x.current;b.button===0&&u!=="click"&&(Ub(j)&&f||(n&&d&&(!(s.current.openEvent&&h)||s.current.openEvent.type==="mousedown")?r(!1,b.nativeEvent,"click"):(b.preventDefault(),r(!0,b.nativeEvent,"click"))))},onClick(b){const j=x.current;if(u==="mousedown"&&x.current){x.current=void 0;return}Ub(j)&&f||(n&&d&&(!(s.current.openEvent&&h)||s.current.openEvent.type==="click")?r(!1,b.nativeEvent,"click"):r(!0,b.nativeEvent,"click"))},onKeyDown(b){x.current=void 0,!(b.defaultPrevented||!p||uy(b))&&(b.key===" "&&!dy(i)&&(b.preventDefault(),v.current=!0),!NO(b)&&b.key==="Enter"&&r(!(n&&d),b.nativeEvent,"click"))},onKeyUp(b){b.defaultPrevented||!p||uy(b)||dy(i)||b.key===" "&&v.current&&(v.current=!1,r(!(n&&d),b.nativeEvent,"click"))}}),[s,i,u,f,p,r,n,h,d]);return w.useMemo(()=>l?{reference:y}:{},[l,y])}const CO={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},SO={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},fy=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Hu(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:i}=e,{enabled:l=!0,escapeKey:u=!0,outsidePress:d=!0,outsidePressEvent:f="pointerdown",referencePress:p=!1,referencePressEvent:h="pointerdown",ancestorScroll:x=!1,bubbles:v,capture:y}=t,b=lm(),j=Sn(typeof d=="function"?d:()=>!1),S=typeof d=="function"?j:d,N=w.useRef(!1),{escapeKey:k,outsidePress:T}=fy(v),{escapeKey:E,outsidePress:O}=fy(y),M=w.useRef(!1),L=Sn(H=>{var B;if(!n||!l||!u||H.key!=="Escape"||M.current)return;const W=(B=i.current.floatingContext)==null?void 0:B.nodeId,se=b?na(b.nodesRef.current,W):[];if(!k&&(H.stopPropagation(),se.length>0)){let P=!0;if(se.forEach(J=>{var ne;if((ne=J.context)!=null&&ne.open&&!J.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,pT(H)?H.nativeEvent:H,"escape-key")}),F=Sn(H=>{var B;const W=()=>{var se;L(H),(se=Yo(H))==null||se.removeEventListener("keydown",W)};(B=Yo(H))==null||B.addEventListener("keydown",W)}),U=Sn(H=>{var B;const W=i.current.insideReactTree;i.current.insideReactTree=!1;const se=N.current;if(N.current=!1,f==="click"&&se||W||typeof S=="function"&&!S(H))return;const P=Yo(H),J="["+gu("inert")+"]",ne=zr(s.floating).querySelectorAll(J);let $=Qt(P)?P:null;for(;$&&!uo($);){const de=po($);if(uo(de)||!Qt(de))break;$=de}if(ne.length&&Qt(P)&&!fT(P)&&!ur(P,s.floating)&&Array.from(ne).every(de=>!ur($,de)))return;if(fn(P)&&X){const de=uo(P),ge=Wr(P),ve=/auto|scroll/,Le=de||ve.test(ge.overflowX),je=de||ve.test(ge.overflowY),Ue=Le&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,we=je&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,ke=ge.direction==="rtl",Ne=we&&(ke?H.offsetX<=P.offsetWidth-P.clientWidth:H.offsetX>P.clientWidth),xe=Ue&&H.offsetY>P.clientHeight;if(Ne||xe)return}const Q=(B=i.current.floatingContext)==null?void 0:B.nodeId,ae=b&&na(b.nodesRef.current,Q).some(de=>{var ge;return Th(H,(ge=de.context)==null?void 0:ge.elements.floating)});if(Th(H,s.floating)||Th(H,s.domReference)||ae)return;const ie=b?na(b.nodesRef.current,Q):[];if(ie.length>0){let de=!0;if(ie.forEach(ge=>{var ve;if((ve=ge.context)!=null&&ve.open&&!ge.context.dataRef.current.__outsidePressBubbles){de=!1;return}}),!de)return}r(!1,H,"outside-press")}),z=Sn(H=>{var B;const W=()=>{var se;U(H),(se=Yo(H))==null||se.removeEventListener(f,W)};(B=Yo(H))==null||B.addEventListener(f,W)});w.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=k,i.current.__outsidePressBubbles=T;let H=-1;function B(ne){r(!1,ne,"ancestor-scroll")}function W(){window.clearTimeout(H),M.current=!0}function se(){H=window.setTimeout(()=>{M.current=!1},rm()?5:0)}const P=zr(s.floating);u&&(P.addEventListener("keydown",E?F:L,E),P.addEventListener("compositionstart",W),P.addEventListener("compositionend",se)),S&&P.addEventListener(f,O?z:U,O);let J=[];return x&&(Qt(s.domReference)&&(J=li(s.domReference)),Qt(s.floating)&&(J=J.concat(li(s.floating))),!Qt(s.reference)&&s.reference&&s.reference.contextElement&&(J=J.concat(li(s.reference.contextElement)))),J=J.filter(ne=>{var $;return ne!==(($=P.defaultView)==null?void 0:$.visualViewport)}),J.forEach(ne=>{ne.addEventListener("scroll",B,{passive:!0})}),()=>{u&&(P.removeEventListener("keydown",E?F:L,E),P.removeEventListener("compositionstart",W),P.removeEventListener("compositionend",se)),S&&P.removeEventListener(f,O?z:U,O),J.forEach(ne=>{ne.removeEventListener("scroll",B)}),window.clearTimeout(H)}},[i,s,u,S,f,n,r,x,l,k,T,L,E,F,U,O,z]),w.useEffect(()=>{i.current.insideReactTree=!1},[i,S,f]);const V=w.useMemo(()=>({onKeyDown:L,...p&&{[CO[h]]:H=>{r(!1,H.nativeEvent,"reference-press")},...h!=="click"&&{onClick(H){r(!1,H.nativeEvent,"reference-press")}}}}),[L,r,p,h]),X=w.useMemo(()=>{function H(B){B.button===0&&(N.current=!0)}return{onKeyDown:L,onMouseDown:H,onMouseUp:H,[SO[f]]:()=>{i.current.insideReactTree=!0}}},[L,f,i]);return w.useMemo(()=>l?{reference:V,floating:X}:{},[l,V,X])}function EO(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=f2(),i=w.useRef({}),[l]=w.useState(()=>mO()),u=m2()!=null,[d,f]=w.useState(r.reference),p=Sn((v,y,b)=>{i.current.openEvent=v?y:void 0,l.emit("openchange",{open:v,event:y,reason:b,nested:u}),n?.(v,y,b)}),h=w.useMemo(()=>({setPositionReference:f}),[]),x=w.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return w.useMemo(()=>({dataRef:i,open:t,onOpenChange:p,elements:x,events:l,floatingId:s,refs:h}),[t,p,x,l,s,h])}function Zu(e){e===void 0&&(e={});const{nodeId:t}=e,n=EO({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[i,l]=w.useState(null),[u,d]=w.useState(null),p=s?.domReference||i,h=w.useRef(null),x=lm();Jt(()=>{p&&(h.current=p)},[p]);const v=iO({...e,elements:{...s,...u&&{reference:u}}}),y=w.useCallback(k=>{const T=Qt(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;d(T),v.refs.setReference(T)},[v.refs]),b=w.useCallback(k=>{(Qt(k)||k===null)&&(h.current=k,l(k)),(Qt(v.refs.reference.current)||v.refs.reference.current===null||k!==null&&!Qt(k))&&v.refs.setReference(k)},[v.refs]),j=w.useMemo(()=>({...v.refs,setReference:b,setPositionReference:y,domReference:h}),[v.refs,b,y]),S=w.useMemo(()=>({...v.elements,domReference:p}),[v.elements,p]),N=w.useMemo(()=>({...v,...r,refs:j,elements:S,nodeId:t}),[v,j,S,t,r]);return Jt(()=>{r.dataRef.current.floatingContext=N;const k=x?.nodesRef.current.find(T=>T.id===t);k&&(k.context=N)}),w.useMemo(()=>({...v,context:N,refs:j,elements:S}),[v,j,S,N])}function Rh(e,t,n){const r=new Map,s=n==="item";let i=e;if(s&&e){const{[Yb]:l,[Xb]:u,...d}=e;i=d}return{...n==="floating"&&{tabIndex:-1,[lO]:""},...i,...t.map(l=>{const u=l?l[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((l,u)=>(u&&Object.entries(u).forEach(d=>{let[f,p]=d;if(!(s&&[Yb,Xb].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof p=="function"){var h;(h=r.get(f))==null||h.push(p),l[f]=function(){for(var x,v=arguments.length,y=new Array(v),b=0;bj(...y)).find(j=>j!==void 0)}}}else l[f]=p}),l),{})}}function Wu(e){e===void 0&&(e=[]);const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),s=w.useCallback(u=>Rh(u,e,"reference"),t),i=w.useCallback(u=>Rh(u,e,"floating"),n),l=w.useCallback(u=>Rh(u,e,"item"),r);return w.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:l}),[s,i,l])}const TO="Escape";function cm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function _f(e,t){return cm(t,e===P5||e===am,e===Uu||e===zu)}function Ph(e,t,n){return cm(t,e===am,n?e===Uu:e===zu)||e==="Enter"||e===" "||e===""}function my(e,t,n){return cm(t,n?e===Uu:e===zu,e===am)}function py(e,t,n,r){const s=n?e===zu:e===Uu,i=e===P5;return t==="both"||t==="horizontal"&&r&&r>1?e===TO:cm(t,s,i)}function D5(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:i}=e,{listRef:l,activeIndex:u,onNavigate:d=()=>{},enabled:f=!0,selectedIndex:p=null,allowEscape:h=!1,loop:x=!1,nested:v=!1,rtl:y=!1,virtual:b=!1,focusItemOnOpen:j="auto",focusItemOnHover:S=!0,openOnArrowKeyDown:N=!0,disabledIndices:k=void 0,orientation:T="vertical",parentOrientation:E,cols:O=1,scrollItemIntoView:M=!0,virtualItemRef:L,itemSizes:F,dense:U=!1}=t,z=h0(s.floating),V=Ls(z),X=m2(),H=lm();Jt(()=>{e.dataRef.current.orientation=T},[e,T]);const B=Sn(()=>{d(P.current===-1?null:P.current)}),W=ng(s.domReference),se=w.useRef(j),P=w.useRef(p??-1),J=w.useRef(null),ne=w.useRef(!0),$=w.useRef(B),Q=w.useRef(!!s.floating),ae=w.useRef(n),ie=w.useRef(!1),de=w.useRef(!1),ge=Ls(k),ve=Ls(n),Le=Ls(M),je=Ls(p),[Ue,we]=w.useState(),[ke,Ne]=w.useState(),xe=Sn(()=>{function Ce(Oe){if(b){var He;(He=Oe.id)!=null&&He.endsWith("-fui-option")&&(Oe.id=i+"-"+Math.random().toString(16).slice(2,10)),we(Oe.id),H?.events.emit("virtualfocus",Oe),L&&(L.current=Oe)}else Ki(Oe,{sync:ie.current,preventScroll:!0})}const Te=l.current[P.current],Y=de.current;Te&&Ce(Te),(ie.current?Oe=>Oe():requestAnimationFrame)(()=>{const Oe=l.current[P.current]||Te;if(!Oe)return;Te||Ce(Oe);const He=Le.current;He&&et&&(Y||!ne.current)&&(Oe.scrollIntoView==null||Oe.scrollIntoView(typeof He=="boolean"?{block:"nearest",inline:"nearest"}:He))})});Jt(()=>{f&&(n&&s.floating?se.current&&p!=null&&(de.current=!0,P.current=p,B()):Q.current&&(P.current=-1,$.current()))},[f,n,s.floating,p,B]),Jt(()=>{if(f&&n&&s.floating)if(u==null){if(ie.current=!1,je.current!=null)return;if(Q.current&&(P.current=-1,xe()),(!ae.current||!Q.current)&&se.current&&(J.current!=null||se.current===!0&&J.current==null)){let Ce=0;const Te=()=>{l.current[0]==null?(Ce<2&&(Ce?requestAnimationFrame:queueMicrotask)(Te),Ce++):(P.current=J.current==null||Ph(J.current,T,y)||v?Oh(l,ge.current):zb(l,ge.current),J.current=null,B())};Te()}}else ru(l,u)||(P.current=u,xe(),de.current=!1)},[f,n,s.floating,u,je,v,l,T,y,B,xe,ge]),Jt(()=>{var Ce;if(!f||s.floating||!H||b||!Q.current)return;const Te=H.nodesRef.current,Y=(Ce=Te.find(He=>He.id===X))==null||(Ce=Ce.context)==null?void 0:Ce.elements.floating,Se=Qo(zr(s.floating)),Oe=Te.some(He=>He.context&&ur(He.context.elements.floating,Se));Y&&!Oe&&ne.current&&Y.focus({preventScroll:!0})},[f,s.floating,H,X,b]),Jt(()=>{if(!f||!H||!b||X)return;function Ce(Te){Ne(Te.id),L&&(L.current=Te)}return H.events.on("virtualfocus",Ce),()=>{H.events.off("virtualfocus",Ce)}},[f,H,b,X,L]),Jt(()=>{$.current=B,ae.current=n,Q.current=!!s.floating}),Jt(()=>{n||(J.current=null,se.current=j)},[n,j]);const Re=u!=null,et=w.useMemo(()=>{function Ce(Y){if(!ve.current)return;const Se=l.current.indexOf(Y);Se!==-1&&P.current!==Se&&(P.current=Se,B())}return{onFocus(Y){let{currentTarget:Se}=Y;ie.current=!0,Ce(Se)},onClick:Y=>{let{currentTarget:Se}=Y;return Se.focus({preventScroll:!0})},onMouseMove(Y){let{currentTarget:Se}=Y;ie.current=!0,de.current=!1,S&&Ce(Se)},onPointerLeave(Y){let{pointerType:Se}=Y;if(!(!ne.current||Se==="touch")&&(ie.current=!0,!!S&&(P.current=-1,B(),!b))){var Oe;(Oe=V.current)==null||Oe.focus({preventScroll:!0})}}}},[ve,V,S,l,B,b]),Ve=w.useCallback(()=>{var Ce;return E??(H==null||(Ce=H.nodesRef.current.find(Te=>Te.id===X))==null||(Ce=Ce.context)==null||(Ce=Ce.dataRef)==null?void 0:Ce.current.orientation)},[X,H,E]),st=Sn(Ce=>{if(ne.current=!1,ie.current=!0,Ce.which===229||!ve.current&&Ce.currentTarget===V.current)return;if(v&&py(Ce.key,T,y,O)){_f(Ce.key,Ve())||Nn(Ce),r(!1,Ce.nativeEvent,"list-navigation"),fn(s.domReference)&&(b?H?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const Te=P.current,Y=Oh(l,k),Se=zb(l,k);if(W||(Ce.key==="Home"&&(Nn(Ce),P.current=Y,B()),Ce.key==="End"&&(Nn(Ce),P.current=Se,B())),O>1){const Oe=F||Array.from({length:l.current.length},()=>({width:1,height:1})),He=wT(Oe,O,U),at=He.findIndex(pt=>pt!=null&&!Zf(l,pt,k)),Et=He.reduce((pt,ln,gr)=>ln!=null&&!Zf(l,ln,k)?gr:pt,-1),mt=He[yT({current:He.map(pt=>pt!=null?l.current[pt]:null)},{event:Ce,orientation:T,loop:x,rtl:y,cols:O,disabledIndices:jT([...(typeof k!="function"?k:null)||l.current.map((pt,ln)=>Zf(l,ln,k)?ln:void 0),void 0],He),minIndex:at,maxIndex:Et,prevIndex:_T(P.current>Se?Y:P.current,Oe,He,O,Ce.key===am?"bl":Ce.key===(y?Uu:zu)?"tr":"tl"),stopEvent:!0})];if(mt!=null&&(P.current=mt,B()),T==="both")return}if(_f(Ce.key,T)){if(Nn(Ce),n&&!b&&Qo(Ce.currentTarget.ownerDocument)===Ce.currentTarget){P.current=Ph(Ce.key,T,y)?Y:Se,B();return}Ph(Ce.key,T,y)?x?P.current=Te>=Se?h&&Te!==l.current.length?-1:Y:Dn(l,{startingIndex:Te,disabledIndices:k}):P.current=Math.min(Se,Dn(l,{startingIndex:Te,disabledIndices:k})):x?P.current=Te<=Y?h&&Te!==-1?l.current.length:Se:Dn(l,{startingIndex:Te,decrement:!0,disabledIndices:k}):P.current=Math.max(Y,Dn(l,{startingIndex:Te,decrement:!0,disabledIndices:k})),ru(l,P.current)&&(P.current=-1),B()}}),Ie=w.useMemo(()=>b&&n&&Re&&{"aria-activedescendant":ke||Ue},[b,n,Re,ke,Ue]),_e=w.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...W?{}:Ie,onKeyDown:st,onPointerMove(){ne.current=!0}}),[Ie,st,T,W]),be=w.useMemo(()=>{function Ce(Y){j==="auto"&&w5(Y.nativeEvent)&&(se.current=!0)}function Te(Y){se.current=j,j==="auto"&&_5(Y.nativeEvent)&&(se.current=!0)}return{...Ie,onKeyDown(Y){ne.current=!1;const Se=Y.key.startsWith("Arrow"),Oe=["Home","End"].includes(Y.key),He=Se||Oe,at=my(Y.key,T,y),Et=py(Y.key,T,y,O),mt=my(Y.key,Ve(),y),pt=_f(Y.key,T),ln=(v?mt:pt)||Y.key==="Enter"||Y.key.trim()==="";if(b&&n){const qt=H?.nodesRef.current.find(tr=>tr.parentId==null),jt=H&&qt?mT(H.nodesRef.current,qt.id):null;if(He&&jt&&L){const tr=new KeyboardEvent("keydown",{key:Y.key,bubbles:!0});if(at||Et){var gr,Gr;const xs=((gr=jt.context)==null?void 0:gr.elements.domReference)===Y.currentTarget,tn=Et&&!xs?(Gr=jt.context)==null?void 0:Gr.elements.domReference:at?l.current.find(Un=>Un?.id===Ue):null;tn&&(Nn(Y),tn.dispatchEvent(tr),Ne(void 0))}if((pt||Oe)&&jt.context&&jt.context.open&&jt.parentId&&Y.currentTarget!==jt.context.elements.domReference){var gs;Nn(Y),(gs=jt.context.elements.domReference)==null||gs.dispatchEvent(tr);return}}return st(Y)}if(!(!n&&!N&&Se)){if(ln){const qt=_f(Y.key,Ve());J.current=v&&qt?null:Y.key}if(v){mt&&(Nn(Y),n?(P.current=Oh(l,ge.current),B()):r(!0,Y.nativeEvent,"list-navigation"));return}pt&&(p!=null&&(P.current=p),Nn(Y),!n&&N?r(!0,Y.nativeEvent,"list-navigation"):st(Y),n&&B())}},onFocus(){n&&!b&&(P.current=-1,B())},onPointerDown:Te,onPointerEnter:Te,onMouseDown:Ce,onClick:Ce}},[Ue,Ie,O,st,ge,j,l,v,B,r,n,N,T,Ve,y,p,H,b,L]);return w.useMemo(()=>f?{reference:be,floating:_e,item:et}:{},[f,be,_e,et])}const OO=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qu(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:i,floatingId:l}=e,{enabled:u=!0,role:d="dialog"}=t,f=f2(),p=((n=i.domReference)==null?void 0:n.id)||f,h=w.useMemo(()=>{var N;return((N=h0(i.floating))==null?void 0:N.id)||l},[i.floating,l]),x=(r=OO.get(d))!=null?r:d,y=m2()!=null,b=w.useMemo(()=>x==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:s?h:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":x==="alertdialog"?"dialog":x,"aria-controls":s?h:void 0,...x==="listbox"&&{role:"combobox"},...x==="menu"&&{id:p},...x==="menu"&&y&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[x,h,y,s,p,d]),j=w.useMemo(()=>{const N={id:h,...x&&{role:x}};return x==="tooltip"||d==="label"?N:{...N,...x==="menu"&&{"aria-labelledby":p}}},[x,h,p,d]),S=w.useCallback(N=>{let{active:k,selected:T}=N;const E={role:"option",...k&&{id:h+"-fui-option"}};switch(d){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[h,d]);return w.useMemo(()=>u?{reference:b,floating:j,item:S}:{},[u,b,j,S])}function MO(e,t){var n;const{open:r,dataRef:s}=e,{listRef:i,activeIndex:l,onMatch:u,onTypingChange:d,enabled:f=!0,findMatch:p=null,resetMs:h=750,ignoreKeys:x=[],selectedIndex:v=null}=t,y=w.useRef(-1),b=w.useRef(""),j=w.useRef((n=v??l)!=null?n:-1),S=w.useRef(null),N=Sn(u),k=Sn(d),T=Ls(p),E=Ls(x);Jt(()=>{r&&(rg(y),S.current=null,b.current="")},[r]),Jt(()=>{if(r&&b.current===""){var U;j.current=(U=v??l)!=null?U:-1}},[r,v,l]);const O=Sn(U=>{U?s.current.typing||(s.current.typing=U,k(U)):s.current.typing&&(s.current.typing=U,k(U))}),M=Sn(U=>{function z(W,se,P){const J=T.current?T.current(se,P):se.find(ne=>ne?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return J?W.indexOf(J):-1}const V=i.current;if(b.current.length>0&&b.current[0]!==" "&&(z(V,V,b.current)===-1?O(!1):U.key===" "&&Nn(U)),V==null||E.current.includes(U.key)||U.key.length!==1||U.ctrlKey||U.metaKey||U.altKey)return;r&&U.key!==" "&&(Nn(U),O(!0)),V.every(W=>{var se,P;return W?((se=W[0])==null?void 0:se.toLocaleLowerCase())!==((P=W[1])==null?void 0:P.toLocaleLowerCase()):!0})&&b.current===U.key&&(b.current="",j.current=S.current),b.current+=U.key,rg(y),y.current=window.setTimeout(()=>{b.current="",j.current=S.current,O(!1)},h);const H=j.current,B=z(V,[...V.slice((H||0)+1),...V.slice(0,(H||0)+1)],b.current);B!==-1?(N(B),S.current=B):U.key!==" "&&(b.current="",O(!1))}),L=w.useMemo(()=>({onKeyDown:M}),[M]),F=w.useMemo(()=>({onKeyDown:M,onKeyUp(U){U.key===" "&&O(!1)}}),[M,O]);return w.useMemo(()=>f?{reference:L,floating:F}:{},[f,L,F])}const ri={chatFab:60,chatWindow:61,popover:9e3,modal:1e4,modalStep:10,popoverOverModalOffset:5},Xo=[],sg=new Set,vl=[];let bl=null;function hy(){for(const e of sg)e()}function B5(e){return sg.add(e),()=>{sg.delete(e)}}function v0(){return Xo.join("\0")}function U5(e){if(e.defaultPrevented||e.key!=="Escape"||e.isComposing||e.keyCode===229)return;const t=vl[vl.length-1];t&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),t.onEscape())}function AO(){bl||typeof document>"u"||(bl=document,bl.addEventListener("keydown",U5))}function LO(e){const t=vl.findIndex(n=>n.id===e);t!==-1&&vl.splice(t,1),vl.length===0&&bl&&(bl.removeEventListener("keydown",U5),bl=null)}function RO(e){const t=w.useId();w.useSyncExternalStore(B5,v0,v0),w.useEffect(()=>{if(e)return Xo.push(t),hy(),()=>{const r=Xo.indexOf(t);r!==-1&&Xo.splice(r,1),hy()}},[e,t]);const n=Xo.indexOf(t);return{isTop:n!==-1&&n===Xo.length-1,depth:n===-1?0:n}}function wo(e,t,n=!0){const r=w.useId(),s=w.useRef(t);s.current=t,w.useEffect(()=>{if(!(!e||!n))return AO(),vl.push({id:r,onEscape:()=>s.current()}),()=>LO(r)},[n,r,e])}function xa(){return w.useSyncExternalStore(B5,v0,v0),Xo.length===0?ri.popover:ri.modal+(Xo.length-1)*ri.modalStep+ri.popoverOverModalOffset}const Vt=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m212.24 100.24l-80 80a6 6 0 0 1-8.48 0l-80-80a6 6 0 0 1 8.48-8.48L128 167.51l75.76-75.75a6 6 0 0 1 8.48 8.48"})}),{__source:"ph:caret-down-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"chevron-down",displayName:"UiChevronDown"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80A8 8 0 0 1 48 88h160a8 8 0 0 1 5.66 13.66"})}),{__source:"ph:caret-down-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"chevron-down",displayName:"UiChevronDownFilled"});function Fl({label:e,icon:t,hideChevron:n=!1,variant:r="outline",size:s="sm",trigger:i,items:l,children:u,header:d,footer:f,align:p="right",onOpenChange:h,title:x,menuLabel:v,className:y,menuClassName:b}){const[j,S]=w.useState(!1),[N,k]=w.useState(null),T=xa(),E=w.useRef([]),O=w.useRef(h);O.current=h,w.useEffect(()=>{var P;(P=O.current)==null||P.call(O,j)},[j]);const{refs:M,floatingStyles:L,context:F}=Zu({open:j,onOpenChange:S,placement:p==="right"?"bottom-end":"bottom-start",whileElementsMounted:$u,middleware:[Fu(4),Bu({padding:8}),Du({padding:8})]}),U=Vu(F),z=Hu(F,{escapeKey:!1}),V=qu(F,{role:"menu"}),X=D5(F,{listRef:E,activeIndex:N,onNavigate:k,loop:!0}),{getReferenceProps:H,getFloatingProps:B,getItemProps:W}=Wu([U,z,V,X]),se=()=>{S(!1),M.domReference.current instanceof HTMLElement&&M.domReference.current.focus()};return wo(j,se),o.jsxs("div",{className:R("relative inline-flex",y),children:[i?o.jsx("span",{ref:M.setReference,className:"inline-flex","aria-haspopup":"menu","aria-expanded":j,...H(),children:i}):o.jsxs(Fe,{ref:M.setReference,variant:r,size:s,title:x,"aria-haspopup":"menu","aria-expanded":j,...H(),children:[t&&o.jsx(K,{...typeof t=="string"?{name:t}:{icon:t}}),e,!n&&o.jsx(K,{icon:Vt})]}),j&&o.jsx(ha,{children:o.jsx(ga,{context:F,modal:!1,children:o.jsxs("div",{ref:M.setFloating,role:"menu","aria-label":v,style:{...L,zIndex:T},className:R("min-w-[8rem] rounded-md border border-border bg-popover py-1 shadow-md",b),...B(),children:[d!=null&&o.jsx("div",{className:"border-b border-border px-3 py-1.5",children:d}),u?u(se):l?.map((P,J)=>o.jsxs("button",{ref:ne=>{E.current[J]=ne},type:"button",role:"menuitem",tabIndex:J===N?0:-1,disabled:P.disabled,title:P.title,className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-popover-foreground hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",...W({onClick:()=>{P.onSelect(),se()},onKeyDown:ne=>{(ne.key==="Enter"||ne.key===" ")&&(ne.preventDefault(),P.onSelect(),se())}}),children:[P.icon&&o.jsx(K,{...typeof P.icon=="string"?{name:P.icon}:{icon:P.icon}}),P.label]},J)),f!=null&&o.jsx("div",{className:"border-t border-border px-3 py-1.5",children:f})]})})})]})}const Ku=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M212.24 164.24a6 6 0 0 1-8.48 0L128 88.49l-75.76 75.75a6 6 0 0 1-8.48-8.48l80-80a6 6 0 0 1 8.48 0l80 80a6 6 0 0 1 0 8.48"})}),{__source:"ph:caret-up-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"chevron-up",displayName:"UiChevronUp"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M215.39 163.06A8 8 0 0 1 208 168H48a8 8 0 0 1-5.66-13.66l80-80a8 8 0 0 1 11.32 0l80 80a8 8 0 0 1 1.73 8.72"})}),{__source:"ph:caret-up-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"chevron-up",displayName:"UiChevronUpFilled"});const Gu=w.forwardRef(function({as:t="input",value:n,onChange:r,prefix:s,suffix:i,shortcut:l,shortcutKey:u,onShortcut:d,className:f,inputClassName:p,shortcutClassName:h,type:x="text",...v},y){const b=w.useRef(null);w.useImperativeHandle(y,()=>b.current,[]);const j=u??(l?l.slice(-1).toLowerCase():void 0);return w.useEffect(()=>{if(!d||!j)return;const S=N=>{var k;(N.metaKey||N.ctrlKey)&&N.key.toLowerCase()===j.toLowerCase()&&(N.preventDefault(),d(),(k=b.current)==null||k.focus())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[j,d]),o.jsxs("div",{className:R("flex w-full gap-density-2 rounded-md border border-border bg-background px-density-2","focus-within:ring-2 focus-within:ring-ring",t==="textarea"?"min-h-control-h items-start py-density-1":"h-control-h items-center",f),children:[s&&o.jsx("span",{className:"inline-flex shrink-0 items-center",children:s}),t==="textarea"?o.jsx("textarea",{ref:b,value:n,onChange:S=>r?.(S.target.value,S),className:R("min-w-0 flex-1 resize-y border-none bg-transparent text-sm text-foreground outline-none","placeholder:text-muted-foreground",p),...v}):o.jsx("input",{ref:b,type:x,value:n,onChange:S=>r?.(S.target.value,S),className:R("min-w-0 flex-1 border-none bg-transparent text-sm text-foreground outline-none","placeholder:text-muted-foreground",x==="search"&&"[&::-webkit-search-cancel-button]:appearance-none",p),...v}),i&&o.jsx("span",{className:"inline-flex shrink-0 items-center",children:i}),l&&o.jsx("kbd",{className:R("shrink-0 rounded border border-border px-1 font-mono text-[10px] text-muted-foreground",h),children:l})]})}),PO={sm:"text-xs px-density-2 py-density-1 gap-1",md:"text-sm px-density-3 py-1.5 gap-1.5",lg:"min-h-[4.25rem] min-w-44 flex-1 px-density-3 py-density-3 gap-density-2 text-sm"};function Tr({value:e,options:t,onChange:n,size:r="md",wrap:s=!1,className:i,"aria-label":l}){const u=w.useRef([]),d=(f,p)=>{var h;const x=t.length;let v=f;for(let y=0;y{const h=f.id===e;return o.jsxs("button",{ref:x=>{u.current[p]=x},type:"button",role:"radio","aria-checked":h,title:f.title,disabled:f.disabled,tabIndex:h?0:-1,onClick:()=>!f.disabled&&n(f.id),onKeyDown:x=>{x.key==="ArrowRight"||x.key==="ArrowDown"?(x.preventDefault(),d(p,1)):(x.key==="ArrowLeft"||x.key==="ArrowUp")&&(x.preventDefault(),d(p,-1))},className:R("inline-flex items-center rounded-[5px] border border-transparent font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",r==="lg"&&"rounded-lg text-left",f.description?"whitespace-normal":"whitespace-nowrap",PO[r],h?r==="lg"?"border-primary/70 bg-primary/10 text-foreground shadow-sm ring-1 ring-primary/25":"border-border bg-card text-foreground shadow-sm":r==="lg"?"border-border bg-card text-muted-foreground hover:border-muted-foreground/40 hover:bg-card hover:text-foreground hover:shadow-sm":"text-muted-foreground hover:border-border hover:bg-background/60 hover:text-foreground"),children:[f.icon&&o.jsx(K,{...typeof f.icon=="string"?{name:f.icon}:{icon:f.icon},className:R(r==="lg"?"size-4 shrink-0":"size-3.5 shrink-0",r==="lg"&&(h?"text-primary":"text-muted-foreground"))}),o.jsxs("span",{className:R("min-w-0",r==="lg"&&"flex flex-col items-start text-left leading-tight"),children:[o.jsx("span",{className:"min-w-0 truncate",children:f.label}),f.description&&o.jsx("span",{className:R("mt-0.5 max-w-56 whitespace-normal break-words text-[11px] font-normal leading-snug",h?"text-muted-foreground":"text-muted-foreground/80"),children:f.description})]})]},f.id)})})}const $s=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m228.24 219.76l-51.38-51.38a86.15 86.15 0 1 0-8.48 8.48l51.38 51.38a6 6 0 0 0 8.48-8.48M38 112a74 74 0 1 1 74 74a74.09 74.09 0 0 1-74-74"})}),{__source:"ph:magnifying-glass-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"search",displayName:"UiSearch"});function g2({value:e,onChange:t,placeholder:n="Search…",shortcut:r="⌘K",onShortcut:s,prefix:i,className:l,...u}){return o.jsx(Gu,{type:"search",value:e,onChange:d=>t(d),placeholder:n,shortcut:r,onShortcut:s,prefix:i??o.jsx(K,{icon:$s,className:"shrink-0 text-muted-foreground"}),className:R("bg-secondary px-density-3",l),...u})}function x2({checked:e,onChange:t,disabled:n,label:r,className:s,"aria-label":i}){const l=w.useId(),u=o.jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":r?void 0:i,"aria-labelledby":r?l:void 0,disabled:n,onClick:()=>t(!e),className:R("inline-flex shrink-0 items-center rounded-full px-0.5 transition-colors","h-5 w-9 density-compact:h-4 density-compact:w-7 density-spacious:h-6 density-spacious:w-11","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",e?"justify-end bg-primary":"justify-start bg-input",!r&&s),children:o.jsx("span",{className:R("pointer-events-none rounded-full bg-background shadow transition-all","h-4 w-4 density-compact:h-3 density-compact:w-3 density-spacious:h-5 density-spacious:w-5")})});return r?o.jsxs("label",{className:R("inline-flex cursor-pointer items-center gap-density-2",s),children:[u,o.jsx("span",{id:l,className:"text-sm text-foreground",children:r})]}):u}const og=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M245.48 125.57c-.34-.78-8.66-19.23-27.24-37.81C201 70.54 171.38 50 128 50S55 70.54 37.76 87.76c-18.58 18.58-26.9 37-27.24 37.81a6 6 0 0 0 0 4.88c.34.77 8.66 19.22 27.24 37.8C55 185.47 84.62 206 128 206s73-20.53 90.24-37.75c18.58-18.58 26.9-37 27.24-37.8a6 6 0 0 0 0-4.88M128 194c-31.38 0-58.78-11.42-81.45-33.93A134.8 134.8 0 0 1 22.69 128a134.6 134.6 0 0 1 23.86-32.06C69.22 73.42 96.62 62 128 62s58.78 11.42 81.45 33.94A134.6 134.6 0 0 1 233.31 128C226.94 140.21 195 194 128 194m0-112a46 46 0 1 0 46 46a46.06 46.06 0 0 0-46-46m0 80a34 34 0 1 1 34-34a34 34 0 0 1-34 34"})}),{__source:"ph:eye-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"eye",displayName:"UiEye"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M247.31 124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57 61.26 162.88 48 128 48S61.43 61.26 36.34 86.35C17.51 105.18 9 124 8.69 124.76a8 8 0 0 0 0 6.5c.35.79 8.82 19.57 27.65 38.4C61.43 194.74 93.12 208 128 208s66.57-13.26 91.66-38.34c18.83-18.83 27.3-37.61 27.65-38.4a8 8 0 0 0 0-6.5M128 168a40 40 0 1 1 40-40a40 40 0 0 1-40 40"})}),{__source:"ph:eye-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"eye",displayName:"UiEyeFilled"});const ou=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M180.24 147.76a6 6 0 0 1 0 8.48l-24 24a6 6 0 0 1-8.48-8.48L167.51 152l-19.75-19.76a6 6 0 1 1 8.48-8.48Zm-72-24a6 6 0 0 0-8.48 0l-24 24a6 6 0 0 0 0 8.48l24 24a6 6 0 1 0 8.48-8.48L88.49 152l19.75-19.76a6 6 0 0 0 0-8.48M214 88v128a14 14 0 0 1-14 14H56a14 14 0 0 1-14-14V40a14 14 0 0 1 14-14h96a6 6 0 0 1 4.25 1.76l56 56A6 6 0 0 1 214 88m-56-6h35.52L158 46.48Zm44 134V94h-50a6 6 0 0 1-6-6V38H56a2 2 0 0 0-2 2v176a2 2 0 0 0 2 2h144a2 2 0 0 0 2-2"})}),{__source:"ph:file-code-light",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"file-code",displayName:"UiFileCode"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m213.66 82.34l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v176a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V88a8 8 0 0 0-2.34-5.66m-104 88a8 8 0 0 1-11.32 11.32l-24-24a8 8 0 0 1 0-11.32l24-24a8 8 0 0 1 11.32 11.32L91.31 152Zm72-12.68l-24 24a8 8 0 0 1-11.32-11.32L164.69 152l-18.35-18.34a8 8 0 0 1 11.32-11.32l24 24a8 8 0 0 1 0 11.32M152 88V44l44 44Z"})}),{__source:"ph:file-code-fill",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"file-code",displayName:"UiFileCodeFilled"});const v2=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 50H32a6 6 0 0 0-6 6v136a14 14 0 0 0 14 14h176a14 14 0 0 0 14-14V56a6 6 0 0 0-6-6M38 110h44v36H38Zm56 0h124v36H94Zm124-48v36H38V62ZM38 192v-34h44v36H40a2 2 0 0 1-2-2m178 2H94v-36h124v34a2 2 0 0 1-2 2"})}),{__source:"ph:table-light",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"table",displayName:"UiTable"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 48H32a8 8 0 0 0-8 8v136a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a8 8 0 0 0-8-8M40 112h40v32H40Zm56 0h120v32H96Zm-56 48h40v32H40Zm176 32H96v-32h120z"})}),{__source:"ph:table-fill",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"table",displayName:"UiTableFilled"});const b0=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",children:[o.jsx("path",{d:"M8.5 10C8.77614 10 9 10.2239 9 10.5C9 10.7761 8.77614 11 8.5 11H5.5C5.22386 11 5 10.7761 5 10.5C5 10.2239 5.22386 10 5.5 10H8.5Z",fill:"#6C707E"}),o.jsx("path",{d:"M8.5 8C8.77614 8 9 8.22386 9 8.5C9 8.77614 8.77614 9 8.5 9H5.5C5.22386 9 5 8.77614 5 8.5C5 8.22386 5.22386 8 5.5 8H8.5Z",fill:"#6C707E"}),o.jsx("path",{d:"M8.5 6C8.77614 6 9 6.22386 9 6.5C9 6.77614 8.77614 7 8.5 7H5.5C5.22386 7 5 6.77614 5 6.5C5 6.22386 5.22386 6 5.5 6H8.5Z",fill:"#6C707E"}),o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 3C11.1046 3 12 3.89543 12 5V12L11.9893 12.2041C11.8938 13.1457 11.1457 13.8938 10.2041 13.9893L10 14H4L3.7959 13.9893C2.85435 13.8938 2.1062 13.1457 2.01074 12.2041L2 12V5C2 3.89543 2.89543 3 4 3H10ZM4 4C3.44772 4 3 4.44772 3 5V12C3 12.5523 3.44772 13 4 13H10C10.5523 13 11 12.5523 11 12V5C11 4.44772 10.5523 4 10 4H4Z",fill:"#6C707E"}),o.jsx("path",{d:"M11 1C12.6569 1 14 2.34315 14 4V10.5C14 10.7761 13.7761 11 13.5 11C13.2239 11 13 10.7761 13 10.5V4C13 2.89543 12.1046 2 11 2H5.5C5.22386 2 5 1.77614 5 1.5C5 1.22386 5.22386 1 5.5 1H11Z",fill:"#6C707E"})]})}),{__source:"jb-expui-toolwindows:documentation",__viewBox:"0 0 16 16",__group:"uir-ast-code",__consumerName:"uir-comment",displayName:"UiComment"}),mr=Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#059669",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"m228.24 76.24l-128 128a6 6 0 0 1-8.48 0l-56-56a6 6 0 0 1 8.48-8.48L96 191.51L219.76 67.76a6 6 0 0 1 8.48 8.48"})})},{__source:"ph:check-light",__viewBox:"0 0 256 256",__group:"approval-review",__consumerName:"check",__defaultColor:"#059669",displayName:"UiCheck"});Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#059669",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m45.66 85.66l-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 11.32"})})},{__source:"ph:check-circle-fill",__viewBox:"0 0 256 256",__group:"approval-review",__consumerName:"check",__defaultColor:"#059669",displayName:"UiCheckFilled"});const b2=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 34h-26V24a6 6 0 0 0-12 0v10H86V24a6 6 0 0 0-12 0v10H48a14 14 0 0 0-14 14v160a14 14 0 0 0 14 14h160a14 14 0 0 0 14-14V48a14 14 0 0 0-14-14M48 46h26v10a6 6 0 0 0 12 0V46h84v10a6 6 0 0 0 12 0V46h26a2 2 0 0 1 2 2v34H46V48a2 2 0 0 1 2-2m160 164H48a2 2 0 0 1-2-2V94h164v114a2 2 0 0 1-2 2m-98-90v64a6 6 0 0 1-12 0v-54.29l-7.32 3.66a6 6 0 1 1-5.36-10.74l16-8A6 6 0 0 1 110 120m59.57 29.25L148 178h20a6 6 0 0 1 0 12h-32a6 6 0 0 1-4.8-9.6L160 142a10 10 0 1 0-16.65-11a6 6 0 1 1-10.35-6a22 22 0 1 1 36.62 24.26Z"})}),{__source:"ph:calendar-light",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"calendar",displayName:"UiCalendar"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 32h-24v-8a8 8 0 0 0-16 0v8H88v-8a8 8 0 0 0-16 0v8H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m-96 152a8 8 0 0 1-16 0v-51.06l-4.42 2.22a8 8 0 0 1-7.16-14.32l16-8A8 8 0 0 1 112 120Zm56-8a8 8 0 0 1 0 16h-32a8 8 0 0 1-6.4-12.8l28.78-38.37a8 8 0 1 0-13.31-8.83a8 8 0 1 1-13.85-8A24 24 0 0 1 176 136a23.76 23.76 0 0 1-4.84 14.45L152 176ZM48 80V48h24v8a8 8 0 0 0 16 0v-8h80v8a8 8 0 0 0 16 0v-8h24v32Z"})}),{__source:"ph:calendar-fill",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"calendar",displayName:"UiCalendarFilled"});const um=w.forwardRef(({value:e="",onChange:t,className:n,inputClassName:r,buttonClassName:s,openButtonLabel:i="Open time picker",suffix:l,prefix:u,...d},f)=>{const p=w.useRef(null),h=w.useRef(null);function x(v){p.current=v,typeof f=="function"?f(v):f&&(f.current=v)}return o.jsxs("div",{"data-jsf-control":!0,className:R("relative",n),children:[u&&o.jsx("div",{className:"absolute inset-y-0 left-1.5 flex items-center",children:u}),o.jsx("input",{...d,ref:x,type:"text",value:e,className:R("h-8 w-full rounded-md border border-input bg-background px-2 pr-8 text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",u&&"pl-8",r),onChange:v=>t?.(v.target.value)}),o.jsx("input",{ref:h,type:"datetime-local",tabIndex:-1,"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0",value:IO(e),onChange:v=>t?.(v.target.value)}),l&&o.jsx("div",{className:"absolute inset-y-0 right-7 flex items-center",children:l}),o.jsx("button",{type:"button","aria-label":i,disabled:d.disabled,className:R("absolute inset-y-0 right-1 inline-flex items-center text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),onClick:()=>{var v,y,b;(v=p.current)==null||v.focus(),(b=(y=h.current)==null?void 0:y.showPicker)==null||b.call(y)},children:o.jsx(K,{icon:b2,className:"text-sm"})})]})});um.displayName="DateTimePicker";function IO(e){const t=e.trim();if(!t||t==="now"||t.startsWith("now"))return"";const n=/^\d{4}-\d{2}-\d{2}$/.test(t)?`${t}T00:00`:t;return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(n)?n.slice(0,16):""}const z5=w.forwardRef(({className:e,options:t,placeholder:n,children:r,...s},i)=>o.jsxs("div",{className:"relative inline-flex w-full items-center",children:[o.jsxs("select",{ref:i,className:R("h-control-h w-full appearance-none rounded-md border border-input bg-background px-control-px pr-8 text-sm text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1","disabled:cursor-not-allowed disabled:opacity-50",e),...s,children:[n!==void 0&&o.jsx("option",{value:"",disabled:!0,children:n}),t?t.map(l=>o.jsx("option",{value:l.value,disabled:l.disabled,children:l.label},l.value)):r]}),o.jsx(K,{icon:Vt,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground"})]}));z5.displayName="Select";const $O=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 42a94 94 0 1 0 94 94a94.11 94.11 0 0 0-94-94m0 176a82 82 0 1 1 82-82a82.1 82.1 0 0 1-82 82m44.24-126.24a6 6 0 0 1 0 8.48l-40 40a6 6 0 1 1-8.48-8.48l40-40a6 6 0 0 1 8.48 0M98 16a6 6 0 0 1 6-6h48a6 6 0 0 1 0 12h-48a6 6 0 0 1-6-6"})}),{__source:"ph:timer-light",__viewBox:"0 0 256 256",__group:"time",__consumerName:"watch",displayName:"UiWatch"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 40a96 96 0 1 0 96 96a96.11 96.11 0 0 0-96-96m45.66 61.66l-40 40a8 8 0 0 1-11.32-11.32l40-40a8 8 0 0 1 11.32 11.32M96 16a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16h-48a8 8 0 0 1-8-8"})}),{__source:"ph:timer-fill",__viewBox:"0 0 256 256",__group:"time",__consumerName:"watch",displayName:"UiWatchFilled"});const V5=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m220.24 132.24l-72 72a6 6 0 0 1-8.48-8.48L201.51 134H40a6 6 0 0 1 0-12h161.51l-61.75-61.76a6 6 0 0 1 8.48-8.48l72 72a6 6 0 0 1 0 8.48"})}),{__source:"ph:arrow-right-light",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"arrow-right",displayName:"UiArrowRight"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m221.66 133.66l-72 72A8 8 0 0 1 136 200v-64H40a8 8 0 0 1 0-16h96V56a8 8 0 0 1 13.66-5.66l72 72a8 8 0 0 1 0 11.32"})}),{__source:"ph:arrow-right-fill",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"arrow-right",displayName:"UiArrowRightFilled"});const Tn=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M204.24 195.76a6 6 0 1 1-8.48 8.48L128 136.49l-67.76 67.75a6 6 0 0 1-8.48-8.48L119.51 128L51.76 60.24a6 6 0 0 1 8.48-8.48L128 119.51l67.76-67.75a6 6 0 0 1 8.48 8.48L136.49 128Z"})}),{__source:"ph:x-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"close",displayName:"UiClose"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m-26.34 138.34a8 8 0 0 1-11.32 11.32L128 139.31l-42.34 42.35a8 8 0 0 1-11.32-11.32L116.69 128L74.34 85.66a8 8 0 0 1 11.32-11.32L128 116.69l42.34-42.35a8 8 0 0 1 11.32 11.32L139.31 128Z"})}),{__source:"ph:x-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"close",displayName:"UiCloseFilled"});const qc=[{id:"minutes",label:"Min",chips:[{label:"5m",token:"now-5m"},{label:"15m",token:"now-15m"},{label:"30m",token:"now-30m"}]},{id:"hours",label:"Hr",chips:[{label:"1h",token:"now-1h"},{label:"2h",token:"now-2h"},{label:"4h",token:"now-4h"},{label:"8h",token:"now-8h"},{label:"12h",token:"now-12h"}]},{id:"days",label:"Day",chips:[{label:"1d",token:"now-1d"},{label:"2d",token:"now-2d"},{label:"3d",token:"now-3d"},{label:"1w",token:"now-1w"}]},{id:"weeks",label:"Wk+",chips:[{label:"2w",token:"now-2w"},{label:"1M",token:"now-1M"},{label:"3M",token:"now-3M"},{label:"6M",token:"now-6M"},{label:"1y",token:"now-1y"}]}],FO={min:qc[0],hr:qc[1],day:qc[2],"wk+":qc[3]},DO=[{id:"days",label:"Day",chips:[{label:"1d",token:"now-1d"},{label:"2d",token:"now-2d"},{label:"3d",token:"now-3d"},{label:"7d",token:"now-7d"}]},{id:"weeks",label:"Wk",chips:[{label:"1w",token:"now-1w"},{label:"2w",token:"now-2w"},{label:"4w",token:"now-4w"}]},{id:"months",label:"Mo",chips:[{label:"1M",token:"now-1M"},{label:"3M",token:"now-3M"},{label:"6M",token:"now-6M"},{label:"1y",token:"now-1y"}]}],BO={this:{id:"this",label:"This",chips:[{label:"Week",token:"now/w",to:"now/w+1w",ariaLabel:"this week"},{label:"Month",token:"now/M",to:"now/M+1M",ariaLabel:"this month"},{label:"Quarter",token:"now/q",to:"now/q+1q",ariaLabel:"this quarter"},{label:"Year",token:"now/y",to:"now/y+1y",ariaLabel:"this year"}]},last:{id:"last",label:"Last",chips:[{label:"Week",token:"now/w-1w",to:"now/w",ariaLabel:"last week"},{label:"Month",token:"now/M-1M",to:"now/M",ariaLabel:"last month"},{label:"Quarter",token:"now/q-1q",to:"now/q",ariaLabel:"last quarter"},{label:"Year",token:"now/y-1y",to:"now/y",ariaLabel:"last year"}]}};function y2({kind:e="time",label:t="Time range",from:n="",to:r="",onApply:s,presets:i,chipRows:l,timeEnabled:u=!1,timeZone:d,timeZones:f,fromPlaceholder:p,toPlaceholder:h,emptyLabel:x,align:v="right",disabled:y=!1,className:b,triggerClassName:j,panelClassName:S}){const[N,k]=w.useState(!1),[T,E]=w.useState(n),[O,M]=w.useState(r),L=d??H5(),[F,U]=w.useState(L),z=JO(f,F),{rows:V,presets:X}=UO(e,i,l),H=xa(),{refs:B,floatingStyles:W,context:se}=Zu({open:N,onOpenChange:k,placement:v==="left"?"bottom-start":"bottom-end",whileElementsMounted:$u,middleware:[Fu(6),Bu({padding:8}),Du({padding:8})]}),{getReferenceProps:P,getFloatingProps:J}=Wu([Vu(se),Hu(se,{escapeKey:!1}),qu(se,{role:"dialog"})]);wo(N,()=>{k(!1),B.domReference.current instanceof HTMLElement&&B.domReference.current.focus()}),w.useEffect(()=>{N&&(E(n),M(r),U(L))},[n,N,L,r]);const ne=qO(n,r,V,X)??GO(e,n,r,x),$=iu(e,n,{timeEnabled:u,timeZone:F});function Q(ie,de){s(iu(e,ie,{timeEnabled:u,timeZone:F}),iu(e,de,{timeEnabled:u,timeZone:F})),k(!1)}function ae(){E(""),M(""),s("",""),k(!1)}return o.jsxs("div",{className:R("inline-flex",b),children:[o.jsxs(Fe,{ref:B.setReference,type:"button",variant:"outline",size:"sm","aria-label":`${t} filter`,disabled:y,className:R("h-7 w-fit max-w-[12rem] min-w-0 gap-2 px-2 text-xs font-normal",j),...P(),children:[o.jsx(K,{icon:e==="time"?$O:b2,className:"text-muted-foreground text-[14px]"}),o.jsx("span",{className:"truncate font-normal tabular-nums",children:ne})]}),N&&o.jsx(ha,{children:o.jsx(ga,{context:se,modal:!1,children:o.jsxs("div",{ref:B.setFloating,role:"dialog","aria-label":t,style:{...W,zIndex:H},className:R("flex max-h-[min(32rem,calc(100vh-2rem))] w-[22.5rem] max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg shadow-black/10 outline-none",S),...J(),children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-border/60 px-3.5 py-2.5",children:[o.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:t}),o.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:u?F:"Relative"})]}),o.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[V.length>0&&o.jsx(ZO,{rows:V,activeToken:$,onApply:Q}),X.length>0&&o.jsx("div",{className:V.length>0?"px-3.5 pb-3":"px-3.5 pt-3",children:o.jsx(WO,{presets:X,onApply:Q})}),o.jsxs("div",{className:"border-t border-border/60 bg-muted/30 px-3.5 py-2.5",children:[o.jsxs("div",{className:"mb-1.5 flex flex-wrap items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Custom"}),u&&o.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"TZ"}),o.jsx(z5,{"aria-label":`${t} timezone`,value:F,options:z.map(ie=>({value:ie,label:ie})),onChange:ie=>U(ie.target.value),className:"h-7 w-40 truncate px-2 pr-7 font-mono text-xs"})]})]}),o.jsxs("div",{className:"grid gap-1.5 md:grid-cols-[1fr_auto_1fr] md:items-center",children:[o.jsx(gy,{"aria-label":`${t} from`,placeholder:p??(e==="date"?"YYYY-MM-DD or now-1d":"now-24h"),value:T,onChange:E,onClear:()=>E(""),pickerKind:e,timeEnabled:u}),o.jsx(K,{icon:V5,className:"hidden text-muted-foreground text-[12px] md:block"}),o.jsx(gy,{"aria-label":`${t} to`,placeholder:h??(e==="date"?"YYYY-MM-DD or now":"now"),value:O,onChange:M,onClear:()=>M(""),pickerKind:e,timeEnabled:u})]})]})]}),o.jsxs("div",{className:"flex items-center justify-between border-t border-border/60 px-3 py-2",children:[o.jsx(Fe,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs",disabled:!n&&!r,onClick:ae,children:"Clear"}),o.jsxs("div",{className:"flex gap-1.5",children:[o.jsx(Fe,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>k(!1),children:"Cancel"}),o.jsx(Fe,{type:"button",variant:"default",size:"sm",className:"h-7 px-3.5 text-xs",onClick:()=>Q(T,O),children:"Apply"})]})]})]})})})]})}function gy({value:e,onChange:t,onClear:n,placeholder:r,pickerKind:s,timeEnabled:i,...l}){const u=l["aria-label"],d=s!==void 0,f=s==="time"&&i,{date:p,time:h}=HO(e);function x(y){if(!f){t(y);return}if(!y){t(h?`T${h}`:"");return}t(h?`${y}T${h}`:y)}function v(y){if(!y){t(p);return}t(p?`${p}T${y}`:`T${y}`)}return o.jsxs("div",{className:"space-y-1",children:[o.jsx(zO,{ariaLabel:u,placeholder:r,value:f?p:e,onChange:f?x:t,onClear:n,showCalendar:d}),f&&o.jsx(VO,{ariaLabel:`${u} time`,value:h,onChange:v})]})}function UO(e,t,n){if(t===void 0)return{rows:n??(e==="date"?DO:qc),presets:[]};const r=n?[...n]:[],s=[];for(const i of t){if(typeof i!="string"){s.push(i);continue}if(i==="this"||i==="last"){r.push(BO[i]);continue}r.push(FO[i])}return{rows:r,presets:s}}function zO({ariaLabel:e,value:t,onChange:n,onClear:r,placeholder:s,showCalendar:i}){const l=w.useRef(null),u=t.length>0,d=i&&u?"pr-12":"pr-7";return o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:"text","aria-label":e,placeholder:s,value:t,onChange:f=>n(f.target.value),className:R("h-8 w-full rounded-md border border-input bg-background px-2 font-mono text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring",d)}),u&&o.jsx("button",{type:"button","aria-label":`Clear ${e}`,onClick:r,className:R("absolute inset-y-0 inline-flex w-5 items-center justify-center text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i?"right-6":"right-1"),children:o.jsx(K,{icon:Tn,className:"text-[12px]"})}),i&&o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:l,type:"date",tabIndex:-1,"aria-hidden":"true",value:/^\d{4}-\d{2}-\d{2}$/.test(t.trim())?t.trim():"",onChange:f=>n(f.target.value),className:"pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0"}),o.jsx("button",{type:"button","aria-label":`Pick ${e}`,onClick:()=>{var f,p;return(p=(f=l.current)==null?void 0:f.showPicker)==null?void 0:p.call(f)},className:"absolute inset-y-0 right-1 inline-flex w-5 items-center justify-center text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:o.jsx(K,{icon:b2,className:"text-[12px]"})})]})]})}function VO({ariaLabel:e,value:t,onChange:n}){return o.jsx("input",{type:"time","aria-label":e,value:t,onChange:r=>n(r.target.value),className:"h-8 w-full rounded-md border border-input bg-background px-2 font-mono text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring"})}function HO(e){const t=e.trim(),n=/^(\d{4}-\d{2}-\d{2})?T?(\d{2}:\d{2})?/.exec(t);return!n||t.startsWith("now")||/^[+-]/.test(t)?{date:t,time:""}:{date:n[1]??"",time:n[2]??""}}function ZO({rows:e,activeToken:t,onApply:n}){return e.length===0?null:o.jsx("div",{className:"px-3.5 py-3",role:"list","aria-label":"Time filters",children:e.map((r,s)=>o.jsxs("div",{className:R("grid grid-cols-[2rem_1fr] items-center gap-2",s===e.length-1?"":"mb-1.5"),role:"listitem",children:[o.jsx("span",{className:"text-[9.5px] font-bold uppercase tracking-wider text-muted-foreground",children:r.label}),o.jsx("div",{className:"flex divide-x divide-border overflow-hidden rounded-[5px] border border-border",children:r.chips.map(i=>{const l=i.token===t;return o.jsx("button",{type:"button",title:i.title??i.ariaLabel??i.token,"aria-label":i.ariaLabel??i.token,"aria-pressed":l,onClick:()=>n(i.token,i.to??"now"),className:R("flex-1 min-w-0 px-0 py-1.5 text-center font-mono text-[11.5px] leading-none transition-colors focus-visible:relative focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",l?"bg-foreground font-semibold text-background":"bg-background font-medium text-muted-foreground hover:bg-muted"),children:i.label},i.token)})})]},r.id))})}function WO({presets:e,onApply:t}){return e.length===0?null:o.jsx("div",{className:"mb-3 space-y-1",role:"list","aria-label":"Time filters",children:e.map(n=>o.jsxs("button",{type:"button",className:"flex h-8 w-full items-center justify-between gap-3 rounded-md border border-border bg-background px-2 text-left text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>t(n.from,n.to),children:[o.jsx("span",{className:"min-w-0 truncate font-medium",children:n.label}),o.jsx("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:KO(n)})]},`${n.label}-${n.from}-${n.to}`))})}function qO(e,t,n,r){var s;const i=e.trim(),l=t.trim();if(!(!i&&!l)){for(const u of n)for(const d of u.chips)if(d.token===i&&(d.to??"now")===l)return d.ariaLabel??d.title??d.label;return(s=r.find(u=>u.from===i&&u.to===l))==null?void 0:s.label}}function KO({from:e,to:t}){return e?!t||t==="now"?e:`${e} -> ${t}`:t}function iu(e,t,n={}){const r=t.trim();return r?r==="now"||r.startsWith("now")?r:e==="time"&&/^[+-]\d/.test(r)?`now${r}`:e==="time"&&n.timeEnabled?QO(r,n.timeZone??H5()):r:""}function GO(e,t,n,r){const s=t.trim(),i=n.trim();if(!s&&!i)return r??(e==="date"?"Any date":"now-24h");if(e==="time"){const l=iu(e,s),u=iu(e,i||"now");return l?u==="now"?l:`${l} -> ${u}`:u}return s&&i&&s===i?s:s?i?`${s} -> ${i}`:s:i}function H5(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}function JO(e,t){const n=e&&e.length>0?e:[t,"UTC"];return Array.from(new Set([t,...n,"UTC"].filter(Boolean)))}function QO(e,t){if(!YO(e)||XO(e))return e;const n=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?$/);if(!n)return e;const[,r,s,i,l,u,d="00"]=n,f=Date.UTC(Number(r),Number(s)-1,Number(i),Number(l),Number(u),Number(d)),p=eM(t,f);return`${r}-${s}-${i}T${l}:${u}:${d}${tM(p)}`}function YO(e){return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?$/.test(e.trim())}function XO(e){return/(?:Z|[+-]\d{2}:?\d{2})$/i.test(e.trim())}function eM(e,t){try{const n=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),r=Object.fromEntries(n.formatToParts(new Date(t)).filter(i=>i.type!=="literal").map(i=>[i.type,i.value]));return(Date.UTC(Number(r.year),Number(r.month)-1,Number(r.day),Number(r.hour),Number(r.minute),Number(r.second))-t)/6e4}catch{return 0}}function tM(e){const t=e>=0?"+":"-",n=Math.abs(e),r=Math.floor(n/60).toString().padStart(2,"0"),s=Math.floor(n%60).toString().padStart(2,"0");return`${t}${r}:${s}`}const xy="[&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:mt-[-5px] [&::-webkit-slider-thumb]:size-3.5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-background/80 [&::-webkit-slider-thumb]:bg-muted-foreground [&::-webkit-slider-thumb]:shadow-sm [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:size-3.5 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border [&::-moz-range-thumb]:border-background/80 [&::-moz-range-thumb]:bg-muted-foreground [&::-moz-range-thumb]:shadow-sm";function Z5({min:e,max:t,value:n,onChange:r,step:s=1,ariaLabelMin:i="Minimum value",ariaLabelMax:l="Maximum value",className:u,trackClassName:d,rangeClassName:f,thumbClassName:p}){const[h,x]=nM(n,e,t);return o.jsxs("div",{className:R("relative h-6",u),children:[o.jsx("div",{className:R("absolute left-0 right-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-border",d)}),o.jsx("div",{className:R("absolute top-1/2 h-1 -translate-y-1/2 rounded-full bg-primary/70",f),style:{left:`${by(h,e,t)}%`,right:`${100-by(x,e,t)}%`}}),o.jsx("input",{type:"range","aria-label":i,min:e,max:t,step:s,value:h,className:R(vy,xy,p),style:{zIndex:h>=t?30:20},onChange:v=>{const y=y0(Number(v.target.value),e,t);r([Math.min(y,x),x])}}),o.jsx("input",{type:"range","aria-label":l,min:e,max:t,step:s,value:x,className:R(vy,xy,p),onChange:v=>{const y=y0(Number(v.target.value),e,t);r([h,Math.max(y,h)])}})]})}const vy="pointer-events-none absolute inset-0 h-6 w-full appearance-none bg-transparent [&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-transparent [&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-transparent";function nM(e,t,n){const r=y0(Math.min(e[0],e[1]),t,n),s=y0(Math.max(e[0],e[1]),t,n);return[r,s]}function y0(e,t,n){return Math.min(n,Math.max(t,e))}function by(e,t,n){return n<=t?0:(e-t)/(n-t)*100}const pr=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 26a102 102 0 1 0 102 102A102.12 102.12 0 0 0 128 26m0 192a90 90 0 1 1 90-90a90.1 90.1 0 0 1-90 90m46-90a6 6 0 0 1-6 6h-34v34a6 6 0 0 1-12 0v-34H88a6 6 0 0 1 0-12h34V88a6 6 0 0 1 12 0v34h34a6 6 0 0 1 6 6"})}),{__source:"ph:plus-circle-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"add",displayName:"UiAdd"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.13 104.13 0 0 0 128 24m40 112h-32v32a8 8 0 0 1-16 0v-32H88a8 8 0 0 1 0-16h32V88a8 8 0 0 1 16 0v32h32a8 8 0 0 1 0 16"})}),{__source:"ph:plus-circle-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"add",displayName:"UiAddFilled"});const rM=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M174 128a6 6 0 0 1-6 6H88a6 6 0 0 1 0-12h80a6 6 0 0 1 6 6m56 0A102 102 0 1 1 128 26a102.12 102.12 0 0 1 102 102m-12 0a90 90 0 1 0-90 90a90.1 90.1 0 0 0 90-90"})}),{__source:"ph:minus-circle-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"remove",displayName:"UiRemove"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m40 112H88a8 8 0 0 1 0-16h80a8 8 0 0 1 0 16"})}),{__source:"ph:minus-circle-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"remove",displayName:"UiRemoveFilled"});function sM(e){switch(e){case"active":return"bg-primary/10 border-primary/40 text-primary font-medium";case"include":return"bg-green-500/10 border-green-500/50 text-green-700 dark:text-green-400 font-medium";case"exclude":return"bg-red-500/10 border-red-500/50 text-red-700 dark:text-red-400 font-medium";default:return"border-border text-muted-foreground hover:bg-accent"}}const oM={exclude:"translate-x-0",neutral:"translate-x-4",include:"translate-x-8"};function iM({mode:e,onChange:t,ariaLabel:n,interactive:r=!0}){const s=e==="exclude"?"exclude":e==="include"?"include":"neutral",i=s==="exclude"?"bg-red-500/80":s==="include"?"bg-green-500/80":"bg-muted",l=(f,p)=>o.jsx("span",{"aria-hidden":!0,"data-tristate-region":p,onClick:h=>{h.preventDefault(),h.stopPropagation(),t(f)},className:"relative z-10 h-full flex-1 cursor-pointer"}),u=o.jsxs(o.Fragment,{children:[l(e==="exclude"?"neutral":"exclude","exclude"),l(yy(e),"neutral"),l(e==="include"?"neutral":"include","include"),o.jsx("span",{"aria-hidden":!0,className:R("pointer-events-none absolute left-0.5 top-0.5 z-20 flex size-4 items-center justify-center rounded-full bg-white shadow-sm transition-transform duration-150",oM[s]),children:s!=="neutral"&&o.jsx(K,{icon:s==="exclude"?Tn:mr,className:R("text-[10px]",s==="exclude"&&"text-red-600",s==="include"&&"text-green-600")})})]}),d=R("relative inline-flex h-5 w-[52px] shrink-0 overflow-hidden rounded-full transition-colors duration-200",i);return r?o.jsx("button",{type:"button","aria-label":n,title:n,onClick:f=>{f.preventDefault(),f.stopPropagation(),t(yy(e))},className:d,children:u}):o.jsx("span",{"aria-hidden":!0,className:d,children:u})}function Dl({mode:e="neutral",label:t,count:n,icon:r,badge:s,onModeChange:i,onClick:l,title:u,togglePosition:d="left",interactive:f=!0,className:p}){const h=!!i,x=o.jsxs(o.Fragment,{children:[n!==void 0&&o.jsx("span",{className:R("inline-flex items-center justify-center min-w-[16px] h-[16px] px-1 rounded-full text-[10px] font-bold text-white",s??"bg-muted-foreground"),children:n}),r&&o.jsx(K,{...typeof r=="string"?{name:r}:{icon:r},className:"text-sm"}),o.jsx("span",{className:"truncate",children:t})]});if(h){const v=o.jsx(iM,{mode:e,onChange:i,interactive:f,...u?{ariaLabel:u}:{}}),y=o.jsx("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-foreground",children:x});return o.jsx("span",{className:R("inline-flex items-center gap-1.5 select-none",p),title:u,children:d==="right"?o.jsxs(o.Fragment,{children:[y,v]}):o.jsxs(o.Fragment,{children:[v,y]})})}return o.jsxs("button",{type:"button",onClick:l,title:u,className:R("inline-flex items-center gap-1.5 text-xs px-2 py-0.5 rounded-full border transition-colors",sM(e),p),children:[o.jsx(aM,{mode:e}),x]})}function aM({mode:e}){return e==="include"?o.jsx(K,{icon:pr,className:"text-xs"}):e==="exclude"?o.jsx(K,{icon:rM,className:"text-xs"}):e==="active"?o.jsx("span",{className:"w-2 h-2 rounded-full bg-current"}):o.jsx("span",{className:"w-2 h-2 rounded-full bg-current opacity-30"})}function yy(e){return e==="include"?"exclude":e==="exclude"?"neutral":"include"}const w2=500,Bl=w.createContext({autoSubmit:!0});function wy(e,t){if(t.length===0)return e;const n=new Set(e.map(s=>s.value)),r=[...e];for(const s of t)n.has(s.value)||(n.add(s.value),r.push(s));return r}function xu(e){const t=typeof e.label=="string"?e.label:"";return[e.value,t,e.title??""].filter(Boolean).join(" ")}function lM(e,t){const n=Object.values(t).filter(i=>i==="include").length,r=Object.values(t).filter(i=>i==="exclude").length;if(n===0&&r===0)return e;const s=[n>0?`+${n}`:null,r>0?`-${r}`:null].filter(Boolean);return`${e} ${s.join(" ")}`}function dm(e,t){const{autoSubmit:n}=w.useContext(Bl),[r,s]=w.useState(e),i=w.useRef(t),l=w.useRef(e),u=cM(e);return w.useEffect(()=>{i.current=t},[t]),w.useEffect(()=>{if(!_y(l.current,e)){l.current=e,s(e);return}l.current=e},[u,e]),w.useEffect(()=>{if(_y(r,e))return;if(!n){i.current(r);return}const d=window.setTimeout(()=>{i.current(r)},w2);return()=>window.clearTimeout(d)},[n,r,u]),[r,s]}function cM(e){return Object.keys(e).sort().map(t=>`${t}:${e[t]}`).join("\0")}function _y(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n)if(e[s]!==t[s])return!1;return!0}function fo(e,t,n){const r={...e};return n==="neutral"?(delete r[t],r):((n==="include"||n==="exclude")&&(r[t]=n),r)}function Sl(e){return e==="include"?"exclude":e==="exclude"?"neutral":"include"}function W5(e,t){if(!w.isValidElement(e))return e;const n=e;return w.cloneElement(n,{style:{width:`${t}px`,height:`${t}px`,...n.props.style}})}function fm(e){return e.icon==null?{label:e.label}:{label:o.jsx("span",{title:e.label,className:"inline-flex items-center text-[10px]",children:o.jsx(Zr,{icon:W5(e.icon,10),className:"normal-case"})}),ariaLabel:e.label}}function vu(e){return e?"min-w-[12rem] max-w-[18rem] flex-1":"min-w-[11rem] max-w-[15rem] shrink-0"}const uM="md",q5={xs:"h-7 px-1.5 text-xs",sm:"h-8 px-2 text-xs",md:"h-9 px-2 text-sm",lg:"h-10 px-3 text-base",xl:"h-11 px-3.5 text-lg"},bn={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},mm={xs:"h-7",sm:"h-8",md:"h-9",lg:"h-10",xl:"h-11"},_2={xs:"min-h-7",sm:"min-h-8",md:"min-h-9",lg:"min-h-10",xl:"min-h-11"},jy={xs:"gap-1",sm:"gap-1.5",md:"gap-2.5",lg:"gap-4",xl:"gap-4"},dM={xs:"gap-0.5",sm:"gap-1",md:"gap-1.5",lg:"gap-2",xl:"gap-2"},pm={xs:"gap-1",sm:"gap-1",md:"gap-1.5",lg:"gap-2",xl:"gap-2"},fM=400,ky=256;function er(e){const{options:t,placeholder:n,label:r,ariaLabel:s,disabled:i,required:l,invalid:u,allowCustomValue:d=!0,id:f,size:p,className:h,loading:x,onSearch:v,onKeyDown:y,suffix:b,prefix:j,footer:S}=e,N=e.multiple===!0,k=e.multiple===!0&&e.tristate===!0,T=w.useMemo(()=>e.multiple===!0&&e.tristate===!0?e.value:{},[e.multiple,e.tristate,e.value]),E=w.useMemo(()=>e.multiple===!0&&e.tristate===!0?Object.keys(e.value):e.multiple===!0?e.value:e.value?[e.value]:[],[e.multiple,e.tristate,e.value]),O=w.useRef(null),M=w.useRef(null),L=w.useRef(null),F=w.useRef(null),U=w.useRef(null),[z,V]=w.useState(!1),X=xa(),[H,B]=w.useState(null),[W,se]=w.useState(""),[P,J]=w.useState(-1),[ne,$]=w.useState(0),Q=Y=>E.includes(Y),ae=w.useMemo(()=>{var Y;if(k){const Oe=Object.values(T),He=Oe.filter(Et=>Et==="include").length,at=Oe.length-He;return[He>0&&`+${He}`,at>0&&`-${at}`].filter(Boolean).join(" ")}if(N){const Oe=t.filter(He=>E.includes(He.value)).map(He=>He.label);return Oe.length===0?"":Oe.length<=2?Oe.join(", "):`${Oe.length} selected`}const Se=E[0]??"";return((Y=t.find(Oe=>Oe.value===Se))==null?void 0:Y.label)??Se},[k,T,N,t,E]),ie=N?void 0:t.find(Y=>Y.value===E[0]),de=j??(ie?.icon!=null?o.jsx(Zr,{icon:ie.icon,className:"size-4"}):null),ge=z?W:ae,ve=w.useMemo(()=>{if(v)return pM(t,E);const Y=W.toLowerCase().trim();return Y?t.filter(Se=>Se.label.toLowerCase().includes(Y)||Se.value.toLowerCase().includes(Y)):t},[v,t,W,E]);w.useEffect(()=>{if(!v||!z)return;const Y=setTimeout(()=>v(W.trim()),250);return()=>clearTimeout(Y)},[v,z,W]);const Le=W.trim(),je=w.useMemo(()=>!k||!d||!Le||ve.some(Se=>Se.value===Le)?null:{value:Le,label:Le},[k,d,Le,ve]),Ue=w.useMemo(()=>je?[...ve,je]:ve,[ve,je]);w.useEffect(()=>{J(-1)},[W]),w.useEffect(()=>{P>=Ue.length&&J(-1)},[P,Ue.length]),w.useEffect(()=>{if(!z)return;const Y=Se=>{var Oe,He;const at=Se.target;!((Oe=O.current)!=null&&Oe.contains(at))&&!((He=F.current)!=null&&He.contains(at))&&et()};return document.addEventListener("mousedown",Y),document.addEventListener("focusin",Y),()=>{document.removeEventListener("mousedown",Y),document.removeEventListener("focusin",Y)}}),w.useLayoutEffect(()=>{if(r==null){$(0);return}const Y=U.current;Y&&$(Y.offsetWidth)},[r]),w.useLayoutEffect(()=>{if(!z){B(null);return}const Y=()=>{const Se=M.current;if(!Se)return;const Oe=Se.getBoundingClientRect(),He=window.innerWidth-Oe.left-8,at=Math.max(Oe.width,Math.min(fM,He)),Et=window.innerHeight-Oe.bottom-8,mt=Oe.top-8,pt=EtEt,ln=Math.min(ky,pt?mt:Et);B({...pt?{bottom:window.innerHeight-Oe.top+4}:{top:Oe.bottom+4},left:Oe.left,width:Oe.width,maxWidth:at,maxHeight:ln})};return Y(),window.addEventListener("scroll",Y,!0),window.addEventListener("resize",Y),()=>{window.removeEventListener("scroll",Y,!0),window.removeEventListener("resize",Y)}},[z]);function we(Y){e.multiple===!0&&e.tristate!==!0?e.onChange(Y):e.multiple!==!0&&e.onChange(Y[0]??"")}function ke(Y){e.multiple===!0&&e.tristate===!0&&e.onChange(Y)}function Ne(Y,Se){const Oe={...T};Se==="include"||Se==="exclude"?Oe[Y]=Se:delete Oe[Y],ke(Oe)}function xe(Y){const Se=T[Y];Ne(Y,Se===void 0?"include":Se==="include"?"exclude":"neutral")}function Re(){z||(se(""),J(-1),V(!0))}function et(){const Y=W.trim();!N&&d&&Y&&Y!==E[0]&&we([Y]),se(""),V(!1),J(-1)}function Ve(Y){var Se,Oe,He;if(k){xe(Y.value),(Se=L.current)==null||Se.focus();return}if(N){const at=Q(Y.value)?E.filter(Et=>Et!==Y.value):[...E,Y.value];we(at),J(-1),(Oe=L.current)==null||Oe.focus();return}we([Y.value]),se(""),V(!1),J(-1),(He=L.current)==null||He.focus()}function st(){var Y;E.length>0&&(k?ke({}):we([])),se(""),J(-1),(Y=L.current)==null||Y.focus()}function Ie(Y){var Se;const Oe=F.current;if(!Oe)return;const He=Oe.querySelectorAll('[role="option"]')[Y];(Se=He?.scrollIntoView)==null||Se.call(He,{block:"nearest"})}function _e(Y){if(Y.key==="ArrowDown"){if(Y.preventDefault(),!z){Re();return}const Se=P0?P-1:Ue.length-1;J(Se),Ie(Se)}else if(Y.key==="Enter"){if(z&&P>=0&&Ue[P]&&!Ue[P].disabled){Y.preventDefault(),Ve(Ue[P]);return}et(),y?.(Y)}else Y.key==="Escape"?z&&(Y.preventDefault(),se(""),V(!1),J(-1)):y?.(Y)}const be=f?`${f}-listbox`:void 0,Ce=s??(typeof r=="string"?r:void 0),Te=!l&&!x&&!i&&E.length>0;return o.jsxs("div",{ref:O,className:R("relative",h),children:[o.jsxs("div",{ref:M,"data-jsf-control":!0,className:"relative flex items-center",children:[r!=null&&o.jsx("span",{ref:U,className:"pointer-events-none absolute left-2 z-10 whitespace-nowrap font-medium uppercase tracking-wide text-muted-foreground text-[10px]",children:r}),o.jsx("input",{ref:L,id:f,type:"text",role:"combobox","aria-expanded":z,"aria-controls":be,"aria-activedescendant":P>=0?`${be}-${P}`:void 0,"aria-label":Ce,"aria-invalid":u||void 0,autoComplete:"off",disabled:i,placeholder:n,value:ge,onChange:Y=>{se(Y.target.value),z||V(!0)},onFocus:Re,onClick:()=>{z||Re()},onKeyDown:_e,className:R("w-full rounded-md border border-input bg-background text-foreground",p?q5[p]:"h-control-h px-control-px text-sm",de&&"pl-8",b?Te?"pr-[5.5rem]":"pr-14":Te?"pr-14":"pr-8","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1","disabled:cursor-not-allowed disabled:opacity-50",u&&"border-destructive focus-visible:ring-destructive"),style:r!=null?mM(r,ne):void 0}),de&&o.jsx("div",{className:"absolute inset-y-0 left-1.5 flex items-center",children:de}),b&&o.jsx("div",{className:R("absolute flex h-full items-center",Te?"right-[3.75rem]":"right-7"),children:b}),Te&&o.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Clear",onClick:st,className:"absolute right-7 flex h-full items-center px-1 text-muted-foreground hover:text-foreground",children:o.jsx(K,{icon:Tn,className:"text-xs"})}),x?o.jsx("span",{className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2",children:o.jsxs("svg",{className:"h-3.5 w-3.5 animate-spin text-muted-foreground",viewBox:"0 0 16 16",fill:"none",children:[o.jsx("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"2",opacity:"0.25"}),o.jsx("path",{d:"M14.5 8a6.5 6.5 0 0 0-6.5-6.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}):o.jsx("button",{type:"button",tabIndex:-1,disabled:i,"aria-label":"Toggle options",onClick:()=>{var Y;z?et():(Re(),(Y=L.current)==null||Y.focus())},className:"pointer-events-auto absolute right-0 flex h-full items-center px-2 text-muted-foreground",children:o.jsx(K,{icon:Vt,className:"text-xs"})})]}),z&&H&&typeof document<"u"&&pa.createPortal(o.jsxs("div",{id:be,ref:F,role:"listbox","aria-multiselectable":N||void 0,style:{position:"fixed",...H.top!=null?{top:H.top}:{bottom:H.bottom},left:H.left,minWidth:H.width,maxWidth:H.maxWidth,maxHeight:H.maxHeight,zIndex:X},className:"w-max overflow-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg shadow-black/5",children:[x&&ve.length===0&&o.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"Loading…"}),!x&&ve.length===0&&o.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No results"}),ve.map((Y,Se)=>{var Oe;const He=Q(Y.value),at=k?T[Y.value]:void 0,Et=Y.group!=null&&Y.group!==((Oe=ve[Se-1])==null?void 0:Oe.group);return o.jsxs(w.Fragment,{children:[Et&&o.jsx("div",{role:"presentation",className:"select-none px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:Y.group}),o.jsx("div",{id:be?`${be}-${Se}`:void 0,role:"option","aria-selected":k?at!=null:He,"aria-disabled":Y.disabled,...at!=null?{"aria-label":`${Y.label}, ${at==="include"?"included":"excluded"}`}:{},...Y.title!==void 0?{title:Y.title}:{},...k?{"data-filter-option":Y.value}:{},onMouseDown:mt=>{mt.preventDefault(),!k&&!Y.disabled&&Ve(Y)},...k?{onClick:()=>{Y.disabled||Ve(Y)}}:{},onMouseEnter:()=>J(Se),className:R("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm",Se===P&&"bg-accent",He&&!k&&"font-medium",Y.disabled&&"cursor-not-allowed opacity-50"),children:k?o.jsx(Dl,{mode:at??"neutral",togglePosition:"right",interactive:!1,label:Y.label,onModeChange:mt=>Ne(Y.value,mt),className:"w-full justify-between"}):o.jsxs(o.Fragment,{children:[o.jsx(K,{icon:mr,className:R("text-xs shrink-0",He?"opacity-100":"opacity-0")}),o.jsx(Zr,{icon:Y.icon,className:"text-sm text-muted-foreground"}),o.jsx("span",{className:"min-w-0 truncate",children:Y.label})]})})]},Y.value)}),je&&o.jsxs("div",{id:be?`${be}-${ve.length}`:void 0,role:"option","aria-selected":!1,"data-filter-add-custom":je.value,onMouseDown:Y=>Y.preventDefault(),onClick:()=>Ve(je),onMouseEnter:()=>J(ve.length),className:R("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-primary",P===ve.length&&"bg-accent"),children:['Add "',je.value,'"']}),S!=null&&o.jsx("div",{className:"select-none px-2 py-1.5 text-[11px] text-muted-foreground",children:S})]}),document.body)]})}function mM(e,t){return t>0?{paddingLeft:`calc(${t}px + 0.75rem)`}:typeof e!="string"?{paddingLeft:"1.75rem"}:{paddingLeft:`${Math.min(e.length*.48+.75,7)}rem`}}function pM(e,t){const n=new Set(e.map(s=>s.value)),r=t.filter(s=>!n.has(s)).map(s=>({value:s,label:s}));return r.length===0?e:[...r,...e]}function K5({filter:e,grow:t}){const[n,r]=dm(e.value,e.onChange),[s,i]=w.useState([]),[l,u]=w.useState(!1),[d,f]=w.useState(""),p=w.useRef(""),h=e.onSearch,x=w.useCallback(N=>{if(p.current=N,f(N),!N){i([]),u(!1);return}u(!0),Promise.resolve(h?.(N)).then(k=>{p.current===N&&(u(!1),i(Array.isArray(k)?k:[]))}).catch(()=>{p.current===N&&(u(!1),i([]))})},[h]),v=!!e.allowCustomValue,y=w.useMemo(()=>{if(!v)return e.options;const N=new Set(e.options.map(T=>T.value)),k=Object.keys(n).filter(T=>!N.has(T)).map(T=>({value:T,label:T}));return wy(k,e.options)},[v,e.options,n]),b=w.useMemo(()=>{if(!h||!d)return y;const N=y.filter(k=>n[k.value]!==void 0);return wy(N,s)},[h,d,y,s,n]),j=e.truncated&&e.total?Math.max(e.total-e.options.length,0):0,S=j>0&&!d?o.jsxs(o.Fragment,{children:["… and ",j.toLocaleString()," more",h?" — type to search all":""]}):void 0;return o.jsx(er,{multiple:!0,tristate:!0,...fm(e),options:hM(b),value:n,onChange:r,allowCustomValue:v,size:"sm",className:R(vu(t),e.className),...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...h!==void 0?{onSearch:x,loading:l}:{},...e.disabled!==void 0?{disabled:e.disabled}:{},...S!==void 0?{footer:S}:{}})}function hM(e){return e.map(t=>{const n=t.title??xu(t);return{value:t.value,label:typeof t.label=="string"?t.label:n,title:n,...t.disabled!==void 0?{disabled:t.disabled}:{}}})}function gM({filter:e,chrome:t="full"}){const[n,r]=w.useState(""),[s,i]=dm(e.value,e.onChange),l=e.options.length>7,u=t==="embedded",d=w.useMemo(()=>{const f=n.trim().toLowerCase();return f?e.options.filter(p=>xu(p).toLowerCase().includes(f)):e.options},[e.options,n]);return o.jsxs("div",{"data-filter-panel-chrome":t,className:R("min-w-[18rem] max-w-[22rem] text-popover-foreground",u?"p-0":"rounded-md border border-border bg-popover p-2 shadow-sm shadow-black/5"),children:[!u&&o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e.label}),o.jsx("button",{type:"button",className:"text-[10px] text-primary disabled:text-muted-foreground",onClick:()=>i({}),disabled:Object.keys(s).length===0,children:"Clear all"})]}),l&&o.jsxs("div",{className:"mb-2 flex items-center gap-2 rounded-md border border-input bg-background px-2",children:[o.jsx(K,{icon:$s,className:"shrink-0 text-muted-foreground"}),o.jsx("input",{type:"search","aria-label":`Filter ${e.label} options`,className:"h-8 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",placeholder:`Filter ${e.label.toLowerCase()}`,value:n,onChange:f=>r(f.target.value)})]}),o.jsxs("div",{className:"max-h-72 space-y-0.5 overflow-auto",children:[d.map(f=>{const p=s[f.value]??"neutral",h=f.title??xu(f);return o.jsx("div",{role:"button",tabIndex:0,"data-filter-option":f.value,className:"rounded-md px-1.5 py-0.5 hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none",onClick:()=>i(fo(s,f.value,Sl(p))),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),i(fo(s,f.value,Sl(p))))},children:o.jsx(Dl,{className:"w-full justify-between",label:f.label,mode:p,title:h,togglePosition:"right",onModeChange:x=>i(fo(s,f.value,x))})},f.value)}),d.length===0&&o.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:"No options found"})]})]})}function xM(e,t){return!t||t.length===0?e:t.reduce((n,r)=>r(n),e)}function ig(e){if(e.kind==="text"||e.kind==="lookup"||e.kind==="enum"){e.onChange("");return}if(e.kind==="lookup-multi"||e.kind==="select-multi"){e.onChange([]);return}if(e.kind==="number"){e.onChange({});return}if(e.kind==="boolean"){e.onChange(!1);return}e.onChange({})}function bu(e){return e.kind==="text"||e.kind==="lookup"||e.kind==="enum"?String(e.value??"").trim()!=="":e.kind==="lookup-multi"||e.kind==="select-multi"?e.value.length>0:e.kind==="number"?String(e.value.min??"").trim()!==""||String(e.value.max??"").trim()!=="":e.kind==="boolean"?e.value:Object.keys(e.value).length>0}function la(e){if(e==null)return null;if(e instanceof Date)return Number.isNaN(e.getTime())?null:e;if(typeof e=="number"){const t=e<1e12?e*1e3:e,n=new Date(t);return Number.isNaN(n.getTime())?null:n}if(typeof e=="string"){const t=e.trim();if(!t)return null;const n=new Date(t);return Number.isNaN(n.getTime())?null:n}return null}const G5={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5},vM=/^now\s*([+-])\s*(\d+)\s*([smhdwMqy])$/,bM=/^now\/([wMqy])(?:\s*([+-])\s*(\d+)\s*([wMqy]))?$/;function Ny(e,t=new Date){if(e==null)return null;if(typeof e=="string"){const n=e.trim();if(!n)return null;if(n.toLowerCase()==="now")return new Date(t.getTime());const r=n.match(bM);if(r){const[,i,l,u,d]=r;let f=wM(t,i);return l&&u&&d&&(f=Cy(f,d,Number(u)*(l==="-"?-1:1))),f}const s=n.match(vM);if(s){const[,i,l,u]=s,d=u;if(yM(d))return Cy(t,d,Number(l)*(i==="-"?-1:1));const f=G5[d.toLowerCase()];if(!f)return null;const p=Number(l)*f*(i==="-"?-1:1);return new Date(t.getTime()+p)}}return la(e)}function yM(e){return e==="M"||e==="q"||e==="y"}function wM(e,t){const n=e.getUTCFullYear(),r=e.getUTCMonth(),s=e.getUTCDate();if(t==="w"){const i=new Date(Date.UTC(n,r,s)),u=(i.getUTCDay()+6)%7;return i.setUTCDate(i.getUTCDate()-u),i}return t==="M"?new Date(Date.UTC(n,r,1)):t==="q"?new Date(Date.UTC(n,Math.floor(r/3)*3,1)):t==="y"?new Date(Date.UTC(n,0,1)):new Date(e.getTime())}function Cy(e,t,n){const r=new Date(e.getTime());if(t==="w")r.setUTCDate(r.getUTCDate()+n*7);else if(t==="M")r.setUTCMonth(r.getUTCMonth()+n);else if(t==="q")r.setUTCMonth(r.getUTCMonth()+n*3);else if(t==="y")r.setUTCFullYear(r.getUTCFullYear()+n);else{const s=G5[t.toLowerCase()];s&&r.setTime(r.getTime()+n*s)}return r}const _M=6e4,jM=864e5;function kM(e){if(e.length===0)return"iso";let t=1/0,n=-1/0;for(const l of e){const u=l.getTime();un&&(n=u)}const r=n-t;if(r<=_M)return"relative";const s=new Date(t),i=new Date(n);return s.getFullYear()===i.getFullYear()&&s.getMonth()===i.getMonth()&&s.getDate()===i.getDate()?"time":s.getFullYear()===i.getFullYear()&&r<=jM*365?"short":"iso"}function NM(e,t,n=new Date){switch(t){case"relative":return J5(e,n);case"time":return e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"});case"short":return e.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});default:return CM(e)}}function CM(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),s=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0");return`${t}-${n}-${r} ${s}:${i}`}function J5(e,t=new Date){const n=t.getTime()-e.getTime(),r=n<0,s=Math.abs(n),i=Math.round(s/1e3);let l;return i<1?l="just now":i<60?l=`${i}s`:i<3600?l=`${Math.round(i/60)}m`:i<86400?l=`${Math.round(i/3600)}h`:l=`${Math.round(i/86400)}d`,l==="just now"?l:r?`in ${l}`:`${l} ago`}function j2(e,t=new Date){const n=la(e);if(!n)return typeof e=="string"?e:"";const r=n.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),s=J5(n,t);return s==="just now"?r:`${r} (${s})`}function SM(e,t){switch(e){case"absolute":return"iso";case"relative":return"relative";case"time":return"time";default:return t}}function Q5({options:e,value:t,onChange:n,placeholder:r="Select options",ariaLabel:s,disabled:i,className:l,triggerClassName:u,menuClassName:d}){const[f,p]=w.useState(!1),h=xa(),{refs:x,floatingStyles:v,context:y}=Zu({open:f,onOpenChange:p,placement:"bottom-start",whileElementsMounted:$u,middleware:[Fu(6),Bu({padding:8}),Du({padding:8})]}),{getReferenceProps:b,getFloatingProps:j}=Wu([Vu(y),Hu(y,{escapeKey:!1}),qu(y,{role:"menu"})]);wo(f,()=>{p(!1),x.domReference.current instanceof HTMLElement&&x.domReference.current.focus()});const S=w.useMemo(()=>{const k=e.filter(E=>t.includes(E.value)),T=k.map(E=>E.label).filter(E=>typeof E=="string");return k.length===0?r:T.length===0?`${k.length} selected`:T.length<=2?T.join(", "):`${T.length} selected`},[e,r,t]);function N(k){if(t.includes(k)){n(t.filter(T=>T!==k));return}n([...t,k])}return o.jsxs("div",{className:R("inline-flex",l),children:[o.jsxs(Fe,{ref:x.setReference,type:"button",variant:"outline",size:"sm",disabled:i,"aria-label":s??`${r} filter`,className:R("w-fit max-w-[15rem] min-w-0 shrink-0 justify-between gap-3 text-left font-normal",u,t.length===0&&"text-muted-foreground"),...b(),children:[o.jsx("span",{className:"truncate",children:S}),o.jsx(K,{icon:f?Ku:Vt,className:"text-muted-foreground"})]}),f&&o.jsx(ha,{children:o.jsx(ga,{context:y,modal:!1,children:o.jsxs("div",{ref:x.setFloating,role:"menu","aria-label":r,style:{...v,zIndex:h},className:R("min-w-[14rem] max-w-[20rem] rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg shadow-black/5",d),...j(),children:[o.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2 px-2 py-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[o.jsx("span",{children:r}),o.jsx("button",{type:"button",className:"text-[10px] text-primary disabled:text-muted-foreground",onClick:()=>n([]),disabled:t.length===0,children:"Clear all"})]}),o.jsx("div",{className:"max-h-64 overflow-auto",children:e.map(k=>{const T=t.includes(k.value);return o.jsxs("label",{className:R("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-accent",k.disabled&&"cursor-not-allowed opacity-50"),children:[o.jsx("input",{type:"checkbox",role:"menuitemcheckbox",className:"size-4 rounded border border-input",checked:T,disabled:k.disabled,onChange:()=>N(k.value)}),o.jsx("span",{className:"min-w-0 truncate",children:k.label})]},k.value)})})]})})})]})}const Y5=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M228.77 50.34A13.8 13.8 0 0 0 216 42H40a14 14 0 0 0-10.33 23.42l.06.07L98 138.38V216a14 14 0 0 0 21.77 11.64l32-21.33a14 14 0 0 0 6.23-11.65v-56.28l68.33-73a13.82 13.82 0 0 0 2.44-15.04m-11.26 6.94l-69.89 74.62A6 6 0 0 0 146 136v58.66a2 2 0 0 1-.89 1.67l-32 21.33A2 2 0 0 1 110 216v-80a6 6 0 0 0-1.62-4.1L38.53 57.32A2 2 0 0 1 40 54h176a1.9 1.9 0 0 1 1.83 1.19a1.86 1.86 0 0 1-.32 2.09"})}),{__source:"ph:funnel-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"filter",displayName:"UiFilter"}),EM=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m227.81 66.76l-.08.09L160 139.17v55.49a16 16 0 0 1-7.13 13.34l-32 21.34A16 16 0 0 1 96 216v-76.83L28.27 66.85l-.08-.09A16 16 0 0 1 40 40h176a16 16 0 0 1 11.84 26.76Z"})}),{__source:"ph:funnel-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"filter",displayName:"UiFilterFilled"}),ds=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m180.24 132.24l-80 80a6 6 0 0 1-8.48-8.48L167.51 128L91.76 52.24a6 6 0 0 1 8.48-8.48l80 80a6 6 0 0 1 0 8.48"})}),{__source:"ph:caret-right-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"chevron-right",displayName:"UiChevronRight"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m181.66 133.66l-80 80A8 8 0 0 1 88 208V48a8 8 0 0 1 13.66-5.66l80 80a8 8 0 0 1 0 11.32"})}),{__source:"ph:caret-right-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"chevron-right",displayName:"UiChevronRightFilled"});const k2=8,TM=44;function OM({search:e,filters:t,timeRange:n,dateRange:r,children:s,leading:i,trailing:l,className:u,autoSubmit:d=!0,onApply:f,applyLabel:p="Apply",isPending:h=!1,overflowMode:x="responsive"}){const v=!!(n||r),y=!d&&!!f,b=w.useMemo(()=>({autoSubmit:d}),[d]),j=t??[],S=x==="responsive"&&j.length>0,N=WM("(max-width: 767px)"),k=w.useRef(null),T=w.useRef(null),E=w.useRef(new Map),O=w.useRef(new Map),M=w.useMemo(()=>j.map(P=>P.key).join("\0"),[j]),[L,F]=w.useState(j.length),U=w.useRef(j),z=w.useRef(S),V=w.useRef(N);U.current=j,z.current=S,V.current=N,w.useLayoutEffect(()=>{F(z.current&&V.current?0:U.current.length)},[M,N]);const X=w.useCallback(()=>{var P;const J=U.current;if(!z.current){F(J.length);return}if(V.current){F(0);return}const ne=k.current;if(!ne)return;const $=Math.floor(ne.getBoundingClientRect().width);if($<=0)return;const Q=J.map(ve=>{const Le=E.current.get(ve.key),je=Le?.getBoundingClientRect().width??0;if(je>0){const Ue=Math.ceil(je);return O.current.set(ve.key,Ue),Ue}return O.current.get(ve.key)??tA(ve)}),ae=Math.ceil(((P=T.current)==null?void 0:P.getBoundingClientRect().width)??TM),ie=ae>0?k2:0,ge=eA(Q)<=$?J.length:XM(Q,Math.max(0,$-ae-ie));F(ve=>ve===ge?ve:ge)},[]);w.useLayoutEffect(()=>{X()},[X]),w.useEffect(()=>{if(!S)return;const P=k.current,J=T.current,ne=typeof ResizeObserver>"u"?null:ResizeObserver;if(!ne)return window.addEventListener("resize",X),X(),()=>window.removeEventListener("resize",X);const $=new ne(()=>X());return P&&$.observe(P),J&&$.observe(J),window.addEventListener("resize",X),X(),()=>{$.disconnect(),window.removeEventListener("resize",X)}},[X,S,N]);const H=S?j.slice(0,Math.min(L,j.length)):j,B=S?j.slice(Math.min(L,j.length)):[],W=B.filter(bu).length,se=w.useCallback((P,J)=>{if(!J){E.current.delete(P);return}E.current.set(P,J)},[]);return o.jsx(Bl.Provider,{value:b,children:o.jsxs("div",{className:R("flex flex-nowrap items-center gap-2 overflow-visible bg-background py-1.5","flex-wrap md:flex-nowrap",x==="wrap"&&"flex-wrap",u),children:[i&&o.jsx("div",{className:"flex shrink-0 items-center gap-2",children:i}),e&&o.jsx(VM,{search:e}),s,j.length>0&&o.jsx("div",{ref:k,"data-filter-bar-list":!0,className:R("flex min-w-0 items-center gap-2",x==="wrap"?"flex-wrap":"flex-1"),children:H.map((P,J)=>o.jsx("div",{ref:ne=>se(P.key,ne),"data-filter-bar-item":P.key,className:"min-w-0 shrink-0",children:LM(P,!e&&J===0)},P.key))}),S&&B.length>0&&o.jsx(RM,{triggerRef:T,filters:B,activeHidden:W,...f?{onApply:f}:{}}),(v||l||y)&&o.jsxs("div",{className:"ml-auto flex min-w-0 shrink-0 flex-wrap items-center justify-end gap-2",children:[r&&o.jsx(Sy,{kind:"date",label:"Date range",...r}),n&&o.jsx(Sy,{kind:n.timeEnabled===!1?"date":"time",label:n.timeEnabled===!1?"Date range":"Time range",...n}),l,y&&o.jsx(Fe,{type:"button",variant:"default",size:"sm",disabled:h,onClick:f,children:h?"Loading…":p})]})]})})}function MM({filter:e,chrome:t="full",autoSubmit:n=!0}){const r=w.useMemo(()=>({autoSubmit:n}),[n]);return o.jsx(Bl.Provider,{value:r,children:o.jsx(AM,{filter:e,chrome:t})})}function AM({filter:e,chrome:t="full"}){return o.jsxs(o.Fragment,{children:[e.kind==="lookup"&&o.jsx(r3,{filter:e,grow:!0}),e.kind==="lookup-multi"&&o.jsx(s3,{filter:e,grow:!0}),e.kind==="multi"&&o.jsx(gM,{filter:e,chrome:t}),e.kind==="nested-multi"&&o.jsx(ZM,{filter:e,chrome:t}),e.kind==="select-multi"&&o.jsx(l3,{filter:e,grow:!0}),e.kind==="number"&&o.jsx(HM,{filter:e,chrome:t}),e.kind==="enum"&&o.jsx(e3,{filter:e,grow:!0}),e.kind==="boolean"&&o.jsx(t3,{filter:e}),e.kind==="text"&&o.jsx(n3,{filter:e,grow:!0})]})}function LM(e,t){return e.kind==="lookup"?o.jsx(r3,{filter:e,grow:t}):e.kind==="lookup-multi"?o.jsx(s3,{filter:e,grow:t}):e.kind==="multi"?o.jsx(K5,{filter:e,grow:t}):e.kind==="nested-multi"?o.jsx(i3,{filter:e,grow:t}):e.kind==="select-multi"?o.jsx(l3,{filter:e,grow:t}):e.kind==="number"?o.jsx(o3,{filter:e,grow:t}):e.kind==="enum"?o.jsx(e3,{filter:e,grow:t}):e.kind==="boolean"?o.jsx(t3,{filter:e}):o.jsx(n3,{filter:e,grow:t})}function RM({triggerRef:e,filters:t,activeHidden:n,onApply:r}){const[s,i]=w.useState(!1),[l,u]=w.useState({}),d=t.length>0,f=w.useMemo(()=>t.map(k=>k.key).join("\0"),[t]),{refs:p,floatingStyles:h,context:x,floatingZ:v,getReferenceProps:y,getFloatingProps:b}=C2(s,k=>{u(Ih(t)),i(k)},"bottom-end"),j=w.useCallback(()=>{u(Ih(t)),i(!1)},[t]),S=R5([p.setReference,e]);w.useEffect(()=>{d||j()},[j,d]),w.useEffect(()=>{s&&u(Ih(t))},[f,s]);const N=t.map(k=>GM(k,l[k.key]??_0(k),T=>u(E=>({...E,[k.key]:T}))));return o.jsxs("div",{className:R("inline-flex shrink-0",!d&&"invisible pointer-events-none"),"aria-hidden":!d||void 0,children:[o.jsxs(Fe,{ref:S,type:"button",variant:"outline",size:"sm","aria-label":"More filters",tabIndex:d?0:-1,title:d?"More filters":void 0,className:R("h-8 min-w-0 gap-1.5 px-2 text-xs font-normal",n>0&&"border-primary/40 text-primary"),...y(),children:[o.jsx(K,{icon:Y5,className:"text-[14px]"}),n>0&&o.jsx("span",{className:"rounded-full bg-muted px-1.5 text-[10px] font-medium text-muted-foreground",children:n})]}),d&&s&&o.jsx(ha,{children:o.jsx(ga,{context:x,modal:!1,children:o.jsxs("div",{ref:p.setFloating,role:"dialog","aria-label":"Overflow filters",style:{...h,zIndex:v},className:"flex max-h-[min(34rem,calc(100vh-2rem))] w-[min(34rem,calc(100vw-2rem))] flex-col overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-lg shadow-black/10",...b(),children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2 px-1",children:[o.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"Filters"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{type:"button",className:"rounded px-1.5 py-0.5 text-xs text-primary transition-colors hover:bg-accent focus:bg-accent focus:outline-none disabled:text-muted-foreground",onClick:()=>N.forEach(ig),disabled:N.every(k=>!bu(k)),children:"Clear all"}),o.jsx("button",{type:"button","aria-label":"Close overflow filters",title:"Close",className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none",onClick:j,children:o.jsx(K,{icon:Tn,className:"text-sm"})})]})]}),o.jsx("div",{className:"min-h-0 flex-1 divide-y divide-border/70 overflow-y-auto rounded-md border border-border/70",children:N.map(k=>{const T=bu(k);return o.jsxs("div",{"data-overflow-filter-row":k.key,className:"grid grid-cols-[minmax(0,1fr)_auto] items-start gap-2 overflow-visible p-3 md:h-12 md:grid-cols-[minmax(7rem,10rem)_auto_minmax(0,1fr)_auto] md:items-center md:p-2",children:[o.jsxs("label",{htmlFor:ci(k),className:"flex min-w-0 items-center gap-1 truncate text-[10px] font-medium uppercase tracking-wide text-muted-foreground",title:k.description??k.label,children:[o.jsx(Zr,{icon:W5(k.icon,12),className:"text-[12px] normal-case"}),o.jsx("span",{className:"truncate",children:k.label})]}),o.jsx("span",{className:"hidden text-sm text-muted-foreground md:block",children:"="}),o.jsx("div",{className:"col-span-2 min-w-0 overflow-visible md:col-span-1",children:o.jsx(Bl.Provider,{value:{autoSubmit:!1},children:o.jsx(PM,{filter:k})})}),o.jsx("button",{type:"button","aria-label":`Clear ${k.label}`,title:`Clear ${k.label}`,className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none disabled:text-muted-foreground/40",onClick:()=>ig(k),disabled:!T,children:o.jsx(K,{icon:Tn,className:"text-sm"})})]},k.key)})}),o.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[o.jsx(Fe,{type:"button",variant:"ghost",size:"sm",className:"h-8 px-3 text-xs",onClick:j,children:"Close"}),o.jsx(Fe,{type:"button",variant:"default",size:"sm",className:"h-8 px-3 text-xs",onClick:()=>{JM(t,l),r?.(),i(!1)},children:"Apply"})]})]})})})]})}function PM({filter:e}){return e.kind==="text"?o.jsx(IM,{filter:e}):e.kind==="lookup"?o.jsx($M,{filter:e}):e.kind==="lookup-multi"?o.jsx(FM,{filter:e}):e.kind==="enum"?o.jsx(DM,{filter:e}):e.kind==="boolean"?o.jsx(BM,{filter:e}):e.kind==="select-multi"?o.jsx(UM,{filter:e}):e.kind==="multi"?o.jsx(K5,{filter:e,grow:!0}):e.kind==="nested-multi"?o.jsx(i3,{filter:e,grow:!0}):o.jsx(o3,{filter:e,grow:!0})}function ci(e){return`filterbar-overflow-${e.key}`}function hm(e){return e.map(t=>({value:t.value,label:t.label??t.value,...t.disabled!==void 0?{disabled:t.disabled}:{}}))}function ag(e){return R("h-8 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring",e&&"cursor-not-allowed opacity-60")}function IM({filter:e}){const[t,n]=Ju(e.value,e.onChange);return o.jsx("input",{id:ci(e),type:"text","aria-label":e.label,className:ag(e.disabled),...e.placeholder!==void 0?{placeholder:e.placeholder}:{},value:t,disabled:e.disabled,onChange:r=>n(r.target.value)})}function $M({filter:e}){const[t,n]=Ju(e.value,e.onChange);return e.inputType==="date"?o.jsx(um,{id:ci(e),"aria-label":e.label,className:"w-full",inputClassName:ag(e.disabled),buttonClassName:"right-1",placeholder:e.placeholder,value:t,disabled:e.disabled,onChange:n}):e.inputType==="number"?o.jsx("input",{id:ci(e),type:"number","aria-label":e.label,className:ag(e.disabled),placeholder:e.placeholder,value:t,disabled:e.disabled,onChange:r=>n(r.target.value)}):o.jsx(er,{id:ci(e),options:hm(e.options),value:e.value,onChange:e.onChange,allowCustomValue:!1,size:"sm",className:"w-full",...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.disabled!==void 0?{disabled:e.disabled}:{}})}function FM({filter:e}){return o.jsx(er,{multiple:!0,id:ci(e),options:hm(e.options),value:e.value,onChange:e.onChange,allowCustomValue:!1,size:"sm",className:"w-full",...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.disabled!==void 0?{disabled:e.disabled}:{}})}function X5(e){return e.map(t=>({value:t.value,label:t.label??t.value}))}function DM({filter:e}){return o.jsx(er,{id:ci(e),options:X5(e.options),value:e.value,onChange:e.onChange,allowCustomValue:!1,size:"sm",...e.placeholder!==void 0?{placeholder:e.placeholder}:{},className:"w-full",...e.disabled!==void 0?{disabled:e.disabled}:{}})}function BM({filter:e}){return o.jsx("div",{className:"flex h-8 items-center",children:o.jsx("input",{id:ci(e),type:"checkbox","aria-label":e.label,className:"h-4 w-4 accent-primary",checked:e.value,disabled:e.disabled,onChange:t=>e.onChange(t.target.checked)})})}function UM({filter:e}){return o.jsx(Q5,{options:e.options,value:e.value,onChange:e.onChange,ariaLabel:`${e.label} filter`,...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.disabled!==void 0?{disabled:e.disabled}:{},triggerClassName:"h-8 w-full rounded-md border border-input bg-background px-2 text-sm shadow-none",menuClassName:"left-auto right-0"})}function zM({kind:e,label:t,from:n="",to:r="",onApply:s,presets:i,timeEnabled:l,timeZone:u,timeZones:d,fromPlaceholder:f,toPlaceholder:p,emptyLabel:h}){return o.jsx("div",{className:"w-72 p-3 text-popover-foreground",children:o.jsx(y2,{kind:e,label:t,align:"left",from:n,to:r,onApply:s,...i?{presets:i}:{},...l!==void 0?{timeEnabled:l}:{},...u?{timeZone:u}:{},...d?{timeZones:d}:{},...f?{fromPlaceholder:f}:{},...p?{toPlaceholder:p}:{},...h?{emptyLabel:h}:{},panelClassName:"left-0 right-auto"})})}function e3({filter:e,grow:t}){return o.jsx(er,{...fm(e),options:X5(e.options),value:e.value,onChange:e.onChange,allowCustomValue:!1,size:"sm",...e.placeholder!==void 0?{placeholder:e.placeholder}:{},className:R(vu(t),e.className),...e.disabled!==void 0?{disabled:e.disabled}:{}})}function t3({filter:e}){return o.jsxs("label",{title:e.description,className:R("flex h-8 shrink-0 items-center gap-2 rounded-md border border-input bg-muted/30 px-2 text-xs",e.disabled&&"opacity-60",e.className),children:[o.jsx("input",{type:"checkbox","aria-label":e.label,className:"h-3.5 w-3.5 accent-primary",checked:e.value,disabled:e.disabled,onChange:t=>e.onChange(t.target.checked)}),o.jsx(N2,{icon:e.icon,label:e.label})]})}function VM({search:e}){const[t,n]=Ju(e.value,e.onChange);return o.jsx("div",{className:"flex min-w-0 flex-[1_1_14rem] items-center gap-2 md:min-w-[14rem] md:max-w-[24rem]",children:o.jsxs("label",{className:R("flex h-8 min-w-0 flex-1 items-center rounded-md border border-input bg-background px-3 text-sm",e.className),children:[t.trim()?o.jsx("span",{className:"mr-2 whitespace-nowrap text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e.ariaLabel??"Search"}):o.jsx(K,{icon:$s,className:"mr-2 shrink-0 text-muted-foreground"}),o.jsx("input",{type:"search","aria-label":e.ariaLabel??e.placeholder??"Search",className:"w-full bg-transparent outline-none placeholder:text-muted-foreground",placeholder:e.placeholder??"Search…",value:t,onChange:r=>n(r.target.value)})]})})}function n3({filter:e,grow:t}){const[n,r]=Ju(e.value,e.onChange);return o.jsxs("label",{title:e.description,className:R("flex h-8 items-center gap-2 rounded-md border border-input bg-muted/30 pl-2 pr-2 text-xs",t?"min-w-[12rem] max-w-[18rem] flex-1":"min-w-[11rem] max-w-[15rem] shrink-0",e.disabled&&"opacity-60",e.className),children:[o.jsx(N2,{icon:e.icon,label:e.label}),o.jsx("input",{type:"text","aria-label":e.label,className:"w-full min-w-0 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",...e.placeholder!==void 0?{placeholder:e.placeholder}:{},value:n,disabled:e.disabled,onChange:s=>r(s.target.value)})]})}function N2({icon:e,label:t}){return o.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap font-medium uppercase tracking-wide text-muted-foreground",children:[o.jsx(Zr,{icon:e,className:"text-[13px] normal-case"}),t]})}function r3({filter:e,grow:t}){const[n,r]=Ju(e.value,e.onChange);if(e.inputType==="date"||e.inputType==="number"){const s=e.inputType==="date"&&n?j2(n):void 0;return o.jsxs("label",{title:s??e.description,className:R("flex h-8 items-center gap-2 rounded-md border border-input bg-muted/30 pl-2 pr-2 text-xs",vu(t),e.disabled&&"opacity-60",e.className),children:[o.jsx(N2,{icon:e.icon,label:e.label}),e.inputType==="date"?o.jsx(um,{"aria-label":e.label,className:"w-full",inputClassName:"w-full min-w-0 border-0 bg-transparent px-0 pr-6 text-sm text-foreground shadow-none focus-visible:ring-0",buttonClassName:"right-0",placeholder:e.placeholder,value:n,disabled:e.disabled,onChange:r}):o.jsx("input",{type:"number","aria-label":e.label,className:"w-full min-w-0 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",placeholder:e.placeholder,value:n,disabled:e.disabled,onChange:i=>r(i.target.value)})]})}return o.jsx(er,{...fm(e),options:hm(e.options),value:e.value,onChange:e.onChange,allowCustomValue:!1,size:"sm",className:R(vu(t),e.className),...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.disabled!==void 0?{disabled:e.disabled}:{}})}function s3({filter:e,grow:t}){return o.jsx(er,{multiple:!0,...fm(e),options:hm(e.options),value:e.value,onChange:e.onChange,allowCustomValue:!1,size:"sm",className:R(vu(t),e.className),...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.onSearch!==void 0?{onSearch:e.onSearch}:{},...e.loading!==void 0?{loading:e.loading}:{},...e.disabled!==void 0?{disabled:e.disabled}:{}})}function o3({filter:e,grow:t}){const[n,r]=w.useState(!1),s=C2(n,r),i=u3(e),[l,u]=c3(e.value,e.onChange),d=El(Fs(l.min)??i.min,i.min,i.max),f=El(Fs(l.max)??i.max,i.min,i.max),p=Math.min(d,f),h=Math.max(d,f),x=KM(e,i,l);return o.jsxs("div",{title:e.description,className:R("inline-flex min-w-0",t?"min-w-[8rem] max-w-[12rem] flex-1":"shrink-0",e.disabled&&"opacity-60",e.className),children:[o.jsxs(Fe,{ref:s.refs.setReference,type:"button",variant:"outline",size:"sm","aria-label":`${e.label} filter`,disabled:e.disabled,className:R("min-w-0 gap-2 font-normal",t?"w-full max-w-[12rem] justify-between":"w-auto max-w-[9.5rem] px-2.5",x===e.label&&"text-muted-foreground"),...s.getReferenceProps(),children:[o.jsx(Zr,{icon:e.icon,className:"text-[14px] text-muted-foreground"}),o.jsx("span",{className:"truncate",children:x}),o.jsx(K,{icon:n?Ku:Vt,className:"text-muted-foreground"})]}),n&&o.jsx(ha,{children:o.jsx(ga,{context:s.context,modal:!1,children:o.jsxs("div",{ref:s.refs.setFloating,role:"dialog","aria-label":e.label,style:{...s.floatingStyles,zIndex:s.floatingZ},className:"min-w-[18rem] max-w-[22rem] rounded-md border border-border bg-popover p-3 text-popover-foreground shadow-lg shadow-black/5",...s.getFloatingProps(),children:[o.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e.label}),o.jsx("button",{type:"button",className:"text-[10px] text-primary disabled:text-muted-foreground",onClick:()=>{u({}),e.onChange({})},disabled:!String(l.min??"").trim()&&!String(l.max??"").trim(),children:"Clear all"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted-foreground",children:[o.jsx("span",{children:si(i.min,e)}),o.jsx("span",{children:si(i.max,e)})]}),o.jsx("div",{className:"relative h-6",children:o.jsx(Z5,{min:i.min,max:i.max,step:i.step,value:[p,h],ariaLabelMin:`${e.label} minimum slider`,ariaLabelMax:`${e.label} maximum slider`,onChange:([v,y])=>u(d3([v,y],i))})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("label",{className:"text-[10px] text-muted-foreground",children:"Min"}),o.jsx("input",{type:"number",inputMode:"decimal",step:i.step,"aria-label":`${e.label} minimum`,className:"h-8 w-full rounded-md border border-input bg-background px-2 text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring",...e.minPlaceholder!==void 0?{placeholder:e.minPlaceholder}:{},value:l.min??"",onChange:v=>u(w0({min:v.target.value,max:l.max??""},"min-input"))})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("label",{className:"text-[10px] text-muted-foreground",children:"Max"}),o.jsx("input",{type:"number",inputMode:"decimal",step:i.step,"aria-label":`${e.label} maximum`,className:"h-8 w-full rounded-md border border-input bg-background px-2 text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring",...e.maxPlaceholder!==void 0?{placeholder:e.maxPlaceholder}:{},value:l.max??"",onChange:v=>u(w0({min:l.min??"",max:v.target.value},"max-input"))})]})]})]})]})})})]})}function HM({filter:e,chrome:t="full"}){const n=u3(e),[r,s]=c3(e.value,e.onChange),i=El(Fs(r.min)??n.min,n.min,n.max),l=El(Fs(r.max)??n.max,n.min,n.max),u=Math.min(i,l),d=Math.max(i,l),f=t==="embedded";return o.jsxs("div",{"data-filter-panel-chrome":t,className:R("min-w-[18rem] max-w-[22rem] text-popover-foreground",f?"p-0":"rounded-md border border-border bg-popover p-3 shadow-sm shadow-black/5"),children:[!f&&o.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e.label}),o.jsx("button",{type:"button",className:"text-[10px] text-primary disabled:text-muted-foreground",onClick:()=>{s({}),e.onChange({})},disabled:!String(r.min??"").trim()&&!String(r.max??"").trim(),children:"Clear all"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted-foreground",children:[o.jsx("span",{children:si(n.min,e)}),o.jsx("span",{children:si(n.max,e)})]}),o.jsx("div",{className:"relative h-6",children:o.jsx(Z5,{min:n.min,max:n.max,step:n.step,value:[u,d],ariaLabelMin:`${e.label} minimum slider`,ariaLabelMax:`${e.label} maximum slider`,onChange:([p,h])=>s(d3([p,h],n))})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("label",{className:"text-[10px] text-muted-foreground",children:"Min"}),o.jsx("input",{type:"number",inputMode:"decimal",step:n.step,"aria-label":`${e.label} minimum`,className:"h-8 w-full rounded-md border border-input bg-background px-2 text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring",...e.minPlaceholder!==void 0?{placeholder:e.minPlaceholder}:{},value:r.min??"",onChange:p=>s(w0({min:p.target.value,max:r.max??""},"min-input"))})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("label",{className:"text-[10px] text-muted-foreground",children:"Max"}),o.jsx("input",{type:"number",inputMode:"decimal",step:n.step,"aria-label":`${e.label} maximum`,className:"h-8 w-full rounded-md border border-input bg-background px-2 text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring",...e.maxPlaceholder!==void 0?{placeholder:e.maxPlaceholder}:{},value:r.max??"",onChange:p=>s(w0({min:r.min??"",max:p.target.value},"max-input"))})]})]})]})]})}function ZM({filter:e,chrome:t="full"}){var n;const[r,s]=w.useState(((n=e.groups[0])==null?void 0:n.groupKey)??null),[i,l]=dm(e.value,e.onChange),u=e.groups,d=t==="embedded",f=w.useMemo(()=>u.find(v=>v.groupKey===r)??u[0]??null,[u,r]),p=w.useMemo(()=>{const v={};for(const y of u){let b=0;for(const j of y.options)i[j.value]&&(b+=1);v[y.groupKey]=b}return v},[u,i]),h=w.useMemo(()=>{const v=[],y=[];for(const b of u)(p[b.groupKey]??0)>0?v.push(b):y.push(b);return[...v,...y]},[u,p]),x=v=>{const y=u.find(j=>j.groupKey===v);if(!y)return;const b={...i};for(const j of y.options)delete b[j.value];l(b)};return o.jsxs("div",{role:"dialog",className:"flex",children:[o.jsxs("div",{"data-filter-panel-chrome":t,className:R("min-w-[14rem] max-w-[16rem] text-popover-foreground",d?"p-0":"rounded-md border border-border bg-popover p-2 shadow-sm shadow-black/5"),children:[!d&&o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e.label}),o.jsx("button",{type:"button",className:"text-[10px] text-primary disabled:text-muted-foreground",onClick:()=>l({}),disabled:Object.keys(i).length===0,children:"Clear all"})]}),o.jsxs("div",{className:"max-h-72 space-y-0.5 overflow-auto",children:[h.map(v=>{const y=p[v.groupKey]??0,b=v.groupKey===r;return o.jsxs("div",{role:"button",tabIndex:0,onMouseEnter:()=>s(v.groupKey),onFocus:()=>s(v.groupKey),onClick:()=>s(v.groupKey),onKeyDown:j=>{(j.key==="Enter"||j.key===" "||j.key==="ArrowRight")&&(j.preventDefault(),s(v.groupKey))},className:R("flex cursor-pointer items-center justify-between gap-2 rounded-md px-1.5 py-0.5 text-sm","hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none",b&&"bg-accent/60"),children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:v.label??v.groupKey}),y>0&&o.jsxs("span",{className:"rounded-full bg-primary/15 px-1.5 text-[10px] font-medium text-primary",children:[y,"/",v.options.length]}),o.jsx(K,{icon:ds,className:"shrink-0 text-muted-foreground"})]},v.groupKey)}),u.length===0&&o.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:"No groups"})]})]}),f&&o.jsxs("div",{onMouseEnter:()=>s(f.groupKey),className:"ml-1.5 min-w-[16rem] max-w-[20rem] rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-sm shadow-black/5",children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:f.label??f.groupKey}),o.jsx("button",{type:"button",className:"text-[10px] text-primary disabled:text-muted-foreground",onClick:()=>x(f.groupKey),disabled:(p[f.groupKey]??0)===0,children:"Clear"})]}),o.jsxs("div",{className:"max-h-72 space-y-0.5 overflow-auto",children:[f.options.map(v=>{const y=i[v.value]??"neutral",b=v.title??xu(v);return o.jsx("div",{role:"button",tabIndex:0,"data-filter-option":v.value,className:"rounded-md px-1.5 py-0.5 hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none",onClick:()=>l(fo(i,v.value,Sl(y))),onKeyDown:j=>{j.key==="Enter"||j.key===" "?(j.preventDefault(),l(fo(i,v.value,Sl(y)))):j.key==="ArrowLeft"&&(j.preventDefault(),s(null))},children:o.jsx(Dl,{className:"w-full justify-between",label:a3(v,f.groupKey),mode:y,title:b,togglePosition:"right",onModeChange:j=>l(fo(i,v.value,j))})},v.value)}),f.options.length===0&&o.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:"No values"})]})]})]})}function i3({filter:e,grow:t}){const[n,r]=w.useState(!1),[s,i]=w.useState(null),[l,u]=dm(e.value,e.onChange),d=C2(n,b=>{r(b),b||i(null)}),f=lM(e.label,l),p=e.groups,h=w.useMemo(()=>p.find(b=>b.groupKey===s)??null,[p,s]),x=w.useMemo(()=>{const b={};for(const j of p){let S=0;for(const N of j.options)l[N.value]&&(S+=1);b[j.groupKey]=S}return b},[p,l]),v=w.useMemo(()=>{const b=[],j=[];for(const S of p)(x[S.groupKey]??0)>0?b.push(S):j.push(S);return[...b,...j]},[p,x]),y=b=>{const j=p.find(N=>N.groupKey===b);if(!j)return;const S={...l};for(const N of j.options)delete S[N.value];u(S)};return o.jsxs("div",{title:e.description,className:R("inline-flex min-w-0",t?"min-w-[8rem] max-w-[12rem] flex-1":"shrink-0",e.disabled&&"opacity-60",e.className),children:[o.jsxs(Fe,{ref:d.refs.setReference,type:"button",variant:"outline",size:"sm","aria-label":`${e.label} filter`,disabled:e.disabled,className:R("min-w-0 gap-2 font-normal",t?"w-full max-w-[12rem] justify-between":"w-auto max-w-[8.5rem] px-2.5",f===e.label&&"text-muted-foreground"),...d.getReferenceProps(),children:[o.jsx("span",{className:"truncate",children:f}),o.jsx(K,{icon:n?Ku:Vt,className:"text-muted-foreground"})]}),n&&o.jsx(ha,{children:o.jsx(ga,{context:d.context,modal:!1,children:o.jsxs("div",{ref:d.refs.setFloating,role:"dialog","aria-label":e.label,style:{...d.floatingStyles,zIndex:d.floatingZ},className:"flex",...d.getFloatingProps(),children:[o.jsxs("div",{className:"min-w-[14rem] max-w-[16rem] rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-lg shadow-black/5",children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e.label}),o.jsx("button",{type:"button",className:"text-[10px] text-primary disabled:text-muted-foreground",onClick:()=>u({}),disabled:Object.keys(l).length===0,children:"Clear all"})]}),o.jsxs("div",{className:"max-h-72 space-y-0.5 overflow-auto",children:[v.map(b=>{const j=x[b.groupKey]??0,S=b.groupKey===s;return o.jsxs("div",{role:"button",tabIndex:0,onMouseEnter:()=>i(b.groupKey),onFocus:()=>i(b.groupKey),onClick:()=>i(b.groupKey),onKeyDown:N=>{(N.key==="Enter"||N.key===" "||N.key==="ArrowRight")&&(N.preventDefault(),i(b.groupKey))},className:R("flex cursor-pointer items-center justify-between gap-2 rounded-md px-1.5 py-0.5 text-sm","hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none",S&&"bg-accent/60"),children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:b.label??b.groupKey}),j>0&&o.jsxs("span",{className:"rounded-full bg-primary/15 px-1.5 text-[10px] font-medium text-primary",children:[j,"/",b.options.length]}),o.jsx(K,{icon:ds,className:"shrink-0 text-muted-foreground"})]},b.groupKey)}),p.length===0&&o.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:"No groups"})]})]}),h&&o.jsxs("div",{onMouseEnter:()=>i(h.groupKey),className:"ml-1.5 min-w-[16rem] max-w-[20rem] rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-lg shadow-black/5",children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:h.label??h.groupKey}),o.jsx("button",{type:"button",className:"text-[10px] text-primary disabled:text-muted-foreground",onClick:()=>y(h.groupKey),disabled:(x[h.groupKey]??0)===0,children:"Clear"})]}),o.jsxs("div",{className:"max-h-72 space-y-0.5 overflow-auto",children:[h.options.map(b=>{const j=l[b.value]??"neutral",S=b.title??xu(b);return o.jsx("div",{role:"button",tabIndex:0,"data-filter-option":b.value,className:"rounded-md px-1.5 py-0.5 hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none",onClick:()=>u(fo(l,b.value,Sl(j))),onKeyDown:N=>{N.key==="Enter"||N.key===" "?(N.preventDefault(),u(fo(l,b.value,Sl(j)))):N.key==="ArrowLeft"&&(N.preventDefault(),i(null))},children:o.jsx(Dl,{className:"w-full justify-between",label:a3(b,h.groupKey),mode:j,title:S,togglePosition:"right",onModeChange:N=>u(fo(l,b.value,N))})},b.value)}),h.options.length===0&&o.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:"No values"})]})]})]})})})]})}function a3(e,t){if(typeof e.label=="string"){const n=`${t}=`;return e.label.startsWith(n)?e.label.slice(n.length):e.label}return e.label??e.value}function l3({filter:e,grow:t}){return o.jsxs("label",{title:e.description,className:R("flex h-8 items-center gap-2 rounded-md border border-input bg-muted/30 pl-2 pr-1 text-xs",t?"min-w-[12rem] max-w-[18rem] flex-1":"min-w-[11rem] max-w-[15rem] shrink-0",e.disabled&&"opacity-60",e.className),children:[o.jsx("span",{className:"whitespace-nowrap font-medium uppercase tracking-wide text-muted-foreground",children:e.label}),o.jsx(Q5,{options:e.options,value:e.value,onChange:e.onChange,ariaLabel:`${e.label} filter`,...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.disabled!==void 0?{disabled:e.disabled}:{},triggerClassName:"h-6 min-w-0 border-0 bg-transparent px-1 text-xs shadow-none focus-visible:ring-0",menuClassName:"left-auto right-0"})]})}function Sy({kind:e,label:t,from:n="",to:r="",onApply:s,presets:i,timeEnabled:l,timeZone:u,timeZones:d,fromPlaceholder:f,toPlaceholder:p,emptyLabel:h,className:x}){return o.jsx(y2,{kind:e,label:t,from:n,to:r,onApply:s,...i?{presets:i}:{},...l!==void 0?{timeEnabled:l}:{},...u?{timeZone:u}:{},...d?{timeZones:d}:{},...f?{fromPlaceholder:f}:{},...p?{toPlaceholder:p}:{},...h?{emptyLabel:h}:{},...x?{className:x}:{}})}function C2(e,t,n="bottom-start"){const r=xa(),{refs:s,floatingStyles:i,context:l}=Zu({open:e,onOpenChange:t,placement:n,whileElementsMounted:$u,middleware:[Fu(6),Bu({padding:8}),Du({padding:8})]}),{getReferenceProps:u,getFloatingProps:d}=Wu([Vu(l),Hu(l,{escapeKey:!1}),qu(l,{role:"dialog"})]);return wo(e,()=>{t(!1),s.domReference.current instanceof HTMLElement&&s.domReference.current.focus()}),{refs:s,floatingStyles:i,context:l,floatingZ:r,getReferenceProps:u,getFloatingProps:d}}function WM(e){const[t,n]=w.useState(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches);return w.useEffect(()=>{var r;if(typeof window>"u"||!window.matchMedia)return;const s=window.matchMedia(e),i=()=>n(s.matches);return i(),(r=s.addEventListener)==null||r.call(s,"change",i),()=>{var l;return(l=s.removeEventListener)==null?void 0:l.call(s,"change",i)}},[e]),t}function Ju(e,t){const{autoSubmit:n}=w.useContext(Bl),[r,s]=w.useState(e),i=w.useRef(t);return w.useEffect(()=>{i.current=t},[t]),w.useEffect(()=>{s(e)},[e]),w.useEffect(()=>{if(r===e)return;if(!n){i.current(r);return}const l=window.setTimeout(()=>{i.current(r)},w2);return()=>window.clearTimeout(l)},[n,r,e]),[r,s]}function c3(e,t){const{autoSubmit:n}=w.useContext(Bl),[r,s]=w.useState(e),i=w.useRef(t);return w.useEffect(()=>{i.current=t},[t]),w.useEffect(()=>{s(e)},[e.max,e.min]),w.useEffect(()=>{if(qM(r,e))return;if(!n){i.current(r);return}const l=window.setTimeout(()=>{i.current(r)},w2);return()=>window.clearTimeout(l)},[n,r,e]),[r,s]}function qM(e,t){return(e.min??"")===(t.min??"")&&(e.max??"")===(t.max??"")}function u3(e){const t=Fs(e.value.min),n=Fs(e.value.max),r=t??0,s=n??Math.max(r+100,100),i=e.domainMin??Math.min(r,s),l=e.domainMax??Math.max(s,i+100),u=e.step&&e.step>0?e.step:1;return{min:i,max:l<=i?i+u:l,step:u}}function KM(e,t,n){const r=Fs(n.min),s=Fs(n.max),i=String(n.min??"").trim()!=="",l=String(n.max??"").trim()!=="";if(!i&&!l)return e.label;const u=r==null?si(t.min,e):si(r,e),d=s==null?si(t.max,e):si(s,e);return i&&l?u===d?`${e.label} ${u}`:`${e.label} ${u}-${d}`:i?`${e.label} >=${u}`:`${e.label} <=${d}`}function w0(e,t){let n=e.min??"",r=e.max??"";const s=Fs(n),i=Fs(r);return s!=null&&i!=null&&s>i&&(t.startsWith("min")?r=n:n=r),{min:n,max:r}}function d3(e,t){const[n,r]=e;return{min:n<=t.min?"":lg(El(n,t.min,t.max)),max:r>=t.max?"":lg(El(r,t.min,t.max))}}function Fs(e){if(!e?.trim())return null;const t=Number(e);return Number.isFinite(t)?t:null}function El(e,t,n){return Math.min(n,Math.max(t,e))}function si(e,t){return t.formatValue?t.formatValue(e):lg(e)}function lg(e){return Number.isInteger(e)?String(e):String(Number(e.toFixed(6)))}function Ih(e){return Object.fromEntries(e.map(t=>[t.key,_0(t)]))}function _0(e){return e.value}function GM(e,t,n){return e.kind==="text"?{...e,value:String(t??""),onChange:r=>n(r)}:e.kind==="lookup"?{...e,value:String(t??""),onChange:r=>n(r)}:e.kind==="lookup-multi"?{...e,value:Array.isArray(t)?t.map(String):[],onChange:r=>n(r)}:e.kind==="multi"?{...e,value:cg(t)?t:{},onChange:r=>n(r)}:e.kind==="nested-multi"?{...e,value:cg(t)?t:{},onChange:r=>n(r)}:e.kind==="select-multi"?{...e,value:Array.isArray(t)?t.map(String):[],onChange:r=>n(r)}:e.kind==="number"?{...e,value:f3(t)?t:{},onChange:r=>n(r)}:e.kind==="enum"?{...e,value:String(t??""),onChange:r=>n(r)}:{...e,value:!!t,onChange:r=>n(r)}}function JM(e,t){for(const n of e){const r=t[n.key]??_0(n);YM(_0(n),r)||QM(n,r)}}function QM(e,t){if(e.kind==="text"||e.kind==="lookup"||e.kind==="enum"){e.onChange(String(t??""));return}if(e.kind==="lookup-multi"||e.kind==="select-multi"){e.onChange(Array.isArray(t)?t.map(String):[]);return}if(e.kind==="number"){e.onChange(f3(t)?t:{});return}if(e.kind==="boolean"){e.onChange(!!t);return}e.onChange(cg(t)?t:{})}function YM(e,t){return JSON.stringify(e)===JSON.stringify(t)}function f3(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function cg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function XM(e,t){if(e.length===0)return 0;let n=0,r=0;for(const s of e){const i=n+(r>0?k2:0)+s;if(i>t)break;n=i,r+=1}return r}function eA(e){return e.length===0?0:e.reduce((t,n)=>t+n,0)+(e.length-1)*k2}function tA(e){return e.kind==="boolean"?Math.max(88,e.label.length*8+40):e.kind==="multi"?176:e.kind==="nested-multi"?136:e.kind==="number"?152:Math.max(144,e.label.length*8+96)}function m3({node:e,depth:t=0,expandAll:n=null,forcedOpenKeys:r=null,selected:s=null,defaultOpen:i,getChildren:l,getKey:u,onSelect:d,renderRow:f,rowClass:p,indentPx:h=16,basePaddingPx:x=8,isSecondary:v,hasMoreChildren:y,loadChildren:b}){const[j,S]=w.useState(null),[N,k]=w.useState(!1),[T,E]=w.useState(null),O=l(e),M=j??O,L=(M?.length??0)>0,F=(y?.(e)??!1)&&j===null,U=L||F,z=v?.(e)??!1,V=L&&v!=null&&M.every(je=>v(je)),X=z||V,H=n!==null&&!X?n:i?i(e,t):t<1,[B,W]=w.useState(H),se=w.useRef(n),P=s===e,J=u(e),$=(r?.has(J)??!1)||B;w.useEffect(()=>{n!==null&&n!==se.current&&!X&&W(n),se.current=n},[n,X]);const Q=w.useRef(!1),ae=u(e),ie=w.useRef(ae);function de(){!b||Q.current||(Q.current=!0,ie.current=ae,k(!0),E(null),b(e).then(je=>{ie.current===ae&&(S(je),k(!1))}).catch(je=>{ie.current===ae&&(Q.current=!1,E(je),k(!1))}))}function ge(){U&&W(je=>{const Ue=!je;return Ue&&F&&de(),Ue})}const Le=p?p(e,P):P?"bg-primary/10 border-l-2 border-primary":"hover:bg-accent";return o.jsxs("div",{role:"treeitem","aria-expanded":U?$:void 0,"aria-selected":P,children:[o.jsxs("div",{className:R("flex items-center gap-1.5 py-1 px-2 cursor-pointer text-sm",Le),style:{paddingLeft:`${t*h+x}px`},onClick:je=>{je.stopPropagation(),d?.(e),ge()},children:[U?o.jsx("button",{type:"button","aria-label":$?"Collapse":"Expand",onClick:je=>{je.stopPropagation(),ge()},className:"flex shrink-0 items-center text-muted-foreground",children:o.jsx(K,{icon:$?Vt:ds,className:"text-xs w-3"})}):o.jsx("span",{className:"w-3 shrink-0","aria-hidden":!0}),f({node:e,depth:t,open:$,selected:P,hasChildren:L,toggle:ge,loading:N,error:T})]}),$&&L&&o.jsx("div",{role:"group",children:M.map(je=>o.jsx(m3,{node:je,depth:t+1,expandAll:n,forcedOpenKeys:r,selected:s,getChildren:l,getKey:u,renderRow:f,indentPx:h,basePaddingPx:x,...i?{defaultOpen:i}:{},...d?{onSelect:d}:{},...p?{rowClass:p}:{},...v?{isSecondary:v}:{},...y?{hasMoreChildren:y}:{},...b?{loadChildren:b}:{}},u(je)))})]})}const nA=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",children:[o.jsx("path",{d:"M4.5 5.5L8 2L11.5 5.5",stroke:"#6C707E",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.5 10.5L8 14L11.5 10.5",stroke:"#6C707E",strokeLinecap:"round",strokeLinejoin:"round"})]})}),{__source:"jb-expui-general:expandAll",__viewBox:"0 0 16 16",__group:"ui-controls",__consumerName:"expand-all",displayName:"UiExpandAll"}),rA=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",children:[o.jsx("path",{d:"M4.5 2.5L8 6L11.5 2.5",stroke:"#6C707E",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.5 13.5L8 10L11.5 13.5",stroke:"#6C707E",strokeLinecap:"round",strokeLinejoin:"round"})]})}),{__source:"jb-expui-general:collapseAll",__viewBox:"0 0 16 16",__group:"ui-controls",__consumerName:"collapse-all",displayName:"UiCollapseAll"});function sA(e,t,n,r){const s=n(r),i=[],l=u=>{if(n(u)===s)return!0;for(const d of t(u)??[])if(l(d))return i.push(n(u)),!0;return!1};for(const u of e)if(l(u))return i.length?new Set(i):null;return null}function oA(e,t){return e?t?new Set([...e,...t]):e:t}function iA(e,t){let n=0;const r=[...e];for(;r.length>0;){const s=r.pop(),i=t(s)??[];n+=i.length,r.push(...i)}return n}function qf(e,t=new Set,n=new Set){if(e==null||t.has(e))return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);if(typeof e!="object"||n.has(e))return"";if(n.add(e),Array.isArray(e))return e.map(l=>qf(l,t,n)).filter(Boolean).join(" ");const r=["label","name","title","text","plain","id","content"],s=e,i=[];for(const l of r){if(!(l in s))continue;const u=qf(s[l],t,n);u&&i.push(u)}for(const[l,u]of Object.entries(s)){if(l==="children"||r.includes(l))continue;const d=qf(u,t,n);d&&i.push(d)}return i.join(" ")}function aA(e,t){const n=new Set;return t&&n.add(t),qf(e,n).trim().toLowerCase()}function lA(e,t,n,r,s,i){const l=r.trim().toLowerCase();if(!l)return{roots:e,filteredChildren:null,forcedOpenKeys:null};const u=new Map,d=new Set;function f(h,x){if(i)return i(h).trim().toLowerCase();const v=x.filter(y=>!s?.(y));return aA(h,v)}function p(h){if(s?.(h))return!1;const x=n(h),v=t(h)??[],y=v.length>0&&v.every(S=>s?.(S)),b=f(h,v).includes(l),j=[];for(const S of v)p(S)&&j.push(S);return b?(v.length>0&&(u.set(x,v),y||d.add(x)),!0):j.length>0?(u.set(x,j),d.add(x),!0):!1}return{roots:e.filter(h=>p(h)),filteredChildren:u,forcedOpenKeys:d}}function Qu({roots:e,empty:t,className:n,showControls:r=!0,expandAll:s,onExpandAllChange:i,toolbarClassName:l,getSearchText:u,revealSelected:d=!1,...f}){const[p,h]=w.useState(null),[x,v]=w.useState(""),y=f.basePaddingPx??8,b=i!==void 0,j=b?s??null:p,N=w.useMemo(()=>iA(e,f.getChildren),[e,f.getChildren])>20,k=N?x:"",T=w.useMemo(()=>lA(e,f.getChildren,f.getKey,k,f.isSecondary,u),[e,f.getChildren,f.getKey,k,f.isSecondary,u]),E=T.roots,O=T.filteredChildren,M=w.useMemo(()=>d&&f.selected?sA(e,f.getChildren,f.getKey,f.selected):null,[d,e,f.getChildren,f.getKey,f.selected]),L=w.useMemo(()=>oA(T.forcedOpenKeys,M),[T.forcedOpenKeys,M]),F=O?B=>O.get(f.getKey(B))??[]:f.getChildren,U=j,z=k.trim()?o.jsx("div",{className:"px-3 py-4 text-sm text-muted-foreground",children:"No matching tree nodes."}):t,V=r&&e.length>0,X=N||V,H=B=>{b?i?.(B):h(B)};return E.length===0&&!X?o.jsx(o.Fragment,{children:z??null}):o.jsx("div",{className:R("flex flex-col min-h-0",n),children:o.jsxs("div",{role:"tree",className:"min-h-0 flex-1 overflow-auto",children:[X&&o.jsxs("div",{role:"presentation",className:R("sticky top-0 z-10 flex items-center gap-1.5 border-b border-border/70 bg-background/95 py-1 pr-2 text-sm backdrop-blur supports-[backdrop-filter]:bg-background/80",l),style:{paddingLeft:`${y}px`},children:[N?o.jsx(K,{icon:$s,className:"w-3 shrink-0 text-xs text-muted-foreground"}):o.jsx("span",{className:"w-3 shrink-0","aria-hidden":!0}),N?o.jsxs("label",{className:"flex min-w-0 flex-1 items-center gap-2 rounded-md border border-border bg-background px-2 py-1 text-xs text-foreground shadow-sm",children:[o.jsx("input",{type:"search",value:x,onChange:B=>v(B.target.value),placeholder:"Filter tree",className:"h-5 w-full min-w-0 border-0 bg-transparent p-0 text-xs outline-none placeholder:text-muted-foreground","aria-label":"Filter tree nodes"}),x&&o.jsx("button",{type:"button",onClick:()=>v(""),className:"inline-flex items-center rounded p-0.5 text-muted-foreground hover:bg-accent hover:text-accent-foreground","aria-label":"Clear tree filter",title:"Clear tree filter",children:o.jsx(K,{icon:Tn,className:"text-xs"})})]}):o.jsx("span",{className:"flex-1"}),V&&o.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[o.jsx("button",{type:"button",onClick:()=>H(!0),"aria-pressed":U===!0,"aria-label":"Expand all",title:"Expand all",disabled:k.trim().length>0,className:R("inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",U===!0&&"bg-accent text-accent-foreground"),children:o.jsx(K,{icon:nA,className:"text-sm"})}),o.jsx("button",{type:"button",onClick:()=>H(!1),"aria-pressed":U===!1,"aria-label":"Collapse all",title:"Collapse all",disabled:k.trim().length>0,className:R("inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",U===!1&&"bg-accent text-accent-foreground"),children:o.jsx(K,{icon:rA,className:"text-sm"})})]})]}),E.length===0?z??null:o.jsx(o.Fragment,{children:E.map(B=>w.createElement(m3,{...f,key:f.getKey(B),node:B,expandAll:U,forcedOpenKeys:L,getChildren:F}))})]})})}var p3={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ey=co.createContext&&co.createContext(p3),cA=["attr","size","title","square"];function uA(e,t){if(e==null)return{};var n=dA(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dA(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i=0)&&(n[s]=e[s]);return n}function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;tco.createElement(t.tag,k0({key:n},t.attr),h3(t.child)))}function Ul(e){var t,n=r=>co.createElement(xA,j0({attr:k0({},e.attr)},r),h3(e.child));return n.viewBox=(t=e.attr)===null||t===void 0?void 0:t.viewBox,n}var hA=2;function gA(e){if(!e)return!1;var t=e.trim().split(/[\s,]+/);if(t.length!==4)return!1;var n=parseFloat(t[2]),r=parseFloat(t[3]);return!isFinite(n)||!isFinite(r)||r<=0?!1:n/r>=hA}function xA(e){var t=n=>{var{attr:r,size:s,title:i,square:l}=e,u=uA(e,cA),d=s||n.size||"1em",f=l??!gA(r?.viewBox),p;return n.className&&(p=n.className),e.className&&(p=(p?p+" ":"")+e.className),co.createElement("svg",j0({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:p,style:k0(k0({color:e.color||n.color},n.style),e.style),height:d,width:f?d:void 0,xmlns:"http://www.w3.org/2000/svg"}),i&&co.createElement("title",null,i),e.children)};return Ey!==void 0?co.createElement(Ey.Consumer,null,n=>t(n)):t(p3)}function Oy(e){return Ul({attr:{viewBox:"0 0 31.980565 32"},child:[{tag:"path",attr:{fillRule:"nonzero",fill:"rgb(85.098039%, 46.666667%, 34.117647%)",fillOpacity:"1",d:"M 6.273438 21.28125 L 12.566406 17.75 L 12.671875 17.441406 L 12.566406 17.273438 L 12.257812 17.273438 L 11.207031 17.207031 L 7.613281 17.109375 L 4.492188 16.980469 L 1.472656 16.820312 L 0.710938 16.65625 L 0 15.71875 L 0.0742188 15.25 L 0.710938 14.820312 L 1.628906 14.898438 L 3.652344 15.035156 L 6.6875 15.246094 L 8.890625 15.375 L 12.152344 15.714844 L 12.671875 15.714844 L 12.746094 15.503906 L 12.570312 15.375 L 12.429688 15.246094 L 9.289062 13.117188 L 5.886719 10.867188 L 4.105469 9.570312 L 3.140625 8.914062 L 2.65625 8.300781 L 2.445312 6.957031 L 3.320312 5.992188 L 4.496094 6.074219 L 4.796875 6.152344 L 5.984375 7.066406 L 8.527344 9.035156 L 11.847656 11.480469 L 12.332031 11.882812 L 12.527344 11.746094 L 12.550781 11.648438 L 12.332031 11.285156 L 10.527344 8.019531 L 8.601562 4.703125 L 7.742188 3.324219 L 7.515625 2.5 C 7.4375 2.160156 7.378906 1.875 7.378906 1.527344 L 8.375 0.175781 L 8.925781 0 L 10.253906 0.175781 L 10.8125 0.664062 L 11.636719 2.550781 L 12.972656 5.523438 L 15.046875 9.5625 L 15.65625 10.761719 L 15.976562 11.871094 L 16.097656 12.210938 L 16.308594 12.210938 L 16.308594 12.015625 L 16.480469 9.738281 L 16.792969 6.945312 L 17.101562 3.347656 L 17.207031 2.335938 L 17.707031 1.121094 L 18.703125 0.464844 L 19.480469 0.839844 L 20.121094 1.753906 L 20.03125 2.34375 L 19.652344 4.816406 L 18.90625 8.6875 L 18.421875 11.277344 L 18.703125 11.277344 L 19.027344 10.953125 L 20.339844 9.210938 L 22.542969 6.460938 L 23.511719 5.367188 L 24.648438 4.160156 L 25.375 3.585938 L 26.75 3.585938 L 27.761719 5.089844 L 27.308594 6.644531 L 25.894531 8.441406 L 24.71875 9.964844 L 23.035156 12.230469 L 21.980469 14.046875 L 22.078125 14.191406 L 22.328125 14.167969 L 26.132812 13.355469 L 28.191406 12.984375 L 30.644531 12.5625 L 31.753906 13.082031 L 31.875 13.609375 L 31.4375 14.6875 L 28.816406 15.335938 L 25.738281 15.949219 L 21.15625 17.035156 L 21.097656 17.074219 L 21.164062 17.15625 L 23.226562 17.351562 L 24.109375 17.398438 L 26.273438 17.398438 L 30.296875 17.699219 L 31.351562 18.394531 L 31.980469 19.242188 L 31.875 19.890625 L 30.253906 20.714844 L 28.070312 20.199219 L 22.96875 18.984375 L 21.21875 18.546875 L 20.976562 18.546875 L 20.976562 18.691406 L 22.433594 20.117188 L 25.105469 22.53125 L 28.453125 25.640625 L 28.621094 26.410156 L 28.191406 27.015625 L 27.738281 26.949219 L 24.800781 24.738281 L 23.667969 23.742188 L 21.097656 21.582031 L 20.929688 21.582031 L 20.929688 21.808594 L 21.519531 22.675781 L 24.644531 27.371094 L 24.804688 28.8125 L 24.578125 29.28125 L 23.769531 29.5625 L 22.878906 29.402344 L 21.050781 26.835938 L 19.164062 23.941406 L 17.640625 21.351562 L 17.457031 21.457031 L 16.558594 31.132812 L 16.136719 31.628906 L 15.164062 32 L 14.355469 31.382812 L 13.925781 30.390625 L 14.355469 28.421875 L 14.871094 25.855469 L 15.292969 23.8125 L 15.675781 21.277344 L 15.902344 20.4375 L 15.886719 20.378906 L 15.699219 20.402344 L 13.789062 23.027344 L 10.882812 26.957031 L 8.582031 29.417969 L 8.03125 29.636719 L 7.078125 29.140625 L 7.164062 28.257812 L 7.699219 27.472656 L 10.882812 23.421875 L 12.800781 20.914062 L 14.042969 19.464844 L 14.03125 19.253906 L 13.960938 19.253906 L 5.503906 24.742188 L 4 24.9375 L 3.351562 24.332031 L 3.429688 23.335938 L 3.738281 23.011719 L 6.28125 21.261719 L 6.269531 21.269531 Z M 6.273438 21.28125 "},child:[]}]})(e)}function My(e){return Ul({attr:{viewBox:"0 0 32 32"},child:[{tag:"defs",attr:{},child:[{tag:"linearGradient",attr:{id:"linear-pattern-0",gradientUnits:"userSpaceOnUse",x1:"0",y1:"1",x2:"0.6873",y2:"0.30395",gradientTransform:"matrix(32, 0, 0, 32, 0, 0)"},child:[{tag:"stop",attr:{offset:"0",stopColor:"rgb(10.980392%, 49.019608%, 100%)",stopOpacity:"1"},child:[]},{tag:"stop",attr:{offset:"0.52021",stopColor:"rgb(10.980392%, 41.176471%, 100%)",stopOpacity:"1"},child:[]},{tag:"stop",attr:{offset:"1",stopColor:"rgb(94.117647%, 86.27451%, 83.921569%)",stopOpacity:"1"},child:[]}]}]},{tag:"path",attr:{fillRule:"nonzero",fill:"url(#linear-pattern-0)",d:"M 16 32 C 14.75 23.738281 8.261719 17.25 0 16 C 8.261719 14.75 14.75 8.261719 16 0 C 17.253906 8.261719 23.738281 14.746094 32 16 C 23.738281 17.253906 17.253906 23.738281 16 32 "},child:[]}]})(e)}function vA(e){return Ul({attr:{role:"img",viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M0 4.8C0 2.14 2.14 0 4.8 0h22.4C29.86 0 32 2.14 32 4.8v22.4c0 2.66-2.14 4.8-4.8 4.8H4.8a4.817 4.817 0 0 1-3.398-1.402A4.8 4.8 0 0 1 0 27.199Zm0 0",fill:"rgb(100%, 100%, 100%)"},child:[]},{tag:"path",attr:{d:"M24.125 25c2.813-2.625 4.063-7 3.313-11.187H16.25v4.624h6.375c-.25 1.5-1.125 2.75-2.375 3.563Zm0 0",fill:"rgb(25.882353%, 52.156863%, 95.686275%)"},child:[]},{tag:"path",attr:{d:"M5.625 21.313A12.004 12.004 0 0 0 24.125 25l-3.875-3.001c-3.312 2.188-8.812 1.375-10.687-3.75Zm0 0",fill:"rgb(20.392157%, 65.882353%, 32.54902%)"},child:[]},{tag:"path",attr:{d:"M9.563 18.25c-.5-1.562-.5-3 0-4.562l-3.938-3.063c-1.437 2.875-1.875 6.938 0 10.688Zm0 0",fill:"rgb(98.431373%, 73.72549%, 0.784314%)"},child:[]},{tag:"path",attr:{d:"M9.563 13.688c1.374-4.313 7.25-6.813 11.187-3.126l3.438-3.374C19.313 2.5 9.813 2.688 5.625 10.625Zm0 0",fill:"rgb(91.764706%, 26.27451%, 20.784314%)"},child:[]}]})(e)}function bA(e){return Ul({attr:{role:"img",viewBox:"0 0 32.978 32"},child:[{tag:"path",attr:{d:"M16.379.848a2.238 2.238 0 0 0-.793.199L4.723 6.238a2.06 2.06 0 0 0-1.121 1.399L.922 19.293c-.14.61.004 1.254.398 1.742l7.52 9.348c.394.488.992.773 1.62.773l12.056-.004c.632 0 1.23-.28 1.625-.773l7.515-9.348a2.042 2.042 0 0 0 .403-1.742L29.375 7.633a2.055 2.055 0 0 0-1.125-1.399L17.387 1.047a2.082 2.082 0 0 0-1.008-.2m0 0",fill:"rgb(19.607843%, 42.352941%, 89.803922%)"},child:[]},{tag:"path",attr:{d:"M16.375.004a2.22 2.22 0 0 0-.84.21L4.07 5.696a2.171 2.171 0 0 0-1.187 1.473L.055 19.473a2.164 2.164 0 0 0 .297 1.668c.039.062.082.117.125.172l7.937 9.87a2.21 2.21 0 0 0 1.715.817l12.723-.004c.668 0 1.3-.3 1.714-.816l7.934-9.867c.414-.516.57-1.196.422-1.84L30.09 7.164a2.187 2.187 0 0 0-1.184-1.473L17.438.215a2.216 2.216 0 0 0-1.063-.211m.004.844c.348-.02.695.05 1.008.199L28.25 6.234c.566.274.98.786 1.125 1.399l2.684 11.656a2.042 2.042 0 0 1-.403 1.742l-7.515 9.348a2.065 2.065 0 0 1-1.625.773l-12.055.004c-.633 0-1.23-.285-1.621-.773l-7.52-9.348a2.043 2.043 0 0 1-.398-1.742l2.68-11.656a2.06 2.06 0 0 1 1.12-1.399l10.864-5.191c.246-.117.52-.188.793-.2m0 0",fill:"rgb(100%, 100%, 100%)"},child:[]},{tag:"path",attr:{d:"M13.46 10.195h10.653m-15.25 0h2.668m5.801 3.871h6.781m-11.379 0h2.668m1.93 3.868h6.781m-11.379 0h2.668M13.461 21.8h10.652m-15.25 0h2.668",fill:"none",stroke:"rgb(100%, 100%, 100%)",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.451"},child:[]}]})(e)}function yA(e){return Ul({attr:{role:"img",viewBox:"0 0 32.978 32"},child:[{tag:"path",attr:{d:"M16.379.848a2.083 2.083 0 0 0-.793.199L4.723 6.238a2.06 2.06 0 0 0-1.121 1.399L.922 19.293c-.14.61.004 1.254.398 1.742l7.52 9.348c.394.488.992.773 1.62.773l12.056-.004c.632 0 1.23-.28 1.625-.773l7.515-9.348a2.042 2.042 0 0 0 .403-1.742L29.375 7.633a2.055 2.055 0 0 0-1.125-1.399L17.387 1.047a2.082 2.082 0 0 0-1.008-.2m0 0",fill:"rgb(19.607843%, 42.352941%, 89.803922%)"},child:[]},{tag:"path",attr:{d:"M16.375.004a2.22 2.22 0 0 0-.84.21L4.07 5.696a2.171 2.171 0 0 0-1.187 1.473L.055 19.473a2.164 2.164 0 0 0 .297 1.668c.039.062.082.117.125.172l7.937 9.87a2.21 2.21 0 0 0 1.715.817l12.723-.004c.668 0 1.3-.3 1.714-.816l7.934-9.867c.414-.516.57-1.196.422-1.84L30.09 7.164a2.187 2.187 0 0 0-1.184-1.473L17.438.215a2.216 2.216 0 0 0-1.063-.211m.004.844c.348-.02.695.05 1.008.199L28.25 6.234c.57.274.98.79 1.125 1.399l2.684 11.656a2.042 2.042 0 0 1-.403 1.742l-7.515 9.348a2.065 2.065 0 0 1-1.625.773l-12.055.004c-.633 0-1.23-.285-1.621-.773l-7.52-9.348a2.043 2.043 0 0 1-.398-1.742l2.68-11.656a2.068 2.068 0 0 1 1.12-1.399l10.864-5.191c.246-.117.52-.188.793-.2m0 0",fill:"rgb(100%, 100%, 100%)"},child:[]},{tag:"path",attr:{d:"M17.332 14.066h6.781",fill:"none",stroke:"rgb(100%, 100%, 100%)",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.451"},child:[]},{tag:"path",attr:{d:"M13.46 10.195h10.653",fill:"none",stroke:"rgb(100%, 100%, 100%)",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.452"},child:[]},{tag:"path",attr:{d:"M8.863 10.195h2.668",fill:"none",stroke:"rgb(100%, 100%, 100%)",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.451"},child:[]},{tag:"path",attr:{d:"M12.402 14.688c0-2.133 1.848-3.864 4.13-3.864 2.28 0 4.128 1.73 4.128 3.864h-1.93c0-1.067-.984-1.93-2.199-1.93-1.215 0-2.195.863-2.195 1.93Zm0 0h0m0 0h0m0 0h0m0 0h0m0 0h0m0 0h0m0 0h0m0 0",fill:"rgb(100%, 100%, 100%)",fillRule:"evenodd",stroke:"rgb(19.607843%, 42.352941%, 89.803922%)",strokeLinecap:"square",strokeMiterlimit:"10",strokeWidth:".484"},child:[]},{tag:"path",attr:{d:"M17.332 17.934h6.781m-10.652 3.87h10.652m-15.25 0h2.668",fill:"none",stroke:"rgb(100%, 100%, 100%)",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.451"},child:[]},{tag:"path",attr:{d:"M11.387 14.574h10.27v6.688h-10.27Zm0 0h0m0 0h0m0 0h0m0 0h0m0 0h0m0 0h0m0 0h0m0 0",fill:"rgb(100%, 100%, 100%)",fillRule:"evenodd",stroke:"rgb(19.607843%, 42.352941%, 89.803922%)",strokeLinecap:"square",strokeMiterlimit:"10",strokeWidth:".484"},child:[]},{tag:"path",attr:{d:"M17.535 17.918a1.016 1.016 0 1 1-2.032-.001 1.016 1.016 0 0 1 2.032.001m0 0",fill:"rgb(19.607843%, 42.352941%, 89.803922%)"},child:[]}]})(e)}function wA(e){return Ul({attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{fillRule:"nonzero",fill:"rgb(0%, 0%, 0%)",fillOpacity:"1",d:"M 29.710938 13.09375 C 30.433594 10.914062 30.183594 8.527344 29.023438 6.546875 C 27.277344 3.507812 23.769531 1.945312 20.34375 2.679688 C 18.410156 0.53125 15.480469 -0.421875 12.65625 0.175781 C 9.832031 0.773438 7.539062 2.832031 6.640625 5.574219 C 4.390625 6.039062 2.449219 7.445312 1.3125 9.441406 C -0.453125 12.476562 -0.0546875 16.300781 2.300781 18.90625 C 1.574219 21.082031 1.824219 23.46875 2.980469 25.453125 C 4.730469 28.492188 8.242188 30.054688 11.667969 29.320312 C 13.191406 31.035156 15.382812 32.011719 17.679688 32 C 21.191406 32.003906 24.304688 29.734375 25.375 26.390625 C 27.625 25.929688 29.566406 24.519531 30.707031 22.527344 C 32.449219 19.496094 32.046875 15.691406 29.710938 13.09375 Z M 17.679688 29.90625 C 16.277344 29.90625 14.921875 29.417969 13.84375 28.519531 L 14.035156 28.410156 L 20.40625 24.734375 C 20.726562 24.542969 20.925781 24.199219 20.929688 23.824219 L 20.929688 14.84375 L 23.621094 16.398438 C 23.648438 16.414062 23.667969 16.441406 23.671875 16.46875 L 23.671875 23.914062 C 23.664062 27.21875 20.988281 29.898438 17.679688 29.90625 Z M 4.800781 24.40625 C 4.097656 23.191406 3.84375 21.769531 4.085938 20.386719 L 4.277344 20.5 L 10.652344 24.179688 C 10.972656 24.367188 11.371094 24.367188 11.695312 24.179688 L 19.484375 19.6875 L 19.484375 22.796875 C 19.484375 22.828125 19.464844 22.859375 19.441406 22.878906 L 12.988281 26.601562 C 10.117188 28.253906 6.457031 27.269531 4.800781 24.40625 Z M 3.121094 10.527344 C 3.828125 9.304688 4.945312 8.375 6.273438 7.898438 L 6.273438 15.464844 C 6.269531 15.839844 6.46875 16.183594 6.792969 16.367188 L 14.542969 20.839844 L 11.851562 22.398438 C 11.820312 22.414062 11.785156 22.414062 11.757812 22.398438 L 5.316406 18.683594 C 2.453125 17.023438 1.472656 13.363281 3.121094 10.496094 Z M 25.25 15.667969 L 17.472656 11.152344 L 20.160156 9.601562 C 20.1875 9.585938 20.222656 9.585938 20.253906 9.601562 L 26.695312 13.320312 C 28.703125 14.480469 29.863281 16.699219 29.671875 19.011719 C 29.476562 21.324219 27.964844 23.316406 25.792969 24.128906 L 25.792969 16.558594 C 25.78125 16.1875 25.574219 15.847656 25.25 15.667969 Z M 27.929688 11.636719 L 27.742188 11.523438 L 21.375 7.816406 C 21.054688 7.625 20.652344 7.625 20.328125 7.816406 L 12.546875 12.304688 L 12.546875 9.195312 C 12.542969 9.164062 12.554688 9.132812 12.582031 9.113281 L 19.023438 5.398438 C 21.039062 4.238281 23.542969 4.347656 25.449219 5.675781 C 27.359375 7.007812 28.324219 9.320312 27.929688 11.613281 Z M 11.074219 17.152344 L 8.382812 15.597656 C 8.355469 15.582031 8.335938 15.554688 8.332031 15.523438 L 8.332031 8.097656 C 8.335938 5.773438 9.679688 3.660156 11.785156 2.675781 C 13.890625 1.6875 16.378906 2.007812 18.164062 3.492188 L 17.976562 3.601562 L 11.605469 7.277344 C 11.28125 7.46875 11.082031 7.8125 11.082031 8.1875 Z M 12.539062 13.996094 L 16.007812 11.996094 L 19.484375 13.996094 L 19.484375 17.996094 L 16.019531 19.996094 L 12.546875 17.996094 Z M 12.539062 13.996094 "},child:[]}]})(e)}const yu=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m225.9 74.78l-44.69-44.69a14 14 0 0 0-19.8 0L38.1 153.41a13.94 13.94 0 0 0-4.1 9.9V208a14 14 0 0 0 14 14h44.69a13.94 13.94 0 0 0 9.9-4.1L225.9 94.58a14 14 0 0 0 0-19.8M94.1 209.41a2 2 0 0 1-1.41.59H48a2 2 0 0 1-2-2v-44.69a2 2 0 0 1 .59-1.41L136 72.48L183.51 120ZM217.41 86.1L192 111.51L144.49 64l25.41-25.42a2 2 0 0 1 2.83 0l44.68 44.69a2 2 0 0 1 0 2.83"})}),{__source:"ph:pencil-simple-light",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"edit",displayName:"UiEdit"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m227.31 73.37l-44.68-44.69a16 16 0 0 0-22.63 0L36.69 152A15.86 15.86 0 0 0 32 163.31V208a16 16 0 0 0 16 16h44.69a15.86 15.86 0 0 0 11.31-4.69L227.31 96a16 16 0 0 0 0-22.63M192 108.68L147.31 64l24-24L216 84.68Z"})}),{__source:"ph:pencil-simple-fill",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"edit",displayName:"UiEditFilled"});function g3({value:e,onChange:t,loadResources:n,loadKeyPreview:r,allowLiteral:s=!0,strict:i=!1,className:l}){const u=e?.kind??"secret",d=u==="value",f=d?"secret":u,p=e&&e.kind!=="value"?e.name:"",h=e&&e.kind!=="value"?e.key:"",x=e&&e.kind==="value"?e.value:"",[v,y]=w.useState([]),[b,j]=w.useState(!1),[S,N]=w.useState([]),[k,T]=w.useState(!1);w.useEffect(()=>{if(d)return;let B=!1;return j(!0),n(f).then(W=>!B&&y(W)).finally(()=>!B&&j(!1)),()=>{B=!0}},[n,f,d]),w.useEffect(()=>{if(!p){N([]);return}let B=!1;return T(!0),r(f,p).then(W=>!B&&N(W)).catch(()=>!B&&N([])).finally(()=>!B&&T(!1)),()=>{B=!0}},[r,f,p]);const E=w.useMemo(()=>v.map(B=>({value:B.name,label:B.name})),[v]),O=w.useMemo(()=>v.find(B=>B.name===p),[v,p]),M=w.useMemo(()=>kA(O?.keys??[],S,h),[O,h,S]),L=i&&!!p&&!b&&!O,F=i&&!!h&&!!O&&!b&&!(O.keys??[]).includes(h),U=B=>t(B==="value"?{kind:"value",value:""}:{kind:B,name:"",key:""}),z=B=>t(B?{kind:f,name:B,key:h}:void 0),V=B=>p?t({kind:f,name:p,key:B}):void 0,X=B=>t({kind:"value",value:B}),H=s?["secret","configmap","value"]:["secret","configmap"];return o.jsxs("div",{className:R("flex items-center gap-2",l),children:[o.jsx("div",{className:"flex shrink-0 overflow-hidden rounded border border-border text-xs",children:H.map(B=>{const W=_A[B];return o.jsxs("button",{type:"button",onClick:()=>U(B),className:R("flex items-center gap-1 whitespace-nowrap px-2 py-1",u===B?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-accent"),children:[o.jsx(W,{className:"h-3.5 w-3.5"}),jA[B]]},B)})}),d?o.jsx("input",{type:"text",value:x,onChange:B=>X(B.target.value),placeholder:"Static value…",className:R("h-control-h min-w-0 flex-1 rounded border border-input bg-background px-control-px text-sm","outline-none focus-visible:ring-2 focus-visible:ring-ring")}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-44 shrink-0",children:o.jsx(er,{options:E,value:p,onChange:z,allowCustomValue:!0,loading:b,invalid:L,placeholder:`Select ${f}…`})}),o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx(er,{options:M,value:h,onChange:V,allowCustomValue:!0,loading:k,invalid:F,placeholder:p?"Key…":"—"})})]})]})}const _A={secret:yA,configmap:bA,value:yu},jA={secret:"Secret",configmap:"ConfigMap",value:"Value"};function kA(e,t,n){const r=new Map(t.map(i=>[i.key,i.value])),s=e.map(i=>({value:i,label:r.has(i)?`${i} — ${r.get(i)}`:i}));return n&&!s.some(i=>i.value===n)?[{value:n,label:n},...s]:s}function NA({value:e,onChange:t,options:n,ariaLabel:r,triggerTitle:s,footer:i,showLabel:l,className:u,triggerClassName:d,menuClassName:f},p){const[h,x]=w.useState(!1),v=xa(),[y,b]=w.useState(null),j=w.useRef([]),S=w.useRef(n.map(P=>P.label));S.current=n.map(P=>P.label);const N=w.useMemo(()=>n.findIndex(P=>P.value===e),[n,e]),{refs:k,floatingStyles:T,context:E}=Zu({open:h,onOpenChange:x,placement:"bottom-start",whileElementsMounted:$u,middleware:[Fu(6),Bu({padding:8}),Du({padding:8})]}),O=Vu(E),M=Hu(E,{escapeKey:!1}),L=qu(E,{role:"menu"}),F=D5(E,{listRef:j,activeIndex:y,selectedIndex:N,onNavigate:b,loop:!0}),U=MO(E,{listRef:S,activeIndex:y,onMatch:b}),{getReferenceProps:z,getFloatingProps:V,getItemProps:X}=Wu([O,M,L,F,U]);wo(h,()=>{x(!1),k.domReference.current instanceof HTMLElement&&k.domReference.current.focus()});const H=R5([k.setReference,p]),B=P=>{t(P),x(!1)},W=n[N];if(!W)throw new Error(`IconMenuPicker: value "${e}" not found in options for ${r}`);const se=s??`${r}: ${W.label}`;return o.jsxs("div",{ref:H,className:R("relative inline-flex",l&&"w-full",u),children:[l?o.jsxs(Fe,{type:"button",variant:"ghost",size:"default","aria-label":r,"aria-haspopup":"menu","aria-expanded":h,title:se,className:R("w-full justify-start text-muted-foreground hover:text-foreground",d),...z(),children:[o.jsx(K,{icon:W.icon,className:"shrink-0 text-foreground"}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-left capitalize",children:`${r}: ${W.label}`}),o.jsx(K,{icon:Vt,className:"shrink-0 text-muted-foreground"})]}):o.jsx(c5,{icon:W.icon,label:r,title:se,"aria-haspopup":"menu","aria-expanded":h,className:d,...z()}),h&&o.jsx(ha,{children:o.jsx(ga,{context:E,modal:!1,initialFocus:N,children:o.jsxs("div",{ref:k.setFloating,role:"menu","aria-label":r,style:{...T,zIndex:v},className:R("min-w-[12rem] rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg shadow-black/5",f),...V(),children:[n.map((P,J)=>{const ne=P.value===e;return o.jsxs("button",{ref:$=>{j.current[J]=$},type:"button",role:"menuitemradio","aria-checked":ne,tabIndex:J===y?0:-1,className:R("flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm transition-colors","hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none",ne&&"text-foreground"),...X({onClick:()=>B(P.value),onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),B(P.value))}}),children:[o.jsx(K,{icon:P.icon,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"min-w-0 flex-1 truncate capitalize",children:P.label}),ne?o.jsx(K,{icon:mr,className:"shrink-0 text-foreground"}):o.jsx("span",{className:"inline-block size-4 shrink-0","aria-hidden":!0})]},P.value)}),i?o.jsx("div",{className:"mt-1 border-t border-border/60 px-2 py-1.5 text-[11px] text-muted-foreground",children:i}):null]})})})]})}const x3=w.forwardRef(NA),Yu=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M122 40V16a6 6 0 0 1 12 0v24a6 6 0 0 1-12 0m68 88a62 62 0 1 1-62-62a62.07 62.07 0 0 1 62 62m-12 0a50 50 0 1 0-50 50a50.06 50.06 0 0 0 50-50M59.76 68.24a6 6 0 1 0 8.48-8.48l-16-16a6 6 0 0 0-8.48 8.48Zm0 119.52l-16 16a6 6 0 1 0 8.48 8.48l16-16a6 6 0 1 0-8.48-8.48M192 70a6 6 0 0 0 4.24-1.76l16-16a6 6 0 0 0-8.48-8.48l-16 16A6 6 0 0 0 192 70m4.24 117.76a6 6 0 0 0-8.48 8.48l16 16a6 6 0 0 0 8.48-8.48ZM46 128a6 6 0 0 0-6-6H16a6 6 0 0 0 0 12h24a6 6 0 0 0 6-6m82 82a6 6 0 0 0-6 6v24a6 6 0 0 0 12 0v-24a6 6 0 0 0-6-6m112-88h-24a6 6 0 0 0 0 12h24a6 6 0 0 0 0-12"})}),{__source:"ph:sun-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"sun",displayName:"UiSun"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M120 40V16a8 8 0 0 1 16 0v24a8 8 0 0 1-16 0m8 24a64 64 0 1 0 64 64a64.07 64.07 0 0 0-64-64m-69.66 5.66a8 8 0 0 0 11.32-11.32l-16-16a8 8 0 0 0-11.32 11.32Zm0 116.68l-16 16a8 8 0 0 0 11.32 11.32l16-16a8 8 0 0 0-11.32-11.32M192 72a8 8 0 0 0 5.66-2.34l16-16a8 8 0 0 0-11.32-11.32l-16 16A8 8 0 0 0 192 72m5.66 114.34a8 8 0 0 0-11.32 11.32l16 16a8 8 0 0 0 11.32-11.32ZM48 128a8 8 0 0 0-8-8H16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8m80 80a8 8 0 0 0-8 8v24a8 8 0 0 0 16 0v-24a8 8 0 0 0-8-8m112-88h-24a8 8 0 0 0 0 16h24a8 8 0 0 0 0-16"})}),{__source:"ph:sun-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"sun",displayName:"UiSunFilled"});const Xu=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M232.13 143.64a6 6 0 0 0-6-1.49a90.07 90.07 0 0 1-112.27-112.3a6 6 0 0 0-7.49-7.48a102.88 102.88 0 0 0-51.89 36.31a102 102 0 0 0 142.84 142.84a102.88 102.88 0 0 0 36.31-51.89a6 6 0 0 0-1.5-5.99m-42 48.29a90 90 0 0 1-126-126a90.9 90.9 0 0 1 35.52-28.27a102.06 102.06 0 0 0 118.69 118.69a90.9 90.9 0 0 1-28.24 35.58Z"})}),{__source:"ph:moon-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"moon",displayName:"UiMoon"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M235.54 150.21a104.84 104.84 0 0 1-37 52.91A104 104 0 0 1 32 120a103.1 103.1 0 0 1 20.88-62.52a104.84 104.84 0 0 1 52.91-37a8 8 0 0 1 10 10a88.08 88.08 0 0 0 109.8 109.8a8 8 0 0 1 10 10Z"})}),{__source:"ph:moon-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"moon",displayName:"UiMoonFilled"});const S2=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 42H48a22 22 0 0 0-22 22v112a22 22 0 0 0 22 22h74v20H96a6 6 0 0 0 0 12h64a6 6 0 0 0 0-12h-26v-20h74a22 22 0 0 0 22-22V64a22 22 0 0 0-22-22M48 54h160a10 10 0 0 1 10 10v82H38V64a10 10 0 0 1 10-10m160 132H48a10 10 0 0 1-10-10v-18h180v18a10 10 0 0 1-10 10"})}),{__source:"ph:desktop-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"desktop",displayName:"UiDesktop"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 40H48a24 24 0 0 0-24 24v112a24 24 0 0 0 24 24h72v16H96a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16h-24v-16h72a24 24 0 0 0 24-24V64a24 24 0 0 0-24-24m0 144H48a8 8 0 0 1-8-8v-16h176v16a8 8 0 0 1-8 8"})}),{__source:"ph:desktop-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"desktop",displayName:"UiDesktopFilled"});const CA=[{value:"light",icon:Yu,label:"light"},{value:"dark",icon:Xu,label:"dark"},{value:"system",icon:S2,label:"system"}],E2=w.forwardRef(({className:e,triggerClassName:t,menuClassName:n},r)=>{const{theme:s,setTheme:i,resolvedTheme:l}=M7(),u=s==="system"?o.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[o.jsx(K,{icon:l==="dark"?Xu:Yu,width:12,height:12}),o.jsxs("span",{children:["resolves to"," ",o.jsx("span",{"data-testid":"resolved-theme",className:"font-medium text-foreground",children:l})]})]}):null;return o.jsx(x3,{ref:r,value:s,onChange:i,options:CA,ariaLabel:"Theme",footer:u,className:e,triggerClassName:t,menuClassName:n})});E2.displayName="ThemeSwitcher";const gm=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 138H48a14 14 0 0 0-14 14v40a14 14 0 0 0 14 14h160a14 14 0 0 0 14-14v-40a14 14 0 0 0-14-14m2 54a2 2 0 0 1-2 2H48a2 2 0 0 1-2-2v-40a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Zm-2-142H48a14 14 0 0 0-14 14v40a14 14 0 0 0 14 14h160a14 14 0 0 0 14-14V64a14 14 0 0 0-14-14m2 54a2 2 0 0 1-2 2H48a2 2 0 0 1-2-2V64a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Z"})}),{__source:"ph:rows-light",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"rows",displayName:"UiRows"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 152v40a16 16 0 0 1-16 16H48a16 16 0 0 1-16-16v-40a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16M208 48H48a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16"})}),{__source:"ph:rows-fill",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"rows",displayName:"UiRowsFilled"});const xm=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M222 128a6 6 0 0 1-6 6H40a6 6 0 0 1 0-12h176a6 6 0 0 1 6 6M40 70h176a6 6 0 0 0 0-12H40a6 6 0 0 0 0 12m176 116H40a6 6 0 0 0 0 12h176a6 6 0 0 0 0-12"})}),{__source:"ph:list-light",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"list-flat",displayName:"UiListFlat"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m-16 152H64a8 8 0 0 1 0-16h128a8 8 0 0 1 0 16m0-48H64a8 8 0 0 1 0-16h128a8 8 0 0 1 0 16m0-48H64a8 8 0 0 1 0-16h128a8 8 0 0 1 0 16"})}),{__source:"ph:list-fill",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"list-flat",displayName:"UiListFlatFilled"});const zl=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M90 64a6 6 0 0 1 6-6h120a6 6 0 0 1 0 12H96a6 6 0 0 1-6-6m126 58H96a6 6 0 0 0 0 12h120a6 6 0 0 0 0-12m0 64H96a6 6 0 0 0 0 12h120a6 6 0 0 0 0-12M56 58H40a6 6 0 0 0 0 12h16a6 6 0 0 0 0-12m0 64H40a6 6 0 0 0 0 12h16a6 6 0 0 0 0-12m0 64H40a6 6 0 0 0 0 12h16a6 6 0 0 0 0-12"})}),{__source:"ph:list-dashes-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"list-dashes",displayName:"UiListDashes"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16M72 184h-8a8 8 0 0 1 0-16h8a8 8 0 0 1 0 16m0-48h-8a8 8 0 0 1 0-16h8a8 8 0 0 1 0 16m0-48h-8a8 8 0 0 1 0-16h8a8 8 0 0 1 0 16m120 96h-88a8 8 0 0 1 0-16h88a8 8 0 0 1 0 16m0-48h-88a8 8 0 0 1 0-16h88a8 8 0 0 1 0 16m0-48h-88a8 8 0 0 1 0-16h88a8 8 0 0 1 0 16"})}),{__source:"ph:list-dashes-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"list-dashes",displayName:"UiListDashesFilled"});const SA=[{value:"compact",icon:gm,label:"compact"},{value:"comfortable",icon:xm,label:"comfortable"},{value:"spacious",icon:zl,label:"spacious"}],v3=w.forwardRef(({className:e,triggerClassName:t,menuClassName:n},r)=>{const{density:s,setDensity:i}=$7();return o.jsx(x3,{ref:r,value:s,onChange:i,options:SA,ariaLabel:"Density",className:e,triggerClassName:t,menuClassName:n})});v3.displayName="DensitySwitcher";const b3=w.createContext(null);function EA(){return w.useContext(b3)}function TA({className:e,selection:t,showCheckboxes:n=!0,children:r,...s}){const i=o.jsx("div",{className:R("divide-y divide-border",e),...s,children:r});return t?o.jsx(b3.Provider,{value:{selection:t,showCheckboxes:n},children:i}):i}function OA({className:e,...t}){return o.jsx("div",{className:e,...t})}function MA({className:e,...t}){return o.jsx("div",{className:R("sticky top-0 z-10 flex w-full items-center gap-2 border-b border-border bg-muted px-3 py-1.5",e),...t})}function AA({active:e=!1,selected:t=!1,accentClassName:n="border-transparent",interactive:r=!0,itemKey:s,hideCheckbox:i=!1,className:l,onClick:u,children:d,...f}){const p=EA(),h=p!==null&&s!==void 0,x=h?p.selection.isSelected(s):t,v=j=>{if(h&&j.shiftKey){j.preventDefault(),p.selection.toggle(s,{shiftKey:!0});return}u?.(j)},y=h&&p.showCheckboxes&&!i,b=h&&y?o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx("input",{type:"checkbox",className:"mt-0.5 size-4 shrink-0 rounded border-input",checked:x,"aria-label":"Select item",onClick:j=>{j.stopPropagation(),j.shiftKey&&(j.preventDefault(),p.selection.toggle(s,{shiftKey:!0}))},onChange:()=>p.selection.toggle(s)}),o.jsx("div",{className:"min-w-0 flex-1",children:d})]}):d;return o.jsx("div",{className:R("min-w-0 overflow-hidden border-l-2 transition-colors",r&&"cursor-pointer",e?"border-primary bg-primary/10":x?"border-primary/40 bg-primary/5 hover:bg-primary/10":R(n,r&&"hover:bg-muted"),l),onClick:v,...f,children:b})}const LA="modulepreload",RA=function(e){return"/"+e},Ay={},Rt=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let d=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=l?.nonce||l?.getAttribute("nonce");s=d(n.map(f=>{if(f=RA(f),f in Ay)return;Ay[f]=!0;const p=f.endsWith(".css"),h=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":LA,p||(x.as="script"),x.crossOrigin="",x.href=f,u&&x.setAttribute("nonce",u),document.head.appendChild(x),p)return new Promise((v,y)=>{x.addEventListener("load",v),x.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${f}`)))})}))}function i(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return s.then(l=>{for(const u of l||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})},PA="w-full min-w-0 rounded-md border border-input bg-background text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring";function bi(e){return R(PA,q5[e])}function T2(e,t){const n=e.replace(/[^a-zA-Z0-9_-]/g,"_");return t?`jsf-${t}-${n}`:`jsf-${n}`}function Sr(e){return e.default!=null&&typeof e.default!="object"?String(e.default):""}function Or(e){return e==null||typeof e=="object"?"":String(e)}function ed(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function O2(e){const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<1?1:Math.min(Math.trunc(t),12)}function IA(e,t){const n=typeof e=="number"?e:Number(e);return!Number.isFinite(n)||n<1?1:Math.min(Math.trunc(n),t)}function N0(e,t){return!t||e.some(n=>n.value===t)?e:[{value:t,label:t},...e]}function $A(e,t,n){const r=new Set(t.filter(s=>s!==n));return e.filter(s=>!r.has(s.value))}function FA(e,t,n){const r=n.trim().toLowerCase();if(!r)return!0;const s=typeof t.title=="string"&&t.title?t.title:e;return e.toLowerCase().includes(r)||s.toLowerCase().includes(r)}function DA(e,t){if(!Array.isArray(t)||t.length===0)return e;const n=new Map(t.filter(i=>typeof i=="string").map((i,l)=>[i,l])),r=e.filter(([i])=>n.has(i)).sort((i,l)=>n.get(i[0])-n.get(l[0])),s=e.filter(([i])=>!n.has(i));return[...r,...s]}function BA(e){const t=n=>{const r=n["x-clicky-order"];return typeof r=="number"?r:Number.POSITIVE_INFINITY};return e.map((n,r)=>({entry:n,index:r,rank:t(n[1])})).sort((n,r)=>n.rank-r.rank||n.index-r.index).map(n=>n.entry)}function UA(e,t){const n=new Set(t),r=e.filter(([i])=>n.has(i)),s=e.filter(([i])=>!n.has(i));return[...r,...s]}function zA(e){return e==null||e===""?!0:Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}function VA(e,t,n){const r=new Set(t),s=i=>(r.has(i)?2:0)+(zA(n[i])?0:1);return e.map((i,l)=>({entry:i,index:l,score:s(i[0])})).sort((i,l)=>l.score-i.score||i.index-l.index).map(i=>i.entry)}function HA(e){const t=e.value,n=t==null||t==="";if(e.required&&n)return"Required";if(e.kind==="number"&&typeof e.minimum=="number"&&typeof t=="number"&&ts.value===String(t)))return"Unknown value (allowed)"}function y3(e,t,n){return e.map((r,s)=>s===t?n:r)}function w3(e,t){return e.filter((n,r)=>r!==t)}function Ly(e,t,n){if(n<0||n>=e.length)return e;const r=[...e],[s]=r.splice(t,1);return r.splice(n,0,s),r}function _3(e){if(e.default!==void 0)return e.default;const t=Array.isArray(e.type)?e.type[0]:e.type;return t==="array"?[]:t==="object"?{}:t==="boolean"?!1:""}function ZA({field:e,fieldId:t,readOnly:n,size:r}){const s=Or(e.value),[i,l]=w.useState(""),u=N0(e.options??[],s);if(n){const p=u.find(h=>h.value===s);return o.jsx("div",{id:t,"data-jsf-input":!0,children:o.jsx(Ry,{option:p??{value:s,label:s},checked:!0,readOnly:!0,size:r,onSelect:()=>{}})})}const d=i.trim().toLowerCase(),f=d?u.filter(p=>p.label.toLowerCase().includes(d)||p.value.toLowerCase().includes(d)):u;return o.jsxs("div",{className:"flex w-full flex-col gap-2",children:[o.jsx("input",{type:"search","aria-label":`Filter ${e.label}`,placeholder:"Filter…",value:i,onChange:p=>l(p.target.value),className:bi(r)}),o.jsxs("div",{role:"radiogroup","aria-label":e.label,id:t,"data-jsf-input":!0,className:"grid grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4",children:[f.map(p=>o.jsx(Ry,{option:p,checked:p.value===s,readOnly:!1,size:r,onSelect:()=>e.onChange(p.value)},p.value)),f.length===0&&o.jsx("div",{className:R("col-span-full py-4 text-center text-muted-foreground",bn[r]),children:"No matches"})]})]})}function Ry({option:e,checked:t,readOnly:n,size:r,onSelect:s}){return o.jsxs("button",{type:"button",role:"radio","aria-checked":t,disabled:n,onClick:s,className:R("flex flex-col items-center justify-center gap-1.5 rounded-md border p-3 text-center transition-colors",bn[r],t?"border-primary bg-primary/5 ring-1 ring-primary":"border-input hover:border-primary/50 hover:bg-accent",n&&"cursor-default opacity-80"),children:[o.jsx(Zr,{icon:e.icon,className:"text-2xl text-foreground"}),o.jsx("span",{className:"break-words leading-tight",children:e.label})]})}const j3=w.createContext(void 0);function WA(){return w.useContext(j3)}function qA(e,t){if(!e||!t)return"";let n=e;for(const r of t.split(".")){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"||typeof n=="number"?String(n):""}function k3(e,t){const n=e.scope;if(!n)return{};const r=qA(t,n.from);if(!r)return{};const s=n.map?n.map[r]??[]:[r];return s.length===0?{}:{[n.param]:s.join(n.join??",")}}const KA=w.lazy(async()=>({default:(await Rt(()=>Promise.resolve().then(()=>DQ),void 0)).MdxEditorField}));function N3({layout:e,size:t,columns:n,className:r,children:s}){if(e.mode==="inline"){const i=e.labelMaxWidth??"40ch",l=e.valueMaxWidth??"600px";return o.jsx("div",{className:R("grid",dM[t],r),style:{gridTemplateColumns:`fit-content(${i}) minmax(0, ${l})`},children:s})}return n&&n>1?o.jsx("div",{className:R("grid gap-x-3",jy[t],r),style:{gridTemplateColumns:`repeat(${n}, minmax(0, 1fr))`},children:s}):o.jsx("div",{className:R("grid",jy[t],r),children:s})}function GA({label:e,value:t,helper:n,error:r,layout:s,size:i}){return s.mode==="inline"?o.jsxs("div",{className:"col-span-2 grid grid-cols-subgrid items-start gap-x-3 gap-y-0.5",children:[o.jsx("div",{className:R("flex min-w-0 items-center",_2[i]),children:e}),o.jsx("div",{className:"min-w-0",children:t}),n&&o.jsx("p",{className:"col-start-2 text-xs text-muted-foreground",children:n}),r&&o.jsx("p",{className:"col-start-2 text-xs text-destructive",children:r})]}):o.jsxs("div",{className:"flex w-full flex-col gap-1",style:{maxWidth:s.valueMaxWidth??"600px"},children:[e,t,n&&o.jsx("p",{className:"text-xs text-muted-foreground",children:n}),r&&o.jsx("p",{className:"text-xs text-destructive",children:r})]})}function JA({field:e,fieldId:t,size:n}){return o.jsxs("label",{htmlFor:t,className:R("flex min-w-0 items-center gap-2 font-medium",bn[n],e.labelClassName),children:[o.jsx(Zr,{icon:e.labelIcon,className:"shrink-0 text-[15px] text-muted-foreground"}),o.jsx("span",{className:"truncate",title:e.label!==e.key?e.key:void 0,children:e.label}),e.required&&o.jsx("span",{className:"shrink-0 text-destructive",children:"*"}),e.badge&&o.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e.badge})]})}function QA({label:e,required:t,size:n,badge:r,helper:s,labelIcon:i,children:l}){return o.jsxs("div",{className:R("col-span-full flex flex-col",pm[n]),children:[o.jsxs("div",{className:R("flex items-center gap-2 border-b border-border pb-1 font-semibold",bn[n]),children:[o.jsx(Zr,{icon:i,className:"text-[15px] text-muted-foreground"}),o.jsx("span",{children:e}),t&&o.jsx("span",{className:"text-destructive",children:"*"}),r&&o.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:r})]}),s&&o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),l]})}function C3({field:e,fieldId:t,size:n}){const r=Or(e.value),s=e.kind==="date"&&r?j2(r):r;return o.jsx("span",{id:t,"data-jsf-input":!0,"data-jsf-readonly":!0,className:R("flex items-center text-foreground",mm[n],bn[n]),title:r||void 0,children:s||o.jsx("span",{className:"text-muted-foreground",children:"—"})})}function M2({prefix:e,suffix:t,children:n}){return!e&&!t?o.jsx(o.Fragment,{children:n}):o.jsxs("div",{"data-jsf-control":!0,className:"relative",children:[e&&o.jsx("div",{className:"absolute inset-y-0 left-1.5 flex items-center",children:e}),n,t&&o.jsx("div",{className:"absolute inset-y-0 right-1.5 flex items-center",children:t})]})}function S3({field:e,fieldId:t,readOnly:n,size:r}){return o.jsx(M2,{prefix:e.prefix,suffix:e.suffix,children:o.jsx("input",{id:t,type:"text","data-jsf-input":!0,className:R(bi(r),e.prefix&&"pl-8",e.suffix&&"pr-8",e.inputClassName),value:Or(e.value),disabled:n,placeholder:Sr(e.schema),onChange:s=>e.onChange(s.target.value)})})}function YA({field:e,fieldId:t,readOnly:n,size:r}){if(e.schema["x-number-display"]==="slider"&&typeof e.schema.maximum=="number")return o.jsx(eL,{field:e,fieldId:t,readOnly:n,size:r});const s=e.coerceNumber!==!1,i=typeof e.schema.multipleOf=="number"?e.schema.multipleOf:void 0,l=i!==void 0,u=e.suffix??(e.unit?o.jsx("span",{className:"pointer-events-none select-none text-muted-foreground",children:e.unit}):void 0);return o.jsx(M2,{prefix:e.prefix,suffix:u,children:o.jsx("input",{id:t,type:l?"number":"text",inputMode:"decimal",...l?{step:i,...typeof e.schema.minimum=="number"?{min:e.schema.minimum}:{},...typeof e.schema.maximum=="number"?{max:e.schema.maximum}:{}}:{},"data-jsf-input":!0,className:R(bi(r),e.prefix&&"pl-8",u&&"pr-8",e.inputClassName),value:Or(e.value),disabled:n,placeholder:Sr(e.schema),onChange:d=>{const f=d.target.value;s&&f.trim()!==""&&String(Number(f))===f.trim()?e.onChange(Number(f)):e.onChange(f)},onBlur:d=>{const f=d.target.value;s&&f.trim()!==""&&Number.isFinite(Number(f))&&e.onChange(Number(f))}})})}const XA="absolute inset-0 h-6 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-transparent [&::-webkit-slider-thumb]:size-3.5 [&::-webkit-slider-thumb]:-mt-[5px] [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-background/80 [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:shadow-sm [&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-transparent [&::-moz-range-thumb]:size-3.5 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:shadow-sm";function eL({field:e,fieldId:t,readOnly:n,size:r}){const s=typeof e.schema.minimum=="number"?e.schema.minimum:0,i=typeof e.schema.maximum=="number"?e.schema.maximum:100,l=typeof e.schema.multipleOf=="number"?e.schema.multipleOf:1,u=typeof e.value=="number"?e.value:Number(Or(e.value)),d=Number.isFinite(u),f=d?Math.min(i,Math.max(s,u)):s,p=i>s?(f-s)/(i-s)*100:0;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"relative h-6 min-w-0 flex-1",children:[o.jsx("div",{className:"absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-border"}),o.jsx("div",{className:"absolute left-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-primary/70",style:{width:`${p}%`}}),o.jsx("input",{id:t,"data-jsf-input":!0,type:"range","aria-label":e.label,min:s,max:i,step:l,value:f,disabled:n,className:R(XA,e.inputClassName),onChange:h=>e.onChange(Number(h.target.value))})]}),o.jsx("span",{className:R("w-16 shrink-0 text-right tabular-nums",bn[r]),children:d?f.toLocaleString():"—"})]})}function tL({field:e,fieldId:t,readOnly:n,size:r}){const s=Or(e.value);return n?o.jsx("div",{id:t,"data-jsf-input":!0,className:R("flex items-center text-foreground",mm[r],bn[r]),title:s||void 0,children:s?j2(s):o.jsx("span",{className:"text-muted-foreground",children:"—"})}):o.jsx(um,{id:t,"aria-label":e.label,"data-jsf-input":!0,inputClassName:R(bi(r),e.prefix&&"pl-8",e.suffix?"pr-14":"pr-8"),value:s,onChange:i=>e.onChange(i),placeholder:Sr(e.schema),prefix:e.prefix,suffix:e.suffix})}function nL({field:e,fieldId:t,readOnly:n,size:r}){return typeof e.value=="boolean"||e.value===void 0||e.value===null?o.jsx("div",{className:R("flex items-center",mm[r]),children:o.jsx("input",{id:t,type:"checkbox",className:"h-4 w-4 accent-primary",checked:e.value===!0,disabled:n,onChange:s=>e.onChange(s.target.checked)})}):o.jsx(S3,{field:e,fieldId:t,readOnly:n,size:r})}function rL({field:e,fieldId:t,readOnly:n,size:r}){const s=Or(e.value),i=N0(e.options??[],s);return e.display==="grid"?o.jsx(ZA,{field:e,fieldId:t,readOnly:n,size:r}):e.display==="radio"?o.jsx(aL,{field:e,fieldId:t,readOnly:n,options:i,value:s,size:r}):e.display==="segmented"?o.jsx(oL,{field:e,fieldId:t,readOnly:n,options:i,value:s,size:r}):o.jsx(er,{id:t,options:i,value:s,disabled:n,size:r,allowCustomValue:e.allowCustomValue??!1,onChange:l=>e.onChange(l),prefix:e.prefix,suffix:e.suffix,...e.inputClassName?{className:e.inputClassName}:{},...Sr(e.schema)?{placeholder:Sr(e.schema)}:{}})}const sL={xs:"sm",sm:"sm",md:"md",lg:"lg",xl:"lg"};function oL({field:e,fieldId:t,readOnly:n,options:r,value:s,size:i}){const u=r.some(d=>d.description)?"lg":sL[i];return o.jsx("div",{id:t,"data-jsf-input":!0,className:R(e.inputClassName),children:o.jsx(Tr,{"aria-label":e.label,value:s,onChange:d=>e.onChange(d),size:u,wrap:!0,options:r.map(d=>({id:d.value,label:d.label,...typeof d.icon=="string"?{icon:d.icon}:{},...d.description?{description:d.description}:{},...n?{disabled:!0}:{}}))})})}function iL({field:e,fieldId:t,readOnly:n,size:r,rootValue:s}){const i=WA(),l=e.lookup,u=Or(e.value),[d,f]=w.useState([]),[p,h]=w.useState(!1),x=w.useRef(s);x.current=s;const v=w.useCallback(b=>{if(!l||!i)return;h(!0);const j=x.current;i({descriptor:l,query:b,...j?{rootValue:j}:{}}).then(S=>f(S)).catch(()=>f([])).finally(()=>h(!1))},[l,i]),y=l?JSON.stringify(k3(l,s)):"";return w.useEffect(()=>{l&&i?v(""):f([])},[y,v]),!l||!i?o.jsx(er,{id:t,options:N0([],u),value:u,disabled:n,size:r,allowCustomValue:!0,onChange:b=>e.onChange(b),...Sr(e.schema)?{placeholder:Sr(e.schema)}:{}}):o.jsx(er,{id:t,options:N0(d,u),value:u,disabled:n,size:r,loading:p,allowCustomValue:e.allowCustomValue??!1,onSearch:v,onChange:b=>e.onChange(b),...Sr(e.schema)?{placeholder:Sr(e.schema)}:{}})}function aL({field:e,fieldId:t,readOnly:n,options:r,value:s,size:i}){return o.jsx("div",{role:"radiogroup","aria-label":e.label,id:t,"data-jsf-input":!0,className:R("inline-flex flex-wrap items-center gap-1 rounded-md border border-input bg-background p-0.5",e.inputClassName),children:r.map(l=>{const u=l.value===s;return o.jsxs("label",{className:R("inline-flex cursor-pointer select-none items-center rounded px-2.5 py-1",bn[i],u?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground",n&&"cursor-not-allowed opacity-60"),children:[o.jsx("input",{type:"radio",name:t,className:"sr-only",value:l.value,checked:u,disabled:n,onChange:()=>e.onChange(l.value)}),l.label]},l.value)})})}function lL({field:e,fieldId:t,readOnly:n,size:r}){const s=Or(e.value);return n?o.jsx("span",{id:t,"data-jsf-input":!0,"data-jsf-readonly":!0,className:R("block whitespace-pre-wrap break-words text-foreground",bn[r]),title:s||void 0,children:s||o.jsx("span",{className:"text-muted-foreground",children:"—"})}):o.jsx(M2,{prefix:e.prefix,suffix:e.suffix,children:o.jsx("textarea",{id:t,"data-jsf-input":!0,rows:4,className:R(bi(r),"h-auto min-h-[5rem] resize-y",e.prefix&&"pl-8",e.suffix&&"pr-8",e.inputClassName),value:s,disabled:n,placeholder:Sr(e.schema),onChange:i=>e.onChange(i.target.value)})})}function cL({field:e,fieldId:t,readOnly:n,size:r}){const s=o.jsx("textarea",{id:t,"data-jsf-input":!0,rows:6,className:R(bi(r),"h-auto resize-y font-mono",e.prefix&&"pl-8",e.suffix&&"pr-8"),value:Or(e.value),disabled:n,placeholder:Sr(e.schema),onChange:i=>e.onChange(i.target.value)});return o.jsx(w.Suspense,{fallback:s,children:o.jsx(KA,{id:t,value:Or(e.value),readOnly:n,size:r,placeholder:Sr(e.schema),onChange:i=>e.onChange(i),...e.markdownOptions})})}function uL({field:e,size:t}){const n=e.displayVariant??"text";if(n==="divider")return o.jsx("hr",{"data-jsf-input":!0,className:"my-1 w-full border-t border-border"});if(n==="spacer")return o.jsx("div",{"data-jsf-input":!0,"aria-hidden":!0,className:"h-2"});if(n==="heading")return o.jsx("div",{"data-jsf-input":!0,className:R("border-b border-border pb-1 font-semibold text-foreground",bn[t]),children:e.label});const r=e.description??Or(e.value)??e.label;return o.jsx("p",{"data-jsf-input":!0,className:R("text-muted-foreground",bn[t]),children:r||e.label})}function dL({field:e,fieldId:t,size:n}){const r=Or(e.value),s=e.href??(/^https?:\/\//i.test(r)?r:void 0);return s?o.jsx("a",{id:t,"data-jsf-input":!0,href:s,target:"_blank",rel:"noreferrer noopener",className:R("inline-flex items-center text-primary underline underline-offset-2",mm[n],bn[n]),children:r||e.label||s}):o.jsx(C3,{field:e,fieldId:t,size:n})}function fL({fetcher:e,children:t}){return o.jsx(j3.Provider,{value:e,children:t})}function mL({schema:e,value:t,onChange:n,ctx:r,discKey:s}){var i;const l=(i=e.properties)==null?void 0:i[s];if(!l)return o.jsx(o.Fragment,{children:r.render.renderObjectFields(e,t,n,r)});const u=t[s],d=(e.required??[]).includes(s);if(u==null||u===""){const h=r.render.renderFieldNodes({key:s,prop:l,required:d,value:u,onChange:x=>n({...t,[s]:x})},r);return o.jsxs("div",{className:"col-span-full flex flex-col gap-2",children:[o.jsx("h3",{className:R("font-semibold",bn[r.size]),children:typeof l.title=="string"&&l.title?l.title:s}),h?.value]})}const f=String(u),p=()=>{const h={...t};delete h[s],n(h)};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"col-span-full flex items-center justify-between rounded-md border border-input px-3 py-2",children:[o.jsxs("span",{className:R("flex items-center gap-2 font-medium",bn[r.size]),children:[o.jsx(Zr,{icon:hL(l,f),className:"text-lg text-foreground"}),o.jsx("span",{children:pL(l,f)})]}),!r.readOnly&&o.jsxs("button",{type:"button",onClick:p,className:"text-xs font-medium text-primary hover:underline",children:["Change ",typeof l.title=="string"&&l.title?l.title.toLowerCase():s]})]}),r.render.renderObjectFields(e,t,n,r,{hiddenKeys:[s]})]})}function pL(e,t){var n;const r=(n=e["x-enum-labels"])==null?void 0:n[t];return typeof r=="string"&&r?r:t}function hL(e,t){var n;const r=(n=e["x-enum-icons"])==null?void 0:n[t];return typeof r=="string"&&r?r:void 0}const Py="#/$defs/";function E3(e){const t=e.$defs;if(!t||Object.keys(t).length===0)return e;const n=new Map,r=new Set,s=d=>{const f=n.get(d);if(f)return f;if(r.has(d))return{type:"object",description:"↻ recursive schema"};const p=t[d];if(p===void 0)return{};r.add(d);const h=i(p);return r.delete(d),n.set(d,h),h},i=d=>{if(Array.isArray(d)){let f=!1;const p=d.map(h=>{const x=i(h);return x!==h&&(f=!0),x});return f?p:d}if(d&&typeof d=="object"){const f=d,p=f.$ref;if(typeof p=="string"&&p.startsWith(Py)){const v=s(p.slice(Py.length)),y={};let b=!1;for(const[j,S]of Object.entries(f))j!=="$ref"&&(y[j]=i(S),b=!0);return b?{...v,...y}:v}let h=!1;const x={};for(const[v,y]of Object.entries(f)){const b=i(y);x[v]=b,b!==y&&(h=!0)}return h?x:d}return d},{$defs:l,...u}=e;return i(u)}function gL(e){return Ms(e,"object")?typeof e.additionalProperties=="object"&&e.additionalProperties!==null?!0:!!e.patternProperties&&Object.keys(e.patternProperties).length>0:!1}function xL(e){const t=e.patternProperties;if(!(!t||Object.keys(t).length===0))return Object.entries(t).map(([n,r])=>({pattern:n,schema:r}))}function Ms(e,t){return Array.isArray(e.type)?e.type.includes(t):e.type===t}function Kf(e){const t=e["x-enum-labels"],n=e["x-enum-icons"],r=e["x-enum-descriptions"];return(e.enum??[]).map(s=>{const i=String(s),l=t?.[i],u=n?.[i],d=r?.[i];return{value:i,label:typeof l=="string"&&l&&l!==i?`${l} (${i})`:i,...typeof u=="string"&&u?{icon:u}:{},...typeof d=="string"&&d?{description:d}:{}}})}function vL(e){const t=e["x-enum-display"];if(t==="combobox"||t==="radio"||t==="grid"||t==="segmented")return t;const n=e["x-enum-icons"];if(n&&Object.keys(n).length>0)return"grid"}function bL(e){return e["x-array-display"]==="filter-pills"?"filter-pills":void 0}function yL(e){const t=typeof e.description=="string"?e.description.trim():"",n=e["x-help"],r=ed(n)&&typeof n.body=="string"?n.body.trim():"";return t&&r&&r!==t?`${t} ${r}`:t||r||void 0}function Iy(e,t){if(typeof e=="string"&&e)return w.createElement(Zr,{icon:e,className:"size-4 text-muted-foreground/70"});if(typeof t=="string"&&t)return w.createElement("span",{className:"text-sm text-muted-foreground"},t)}function wL(e){for(const t of[...e.anyOf??[],...e.oneOf??[]])if(Array.isArray(t.enum)&&t.enum.length>0)return t}function _L(e){const t=e["x-clicky-lookup"];if(!t||typeof t!="object")return;const n=t;if(!(typeof n.url!="string"||typeof n.filter!="string"))return t}function jL(e){const{key:t,prop:n,required:r,value:s,onChange:i}=e,l=n["x-icon"],u=n["x-layout"],d=u==="inline"||u==="stack"||u==="table"?u:void 0,f=n["x-label-position"],p=d??(f==="top"?"stack":f==="left"?"inline":void 0),h=Iy(n["x-input-prefix-icon"],n["x-input-prefix"]),x=Iy(n["x-input-suffix-icon"],n["x-input-suffix"]),v=typeof n["x-label-classes"]=="string"?n["x-label-classes"]:void 0,y=typeof n["x-input-classes"]=="string"?n["x-input-classes"]:void 0,b=typeof n["x-col-span"]=="number"&&Number.isFinite(n["x-col-span"])?n["x-col-span"]:void 0,j=kL(n),S=yL(n),N={key:t,kind:"string",label:typeof n.title=="string"&&n.title?n.title:t,required:r,schema:n,value:s,onChange:i,...n.readOnly===!0?{readOnly:!0}:{},...typeof n.description=="string"?{description:n.description}:{},...S?{helper:S}:{},...l!=null&&l!==""?{labelIcon:l}:{},...p?{layout:p}:{},...h?{prefix:h}:{},...x?{suffix:x}:{},...v?{labelClassName:v}:{},...y?{inputClassName:y}:{},...b!=null?{colSpan:b}:{}},k=_L(n);if(k)return{...N,kind:"lookup",lookup:k,options:[],allowCustomValue:k.multi!==!0};if(Array.isArray(n.enum)&&n.enum.length>0){const E=vL(n);return{...N,kind:"enum",options:Kf(n),...E?{display:E}:{}}}const T=wL(n);if(T)return{...N,kind:"enum",options:Kf(T)};if(n.format==="date"||n.format==="date-time")return{...N,kind:"date",dateFormat:n.format};if(n.format==="textarea"&&Ms(n,"string"))return{...N,kind:"textarea"};if(n.format==="md"&&Ms(n,"string")){const E=n["x-md-editor"];return{...N,kind:"markdown",...ed(E)?{markdownOptions:E}:{}}}if(Ms(n,"boolean"))return{...N,kind:"boolean"};if(Ms(n,"integer")||Ms(n,"number"))return{...N,kind:"number",coerceNumber:!0,...n.format==="percent"?{unit:"%"}:{},...typeof n.minimum=="number"?{minimum:n.minimum}:{}};if(Ms(n,"array")){const E=bL(n),O=n.items;return{...N,kind:"array",...O?{itemSchema:O}:{},...E?{arrayDisplay:E}:{},...E&&O&&Array.isArray(O.enum)?{options:Kf(O)}:{},...p?{layout:p}:{}}}if(gL(n)){const E=typeof n.additionalProperties=="object"&&n.additionalProperties!==null?n.additionalProperties:void 0,O=xL(n),M=j||O?!0:n.additionalProperties!==!1;return{...N,kind:"string-map",...E?{valueSchema:E}:{},...O?{valuePatternSchemas:O}:{},...n.properties?{knownProperties:n.properties}:{},allowExtraKeys:M,...j?{keyOptions:j}:{},...p?{layout:p}:{}}}return Ms(n,"object")&&n.properties?{...N,kind:"object",objectProperties:n.properties,...n.required?{objectRequired:n.required}:{},...p?{layout:p}:{}}:Ms(n,"object")?{...N,kind:"string-map",allowExtraKeys:n.additionalProperties!==!1,...j?{keyOptions:j}:{},...p?{layout:p}:{}}:N}function kL(e){const t=e.propertyNames;if(!(!t||!Array.isArray(t.enum)||t.enum.length===0))return Kf(t)}function NL(e){return e?e.type!==void 0&&!Ms(e,"string")?!1:e.enum===void 0&&e.const===void 0&&e.properties===void 0&&e.items===void 0&&e.additionalProperties===void 0&&e.allOf===void 0:!0}function CL(e,t){if(!e)return!1;for(const n of e.required??[])if(!(n in t))return!1;for(const[n,r]of Object.entries(e.properties??{}))if("const"in r&&t[n]!==r.const)return!1;return!0}function SL(e,t){const n={...e.properties},r=new Set(e.required??[]);for(const s of e.allOf??[]){if(s.if===void 0&&s.then===void 0){for(const[l,u]of Object.entries(s.properties??{}))n[l]=u;for(const l of s.required??[])r.add(l);continue}if(!CL(s.if,t))continue;const i=s.then??{};for(const[l,u]of Object.entries(i.properties??{}))n[l]=u;for(const l of i.required??[])r.add(l)}return{properties:n,required:[...r]}}const Vl=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 50h-42V40a22 22 0 0 0-22-22h-48a22 22 0 0 0-22 22v10H40a6 6 0 0 0 0 12h10v146a14 14 0 0 0 14 14h128a14 14 0 0 0 14-14V62h10a6 6 0 0 0 0-12M94 40a10 10 0 0 1 10-10h48a10 10 0 0 1 10 10v10H94Zm100 168a2 2 0 0 1-2 2H64a2 2 0 0 1-2-2V62h132Zm-84-104v64a6 6 0 0 1-12 0v-64a6 6 0 0 1 12 0m48 0v64a6 6 0 0 1-12 0v-64a6 6 0 0 1 12 0"})}),{__source:"ph:trash-light",__viewBox:"0 0 256 256",__group:"actions-tools",__consumerName:"trash",displayName:"UiTrash"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16M112 168a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Zm48 0a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Zm0-120H96v-8a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8Z"})}),{__source:"ph:trash-fill",__viewBox:"0 0 256 256",__group:"actions-tools",__consumerName:"trash",displayName:"UiTrashFilled"});function EL({field:e,fieldId:t,ctx:n}){const r=n.readOnly||e.readOnly===!0;if(e.arrayDisplay==="filter-pills"&&T3(e).length>0)return o.jsx(TL,{field:e,fieldId:t,readOnly:r,size:n.size});if(NL(e.itemSchema))return o.jsx(LL,{field:e,fieldId:t,readOnly:r,size:n.size});if(e.layout==="table"&&OL(e.itemSchema))return o.jsx(ML,{field:e,ctx:n,readOnly:r});const s=Array.isArray(e.value)?e.value:[],i=e.itemSchema??{type:"string"},l={...n,readOnly:r,depth:n.depth+1};return o.jsxs("div",{className:R("flex flex-col rounded-md border border-input p-2",pm[n.size]),children:[s.map((u,d)=>o.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-start gap-2",children:[o.jsx("div",{className:"min-w-0",children:n.render.renderFieldRow({key:`${e.key}[${d}]`,prop:i,required:!1,value:u,onChange:f=>e.onChange(y3(s,d,f))},l,{labelOverride:`Item ${d+1}`})}),!r&&o.jsx(AL,{onUp:d>0?()=>e.onChange(Ly(s,d,d-1)):void 0,onDown:de.onChange(Ly(s,d,d+1)):void 0,onRemove:()=>e.onChange(w3(s,d)),index:d})]},d)),!r&&o.jsxs(Fe,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>e.onChange([...s,_3(i)]),children:[o.jsx(K,{icon:pr,className:"text-sm"}),"Add item"]})]})}function T3(e){var t;const n=e.options??(Array.isArray((t=e.itemSchema)==null?void 0:t.enum)?e.itemSchema.enum.map(s=>({value:String(s),label:String(s)})):[]),r=new Set;return n.flatMap(s=>r.has(s.value)?[]:(r.add(s.value),[{value:s.value,label:s.label}]))}function TL({field:e,fieldId:t,readOnly:n,size:r}){const s=T3(e),i=new Set(s.map(h=>h.value)),l=O3(e.value).filter(h=>i.has(h)),u=l.length===0,d=new Set(u?s.map(h=>h.value):l);function f(h){const x=s.map(v=>v.value).filter(v=>h.has(v));e.onChange(x.length===s.length?[]:x)}function p(h){if(n)return;const x=new Set(d);x.has(h)?x.delete(h):x.add(h),f(x)}return o.jsx("div",{id:t,"data-jsf-input":!0,role:"group","aria-label":e.label,className:R("flex flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent px-2 py-1 shadow-sm",_2[r]),children:s.map(h=>o.jsx(Dl,{label:h.label,mode:d.has(h.value)?"active":"neutral",title:u?`${h.label} enabled by default`:h.label,...n?{}:{onClick:()=>p(h.value)},className:"max-w-full"},h.value))})}function OL(e){return!!e&&!!e.properties&&Object.keys(e.properties).length>0}function ML({field:e,ctx:t,readOnly:n}){const r=Array.isArray(e.value)?e.value:[],s=e.itemSchema??{type:"object"},i=Object.entries(s.properties??{}),l={...t,readOnly:n,depth:t.depth+1};function u(d,f,p,h){const x=ed(d)?d:{},v=t.render.renderFieldNodes({key:`${e.key}[${f}].${p}`,prop:h,required:!1,value:x[p],onChange:y=>e.onChange(y3(r,f,{...x,[p]:y}))},l);return v?.value??null}return o.jsxs("div",{className:"overflow-x-auto rounded-md border border-input",children:[o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-input bg-muted/40 text-left",children:[i.map(([d,f])=>o.jsx("th",{className:"px-2 py-1 text-xs font-medium text-muted-foreground",children:typeof f.title=="string"&&f.title?f.title:d},d)),!n&&o.jsx("th",{className:"w-10 px-2 py-1"})]})}),o.jsx("tbody",{children:r.map((d,f)=>o.jsxs("tr",{className:"border-b border-input last:border-b-0 align-top",children:[i.map(([p,h])=>o.jsx("td",{className:"px-2 py-1",children:u(d,f,p,h)},p)),!n&&o.jsx("td",{className:"px-2 py-1",children:o.jsx("button",{type:"button","aria-label":`Remove item ${f+1}`,className:"inline-flex h-8 w-8 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",onClick:()=>e.onChange(w3(r,f)),children:o.jsx(K,{icon:Vl,className:"text-sm"})})})]},f))})]}),!n&&o.jsx("div",{className:"p-2",children:o.jsxs(Fe,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>e.onChange([...r,_3(s)]),children:[o.jsx(K,{icon:pr,className:"text-sm"}),"Add item"]})})]})}function AL({onUp:e,onDown:t,onRemove:n,index:r}){return o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{type:"button","aria-label":`Move item ${r+1} up`,disabled:!e,className:"inline-flex h-8 w-8 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-30",onClick:e,children:o.jsx(K,{icon:Ku,className:"text-sm"})}),o.jsx("button",{type:"button","aria-label":`Move item ${r+1} down`,disabled:!t,className:"inline-flex h-8 w-8 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-30",onClick:t,children:o.jsx(K,{icon:Vt,className:"text-sm"})}),o.jsx("button",{type:"button","aria-label":`Remove item ${r+1}`,className:"inline-flex h-8 w-8 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",onClick:n,children:o.jsx(K,{icon:Vl,className:"text-sm"})})]})}function LL({field:e,fieldId:t,readOnly:n,size:r}){const s=O3(e.value);function i(u,d){const f=u.split(",").map(p=>p.trim()).filter(Boolean);f.length!==0&&(e.onChange([...s,...f]),d.value="")}function l(u){const d=u.currentTarget;if(u.key==="Enter"||u.key===","){u.preventDefault(),i(d.value,d);return}u.key==="Backspace"&&d.value===""&&s.length>0&&e.onChange(s.slice(0,-1))}return o.jsxs("div",{className:R("flex flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent px-2 py-1 shadow-sm",_2[r]),children:[s.map((u,d)=>o.jsxs("span",{className:"inline-flex h-6 max-w-full items-center gap-1 rounded-md bg-muted px-2 text-xs",children:[o.jsx("span",{className:"truncate",children:u}),!n&&o.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground","aria-label":`Remove ${u}`,onClick:()=>e.onChange(s.filter((f,p)=>p!==d)),children:o.jsx(K,{icon:Tn})})]},`${u}-${d}`)),!n&&o.jsx("input",{id:t,"data-jsf-input":!0,className:R("min-w-32 flex-1 bg-transparent px-1 py-1 outline-none",bn[r]),placeholder:s.length===0?Sr(e.schema):"",onKeyDown:l,onBlur:u=>i(u.currentTarget.value,u.currentTarget)})]})}function O3(e){return Array.isArray(e)?e.map(String):[]}function RL({field:e,ctx:t}){const n=ed(e.value)?e.value:{},r={type:"object",properties:e.objectProperties??{},...e.objectRequired?{required:e.objectRequired}:{},...Array.isArray(e.schema.allOf)?{allOf:e.schema.allOf}:{},...Array.isArray(e.schema["x-order"])?{"x-order":e.schema["x-order"]}:{},...typeof e.schema["x-columns"]=="number"?{"x-columns":e.schema["x-columns"]}:{},...typeof e.schema["x-classes"]=="string"?{"x-classes":e.schema["x-classes"]}:{}};return o.jsx(N3,{layout:t.layout,size:t.size,columns:O2(r["x-columns"]),...typeof r["x-classes"]=="string"?{className:r["x-classes"]}:{},children:t.render.renderObjectFields(r,n,s=>e.onChange(s),{...t,readOnly:t.readOnly||e.readOnly===!0,depth:t.depth+1})})}function PL({field:e,ctx:t}){const n=t.readOnly||e.readOnly===!0,r=ed(e.value)?e.value:{},s=e.knownProperties??{},i=Object.keys(s),l=Object.keys(r).filter(N=>!(N in s)),u={...t,readOnly:n,depth:t.depth+1},d=e.schema.propertyNames,f=typeof d?.title=="string"&&d.title?d.title:void 0;function p(N){for(const{pattern:k,schema:T}of e.valuePatternSchemas??[]){let E;try{E=new RegExp(k)}catch{E=void 0}if(E?.test(N))return T}return e.valueSchema??{type:"string"}}function h(N){return p(N)["x-layout"]==="stack"}function x(N,k){e.onChange({...r,[N]:k})}function v(N,k){if(k===N)return;const T={};for(const[E,O]of Object.entries(r))T[E===N?k:E]=O;e.onChange(T)}function y(N){const k={...r};delete k[N],e.onChange(k)}function b(){""in r||e.onChange({...r,"":""})}function j(N,k){const T=t.render.renderFieldNodes({key:N,prop:k,required:!1,value:r[N]??"",onChange:E=>x(N,E)},u);return T?.value??null}function S(N){return j(N,p(N))}return o.jsxs("div",{className:R("flex flex-col rounded-md border border-input p-2",pm[u.size]),children:[i.map(N=>o.jsxs("div",{className:"grid grid-cols-[10rem_1fr] items-center gap-2",children:[o.jsx("label",{htmlFor:T2(N,u.idPrefix),className:"truncate text-xs text-muted-foreground",title:N,children:N}),o.jsx("div",{className:"min-w-0",children:j(N,s[N]??{type:"string"})})]},`known-${N}`)),l.map(N=>{const k=e.keyOptions?o.jsx(er,{options:$A(e.keyOptions,l,N),value:N,disabled:n,size:u.size,allowCustomValue:!1,onChange:E=>v(N,E),placeholder:"Select…"}):o.jsx("input",{type:"text","aria-label":"Field name",className:R(bi(u.size),"font-mono"),value:N,disabled:n,onChange:E=>v(N,E.target.value)}),T=n?null:o.jsx("button",{type:"button","aria-label":`Remove ${N}`,className:"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",onClick:()=>y(N),children:o.jsx(K,{icon:Vl,className:"text-sm"})});return h(N)?o.jsxs("div",{className:"space-y-1.5 rounded-md border border-input p-2",children:[f&&o.jsx("span",{className:"block text-xs font-medium text-muted-foreground",children:f}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"min-w-0 flex-1",children:k}),T]}),o.jsx("div",{className:"min-w-0",children:S(N)})]},`extra-${N}`):o.jsxs("div",{className:"grid grid-cols-[10rem_1fr_auto] items-center gap-2",children:[k,o.jsx("div",{className:"min-w-0",children:S(N)}),T]},`extra-${N}`)}),!n&&e.allowExtraKeys!==!1&&o.jsxs(Fe,{type:"button",variant:"outline",size:"sm",onClick:b,className:"gap-1.5",children:[o.jsx(K,{icon:pr,className:"text-sm"}),"Add field"]})]})}function IL(e,t){const n=T2(e.key,t.idPrefix);if(e.readOnly&&!$L(e.kind))return o.jsx(C3,{field:e,fieldId:n,size:t.size});const r=t.readOnly||e.readOnly===!0,s=t.size;switch(e.kind){case"enum":return o.jsx(rL,{field:e,fieldId:n,readOnly:r,size:s});case"lookup":return o.jsx(iL,{field:e,fieldId:n,readOnly:r,size:s,...t.rootValue?{rootValue:t.rootValue}:{}});case"boolean":return o.jsx(nL,{field:e,fieldId:n,readOnly:r,size:s});case"number":return o.jsx(YA,{field:e,fieldId:n,readOnly:r,size:s});case"date":return o.jsx(tL,{field:e,fieldId:n,readOnly:r,size:s});case"textarea":return o.jsx(lL,{field:e,fieldId:n,readOnly:r,size:s});case"markdown":return o.jsx(cL,{field:e,fieldId:n,readOnly:r,size:s});case"display":return o.jsx(uL,{field:e,size:s});case"link":return o.jsx(dL,{field:e,fieldId:n,size:s});case"array":return o.jsx(EL,{field:e,fieldId:n,ctx:t});case"object":return o.jsx(RL,{field:e,ctx:t});case"string-map":return o.jsx(PL,{field:e,ctx:t});default:return o.jsx(S3,{field:e,fieldId:n,readOnly:r,size:s})}}function $L(e){return e==="array"||e==="object"||e==="string-map"||e==="textarea"||e==="markdown"||e==="display"||e==="link"}function M3(e,t){let r=jL(e);for(const p of t.pre){if(!r)break;r=p(r,{key:e.key,prop:e.prop,value:e.value,...t.rootValue?{rootValue:t.rootValue}:{}})}if(!r||t.hideReadOnlyFields&&r.readOnly)return null;const s=T2(r.key,t.idPrefix);let i=o.jsx(JA,{field:r,fieldId:s,size:t.size});const l=r.layout==="inline"?"inline":r.layout==="stack"?"stacked":void 0,u=l?{...t,layout:{...t.layout,mode:l}}:t;let d=IL(r,u);const f=t.rootValue?{rootValue:t.rootValue}:{};for(const p of t.post){const h=p(r,{label:i,value:d},f);i=h.label,d=h.value}return{field:r,label:i,value:d}}function FL(e,t){const n=M3(e,t);return n?{label:n.label,value:n.value}:null}function A3(e,t,n){const r=M3(e,t);if(!r)return null;const{field:s}=r;if(s.kind==="object"||s.layout==="table")return o.jsx(QA,{label:n?.labelOverride??s.label,required:s.required,size:t.size,...s.badge?{badge:s.badge}:{},...s.helper?{helper:s.helper}:{},...s.labelIcon!=null?{labelIcon:s.labelIcon}:{},children:r.value});if(s.kind==="display")return o.jsx("div",{className:"col-span-full",children:r.value});const i=n?.labelOverride?o.jsxs("span",{className:R("flex items-center gap-2 font-medium",bn[t.size]),children:[o.jsx(Zr,{icon:s.labelIcon,className:"text-[15px] text-muted-foreground"}),o.jsx("span",{children:n.labelOverride}),s.required&&o.jsx("span",{className:"text-destructive",children:"*"}),s.badge&&o.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:s.badge})]}):r.label,l=HA(s);return o.jsx(GA,{layout:t.layout,size:t.size,label:i,value:r.value,...s.helper?{helper:s.helper}:{},...l?{error:l}:{}})}function L3(e,t,n,r,s){const{properties:i,required:l}=SL(e,t),u=new Set(s?.hiddenKeys??[]),d=BA(DA(Object.entries(i),e["x-order"])),f=r.sortMode==="required-first"?UA(d,l):r.sortMode==="priority"?VA(d,l,t):d,p=r.depth===0&&r.fieldFilter?f.filter(([x,v])=>FA(x,v,r.fieldFilter)):f,h=r.layout.mode==="inline"?1:O2(e["x-columns"]);return p.flatMap(([x,v])=>{if(u.has(x))return[];const y=A3({key:x,prop:v,required:l.includes(x),value:t[x],onChange:b=>n({...t,[x]:b})},r);if(!y)return[];if(h>1){const b=DL(v)?h:IA(v["x-col-span"],h);return[o.jsx("div",{style:{gridColumn:`span ${b} / span ${b}`},children:y},x)]}return[o.jsx("div",{className:"contents",children:y},x)]})}function DL(e){const t=e.type;return(t==="object"||Array.isArray(t)&&t.includes("object"))&&e.properties?!0:e["x-layout"]==="table"}const BL={renderFieldNodes:FL,renderFieldRow:A3,renderObjectFields:L3},UL="clicky-ui-json-schema-form-preferences",zL=["xs","sm","md","lg","xl"];function VL(e){return typeof e=="string"&&zL.includes(e)}function HL(e){return e==="stacked"||e==="inline"}function ZL(e){return e==="schema"||e==="required-first"||e==="priority"}function WL(e){let t;try{t=localStorage.getItem(e)}catch{return{}}if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}if(typeof n!="object"||n===null)return{};const r=n,s={};return VL(r.size)&&(s.size=r.size),HL(r.layoutMode)&&(s.layoutMode=r.layoutMode),ZL(r.sortMode)&&(s.sortMode=r.sortMode),s}function qL(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}const KL=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M144 128a16 16 0 1 1-16-16a16 16 0 0 1 16 16m-84-16a16 16 0 1 0 16 16a16 16 0 0 0-16-16m136 0a16 16 0 1 0 16 16a16 16 0 0 0-16-16"})}),{__source:"ph:dots-three-bold",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"ellipsis-bold",displayName:"UiEllipsisBold"}),GL="40ch",JL="600px";function QL(e,t,n){const r=e?.mode??(t?"inline":"stacked"),s=n??r,i=e?.valueMaxWidth??JL;return s!=="inline"?{mode:"stacked",valueMaxWidth:i}:{mode:"inline",labelMaxWidth:e?.labelMaxWidth??GL,valueMaxWidth:i}}function vm({schema:e,value:t,onChange:n,readOnly:r=!1,inline:s=!1,layout:i,size:l=uM,idPrefix:u,hideReadOnlyFields:d=!1,hiddenKeys:f,requiredFirst:p=!1,title:h,pre:x,post:v,showPreferencesMenu:y=!0,persistPreferences:b=!0,preferencesStorageKey:j=UL,lookupFetcher:S}){const[N,k]=w.useState(()=>y&&b?WL(j):{}),[T,E]=w.useState(""),O=N.size??l,M=QL(i,s,N.layoutMode),L=N.sortMode??(p?"required-first":"schema"),F=W=>{k(W),b&&qL(j,W)},U={readOnly:r,hideReadOnlyFields:d,layout:M,size:O,sortMode:L,pre:x??[],post:v??[],rootValue:t,depth:0,render:BL,...u?{idPrefix:u}:{},...T.trim()?{fieldFilter:T.trim()}:{}},z=w.useMemo(()=>E3(e),[e]),V=typeof z["x-discriminator"]=="string"?z["x-discriminator"]:void 0,X=V!=null&&(t[V]==null||t[V]===""),H=V?null:L3(z,t,n,U,f?{hiddenKeys:f}:void 0),B=H!=null&&H.length===0&&T.trim()!=="";return o.jsx(fL,{...S?{fetcher:S}:{},children:o.jsxs("div",{className:R("relative flex flex-col",pm[O]),children:[y&&!X&&o.jsx(tR,{size:O,layoutMode:M.mode,sortMode:L,fieldFilter:T,onFilterChange:E,onSelectSize:W=>F({...N,size:W}),onSelectLayout:W=>F({...N,layoutMode:W}),onSelectSort:W=>F({...N,sortMode:W})}),h&&o.jsx("h3",{className:R("font-semibold",bn[O]),children:h}),o.jsx(N3,{layout:M,size:O,columns:O2(z["x-columns"]),...typeof z["x-classes"]=="string"?{className:z["x-classes"]}:{},children:V?o.jsx(mL,{schema:z,value:t,onChange:n,ctx:U,discKey:V}):H}),B&&o.jsxs("p",{className:R("text-muted-foreground",bn[O]),children:["No fields match “",T.trim(),"”."]})]})})}const YL=[{value:"xs",label:"Extra small"},{value:"sm",label:"Small"},{value:"md",label:"Medium"},{value:"lg",label:"Large"},{value:"xl",label:"Extra large"}],XL=[{value:"stacked",label:"Stacked"},{value:"inline",label:"Inline"}],eR=[{value:"schema",label:"Schema order"},{value:"required-first",label:"Required first"},{value:"priority",label:"Required & filled first"}];function tR({size:e,layoutMode:t,sortMode:n,fieldFilter:r,onFilterChange:s,onSelectSize:i,onSelectLayout:l,onSelectSort:u}){const d=r.trim()!=="";return o.jsx(Fl,{align:"right",menuLabel:"Form display options",className:"absolute right-0 top-0 z-10",trigger:o.jsx("button",{type:"button","aria-label":"Form display options","aria-haspopup":"menu",className:R("inline-flex h-7 w-7 items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",d?"text-primary":"text-muted-foreground hover:text-foreground"),children:o.jsx(K,{icon:KL,className:"text-lg"})}),children:f=>o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"px-2 pb-1.5 pt-1",children:o.jsxs("div",{className:"relative",children:[o.jsx(K,{icon:$s,className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground"}),o.jsx("input",{type:"text","aria-label":"Filter fields",placeholder:"Filter fields…",value:r,onChange:p=>s(p.target.value),onKeyDown:p=>p.stopPropagation(),className:"w-full rounded-md border border-input bg-background py-1 pl-7 pr-6 text-xs text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring"}),d&&o.jsx("button",{type:"button","aria-label":"Clear filter",onClick:()=>s(""),className:"absolute right-1.5 top-1/2 -translate-y-1/2 inline-flex items-center justify-center text-muted-foreground hover:text-foreground",children:o.jsx(K,{icon:Tn,className:"text-xs"})})]})}),o.jsx($h,{title:"Size"}),YL.map(p=>o.jsx(Fh,{label:p.label,selected:p.value===e,onSelect:()=>{i(p.value),f()}},p.value)),o.jsx($h,{title:"Layout"}),XL.map(p=>o.jsx(Fh,{label:p.label,selected:p.value===t,onSelect:()=>{l(p.value),f()}},p.value)),o.jsx($h,{title:"Sort"}),eR.map(p=>o.jsx(Fh,{label:p.label,selected:p.value===n,onSelect:()=>{u(p.value),f()}},p.value))]})})}function $h({title:e}){return o.jsx("div",{className:"px-3 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:e})}function Fh({label:e,selected:t,onSelect:n}){return o.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":t,className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-popover-foreground hover:bg-accent hover:text-accent-foreground",onClick:n,children:[o.jsx("span",{className:"flex w-3.5 shrink-0 justify-center",children:t&&o.jsx(K,{icon:mr,className:"text-xs"})}),e]})}const R3=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M39.91 128a27.7 27.7 0 0 1 9.49 11.13C54 148.62 54 160.51 54 172c0 24.27 1.21 38 26 38a6 6 0 0 1 0 12c-16.88 0-27.81-5.6-33.4-17.13C42 195.38 42 183.49 42 172c0-24.27-1.21-38-26-38a6 6 0 0 1 0-12c24.79 0 26-13.73 26-38c0-11.49 0-23.38 4.6-32.87C52.19 39.6 63.12 34 80 34a6 6 0 0 1 0 12c-24.79 0-26 13.73-26 38c0 11.49 0 23.38-4.6 32.87A27.7 27.7 0 0 1 39.91 128M240 122c-24.79 0-26-13.73-26-38c0-11.49 0-23.38-4.6-32.87C203.81 39.6 192.88 34 176 34a6 6 0 0 0 0 12c24.79 0 26 13.73 26 38c0 11.49 0 23.38 4.6 32.87a27.7 27.7 0 0 0 9.49 11.13a27.7 27.7 0 0 0-9.49 11.13c-4.6 9.49-4.6 21.38-4.6 32.87c0 24.27-1.21 38-26 38a6 6 0 0 0 0 12c16.88 0 27.81-5.6 33.4-17.13c4.6-9.49 4.6-21.38 4.6-32.87c0-24.27 1.21-38 26-38a6 6 0 0 0 0-12"})}),{__source:"ph:brackets-curly-light",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"braces",displayName:"UiBraces"});function P3({left:e,right:t,defaultSplit:n=50,minLeft:r=20,minRight:s=20,leftClass:i,rightClass:l,className:u}){const[d,f]=w.useState(n),p=w.useRef(!1),h=w.useRef(null),x=w.useCallback(v=>{v.preventDefault(),p.current=!0;const y=j=>{if(!p.current||!h.current)return;const S=h.current.getBoundingClientRect(),N=(j.clientX-S.left)/S.width*100;f(Math.max(r,Math.min(100-s,N)))},b=()=>{p.current=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",b),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",y),document.addEventListener("mouseup",b),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[r,s]);return o.jsxs("div",{ref:h,className:R("flex flex-1 overflow-hidden h-full",u),children:[o.jsx("div",{style:{width:`${d}%`},className:R("overflow-y-auto bg-background min-h-0",i),children:e}),o.jsx("div",{role:"separator","aria-orientation":"vertical",className:"w-1 bg-border hover:bg-primary cursor-col-resize shrink-0 transition-colors",onMouseDown:x}),o.jsx("div",{style:{width:`${100-d}%`},className:R("overflow-hidden bg-background min-h-0",l),children:t})]})}const I3=w.createContext(null);function nR(e){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&e.currentTarget.target!=="_blank"}function rR(e){return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)}function $3(){const e=w.useSyncExternalStore(rR,()=>window.location.pathname,()=>"/"),t=w.useCallback((r,s)=>{typeof window>"u"||(s?.replace?window.history.replaceState(window.history.state,"",r):window.history.pushState(window.history.state,"",r),window.dispatchEvent(new PopStateEvent("popstate")))},[]),n=w.useCallback(({to:r,className:s,children:i,title:l,key:u})=>o.jsx("a",{href:r,className:s,title:l,onClick:d=>{nR(d)&&(d.preventDefault(),t(r))},children:i},u),[t]);return w.useMemo(()=>({pathname:e,renderLink:n,navigate:t}),[e,n,t])}function A2(){const e=w.useContext(I3),t=$3();return e??t}const sR=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 42H40a14 14 0 0 0-14 14v144a14 14 0 0 0 14 14h176a14 14 0 0 0 14-14V56a14 14 0 0 0-14-14M38 200v-50h18a6 6 0 0 0 0-12H38v-20h18a6 6 0 0 0 0-12H38V86h18a6 6 0 0 0 0-12H38V56a2 2 0 0 1 2-2h42v148H40a2 2 0 0 1-2-2m180 0a2 2 0 0 1-2 2H94V54h122a2 2 0 0 1 2 2Z"})}),{__source:"ph:sidebar-light",__viewBox:"0 0 256 256",__group:"layout-dashboard",__consumerName:"sidebar",displayName:"UiSidebar"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16M64 152H48a8 8 0 0 1 0-16h16a8 8 0 0 1 0 16m0-32H48a8 8 0 0 1 0-16h16a8 8 0 0 1 0 16m0-32H48a8 8 0 0 1 0-16h16a8 8 0 0 1 0 16m152 112H88V56h128z"})}),{__source:"ph:sidebar-fill",__viewBox:"0 0 256 256",__group:"layout-dashboard",__consumerName:"sidebar",displayName:"UiSidebarFilled"});const oR=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M222 128a6 6 0 0 1-6 6H40a6 6 0 0 1 0-12h176a6 6 0 0 1 6 6M40 70h176a6 6 0 0 0 0-12H40a6 6 0 0 0 0 12m176 116H40a6 6 0 0 0 0 12h176a6 6 0 0 0 0-12"})}),{__source:"ph:list-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"menu",displayName:"UiMenu"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m-16 152H64a8 8 0 0 1 0-16h128a8 8 0 0 1 0 16m0-48H64a8 8 0 0 1 0-16h128a8 8 0 0 1 0 16m0-48H64a8 8 0 0 1 0-16h128a8 8 0 0 1 0 16"})}),{__source:"ph:list-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"menu",displayName:"UiMenuFilled"});function $y(e){return!e||typeof window>"u"?null:window.localStorage.getItem(e)}function td(e){const{brand:t,nav:n,search:r,actions:s,mobileActions:i,toolbar:l,searchMaxWidth:u="28rem",navSections:d,sidebar:f,sidebarHeader:p,sidebarFooter:h,collapsible:x=!0,defaultCollapsed:v=!1,collapsedStorageKey:y,sidebarWidth:b=240,collapsedWidth:j=56,mobileSidebarLabel:S="Navigation",bodyHeader:N,bodyActions:k,bodySidebar:T,bodySplit:E=24,children:O,className:M,headerClassName:L,toolbarClassName:F,sidebarClassName:U,bodyHeaderClassName:z,contentClassName:V}=e,X=f!==void 0||(d?.length??0)>0,[H,B]=w.useState(!1),[W,se]=w.useState(()=>$y(y)==="true"||$y(y)===null&&v);w.useEffect(()=>{y&&typeof window<"u"&&window.localStorage.setItem(y,String(W))},[W,y]),wo(H,()=>B(!1));const P=W?j:b,J=i??s,ne=!X&&t!==void 0||n!==void 0||r!==void 0||s!==void 0||i!==void 0||l!==void 0,$=X,Q=N!==void 0||k!==void 0,ae=(ie,de)=>typeof f=="function"?f(ie):f!==void 0?f:d&&o.jsx(iR,{sections:d,collapsed:ie,...de?{onNavigate:de}:{}});return o.jsxs("div",{className:R("flex h-full min-h-0 w-full bg-background",M),children:[X&&o.jsxs("aside",{style:{width:P},className:R("hidden shrink-0 flex-col overflow-hidden border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width] duration-200 md:flex",U),children:[o.jsxs("div",{className:R("flex h-14 shrink-0 items-center border-b border-sidebar-border",W?"justify-center px-2":"justify-between px-density-3"),children:[!W&&t&&o.jsx("div",{className:"flex min-w-0 items-center gap-2",children:t}),x&&o.jsx("button",{type:"button",onClick:()=>se(ie=>!ie),"aria-label":W?"Expand sidebar":"Collapse sidebar",title:W?"Expand sidebar":"Collapse sidebar",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/70 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",children:o.jsx(K,{icon:sR,className:"h-4 w-4"})})]}),p&&o.jsx("div",{className:"shrink-0 border-b border-sidebar-border px-density-3 py-density-2",children:p}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto py-density-2",children:ae(W)}),h&&o.jsx("div",{className:"mt-auto shrink-0 border-t border-sidebar-border px-density-3 py-density-2",children:h})]}),o.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[(ne||$)&&o.jsxs("header",{className:"shrink-0 border-b border-border bg-card",children:[$&&o.jsxs("div",{className:"flex flex-wrap items-center gap-density-2 px-density-3 py-density-2 md:hidden",children:[o.jsx("button",{type:"button","aria-label":`Open ${S}`,title:S,className:"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-background text-foreground transition-colors hover:bg-accent",onClick:()=>B(!0),children:o.jsx(K,{icon:oR,className:"h-4 w-4"})}),t&&o.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-density-2",children:t}),J&&o.jsx("div",{className:"ml-auto flex min-w-0 shrink items-center justify-end gap-density-2",children:J}),r!==void 0&&o.jsx("div",{className:"basis-full min-w-0",children:r}),n&&o.jsx("div",{className:"basis-full min-w-0 overflow-x-auto",children:n})]}),o.jsxs("div",{className:R("hidden h-14 items-center gap-density-3 px-density-4 md:flex",!X&&"flex",L),children:[!X&&t&&o.jsx("div",{className:"flex shrink-0 items-center gap-density-2",children:t}),n&&o.jsx("div",{className:"flex shrink-0 items-center",children:n}),r!==void 0&&o.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:o.jsx("div",{className:"w-full",style:{maxWidth:u},children:r})}),r===void 0&&o.jsx("div",{className:"flex-1"}),s&&o.jsx("div",{className:"flex shrink-0 items-center gap-density-2",children:s})]}),l&&o.jsx("div",{className:R("flex flex-wrap items-center gap-density-2 border-t border-border bg-muted px-density-3 py-density-2 md:px-density-4",F),children:l})]}),Q&&o.jsxs("div",{className:R("flex shrink-0 flex-col items-stretch gap-density-2 border-b border-border bg-card px-density-3 py-density-2 md:flex-row md:items-start md:justify-between md:gap-density-3 md:px-density-4",z),children:[o.jsx("div",{className:"min-w-0 flex-1",children:N}),k&&o.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-density-2",children:k})]}),T!==void 0?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden md:hidden",children:[o.jsx("div",{className:"max-h-[40vh] shrink-0 overflow-y-auto border-b border-border bg-background",children:T}),o.jsx("main",{className:R("min-h-0 min-w-0 flex-1 overflow-auto",V),children:O})]}),o.jsx(P3,{className:"hidden min-h-0 flex-1 md:flex",defaultSplit:E,minLeft:12,minRight:30,left:T,right:o.jsx("div",{className:R("h-full min-w-0",V),children:O}),rightClass:"overflow-y-auto"})]}):o.jsx("main",{className:R("min-h-0 min-w-0 flex-1 overflow-auto",V),children:O})]}),X&&H&&o.jsxs("div",{className:"fixed inset-0 z-50 md:hidden",role:"presentation",onClick:()=>B(!1),children:[o.jsx("div",{className:"absolute inset-0 bg-black/40"}),o.jsxs("aside",{role:"dialog","aria-modal":"true","aria-label":S,className:R("relative z-10 flex h-full w-[min(20rem,85vw)] flex-col overflow-hidden border-r border-sidebar-border bg-sidebar text-sidebar-foreground shadow-xl",U),onClick:ie=>ie.stopPropagation(),children:[o.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-sidebar-border px-density-3",children:[t&&o.jsx("div",{className:"flex min-w-0 items-center gap-2",children:t}),o.jsx("button",{type:"button","aria-label":`Close ${S}`,title:"Close",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/70 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",onClick:()=>B(!1),children:o.jsx(K,{icon:Tn,className:"h-4 w-4"})})]}),p&&o.jsx("div",{className:"shrink-0 border-b border-sidebar-border px-density-3 py-density-2",children:p}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto py-density-2",children:ae(!1,()=>B(!1))}),h&&o.jsx("div",{className:"mt-auto shrink-0 border-t border-sidebar-border px-density-3 py-density-2",children:h})]})]})]})}function iR({sections:e,collapsed:t,onNavigate:n}){const{renderLink:r}=A2();return o.jsx("nav",{className:R("flex flex-col gap-0.5",t?"px-2":"px-density-2"),children:e.map((s,i)=>o.jsxs("div",{className:"flex flex-col",children:[s.label&&(t?o.jsx("div",{className:"mx-2 mb-1 mt-3 border-t border-sidebar-border first:mt-1"}):o.jsx("div",{className:"mb-0.5 mt-3 px-density-2 text-[10px] font-semibold uppercase tracking-[0.18em] text-sidebar-foreground/55 first:mt-1",children:s.label})),s.items.map(l=>o.jsx(aR,{item:l,collapsed:t,renderLink:r,...n?{onNavigate:n}:{}},l.key))]},s.label??`section-${i}`))})}function aR({item:e,collapsed:t,renderLink:n,onNavigate:r}){const s=R("flex w-full items-center gap-2.5 rounded-md px-density-2 py-1.5 text-left text-[13px] text-sidebar-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",t&&"justify-center px-0",e.active&&"bg-sidebar-accent font-medium text-sidebar-primary"),i=o.jsxs(o.Fragment,{children:[e.icon&&o.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:o.jsx(K,{...typeof e.icon=="string"?{name:e.icon}:{icon:e.icon}})}),!t&&o.jsx("span",{className:"flex-1 truncate",children:e.label}),!t&&e.badge]}),l=t&&typeof e.label=="string"?e.label:void 0;if(e.external)return o.jsx("a",{href:e.to,className:s,title:l,target:"_blank",rel:"noopener noreferrer",onClick:r,children:i});const u=n({key:e.key,to:e.to,className:s,children:i,...l?{title:l}:{}});return r?o.jsx("div",{onClick:r,children:u}):u}const lR={pill:{base:"rounded-md",active:"bg-primary text-primary-foreground",inactive:"text-muted-foreground hover:bg-accent hover:text-foreground"},underline:{base:"rounded-none border-b-2 -mb-px",active:"border-primary text-foreground font-medium",inactive:"border-transparent text-muted-foreground hover:text-foreground"}};function cR({active:e,onClick:t,label:n,icon:r,count:s,countColor:i="bg-muted-foreground",variant:l="pill",className:u}){const d=lR[l];return o.jsxs("button",{type:"button",role:"tab","aria-selected":e,onClick:t,className:R("inline-flex items-center gap-1.5 px-density-3 py-density-1.5 text-sm transition-colors",d.base,e?d.active:d.inactive,u),children:[r&&o.jsx(K,{...typeof r=="string"?{name:r}:{icon:r}}),o.jsx("span",{children:n}),s!==void 0&&s>0&&o.jsx("span",{className:R("inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-bold text-white",i),children:s})]})}function F3({tabs:e,value:t,onChange:n,variant:r="underline",className:s}){return o.jsx("div",{role:"tablist",className:R("flex items-center gap-density-1",r==="underline"&&"border-b border-border",s),children:e.map(i=>o.jsx(cR,{active:i.id===t,onClick:()=>{i.disabled||n(i.id)},label:i.label,variant:r,...i.icon!==void 0?{icon:i.icon}:{},...i.count!==void 0?{count:i.count}:{},...i.countColor!==void 0?{countColor:i.countColor}:{},...i.disabled?{className:"opacity-50 pointer-events-none"}:{}},i.id))})}const jf=6,uR=120;function nd({trigger:e,children:t,placement:n="top",delay:r=0,arrow:s=!0,className:i,cardClassName:l}){const[u,d]=w.useState(!1),[f,p]=w.useState(null),h=xa(),x=w.useRef(null),v=w.useRef(null),y=w.useRef(null),b=w.useRef(null),j=()=>{b.current!==null&&(window.clearTimeout(b.current),b.current=null)};function S(){j(),r>0?(y.current!==null&&window.clearTimeout(y.current),y.current=window.setTimeout(()=>d(!0),r)):d(!0)}function N(){y.current!==null&&(window.clearTimeout(y.current),y.current=null),j(),b.current=window.setTimeout(()=>d(!1),uR)}w.useLayoutEffect(()=>{if(!u)return;const T=()=>{const E=x.current,O=v.current;if(!E||!O)return;const M=E.getBoundingClientRect(),L=O.getBoundingClientRect();let F=0,U=0;switch(n){case"top":F=M.top-L.height-jf,U=M.left+M.width/2-L.width/2;break;case"bottom":F=M.bottom+jf,U=M.left+M.width/2-L.width/2;break;case"left":F=M.top+M.height/2-L.height/2,U=M.left-L.width-jf;break;case"right":F=M.top+M.height/2-L.height/2,U=M.right+jf;break}const z=4;U=Math.min(Math.max(z,U),window.innerWidth-L.width-z),F=Math.min(Math.max(z,F),window.innerHeight-L.height-z),p({top:F,left:U})};return T(),window.addEventListener("scroll",T,!0),window.addEventListener("resize",T),()=>{window.removeEventListener("scroll",T,!0),window.removeEventListener("resize",T)}},[u,n,t]),w.useEffect(()=>()=>{y.current!==null&&window.clearTimeout(y.current),b.current!==null&&window.clearTimeout(b.current)},[]);const k=u&&typeof document<"u"?pa.createPortal(o.jsxs("div",{ref:v,role:"tooltip",onMouseEnter:j,onMouseLeave:N,style:{...f?{position:"fixed",top:f.top,left:f.left}:{position:"fixed",top:-9999,left:-9999,visibility:"hidden"},zIndex:h},className:R("rounded-md border border-border bg-background px-2.5 py-1.5 text-[11px] shadow-lg","whitespace-nowrap",l),children:[t,s&&f&&o.jsx(dR,{placement:n})]}),document.body):null;return o.jsxs("span",{ref:x,className:R("relative inline-flex items-center",i),onMouseEnter:S,onMouseLeave:N,onFocus:S,onBlur:N,children:[e,k]})}function dR({placement:e}){const t="absolute h-1.5 w-1.5 rotate-45 border bg-background border-border";switch(e){case"top":return o.jsx("span",{"aria-hidden":!0,className:R(t,"left-1/2 -translate-x-1/2 -bottom-0.5 border-l-0 border-t-0")});case"bottom":return o.jsx("span",{"aria-hidden":!0,className:R(t,"left-1/2 -translate-x-1/2 -top-0.5 border-r-0 border-b-0")});case"left":return o.jsx("span",{"aria-hidden":!0,className:R(t,"top-1/2 -translate-y-1/2 -right-0.5 border-l-0 border-b-0")});case"right":return o.jsx("span",{"aria-hidden":!0,className:R(t,"top-1/2 -translate-y-1/2 -left-0.5 border-r-0 border-t-0")})}}const L2=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M214 48v40a6 6 0 0 1-12 0V54h-34a6 6 0 0 1 0-12h40a6 6 0 0 1 6 6M88 202H54v-34a6 6 0 0 0-12 0v40a6 6 0 0 0 6 6h40a6 6 0 0 0 0-12m120-40a6 6 0 0 0-6 6v34h-34a6 6 0 0 0 0 12h40a6 6 0 0 0 6-6v-40a6 6 0 0 0-6-6M88 42H48a6 6 0 0 0-6 6v40a6 6 0 0 0 12 0V54h34a6 6 0 0 0 0-12"})}),{__source:"ph:corners-out-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"fullscreen",displayName:"UiFullscreen"}),fR=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M93.66 202.34A8 8 0 0 1 88 216H48a8 8 0 0 1-8-8v-40a8 8 0 0 1 13.66-5.66ZM88 40H48a8 8 0 0 0-8 8v40a8 8 0 0 0 13.66 5.66l40-40A8 8 0 0 0 88 40m123.06 120.61a8 8 0 0 0-8.72 1.73l-40 40A8 8 0 0 0 168 216h40a8 8 0 0 0 8-8v-40a8 8 0 0 0-4.94-7.39M208 40h-40a8 8 0 0 0-5.66 13.66l40 40A8 8 0 0 0 216 88V48a8 8 0 0 0-8-8"})}),{__source:"ph:corners-out-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"fullscreen",displayName:"UiFullscreenFilled"}),Fy={sm:"max-w-sm",md:"max-w-md",lg:"max-w-2xl",xl:"max-w-4xl","2xl":"max-w-6xl",full:"max-w-[95vw]"},Dy={title:"Discard changes?",message:"You have unsaved changes. Closing now will discard them.",confirmLabel:"Discard",cancelLabel:"Keep editing"};function yi({open:e,onClose:t,confirmClose:n=!1,title:r,subtitle:s,size:i="md",closeOnBackdrop:l=!1,closeOnEsc:u=!0,hideClose:d=!1,expandable:f=!0,className:p,headerSlot:h,footer:x,children:v}){const y=w.useRef(null),{depth:b}=RO(e),[j,S]=w.useState(!1),[N,k]=w.useState(!1),T=()=>{n?k(!0):t()};if(w.useEffect(()=>{e||(S(!1),k(!1))},[e]),w.useEffect(()=>{n||k(!1)},[n]),wo(e,()=>{N?k(!1):T()},u),w.useEffect(()=>{var O;if(!e)return;const M=document.activeElement;return(O=y.current)==null||O.focus(),()=>{var L;return(L=M?.focus)==null?void 0:L.call(M)}},[e]),!e)return null;const E=o.jsx("div",{className:R("fixed inset-0 flex items-center justify-center p-density-2 sm:p-density-4",b===0?"bg-black/40":"bg-black/20"),style:{zIndex:ri.modal+b*ri.modalStep},onClick:l?T:void 0,role:"presentation",children:o.jsxs("div",{ref:y,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":typeof r=="string"?r:void 0,className:R("relative flex w-full flex-col rounded-lg border border-border bg-background shadow-xl",j?Fy.full:Fy[i],p),style:{maxHeight:"calc(100dvh - 2rem)",...j?{height:"calc(100dvh - 2rem)"}:{}},onClick:O=>O.stopPropagation(),children:[(r||s||h||f||!d)&&o.jsxs("div",{className:"px-density-4 py-density-3 border-b border-border",children:[o.jsxs("div",{className:"flex items-center gap-density-2",children:[r?o.jsx("h2",{className:"text-sm font-semibold flex-1",children:r}):o.jsx("span",{className:"flex-1"}),h,f&&o.jsx("button",{type:"button",onClick:()=>S(O=>!O),"aria-label":j?"Restore size":"Expand to fullscreen",className:"text-muted-foreground hover:text-foreground",children:o.jsx(K,{icon:j?fR:L2})}),!d&&o.jsx("button",{type:"button",onClick:T,"aria-label":"Close",className:"text-muted-foreground hover:text-foreground",children:o.jsx(K,{icon:Tn})})]}),s?o.jsx("div",{className:"mt-density-2",children:s}):null]}),o.jsx("div",{className:"flex-1 overflow-auto px-density-4 py-density-3",children:v}),x&&o.jsx("div",{className:"px-density-4 py-density-3 border-t border-border",children:x}),N&&o.jsx(mR,{options:n===!0?Dy:{...Dy,...n},onConfirm:()=>{k(!1),t()},onCancel:()=>k(!1)})]})});return typeof document<"u"?pa.createPortal(E,document.body):null}function mR({options:e,onConfirm:t,onCancel:n}){return o.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center rounded-lg bg-background/80 p-density-4",role:"alertdialog","aria-modal":"true","aria-label":typeof e.title=="string"?e.title:"Confirm close",onClick:r=>r.stopPropagation(),children:o.jsxs("div",{className:"w-full max-w-sm rounded-lg border border-border bg-background p-density-4 shadow-xl",children:[o.jsx("h3",{className:"text-sm font-semibold",children:e.title}),o.jsx("p",{className:"mt-density-2 text-sm text-muted-foreground",children:e.message}),o.jsxs("div",{className:"mt-density-4 flex justify-end gap-density-2",children:[o.jsx(Fe,{variant:"ghost",size:"sm",onClick:n,children:e.cancelLabel}),o.jsx(Fe,{variant:"destructive",size:"sm",onClick:t,children:e.confirmLabel})]})]})})}function C0(e){return e["x-clicky-placeholder"]??e.placeholder}function Hl(e){var t;return e.name==="args"||((t=e.description)==null?void 0:t.toLowerCase().includes("positional argument"))===!0}function pR(e,t){if(t.length===0)return;const n=new Set(t.map(i=>`${i}_list`)),r=e.find(i=>i.method==="get"&&!!i.operation.operationId&&n.has(i.operation.operationId));if(r)return r;const s=new Set(t);return e.find(i=>{var l;return i.method==="get"&&s.has(i.operation.operationId??"")&&!((l=i.operation.parameters)!=null&&l.some(u=>u.in==="path"||Hl(u)))})}function By(e){return e.find(t=>{var n;return t.method==="get"&&((n=t.operation.parameters)==null?void 0:n.some(r=>r.in==="path"||Hl(r)))})}function Uy(e){return e.split("/").filter(Boolean)}function hR(e,t){if(!t)return By(e);const n=Uy(t.path),r=e.filter(l=>{var u;return l.method==="get"&&l.path!==t.path&&((u=l.operation.parameters)==null?void 0:u.some(d=>d.in==="path"||Hl(d)))}),s=r.find(l=>{const u=Uy(l.path);return u.length!==n.length+1?!1:n.every((d,f)=>u[f]===d)});return s||(r.find(l=>l.path.startsWith(`${t.path}/`))??By(e))}function gR(e){if(!e)return null;const t=e.stdout||e.output||"";if(!t.trim())return null;try{return JSON.parse(t)}catch{return null}}function D3(e,t){if(t.length===0)return[];const n=new Set(t);return e.filter(r=>(r.operation.tags??[]).some(s=>n.has(s))?!0:r.method==="get"&&n.has(r.operation.operationId??""))}function xR(e){return e?.["x-clicky"]}function vR(e){var t;return((t=xR(e))==null?void 0:t.surfaces)??[]}function wi(e){return e.operation["x-clicky"]}function rd(e,t){return t?e.filter(n=>{var r;return((r=wi(n))==null?void 0:r.surface)===t}):[]}function B3(e,t,n){return rd(e,t).find(r=>{const s=wi(r);return s!=null&&n(s)})}function U3(e,t){return B3(e,t,n=>n.verb==="list"&&n.scope==="collection")}function z3(e,t){return B3(e,t,n=>n.verb==="get"&&n.scope==="entity")}function bR(e,t){return rd(e,t).filter(n=>{const r=wi(n);return r!=null&&r.scope==="collection"&&r.verb!=="list"})}function Dh(e){var t,n;const r=wi(e),s=((t=r?.actionName)==null?void 0:t.trim())||((n=r?.verb)==null?void 0:n.trim());return s&&s!=="action"?s.charAt(0).toUpperCase()+s.slice(1):e.operation.summary||e.operation.operationId||e.path}function yR(e,t){return rd(e,t).filter(n=>{const r=wi(n);return r!=null&&r.scope==="entity"&&r.verb!=="get"})}function zy(e){return{key:e.key,title:e.title,description:e.description||`Manage ${e.title.toLowerCase()} resources.`}}const wR=r5("inline-flex items-center gap-1 rounded-full border border-transparent font-medium whitespace-nowrap align-middle",{variants:{tone:{neutral:"",success:"",danger:"",warning:"",info:""},variant:{soft:"",solid:"",outline:"bg-transparent"},size:{xxs:"min-h-4 px-1.5 py-0.5 text-[9px] leading-none",xs:"min-h-[18px] px-1.5 py-0.5 text-[10px] leading-none",sm:"h-4 px-1.5 py-0 text-[10px] leading-none",md:"px-2 py-0.5 text-xs",lg:"px-2.5 py-1 text-sm"}},compoundVariants:[{tone:"neutral",variant:"soft",class:"bg-muted text-foreground"},{tone:"neutral",variant:"solid",class:"bg-foreground text-background"},{tone:"neutral",variant:"outline",class:"border-border text-foreground"},{tone:"success",variant:"soft",class:"bg-green-100 text-green-800 dark:bg-green-500/20 dark:text-green-300"},{tone:"success",variant:"solid",class:"bg-green-500 text-white"},{tone:"success",variant:"outline",class:"border-green-500 text-green-700 dark:text-green-400"},{tone:"danger",variant:"soft",class:"bg-red-100 text-red-800 dark:bg-red-500/20 dark:text-red-300"},{tone:"danger",variant:"solid",class:"bg-red-500 text-white"},{tone:"danger",variant:"outline",class:"border-red-500 text-red-700 dark:text-red-400"},{tone:"warning",variant:"soft",class:"bg-yellow-100 text-yellow-800 dark:bg-yellow-500/20 dark:text-yellow-300"},{tone:"warning",variant:"solid",class:"bg-yellow-400 text-yellow-950"},{tone:"warning",variant:"outline",class:"border-yellow-500 text-yellow-700 dark:text-yellow-400"},{tone:"info",variant:"soft",class:"bg-blue-100 text-blue-800 dark:bg-blue-500/20 dark:text-blue-300"},{tone:"info",variant:"solid",class:"bg-blue-500 text-white"},{tone:"info",variant:"outline",class:"border-blue-500 text-blue-700 dark:text-blue-400"}],defaultVariants:{tone:"neutral",variant:"soft",size:"md"}}),_R=new Set(["soft","solid","outline"]),jR=new Set(["status","metric","custom","outlined","label"]),kR={xxs:{frame:"min-h-4",segment:"px-1.5 py-0.5",text:"text-[10px] leading-4",icon:"h-3 w-3",gap:"gap-1"},xs:{frame:"min-h-[18px]",segment:"px-2 py-0.5",text:"text-[11px] leading-4",icon:"h-3.5 w-3.5",gap:"gap-1"},sm:{frame:"min-h-5",segment:"px-2 py-0.5",text:"text-xs leading-4",icon:"h-3.5 w-3.5",gap:"gap-1.5"},md:{frame:"min-h-6",segment:"px-2.5 py-1",text:"text-sm leading-4",icon:"h-4 w-4",gap:"gap-1.5"},lg:{frame:"min-h-7",segment:"px-3 py-1.5",text:"text-base leading-5",icon:"h-5 w-5",gap:"gap-2"}},Vy={success:{soft:"bg-emerald-500/12 text-emerald-700 border-emerald-200 dark:text-emerald-300 dark:border-emerald-500/30",outlined:"bg-background text-emerald-700 border-emerald-300 dark:text-emerald-400 dark:border-emerald-500/40"},error:{soft:"bg-rose-500/12 text-rose-700 border-rose-200 dark:text-rose-300 dark:border-rose-500/30",outlined:"bg-background text-rose-700 border-rose-300 dark:text-rose-400 dark:border-rose-500/40"},warning:{soft:"bg-amber-400/15 text-amber-800 border-amber-200 dark:text-amber-300 dark:border-amber-500/30",outlined:"bg-background text-amber-800 border-amber-300 dark:text-amber-400 dark:border-amber-500/40"},info:{soft:"bg-sky-500/12 text-sky-700 border-sky-200 dark:text-sky-300 dark:border-sky-500/30",outlined:"bg-background text-sky-700 border-sky-300 dark:text-sky-400 dark:border-sky-500/40"}};function NR(e){return e!=null&&_R.has(e)}function CR(e){return e!=null&&/^(#|rgb|hsl|oklch|var\(|color\()/i.test(e)}function kf(e){switch(e){case"success":return"success";case"danger":return"error";case"warning":return"warning";case"info":return"info";default:return}}function SR(e){switch(e){case"rounded":return"rounded-md";case"square":return"rounded-sm";default:return"rounded-full"}}function ER(e){return e!=null&&jR.has(e)}function Ui(e,t,n,r){if(e!=null){if(CR(e)){n[t]=e;return}r.push(e)}}function TR(e){if(e!=null)return typeof e=="number"?`${Math.max(1,Math.floor(e))}ch`:e}function OR(e,t=24){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return Math.max(4,Math.floor(e));if(typeof e=="string"){const n=e.trim(),r=n.match(/^(\d+(?:\.\d+)?)ch$/i);if(r)return Math.max(4,Math.floor(Number(r[1])));const s=n.match(/^(\d+(?:\.\d+)?)$/);if(s)return Math.max(4,Math.floor(Number(s[1])))}return t}function MR({maxWidth:e,truncate:t,wrap:n}){return e!=null||t!=null||n}function wu(e){if(e==null||typeof e=="boolean")return null;if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e)){const t=w.Children.toArray(e).map(wu);return t.every(n=>n!=null)?t.join(""):null}return w.isValidElement(e)?wu(e.props.children):null}function S0(e,t){return e.length<=t?e:t<=1?"…":`${e.slice(0,t-1)}…`}function V3(e,t){return e.length<=t?e:t<=1?"…":`…${e.slice(-(t-1))}`}function ao(e,t){if(e.length<=t)return e;if(t<=3)return S0(e,t);const n=t-1,r=Math.max(1,Math.ceil(n/2)),s=Math.max(1,n-r);return`${e.slice(0,r)}…${e.slice(-s)}`}function H3(e,t){return e.length<=t?e:t<=2?S0(e,t):`${e.slice(0,t-1)}…`}function AR(e,t){return e.length<=t?e:t<=2?V3(e,t):`…${e.slice(-(t-1))}`}function R2(e){return e==null||e.length===0?"…":e.length<=2?`${e}…`:`${e[0]}…`}function ug(e,t,n,r,s){const i=[e];t&&i.push(t),i.push(n);const l=i.join(s);if(l.length<=r)return l;const u=i.length-1,d=s.length*u+(t?t.length:0),f=Math.max(4,r-d),p=Math.max(3,Math.min(e.length,Math.floor(f*.4))),h=Math.max(4,f-p),x=H3(e,p),v=AR(n,h),y=[x];t&&y.push(t),y.push(v);const b=y.join(s);return b.length<=r?b:ao(l,r)}function bm(e){return Math.max(e,32)}function LR(e,t){const n=bm(t),r=e.startsWith("/"),s=e.split("/").filter(Boolean);if(s.length<2)return ao(e,n);const i=`${r?"/":""}${s[0]}`,l=s[s.length-1]??e,u=s.length>2?R2(s.slice(1,-1).join("/")):void 0;return ug(i,u,l,n,"/")}function RR(e,t){const n=bm(t);try{const r=new URL(e),s=r.host,i=r.pathname.split("/").filter(Boolean);if(i.length===0)return s.length<=n?s:ao(`${s}${r.search}${r.hash}`,n);if(i.length===1){const h=`${s}/${i[0]??s}`;if(h.length<=n)return h;const x=`${s}/…`;return x.length<=n?x:ao(h,n)}const l=i[i.length-1]??s,u=i[0]??"",d=i.length>2?R2(i.slice(1,-1).join("/")):void 0;return[[s,u,d,l].filter(Boolean).join("/"),`${s}/…/${l}`,`${s}/…`].find(h=>h.length<=n)??ao(`${s}/${l}`,n)}catch{return ao(e,n)}}function Z3(e){return/^[a-z][a-z\d+\-.]*:\/\//i.test(e)||e.startsWith("//")}function PR(e){if(/\s/.test(e)||Z3(e)||e.startsWith("/")||!e.includes("/"))return!1;const t=e.slice(e.lastIndexOf("/")+1);return t.includes(":")||t.includes("@sha256:")}function IR(e){const t=e.indexOf("@sha256:");if(t>=0)return{name:e.slice(0,t),suffix:e.slice(t)};const n=e.lastIndexOf(":");return n>0?{name:e.slice(0,n),suffix:e.slice(n)}:{name:e,suffix:""}}function $R(e,t){const n=bm(t),r=e.split("/").filter(Boolean);if(r.length<2)return ao(e,n);const s=r[r.length-1]??e,i=IR(s),l=`…${i.name}`;if(l.length<=n)return l;if(r.length===2)return ug(r[0]??e,void 0,i.name||s,n,"/");const u=`${r[0]}/${r[1]??""}`.replace(/\/$/,""),d=i.suffix.length>0&&n>=s.length?s:i.name||s,f=r.length>3?R2(r.slice(2,-1).join("/")):r.length===3?"…":void 0;return ug(u,f,d,n,"/")}function FR(e,t){const n=bm(t),r=e.split(":");if(r.length<6)return ao(e,n);const s=r[2]??r[1]??"arn",i=r.slice(5).join(":"),l=i.split(/[/:]/).filter(Boolean),u=l.length>1?l[0]:void 0,d=l[l.length-1]??i,f=d.includes("-")&&d.split("-").length>2?d.split("-").slice(-2).join("-"):d,p=u!=null&&u!==f?`${u}/${f}`:f,h=`${s}:…${p}`;if(h.length<=n)return h;const x=2,v=Math.max(4,Math.min(f.length,n-x-2)),y=Math.max(2,n-v-x);return`${H3(s,y)}:…${ao(f,v)}`}function DR(e){return e.startsWith("arn:")?"arn":Z3(e)?"url":PR(e)?"image":e.includes("/")?"path":"suffix"}function BR(e,t,n){const r=OR(n);switch(t==="auto"?DR(e):t){case"prefix":return V3(e,r);case"suffix":return S0(e,r);case"arn":return FR(e,r);case"image":return $R(e,r);case"path":return LR(e,r);case"url":return RR(e,r);default:return S0(e,r)}}function Bh(e,t,n,r=!1){const s=wu(e);if(s==null||t==null)return{content:e,fullText:s,title:r?s??void 0:void 0};const i=BR(s,t,n);return{content:i,fullText:s,title:r||i!==s?s:void 0}}function UR(e){var t;const n=(t=globalThis.navigator)==null?void 0:t.clipboard;n?.writeText!=null&&n.writeText(e).catch(()=>{})}function Uh({href:e,target:t,rel:n,className:r,style:s,content:i,canCopy:l,copyText:u}){return e!=null?o.jsx("a",{href:e,target:t,rel:n??(t==="_blank"?"noopener noreferrer":void 0),className:r,style:s,children:i}):l&&u!=null?o.jsx("button",{type:"button",className:r,style:s,onClick:()=>UR(u),children:i}):o.jsx("span",{className:r,style:s,children:i})}function xo({tone:e,variant:t,size:n="md",icon:r,count:s,children:i,className:l,status:u,label:d,value:f,color:p,textColor:h,borderColor:x,shape:v,href:y,target:b="_self",rel:j,wrap:S=!1,maxWidth:N,truncate:k,clickToCopy:T,labelClassName:E,valueClassName:O}){const M=d!=null||f!=null||u!=null||v!=null||y!=null||S===!0||p!=null||h!=null||x!=null||E!=null||O!=null,L=t??(M?"metric":"soft"),F=TR(N),U=S&&k==null,z=MR({maxWidth:N,truncate:k,wrap:S}),V=U?"min-w-0 whitespace-normal break-words [overflow-wrap:anywhere]":F!=null||k!=null?"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap":"whitespace-nowrap";if(NR(L)){const ve={};F!=null&&(ve.maxWidth=F);const Le=Bh(i,k,N,z),je=Le.fullText??(s!==void 0?String(s):void 0),Ue=y==null&&(T??!0)&&je!=null;return Uh({href:y,target:b,rel:j,canCopy:Ue,copyText:je,className:R(wR({tone:e,variant:L,size:n}),(F!=null||U||k!=null)&&"min-w-0 max-w-full",U&&"whitespace-normal",Ue&&"cursor-pointer text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",l),style:ve,content:o.jsxs(o.Fragment,{children:[r&&o.jsx(K,{...typeof r=="string"?{name:r}:{icon:r},className:"text-[1em]"}),s!==void 0&&o.jsx("span",{children:s}),i!=null&&o.jsx("span",{className:V,title:Le.title,children:Le.content})]})})}if(!ER(L))return null;const X=u??kf(e)??"info",H=kR[n],B=d??i,W=f??(B==null&&s!==void 0?s:void 0),se=W==null?Bh(B,k,N,z):{content:B,fullText:wu(B),title:z?wu(B)??void 0:void 0},P=W!=null?Bh(W,k,N,z):{content:W,fullText:void 0,title:void 0},J=P.fullText??se.fullText??(s!==void 0?String(s):void 0),ne=y==null&&(T??!0)&&J!=null,$=SR(v??"pill"),Q={},ae=["inline-flex align-middle items-stretch border font-medium shadow-none",H.frame,H.text,F!=null||U||k!=null?"min-w-0 max-w-full":"",$,U?"whitespace-normal":"whitespace-nowrap",y?"transition-opacity hover:opacity-80":"",ne?"cursor-pointer text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1":""];F!=null&&(Q.maxWidth=F),L==="status"?ae.push(Vy[X].soft):L==="metric"?ae.push("bg-muted/60 text-foreground border-border"):L==="outlined"?u!=null||kf(e)!=null?ae.push(Vy[X].outlined):ae.push("bg-background text-foreground border-border"):L==="custom"?ae.push("border-transparent bg-accent text-accent-foreground"):ae.push("border-border bg-background text-foreground"),(L==="custom"||L==="outlined"&&u==null&&kf(e)==null)&&(Ui(p,"backgroundColor",Q,ae),Ui(h,"color",Q,ae),Ui(x,"borderColor",Q,ae)),L!=="label"&&x!=null&&u==null&&kf(e)==null&&Ui(x,"borderColor",Q,ae);const ie=r?o.jsx(K,{...typeof r=="string"?{name:r}:{icon:r},className:R("shrink-0",H.icon)}):null;if(L==="label"){const ve=["inline-flex items-center self-stretch",W!=null?"shrink-0":"min-w-0",H.segment,H.gap,W!=null?"border-r border-border/70":""],Le=["inline-flex min-w-0 items-center self-stretch text-foreground",B!=null||ie!=null?"flex-1":"",H.segment],je={};return(B!=null||ie!=null)&&(ve.push("bg-secondary text-secondary-foreground"),Ui(p,"backgroundColor",je,ve),Ui(h,"color",je,ve)),Ui(x,"borderColor",Q,ae),Uh({href:y,target:b,rel:j,canCopy:ne,copyText:J,className:R(ae,l),style:Q,content:o.jsxs(o.Fragment,{children:[(B!=null||ie!=null)&&o.jsxs("span",{className:R(ve,E),style:je,children:[ie,B!=null&&o.jsx("span",{className:V,title:se.title,children:se.content})]}),W!=null&&o.jsx("span",{className:R(Le,O),children:o.jsx("span",{className:V,title:P.title,children:P.content})})]})})}const de=["inline-flex items-center",W!=null?"shrink-0":"min-w-0",H.segment,H.gap,W!=null?"border-r border-current/10":""],ge=["inline-flex min-w-0 items-center font-semibold",B!=null||ie!=null?"flex-1":"",H.segment];return L==="metric"&&(de.push("text-muted-foreground"),ge.push("text-foreground")),Uh({href:y,target:b,rel:j,canCopy:ne,copyText:J,className:R(ae,l),style:Q,content:o.jsxs(o.Fragment,{children:[(B!=null||ie!=null)&&o.jsxs("span",{className:R(de,E),children:[ie,B!=null&&o.jsx("span",{className:V,title:se.title,children:se.content})]}),W!=null&&o.jsx("span",{className:R(ge,O),children:o.jsx("span",{className:V,title:P.title,children:P.content})})]})})}const zR={get:"info",post:"success",put:"warning",patch:"warning",delete:"danger"};function ym({method:e,className:t}){const n=zR[e.toLowerCase()]??"neutral";return o.jsx(xo,{variant:"outline",tone:n,size:"sm",className:R("font-mono uppercase",t),children:e.toUpperCase()})}const VR=e=>`/commands/${e}`;function HR({operations:e,definition:t,renderLink:n,getCommandHref:r=VR}){const[s,i]=w.useState(""),l=w.useMemo(()=>{if(!s)return e;const u=s.toLowerCase();return e.filter(d=>{var f,p;return d.path.toLowerCase().includes(u)||((f=d.operation.summary)==null?void 0:f.toLowerCase().includes(u))||((p=d.operation.operationId)==null?void 0:p.toLowerCase().includes(u))})},[e,s]);return e.length===0?o.jsxs("div",{className:"rounded-xl border border-dashed p-8",children:[o.jsx("h2",{className:"text-lg font-medium",children:t.emptyTitle||`No ${t.title} endpoints found`}),o.jsx("p",{className:"mt-2 max-w-2xl text-sm text-muted-foreground",children:t.emptyDescription||"This area is reserved in the information architecture, but the current OpenAPI surface does not expose matching operations yet."})]}):o.jsxs("div",{className:"space-y-4",children:[o.jsx("input",{placeholder:`Search ${t.title.toLowerCase()}...`,value:s,onChange:u=>i(u.target.value),className:"w-full max-w-lg rounded-lg border bg-background px-3 py-2 text-sm outline-none placeholder:text-muted-foreground focus:ring-2 focus:ring-ring"}),o.jsx("div",{className:"space-y-2",children:l.map(u=>{const d=u.operation.operationId??`${u.method}:${u.path}`;return n({key:`${u.method}:${u.path}`,to:r(d,u),className:"flex items-center gap-3 rounded-xl border bg-card p-3 transition-colors hover:border-emerald-200 hover:bg-emerald-50/50 dark:hover:border-emerald-500/40 dark:hover:bg-emerald-500/10",children:o.jsxs(o.Fragment,{children:[o.jsx(ym,{method:u.method}),o.jsx("code",{className:"text-sm",children:u.path}),u.operation.summary&&o.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:u.operation.summary})]})})})})]})}function W3(e,t){return t.split(".").reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},e)}function q3(e){if(Array.isArray(e))return e.flatMap(n=>q3(n)).filter(Boolean);if(e==null)return[];if(typeof e=="object")return[JSON.stringify(e)];const t=String(e).trim();return t?[t]:[]}function E0(e,t){return t.accessor?t.accessor(e):W3(e,t.key)}function P2(e,t){const n=E0(e,t);return t.filterValue?t.filterValue(n,e):n}function zh(e,t){return q3(P2(e,t))}function ZR(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim()}function WR({active:e,dir:t,onClick:n,align:r="left",className:s,children:i}){const l=r==="right"?"justify-end":r==="center"?"justify-center":"justify-start";return o.jsxs("button",{type:"button",onClick:n,className:R("inline-flex items-center gap-1 cursor-pointer select-none hover:text-foreground",e?"text-primary":"text-muted-foreground",l,s),children:[i,e?o.jsx("span",{"aria-hidden":!0,children:t==="asc"?"↑":"↓"}):o.jsx("span",{"aria-hidden":!0,className:"opacity-40",children:"↕"})]})}function K3({value:e,format:t,showTitleOnHover:n=!0,className:r}){const s=la(e);if(!s)return o.jsx("span",{className:R("text-muted-foreground",r),children:"—"});const i=NM(s,t),l=n?s.toISOString():void 0;return o.jsx("span",{className:R("tabular-nums whitespace-nowrap text-muted-foreground",r),title:l,children:i})}function qR(e){return e.replace(/[_-]+/g," ").replace(/\.+/g," ").replace(/\b\w/g,t=>t.toUpperCase())}const KR={comfortable:{row:"px-density-3 py-density-2",label:"text-xs font-medium text-muted-foreground",value:"text-sm text-foreground",gridCols:"grid-cols-[minmax(7rem,12rem)_minmax(0,1fr)]"},compact:{row:"px-density-2 py-density-1.5",label:"font-mono text-[11px] text-muted-foreground",value:"text-xs text-foreground",gridCols:"grid-cols-[minmax(8rem,14rem)_minmax(0,1fr)]"}};function GR({items:e,renderLabel:t,renderValue:n,labelIcon:r,prefixActions:s,suffixActions:i,className:l,rowClassName:u,labelClassName:d,valueClassName:f,density:p="comfortable",emptyMessage:h="No properties"}){const x=e.filter(y=>!y.hidden);if(x.length===0)return o.jsx("div",{className:"text-sm text-muted-foreground",children:h});const v=KR[p];return o.jsx("dl",{className:R("divide-y divide-border rounded-md border border-border bg-muted/20",l),children:x.map(y=>{const b=typeof r=="function"?r(y.key,y.value,y):r,j=t?t(y.key,y.value,y):qR(y.key),S=typeof j=="string"?j:y.key;return o.jsxs("div",{className:R("grid min-w-0 gap-density-3",v.gridCols,v.row,u),children:[o.jsxs("dt",{"aria-label":S,className:R("min-w-0 truncate",v.label,d),children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-density-1",children:[b?o.jsx(K,{name:b,className:"text-xs shrink-0"}):null,o.jsx("span",{className:"min-w-0 truncate",children:j})]}),y.subtitle?o.jsx("div",{className:"mt-0.5 text-[10px] font-normal text-muted-foreground/80",children:y.subtitle}):null]}),o.jsxs("dd",{className:R("min-w-0 space-y-density-1",f),children:[o.jsxs("div",{className:"flex min-w-0 items-start gap-density-1",children:[o.jsx(Hy,{actions:s,item:y,className:"shrink-0 pt-0.5"}),o.jsx("div",{className:R("min-w-0 max-w-full",v.value),children:n?n(y.key,y.value,y):QR(y.value)}),o.jsx(Hy,{actions:i,item:y,className:"shrink-0 pt-0.5"})]}),y.expandable&&y.expanded&&y.renderChildren?y.renderChildren():null]})]},y.key)})})}function Hy({actions:e,item:t,className:n}){if(!e||e.length===0)return null;const r=e.filter(s=>!s.visible||s.visible(t.key,t.value,t));return r.length===0?null:o.jsx("span",{className:R("inline-flex items-center",n),children:r.map(s=>o.jsx(JR,{action:s,item:t},s.id))})}function JR({action:e,item:t}){var n;const r=e.label(t.key,t.value,t),s=((n=e.disabled)==null?void 0:n.call(e,t.key,t.value,t))??!1;return o.jsx("button",{type:"button","aria-label":r,title:r,disabled:s,className:R("inline-flex h-5 w-5 items-center justify-center rounded text-muted-foreground","hover:bg-accent hover:text-foreground","disabled:opacity-35 disabled:hover:bg-transparent disabled:hover:text-muted-foreground"),onClick:i=>{i.stopPropagation(),e.onClick(t.key,t.value,t)},children:o.jsx(K,{...typeof e.icon=="string"?{name:e.icon}:{icon:e.icon},className:"text-xs"})})}function QR(e){if(e==null)return o.jsx("span",{className:"font-mono italic text-muted-foreground",children:"null"});if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return o.jsx("span",{className:"font-mono",children:String(e)});try{return o.jsx("pre",{className:"max-h-48 overflow-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed",children:JSON.stringify(e,null,2)})}catch{return String(e)}}function I2(e,t="="){return e==null?[]:Array.isArray(e)?e.map(n=>YR(n,t)).filter(n=>n.value!==""):typeof e=="object"?Object.entries(e).map(([n,r])=>{if(r==null)return null;const s=String(r).trim();return s?{key:n,value:s,display:`${n}${t}${s}`,token:`${n}${t}${s}`}:null}).filter(n=>n!==null):[]}function YR(e,t){if(typeof e=="string"){const s=e.trim(),i=s.indexOf("="),l=s.indexOf(":"),u=i>=0&&(l<0||i=0&&l0){const d=s.slice(0,u),f=s.slice(u+1);return{key:d,value:f,display:`${d}${t}${f}`,token:`${d}${t}${f}`}}return{value:s,display:s,token:s}}const n="key"in e&&typeof e.key=="string"?e.key:"name"in e&&typeof e.name=="string"?e.name:void 0,r=String(e.value??"").trim();return n?{key:n,value:r,display:`${n}${t}${r}`,token:`${n}${t}${r}`}:{value:r,display:r,token:r}}function Zy(e,t="="){return I2(e,t).map(n=>n.token)}function XR(e,t="="){const n=e.indexOf(t);return n<=0?{key:"",value:e}:{key:e.slice(0,n),value:e.slice(n+t.length)}}const eP={getMode:()=>"neutral",toggleInclude:()=>{},toggleExclude:()=>{}},G3=w.createContext(eP);function J3(){return w.useContext(G3)}function tP(e,t){return{getMode:n=>e[n]??"neutral",toggleInclude:n=>{const r={...e};r[n]==="include"?delete r[n]:r[n]="include",t(r)},toggleExclude:n=>{const r={...e};r[n]==="exclude"?delete r[n]:r[n]="exclude",t(r)}}}const Q3=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M150 112a6 6 0 0 1-6 6h-26v26a6 6 0 0 1-12 0v-26H80a6 6 0 0 1 0-12h26V80a6 6 0 0 1 12 0v26h26a6 6 0 0 1 6 6m78.24 116.24a6 6 0 0 1-8.48 0l-51.38-51.38a86.15 86.15 0 1 1 8.48-8.48l51.38 51.38a6 6 0 0 1 0 8.48M112 186a74 74 0 1 0-74-74a74.09 74.09 0 0 0 74 74"})}),{__source:"ph:magnifying-glass-plus-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"zoom-in",displayName:"UiZoomIn"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m229.66 218.34l-50.06-50.06a88.21 88.21 0 1 0-11.32 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32M144 120h-24v24a8 8 0 0 1-16 0v-24H80a8 8 0 0 1 0-16h24V80a8 8 0 0 1 16 0v24h24a8 8 0 0 1 0 16"})}),{__source:"ph:magnifying-glass-plus-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"zoom-in",displayName:"UiZoomInFilled"});const Y3=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M150 112a6 6 0 0 1-6 6H80a6 6 0 0 1 0-12h64a6 6 0 0 1 6 6m78.24 116.24a6 6 0 0 1-8.48 0l-51.38-51.38a86.15 86.15 0 1 1 8.48-8.48l51.38 51.38a6 6 0 0 1 0 8.48M112 186a74 74 0 1 0-74-74a74.09 74.09 0 0 0 74 74"})}),{__source:"ph:magnifying-glass-minus-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"zoom-out",displayName:"UiZoomOut"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m229.66 218.34l-50.06-50.06a88.21 88.21 0 1 0-11.32 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32M144 120H80a8 8 0 0 1 0-16h64a8 8 0 0 1 0 16"})}),{__source:"ph:magnifying-glass-minus-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"zoom-out",displayName:"UiZoomOutFilled"});const sd=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 34H88a6 6 0 0 0-6 6v42H40a6 6 0 0 0-6 6v128a6 6 0 0 0 6 6h128a6 6 0 0 0 6-6v-42h42a6 6 0 0 0 6-6V40a6 6 0 0 0-6-6m-54 176H46V94h116Zm48-48h-36V88a6 6 0 0 0-6-6H94V46h116Z"})}),{__source:"ph:copy-light",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"copy",displayName:"UiCopy"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 32H88a8 8 0 0 0-8 8v40H40a8 8 0 0 0-8 8v128a8 8 0 0 0 8 8h128a8 8 0 0 0 8-8v-40h40a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8m-8 128h-32V88a8 8 0 0 0-8-8H96V48h112Z"})}),{__source:"ph:copy-fill",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"copy",displayName:"UiCopyFilled"});function nP({value:e,children:t}){return o.jsx(G3.Provider,{value:e,children:t})}function X3(e){var t;typeof navigator<"u"&&((t=navigator.clipboard)!=null&&t.writeText)&&navigator.clipboard.writeText(e).catch(()=>{})}function Wy({tag:e,actions:t,compact:n=!1}){const r=J3(),s=r.getMode(e.token),i=w.useCallback(v=>{v.stopPropagation(),r.toggleInclude(e.token)},[r,e.token]),l=w.useCallback(v=>{v.stopPropagation(),r.toggleExclude(e.token)},[r,e.token]),u=w.useCallback(v=>{v.stopPropagation(),X3(e.value)},[e.value]),d=s==="include",f=s==="exclude",p=n&&!!e.key,h=o.jsx("span",{...p?{title:e.display}:{},className:R("inline-flex items-center rounded-md border bg-background align-middle",d?"border-green-500/50 bg-green-500/5":f?"border-red-500/50 bg-red-500/5":"border-border"),children:e.key&&!n?o.jsx(xo,{size:"xs",variant:"label",tone:"neutral",label:e.key,value:e.value,maxWidth:32,truncate:"auto",clickToCopy:!1,className:"border-transparent shadow-none"}):o.jsx(xo,{size:"xs",variant:"soft",tone:"neutral",maxWidth:32,truncate:"auto",clickToCopy:!1,children:e.value})}),x=o.jsxs("span",{className:"inline-flex items-center gap-0.5",children:[o.jsx(Vh,{ariaLabel:`Include ${e.display}`,onClick:i,active:d,activeClassName:"bg-green-500/20 text-green-700 dark:text-green-400",icon:Q3}),o.jsx(Vh,{ariaLabel:`Exclude ${e.display}`,onClick:l,active:f,activeClassName:"bg-red-500/20 text-red-700 dark:text-red-400",icon:Y3}),o.jsx(Vh,{ariaLabel:`Copy ${e.display}`,onClick:u,icon:sd})]});return t==="inline"?o.jsxs("span",{className:"inline-flex items-center gap-0.5 rounded-md border border-border bg-background pr-0.5",children:[h,x]}):o.jsx(nd,{placement:"top",delay:120,arrow:!1,trigger:h,cardClassName:"!p-1",children:x})}function Vh({ariaLabel:e,onClick:t,active:n,activeClassName:r,icon:s}){return o.jsx("button",{type:"button","aria-label":e,title:e,onClick:t,className:R("inline-flex h-5 w-5 items-center justify-center rounded text-muted-foreground","hover:bg-accent hover:text-foreground",n&&r),children:o.jsx(K,{icon:s,className:"text-xs"})})}function e_({tags:e,maxVisible:t=3,className:n,actions:r="hover",compact:s,wrap:i=!1}){const l=e2(),u=s??l==="compact";if(e.length===0)return o.jsx("span",{className:"text-muted-foreground",children:"—"});if(i)return o.jsx("span",{className:R("flex min-w-0 flex-wrap items-center gap-1",n),children:e.map((p,h)=>o.jsx(Wy,{tag:p,actions:r,compact:u},`${p.display}-${h}`))});const d=e.slice(0,t),f=e.slice(t);return o.jsxs("span",{className:R("flex min-w-0 items-center gap-1",n),children:[o.jsx("span",{className:"flex min-w-0 flex-1 flex-nowrap items-center gap-1 overflow-hidden",children:d.map((p,h)=>o.jsx(Wy,{tag:p,actions:r,compact:u},`${p.display}-${h}`))}),f.length>0&&o.jsx(nd,{placement:"top",trigger:o.jsxs(xo,{size:"xs",variant:"outlined",tone:"neutral",clickToCopy:!1,className:"shrink-0",children:["+",f.length]}),cardClassName:"min-w-72 max-w-[90vw] whitespace-normal !p-0",children:o.jsx(rP,{tags:f})})]})}function rP({tags:e,rowClassName:t="grid-cols-[minmax(4rem,8rem)_minmax(0,1fr)]"}){const n=J3(),r=w.useMemo(()=>e.map((s,i)=>({key:`${s.token}-${i}`,value:s})),[e]);return o.jsx(GR,{items:r,density:"compact",className:"border-0 bg-transparent",rowClassName:t,renderLabel:(s,i)=>i.key?o.jsx("span",{className:"font-mono",children:i.key}):o.jsx("span",{className:"italic text-muted-foreground",children:"tag"}),renderValue:(s,i)=>o.jsx("span",{className:"block truncate font-mono",title:i.value,children:i.value}),suffixActions:[{id:"include",icon:Q3,label:(s,i)=>`Include ${i.display}`,onClick:(s,i)=>n.toggleInclude(i.token)},{id:"exclude",icon:Y3,label:(s,i)=>`Exclude ${i.display}`,onClick:(s,i)=>n.toggleExclude(i.token)},{id:"copy",icon:sd,label:(s,i)=>`Copy ${i.display}`,onClick:(s,i)=>X3(i.value)}]})}const sP={success:"bg-emerald-500",error:"bg-rose-500",warning:"bg-amber-500",info:"bg-sky-500"},oP={xs:"h-1.5 w-1.5",sm:"h-2 w-2",md:"h-2.5 w-2.5"};function iP({status:e,size:t="sm",label:n,title:r,className:s}){const i=r??n??e;return o.jsxs("span",{className:R("inline-flex items-center gap-1.5 align-middle",s),title:i,children:[o.jsx("span",{role:"img","aria-label":n??e,className:R("inline-block shrink-0 rounded-full",sP[e],oP[t])}),n&&o.jsx("span",{className:"truncate text-xs",children:n})]})}const aP=new Set(["error","err","fatal","critical","crit","panic","failed","fail","down","unhealthy"]),lP=new Set(["warn","warning","degraded","slow","stale"]),cP=new Set(["ok","healthy","success","info","debug","trace","up","running","ready"]);function uP(e){if(e==null)return null;if(typeof e=="boolean")return e?"success":"error";const t=String(e).toLowerCase().trim();return t?aP.has(t)?"error":lP.has(t)?"warning":cP.has(t)?"success":null:null}const t_=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M138 128a10 10 0 1 1-10-10a10 10 0 0 1 10 10m-78-10a10 10 0 1 0 10 10a10 10 0 0 0-10-10m136 0a10 10 0 1 0 10 10a10 10 0 0 0-10-10"})}),{__source:"ph:dots-three-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"ellipsis",displayName:"UiEllipsis"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 80H32a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16M60 140a12 12 0 1 1 12-12a12 12 0 0 1-12 12m68 0a12 12 0 1 1 12-12a12 12 0 0 1-12 12m68 0a12 12 0 1 1 12-12a12 12 0 0 1-12 12"})}),{__source:"ph:dots-three-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"ellipsis",displayName:"UiEllipsisFilled"});const dP=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M222 128a6 6 0 0 1-6 6H54.49l61.75 61.76a6 6 0 1 1-8.48 8.48l-72-72a6 6 0 0 1 0-8.48l72-72a6 6 0 0 1 8.48 8.48L54.49 122H216a6 6 0 0 1 6 6"})}),{__source:"ph:arrow-left-light",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"arrow-left",displayName:"UiArrowLeft"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 128a8 8 0 0 1-8 8h-96v64a8 8 0 0 1-13.66 5.66l-72-72a8 8 0 0 1 0-11.32l72-72A8 8 0 0 1 120 56v64h96a8 8 0 0 1 8 8"})}),{__source:"ph:arrow-left-fill",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"arrow-left",displayName:"UiArrowLeftFilled"});const fP=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M52.44 36a6 6 0 0 0-8.88 8l20.88 23c-37.28 21.9-53.23 57-53.92 58.57a6 6 0 0 0 0 4.88c.34.77 8.66 19.22 27.24 37.8C55 185.47 84.62 206 128 206a124.9 124.9 0 0 0 52.57-11.25l23 25.29a6 6 0 0 0 8.88-8.08Zm48.62 71.32l45 49.52a34 34 0 0 1-45-49.52M128 194c-31.38 0-58.78-11.42-81.45-33.93A134.6 134.6 0 0 1 22.69 128c4.29-8.2 20.1-35.18 50-51.91l20.2 22.21a46 46 0 0 0 61.35 67.48l17.81 19.6A113.5 113.5 0 0 1 128 194m6.4-99.4a6 6 0 0 1 2.25-11.79a46.17 46.17 0 0 1 37.15 40.87a6 6 0 0 1-5.42 6.53h-.56a6 6 0 0 1-6-5.45A34.1 34.1 0 0 0 134.4 94.6m111.08 35.85c-.41.92-10.37 23-32.86 43.12a6 6 0 1 1-8-8.94A134.1 134.1 0 0 0 233.31 128a134.7 134.7 0 0 0-23.86-32.07C186.78 73.42 159.38 62 128 62a120 120 0 0 0-19.69 1.6a6 6 0 1 1-2-11.83A131 131 0 0 1 128 50c43.38 0 73 20.54 90.24 37.76c18.58 18.58 26.9 37 27.24 37.81a6 6 0 0 1 0 4.88"})}),{__source:"ph:eye-slash-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"eye-closed",displayName:"UiEyeClosed"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M96.68 57.87a4 4 0 0 1 2.08-6.6A130 130 0 0 1 128 48c34.88 0 66.57 13.26 91.66 38.35c18.83 18.83 27.3 37.62 27.65 38.41a8 8 0 0 1 0 6.5c-.35.79-8.82 19.57-27.65 38.4q-4.28 4.26-8.79 8.07a4 4 0 0 1-5.55-.36Zm117.24 152.75a8 8 0 1 1-11.84 10.76L180 197.13A127.2 127.2 0 0 1 128 208c-34.88 0-66.57-13.26-91.66-38.34C17.51 150.83 9 132.05 8.69 131.26a8 8 0 0 1 0-6.5c.31-.76 8.82-19.58 27.65-38.41a135 135 0 0 1 25-19.78L42.08 45.38a8 8 0 1 1 11.84-10.76Zm-65.49-48.25l-52.69-58a40 40 0 0 0 52.69 58"})}),{__source:"ph:eye-slash-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"eye-closed",displayName:"UiEyeClosedFilled"});const n_=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M222 128a6 6 0 0 1-6 6H40a6 6 0 0 1 0-12h176a6 6 0 0 1 6 6m-98.24-27.76a6 6 0 0 0 8.48 0l32-32a6 6 0 0 0-8.48-8.48L134 81.51V16a6 6 0 0 0-12 0v65.51l-21.76-21.75a6 6 0 0 0-8.48 8.48Zm8.48 55.52a6 6 0 0 0-8.48 0l-32 32a6 6 0 0 0 8.48 8.48L122 174.49V240a6 6 0 0 0 12 0v-65.51l21.76 21.75a6 6 0 0 0 8.48-8.48Z"})}),{__source:"ph:arrows-in-line-vertical-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"resize-vertical",displayName:"UiResizeVertical"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M90.34 69.66A8 8 0 0 1 96 56h24V16a8 8 0 0 1 16 0v40h24a8 8 0 0 1 5.66 13.66l-32 32a8 8 0 0 1-11.32 0Zm43.32 84.68a8 8 0 0 0-11.32 0l-32 32A8 8 0 0 0 96 200h24v40a8 8 0 0 0 16 0v-40h24a8 8 0 0 0 5.66-13.66ZM216 120H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16"})}),{__source:"ph:arrows-in-line-vertical-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"resize-vertical",displayName:"UiResizeVerticalFilled"});const qy=64,mP=160,pP=224,hP=96,gP="clicky-ui-data-table-column-widths",xP="clicky-ui-data-table-column-visibility",vP="clicky-ui-data-table-density",bP=[{value:"compact",icon:gm,label:"Compact"},{value:"comfortable",icon:xm,label:"Comfortable"},{value:"spacious",icon:zl,label:"Spacious"}],yP="px-2.5 py-1.5 density-compact:px-2 density-compact:py-1 density-comfortable:px-2.5 density-comfortable:py-1.5 density-spacious:px-4 density-spacious:py-3",dg="px-2.5 py-1.5 density-compact:px-2 density-compact:py-0.5 density-comfortable:px-2.5 density-comfortable:py-1.5 density-spacious:px-4 density-spacious:py-3",wP=[{label:"Last 5 minutes",from:"now-5m",to:"now"},{label:"Last 15 minutes",from:"now-15m",to:"now"},{label:"Last 1 hour",from:"now-1h",to:"now"},{label:"Last 6 hours",from:"now-6h",to:"now"},{label:"Last 24 hours",from:"now-24h",to:"now"},{label:"Last 7 days",from:"now-7d",to:"now"},{label:"Last 30 days",from:"now-30d",to:"now"}];function _P({data:e,columns:t,loading:n=!1,loadingMessage:r="Loading results…",loadingRowCount:s=8,emptyMessage:i="No data",clientReveal:l,className:u,scrollContainerClassName:d,autoFilter:f=!1,showGlobalFilter:p=!0,globalFilter:h,onGlobalFilterChange:x,globalFilterPlaceholder:v="Search all columns…",defaultSort:y,sort:b,onSortChange:j,manualSort:S=!1,filterBarProps:N,externalSearch:k,externalTimeRange:T,externalFilters:E,pagination:O,getRowId:M,onRowClick:L,isRowClickable:F,getRowHref:U,renderExpandedRow:z,detailStyle:V="row",detailDialogTitle:X,detailDialogSize:H="lg",resizableColumns:B=!0,persistColumnWidths:W=!0,columnResizeStorageKey:se,hideableColumns:P=!0,persistColumnVisibility:J=!0,columnVisibilityStorageKey:ne,density:$,defaultDensity:Q,onDensityChange:ae,persistDensity:ie=!0,densityStorageKey:de,showDensityControl:ge,themeMenuValue:ve,onThemeChange:Le,showThemeControl:je=!1,showHeaderFilters:Ue=!0,menuActions:we}){const ke=w.useMemo(()=>t.map(te=>typeof te=="string"?{key:te,label:te}:te),[t]),Ne=w.useMemo(()=>ke.map(te=>te.key).join("|"),[ke]),xe=se??`${gP}:${Ne}`,Re=ne??`${xP}:${Ne}`,et=de??`${vP}:${Ne}`,[Ve,st]=w.useState(()=>W?Jy(xe,ke):{}),[Ie,_e]=w.useState(()=>J?Qy(Re,ke):{}),be=$!==void 0,[Ce,Te]=w.useState(()=>be?$:ie?Yy(et)??Q:Q),[Y,Se]=w.useState(null),[Oe,He]=w.useState(null),[at,Et]=w.useState({}),[mt,pt]=w.useState({}),[ln,gr]=w.useState({}),[Gr,gs]=w.useState({}),[qt,jt]=w.useState(null),[tr,xs]=w.useState(""),[tn,Un]=w.useState(()=>{var te,Me,Qe,Xe;const Je=ke.find(ce=>{var I;return ce.kind==="timestamp"&&((I=ce.timestamp)==null?void 0:I.defaultRange)});return{from:((Me=(te=Je?.timestamp)==null?void 0:te.defaultRange)==null?void 0:Me.from)??"",to:((Xe=(Qe=Je?.timestamp)==null?void 0:Qe.defaultRange)==null?void 0:Xe.to)??""}});w.useEffect(()=>{st(te=>{const Me=W?Jy(xe,ke):{},Qe=i_({...Me,...te},ke);return XP(te,Qe)?te:Qe})},[Ne,W,xe]),w.useEffect(()=>{W&&GP(xe,Ve)},[Ve,W,xe]),w.useEffect(()=>{_e(te=>{const Me=J?Qy(Re,ke):{},Qe=mg({...Me,...te},ke);return eI(te,Qe)?te:Qe})},[Ne,J,Re]),w.useEffect(()=>{J&&JP(Re,Ie)},[Ie,J,Re]),w.useEffect(()=>{be||Te(ie?Yy(et)??Q:Q)},[Q,be,ie,et]),w.useEffect(()=>{be||!ie||QP(et,Ce)},[be,Ce,ie,et]);const nr=w.useCallback(()=>{Se(null),He(null)},[]);wo(!!(Y||Oe),nr),w.useEffect(()=>{if(!(!Y&&!Oe))return document.addEventListener("click",nr),()=>{document.removeEventListener("click",nr)}},[nr,Y,Oe]);const xr=w.useMemo(()=>e.map((te,Me)=>({id:M?.(te,Me)??String(Me),row:te})),[e,M]),vs=w.useMemo(()=>{var te;const Me={};for(const Qe of ke){if(Qe.kind!=="timestamp")continue;const Xe=[];for(const ce of e){const I=E0(ce,Qe),G=la(I);G&&Xe.push(G)}const Je=kM(Xe);Me[Qe.key]=SM(((te=Qe.timestamp)==null?void 0:te.mode)??"auto",Je)}return Me},[ke,e]),ht=w.useMemo(()=>ke.map(te=>HP(te,vs[te.key])),[ke,vs]),nn=w.useMemo(()=>{if(!P)return ht;const te=ht.filter(Me=>!Ie[Me.key]);return te.length>0?te:ht},[ht,Ie,P]),_o=w.useMemo(()=>ht.filter(ra).length,[ht]),bs=w.useMemo(()=>nn.filter(ra).length,[nn]),zs=P&&_o>1,Jr=ge??zs,Vs=!!(we&&we.length>0),Ar=zs||Jr||je||Vs,Hs=be?$:Ce,kt=w.useMemo(()=>N?.timeRange?null:ht.find(te=>{var Me;return te.kind==="timestamp"&&te.filterable!==!1&&((Me=te.timestamp)==null?void 0:Me.autoRangeFilter)!==!1})??null,[ht,N?.timeRange]),zn=w.useMemo(()=>ht.filter(te=>!(te.filterable===!1||te.kind==="timestamp")),[ht]),yn=w.useMemo(()=>!f||n?[]:zn.map(te=>{var Me;const Qe=tI(xr,te);if(Qe)return{column:te,kind:"number",options:[],numberBounds:Qe};const Xe=new Set;for(const G of xr)for(const fe of zh(G.row,te))fe&&Xe.add(fe);const Je=Array.from(Xe).sort((G,fe)=>G.localeCompare(fe,void 0,{numeric:!0})).map(G=>({value:G,label:G})),ce=te.kind==="tags"?50:20,I=Je.length>=2&&Je.length<=ce;if(te.kind==="tags"&&I){const G=((Me=te.tags)==null?void 0:Me.separator)??"=",fe=VP(Je,G);if(fe.length>=2)return{column:te,kind:"nested-multi",options:Je,groups:fe}}return{column:te,kind:I?"multi":"text",options:Je}}),[f,zn,n,xr]),ys=w.useMemo(()=>{const te={};for(const Me of yn){if(Me.kind!=="multi"&&Me.kind!=="nested-multi")continue;const Qe=Me.column.key,Xe=mt[Qe]??{},Je=ce=>pt(I=>Hh(I,Qe,ce));te[Qe]=tP(Xe,Je)}return te},[yn,mt]);w.useEffect(()=>{Et(te=>DP(te,yn)),pt(te=>BP(te,yn)),gr(te=>UP(te,yn))},[yn]);const yt=h!==void 0,Lr=yt?h:tr,ec=yt?x??(()=>{}):xs,Mn=w.useMemo(()=>yn.map(te=>{var Me,Qe,Xe;const Je=te.column.key;if(te.kind==="multi")return{key:Je,kind:"multi",label:ei(te.column),value:mt[Je]??{},onChange:ce=>pt(I=>Hh(I,Je,ce)),options:te.options};if(te.kind==="nested-multi")return{key:Je,kind:"nested-multi",label:ei(te.column),value:mt[Je]??{},onChange:ce=>pt(I=>Hh(I,Je,ce)),groups:te.groups??[]};if(te.kind==="number"){const ce={key:Je,kind:"number",label:ei(te.column),value:ln[Je]??{},onChange:I=>gr(G=>FP(G,Je,I))};return((Me=te.numberBounds)==null?void 0:Me.min)!==void 0&&(ce.domainMin=te.numberBounds.min),((Qe=te.numberBounds)==null?void 0:Qe.max)!==void 0&&(ce.domainMax=te.numberBounds.max),((Xe=te.numberBounds)==null?void 0:Xe.step)!==void 0&&(ce.step=te.numberBounds.step),ce}return{key:Je,kind:"text",label:ei(te.column),value:at[Je]??"",onChange:ce=>Et(I=>$P(I,Je,ce))}}),[yn,mt,ln,at]),Qr=w.useMemo(()=>new Map(Mn.map(te=>[te.key,te])),[Mn]),Ni=!!(N?.leading||N?.children||N?.trailing||N?.timeRange||N?.dateRange),Yr=w.useMemo(()=>{var te,Me,Qe,Xe;if(!f||!kt)return null;const Je={from:tn.from,to:tn.to,onApply:(ce,I)=>Un({from:ce,to:I}),presets:((te=kt.timestamp)==null?void 0:te.rangePresets)??wP,fromPlaceholder:"now-24h",toPlaceholder:"now",emptyLabel:"Any time"};return((Me=kt.timestamp)==null?void 0:Me.timeEnabled)!==void 0&&(Je.timeEnabled=kt.timestamp.timeEnabled),(Qe=kt.timestamp)!=null&&Qe.timeZone&&(Je.timeZone=kt.timestamp.timeZone),(Xe=kt.timestamp)!=null&&Xe.timeZones&&(Je.timeZones=kt.timestamp.timeZones),Je},[f,kt,tn.from,tn.to]),wa=f&&(p||Mn.length>0||!!Yr)||!!k||!!T||E&&E.length>0||Ni||Ar,_a=te=>{be||Te(te),ae?.(te)},ja=Ar?o.jsxs(o.Fragment,{children:[N?.trailing,o.jsx(EP,{onOpen:te=>Se(Ky(te))})]}):N?.trailing,ka=f&&Ue,Rr=w.useMemo(()=>{const te=Lr.trim().toLowerCase(),Me=new Date,Qe=kt?Ny(tn.from,Me):null,Xe=kt?Ny(tn.to,Me):null,Je=kt?.key;return xr.filter(({row:ce})=>{if(Je&&(Qe||Xe)){const I=W3(ce,Je),G=la(I);if(!G||Qe&&G.getTime()Xe.getTime())return!1}if(te&&!zn.flatMap(G=>zh(ce,G)).join(" ").toLowerCase().includes(te))return!1;for(const I of yn){const G=zh(ce,I.column);if(I.kind==="text"){const fe=(at[I.column.key]??"").trim().toLowerCase();if(fe&&!G.some(ue=>ue.toLowerCase().includes(fe)))return!1}else if(I.kind==="number"){const fe=ln[I.column.key]??{},ue=T0(fe.min),We=T0(fe.max),Ze=String(fe.min??"").trim()!=="",gt=String(fe.max??"").trim()!=="";if((Ze||gt)&&!IP(ce,I.column).some(wn=>(ue==null||wn>=ue)&&(We==null||wn<=We)))return!1}else{const fe=mt[I.column.key]??{},ue=Object.entries(fe).filter(([,Ze])=>Ze==="include").map(([Ze])=>Ze),We=Object.entries(fe).filter(([,Ze])=>Ze==="exclude").map(([Ze])=>Ze);if(ue.length>0&&!G.some(Ze=>ue.includes(Ze))||We.length>0&&G.some(Ze=>We.includes(Ze)))return!1}}return!0})},[Lr,zn,yn,mt,ln,xr,at,kt,tn.from,tn.to]),Na=w.useMemo(()=>Object.fromEntries(ht.map(te=>[te.key,Me=>PP(Me.row,te)])),[ht]),{sorted:ot,sort:Zs,toggle:Ci}=B7(Rr,{defaultDir:y?.dir??"asc",manual:S,resolvers:Na,...b!==void 0?{sort:b}:{},...j?{onSortChange:j}:{},...y?.key?{defaultKey:y.key}:{}}),ws=!!l&&!O,vr=l?.batchSize??0,[Ws,qs]=w.useState(vr),rr=w.useRef(null);w.useEffect(()=>{ws&&qs(vr)},[ws,vr,ot]);const cn=ws?ot.slice(0,Ws):ot,Xr=ws&&Ws{rr.current&&rr.current.disconnect(),!(!te||!Xr)&&(rr.current=new IntersectionObserver(Me=>{var Qe;(Qe=Me[0])!=null&&Qe.isIntersecting&&qs(Xe=>Math.min(Xe+vr,ot.length))},{rootMargin:"200px"}),rr.current.observe(te))},[Xr,vr,ot.length]),tc=(te,Me)=>{te.preventDefault(),te.stopPropagation();const Qe=te.clientX,Xe=te.currentTarget.closest("th"),ce=(Xe?.getBoundingClientRect().width??0)||Ve[Me.key]||a_(Me),I=fe=>{const ue=$2(Me,ce+fe.clientX-Qe);st(We=>({...We,[Me.key]:ue}))},G=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",G),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",I),document.addEventListener("mouseup",G),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},nc=(te,Me)=>{var Qe;te.preventDefault(),te.stopPropagation();const Xe=te.currentTarget.closest("th"),Je=te.currentTarget.closest("table");if(!Xe||!Je)return;const ce=Array.from(((Qe=Xe.parentElement)==null?void 0:Qe.children)??[]).indexOf(Xe);if(ce<0)return;const I=qP(Je,ce,Me);st(G=>({...G,[Me.key]:I}))},Ca=te=>{ra(te)&&_e(Me=>{const Qe=Me[te.key]===!0;if(!Qe&&bs<=1)return Me;const Xe={...Me};return Qe?delete Xe[te.key]:Xe[te.key]=!0,mg(Xe,ke)})},Ks=()=>_e({}),jo=(te,Me)=>{zs&&(te.preventDefault(),Se(ZP(te,Me.key)))},_s=(te,Me)=>{te.preventDefault(),te.stopPropagation(),He(Ky(te,Me))};return o.jsx($8,{density:Hs??"comfortable",children:o.jsxs("div",{className:R("flex min-h-0 min-w-0 flex-col gap-3",u),"data-density":Hs,children:[wa&&o.jsx(OM,{...N,...k?{search:k}:f&&p?{search:{value:Lr,onChange:ec,placeholder:v}}:{},...T?{timeRange:T}:Yr?{timeRange:Yr}:{},trailing:ja,filters:E&&E.length>0?[...E,...Mn]:Mn}),o.jsx("div",{className:R("max-w-full overflow-auto overscroll-x-contain rounded-md border border-border",d??"min-h-0 flex-1"),"aria-busy":n||void 0,children:o.jsxs("table",{className:"w-max min-w-full table-auto text-left text-sm",children:[o.jsx("colgroup",{children:nn.map(te=>o.jsx("col",{style:WP(te,Ve),className:te.shrink&&!te.grow?"w-px":void 0},te.key))}),o.jsx("thead",{className:"sticky top-0 z-10 bg-muted shadow-[0_1px_0_0_var(--tw-shadow-color)] shadow-border",children:o.jsx("tr",{className:"border-b border-border text-xs text-muted-foreground",children:nn.map(te=>o.jsxs("th",{className:R("group/header relative whitespace-nowrap font-medium",yP,O0(te.align),B&&te.resizable!==!1&&"select-none",te.headerClassName),onContextMenu:Me=>jo(Me,te),children:[o.jsxs("div",{className:R("flex min-w-0 items-center gap-1",sI(te.align),B&&te.resizable!==!1&&"pr-2"),children:[o.jsx("span",{className:"min-w-0",children:te.sortable===!1?o.jsx("span",{children:te.label}):o.jsx(WR,{active:Zs?.key===te.key,...Zs?.key===te.key?{dir:Zs.dir}:{},...te.align?{align:te.align}:{},onClick:()=>Ci(te.key),children:te.label})}),ka&&(Qr.has(te.key)||Yr&&kt?.key===te.key)&&o.jsx(CP,{column:te,active:Qr.has(te.key)?bu(Qr.get(te.key)):!!(tn.from||tn.to),onOpen:Me=>_s(Me,te.key)})]}),B&&te.resizable!==!1&&o.jsx("span",{role:"separator","aria-label":`Resize ${ei(te)} column`,"aria-orientation":"vertical",className:"absolute right-0 top-0 hidden h-full w-3 cursor-col-resize touch-none items-center justify-center border-r border-border/70 bg-gradient-to-l from-border/30 to-transparent transition-colors hover:border-primary hover:from-primary/20 md:flex",onClick:Me=>{Me.preventDefault(),Me.stopPropagation()},onDoubleClick:Me=>nc(Me,te),onMouseDown:Me=>tc(Me,te),children:o.jsx("span",{"aria-hidden":!0,className:"h-4 w-0.5 rounded-full bg-border transition-colors group-hover/header:bg-primary/70"})})]},te.key))})}),o.jsxs("tbody",{children:[n?o.jsx(NP,{columns:nn,rowCount:s,message:r}):cn.map(te=>{const Me=U?.(te.row),Qe=Gr[te.id]??!1,Xe=z?.(te.row,{columns:ht,visibleColumns:nn,filterActionsByColumn:ys})??null,Je=Xe!==null,ce=Je&&V==="row",I=Je&&V==="dialog",G=F?.(te.row)??!!L,fe=!!Me||G||Je;return o.jsxs(w.Fragment,{children:[o.jsx("tr",{className:R("border-b border-border/60 align-top",fe&&"cursor-pointer hover:bg-accent/40"),onClick:()=>{ce&&gs(ue=>({...ue,[te.id]:!ue[te.id]})),I&&jt(te),G&&L?.(te.row)},children:nn.map((ue,We)=>{const Ze=E0(te.row,ue);let gt=ue.render?ue.render(Ze,te.row):zP(Ze);return ue.kind==="tags"&&ys[ue.key]&&(gt=o.jsx(nP,{value:ys[ue.key],children:gt})),o.jsx("td",{className:R(dg,O0(ue.align),ue.cellClassName),children:o.jsx(r_,{column:ue,...Ve[ue.key]!==void 0?{width:Ve[ue.key]}:{},children:Me&&We===0?o.jsx("a",{href:Me,className:"hover:underline",children:gt}):gt})},ue.key)})}),ce&&Qe&&Xe&&o.jsx("tr",{children:o.jsx("td",{colSpan:nn.length,className:"bg-muted/40 p-density-3",children:o.jsx("div",{className:"rounded-md border border-border bg-background p-density-3",children:Xe})})})]},te.id)}),Xr&&o.jsx("tr",{ref:Bt,"aria-hidden":!0,children:o.jsx("td",{colSpan:nn.length,className:"p-density-2 text-center text-xs text-muted-foreground",children:"Loading more…"})})]})]})}),O?o.jsx(kP,{pagination:O,visibleRowCount:ot.length,loading:n,loadingMessage:r}):o.jsx("div",{className:"px-1 text-xs text-muted-foreground",children:n?r:`${ot.length} of ${e.length} row${e.length===1?"":"s"}`}),V==="dialog"&&z&&o.jsx(yi,{open:qt!==null,onClose:()=>jt(null),size:H,...qt?{title:typeof X=="function"?X(qt.row):X}:{},children:qt?z(qt.row,{columns:ht,visibleColumns:nn,filterActionsByColumn:ys}):null}),Y&&Ar&&o.jsx(TP,{columns:ht,hiddenColumns:Ie,anchor:Y,actions:we??[],showColumnVisibilityControl:zs,showDensityControl:Jr,showThemeControl:je,themeMenuValue:ve,densityOverride:Hs,visibleHideableColumnCount:bs,onToggle:Ca,onShowAll:Ks,onDensityChange:_a,...Le?{onThemeChange:Le}:{},onClose:()=>Se(null)}),Oe&&o.jsx(SP,{filter:Qr.get(Oe.columnKey??""),...Yr&&kt?.key===Oe.columnKey?{timeRange:Yr}:{},anchor:Oe,onClose:()=>He(null)})]})})}const jP=[5,10,25,50,100,200];function kP({pagination:e,visibleRowCount:t,loading:n,loadingMessage:r}){const{page:s,pageSize:i,total:l,onPageChange:u,onPageSizeChange:d}=e,f=Array.from(new Set([...e.pageSizeOptions??jP,i])).sort((N,k)=>N-k),p=Math.max(0,s),h=l!=null&&i>0?Math.max(1,Math.ceil(l/i)):void 0,x=p===0,v=h!=null?p>=h-1:t0,b=l===0||!y?0:p*i+1,j=l!=null&&y?Math.min(l,b+Math.max(t-1,0)):t,S=l!=null?`${b}-${j} of ${l}`:`${t} row${t===1?"":"s"}`;return o.jsxs("div",{className:"flex min-h-9 flex-col items-stretch gap-3 border-t border-border/70 px-1 pt-2 text-xs text-muted-foreground sm:flex-row sm:flex-wrap sm:items-center sm:justify-between",children:[o.jsx("div",{"aria-live":"polite",children:n?r:S}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[o.jsxs("label",{className:"flex items-center gap-1.5",children:[o.jsx("span",{children:"Rows per page"}),o.jsx("select",{className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",value:i,onChange:N=>d(Number(N.target.value)),children:f.map(N=>o.jsx("option",{value:N,children:N},N))})]}),o.jsxs("span",{className:"min-w-20 text-center",children:["Page ",p+1,h!=null?` of ${h}`:""]}),o.jsx("button",{type:"button",className:"inline-flex h-7 w-7 items-center justify-center rounded-md border border-border bg-background text-foreground hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Previous page",title:"Previous page",disabled:x,onClick:()=>u(Math.max(0,p-1)),children:o.jsx(K,{icon:dP})}),o.jsx("button",{type:"button",className:"inline-flex h-7 w-7 items-center justify-center rounded-md border border-border bg-background text-foreground hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Next page",title:"Next page",disabled:v,onClick:()=>u(p+1),children:o.jsx(K,{icon:V5})})]})]})}function NP({columns:e,rowCount:t,message:n}){const r=Math.max(1,t),s=Math.max(1,e.length);return o.jsxs(o.Fragment,{children:[o.jsx("tr",{className:"border-b border-border/60 bg-muted/20",children:o.jsxs("td",{colSpan:s,className:R(dg,"p-0"),children:[o.jsx("div",{className:"h-0.5 w-full overflow-hidden bg-muted",children:o.jsx("div",{className:"h-full w-1/2 animate-pulse rounded-full bg-primary/70"})}),o.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-muted-foreground",children:[o.jsx("span",{"aria-hidden":!0,className:"h-3 w-3 animate-spin rounded-full border-2 border-primary/30 border-t-primary"}),o.jsx("span",{children:n})]})]})}),Array.from({length:r}).map((i,l)=>o.jsx("tr",{className:"border-b border-border/60",children:e.map((u,d)=>o.jsx("td",{className:R(dg,O0(u.align),u.cellClassName),children:o.jsx(r_,{column:u,children:o.jsx("span",{"aria-hidden":!0,className:R("block h-3 animate-pulse rounded-full bg-muted",oI(d))})})},u.key))},l))]})}function CP({column:e,active:t,onOpen:n}){return o.jsx("button",{type:"button","aria-label":`Open ${ei(e)} column filter`,"aria-haspopup":"dialog","aria-pressed":t,className:R("inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",t&&"bg-accent text-foreground"),onClick:n,children:o.jsx("span",{"data-filter-icon-state":t?"filled":"outline",className:"inline-flex",children:o.jsx(K,{icon:t?EM:Y5,className:"text-xs"})})})}function SP({filter:e,timeRange:t,anchor:n,onClose:r}){if(!e&&!t)return null;const s=e?.label??"Time range",i=!!(t?.from||t?.to);return o.jsxs("div",{role:"dialog","aria-label":`${s} column filter`,className:"fixed z-50 max-h-[calc(100vh-1rem)] max-w-[calc(100vw-1rem)] overflow-auto rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-lg shadow-black/5",style:{left:n.x,top:n.y},onClick:l=>l.stopPropagation(),onContextMenu:l=>l.preventDefault(),children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[o.jsx("div",{className:"truncate text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:s}),o.jsxs("div",{className:"flex items-center gap-1",children:[e&&o.jsx("button",{type:"button",className:"rounded px-1.5 py-0.5 text-xs text-primary transition-colors hover:bg-accent focus:bg-accent focus:outline-none disabled:text-muted-foreground",onClick:()=>ig(e),disabled:!bu(e),children:"Clear all"}),t&&o.jsx("button",{type:"button",className:"rounded px-1.5 py-0.5 text-xs text-primary transition-colors hover:bg-accent focus:bg-accent focus:outline-none disabled:text-muted-foreground",onClick:()=>t.onApply("",""),disabled:!i,children:"Clear all"}),o.jsx("button",{type:"button","aria-label":"Close column filter",title:"Close",className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none",onClick:r,children:o.jsx(K,{icon:Tn,className:"text-sm"})})]})]}),o.jsxs("div",{className:"flex flex-col gap-2",children:[e&&o.jsx(MM,{filter:e,chrome:"embedded"}),t&&o.jsx(zM,{kind:"time",label:"Time range",...t})]})]})}function EP({onOpen:e}){return o.jsx("button",{type:"button","aria-label":"Open column menu","aria-haspopup":"menu",className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-input bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:t=>{t.stopPropagation(),e(t)},children:o.jsx(K,{icon:t_,className:"text-sm"})})}function TP({columns:e,hiddenColumns:t,anchor:n,actions:r,showColumnVisibilityControl:s,showDensityControl:i,showThemeControl:l,themeMenuValue:u,densityOverride:d,visibleHideableColumnCount:f,onToggle:p,onShowAll:h,onDensityChange:x,onThemeChange:v,onClose:y}){const b=n.columnKey?e.find(N=>N.key===n.columnKey):void 0,j=b&&ra(b)&&f>1,S=r.length>0;return o.jsxs("div",{role:"menu","aria-label":"Column menu",className:"fixed z-50 max-h-[calc(100vh-1rem)] min-w-[16rem] max-w-[calc(100vw-1rem)] overflow-auto rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-lg shadow-black/5",style:{left:n.x,top:n.y},onClick:N=>N.stopPropagation(),onContextMenu:N=>N.preventDefault(),children:[s&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center justify-between gap-3 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[o.jsx("span",{children:"Columns"}),o.jsx("button",{type:"button",className:"rounded px-1.5 py-0.5 text-xs text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none",onClick:h,children:"Show all"})]}),b&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",role:"menuitem",disabled:!j,className:R("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none",!j&&"cursor-not-allowed opacity-50"),onClick:()=>{j&&(p(b),y())},children:[o.jsx(K,{icon:fP,className:"text-sm text-muted-foreground"}),o.jsxs("span",{children:["Hide ",ei(b)]})]}),o.jsx("div",{className:"my-1 h-px bg-border"})]}),o.jsx("div",{className:"max-h-72 overflow-auto",children:e.map(N=>{const k=ra(N),T=t[N.key]!==!0,E=!k||T&&f<=1;return o.jsxs("label",{className:R("flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-accent hover:text-accent-foreground",E&&"cursor-not-allowed opacity-50"),children:[o.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-border",checked:T,disabled:E,onChange:()=>p(N)}),o.jsx("span",{className:"truncate",children:ei(N)})]},N.key)})})]}),i&&o.jsx(AP,{densityOverride:d,separated:s,onDensityChange:x}),S&&o.jsx(MP,{actions:r,separated:s||i,onClose:y}),l&&v&&o.jsx(RP,{value:u??"system",separated:s||i||S,onChange:v})]})}function OP(e){const t=[];for(const n of e){const r=n.section??"Download";let s=t.find(i=>i.section===r);s||(s={section:r,actions:[]},t.push(s)),s.actions.push(n)}return t}function MP({actions:e,separated:t,onClose:n}){const r=OP(e);return o.jsx(o.Fragment,{children:r.map((s,i)=>o.jsxs("div",{className:R((t||i>0)&&"mt-1 border-t border-border pt-1"),children:[o.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:s.section}),s.actions.map(l=>{const u=!!l.description;return o.jsxs("button",{type:"button",role:"menuitem",disabled:l.disabled,className:R("flex w-full gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none",u?"items-start":"items-center",l.disabled&&"cursor-not-allowed opacity-50"),onClick:()=>{l.disabled||(l.onSelect(),n())},children:[l.icon&&o.jsx(K,{icon:l.icon,className:R("shrink-0 text-sm",u&&"mt-0.5",l.iconClassName??"text-muted-foreground")}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:R(u&&"font-medium"),children:l.label}),l.description&&o.jsx("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:l.description})]})]},l.id)})]},s.section))})}function AP({densityOverride:e,separated:t,onDensityChange:n}){const r=e??"inherit";return o.jsxs("div",{className:R(t&&"mt-1 border-t border-border pt-1"),children:[o.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Density"}),o.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":r==="inherit",className:fg(r==="inherit"),onClick:()=>n(void 0),children:[o.jsx(K,{icon:n_,className:"text-sm text-muted-foreground"}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:"Use page density"}),r==="inherit"?o.jsx(K,{icon:mr,className:"text-sm text-foreground"}):o.jsx("span",{className:"inline-block h-4 w-4","aria-hidden":!0})]}),bP.map(s=>{const i=r===s.value;return o.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":i,className:fg(i),onClick:()=>n(s.value),children:[o.jsx(K,{icon:s.icon,className:"text-sm text-muted-foreground"}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.label}),i?o.jsx(K,{icon:mr,className:"text-sm text-foreground"}):o.jsx("span",{className:"inline-block h-4 w-4","aria-hidden":!0})]},s.value)})]})}function fg(e){return R("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none",e&&"text-foreground")}const LP=[{value:"system",icon:S2,label:"Use system theme"},{value:"light",icon:Yu,label:"Light"},{value:"dark",icon:Xu,label:"Dark"}];function RP({value:e,separated:t,onChange:n}){return o.jsxs("div",{className:R(t&&"mt-1 border-t border-border pt-1"),children:[o.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Theme"}),LP.map(r=>{const s=e===r.value;return o.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":s,className:fg(s),onClick:()=>n(r.value),children:[o.jsx(K,{icon:r.icon,className:"text-sm text-muted-foreground"}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:r.label}),s?o.jsx(K,{icon:mr,className:"text-sm text-foreground"}):o.jsx("span",{className:"inline-block h-4 w-4","aria-hidden":!0})]},r.value)})]})}function r_({column:e,width:t,children:n}){return o.jsx("div",{className:R(aI(e,t),O0(e.align)),style:iI(t),children:n})}function PP(e,t){const n=E0(e,t);return t.sortValue?t.sortValue(n,e):n}function IP(e,t){return s_(P2(e,t))}function s_(e){if(Array.isArray(e))return e.flatMap(n=>s_(n));const t=T0(e);return t==null?[]:[t]}function $P(e,t,n){const r={...e};return n.trim()?r[t]=n:delete r[t],r}function Hh(e,t,n){const r={...e};return Object.keys(n).length>0?r[t]=n:delete r[t],r}function FP(e,t,n){const r={...e},s=String(n.min??"").trim()!=="",i=String(n.max??"").trim()!=="";return s||i?r[t]=n:delete r[t],r}function DP(e,t){return o_(e,t,"text",n=>!String(n??"").trim())}function BP(e,t){const n=new Set(t.filter(r=>r.kind==="multi"||r.kind==="nested-multi").map(r=>r.column.key));return Object.fromEntries(Object.entries(e).filter(([r,s])=>n.has(r)&&Object.keys(s).length>0))}function UP(e,t){return o_(e,t,"number",n=>!String(n.min??"").trim()&&!String(n.max??"").trim())}function o_(e,t,n,r){const s=new Set(t.filter(i=>i.kind===n).map(i=>i.column.key));return Object.fromEntries(Object.entries(e).filter(([i,l])=>s.has(i)&&!r(l)))}function zP(e){return e==null||e===""?o.jsx("span",{className:"text-muted-foreground",children:"—"}):typeof e=="boolean"?e?"True":"False":typeof e=="object"?JSON.stringify(e):String(e)}function VP(e,t){const n=new Map;for(const r of e){const{key:s}=XR(r.value,t),i=n.get(s)??[];i.push(r),n.set(s,i)}return Array.from(n.entries()).sort(([r],[s])=>r===""&&s!==""?1:s===""&&r!==""?-1:r.localeCompare(s)).map(([r,s])=>({groupKey:r,label:r===""?"Other":r,options:s}))}function HP(e,t){if(!e.kind)return e;if(e.kind==="timestamp"){const n=t??"iso";return{...e,render:e.render??(r=>{var s;return o.jsx(K3,{value:r,format:n,showTitleOnHover:((s=e.timestamp)==null?void 0:s.alwaysShowFullOnHover)!==!1})}),sortValue:e.sortValue??(r=>{var s;return((s=la(r))==null?void 0:s.getTime())??null}),filterValue:e.filterValue??(r=>{const s=la(r);return s?s.toISOString():""})}}if(e.kind==="tags"){const n=e.tags,r=n?.separator??"=";return{...e,render:e.render??(s=>o.jsx(e_,{tags:I2(s,r),maxVisible:n?.maxVisible??3})),filterValue:e.filterValue??(s=>Zy(s,r)),sortValue:e.sortValue??(s=>Zy(s,r).length)}}if(e.kind==="status"){const n=e.status,r=n?.map??(s=>uP(s));return{...e,render:e.render??((s,i)=>{var l;const u=r(s,i);if(!u)return o.jsx("span",{className:"text-muted-foreground",children:"—"});const d=n?.showLabel?typeof s=="string"?s:u:void 0,f=((l=n?.title)==null?void 0:l.call(n,s,i))??(typeof s=="string"?s:void 0);return o.jsx(iP,{status:u,...d?{label:d}:{},...f?{title:f}:{}})}),filterValue:e.filterValue??((s,i)=>r(s,i)??""),sortValue:e.sortValue??((s,i)=>r(s,i)??"")}}return e}function ei(e){return typeof e.label=="string"?e.label:ZR(e.key.split(".").at(-1)??e.key)}function ra(e){return e.hideable!==!1}function ZP(e,t){const i=typeof window>"u"?e.clientX+256:window.innerWidth,l=typeof window>"u"?e.clientY+320:window.innerHeight,u={x:Math.max(8,Math.min(e.clientX,i-256-8)),y:Math.max(8,Math.min(e.clientY,l-320-8))};return t?{...u,columnKey:t}:u}function Ky(e,t){const n=e.currentTarget.getBoundingClientRect(),r=8,s=256,i=320,l=typeof window>"u"?n.right+s:window.innerWidth,u=typeof window>"u"?n.bottom+i:window.innerHeight,d={x:Math.max(r,Math.min(n.right-s,l-s-r)),y:Math.max(r,Math.min(n.bottom+6,u-i-r))};return t?{...d,columnKey:t}:d}function WP(e,t){const n=t[e.key];return n?{width:`${n}px`}:void 0}function qP(e,t,n){const s=Array.from(e.querySelectorAll("th, td")).filter(i=>i instanceof HTMLTableCellElement&&i.cellIndex===t&&i.colSpan===1).reduce((i,l)=>{const u=KP(l),d=Array.from(l.children).map(f=>f instanceof HTMLElement?f.scrollWidth+u:0);return Math.max(i,l.scrollWidth,...d)},0);return $2(n,s||a_(n))}function KP(e){if(typeof window>"u")return 0;const t=window.getComputedStyle(e);return Gy(t.paddingLeft)+Gy(t.paddingRight)}function Gy(e){const t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function Jy(e,t){if(typeof window>"u")return{};try{const n=window.localStorage.getItem(e);if(!n)return{};const r=JSON.parse(n);return!r||typeof r!="object"||Array.isArray(r)?{}:i_(r,t)}catch{return{}}}function GP(e,t){if(!(typeof window>"u"))try{Object.keys(t).length===0?window.localStorage.removeItem(e):window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function Qy(e,t){if(typeof window>"u")return{};try{const n=window.localStorage.getItem(e);if(!n)return{};const r=JSON.parse(n);return!r||typeof r!="object"||Array.isArray(r)?{}:mg(r,t)}catch{return{}}}function JP(e,t){if(!(typeof window>"u"))try{Object.keys(t).length===0?window.localStorage.removeItem(e):window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function Yy(e){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(e);return YP(t)?t:void 0}catch{return}}function QP(e,t){if(!(typeof window>"u"))try{t?window.localStorage.setItem(e,t):window.localStorage.removeItem(e)}catch{}}function YP(e){return e==="compact"||e==="comfortable"||e==="spacious"}function i_(e,t){const n=new Map(t.map(s=>[s.key,s])),r={};for(const[s,i]of Object.entries(e)){const l=n.get(s);!l||typeof i!="number"||!Number.isFinite(i)||(r[s]=$2(l,i))}return r}function mg(e,t){const n=new Map(t.map(l=>[l.key,l])),r={};for(const[l,u]of Object.entries(e)){const d=n.get(l);!d||u!==!0||!ra(d)||(r[l]=!0)}const s=t.filter(ra),i=s.filter(l=>r[l.key]!==!0).length;return s.length>0&&i===0&&delete r[s[0].key],r}function XP(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(s=>Object.prototype.hasOwnProperty.call(t,s)&&e[s]===t[s])}function eI(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(s=>Object.prototype.hasOwnProperty.call(t,s)&&e[s]===t[s])}function a_(e){return e.grow?pP:e.shrink?hP:mP}function $2(e,t){const n=e.minWidth??qy,r=e.maxWidth,s=Number.isFinite(n)?Math.max(1,n):qy,i=r!=null&&Number.isFinite(r)?Math.max(s,r):1/0;return Math.round(Math.max(s,Math.min(i,t)))}function tI(e,t){const r=e.flatMap(i=>l_(P2(i.row,t))).filter(nI),s=r.map(i=>T0(i)).filter(i=>i!=null);return r.length===0||s.length!==r.length?null:{min:Math.min(...s),max:Math.max(...s),step:rI(s)}}function l_(e){return Array.isArray(e)?e.flatMap(t=>l_(t)):[e]}function nI(e){return e!=null&&!(typeof e=="string"&&e.trim()==="")}function T0(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e!="string")return null;const t=e.trim();if(!t)return null;const n=Number(t);return Number.isFinite(n)?n:null}function rI(e){if(e.every(Number.isInteger))return 1;const t=e.reduce((n,r)=>{const[,s=""]=String(r).split(".");return Math.max(n,s.length)},0);return 10**-Math.min(t||2,6)}function O0(e){return e==="right"?"text-right":e==="center"?"text-center":"text-left"}function sI(e){return e==="right"?"justify-end":e==="center"?"justify-center":"justify-start"}function oI(e){return["w-24","w-40","w-28","w-56","w-32","w-48"][e%6]}function iI(e){return e?{maxWidth:`${e}px`}:void 0}function aI(e,t){const n=t!==void 0,r="w-full truncate";return e.grow?R(r,n?"min-w-0":"min-w-56 max-w-[36rem]"):e.shrink?R(r,"min-w-0 whitespace-nowrap",!n&&"max-w-[16rem]"):R(r,"min-w-0",!n&&"max-w-[18rem]")}function c_({theme:e="system",onThemeChange:t,showThemeControl:n=!1,showFullscreenControl:r=!1,fullscreenTitle:s="Table",fullscreenButtonLabel:i="Open table full screen",className:l,filterBarProps:u,...d}){const f=t!==void 0,[p,h]=w.useState(e),x=f?e:p,v=P8(x),y=N=>{f||h(N),t?.(N)},[b,j]=w.useState(!1),S=({inFullscreen:N})=>{const k=r&&!N,T=u?.trailing,E=k?{...u,trailing:o.jsxs(o.Fragment,{children:[T,o.jsx(lI,{label:i,onClick:()=>j(!0)})]})}:u;return o.jsx(_P,{...d,...E?{filterBarProps:E}:{},themeMenuValue:x,showThemeControl:n,onThemeChange:y})};return o.jsxs("div",{"data-theme":v,className:R("flex min-h-0 flex-col text-foreground",l),children:[S({inFullscreen:!1}),r&&o.jsx(yi,{open:b,onClose:()=>j(!1),title:s,size:"full",className:"h-[95vh]",children:o.jsx("div",{"data-theme":v,className:"flex h-full min-h-0 flex-col bg-background text-foreground",children:S({inFullscreen:!0})})})]})}function lI({label:e,onClick:t}){return o.jsx("button",{type:"button","aria-label":e,title:e,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-input bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:t,children:o.jsx(K,{icon:L2,className:"text-sm"})})}function M0(e){return e.split(/[-_]/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function cI(e,t){var n;if(t.toUpperCase()==="GET"&&e.in==="query"&&!e.required)return"";const r=e.in==="path"?"":void 0,s=((n=e.schema)==null?void 0:n.default)??r;return typeof s=="boolean"?s?"true":"false":Array.isArray(s)||s!=null&&typeof s=="object"||s==null?"":String(s)}function pg(e,t,n={},r={}){return{...Object.fromEntries(e.map(i=>[i.name,cI(i,t)])),...r,...n}}function u_(e,t){var n,r,s;if(!e)return;const i=Xy(e.limitValue)??((n=t?.pagination)==null?void 0:n.limit)??25,l=fI(e.offsetValue)??((r=t?.pagination)==null?void 0:r.offset)??0;return{page:Math.floor(l/i),pageSize:i,...((s=t?.pagination)==null?void 0:s.total)!==void 0?{total:t.pagination.total}:{},onPageChange:d=>{Xy(e.limitValue)==null&&e.setLimit(String(i)),e.setOffset(String(Math.max(d,0)*i))},onPageSizeChange:d=>{e.setLimit(String(d)),e.setOffset("0")}}}function Tl(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==""))}function pi(e,t){const n=new Set(t.filter(i=>i.in!=="path"&&Hl(i)).map(i=>i.name)),r={},s=[];for(const[i,l]of Object.entries(e))l&&(n.has(i)?s.push(l):r[i]=l);return s.length>0&&(r.args=s.join(",")),r}function F2(e,t,n,r={}){var s,i,l;const u=[],d=((s=r.lookup)==null?void 0:s.filters)??{},f=new Set(r.includeLocations??["path","query","header"]),p=r.lockedValues??{},h=r.hideLocked??!1,x=e.find(M=>{var L;return((L=M["x-clicky"])==null?void 0:L.role)==="limit"}),v=e.find(M=>{var L;return((L=M["x-clicky"])==null?void 0:L.role)==="offset"}),y=new Set;x&&y.add(x.name),v&&y.add(v.name);const b=e.find(M=>{var L;return((L=M["x-clicky"])==null?void 0:L.role)==="search"&&f.has(M.in)}),j=new Set(y);b&&j.add(b.name);const S=e.find(M=>{var L;return((L=M["x-clicky"])==null?void 0:L.role)==="time-from"}),N=e.find(M=>{var L;return((L=M["x-clicky"])==null?void 0:L.role)==="time-to"}),k=S??e.find(M=>{var L;return f.has(M.in)&&M.in==="query"&&((L=d[M.name])==null?void 0:L.type)==="from"}),T=N??e.find(M=>{var L;return f.has(M.in)&&M.in==="query"&&((L=d[M.name])==null?void 0:L.type)==="to"}),E=k!=null&&T!=null;for(const M of e){if(!f.has(M.in)||j.has(M.name)||E&&(M.name===k?.name||M.name===T?.name))continue;const L=Object.prototype.hasOwnProperty.call(p,M.name);if(L&&h)continue;const F=L?p[M.name]??"":t[M.name]??"",U=((i=d[M.name])==null?void 0:i.label)??M0(M.name),z=C0(M),V=z!==void 0?{placeholder:z}:{},X=W=>{if(L)return;const se=typeof W=="boolean"?W?"true":"false":W;n(P=>({...P,[M.name]:se}))},H=M.schema,B=d[M.name];if(B?.type==="multi-filter"&&M.in==="query"){u.push({key:M.name,kind:"multi",label:U,value:uI(F),disabled:L,options:Gf(B),onChange:W=>n(se=>({...se,[M.name]:dI(W)}))});continue}if(H?.enum){u.push({key:M.name,kind:"enum",label:U,value:F,disabled:L,options:H.enum.map(W=>({value:String(W),label:String(W)})),onChange:W=>X(W)});continue}if(B?.type==="bool"||H?.type==="boolean"){u.push({key:M.name,kind:"boolean",label:U,value:F==="true",disabled:L,onChange:W=>X(W)});continue}if(B!=null&&M.in==="query"){if(B.multi){u.push({key:M.name,kind:"lookup-multi",label:U,value:f_(F),disabled:L,options:Gf(B),...V,onChange:W=>n(se=>({...se,[M.name]:W.join(",")}))});continue}u.push({key:M.name,kind:"lookup",label:U,value:F,disabled:L,options:Gf(B),...V,inputType:B.type==="number"?"number":B.type==="date"?"date":"text",onChange:W=>X(W)});continue}u.push({key:M.name,kind:"text",label:U,value:F,disabled:L,...V,onChange:W=>X(W)})}const O={filters:u};if(b){const M=Object.prototype.hasOwnProperty.call(p,b.name),L=M?p[b.name]??"":t[b.name]??"",F=C0(b);O.search={value:L,onChange:U=>{M||n(z=>({...z,[b.name]:U}))},...F?{placeholder:F}:{},ariaLabel:((l=d[b.name])==null?void 0:l.label)??M0(b.name)}}if(x&&v&&(O.pagination={limitParam:x.name,offsetParam:v.name,limitValue:t[x.name]??"",offsetValue:t[v.name]??"",setLimit:M=>n(L=>({...L,[x.name]:M})),setOffset:M=>n(L=>({...L,[v.name]:M}))}),E&&k!=null&&T!=null){const M=d[k.name],L=d[T.name],F=M??L;O.timeRange={from:t[k.name]??"",to:t[T.name]??"",onApply:(U,z)=>n(V=>({...V,[k.name]:U,[T.name]:z})),...F?.presets?{presets:F.presets}:{},timeEnabled:F?.timeEnabled??!1,...F?.timeZone?{timeZone:F.timeZone}:{},...F?.timeZones?{timeZones:F.timeZones}:{},...k.description?{fromPlaceholder:k.description}:{},...T.description?{toPlaceholder:T.description}:{}}}return O}function d_(e,t){const[n,r]=w.useState(e);return w.useEffect(()=>{const s=window.setTimeout(()=>r(e),t);return()=>window.clearTimeout(s)},[t,e]),n}function uI(e){const t={};for(const n of f_(e))n.startsWith("!")&&n.length>1?t[n.slice(1)]="exclude":t[n]="include";return t}function dI(e){return Object.entries(e).flatMap(([t,n])=>n==="include"?[t]:n==="exclude"?[`!${t}`]:[]).join(",")}function f_(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function Xy(e){const t=parseInt(e??"",10);return Number.isFinite(t)&&t>0?t:void 0}function fI(e){const t=parseInt(e??"",10);return Number.isFinite(t)&&t>=0?t:void 0}function Gf(e){const t=new Map;for(const[n,r]of Object.entries(e.options??{}))t.set(n,{label:Kc(r)||n,title:Kc(r)||n});for(const[n,r]of Object.entries(e.selected??{}))t.has(n)||t.set(n,{label:Kc(r)||n,title:Kc(r)||n});return Array.from(t.entries()).map(([n,r])=>({value:n,label:r.label??n,title:r.title??n}))}function Kc(e){return e==null?"":e.plain?e.plain:e.text?e.text:(e.children??[]).map(t=>Kc(t)).join("")}function m_({client:e,path:t,method:n,parameters:r=[],initialValues:s={},lockedValues:i={},hideLocked:l=!1,enableLookup:u=n.toUpperCase()==="GET",autoSubmit:d=!1,submitLabel:f="Execute request",submittingLabel:p="Executing…",emptyMessage:h="This operation does not require input.",isSubmitting:x=!1,className:v,onSubmit:y}){const b=w.useMemo(()=>`${n}:${t}:${JSON.stringify(s)}:${JSON.stringify(i)}`,[s,i,n,t]),[j,S]=w.useState(()=>pg(r,n,i,s)),[N,k]=w.useState(""),T=d_(j,250),E=w.useRef(null),O=vn({queryKey:["filter-form-lookup",n,t,T],queryFn:async()=>{var U;return await((U=e.lookupFilters)==null?void 0:U.call(e,t,n,pi(T,r),{Accept:"application/json+clicky"}))??{filters:{}}},enabled:u&&!!e.lookupFilters&&r.some(U=>U.in==="query"),staleTime:3e4,retry:0}),M=w.useMemo(()=>F2(r,j,S,{lookup:O.data,lockedValues:i,hideLocked:l}),[l,i,O.data,r,j]),L=M.filters.length>0||M.timeRange!=null;async function F(U){U?.preventDefault();const z=r.filter(V=>V.required?(i[V.name]??j[V.name]??"").trim()==="":!1);if(z.length>0){k(`Missing required fields: ${z.map(V=>M0(V.name)).join(", ")}`);return}k(""),await y(Tl(j))}return w.useEffect(()=>{S(pg(r,n,i,s)),k(""),E.current=null},[b]),w.useEffect(()=>{if(!d||r.filter(X=>X.required?(i[X.name]??T[X.name]??"").trim()==="":!1).length>0)return;const z=Tl(T),V=JSON.stringify(z);E.current!==V&&(E.current=V,k(""),y(z))},[d,T,i,y,r]),o.jsxs("form",{className:"space-y-3",onSubmit:F,children:[L?o.jsx(mI,{autoSubmit:d,filters:M.filters,isSubmitting:x,submitLabel:f,submittingLabel:p,...M.timeRange?{timeRange:M.timeRange}:{},...v?{className:v}:{}}):o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:h}),o.jsx(Fe,{type:"button",onClick:F,disabled:x,children:x?p:f})]}),N&&o.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",children:N})]})}function mI({filters:e,timeRange:t,autoSubmit:n,isSubmitting:r,submitLabel:s,submittingLabel:i,className:l}){return o.jsxs("div",{className:R("space-y-3",l),children:[o.jsxs("div",{className:"divide-y divide-border border-y border-border",children:[e.map(u=>o.jsx(pI,{filter:u},u.key)),t&&o.jsx(xI,{timeRange:t})]}),!n&&o.jsx("div",{className:"flex justify-end",children:o.jsx(Fe,{type:"submit",disabled:r,children:r?i:s})})]})}function pI({filter:e}){const t=`clicky-param-${e.key.replace(/[^a-zA-Z0-9_-]/g,"-")}`;return o.jsxs("div",{title:e.description,className:R("grid grid-cols-1 gap-2 py-2 sm:grid-cols-[minmax(8rem,14rem)_minmax(0,1fr)] sm:items-center",e.disabled&&"opacity-60"),children:[o.jsx("label",{htmlFor:t,className:"text-sm font-medium text-muted-foreground",children:e.label}),o.jsx("div",{className:"min-w-0",children:hI(e,t)})]})}function hI(e,t){if(e.kind==="enum")return o.jsxs("select",{id:t,"aria-label":e.label,className:$c,value:e.value,disabled:e.disabled,onChange:n=>e.onChange(n.target.value),children:[o.jsx("option",{value:"",children:e.placeholder??""}),e.options.map(n=>o.jsx("option",{value:n.value,children:n.label??n.value},n.value))]});if(e.kind==="boolean")return o.jsx("div",{className:"flex h-8 items-center",children:o.jsx("input",{id:t,type:"checkbox","aria-label":e.label,className:"h-4 w-4 accent-primary disabled:cursor-not-allowed",checked:e.value,disabled:e.disabled,onChange:n=>e.onChange(n.target.checked)})});if(e.kind==="lookup"){const n=`${t}-options`;return o.jsxs(o.Fragment,{children:[o.jsx("input",{id:t,type:e.inputType==="number"?"number":"text","aria-label":e.label,className:$c,...e.placeholder!==void 0?{placeholder:e.placeholder}:{},value:e.value,list:n,disabled:e.disabled,onChange:r=>e.onChange(r.target.value)}),o.jsx("datalist",{id:n,children:e.options.map(r=>o.jsx("option",{value:r.value,label:r.label??r.value,disabled:r.disabled},r.value))})]})}if(e.kind==="lookup-multi"){const n=`${t}-options`;return o.jsxs(o.Fragment,{children:[o.jsx("input",{id:t,type:"text","aria-label":e.label,className:$c,...e.placeholder!==void 0?{placeholder:e.placeholder}:{},value:e.value.join(", "),list:n,disabled:e.disabled,onChange:r=>e.onChange(vI(r.target.value))}),o.jsx("datalist",{id:n,children:e.options.map(r=>o.jsx("option",{value:r.value,label:r.label??r.value,disabled:r.disabled},r.value))})]})}return e.kind==="multi"?o.jsx(gI,{filter:e,id:t}):e.kind==="text"?o.jsx("input",{id:t,type:"text","aria-label":e.label,className:$c,...e.placeholder!==void 0?{placeholder:e.placeholder}:{},value:e.value,disabled:e.disabled,onChange:n=>e.onChange(n.target.value)}):o.jsx("input",{id:t,type:"text","aria-label":e.label,className:$c,value:JSON.stringify(e.value),disabled:!0,readOnly:!0})}function gI({filter:e,id:t}){const[n,r]=w.useState(""),s=e.options.length>7,i=w.useMemo(()=>{const u=n.trim().toLowerCase();return u?e.options.filter(d=>ew(d).toLowerCase().includes(u)):e.options},[e.options,n]),l=(u,d)=>{if(e.disabled)return;const f={...e.value};d==="include"||d==="exclude"?f[u]=d:delete f[u],e.onChange(f)};return o.jsxs("div",{id:t,role:"group","aria-label":e.label,className:"rounded-md border border-input bg-background p-2",children:[s&&o.jsxs("label",{className:"mb-2 flex items-center gap-2 rounded-md border border-input bg-background px-2",children:[o.jsx(K,{icon:$s,className:"shrink-0 text-muted-foreground"}),o.jsx("input",{type:"search","aria-label":`Filter ${e.label} options`,className:"h-8 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",placeholder:`Filter ${e.label.toLowerCase()}`,value:n,disabled:e.disabled,onChange:u=>r(u.target.value)})]}),o.jsxs("div",{className:"max-h-56 space-y-1 overflow-auto",children:[i.map(u=>{const d=e.value[u.value]??"neutral";return o.jsx(Dl,{className:"w-full justify-between",label:u.label,mode:d,title:u.title??ew(u),togglePosition:"right",onModeChange:f=>l(u.value,f)},u.value)}),i.length===0&&o.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:"No options found"})]})]})}function ew(e){const t=typeof e.label=="string"?e.label:"";return[e.value,t,e.title??""].filter(Boolean).join(" ")}function xI({timeRange:e}){return o.jsxs("div",{className:"grid grid-cols-1 gap-2 py-2 sm:grid-cols-[minmax(8rem,14rem)_minmax(0,1fr)] sm:items-center",children:[o.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:"Time range"}),o.jsx("div",{className:"min-w-0",children:o.jsx(y2,{kind:e.timeEnabled?"time":"date",label:"Time range",align:"left",from:e.from??"",to:e.to??"",onApply:e.onApply,...e.presets?{presets:e.presets}:{},...e.timeEnabled!==void 0?{timeEnabled:e.timeEnabled}:{},...e.timeZone?{timeZone:e.timeZone}:{},...e.timeZones?{timeZones:e.timeZones}:{},...e.fromPlaceholder?{fromPlaceholder:e.fromPlaceholder}:{},...e.toPlaceholder?{toPlaceholder:e.toPlaceholder}:{}})})]})}function vI(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}const $c="h-8 w-full min-w-0 rounded-md border border-input bg-background px-2 text-sm text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring";function bI(e){return vn({queryKey:["openapi-spec"],queryFn:()=>e.getOpenAPISpec(),staleTime:300*1e3})}function _i(e){const{data:t,...n}=bI(e),r=[];if(t)for(const[s,i]of Object.entries(t.paths))for(const[l,u]of Object.entries(i))r.push({path:s,method:l,operation:u});return{operations:r,spec:t,...n}}function yI(e,t){const{operations:n,...r}=_i(e);return{operation:t?n.find(i=>i.operation.operationId===t):void 0,...r}}function wI({roots:e,className:t,empty:n,showControls:r,defaultOpenDepth:s=2,renderLabel:i,loadChildren:l,onNodeSelect:u,selectedId:d}){return o.jsx(Qu,{roots:e,getKey:f=>f.id,getChildren:f=>f.children,defaultOpen:(f,p)=>pf.expandable===!0}:{},renderRow:({node:f,loading:p,error:h})=>o.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2 font-mono text-xs",children:[i?i(f):o.jsx(_I,{node:f,selected:d!=null&&f.id===d,...u?{onSelect:u}:{}}),p&&o.jsx("span",{className:"shrink-0 text-muted-foreground",children:"…"}),h!=null&&o.jsx("span",{className:"break-all text-red-600",children:h instanceof Error?h.message:String(h)})]})})}function _I({node:e,onSelect:t,selected:n=!1}){const r=t?o.jsx("button",{type:"button",onClick:s=>{s.stopPropagation(),t(e)},title:"Select this path",className:R("rounded px-0.5 text-left text-muted-foreground hover:text-foreground hover:underline",n&&"bg-primary/15 text-foreground"),children:e.label}):o.jsx("span",{className:"text-muted-foreground",children:e.label});return o.jsxs(o.Fragment,{children:[r,e.type&&o.jsxs("span",{className:"text-muted-foreground/60",children:["@",e.type]}),e.value!=null?o.jsx("span",{className:"break-all text-foreground",children:String(e.value)}):e.raw&&!e.children?o.jsx("span",{className:"break-all italic text-muted-foreground/70",children:e.raw}):null]})}function jI({roots:e,className:t,empty:n,showControls:r,defaultOpenDepth:s=1,costThreshold:i,renderRow:l,loadChildren:u}){return o.jsx(Qu,{roots:e,getKey:d=>d.id,getChildren:d=>d.children,defaultOpen:(d,f)=>fd.expandable===!0}:{},renderRow:({node:d})=>l?l(d):o.jsx(kI,{node:d,costThreshold:i})})}function kI({node:e,costThreshold:t}){const n=t!=null&&e.cost!=null&&e.cost>=t;return o.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2 font-mono text-xs",children:[e.status&&o.jsx(SI,{status:e.status}),o.jsx("span",{className:"font-semibold text-foreground",children:e.label}),e.cost!=null&&o.jsx("span",{className:n?"text-red-600":"text-muted-foreground",children:NI(e)}),e.times!=null&&e.times>1&&o.jsxs("span",{className:"text-muted-foreground/60",children:["×",e.times]}),e.className&&o.jsxs("span",{className:"break-all text-muted-foreground/60",children:[e.className,e.lineNumber!=null&&e.lineNumber>0?`:${e.lineNumber}`:""]}),e.detail&&Object.entries(e.detail).map(([r,s])=>o.jsxs("span",{className:"text-muted-foreground/60",children:[r,"=",s]},r))]})}function NI(e){const t=e.unit||"ms",n=e.cost??0;return t==="ms"?`${n.toFixed(3)}ms`:`${n} ${t}`}const CI={ok:"text-green-600",success:"text-green-600",error:"text-red-600",warning:"text-amber-500",running:"text-blue-600",pending:"text-muted-foreground"};function SI({status:e}){return o.jsx("span",{className:`shrink-0 ${CI[e]??"text-muted-foreground"}`,title:e,children:"●"})}const EI=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M222 144v64a6 6 0 0 1-6 6H40a6 6 0 0 1-6-6v-64a6 6 0 0 1 12 0v58h164v-58a6 6 0 0 1 12 0m-98.24 4.24a6 6 0 0 0 8.48 0l40-40a6 6 0 0 0-8.48-8.48L134 129.51V32a6 6 0 0 0-12 0v97.51L92.24 99.76a6 6 0 0 0-8.48 8.48Z"})}),{__source:"ph:download-simple-light",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"download",displayName:"UiDownload"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 144v64a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8v-64a8 8 0 0 1 16 0v56h160v-56a8 8 0 0 1 16 0m-101.66 5.66a8 8 0 0 0 11.32 0l40-40A8 8 0 0 0 168 96h-32V32a8 8 0 0 0-16 0v64H88a8 8 0 0 0-5.66 13.66Z"})}),{__source:"ph:download-simple-fill",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"download",displayName:"UiDownloadFilled"});const TI={javascript:"js",typescript:"ts",tsx:"tsx",jsx:"jsx",python:"py",bash:"sh",shell:"sh",yaml:"yaml",json:"json",sql:"sql",java:"java",go:"go",html:"html",xml:"xml",css:"css"};function OI(e,t){const n=t&&TI[t.toLowerCase()]||"txt",r=new Blob([e],{type:"text/plain;charset=utf-8"}),s=URL.createObjectURL(r),i=document.createElement("a");i.href=s,i.download=`snippet.${n}`,i.click(),URL.revokeObjectURL(s)}function MI({source:e,language:t,copyable:n=!1,downloadable:r=!1,theme:s,onToggleTheme:i}){const[l,u]=w.useState(!1);if(!n&&!r&&!i)return null;const d=async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),1500)}catch(f){console.warn("clicky-ui: copy to clipboard failed",f)}};return o.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[i&&o.jsx("button",{type:"button","aria-label":s==="dark"?"Switch to light theme":"Switch to dark theme",title:"Toggle theme",onClick:i,className:"rounded p-1 hover:bg-accent hover:text-accent-foreground",children:o.jsx(K,{icon:s==="dark"?Yu:Xu,className:"size-3.5"})}),r&&o.jsx("button",{type:"button","aria-label":"Download code",title:"Download file",onClick:()=>OI(e,t),className:"rounded p-1 hover:bg-accent hover:text-accent-foreground",children:o.jsx(K,{icon:EI,className:"size-3.5"})}),n&&o.jsx("button",{type:"button","aria-label":l?"Copied":"Copy code",title:"Copy code",onClick:d,className:"rounded p-1 hover:bg-accent hover:text-accent-foreground",children:o.jsx(K,{icon:l?mr:sd,className:R("size-3.5",l&&"text-emerald-600")})})]})}function tw(e){return e===""?[]:(e.endsWith(` +`)?e.slice(0,-1):e).split(` +`)}function p_(e,t){const n=tw(e),r=tw(t),s=AI(n,r);return s.length>0?[{lines:s}]:[]}function AI(e,t){const n=e.length,r=t.length,s=r+1,i=new Int32Array((n+1)*s),l=(x,v)=>i[x*s+v];for(let x=n-1;x>=0;x--)for(let v=r-1;v>=0;v--)i[x*s+v]=e[x]===t[v]?l(x+1,v+1)+1:Math.max(l(x+1,v),l(x,v+1));const u=[];let d=0,f=0,p=1,h=1;for(;d=l(d,f+1)?(u.push({type:"remove",content:e[d],oldNumber:p++}),d++):(u.push({type:"add",content:t[f],newNumber:h++}),f++);for(;d{const[{createHighlighterCore:e},{createOnigurumaEngine:t}]=await Promise.all([Rt(()=>import("./core-3OglTz8x.js"),__vite__mapDeps([0,1,2,3,4,5])),Rt(()=>import("./engine-oniguruma-DwXy4luw.js"),[])]);return e({themes:[Rt(()=>import("./github-light-DAi9KRSo.js"),[]),Rt(()=>import("./github-dark-DHJKELXO.js"),[])],langs:[Rt(()=>import("./java-xI-RfyKK.js"),[]),Rt(()=>import("./go-B1SYOhNW.js"),[]),Rt(()=>import("./python-DhUJRlN_.js"),[]),Rt(()=>import("./javascript-ySlJ1b_l.js"),[]),Rt(()=>import("./typescript-Dj6nwHGl.js"),[]),Rt(()=>import("./tsx-B6W0miNI.js"),[]),Rt(()=>import("./jsx-BAng5TT0.js"),[]),Rt(()=>import("./json-BQoSv7ci.js"),[]),Rt(()=>import("./yaml-CVw76BM1.js"),[]),Rt(()=>import("./bash-atvbtKCR.js"),[]),Rt(()=>import("./sql-COK4E0Yg.js"),[]),Rt(()=>import("./xml-e3z08dGr.js"),__vite__mapDeps([6,7])),Rt(()=>import("./html-C2L_23MC.js"),__vite__mapDeps([8,9,10])),Rt(()=>import("./css-BPhBrDlE.js"),[])],engine:t(Rt(()=>import("./wasm-CG6Dc4jp.js"),[]))})})()),Zh}function FI(){return Wh??(Wh=Rt(()=>import("./index-q9STU_Ao.js"),__vite__mapDeps([11,2]))),Wh}function DI(e){if(!e)return;const t=e.slice(e.lastIndexOf("/")+1),n=t.lastIndexOf(".");if(!(n<=0))return t.slice(n+1).toLowerCase()}function g_(e){const t=e.toLowerCase();return PI.includes(t)?t:t==="shell"||t==="sh"||t==="zsh"?"bash":t==="ts"?"typescript":t==="js"?"javascript":t==="py"?"python":t==="yml"?"yaml":null}function x_(e){return e&&II.includes(e)?e:$I}async function v_(e,t){if(!e||!t.lang)return null;const n=g_(t.lang);if(!n)return null;try{return(await h_()).codeToHtml(e,{lang:n,theme:x_(t.theme),...t.transformers?{transformers:t.transformers}:{}})}catch{return null}}async function rw(e,t){if(!e||!t.lang)return null;const n=g_(t.lang);if(!n)return null;try{const r=await h_(),{tokens:s}=r.codeToTokens(e,{lang:n,theme:x_(t.theme)});return s.map(i=>i.map(l=>({content:l.content,...l.color?{color:l.color}:{},...l.fontStyle?{fontStyle:l.fontStyle}:{}})))}catch{return null}}const hg=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M104 34H64a14 14 0 0 0-14 14v160a14 14 0 0 0 14 14h40a14 14 0 0 0 14-14V48a14 14 0 0 0-14-14m2 174a2 2 0 0 1-2 2H64a2 2 0 0 1-2-2V48a2 2 0 0 1 2-2h40a2 2 0 0 1 2 2Zm86-174h-40a14 14 0 0 0-14 14v160a14 14 0 0 0 14 14h40a14 14 0 0 0 14-14V48a14 14 0 0 0-14-14m2 174a2 2 0 0 1-2 2h-40a2 2 0 0 1-2-2V48a2 2 0 0 1 2-2h40a2 2 0 0 1 2 2Z"})}),{__source:"ph:columns-light",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"columns",displayName:"UiColumns"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M120 48v160a16 16 0 0 1-16 16H64a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h40a16 16 0 0 1 16 16m72-16h-40a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h40a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16"})}),{__source:"ph:columns-fill",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"columns",displayName:"UiColumnsFilled"});const od=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m212.24 83.76l-56-56A6 6 0 0 0 152 26H56a14 14 0 0 0-14 14v176a14 14 0 0 0 14 14h144a14 14 0 0 0 14-14V88a6 6 0 0 0-1.76-4.24M158 46.48L193.52 82H158ZM200 218H56a2 2 0 0 1-2-2V40a2 2 0 0 1 2-2h90v50a6 6 0 0 0 6 6h50v122a2 2 0 0 1-2 2"})}),{__source:"ph:file-light",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"file",displayName:"UiFile"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m213.66 82.34l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v176a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V88a8 8 0 0 0-2.34-5.66M152 88V44l44 44Z"})}),{__source:"ph:file-fill",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"file",displayName:"UiFileFilled"});const BI=[{id:"unified",label:"Unified",icon:gm,title:"Unified view"},{id:"split",label:"Split",icon:hg,title:"Split view"}],b_={context:void 0,add:"bg-emerald-500/10",remove:"bg-rose-500/10"},UI={context:"text-muted-foreground",add:"text-emerald-700 [[data-theme=dark]_&]:text-emerald-300",remove:"text-rose-700 [[data-theme=dark]_&]:text-rose-300"},zI={context:"",add:"+",remove:"-"};function y_(e){const{language:t,view:n="unified",showLineNumbers:r=!0,bare:s=!1,className:i}=e,{unified:l,original:u,modified:d}=e,[f,p]=w.useState(n),h=w.useMemo(()=>l!==void 0?RI(l):p_(u??"",d??""),[l,u,d]),{oldSource:x,newSource:v}=w.useMemo(()=>VI(h),[h]),[y,b]=w.useState({old:null,mod:null});w.useEffect(()=>{if(!t){b({old:null,mod:null});return}let T=!1;return Promise.all([rw(x,{lang:t}),rw(v,{lang:t})]).then(([E,O])=>{T||b({old:E,mod:O})}),()=>{T=!0}},[t,x,v]);const j=w.useMemo(()=>HI(h,y.old,y.mod),[h,y]),S=new Set(j.map(T=>T.path).filter(T=>T!==void 0)).size>1;let N;const k=j.map((T,E)=>{const O=S&&T.path!==void 0&&T.path!==N?T.path:void 0;return N=T.path,o.jsxs(w.Fragment,{children:[O&&o.jsx(KI,{path:O}),f==="split"?o.jsx(WI,{hunk:T,showLineNumbers:r}):o.jsx(ZI,{hunk:T,showLineNumbers:r})]},E)});return s?o.jsx("div",{className:R("overflow-x-auto font-mono text-xs leading-relaxed",i),children:k}):o.jsxs("div",{className:R("overflow-hidden rounded-md border border-border bg-muted/40",i),children:[o.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border px-3 py-1.5",children:[o.jsx("span",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:t||"diff"}),o.jsx(Tr,{size:"sm","aria-label":"Diff view",value:f,onChange:p,options:BI})]}),o.jsx("div",{className:"overflow-x-auto font-mono text-xs leading-relaxed",children:k})]})}function VI(e){const t=[],n=[];for(const r of e)for(const s of r.lines)s.type!=="add"&&t.push(s.content),s.type!=="remove"&&n.push(s.content);return{oldSource:t.join(` +`),newSource:n.join(` +`)}}function HI(e,t,n){let r=0,s=0;return e.map(i=>({header:i.header,path:i.path,lines:i.lines.map(l=>{const u={line:l,oldTokens:l.type==="add"?void 0:t?.[r],newTokens:l.type==="remove"?void 0:n?.[s]};return l.type!=="add"&&(r+=1),l.type!=="remove"&&(s+=1),u})}))}function ZI({hunk:e,showLineNumbers:t}){return o.jsxs(o.Fragment,{children:[e.header&&o.jsx(w_,{header:e.header}),e.lines.map((n,r)=>{const{line:s}=n,i=s.type==="remove"?n.oldTokens:n.newTokens;return o.jsxs("div",{className:R("flex",b_[s.type]),"data-diff-line":s.type,children:[t&&o.jsxs(o.Fragment,{children:[o.jsx(gg,{value:s.oldNumber}),o.jsx(gg,{value:s.newNumber})]}),o.jsx(__,{type:s.type}),o.jsx("code",{className:"whitespace-pre pl-1 pr-3",children:o.jsx(j_,{tokens:i,content:s.content})})]},r)})]})}function WI({hunk:e,showLineNumbers:t}){const n=w.useMemo(()=>qI(e.lines),[e.lines]);return o.jsxs(o.Fragment,{children:[e.header&&o.jsx(w_,{header:e.header}),n.map((r,s)=>o.jsxs("div",{className:"flex",children:[o.jsx(sw,{resolved:r.left,side:"old",showLineNumbers:t}),o.jsx("span",{"aria-hidden":!0,className:"w-px shrink-0 bg-border"}),o.jsx(sw,{resolved:r.right,side:"new",showLineNumbers:t})]},s))]})}function qI(e){const t=[];let n=[],r=[];const s=()=>{const i=Math.max(n.length,r.length);for(let l=0;lo.jsx("span",{style:GI(n),children:n.content},r))})}function GI(e){const t={};e.color&&(t.color=e.color);const n=e.fontStyle??0;return n&1&&(t.fontStyle="italic"),n&2&&(t.fontWeight=700),n&4&&(t.textDecorationLine="underline"),t}function A0({data:e,name:t,depth:n=0,defaultOpenDepth:r=2}){const[s,i]=w.useState(n[h,p]):Object.entries(e),[d,f]=l?["[","]"]:["{","}"];return u.length===0?o.jsxs("span",{className:"text-muted-foreground",children:[d,f]}):o.jsxs("div",{className:"text-sm font-mono",style:{paddingLeft:n>0?"12px":"0"},children:[o.jsxs("span",{className:"cursor-pointer hover:bg-accent rounded px-0.5 select-none",onClick:()=>i(!s),children:[o.jsx("span",{className:"text-muted-foreground text-xs mr-1",children:s?"▼":"▶"}),t&&o.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:t}),t&&o.jsx("span",{className:"text-muted-foreground",children:": "}),!s&&o.jsxs("span",{className:"text-muted-foreground",children:[d," ",u.length," ",l?"items":"keys"," ",f]}),s&&o.jsx("span",{className:"text-muted-foreground",children:d})]}),s&&o.jsxs(o.Fragment,{children:[u.map(([p,h])=>o.jsx("div",{className:"pl-3 border-l border-border ml-1",children:typeof h=="object"&&h!==null?o.jsx(A0,{data:h,name:String(p),depth:n+1,defaultOpenDepth:r}):o.jsxs("div",{children:[o.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:l?"":String(p)}),!l&&o.jsx("span",{className:"text-muted-foreground",children:": "}),o.jsx(A0,{data:h,depth:n+1,defaultOpenDepth:r})]})},p)),o.jsx("span",{className:"text-muted-foreground",children:f})]})]})}function ow(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2?r-2:0),i=2;i1?n-1:0),s=1;s"u"?null:an(BigInt.prototype.toString),dw=typeof Symbol>"u"?null:an(Symbol.prototype.toString),Kn=an(Object.prototype.hasOwnProperty),Bc=an(Object.prototype.toString),kn=an(RegExp.prototype.test),zi=c$(TypeError);function an(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s2&&arguments[2]!==void 0?arguments[2]:Gc;if(iw&&iw(e,null),!ti(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const i=n(s);i!==s&&(t$(t)||(t[r]=i),s=i)}e[s]=!0}return e}function u$(e){for(let t=0;t/g),x$=On(/\${[\w\W]*/g),v$=On(/^data-[\-\w.\u00B7-\uFFFF]+$/),b$=On(/^aria-[\-\w]+$/),gw=On(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),y$=On(/^(?:\w+script|data):/i),w$=On(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_$=On(/^html$/i),j$=On(/^[a-z][.\w]*(-[.\w]+)+$/i),xw=On(/<[/\w!]/g),k$=On(/<[/\w]/g),N$=On(/<\/no(script|embed|frames)/i),C$=On(/\/>/i),Ss={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},S$=function(){return typeof window>"u"?null:window},E$=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},vw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Wo=function(t,n,r,s){return Kn(t,n)&&ti(t[n])?ct(s.base?qn(s.base):{},t[n],s.transform):r};function C_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:S$();const t=ce=>C_(ce);if(t.version="3.4.10",t.removed=[],!e||!e.document||e.document.nodeType!==Ss.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,s=r.currentScript;e.DocumentFragment;const i=e.HTMLTemplateElement,l=e.Node,u=e.Element,d=e.NodeFilter,f=e.NamedNodeMap;f===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const p=e.DOMParser,h=e.trustedTypes,x=u.prototype,v=Es(x,"cloneNode"),y=Es(x,"remove"),b=Es(x,"nextSibling"),j=Es(x,"childNodes"),S=Es(x,"parentNode"),N=Es(x,"shadowRoot"),k=Es(x,"attributes"),T=l&&l.prototype?Es(l.prototype,"nodeType"):null,E=l&&l.prototype?Es(l.prototype,"nodeName"):null;if(typeof i=="function"){const ce=n.createElement("template");ce.content&&ce.content.ownerDocument&&(n=ce.content.ownerDocument)}let O,M="",L,F=!1,U=0;const z=function(){if(U>0)throw zi('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},V=function(I){z(),U++;try{return O.createHTML(I)}finally{U--}},X=function(I){z(),U++;try{return O.createScriptURL(I)}finally{U--}},H=function(){return F||(L=E$(h,s),F=!0),L},B=n,W=B.implementation,se=B.createNodeIterator,P=B.createDocumentFragment,J=B.getElementsByTagName,ne=r.importNode;let $=vw();t.isSupported=typeof k_=="function"&&typeof S=="function"&&W&&W.createHTMLDocument!==void 0;const Q=h$,ae=g$,ie=x$,de=v$,ge=b$,ve=y$,Le=w$,je=j$;let Ue=gw,we=null;const ke=ct({},[...fw,...Kh,...Gh,...Jh,...mw]);let Ne=null;const xe=ct({},[...pw,...Qh,...hw,...Nf]);let Re=Object.seal(sl(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),et=null,Ve=null;const st=Object.seal(sl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ie=!0,_e=!0,be=!1,Ce=!0,Te=!1,Y=!0,Se=!1,Oe=!1,He=!1,at=!1,Et=!1,mt=!1,pt=!0,ln=!1;const gr="user-content-";let Gr=!0,gs=!1,qt={},jt=null;const tr=ct({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let xs=null;const tn=ct({},["audio","video","img","source","image","track"]);let Un=null;const nr=ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xr="http://www.w3.org/1998/Math/MathML",vs="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xhtml";let nn=ht,_o=!1,bs=null;const zs=ct({},[xr,vs,ht],qh),Jr=En(["mi","mo","mn","ms","mtext"]);let Vs=ct({},Jr);const Ar=En(["annotation-xml"]);let Hs=ct({},Ar);const kt=ct({},["title","style","font","a","script"]);let zn=null;const yn=["application/xhtml+xml","text/html"],ys="text/html";let yt=null,Lr=null;const ec=n.createElement("form"),Mn=function(I){return I instanceof RegExp||I instanceof Function},Qr=function(){let I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Lr&&Lr===I)return;(!I||typeof I!="object")&&(I={}),I=qn(I),zn=yn.indexOf(I.PARSER_MEDIA_TYPE)===-1?ys:I.PARSER_MEDIA_TYPE,yt=zn==="application/xhtml+xml"?qh:Gc,we=Wo(I,"ALLOWED_TAGS",ke,{transform:yt}),Ne=Wo(I,"ALLOWED_ATTR",xe,{transform:yt}),bs=Wo(I,"ALLOWED_NAMESPACES",zs,{transform:qh}),Un=Wo(I,"ADD_URI_SAFE_ATTR",nr,{transform:yt,base:nr}),xs=Wo(I,"ADD_DATA_URI_TAGS",tn,{transform:yt,base:tn}),jt=Wo(I,"FORBID_CONTENTS",tr,{transform:yt}),et=Wo(I,"FORBID_TAGS",qn({}),{transform:yt}),Ve=Wo(I,"FORBID_ATTR",qn({}),{transform:yt}),qt=Kn(I,"USE_PROFILES")?I.USE_PROFILES&&typeof I.USE_PROFILES=="object"?qn(I.USE_PROFILES):I.USE_PROFILES:!1,Ie=I.ALLOW_ARIA_ATTR!==!1,_e=I.ALLOW_DATA_ATTR!==!1,be=I.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=I.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=I.SAFE_FOR_TEMPLATES||!1,Y=I.SAFE_FOR_XML!==!1,Se=I.WHOLE_DOCUMENT||!1,at=I.RETURN_DOM||!1,Et=I.RETURN_DOM_FRAGMENT||!1,mt=I.RETURN_TRUSTED_TYPE||!1,He=I.FORCE_BODY||!1,pt=I.SANITIZE_DOM!==!1,ln=I.SANITIZE_NAMED_PROPS||!1,Gr=I.KEEP_CONTENT!==!1,gs=I.IN_PLACE||!1,Ue=f$(I.ALLOWED_URI_REGEXP)?I.ALLOWED_URI_REGEXP:gw,nn=typeof I.NAMESPACE=="string"?I.NAMESPACE:ht,Vs=Kn(I,"MATHML_TEXT_INTEGRATION_POINTS")&&I.MATHML_TEXT_INTEGRATION_POINTS&&typeof I.MATHML_TEXT_INTEGRATION_POINTS=="object"?qn(I.MATHML_TEXT_INTEGRATION_POINTS):ct({},Jr),Hs=Kn(I,"HTML_INTEGRATION_POINTS")&&I.HTML_INTEGRATION_POINTS&&typeof I.HTML_INTEGRATION_POINTS=="object"?qn(I.HTML_INTEGRATION_POINTS):ct({},Ar);const G=Kn(I,"CUSTOM_ELEMENT_HANDLING")&&I.CUSTOM_ELEMENT_HANDLING&&typeof I.CUSTOM_ELEMENT_HANDLING=="object"?qn(I.CUSTOM_ELEMENT_HANDLING):sl(null);if(Re=sl(null),Kn(G,"tagNameCheck")&&Mn(G.tagNameCheck)&&(Re.tagNameCheck=G.tagNameCheck),Kn(G,"attributeNameCheck")&&Mn(G.attributeNameCheck)&&(Re.attributeNameCheck=G.attributeNameCheck),Kn(G,"allowCustomizedBuiltInElements")&&typeof G.allowCustomizedBuiltInElements=="boolean"&&(Re.allowCustomizedBuiltInElements=G.allowCustomizedBuiltInElements),On(Re),Te&&(_e=!1),Et&&(at=!0),qt&&(we=ct({},mw),Ne=sl(null),qt.html===!0&&(ct(we,fw),ct(Ne,pw)),qt.svg===!0&&(ct(we,Kh),ct(Ne,Qh),ct(Ne,Nf)),qt.svgFilters===!0&&(ct(we,Gh),ct(Ne,Qh),ct(Ne,Nf)),qt.mathMl===!0&&(ct(we,Jh),ct(Ne,hw),ct(Ne,Nf))),st.tagCheck=null,st.attributeCheck=null,Kn(I,"ADD_TAGS")&&(typeof I.ADD_TAGS=="function"?st.tagCheck=I.ADD_TAGS:ti(I.ADD_TAGS)&&(we===ke&&(we=qn(we)),ct(we,I.ADD_TAGS,yt))),Kn(I,"ADD_ATTR")&&(typeof I.ADD_ATTR=="function"?st.attributeCheck=I.ADD_ATTR:ti(I.ADD_ATTR)&&(Ne===xe&&(Ne=qn(Ne)),ct(Ne,I.ADD_ATTR,yt))),Kn(I,"ADD_URI_SAFE_ATTR")&&ti(I.ADD_URI_SAFE_ATTR)&&ct(Un,I.ADD_URI_SAFE_ATTR,yt),Kn(I,"FORBID_CONTENTS")&&ti(I.FORBID_CONTENTS)&&(jt===tr&&(jt=qn(jt)),ct(jt,I.FORBID_CONTENTS,yt)),Kn(I,"ADD_FORBID_CONTENTS")&&ti(I.ADD_FORBID_CONTENTS)&&(jt===tr&&(jt=qn(jt)),ct(jt,I.ADD_FORBID_CONTENTS,yt)),Gr&&(we["#text"]=!0),Se&&ct(we,["html","head","body"]),we.table&&(ct(we,["tbody"]),delete et.tbody),I.TRUSTED_TYPES_POLICY){if(typeof I.TRUSTED_TYPES_POLICY.createHTML!="function")throw zi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof I.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const fe=O;O=I.TRUSTED_TYPES_POLICY;try{M=V("")}catch(ue){throw O=fe,ue}}else I.TRUSTED_TYPES_POLICY===null?(O=void 0,M=""):(O===void 0&&(O=H()),O&&typeof M=="string"&&(M=V("")));($.uponSanitizeElement.length>0||$.uponSanitizeAttribute.length>0)&&we===ke&&(we=qn(we)),$.uponSanitizeAttribute.length>0&&Ne===xe&&(Ne=qn(Ne)),En&&En(I),Lr=I},Ni=ct({},[...Kh,...Gh,...m$]),Yr=ct({},[...Jh,...p$]),wa=function(I,G,fe){return G.namespaceURI===ht?I==="svg":G.namespaceURI===xr?I==="svg"&&(fe==="annotation-xml"||Vs[fe]):!!Ni[I]},_a=function(I,G,fe){return G.namespaceURI===ht?I==="math":G.namespaceURI===vs?I==="math"&&Hs[fe]:!!Yr[I]},ja=function(I,G,fe){return G.namespaceURI===vs&&!Hs[fe]||G.namespaceURI===xr&&!Vs[fe]?!1:!Yr[I]&&(kt[I]||!Ni[I])},ka=function(I){let G=S(I);(!G||!G.tagName)&&(G={namespaceURI:nn,tagName:"template"});const fe=Gc(I.tagName),ue=Gc(G.tagName);return bs[I.namespaceURI]?I.namespaceURI===vs?wa(fe,G,ue):I.namespaceURI===xr?_a(fe,G,ue):I.namespaceURI===ht?ja(fe,G,ue):!!(zn==="application/xhtml+xml"&&bs[I.namespaceURI]):!1},Rr=function(I){Ga(t.removed,{element:I});try{S(I).removeChild(I)}catch{if(y(I),!S(I))throw zi("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Na=function(I){const G=j(I);if(G){const ue=[];Fc(G,We=>{Ga(ue,We)}),Fc(ue,We=>{try{y(We)}catch{}})}const fe=k(I);if(fe)for(let ue=fe.length-1;ue>=0;--ue){const We=fe[ue],Ze=We&&We.name;if(typeof Ze=="string")try{I.removeAttribute(Ze)}catch{}}},ot=function(I,G){try{Ga(t.removed,{attribute:G.getAttributeNode(I),from:G})}catch{Ga(t.removed,{attribute:null,from:G})}if(G.removeAttribute(I),I==="is")if(at||Et)try{Rr(G)}catch{}else try{G.setAttribute(I,"")}catch{}},Zs=function(I){const G=k(I);if(G)for(let fe=G.length-1;fe>=0;--fe){const ue=G[fe],We=ue&&ue.name;if(!(typeof We!="string"||Ne[yt(We)]))try{I.removeAttribute(We)}catch{}}},Ci=function(I){const G=[I];for(;G.length>0;){const fe=G.pop();(T?T(fe):fe.nodeType)===Ss.element&&Zs(fe);const We=j(fe);if(We)for(let Ze=We.length-1;Ze>=0;--Ze)G.push(We[Ze])}},ws=function(I){let G=null,fe=null;if(He)I=""+I;else{const Ze=lw(I,/^[\r\n\t ]+/);fe=Ze&&Ze[0]}zn==="application/xhtml+xml"&&nn===ht&&(I=''+I+"");const ue=O?V(I):I;if(nn===ht)try{G=new p().parseFromString(ue,zn)}catch{}if(!G||!G.documentElement){G=W.createDocument(nn,"template",null);try{G.documentElement.innerHTML=_o?M:ue}catch{}}const We=G.body||G.documentElement;return I&&fe&&We.insertBefore(n.createTextNode(fe),We.childNodes[0]||null),nn===ht?J.call(G,Se?"html":"body")[0]:Se?G.documentElement:We},vr=function(I){return se.call(I.ownerDocument||I,I,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Ws=function(I){return I=Dc(I,Q," "),I=Dc(I,ae," "),I=Dc(I,ie," "),I},qs=function(I){var G;I.normalize();const fe=se.call(I.ownerDocument||I,I,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let ue=fe.nextNode();for(;ue;)ue.data=Ws(ue.data),ue=fe.nextNode();const We=(G=I.querySelectorAll)===null||G===void 0?void 0:G.call(I,"template");We&&Fc(We,Ze=>{cn(Ze.content)&&qs(Ze.content)})},rr=function(I){const G=E?E(I):null;return typeof G!="string"||yt(G)!=="form"?!1:typeof I.nodeName!="string"||typeof I.textContent!="string"||typeof I.removeChild!="function"||I.attributes!==k(I)||typeof I.removeAttribute!="function"||typeof I.setAttribute!="function"||typeof I.namespaceURI!="string"||typeof I.insertBefore!="function"||typeof I.hasChildNodes!="function"||I.nodeType!==T(I)||I.childNodes!==j(I)},cn=function(I){if(!T||typeof I!="object"||I===null)return!1;try{return T(I)===Ss.documentFragment}catch{return!1}},Xr=function(I){if(!T||typeof I!="object"||I===null)return!1;try{return typeof T(I)=="number"}catch{return!1}};function Bt(ce,I,G){ce.length!==0&&Fc(ce,fe=>{fe.call(t,I,G,Lr)})}const tc=function(I,G){return!!(Y&&I.hasChildNodes()&&!Xr(I.firstElementChild)&&kn(xw,I.textContent)&&kn(xw,I.innerHTML)||Y&&I.namespaceURI===ht&&G==="style"&&Xr(I.firstElementChild)||I.nodeType===Ss.processingInstruction||Y&&I.nodeType===Ss.comment&&kn(k$,I.data))},nc=function(I,G){if(!et[G]&&_s(G)&&(Re.tagNameCheck instanceof RegExp&&kn(Re.tagNameCheck,G)||Re.tagNameCheck instanceof Function&&Re.tagNameCheck(G)))return!1;if(Gr&&!jt[G]){const fe=S(I),ue=j(I);if(ue&&fe){const We=ue.length;for(let Ze=We-1;Ze>=0;--Ze){const gt=gs?ue[Ze]:v(ue[Ze],!0);fe.insertBefore(gt,b(I))}}}return Rr(I),!0},Ca=function(I){if(Bt($.beforeSanitizeElements,I,null),rr(I))return Rr(I),!0;const G=yt(E?E(I):I.nodeName);if(Bt($.uponSanitizeElement,I,{tagName:G,allowedTags:we}),tc(I,G))return Rr(I),!0;if(et[G]||!(st.tagCheck instanceof Function&&st.tagCheck(G))&&!we[G])return nc(I,G);if((T?T(I):I.nodeType)===Ss.element&&!ka(I)||(G==="noscript"||G==="noembed"||G==="noframes")&&kn(N$,I.innerHTML))return Rr(I),!0;if(Te&&I.nodeType===Ss.text){const ue=Ws(I.textContent);I.textContent!==ue&&(Ga(t.removed,{element:I.cloneNode()}),I.textContent=ue)}return Bt($.afterSanitizeElements,I,null),!1},Ks=function(I,G,fe){if(Ve[G]||pt&&(G==="id"||G==="name")&&(fe in n||fe in ec))return!1;const ue=Ne[G]||st.attributeCheck instanceof Function&&st.attributeCheck(G,I);if(!(_e&&kn(de,G))){if(!(Ie&&kn(ge,G))){if(ue){if(!Un[G]){if(!kn(Ue,Dc(fe,Le,""))){if(!((G==="src"||G==="xlink:href"||G==="href")&&I!=="script"&&cw(fe,"data:")===0&&xs[I])){if(!(be&&!kn(ve,Dc(fe,Le,"")))){if(fe)return!1}}}}}else if(!(_s(I)&&(Re.tagNameCheck instanceof RegExp&&kn(Re.tagNameCheck,I)||Re.tagNameCheck instanceof Function&&Re.tagNameCheck(I))&&(Re.attributeNameCheck instanceof RegExp&&kn(Re.attributeNameCheck,G)||Re.attributeNameCheck instanceof Function&&Re.attributeNameCheck(G,I))||G==="is"&&Re.allowCustomizedBuiltInElements&&(Re.tagNameCheck instanceof RegExp&&kn(Re.tagNameCheck,fe)||Re.tagNameCheck instanceof Function&&Re.tagNameCheck(fe))))return!1}}return!0},jo=ct({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),_s=function(I){return!jo[Gc(I)]&&kn(je,I)},te=function(I,G,fe,ue){if(O&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!fe)switch(h.getAttributeType(I,G)){case"TrustedHTML":return V(ue);case"TrustedScriptURL":return X(ue)}return ue},Me=function(I,G,fe,ue){try{fe?I.setAttributeNS(fe,G,ue):I.setAttribute(G,ue),rr(I)?Rr(I):aw(t.removed)}catch{ot(G,I)}},Qe=function(I){Bt($.beforeSanitizeAttributes,I,null);const G=I.attributes;if(!G||rr(I))return;const fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let ue=G.length;const We=yt(I.nodeName);for(;ue--;){const Ze=G[ue],gt=Ze.name,$t=Ze.namespaceURI,An=Ze.value,wn=yt(gt),Si=An;let rn=gt==="value"?Si:i$(Si);if(fe.attrName=wn,fe.attrValue=rn,fe.keepAttr=!0,fe.forceKeepAttr=void 0,Bt($.uponSanitizeAttribute,I,fe),rn=fe.attrValue,ln&&(wn==="id"||wn==="name")&&cw(rn,gr)!==0&&(ot(gt,I),rn=gr+rn),Y&&kn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,rn)){ot(gt,I);continue}if(wn==="attributename"&&lw(rn,"href")){ot(gt,I);continue}if(!fe.forceKeepAttr){if(!fe.keepAttr){ot(gt,I);continue}if(!Ce&&kn(C$,rn)){ot(gt,I);continue}if(Te&&(rn=Ws(rn)),!Ks(We,wn,rn)){ot(gt,I);continue}rn=te(We,wn,$t,rn),rn!==Si&&Me(I,gt,$t,rn)}}Bt($.afterSanitizeAttributes,I,null)},Xe=function(I){let G=null;const fe=vr(I);for(Bt($.beforeSanitizeShadowDOM,I,null);G=fe.nextNode();)if(Bt($.uponSanitizeShadowNode,G,null),Ca(G),Qe(G),cn(G.content)&&Xe(G.content),(T?T(G):G.nodeType)===Ss.element){const We=N(G);cn(We)&&(Je(We),Xe(We))}Bt($.afterSanitizeShadowDOM,I,null)},Je=function(I){const G=[{node:I,shadow:null}];for(;G.length>0;){const fe=G.pop();if(fe.shadow){Xe(fe.shadow);continue}const ue=fe.node,Ze=(T?T(ue):ue.nodeType)===Ss.element,gt=j(ue);if(gt)for(let $t=gt.length-1;$t>=0;--$t)G.push({node:gt[$t],shadow:null});if(Ze){const $t=E?E(ue):null;if(typeof $t=="string"&&yt($t)==="template"){const An=ue.content;cn(An)&&G.push({node:An,shadow:null})}}if(Ze){const $t=N(ue);cn($t)&&G.push({node:null,shadow:$t},{node:$t,shadow:null})}}};return t.sanitize=function(ce){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},G=null,fe=null,ue=null,We=null;if(_o=!ce,_o&&(ce=""),typeof ce!="string"&&!Xr(ce)&&(ce=d$(ce),typeof ce!="string"))throw zi("dirty is not a string, aborting");if(!t.isSupported)return ce;Oe||Qr(I),t.removed=[];const Ze=gs&&typeof ce!="string"&&Xr(ce);if(Ze){const An=E?E(ce):ce.nodeName;if(typeof An=="string"){const wn=yt(An);if(!we[wn]||et[wn])throw zi("root node is forbidden and cannot be sanitized in-place")}if(rr(ce))throw zi("root node is clobbered and cannot be sanitized in-place");try{Je(ce)}catch(wn){throw Na(ce),wn}}else if(Xr(ce))G=ws(""),fe=G.ownerDocument.importNode(ce,!0),fe.nodeType===Ss.element&&fe.nodeName==="BODY"||fe.nodeName==="HTML"?G=fe:G.appendChild(fe),Je(fe);else{if(!at&&!Te&&!Se&&ce.indexOf("<")===-1)return O&&mt?V(ce):ce;if(G=ws(ce),!G)return at?null:mt?M:""}G&&He&&Rr(G.firstChild);const gt=vr(Ze?ce:G);try{for(;ue=gt.nextNode();)Ca(ue),Qe(ue),cn(ue.content)&&Xe(ue.content)}catch(An){throw Ze&&Na(ce),An}if(Ze)return Fc(t.removed,An=>{An.element&&Ci(An.element)}),Te&&qs(ce),ce;if(at){if(Te&&qs(G),Et)for(We=P.call(G.ownerDocument);G.firstChild;)We.appendChild(G.firstChild);else We=G;return(Ne.shadowroot||Ne.shadowrootmode)&&(We=ne.call(r,We,!0)),We}let $t=Se?G.outerHTML:G.innerHTML;return Se&&we["!doctype"]&&G.ownerDocument&&G.ownerDocument.doctype&&G.ownerDocument.doctype.name&&kn(_$,G.ownerDocument.doctype.name)&&($t=" +`+$t),Te&&($t=Ws($t)),O&&mt?V($t):$t},t.setConfig=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qr(ce),Oe=!0},t.clearConfig=function(){Lr=null,Oe=!1,O=L,M=""},t.isValidAttribute=function(ce,I,G){Lr||Qr({});const fe=yt(ce),ue=yt(I);return Ks(fe,ue,G)},t.addHook=function(ce,I){typeof I=="function"&&Ga($[ce],I)},t.removeHook=function(ce,I){if(I!==void 0){const G=s$($[ce],I);return G===-1?void 0:o$($[ce],G,1)[0]}return aw($[ce])},t.removeHooks=function(ce){$[ce]=[]},t.removeAllHooks=function(){$=vw()},t}var T$=C_();function D2(e){return!e||typeof window>"u"?"":T$.sanitize(e,{USE_PROFILES:{html:!0}})}function O$(e){return/<(div|p|pre|table|ul|ol|li|details|blockquote|h[1-6])/i.test(e)}function fs({language:e,source:t="",highlightedHtml:n,className:r,jsonDefaultOpenDepth:s=2,bare:i=!1,copyable:l=!1,downloadable:u=!1,themeToggle:d=!1,diff:f,diffView:p}){const h=(e??"").toLowerCase().replace(/^\.+/,""),x=n?D2(n):"",v=w.useMemo(()=>h==="json"?M$(t):L0,[h,t]),y=P8(),[b,j]=w.useState(null),S=b??y,[N,k]=w.useState(null),T=!x&&!!h&&!!t;w.useEffect(()=>{if(!T){k(null);return}let U=!1;return v_(t,{lang:h,theme:S==="dark"?"github-dark":"github-light"}).then(V=>{U||k(V)}),()=>{U=!0}},[T,h,t,S]);const E=o.jsx(MI,{source:t,language:e,copyable:l,downloadable:u,theme:S,...d?{onToggleTheme:()=>j(S==="dark"?"light":"dark")}:{}}),O=b?{"data-theme":b}:{};if(f)return o.jsx(y_,{language:e,view:p,bare:i,className:r,...f});if(v!==L0){const U=o.jsx(A0,{data:v,defaultOpenDepth:s});return i?o.jsx("div",{className:R("overflow-auto text-xs",r),children:U}):o.jsxs("div",{className:R("overflow-hidden rounded-md border border-border bg-muted/40",r),...O,children:[o.jsx(bw,{label:"json",actions:E}),o.jsx("div",{className:"overflow-auto p-3 text-xs",children:U})]})}const M=h==="xml"||h==="xslt"||h==="html"?" [&_.chroma_.nt]:text-pink-700 [&_.chroma_.nt]:dark:text-pink-300 [&_.chroma_.nt]:font-semibold [&_.chroma_.na]:text-amber-700 [&_.chroma_.na]:dark:text-amber-300 [&_.chroma_.s]:text-emerald-700 [&_.chroma_.s]:dark:text-emerald-300 [&_.chroma_.c]:text-slate-500 [&_.chroma_.c]:italic [&_.chroma_.cp]:text-slate-500 [&_.chroma_.cp]:italic [&_pre]:leading-relaxed":"",L=i?void 0:"p-3",F=x?o.jsx("div",{className:R("overflow-auto text-xs font-mono [&_.chroma]:bg-transparent [&_pre]:m-0 [&_pre]:whitespace-pre-wrap [&_pre]:bg-transparent"+M,L,i&&r),dangerouslySetInnerHTML:{__html:x}}):N?o.jsx("div",{className:R("overflow-auto text-xs font-mono [&_pre]:m-0 [&_pre.shiki]:!bg-transparent [&_pre]:whitespace-pre-wrap",L,i&&r),dangerouslySetInnerHTML:{__html:N}}):o.jsx("pre",{className:R("overflow-auto whitespace-pre-wrap break-words text-xs font-mono text-foreground",L,i&&r),children:t});return i?F:o.jsxs("div",{className:R("overflow-hidden rounded-md border border-border bg-muted/40",r),...O,children:[o.jsx(bw,{label:e||"text",actions:E}),F]})}function bw({label:e,actions:t}){return o.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border px-3 py-1.5",children:[o.jsx("span",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:e}),t]})}const L0=Symbol("json-parse-failed");function M$(e){const t=e.trim();if(!t)return L0;try{return JSON.parse(t)}catch{return L0}}const A$=/^\s*at\s+([\w$.]+)\.([\w$<>]+)\(([^)]+)\)/,L$=/^([\w.$]+(?:Exception|Error|Throwable))(?::\s*(.*))?$/,R$=/^\.\.\.\s+\d+\s+more$/,P$=["java.","javax.","sun.","jdk.","com.sun.","oracle.jrockit."];function I$(e){const t={causedBy:[],frames:[],language:"java"};if(!e||!e.trim())return t;const n=[];for(const r of e.split(` +`)){const s=r.trim();if(!s||R$.test(s))continue;const i=A$.exec(r);if(i&&i[1]&&i[2]&&i[3]!==void 0){t.frames.push($$(i[1],i[2],i[3]));continue}if(s.startsWith("Caused by:")){t.causedBy.push(s.slice(10).trim());continue}if(s.startsWith("Internal Exception:")){t.causedBy.push(s.slice(19).trim());continue}if(!t.exceptionClass){const l=L$.exec(s);if(l&&l[1]){t.exceptionClass=l[1],l[2]&&(t.message=l[2]);continue}}n.push(s)}return!t.message&&n.length>0&&(t.message=n.join(" ")),t}function $$(e,t,n){const r=n.trim();let s,i,l=!1;if(r==="Native Method")l=!0;else if(r!=="Unknown Source"){const p=(r.split(" ~[")[0]??r).trim(),h=p.lastIndexOf(":");if(h>=0){s=p.slice(0,h);const x=Number(p.slice(h+1));Number.isFinite(x)&&(i=x)}else s=p}const u=`${e}.${t}`,d=s?i?`${s}:${i}`:s:l?"Native Method":void 0,f={functionName:u,displayName:F$(e,t),kind:"frame",runtime:P$.some(p=>e.startsWith(p)),nativeMethod:l,class:e,method:t};return s!==void 0&&(f.file=s),i!==void 0&&(f.line=i),d!==void 0&&(f.location=d),f}function F$(e,t){const n=e.split(".");return`${n[n.length-1]??e}.${t}`}const D$=Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#dc2626",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 32 32",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M31.86 29.023 16.554 2.516c-.23-.395-.88-.395-1.11 0L.085 29.12a.639.639 0 0 0 .556.957h30.73c.356 0 .64-.281.64-.637 0-.156-.054-.3-.152-.418M15.035 12.328c0-.137.094-.226.23-.226h1.47c.136 0 .226.09.226.226v9.258c0 .137-.09.23-.227.23h-1.468a.21.21 0 0 1-.168-.066.212.212 0 0 1-.063-.164Zm1.977 13.23c0 .141-.094.231-.23.231h-1.563c-.137 0-.227-.094-.227-.23v-1.676c0-.137.094-.227.227-.227h1.562c.14 0 .23.09.23.227Zm0 0"})})},{__source:"incumbent",__viewBox:"0 0 32 32",__group:"health-status",__consumerName:"error",__defaultColor:"#dc2626",displayName:"UiError"}),B$=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M10 8a2 2 0 1 1-4 0a2 2 0 0 1 4 0"})}),{__source:"codicon:debug-stackframe-dot",__viewBox:"0 0 16 16",__group:"ui-controls",__consumerName:"stack-frame-dot",displayName:"UiStackFrameDot"}),B2=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M152 98h-48a6 6 0 0 0-6 6v48a6 6 0 0 0 6 6h48a6 6 0 0 0 6-6v-48a6 6 0 0 0-6-6m-6 48h-36v-36h36Zm86 0h-18v-36h18a6 6 0 0 0 0-12h-18V56a14 14 0 0 0-14-14h-42V24a6 6 0 0 0-12 0v18h-36V24a6 6 0 0 0-12 0v18H56a14 14 0 0 0-14 14v42H24a6 6 0 0 0 0 12h18v36H24a6 6 0 0 0 0 12h18v42a14 14 0 0 0 14 14h42v18a6 6 0 0 0 12 0v-18h36v18a6 6 0 0 0 12 0v-18h42a14 14 0 0 0 14-14v-42h18a6 6 0 0 0 0-12m-30 54a2 2 0 0 1-2 2H56a2 2 0 0 1-2-2V56a2 2 0 0 1 2-2h144a2 2 0 0 1 2 2Z"})}),{__source:"ph:cpu-light",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"chip",displayName:"UiChip"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M104 104h48v48h-48Zm136 48a8 8 0 0 1-8 8h-16v40a16 16 0 0 1-16 16h-40v16a8 8 0 0 1-16 0v-16h-32v16a8 8 0 0 1-16 0v-16H56a16 16 0 0 1-16-16v-40H24a8 8 0 0 1 0-16h16v-32H24a8 8 0 0 1 0-16h16V56a16 16 0 0 1 16-16h40V24a8 8 0 0 1 16 0v16h32V24a8 8 0 0 1 16 0v16h40a16 16 0 0 1 16 16v40h16a8 8 0 0 1 0 16h-16v32h16a8 8 0 0 1 8 8m-72-56a8 8 0 0 0-8-8H96a8 8 0 0 0-8 8v64a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8Z"})}),{__source:"ph:cpu-fill",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"chip",displayName:"UiChipFilled"});const U$=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M10 13c0 1.103-.897 2-2 2s-2-.897-2-2s.897-2 2-2s2 .897 2 2m3.25-11a.75.75 0 0 0-.75.75v1.277A5.98 5.98 0 0 0 8 2C5.033 2 2.48 4.211 2.06 7.144a.75.75 0 0 0 1.487.213C3.86 5.159 5.776 3.501 8 3.501c1.529 0 2.919.763 3.743 2H9.75a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 .75-.75v-3.5a.75.75 0 0 0-.75-.75z"})}),{__source:"codicon:debug-step-over",__viewBox:"0 0 16 16",__group:"ui-controls",__consumerName:"debug-step-over",displayName:"UiDebugStepOver"}),z$=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",children:[o.jsx("circle",{cx:"8",cy:"8",r:"6.5",fill:"#FFF7F7",stroke:"#DB3B4B"}),o.jsx("path",{d:"M10.0657 5.24573C9.25361 5.24573 8.636 5.6473 8.29593 6.31537C8.00368 5.64257 7.40552 5.24573 6.6071 5.24573C5.84915 5.24573 5.28147 5.60946 4.96189 6.24862V5.37188H4V10.7543H4.99869V7.59001C4.99869 6.68068 5.5138 6.10775 6.32852 6.10775C7.0749 6.10775 7.50591 6.61761 7.50591 7.43758V10.7543H8.49409V7.59001C8.49409 6.68068 9.01971 6.10775 9.82392 6.10775C10.5756 6.10775 11.0013 6.61761 11.0013 7.43758V10.7543H12V7.35874C12 6.07096 11.2168 5.24573 10.0657 5.24573Z",fill:"#DB3B4B"})]})}),{__source:"jb-expui-nodes:method",__viewBox:"0 0 16 16",__group:"uir-ast-code",__consumerName:"uir-method",displayName:"UiMethod"});function V$({input:e,language:t="java",resolver:n,contextLines:r=3,hideRuntimeOnly:s=!1,include:i,exclude:l,className:u}){const d=w.useMemo(()=>typeof e=="string"?I$(e):e,[e,t]),f=w.useMemo(()=>n?d.frames.map(x=>{if(x.sourceLines&&x.sourceLines.length>0)return x;const v=n(x,r);if(!v)return x;const y={...x,sourceLines:v.lines,sourceStartLine:v.startLine};return v.language!==void 0&&(y.sourceLanguage=v.language),y}):d.frames,[d.frames,n,r]),p=w.useMemo(()=>f.filter(x=>s&&x.runtime||l&&l.some(v=>{var y;return(y=x.class)==null?void 0:y.startsWith(v)})?!1:i&&i.length>0?i.some(v=>{var y;return(y=x.class)==null?void 0:y.startsWith(v)}):!0),[f,s,i,l]);if(p.length===0&&!d.exceptionClass)return null;const h=p.length!==f.length;return o.jsxs("div",{className:["overflow-hidden rounded-md border border-border bg-background text-foreground",u].filter(Boolean).join(" "),children:[(d.exceptionClass||d.message)&&o.jsx("div",{className:"border-b border-border bg-red-500/5 px-3 py-2",children:o.jsxs("div",{className:"flex min-w-0 items-start gap-2",children:[o.jsx(K,{icon:D$,className:"mt-0.5 shrink-0 text-sm text-red-600 dark:text-red-400"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[d.exceptionClass&&o.jsx("div",{className:"break-all font-mono text-xs font-semibold text-red-700 dark:text-red-300",children:d.exceptionClass}),d.message&&o.jsx("div",{className:"mt-0.5 whitespace-pre-wrap break-words text-xs text-foreground",children:d.message})]})]})}),d.causedBy.length>0&&o.jsx("div",{className:"space-y-1 border-b border-border bg-orange-500/5 px-3 py-2",children:d.causedBy.map((x,v)=>o.jsxs("div",{className:"flex min-w-0 items-start gap-2 font-mono text-[11px] text-orange-700 dark:text-orange-300",children:[o.jsx(K,{icon:B$,className:"mt-0.5 shrink-0 text-xs"}),o.jsx("span",{className:"shrink-0 opacity-75",children:"Caused by"}),o.jsx("span",{className:"min-w-0 break-all",children:x})]},v))}),o.jsx("div",{className:"divide-y divide-border/60",children:p.map((x,v)=>o.jsx(H$,{frame:x,index:v},`${x.functionName}-${v}`))}),h&&o.jsxs("div",{className:"border-t border-border bg-muted/30 px-3 py-1.5 text-[11px] text-muted-foreground",children:["Showing ",p.length," of ",f.length," frames"]})]})}function H$({frame:e,index:t}){const n=e.sourceLines&&e.sourceLines.length>0;return o.jsxs("div",{className:n?"bg-amber-500/[0.03]":void 0,children:[o.jsx(Z$,{frame:e,index:t}),n?o.jsx(K$,{frame:e}):null]})}function Z$({frame:e,index:t}){const n=e.nativeMethod?B2:e.runtime?U$:z$,r=e.class,s=e.displayName||e.method||e.functionName;return o.jsxs("div",{className:["grid grid-cols-[2rem_minmax(0,1fr)] gap-2 px-3 py-1.5 text-xs",e.runtime?"text-muted-foreground":"text-foreground"].join(" "),children:[o.jsxs("div",{className:"flex items-start justify-end gap-1 pt-0.5 font-mono text-[10px] text-muted-foreground",children:[o.jsx("span",{children:t+1}),o.jsx(K,{icon:n,className:"mt-px shrink-0 text-[11px]"})]}),o.jsx("div",{className:"min-w-0",children:o.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[o.jsx("span",{className:"min-w-0 break-all font-mono font-semibold leading-4",children:s}),r&&o.jsx("span",{className:"min-w-0 break-all font-mono text-[11px] text-muted-foreground",children:r}),e.location&&o.jsx("span",{className:"rounded border border-border bg-muted/40 px-1.5 py-px font-mono text-[10px] text-muted-foreground",children:e.location})]})})]})}function W$(e){switch(e){case"python":case"py":case"bash":case"sh":case"shell":case"ruby":case"rb":case"yaml":case"yml":case"toml":return"#";default:return"//"}}function q$(e,t,n,r){const s=n-t;if(s<0||s>=e.length)return e.join(` +`);const i=W$(r);return e.map((l,u)=>u===s?`${l} ${i} [!code error]`:l).join(` +`)}function K$({frame:e}){const t=e.sourceStartLine??0,n=e.line??-1,r=e.sourceLines??[],s=e.sourceLineNumbers,i=e.sourceLanguage??"java",l=w.useMemo(()=>r.map((x,v)=>({source:x,lineNumber:s?.[v]??t+v})),[s,r,t]),u=s!=null&&s.length>0,d=w.useMemo(()=>q$(r,t,n,i),[r,t,n,i]),[f,p]=w.useState(null);w.useEffect(()=>{if(!d||u){p(null);return}let x=!1;return FI().then(({transformerNotationErrorLevel:v})=>v_(d,{lang:i,transformers:[v()]})).then(v=>{x||p(v)}),()=>{x=!0}},[d,u,i]);const h=t-1;return!f||u?o.jsx(G$,{rows:l,focal:n}):o.jsx("div",{className:"stacktrace-source ml-6 overflow-x-auto rounded border border-border/50 bg-muted/30 p-2 text-[11px] leading-relaxed",style:{"--shiki-start":h},dangerouslySetInnerHTML:{__html:f}})}function G$({rows:e,focal:t}){return o.jsx("div",{className:"mx-3 mb-2 ml-12 overflow-x-auto rounded border border-border/60 bg-muted/30 py-1 font-mono text-[11px] leading-relaxed",children:e.map((n,r)=>{const s=n.lineNumber===t;return o.jsxs("div",{className:["grid min-w-max grid-cols-[3.5rem_minmax(24rem,1fr)] gap-3 px-2",s?"bg-red-500/10 font-semibold text-red-800 dark:text-red-300":"text-foreground"].join(" "),children:[o.jsxs("span",{className:"select-none text-right text-muted-foreground",children:[s?">":"",n.lineNumber]}),o.jsx("code",{className:"whitespace-pre",children:n.source||" "})]},`${n.lineNumber}-${r}`)})})}function wm(e){if(typeof e=="string")try{return yw(JSON.parse(e))}catch(t){return{ok:!1,message:t instanceof Error?t.message:"Failed to parse JSON",raw:e}}return yw(e)}function yw(e){if(!e||typeof e!="object")return{ok:!1,message:"Payload must be an object",raw:String(e??"")};const t=e;return"version"in t&&t.version===1&&t.node&&ww(t.node)?{ok:!0,document:t}:ww(t)?{ok:!0,document:{version:1,node:t}}:{ok:!1,message:"Payload is neither a Clicky document nor a Clicky node",raw:JSON.stringify(e,null,2)}}function ww(e){return!!e&&typeof e=="object"&&typeof e.kind=="string"}const S_=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M246 128a85.27 85.27 0 0 1-17.2 51.6a6 6 0 1 1-9.6-7.2A74 74 0 1 0 86 128a6 6 0 0 1-12 0a85.5 85.5 0 0 1 3.91-25.64A51 51 0 0 0 72 102a50 50 0 0 0 0 100h24a6 6 0 0 1 0 12H72A62 62 0 1 1 82.43 90.88A86 86 0 0 1 246 128m-66.24 43.76L158 193.51V128a6 6 0 0 0-12 0v65.51l-21.76-21.75a6 6 0 0 0-8.48 8.48l32 32a6 6 0 0 0 8.48 0l32-32a6 6 0 0 0-8.48-8.48"})}),{__source:"ph:cloud-arrow-down-light",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"cloud-download",displayName:"UiCloudDownload"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M247.93 124.52C246.11 77.54 207.07 40 160.06 40a88.1 88.1 0 0 0-78.77 48.67A87.5 87.5 0 0 0 72 127.73a8.18 8.18 0 0 1-7.43 8.27a8 8 0 0 1-8.57-8a103.7 103.7 0 0 1 5.34-32.92a4 4 0 0 0-4.75-5.18A64.09 64.09 0 0 0 8 152c0 35.19 29.75 64 65 64h87a88.09 88.09 0 0 0 87.93-91.48m-50.27 25.14l-32 32a8 8 0 0 1-11.32 0l-32-32a8 8 0 0 1 11.32-11.32L152 156.69V96a8 8 0 0 1 16 0v60.69l18.34-18.35a8 8 0 0 1 11.32 11.32"})}),{__source:"ph:cloud-arrow-down-fill",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"cloud-download",displayName:"UiCloudDownloadFilled"});const J$=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[o.jsx("path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}),o.jsx("path",{d:"M14 2v5a1 1 0 0 0 1 1h5M8 13h2m4 0h2m-8 4h2m4 0h2"})]})}),{__source:"lucide:file-spreadsheet",__viewBox:"0 0 24 24",__group:"files-code",__consumerName:"file-spreadsheet",displayName:"UiFileSpreadsheet"}),Q$=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 32 32",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{d:"M2.5 7.955h27v16.091h-27z",fill:"none",stroke:"#755838"}),o.jsx("path",{d:"M5.909 20.636v-9.272h2.727l2.728 3.409l2.727-3.409h2.727v9.272h-2.727v-5.318l-2.727 3.409l-2.728-3.409v5.318zm17.046 0l-4.091-4.5h2.727v-4.772h2.727v4.772h2.727z",fill:"#755838"})]}),{__source:"incumbent",__viewBox:"0 0 32 32",__group:"files-code",__consumerName:"markdown",displayName:"UiMarkdown"}),Zl=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m212.24 83.76l-56-56A6 6 0 0 0 152 26H56a14 14 0 0 0-14 14v176a14 14 0 0 0 14 14h144a14 14 0 0 0 14-14V88a6 6 0 0 0-1.76-4.24M158 46.48L193.52 82H158ZM200 218H56a2 2 0 0 1-2-2V40a2 2 0 0 1 2-2h90v50a6 6 0 0 0 6 6h50v122a2 2 0 0 1-2 2m-34-82a6 6 0 0 1-6 6H96a6 6 0 0 1 0-12h64a6 6 0 0 1 6 6m0 32a6 6 0 0 1-6 6H96a6 6 0 0 1 0-12h64a6 6 0 0 1 6 6"})}),{__source:"ph:file-text-light",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"file-text",displayName:"UiFileText"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m213.66 82.34l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v176a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V88a8 8 0 0 0-2.34-5.66M160 176H96a8 8 0 0 1 0-16h64a8 8 0 0 1 0 16m0-32H96a8 8 0 0 1 0-16h64a8 8 0 0 1 0 16m-8-56V44l44 44Z"})}),{__source:"ph:file-text-fill",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"file-text",displayName:"UiFileTextFilled"});const Y$=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 32 32",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{d:"M4.014 14.976a2.5 2.5 0 0 0 1.567-.518a2.38 2.38 0 0 0 .805-1.358a15.3 15.3 0 0 0 .214-2.944q.012-2.085.075-2.747a5.2 5.2 0 0 1 .418-1.686a3 3 0 0 1 .755-1.018A3.05 3.05 0 0 1 9 4.125A6.8 6.8 0 0 1 10.544 4h.7v1.96h-.387a2.34 2.34 0 0 0-1.723.468a3.4 3.4 0 0 0-.425 2.092a36 36 0 0 1-.137 4.133a4.7 4.7 0 0 1-.768 2.06A4.6 4.6 0 0 1 6.1 16a3.8 3.8 0 0 1 1.992 1.754a8.9 8.9 0 0 1 .618 3.865q0 2.435.05 2.9a1.76 1.76 0 0 0 .504 1.181a2.64 2.64 0 0 0 1.592.337h.387V28h-.7a5.7 5.7 0 0 1-1.773-.2a2.97 2.97 0 0 1-1.324-.93a3.35 3.35 0 0 1-.681-1.63a24 24 0 0 1-.165-3.234a16.5 16.5 0 0 0-.214-3.106a2.4 2.4 0 0 0-.805-1.361a2.5 2.5 0 0 0-1.567-.524Zm23.972 2.035a2.5 2.5 0 0 0-1.567.524a2.4 2.4 0 0 0-.805 1.361a16.5 16.5 0 0 0-.212 3.109a24 24 0 0 1-.169 3.234a3.35 3.35 0 0 1-.681 1.63a2.97 2.97 0 0 1-1.324.93a5.7 5.7 0 0 1-1.773.2h-.7V26.04h.387a2.64 2.64 0 0 0 1.592-.337a1.76 1.76 0 0 0 .506-1.186q.05-.462.05-2.9a8.9 8.9 0 0 1 .618-3.865A3.8 3.8 0 0 1 25.9 16a4.6 4.6 0 0 1-1.7-1.286a4.7 4.7 0 0 1-.768-2.06a36 36 0 0 1-.137-4.133a3.4 3.4 0 0 0-.425-2.092a2.34 2.34 0 0 0-1.723-.468h-.387V4h.7a6.8 6.8 0 0 1 1.54.125a3.05 3.05 0 0 1 1.149.581a3 3 0 0 1 .755 1.018a5.2 5.2 0 0 1 .418 1.686q.062.662.075 2.747a15.3 15.3 0 0 0 .212 2.947a2.38 2.38 0 0 0 .805 1.355a2.5 2.5 0 0 0 1.567.518Z",fill:"#E5A505"})}),{__source:"incumbent",__viewBox:"0 0 32 32",__group:"files-code",__consumerName:"json",displayName:"UiJson"}),X$=["clicky","json"],E_=["pdf","html","markdown","yaml","csv","pretty","excel","slack"],eF=["yaml","json","csv","pdf","markdown"],bg={operations:[],operationsLoading:!1},vo=w.createContext(bg);function tF(e){const[t]=w.useState(()=>new J8({defaultOptions:{queries:{staleTime:3e4,retry:1}}})),n=w.useMemo(()=>hF({url:e.url,download:e.download}),[e.download,e.url]),r=o.jsx(nF,{...e.commandRuntime?{commandRuntime:e.commandRuntime}:{},...e.onTableRowClick?{onTableRowClick:e.onTableRowClick}:{},...e.getTableRowHref?{getTableRowHref:e.getTableRowHref}:{},...e.isTableRowClickable?{isTableRowClickable:e.isTableRowClickable}:{},...e.search?{tableSearch:e.search}:{},...e.timeRange?{tableTimeRange:e.timeRange}:{},...e.externalFilters?{tableExternalFilters:e.externalFilters}:{},...e.pagination?{tablePagination:e.pagination}:{},...n.length>0?{tableMenuActions:n}:{},children:e.url?o.jsx(sF,{...e,url:e.url}):o.jsx(T_,{data:e.data,...e.className?{className:e.className}:{}})});return e.url||e.commandRuntime?o.jsx(Y8,{client:t,children:r}):r}function nF({commandRuntime:e,onTableRowClick:t,getTableRowHref:n,isTableRowClickable:r,tableSearch:s,tableTimeRange:i,tableExternalFilters:l,tablePagination:u,tableMenuActions:d,children:f}){if(!e){const p=t||n||r||s||i||l||u||d;return o.jsx(vo.Provider,{value:p?{...bg,onTableRowClick:t,getTableRowHref:n,isTableRowClickable:r,tableSearch:s,tableTimeRange:i,tableExternalFilters:l,tablePagination:u,tableMenuActions:d}:bg,children:f})}return o.jsx(rF,{commandRuntime:e,...t?{onTableRowClick:t}:{},...n?{getTableRowHref:n}:{},...r?{isTableRowClickable:r}:{},...s?{tableSearch:s}:{},...i?{tableTimeRange:i}:{},...l?{tableExternalFilters:l}:{},...u?{tablePagination:u}:{},...d?{tableMenuActions:d}:{},children:f})}function rF({commandRuntime:e,onTableRowClick:t,getTableRowHref:n,isTableRowClickable:r,tableSearch:s,tableTimeRange:i,tableExternalFilters:l,tablePagination:u,tableMenuActions:d,children:f}){const{operations:p,isLoading:h}=_i(e.client),x=w.useMemo(()=>({commandRuntime:e,onTableRowClick:t,getTableRowHref:n,isTableRowClickable:r,tableSearch:s,tableTimeRange:i,tableExternalFilters:l,tablePagination:u,tableMenuActions:d,operations:p,operationsLoading:h}),[e,n,h,r,t,p,s,i,l,u,d]);return o.jsx(vo.Provider,{value:x,children:f})}function T_({data:e,className:t}){if(e===void 0)return o.jsx(Wt,{className:t,title:"No Clicky data",message:"Provide either a local data payload or a URL."});const n=wm(e);return n.ok?o.jsx("div",{className:t,children:o.jsx(bt,{node:n.document.node})}):o.jsx(lF,{parsed:n,className:t})}function sF({data:e,url:t,view:n,download:r,className:s}){var i,l;const u=w.useMemo(()=>pF({data:e,url:t,view:n}),[e,t,n]),d=w.useMemo(()=>u.filter(yF),[u]),f=w.useMemo(()=>u.filter(jw),[u]),p=w.useMemo(()=>A_({url:t,download:r}),[r,t]),[h,x]=w.useState(()=>u[0]??"clicky");w.useEffect(()=>{u.includes(h)||x(u[0]??"clicky")},[h,u]);const v=L_(t,h),y=vn({queryKey:["clicky",h,v],enabled:_w(h),queryFn:async()=>aF(v,h)}),b=h==="clicky"&&((i=y.data)==null?void 0:i.kind)==="text"?y.data.text:e,j=w.useMemo(()=>wg(e),[e]),S=h==="json"&&((l=y.data)==null?void 0:l.kind)==="text"?wg(y.data.text):j,N=jw(h)?h:null,k=wF(b),T=p.length>0&&!k,E=`Fetching ${v}`,O=w.useContext(vo),M=k&&h==="clicky",L=w.useMemo(()=>!M||u.length<=1?[]:u.map(U=>{const z=hi(U);return{id:`view-${U}`,label:Cf(U),icon:z.icon,...z.iconClassName?{iconClassName:z.iconClassName}:{},section:"View",disabled:U===h,onSelect:()=>x(U)}}),[M,u,h]),F=w.useMemo(()=>[...L,...O.tableMenuActions??[]],[L,O.tableMenuActions]);return o.jsxs("div",{className:R("space-y-density-3",s),children:[!M&&o.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-border bg-muted/20 px-density-3 py-density-2",children:[d.length>1&&o.jsx("div",{role:"radiogroup","aria-label":"Clicky view mode",className:"flex flex-wrap gap-1",children:d.map(U=>o.jsx("button",{type:"button",role:"radio","aria-checked":h===U,onClick:()=>x(U),className:R("rounded-md border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",h===U?"border-foreground/20 bg-accent text-foreground":"border-transparent text-muted-foreground hover:border-foreground/20 hover:text-foreground"),children:Cf(U)},U))}),f.length>0&&o.jsx(oF,{activeFormat:N,formats:f,onSelect:x}),o.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[_w(h)&&y.isFetching&&o.jsx("span",{className:"text-xs text-muted-foreground",children:"Refreshing…"}),T&&o.jsx(iF,{url:t,formats:p,label:r?.label})]})]}),h==="pdf"?o.jsx(cF,{src:v}):h==="html"?o.jsx(uF,{src:v}):h==="excel"?o.jsx(dF,{title:"Excel preview",message:"Excel output is available for download, but not inline preview.",href:v}):h==="clicky"?y.isPending&&b===void 0?o.jsx(Wt,{title:"Loading Clicky",message:E}):y.isError&&b===void 0?o.jsx(Wt,{title:"Clicky request failed",message:y.error instanceof Error?y.error.message:"Request failed",tone:"destructive"}):o.jsxs(o.Fragment,{children:[y.isError&&e!==void 0&&o.jsx(Wt,{title:"Remote refresh failed",message:"Showing the local fallback payload instead.",tone:"warning"}),o.jsx(vo.Provider,{value:{...O,tableMenuActions:F},children:o.jsx(T_,{data:b})})]}):h==="json"?y.isPending&&S===void 0?o.jsx(Wt,{title:"Loading JSON",message:E}):y.isError&&S===void 0?o.jsx(Wt,{title:"JSON request failed",message:y.error instanceof Error?y.error.message:"Request failed",tone:"destructive"}):o.jsxs(o.Fragment,{children:[y.isError&&j!==void 0&&o.jsx(Wt,{title:"Remote refresh failed",message:"Showing the local fallback payload instead.",tone:"warning"}),o.jsx(U2,{value:S})]}):y.isPending?o.jsx(Wt,{title:`Loading ${Cf(h)}`,message:E}):y.isError?o.jsx(Wt,{title:`${Cf(h)} request failed`,message:y.error instanceof Error?y.error.message:"Request failed",tone:"destructive"}):o.jsx(fF,{format:h,response:y.data})]})}function oF({activeFormat:e,formats:t,onSelect:n}){const r=w.useRef(null),s=w.useRef(null),[i,l]=w.useState(!1);return O_(i,r,s,()=>l(!1)),o.jsxs("div",{ref:r,className:"relative",children:[o.jsx("button",{ref:s,type:"button","aria-label":"Open additional view menu","aria-haspopup":"menu","aria-expanded":i,"aria-pressed":e!=null,className:R("inline-flex h-[34px] w-[34px] items-center justify-center rounded-md border border-input bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e&&"border-foreground/20 bg-accent text-foreground"),onClick:()=>l(u=>!u),children:o.jsx(K,{icon:t_,className:"text-sm"})}),i&&o.jsx("div",{role:"menu",className:"absolute left-0 top-[calc(100%+0.375rem)] z-50 min-w-[18rem] rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-lg shadow-black/5",children:t.map(u=>{const d=u===e,f=hi(u);return o.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":d,className:R("flex w-full items-start gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none",d&&"bg-accent/70"),onClick:()=>{n(u),l(!1)},children:[o.jsx(K,{icon:f.icon,className:R("mt-0.5 shrink-0 text-base",f.iconClassName??"text-muted-foreground",d&&!f.iconClassName&&"text-foreground")}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsxs("span",{className:"flex items-center justify-between gap-3",children:[o.jsx("span",{className:"font-medium",children:f.label}),d&&o.jsx(K,{icon:mr,className:"text-xs text-muted-foreground"})]}),o.jsx("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:f.description})]})]},u)})})]})}function iF({url:e,formats:t,label:n}){const r=w.useRef(null),s=w.useRef(null),[i,l]=w.useState(!1),u="json",d=hi(u);return O_(i,r,s,()=>l(!1)),o.jsxs("div",{ref:r,className:"relative",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsxs("button",{type:"button","aria-label":n?`Download ${d.label} ${n}`:`Download ${d.label}`,className:"inline-flex items-center gap-2 rounded-md border border-input bg-background px-3 py-1.5 text-xs font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:()=>_g(yg(e,u,n)),children:[o.jsx(K,{icon:S_,className:"text-sm"}),o.jsx("span",{children:`Download ${d.label}`})]}),o.jsx("button",{ref:s,type:"button","aria-label":"Open download menu","aria-haspopup":"menu","aria-expanded":i,className:"inline-flex h-[34px] w-[34px] items-center justify-center rounded-md border border-input bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:()=>l(f=>!f),children:o.jsx(K,{icon:i?Ku:Vt,className:"text-sm"})})]}),i&&o.jsx("div",{role:"menu",className:"absolute right-0 top-[calc(100%+0.375rem)] z-50 min-w-[18rem] rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-lg shadow-black/5",children:t.map(f=>{const p=hi(f);return o.jsxs("button",{type:"button",role:"menuitem",className:R("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none"),onClick:()=>{_g(yg(e,f,n)),l(!1)},children:[o.jsx(K,{icon:p.icon,className:R("shrink-0 text-sm",p.iconClassName??"text-muted-foreground")}),o.jsx("span",{className:"min-w-0 flex-1",children:o.jsx("span",{className:"font-medium",children:p.label})})]},f)})})]})}function O_(e,t,n,r){wo(e,()=>{var s;r(),(s=n.current)==null||s.focus()}),w.useEffect(()=>{if(!e)return;const s=i=>{var l;(l=t.current)!=null&&l.contains(i.target)||r()};return document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}},[r,e,t,n])}function aF(e,t){return fetch(e,{headers:{Accept:hi(t).accept}}).then(async n=>{if(!n.ok)throw new Error(`Request failed with ${n.status} ${n.statusText}`.trim());const r=n.headers.get("Content-Type")??"";return t==="excel"?{kind:"blob",blob:await n.blob(),contentType:r}:{kind:"text",text:await n.text(),contentType:r}})}function lF({parsed:e,className:t}){return o.jsxs("div",{className:R("rounded-md border border-destructive/30 bg-destructive/5 p-density-3",t),children:[o.jsx("div",{className:"text-sm font-medium text-destructive",children:"Invalid Clicky payload"}),o.jsxs("pre",{className:"mt-2 whitespace-pre-wrap break-all text-xs text-muted-foreground",children:[e.message,e.raw?` + +${e.raw}`:""]})]})}function Wt({title:e,message:t,tone:n="default",className:r}){return o.jsxs("div",{className:R("rounded-md border p-density-3",n==="destructive"&&"border-destructive/30 bg-destructive/5",n==="warning"&&"border-yellow-500/30 bg-yellow-500/5",n==="default"&&"border-border bg-muted/30",r),children:[o.jsx("div",{className:R("text-sm font-medium",n==="destructive"&&"text-destructive",n==="warning"&&"text-yellow-700 dark:text-yellow-400"),children:e}),o.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:t})]})}function cF({src:e}){return o.jsxs("div",{className:"overflow-hidden rounded-md border border-border bg-background",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2 text-xs text-muted-foreground",children:[o.jsx("span",{children:"PDF preview"}),o.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-primary hover:underline",children:"Open in new tab"})]}),o.jsx("iframe",{title:"Clicky PDF preview",src:e,className:"h-[720px] w-full bg-background"})]})}function uF({src:e}){return o.jsxs("div",{className:"overflow-hidden rounded-md border border-border bg-background",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2 text-xs text-muted-foreground",children:[o.jsx("span",{children:"HTML preview"}),o.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-primary hover:underline",children:"Open in new tab"})]}),o.jsx("iframe",{title:"Clicky HTML preview",src:e,className:"h-[720px] w-full bg-background",sandbox:"allow-same-origin"})]})}function dF({title:e,message:t,href:n}){return o.jsx(Wt,{title:e,message:o.jsxs(o.Fragment,{children:[o.jsxs("span",{children:[t," "]}),o.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:"text-primary hover:underline",children:"Open format"})]})})}function fF({format:e,response:t}){const n=hi(e);if(e==="slack"){const r=t?.kind==="text"?wg(t.text):void 0;return o.jsx(U2,{value:r,emptyLabel:n.label})}return o.jsx(M_,{title:`${n.label} output`,content:t?.kind==="text"?t.text:""})}function M_({title:e,content:t}){return o.jsxs("div",{className:"overflow-hidden rounded-md border border-border bg-background",children:[o.jsx("div",{className:"border-b border-border px-3 py-2 text-xs text-muted-foreground",children:e}),o.jsx("pre",{"aria-label":"Clicky text preview",className:"overflow-auto whitespace-pre-wrap break-words px-3 py-3 font-mono text-xs text-foreground",children:t||"No content"})]})}function U2({value:e,emptyLabel:t="JSON"}){const n=w.useMemo(()=>_F(e),[e]);return e===void 0?o.jsx(Wt,{title:`No ${t} payload`,message:"The response did not include a JSON body to inspect."}):o.jsx("div",{"aria-label":"JSON tree",className:"overflow-hidden rounded-md border border-border bg-background",children:o.jsx(Qu,{roots:n,className:"min-h-[12rem]",showControls:n.some(r=>{var s;return(((s=r.children)==null?void 0:s.length)??0)>0}),getKey:r=>r.id,getChildren:r=>r.children,renderRow:({node:r})=>o.jsx(mF,{node:r}),rowClass:()=>"hover:bg-accent",empty:o.jsx("div",{className:"px-3 py-4 text-sm text-muted-foreground",children:"No JSON fields."}),toolbarClassName:"pl-3"})})}function mF({node:e}){const t=typeof e.value=="string"?"text-emerald-700 dark:text-emerald-400":typeof e.value=="number"?"text-sky-700 dark:text-sky-400":typeof e.value=="boolean"||e.value===null?"text-violet-700 dark:text-violet-400":"text-muted-foreground";return o.jsxs("div",{className:"flex min-w-0 items-start gap-2 font-mono text-xs",children:[o.jsx("span",{className:"shrink-0 text-foreground",children:e.key}),o.jsx("span",{className:"shrink-0 text-muted-foreground",children:":"}),o.jsx("span",{className:R("min-w-0 break-words",t),children:e.preview})]})}function pF({data:e,url:t,view:n}){const r=Yh(n,"clicky",e,t),s=Yh(n,"json",e,t),i=[];r&&(t||e!==void 0)&&i.push("clicky"),s&&(t||e!==void 0)&&i.push("json");for(const l of E_)Yh(n,l,e,t)&&t&&i.push(l);return i.length===0&&(t||e!==void 0)&&i.push("clicky"),i}function A_({url:e,download:t}){return!(t?t.all??!0:!!e)||!e?[]:[...eF]}function hF({url:e,download:t}){const n=A_({url:e,download:t});return!e||n.length===0?[]:n.map(r=>{const s=hi(r);return{id:`download-${r}`,label:s.label,icon:s.icon,...s.iconClassName?{iconClassName:s.iconClassName}:{},onSelect:()=>_g(yg(e,r,t?.label))}})}function hi(e){switch(e){case"clicky":return{label:"Clicky",description:"Rendered Clicky JSON with the rich Clicky viewer",icon:og,accept:"application/json+clicky, application/clicky+json;q=0.9, application/json;q=0.8,*/*;q=0.7"};case"json":return{label:"JSON",description:"Plain JSON for inspecting the raw response body",icon:Y$,accept:"application/json, text/plain;q=0.8,*/*;q=0.7"};case"pdf":return{label:"PDF",description:"Portable document for sharing and printing",icon:Zl,iconClassName:"text-rose-600 dark:text-rose-400",accept:"application/pdf, */*;q=0.7"};case"html":return{label:"HTML",description:"Browser-ready HTML preview of the formatted output",icon:ou,accept:"text/html, */*;q=0.7"};case"markdown":return{label:"Markdown",description:"Markdown formatted for docs, comments, and chat",icon:Q$,accept:"text/markdown, text/plain;q=0.8,*/*;q=0.7"};case"yaml":return{label:"YAML",description:"YAML for config-friendly inspection and export",icon:ou,iconClassName:"text-violet-600 dark:text-violet-400",accept:"application/yaml, text/yaml;q=0.9, text/plain;q=0.8,*/*;q=0.7"};case"csv":return{label:"CSV",description:"Comma-separated values for spreadsheets and imports",icon:J$,iconClassName:"text-emerald-600 dark:text-emerald-400",accept:"text/csv, text/plain;q=0.8,*/*;q=0.7"};case"pretty":return{label:"Pretty",description:"Human-readable plain text output from the formatter",icon:ou,accept:"text/plain, */*;q=0.7"};case"excel":return{label:"Excel",description:"Spreadsheet workbook for offline analysis",icon:v2,accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, */*;q=0.7"};case"slack":return{label:"Slack",description:"Slack Block Kit JSON for chat-native output",icon:b0,accept:"application/vnd.slack.block-kit+json, application/json;q=0.8,*/*;q=0.7"}}}function Cf(e){return hi(e).label}function L_(e,t){const n=typeof window>"u"?"http://localhost":window.location.origin,r=new URL(e,n);return r.searchParams.set("format",t==="clicky"?"clicky-json":t),R_(e)?r.toString():`${r.pathname}${r.search}${r.hash}`}function yg(e,t,n){const r=L_(e,t),s=typeof window>"u"?"http://localhost":window.location.origin,i=new URL(r,s);return i.searchParams.set("filename",gF(e,t,n)),i.searchParams.set("_download",Date.now().toString()),R_(r)?i.toString():`${i.pathname}${i.search}${i.hash}`}function gF(e,t,n){return`${vF(n||xF(e)||"clicky-output")}${bF(t)}`}function xF(e){const t=typeof window>"u"?"http://localhost":window.location.origin;return new URL(e,t).pathname.split("/").filter(Boolean).at(-1)??""}function vF(e){return e.trim().replace(/\.[a-z0-9]+$/i,"").replace(/[^a-z0-9._-]+/gi,"-").replace(/-+/g,"-").replace(/^[._-]+|[._-]+$/g,"")||"clicky-output"}function bF(e){switch(e){case"clicky":return".clicky.json";case"json":return".json";case"pdf":return".pdf";case"html":return".html";case"markdown":return".md";case"yaml":return".yaml";case"csv":return".csv";case"pretty":return".txt";case"excel":return".xlsx";case"slack":return".slack.json"}}function _w(e){return e!=="pdf"&&e!=="html"&&e!=="excel"}function yF(e){return X$.includes(e)}function jw(e){return E_.includes(e)}function Yh(e,t,n,r){const s=t==="clicky"||t==="json"?r!=null||n!==void 0:!!r;return e===void 0?s:Array.isArray(e)?e.length===0?!1:t==="clicky"?e.includes("clicky")||e.includes("json"):e.includes(t):t in e?!!e[t]:t==="clicky"&&e.json===!0?!0:s}function wg(e){if(e===void 0)return;if(typeof e!="string")return e;const t=e.trim();if(!t)return"";try{return JSON.parse(t)}catch{return e}}function wF(e){if(e===void 0)return!1;const t=wm(e);return t.ok?Ts(t.document.node):!1}function Ts(e){var t,n,r,s,i,l;return e?!!(e.kind==="table"||(t=e.children)!=null&&t.some(Ts)||(n=e.items)!=null&&n.some(Ts)||(r=e.fields)!=null&&r.some(u=>Ts(u.value))||e.label&&Ts(e.label)||e.content&&Ts(e.content)||e.tooltip&&Ts(e.tooltip)||(s=e.columns)!=null&&s.some(u=>u.header&&Ts(u.header))||(i=e.rows)!=null&&i.some(u=>Object.values(u.cells).some(d=>Ts(d)))||(l=e.rows)!=null&&l.some(u=>u.detail&&Ts(u.detail))):!1}function _F(e){return Array.isArray(e)?e.map((t,n)=>au(String(n),t,`$[${n}]`)):z2(e)?Object.entries(e).map(([t,n])=>au(t,n,`$.${t}`)):e===void 0?[]:[au("$",e,"$")]}function au(e,t,n){const r=jF(t,n);return{id:n,key:e,value:t,preview:kF(t),...r?{children:r}:{}}}function jF(e,t){if(Array.isArray(e))return e.map((n,r)=>au(String(r),n,`${t}[${r}]`));if(z2(e))return Object.entries(e).map(([n,r])=>au(n,r,`${t}.${n}`))}function kF(e){if(Array.isArray(e))return`[${e.length} item${e.length===1?"":"s"}]`;if(z2(e)){const t=Object.keys(e).length;return`{${t} key${t===1?"":"s"}}`}return typeof e=="string"?JSON.stringify(e):e===void 0?"undefined":String(e)}function z2(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}const Xh="clicky-download-frame";function _g(e){if(typeof document>"u")return;let t=document.getElementById(Xh);t||(t=document.createElement("iframe"),t.id=Xh,t.name=Xh,t.title="Clicky download target",t.setAttribute("aria-hidden","true"),t.tabIndex=-1,t.style.display="none",document.body.appendChild(t)),t.src=e}function R_(e){return/^[a-z][a-z\d+\-.]*:/i.test(e)||e.startsWith("//")}function bt({node:e}){if(!e)return null;switch(e.kind){case"text":return o.jsx(CF,{node:e});case"link":return o.jsx(SF,{node:e});case"link-command":return o.jsx(EF,{node:e});case"icon":return o.jsx(OF,{node:e});case"list":return o.jsx(UF,{node:e});case"map":return o.jsx(F_,{node:e});case"table":return o.jsx(VF,{node:e});case"tree":return o.jsx(eD,{node:e});case"object-graph":return o.jsx(wI,{roots:e.objects??[]});case"execution-tree":return o.jsx(jI,{roots:e.executionRoots??[]});case"code":return o.jsx(fs,{language:e.language,source:e.source??e.plain??"",highlightedHtml:e.highlightedHtml});case"heading":return o.jsx(MF,{node:e});case"blockquote":return o.jsx(RF,{node:e});case"admonition":return o.jsx(PF,{node:e});case"footnote-ref":return o.jsx(FF,{node:e});case"footnote":return o.jsx(DF,{node:e});case"footnotes":return o.jsx(BF,{node:e});case"collapsed":return o.jsx(sD,{node:e});case"stacktrace":return o.jsx(rD,{node:e});case"button":return o.jsx(oD,{node:e});case"button-group":return o.jsx(iD,{node:e});case"html":return o.jsx(aD,{node:e});case"comment":return o.jsx(NF,{node:e});case"badge":return o.jsx(nD,{node:e});default:return o.jsx("pre",{className:"rounded-md border border-border bg-muted p-density-3 text-xs",children:JSON.stringify(e,null,2)})}}function NF({node:e}){var t,n,r,s,i;const l=e.text??e.plain,u=o.jsx(sa,{node:e}),d=(t=e.style)!=null&&t.maxWidth&&e.style.maxWidth>0?Math.min(e.style.maxWidth,50):50,f=(n=e.style)!=null&&n.maxLines&&e.style.maxLines>0?Math.min(e.style.maxLines,3):3,p=va({...e.style,maxWidth:d,maxLines:f},l);return!l&&!((r=e.children)!=null&&r.length)?null:o.jsx("div",{className:R("mt-1 text-xs leading-snug text-muted-foreground",(s=e.style)==null?void 0:s.className),style:p,title:((i=e.tooltip)==null?void 0:i.plain)??l,children:u})}function CF({node:e}){var t,n;const r=va(e.style,e.text??e.plain),s=o.jsx(sa,{node:e});return!e.style&&!e.tooltip?o.jsx(o.Fragment,{children:s}):o.jsx("span",{style:r,title:(t=e.tooltip)==null?void 0:t.plain,className:R((n=e.style)==null?void 0:n.className,(e.text??"").includes(` +`)&&"whitespace-pre-wrap"),children:s})}function sa({node:e}){var t;return o.jsxs(o.Fragment,{children:[e.text,(t=e.children)==null?void 0:t.map((n,r)=>o.jsx(w.Fragment,{children:o.jsx(bt,{node:n})},r))]})}function SF({node:e}){var t,n;const r=o.jsx(sa,{node:e}),s=va(e.style,e.text??e.plain),i=H_(e.target),l=i==="_blank"?"noopener noreferrer":void 0;return e.href?o.jsx("a",{href:e.href,target:i,rel:l,title:(t=e.tooltip)==null?void 0:t.plain,style:s,className:R((n=e.style)==null?void 0:n.className,"inline cursor-pointer"),children:r}):o.jsx("span",{style:s,children:r})}function EF({node:e}){var t,n,r,s,i,l,u,d;const f=w.useContext(vo),p=w.useMemo(()=>lD(e),[e]),h=w.useMemo(()=>cD(p,f.commandRuntime,f.operations),[p,f.commandRuntime,f.operations]),x=p.target??"Dialog",v=f.commandRuntime!=null,[y,b]=w.useState(!1),[j,S]=w.useState(!1);if(!v)return o.jsx("span",{title:(t=e.tooltip)==null?void 0:t.plain,className:R((n=e.style)==null?void 0:n.className),children:o.jsx(sa,{node:e})});if(x==="_self"||x==="_window"||x==="_tab"){const N=((s=(r=f.commandRuntime)==null?void 0:r.hrefForCommand)==null?void 0:s.call(r,h))??dD(h);return N?o.jsx("a",{href:N,target:H_(x),rel:x==="_self"?void 0:"noopener noreferrer",title:(u=e.tooltip)==null?void 0:u.plain,style:va(e.style,e.text??e.plain),className:R((d=e.style)==null?void 0:d.className,"inline cursor-pointer"),children:o.jsx(sa,{node:e})}):o.jsx("span",{title:(i=e.tooltip)==null?void 0:i.plain,className:R((l=e.style)==null?void 0:l.className),children:o.jsx(sa,{node:e})})}return x==="_clicky"?o.jsx(Sf,{node:e,onClick:()=>{var N,k;return(k=(N=f.commandRuntime)==null?void 0:N.onNavigate)==null?void 0:k.call(N,h)}}):x==="Hover"?o.jsx(nd,{delay:75,cardClassName:"w-[28rem] max-w-[calc(100vw-2rem)] whitespace-normal p-0",trigger:o.jsx(Sf,{node:e}),children:o.jsx("div",{className:"max-h-[26rem] overflow-auto p-density-3",children:o.jsx(kw,{resolved:h})})}):x==="Expand"?o.jsxs("span",{className:"inline",children:[o.jsx(Sf,{node:e,ariaExpanded:j,onClick:()=>S(N=>!N)}),j&&o.jsx("div",{className:"mt-2 rounded-md border border-border bg-background p-density-3",children:o.jsx(kw,{resolved:h})})]}):o.jsxs(o.Fragment,{children:[o.jsx(Sf,{node:e,ariaExpanded:y,onClick:()=>b(!0)}),o.jsx(TF,{open:y,onClose:()=>b(!1),resolved:h})]})}function Sf({node:e,onClick:t,ariaExpanded:n}){var r,s;const i=va(e.style,e.text??e.plain),l=u=>{u.preventDefault(),t?.()};return o.jsx("button",{type:"button",title:(r=e.tooltip)==null?void 0:r.plain,"aria-expanded":n,onClick:l,style:i,className:R("inline cursor-pointer appearance-none border-0 bg-transparent p-0 text-left align-baseline text-inherit",(s=e.style)==null?void 0:s.className),children:o.jsx(sa,{node:e})})}function TF({open:e,onClose:t,resolved:n}){const r=w.useContext(vo),s=n.operation,i=s?.operation.parameters??[],l=w.useMemo(()=>H2(i,n.request),[i,n.request]),[u,d]=w.useState(null),[f,p]=w.useState(""),[h,x]=w.useState(!1),[v,y]=w.useState(!1),b=e&&n.request.autoRun===!0&&s!=null&&z_(i,l).length===0;w.useEffect(()=>{e||(y(!1),d(null),p(""))},[e,n.request.command]);async function j(S){if(!(!r.commandRuntime||!s)){x(!0),p("");try{const N=await V_(r.commandRuntime.client,s,S);d(N)}catch(N){d(null),p(N instanceof Error?N.message:String(N??"Unknown error"))}finally{x(!1)}}}return w.useEffect(()=>{!b||v||(y(!0),j(l))},[v,l,b]),o.jsx(yi,{open:e,onClose:t,title:s?.operation.summary||n.request.command,size:"xl",children:o.jsxs("div",{className:"space-y-4",children:[s?o.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[o.jsx("span",{className:"rounded-md border border-border bg-muted px-2 py-1 font-medium uppercase",children:s.method}),o.jsx("code",{children:s.path})]}):r.operationsLoading?o.jsx(Wt,{title:"Loading commands",message:"Resolving the command definition."}):o.jsx(Wt,{title:"Unknown command",message:`No operation matched "${n.request.command}".`,tone:"destructive"}),s&&o.jsx("div",{className:"rounded-md border border-border bg-muted/20 p-density-3",children:o.jsx(m_,{client:r.commandRuntime.client,path:s.path,method:s.method,parameters:i,initialValues:l,isSubmitting:h,submitLabel:"Run command",submittingLabel:"Running…",onSubmit:j})}),f?o.jsx(Wt,{title:"Command failed",message:f,tone:"destructive"}):o.jsx(P_,{response:u,pending:h,emptyMessage:"Run the command to load a Clicky response."})]})})}function kw({resolved:e}){const t=w.useContext(vo),n=e.operation,r=n?.operation.parameters??[],s=w.useMemo(()=>H2(r,e.request),[r,e.request]),i=w.useMemo(()=>z_(r,s),[s,r]),l=vn({queryKey:["clicky-command",e.request.command,n?.method,n?.path,s],enabled:t.commandRuntime!=null&&n!=null&&i.length===0,retry:0,queryFn:async()=>V_(t.commandRuntime.client,n,s)});return t.commandRuntime?n?i.length>0?o.jsx(Wt,{title:"Missing required parameters",message:`This link is missing: ${i.map(u=>gi(u.name)).join(", ")}.`,tone:"warning"}):l.isPending?o.jsx(Wt,{title:"Running command",message:"Loading Clicky response…"}):l.isError?o.jsx(Wt,{title:"Command failed",message:l.error instanceof Error?l.error.message:"Request failed",tone:"destructive"}):o.jsx(P_,{response:l.data,emptyMessage:"No response body returned."}):t.operationsLoading?o.jsx(Wt,{title:"Loading commands",message:"Resolving the command definition."}):o.jsx(Wt,{title:"Unknown command",message:`No operation matched "${e.request.command}".`,tone:"destructive"}):o.jsx(Wt,{title:"Command runtime unavailable",message:"This Clicky view was rendered without a command runtime.",tone:"warning"})}function P_({response:e,pending:t=!1,emptyMessage:n}){if(t)return o.jsx(Wt,{title:"Running command",message:"Loading Clicky response…"});if(!e)return o.jsx(Wt,{title:"No response",message:n});const r=Nw(e)?e.parsed??gR(e):e,s=Nw(e)?e.stdout||e.output||e.message||"":typeof e=="string"?e:JSON.stringify(e,null,2),i=typeof r=="string"||r!=null&&typeof r=="object"?r:s,l=i===""?null:wm(i);return l?.ok?o.jsx("div",{className:"rounded-md border border-border bg-background p-density-3",children:o.jsx(bt,{node:l.document.node})}):r!=null&&typeof r=="object"?o.jsx(U2,{value:r}):o.jsx(M_,{title:"Response body",content:s})}function OF({node:e}){var t;const n=va(e.style,e.plain??e.unicode);return o.jsx("span",{style:n,title:(t=e.tooltip)==null?void 0:t.plain,className:"inline-flex items-center",children:e.iconify?o.jsx(K,{name:e.iconify}):o.jsx("span",{children:e.unicode??e.plain})})}function MF({node:e}){var t;const n=AF(e.level),r=e.content??$_(e),s=va(e.style,Gt(r)),i=R(LF(n),"text-foreground",(t=e.style)==null?void 0:t.className);switch(n){case 1:return o.jsx("h1",{className:i,style:s,children:r&&o.jsx(bt,{node:r})});case 2:return o.jsx("h2",{className:i,style:s,children:r&&o.jsx(bt,{node:r})});case 3:return o.jsx("h3",{className:i,style:s,children:r&&o.jsx(bt,{node:r})});case 4:return o.jsx("h4",{className:i,style:s,children:r&&o.jsx(bt,{node:r})});case 5:return o.jsx("h5",{className:i,style:s,children:r&&o.jsx(bt,{node:r})});default:return o.jsx("h6",{className:i,style:s,children:r&&o.jsx(bt,{node:r})})}}function AF(e){return Number.isFinite(e)?Math.min(6,Math.max(1,Math.trunc(e??1))):1}function LF(e){switch(e){case 1:return"text-2xl font-semibold leading-tight";case 2:return"text-xl font-semibold leading-tight";case 3:return"text-lg font-semibold leading-snug";case 4:return"text-base font-semibold leading-snug";case 5:return"text-sm font-semibold leading-snug";default:return"text-xs font-semibold uppercase leading-snug text-muted-foreground"}}function RF({node:e}){const t=e.content??$_(e);return t?o.jsx("blockquote",{className:"border-l-4 border-border pl-density-3 text-sm leading-relaxed text-muted-foreground",children:o.jsx(bt,{node:t})}):null}function PF({node:e}){const t=IF(e.severity),n=e.label??{kind:"text",text:gi(t),plain:gi(t)},r=$F(t);return o.jsxs("div",{role:t==="danger"||t==="warning"?"alert":"note","data-severity":t,className:R("rounded-md border px-density-3 py-density-2",r.container),children:[o.jsx("div",{className:R("text-sm font-semibold",r.title),children:o.jsx(bt,{node:n})}),e.content&&o.jsx("div",{className:R("mt-1 text-sm leading-relaxed",r.body),children:o.jsx(bt,{node:e.content})})]})}function IF(e){const t=(e??"note").trim().toLowerCase();return t==="info"||t==="tip"||t==="warning"||t==="danger"||t==="note"?t:"note"}function $F(e){switch(e){case"info":return{container:"border-sky-500/30 bg-sky-500/5",title:"text-sky-800 dark:text-sky-300",body:"text-sky-950/80 dark:text-sky-100/80"};case"tip":return{container:"border-emerald-500/30 bg-emerald-500/5",title:"text-emerald-800 dark:text-emerald-300",body:"text-emerald-950/80 dark:text-emerald-100/80"};case"warning":return{container:"border-yellow-500/40 bg-yellow-500/10",title:"text-yellow-800 dark:text-yellow-300",body:"text-yellow-950/80 dark:text-yellow-100/80"};case"danger":return{container:"border-destructive/40 bg-destructive/10",title:"text-destructive",body:"text-destructive/90"};default:return{container:"border-border bg-muted/30",title:"text-foreground",body:"text-muted-foreground"}}}function FF({node:e}){const t=V2(e.id);return t?o.jsx("sup",{id:_u("fnref",t),className:"align-super text-[0.75em]",children:o.jsx("a",{href:`#${_u("fn",t)}`,"aria-label":`Footnote ${t}`,className:"text-primary hover:underline",children:`[^${t}]`})}):null}function DF({node:e}){const t=V2(e.id);return t?o.jsxs("div",{id:_u("fn",t),className:"text-sm text-muted-foreground",children:[o.jsx("span",{className:"mr-2 font-mono text-xs text-foreground",children:`[^${t}]`}),e.content&&o.jsx(bt,{node:e.content}),o.jsx(I_,{id:t})]}):null}function BF({node:e}){const t=(e.items??[]).filter(n=>V2(n.id));return t.length===0?null:o.jsx("section",{"aria-label":"Footnotes",className:"border-t border-border pt-density-2 text-xs text-muted-foreground",children:o.jsx("ol",{className:"ml-5 list-decimal space-y-1",children:t.map((n,r)=>o.jsxs("li",{id:_u("fn",n.id??""),children:[n.content&&o.jsx(bt,{node:n.content}),o.jsx(I_,{id:n.id??""})]},`${n.id}-${r}`))})})}function I_({id:e}){return o.jsx("a",{href:`#${_u("fnref",e)}`,"aria-label":`Back to footnote reference ${e}`,className:"ml-2 text-primary hover:underline",children:"back"})}function V2(e){return(e??"").trim()}function _u(e,t){return`${e}-${encodeURIComponent(t)}`}function $_(e){const t=e.text??e.plain;return t?{kind:"text",text:t,plain:t}:void 0}function UF({node:e}){const t=e.items??[];if(t.length===0)return null;if(e.inline)return o.jsx("span",{className:"inline-flex flex-wrap items-start gap-1",children:t.map((s,i)=>o.jsxs(w.Fragment,{children:[i>0&&o.jsx("span",{className:"text-muted-foreground",children:","}),o.jsxs("span",{className:"inline-flex items-center gap-1",children:[!e.ordered&&e.bullet&&o.jsx(bt,{node:e.bullet}),e.ordered&&o.jsxs("span",{className:"text-muted-foreground",children:[i+1,"."]}),o.jsx(bt,{node:s})]})]},i))});if(e.unstyled)return o.jsx("div",{className:"space-y-1",children:t.map((s,i)=>o.jsxs("div",{className:"flex items-start gap-2",children:[!e.ordered&&e.bullet&&o.jsx(bt,{node:e.bullet}),e.ordered&&o.jsxs("span",{className:"text-muted-foreground",children:[i+1,"."]}),o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx(bt,{node:s})})]},i))});const n=e.ordered?"ol":"ul",r=e.ordered?"list-decimal":"list-disc";return o.jsx(n,{className:R("ml-5 space-y-1 text-sm",r),children:t.map((s,i)=>o.jsx("li",{children:o.jsx(bt,{node:s})},i))})}function F_({node:e}){const t=w.useContext(vo),n=(e.fields??[]).filter(i=>!(t.tablePagination&&zF(i)));if(n.length===0)return null;const r=n.filter(i=>Cw(i.value)),s=n.filter(i=>!Cw(i.value));return o.jsxs("div",{className:"space-y-density-4",children:[r.length>0&&o.jsx("dl",{className:"grid gap-density-3 md:grid-cols-2",children:r.map(i=>o.jsxs("div",{children:[o.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:i.label||gi(i.name)}),o.jsx("dd",{className:"mt-1 text-sm text-foreground",children:o.jsx(bt,{node:i.value})})]},i.name))}),s.map(i=>o.jsxs("section",{className:"space-y-2",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:i.label||gi(i.name)}),o.jsx("div",{className:"rounded-md border border-border bg-background p-density-3",children:o.jsx(bt,{node:i.value})})]},i.name))]})}function zF(e){if((e.label||e.name||"").toLowerCase()!=="page"||e.value.kind!=="map")return!1;const n=new Set((e.value.fields??[]).map(r=>r.name.toLowerCase()));return n.has("limit")&&n.has("offset")&&n.has("total")}function VF({node:e}){return o.jsx(HF,{columns:e.columns??[],rows:e.rows??[],...e.autoFilter!==void 0?{autoFilter:e.autoFilter}:{}})}function HF({columns:e,rows:t,autoFilter:n,onTableRowClick:r,getTableRowHref:s,isTableRowClickable:i,search:l,timeRange:u,externalFilters:d,pagination:f,menuActions:p}){const h=w.useContext(vo),x=r??h.onTableRowClick,v=s??h.getTableRowHref,y=i??h.isTableRowClickable,b=l??h.tableSearch,j=u??h.tableTimeRange,S=d??h.tableExternalFilters,N=f??h.tablePagination,k=p??h.tableMenuActions;if(e.length===0)return o.jsx("div",{className:"text-sm text-muted-foreground",children:"No data"});if(WF(e,t))return o.jsx(ZF,{columns:e,rows:t});const T=e.map(O=>{const M=D_(O),L={key:`cells.${O.name}`,label:O.header?o.jsx(bt,{node:O.header}):O.label||gi(O.name),...O.align?{align:O.align}:{},...O.sortable!==void 0?{sortable:O.sortable}:{},...O.filterable!==void 0?{filterable:O.filterable}:{},...O.grow!==void 0?{grow:O.grow}:{},...O.shrink!==void 0?{shrink:O.shrink}:{}};return M?{...L,kind:"tags",render:F=>{const U=e1(F,O);return o.jsx(e_,{tags:U,maxVisible:3})},sortValue:F=>e1(F,O).length,filterValue:F=>e1(F,O).map(U=>U.token)}:{...L,...O.kind?{kind:O.kind}:{},render:F=>o.jsx(bt,{node:F}),sortValue:F=>Gt(F),filterValue:F=>Gt(F)}}),E=e.find(O=>O.sortable!==!1)??e[0];return o.jsx(c_,{data:t,columns:T,...n!==void 0?{autoFilter:n}:{},...E?{defaultSort:{key:`cells.${E.name}`,dir:"asc"}}:{},getRowId:(O,M)=>`${M}-${e.map(L=>Gt(O.cells[L.name])).filter(Boolean).join("|")}`,...x?{onRowClick:x}:{},...v?{getRowHref:v}:{},...x&&(y||v)?{isRowClickable:y??(O=>!!v?.(O))}:{},...b?{externalSearch:b}:{},...j?{externalTimeRange:j}:{},...S?{externalFilters:S}:{},...N?{pagination:N}:{},...k?{menuActions:k}:{}})}function ZF({columns:e,rows:t}){return o.jsx("div",{className:"space-y-2",children:t.map((n,r)=>{const s=GF(n,e,r),i=KF(n,e);return o.jsxs("details",{className:"rounded-md border border-border bg-background",children:[o.jsx("summary",{className:"cursor-pointer px-3 py-2 text-sm font-medium text-foreground",children:s}),o.jsx("div",{className:"border-t border-border p-3",children:o.jsx(F_,{node:i})})]},JF(n,e,r))})})}function WF(e,t){return t.length===0?!1:t.every(n=>{const r=e.map(i=>n.cells[i.name]).filter(Boolean);if(r.length===0)return!1;const s=r.filter(B_);return s.length>0&&s.length===r.length})}function D_(e){if(e.kind==="tags")return!0;const t=e.name.toLowerCase();return/(^|[._-])(tags?|labels?|annotations?)$/.test(t)}function e1(e,t){if(!D_(t))return[];const n=qF(e);return I2(n)}function qF(e){var t,n;if(!e)return[];if(e.kind==="map"&&((t=e.fields)!=null&&t.length))return Object.fromEntries(e.fields.map(s=>[s.name,Gt(s.value)]).filter(([,s])=>s.trim()!==""));if(e.kind==="list"&&((n=e.items)!=null&&n.length))return e.items.map(s=>Gt(s)).filter(Boolean);const r=Gt(e).trim();return r?r.split(/[,\s]+/).map(s=>s.trim()).filter(Boolean):[]}function B_(e){if(!e)return!1;if(e.kind==="map")return(e.fields??[]).length>0;if(e.kind==="table")return(e.rows??[]).length>0;if(e.kind!=="list")return!1;const t=e.items??[];return t.length>0&&t.every(B_)}function KF(e,t){return{kind:"map",fields:t.flatMap(n=>{const r=e.cells[n.name];return r?[{name:n.name,label:Gt(n.header)||n.label||gi(n.name),value:r}]:[]})}}function GF(e,t,n){var r,s,i;const l=XF(((r=t.find(d=>QF(e.cells[d.name])))==null?void 0:r.label)??((s=t[0])==null?void 0:s.label)??((i=t[0])==null?void 0:i.name)??"Item"),u=U_(e,t);return u?`${l} ${n+1}: ${u}`:`${l} ${n+1}`}function JF(e,t,n){const r=U_(e,t);return`${n}-${r||t.map(s=>Gt(e.cells[s.name])).join("|")}`}function U_(e,t){const n=["name","title","agreementname","companyname","customernumber","id","guid"];for(const r of n)for(const s of t){const i=jg(e.cells[s.name],r);if(i)return i}for(const r of t){const s=Gt(e.cells[r.name]).trim();if(s)return s}return""}function jg(e,t){if(!e)return"";if(e.kind==="map"){for(const n of e.fields??[])if(YF(n.name)===t){const r=Gt(n.value).trim();if(r)return r}}for(const n of e.fields??[]){const r=jg(n.value,t);if(r)return r}for(const n of e.items??[]){const r=jg(n,t);if(r)return r}return""}function QF(e){return!!(Gt(e).trim()||(e?.fields??[]).length>0)}function YF(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}function XF(e){const t=gi(e).trim();return t.endsWith("s")?t.slice(0,-1):t}function eD({node:e}){const t=e.roots??[];return t.length===0?null:o.jsx(Qu,{roots:t,getChildren:n=>n.children,getKey:n=>n.id,defaultOpen:(n,r)=>r<1,renderRow:({node:n})=>o.jsx("div",{className:"min-w-0 flex-1 truncate",children:o.jsx(bt,{node:n.label})})})}function tD(e){return e==="pill"||e==="rounded"||e==="square"}function nD({node:e}){const t={variant:"label"};return e.badgeLabel!==void 0&&(t.label=e.badgeLabel),e.badgeValue!==void 0&&(t.value=e.badgeValue),e.badgeColor!==void 0&&(t.color=e.badgeColor),e.badgeText!==void 0&&(t.textColor=e.badgeText),e.badgeIcon!==void 0&&(t.icon=e.badgeIcon),tD(e.badgeShape)&&(t.shape=e.badgeShape),o.jsx(xo,{...t})}function rD({node:e}){const t={causedBy:e.causedBy??[],frames:e.frames??[],language:"java",...e.exceptionClass!==void 0?{exceptionClass:e.exceptionClass}:{},...e.message!==void 0?{message:e.message}:{}};return o.jsx(V$,{input:t,className:"space-y-1"})}function sD({node:e}){return o.jsxs("details",{className:"rounded-md border border-border bg-background",children:[o.jsx("summary",{className:"cursor-pointer px-3 py-2 text-sm font-medium text-foreground",children:o.jsx(bt,{node:e.label})}),e.content&&o.jsx("div",{className:"border-t border-border px-3 py-3",children:o.jsx(bt,{node:e.content})})]})}function oD({node:e}){const t=[e.id,e.payload].filter(Boolean).join(` +`)||void 0,n=e.label?o.jsx(bt,{node:e.label}):e.text;return e.href?o.jsx("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",title:t,className:"inline-flex items-center rounded-md border border-border bg-background px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent",children:n}):o.jsx("button",{type:"button",title:t,className:"inline-flex items-center rounded-md border border-border bg-muted px-3 py-1.5 text-sm font-medium text-foreground",children:n})}function iD({node:e}){const t=e.items??[];return t.length===0?null:o.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((n,r)=>o.jsx(bt,{node:n},r))})}function aD({node:e}){const t=D2(e.html??"");if(!t)return null;const n=O$(t)?"div":"span";return o.jsx(n,{dangerouslySetInnerHTML:{__html:t}})}function va(e,t){if(!e)return t?.includes(` +`)?{whiteSpace:"pre-wrap"}:void 0;const n={};e.color&&(n.color=e.color),e.backgroundColor&&(n.backgroundColor=e.backgroundColor),e.bold&&(n.fontWeight=700),e.faint&&(n.opacity=.7),e.italic&&(n.fontStyle="italic");const r=[];return e.underline&&r.push("underline"),e.strikethrough&&r.push("line-through"),r.length>0&&(n.textDecoration=r.join(" ")),(e.textTransform==="uppercase"||e.textTransform==="lowercase"||e.textTransform==="capitalize")&&(n.textTransform=e.textTransform),e.maxWidth&&e.maxWidth>0&&(n.maxWidth=`${e.maxWidth}ch`),e.maxLines&&e.maxLines>0&&(n.display="-webkit-box",n.overflow="hidden",n.WebkitLineClamp=e.maxLines,n.WebkitBoxOrient="vertical",n.whiteSpace="pre-wrap"),e.truncateMode==="suffix"&&e.maxWidth&&(!e.maxLines||e.maxLines<=1)&&(n.overflow="hidden",n.textOverflow="ellipsis",n.whiteSpace="nowrap",n.display="inline-block",n.verticalAlign="bottom"),e.monospace&&(n.fontFamily='ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'),!n.whiteSpace&&t?.includes(` +`)&&(n.whiteSpace="pre-wrap"),Object.keys(n).length>0?n:void 0}function gi(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function lD(e){return{command:e.command??"",args:e.args??[],flags:e.flags??{},target:e.target??"Dialog",autoRun:e.autoRun??!1}}function cD(e,t,n){var r;const s=((r=t?.resolveCommand)==null?void 0:r.call(t,e,n))??uD(e,n);return{request:e,operation:s}}function uD(e,t){const n=t1(e.command);if(n)return t.find(r=>{var s,i;const l=t1((s=r.operation["x-clicky"])==null?void 0:s.command);return l&&l===n?!0:t1((i=r.operation.operationId)==null?void 0:i.replaceAll("_","/"))===n})}function t1(e){return(e??"").trim().replace(/^\//,"").replace(/\s+/g,"/").replace(/\/+/g,"/").toLowerCase()}function H2(e,t){const n={...t.flags},r=[...t.args??[]],s=e.filter(l=>Hl(l));let i=0;for(const l of s){if(l.name==="args"){const u=r.slice(i);u.length>0&&(n.args=u.join(",")),i=r.length;continue}in.required&&(t[n.name]??"").trim()==="")}async function V_(e,t,n){return e.executeCommand(t.path,t.method,pi(Tl(n),t.operation.parameters??[]),{Accept:"application/json+clicky"})}function dD(e){const t=e.operation;if(!t)return;const n=H2(t.operation.parameters??[],e.request),r=pi(Tl(n),t.operation.parameters??[]),s=fD(t.path,r);return t.method.toUpperCase()!=="GET",s}function fD(e,t){const n=new URL(e,"http://localhost"),r={...t};for(const[s,i]of Object.entries(t))n.pathname.includes(`{${s}}`)&&(n.pathname=n.pathname.replace(`{${s}}`,encodeURIComponent(i)),delete r[s]);for(const[s,i]of Object.entries(r))n.searchParams.set(s,i);return`${n.pathname}${n.search}`}function H_(e){if(e==="_self")return"_self";if(e==="_window"||e==="_tab")return"_blank"}function Nw(e){return e!=null&&typeof e=="object"&&("stdout"in e||"output"in e||"message"in e)}function Gt(e){var t,n;return e?e.kind==="heading"||e.kind==="blockquote"?Gt(e.content)||e.plain||"":e.kind==="admonition"?[Gt(e.label),Gt(e.content)].filter(Boolean).join(" ")||e.plain||"":e.kind==="footnote-ref"?e.id?`[^${e.id}]`:e.plain||"":e.kind==="footnote"?Gt(e.content)||e.plain||"":e.kind==="footnotes"?(e.items??[]).map(r=>Gt(r)).join(" ")||e.plain||"":e.plain?e.plain:e.text?e.text:e.kind==="html"?D2(e.html??"").replace(/<[^>]+>/g," ").trim():e.kind==="code"?e.source??"":(e.kind==="link"||e.kind==="link-command")&&((t=e.children)!=null&&t.length)?[e.text,...e.children.map(r=>Gt(r))].join(""):e.kind==="button"&&e.label?Gt(e.label):e.kind==="button-group"?(e.items??[]).map(r=>Gt(r)).join(" "):e.kind==="text"&&((n=e.children)!=null&&n.length)?[e.text,...e.children.map(r=>Gt(r))].join(""):"":""}function Cw(e){return e.kind==="text"||e.kind==="link"||e.kind==="link-command"||e.kind==="icon"||e.kind==="html"||e.kind==="footnote-ref"||e.kind==="badge"||e.kind==="button"||e.kind==="button-group"}const mD=[{key:"result",label:"Result",grow:!0},{key:"status",label:"Status",shrink:!0},{key:"updated",label:"Updated",shrink:!0},{key:"details",label:"Details",grow:!0}];function Z_({response:e,loading:t=!1,loadingMessage:n="Loading execution results…",emptyMessage:r="No response yet.",ariaLabel:s,className:i,bare:l=!1,commandRuntime:u,onTableRowClick:d,getTableRowHref:f,isTableRowClickable:p,search:h,timeRange:x,externalFilters:v,pagination:y}){const b=e?.stdout||e?.output||"",j=e?.contentType||"application/json",S=w.useMemo(()=>{if(!e)return null;if(e.parsed!==void 0)return e.parsed;if(!b.trim())return null;try{return JSON.parse(b.trim())}catch{return null}},[e,b]);let N;e?N=o.jsx(pD,{text:b,parsed:S,contentType:j,bare:l,...e.requestUrl?{url:e.requestUrl}:{},...e.blob?{blob:e.blob}:{},...u?{commandRuntime:u}:{},...d?{onTableRowClick:d}:{},...f?{getTableRowHref:f}:{},...p?{isTableRowClickable:p}:{},...h?{search:h}:{},...x?{timeRange:x}:{},...v?{externalFilters:v}:{},...y?{pagination:y}:{}}):t?N=o.jsx(hD,{loadingMessage:n}):N=o.jsx("p",{className:"text-sm text-muted-foreground",children:r});const k=t&&e?o.jsx("div",{role:"status",className:"rounded-md border border-border bg-muted/40 px-3 py-1.5 text-xs text-muted-foreground",children:n}):null,T=l||!e?o.jsxs("div",{className:"space-y-2",children:[k,N]}):o.jsxs("div",{className:"space-y-3",children:[k,o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:e.success?"rounded-md border px-2 py-0.5 text-xs":"rounded-md bg-destructive px-2 py-0.5 text-xs text-destructive-foreground",children:e.success?"Success":"Failed"}),o.jsxs("span",{className:"rounded-md border px-2 py-0.5 font-mono text-xs",children:["exit ",e.exit_code]}),j!=="application/json"&&o.jsx("span",{className:"rounded-md bg-secondary px-2 py-0.5 font-mono text-xs text-secondary-foreground",children:j.split(";")[0]}),e.error&&o.jsx("span",{className:"text-sm text-destructive",children:e.error})]}),e.cli&&o.jsxs("pre",{className:"overflow-x-auto rounded-md bg-muted p-3 font-mono text-xs",children:["$ ",e.cli]}),N]});return s||i?o.jsx("div",{role:s?"region":void 0,"aria-label":s,"aria-busy":t||void 0,className:R("mt-3",i),children:T}):T}function pD({text:e,parsed:t,contentType:n,url:r,blob:s,bare:i,commandRuntime:l,onTableRowClick:u,getTableRowHref:d,isTableRowClickable:f,search:p,timeRange:h,externalFilters:x,pagination:v}){const y=(n.split(";")[0]??"").trim();if(y==="application/pdf"&&s)return o.jsx(gD,{blob:s});const b=typeof t=="string"||t!=null&&typeof t=="object"?t:e,j=b===""?null:wm(b);if(j?.ok||y==="application/clicky+json"||y==="application/json+clicky"){const S=o.jsx(tF,{data:j?.ok?j.document:t??e,...r?{url:r}:{},...l?{commandRuntime:l}:{},...u?{onTableRowClick:u}:{},...d?{getTableRowHref:d}:{},...f?{isTableRowClickable:f}:{},...p?{search:p}:{},...h?{timeRange:h}:{},...x?{externalFilters:x}:{},...v?{pagination:v}:{}}),N=o.jsx("div",{className:"detail-output",children:S});return i?N:o.jsx(n1,{defaultValue:"rendered",tabs:[{value:"rendered",label:"Rendered",content:N},{value:"raw",label:"Raw",content:o.jsx(Ef,{text:e})}]})}if(y==="text/html"){const S=o.jsx("iframe",{srcDoc:e,className:"h-[600px] w-full rounded-md border bg-background",sandbox:"allow-same-origin"});return i?S:o.jsx(n1,{defaultValue:"preview",tabs:[{value:"preview",label:"Preview",content:S},{value:"source",label:"Source",content:o.jsx(Ef,{text:e})}]})}if(t){const S=o.jsx(xD,{data:t});return i?S:o.jsx(n1,{defaultValue:"output",tabs:[{value:"output",label:"Output",content:S},{value:"raw",label:"Raw",content:o.jsx(Ef,{text:e})}]})}return e?o.jsx(Ef,{text:e}):o.jsx("p",{className:"py-4 text-sm text-muted-foreground",children:"No output"})}function hD({loadingMessage:e}){return o.jsx(c_,{data:[],columns:mD,loading:!0,loadingMessage:e,loadingRowCount:8,showGlobalFilter:!1,showDensityControl:!1,hideableColumns:!1,resizableColumns:!1,persistColumnWidths:!1,persistColumnVisibility:!1,persistDensity:!1})}function gD({blob:e}){const[t,n]=w.useState("");return w.useEffect(()=>{const r=URL.createObjectURL(e);return n(r),()=>URL.revokeObjectURL(r)},[e]),t?o.jsxs("div",{className:"space-y-2",children:[o.jsx("a",{href:t,download:"output.pdf",className:"inline-block rounded-md border px-3 py-1.5 text-sm hover:bg-accent",children:"Download PDF"}),o.jsx("iframe",{src:t,className:"h-[600px] w-full rounded-md border"})]}):null}function xD({data:e}){return o.jsx("div",{className:"overflow-auto rounded-md bg-muted p-4 font-mono text-xs",children:o.jsx(A0,{data:e,defaultOpenDepth:Number.MAX_SAFE_INTEGER})})}function Ef({text:e,variant:t="default"}){return o.jsx("pre",{className:`max-h-96 overflow-auto whitespace-pre-wrap rounded-md p-4 font-mono text-sm ${t==="error"?"bg-red-50 text-red-800 dark:bg-red-950 dark:text-red-200":"bg-muted"}`,children:e})}function n1({defaultValue:e,tabs:t}){const[n,r]=w.useState(e),s=t.find(i=>i.value===n)??t[0];return s?o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"inline-flex rounded-md border bg-muted p-1",children:t.map(i=>o.jsx("button",{type:"button",className:`rounded px-2 py-1 text-xs ${i.value===s.value?"bg-background text-foreground shadow-sm":"text-muted-foreground"}`,onClick:()=>r(i.value),children:i.label},i.value))}),o.jsx("div",{children:s.content})]}):null}function R0({ariaLabel:e="Response body",bare:t=!0,...n}){return o.jsx(Z_,{ariaLabel:e,bare:t,...n})}function vD(e){return e.replace(/\/\{[^{}]+\}$/,"")}function bD(e,t){return e.replace(/\{([^{}]+)\}/g,(n,r)=>{const s=t[r];return s!=null&&s!==""?encodeURIComponent(s):`{${r}}`})}function yD(e){const t={};for(const[n,r]of Object.entries(e))(typeof r=="string"||typeof r=="number")&&(t[n]=String(r));return t}function wD({client:e,action:t,lockedValues:n,initialValue:r,submitLabel:s="Save",onSuccess:i,formPre:l,formPost:u,footerActions:d,fallback:f}){const p=t.method.toUpperCase(),h=!!(e.getSchema&&e.submitForm&&_D(p)),x=vD(t.path),v=w.useMemo(()=>{const M=e.lookupFilterOptions;if(M)return async({descriptor:L,query:F,rootValue:U})=>{const z=k3(L,U),V=await M.call(e,L.url,"GET",L.filter,F,z);return Gf(V).map(X=>({value:X.value,label:X.label}))}},[e]),y=vn({queryKey:["entity-schema",x],queryFn:async()=>await e.getSchema(x)??null,enabled:h,staleTime:300*1e3,retry:0}),[b,j]=w.useState(r??{}),[S,N]=w.useState(""),[k,T]=w.useState(!1);if(!h)return o.jsx(o.Fragment,{children:f});if(y.isLoading)return o.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading form…"});const E=y.data;if(!E)return o.jsx(o.Fragment,{children:f});async function O(){if(e.submitForm){T(!0),N("");try{const M=bD(t.path,{...yD(b),...n}),L=await e.submitForm(M,p,b,{Accept:"application/json+clicky"});if(L.error){N(L.error);return}i?.(L)}catch(M){N(M instanceof Error?M.message:String(M??"Unknown error"))}finally{T(!1)}}}return o.jsxs("div",{className:"space-y-4",children:[o.jsx(vm,{schema:E,value:b,onChange:j,...l?{pre:l}:{},...u?{post:u}:{},...v?{lookupFetcher:v}:{}}),S&&o.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",children:S}),o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d?.({value:b,action:t}),o.jsx(Fe,{type:"button",onClick:O,disabled:k,children:k?"Saving…":s})]})]})}function _D(e){return e==="POST"||e==="PUT"||e==="PATCH"}function W_({actions:e,client:t,getLockedValues:n,onExecuted:r,initialValue:s,hideLockedInForm:i=!1,commandRuntime:l,formPre:u,formPost:d,formActions:f,className:p}){const[h,x]=w.useState(null),[v,y]=w.useState(null),[b,j]=w.useState(""),[S,N]=w.useState(!1),k=h?wi(h):void 0,T=h?n?.(h)??{}:{};function E(M){x(M),y(null),j("")}async function O(M){if(h){N(!0),j("");try{const L=await t.executeCommand(h.path,h.method,pi(M,h.operation.parameters??[]),{Accept:"application/json+clicky"});y(L),await r?.()}catch(L){y(null),j(L instanceof Error?L.message:String(L??"Unknown error"))}finally{N(!1)}}}return o.jsxs(o.Fragment,{children:[e.length>0&&o.jsx("div",{className:R("flex flex-wrap gap-2",p),children:e.map(M=>{const L=Dh(M),F=M.operation.summary||M.operation.description,U=F&&F!==L?`${L} — ${F}`:L;return o.jsx(Fe,{type:"button",variant:"outline",size:"sm",title:U,onClick:()=>E(M),children:L},`${M.method}:${M.path}`)})}),o.jsx(yi,{open:h!=null,onClose:()=>x(null),title:h?Dh(h):"Action",size:"lg",children:h&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ym,{method:h.method}),o.jsx("code",{className:"rounded-md bg-muted px-2 py-1 text-sm",children:h.path})]}),o.jsx(wD,{client:t,action:h,lockedValues:T,submitLabel:Dh(h),...s?{initialValue:s}:{},...u?{formPre:u}:{},...d?{formPost:d}:{},...f?{footerActions:f}:{},onSuccess:()=>{x(null),r?.()},fallback:o.jsx(m_,{client:t,path:h.path,method:h.method,parameters:h.operation.parameters??[],lockedValues:T,enableLookup:!!k?.supportsLookup,submitLabel:"Execute request",submittingLabel:"Executing…",isSubmitting:S,onSubmit:O,...i?{hideLocked:!0}:{}})}),b?o.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",children:b}):v?o.jsx(R0,{response:v,className:"mt-0",...l?{commandRuntime:l}:{}}):null]})})]})}function _m(e){return[...e.matchAll(/\{([^{}]+)\}/g)].map(t=>t[1]).filter(t=>!!t)}function Sw(e,t){const n=_m(t),r=n[0],s=new Set(e.map(l=>l.name)),i=e.filter(l=>!(l.name==="args"&&r!=null&&!s.has(r)));for(const l of n)s.has(l)||i.unshift({name:l,in:"path",required:!0,description:"Path parameter",schema:{type:"string"}});return i}function q_(e,t){const n=(t??"").trim();return!n||n==="[]"||n==="null"||jD(e)&&kD(n)?null:n}function jD(e){var t,n;const r=(n=(t=e.schema)==null?void 0:t.format)==null?void 0:n.toLowerCase(),s=`${e.name} ${e.description??""}`.toLowerCase();return r==="date"||r==="date-time"||s.includes("date")}function kD(e){return e.startsWith("0001-01-01")||e==="0001-01-01"}function Jf(e){return e?e.plain?e.plain:e.text?e.text:e.source?e.source:e.children?e.children.map(Jf).join(""):e.items?e.items.map(Jf).join(" "):e.fields?e.fields.map(t=>Jf(t.value)).join(" "):"":""}function ND(e){const t=["_id","id","ID","guid","GUID"];for(const n of t){const r=Jf(e.cells[n]);if(r)return r}}function CD(e){const t=e.trim().replace(/^\/api\/v1/,"").split("/").filter(Boolean);return t.length===0?"/":`/${t.join("/").replace(/\{([^{}]+)\}/g,":$1")}`}function K_(e,t=[],n={}){let r=CD(e.path);const s=new Set;if(_m(e.path).forEach((u,d)=>{const f=n[u]??t[d];f&&(s.add(u),r=r.replace(`:${u}`,encodeURIComponent(f)))}),r.includes(":"))return;const i=new URLSearchParams;for(const[u,d]of Object.entries(n))d&&!s.has(u)&&i.set(u,d);const l=i.toString();return l?`${r}?${l}`:r}function SD(e,t){var n;const r=(n=wi(e))==null?void 0:n.surface;return r?`/${encodeURIComponent(r)}/${encodeURIComponent(t)}`:K_(e,[],{id:t})}function ED(e){const{navigate:t}=A2(),n=w.useCallback(i=>{if(!e)return;const l=ND(i);if(l)return SD(e,l)},[e]),r=w.useCallback(i=>{const l=n(i);l&&t(l)},[n,t]),s=w.useCallback(i=>!!n(i),[n]);return{getRowHref:n,onRowClick:r,isRowClickable:s}}function G_({response:e,loading:t,loadingMessage:n,emptyMessage:r,ariaLabel:s,className:i,commandRuntime:l,detailOperation:u,filterConfig:d,pagination:f}){const p=ED(u),h=d?.filters;return o.jsx(R0,{response:e,...t!==void 0?{loading:t}:{},...n?{loadingMessage:n}:{},...r?{emptyMessage:r}:{},...s?{ariaLabel:s}:{},...i?{className:i}:{},...l?{commandRuntime:l}:{},...u?{getTableRowHref:p.getRowHref,onTableRowClick:p.onRowClick,isTableRowClickable:p.isRowClickable}:{},...h&&h.length>0?{externalFilters:h}:{},...d?.search?{search:d.search}:{},...d?.timeRange?{timeRange:d.timeRange}:{},...f?{pagination:f}:{}})}const TD=e=>`/commands/${e}`;function OD(e,t){const n=e instanceof Error?e.message:String(e??"");return o.jsxs("div",{className:"rounded-xl border border-destructive/40 bg-destructive/5 p-4 text-sm text-destructive",children:[o.jsx("div",{className:"font-medium",children:t}),n&&o.jsx("div",{className:"mt-1 whitespace-pre-wrap text-xs opacity-80",children:n})]})}function Ew({definition:e,entities:t,client:n,renderLink:r,allOperations:s=!1,surfaceKey:i,filterPre:l,getCommandHref:u=TD,renderError:d=OD,kind:f,commandRuntime:p,formPre:h,formPost:x,formActions:v,resultRenderer:y}){const{operations:b,isLoading:j}=_i(n),[S,N]=w.useState("table"),k=w.useMemo(()=>rd(b,i),[b,i]),T=k.length>0,E=w.useMemo(()=>T?k:s?b:D3(b,t),[s,t,b,k,T]),O=w.useMemo(()=>{if(T)return U3(E,i)},[E,i,T]),M=w.useMemo(()=>T?z3(E,i):void 0,[E,i,T]),[L,F]=w.useState(()=>MD()),U=O?.operation.parameters??[];w.useEffect(()=>{AD(L)},[L]);const z=vn({queryKey:["operation-list",O?.method,O?.path,L],queryFn:()=>n.executeCommand(O.path,O.method,pi(L,O.operation.parameters??[]),{Accept:"application/json+clicky"}),enabled:!!O&&S==="table",placeholderData:e9,staleTime:3e4,retry:0}),V=vn({queryKey:["operation-lookup",O?.method,O?.path,L],queryFn:async()=>{var $;return await(($=n.lookupFilters)==null?void 0:$.call(n,O.path,O.method,pi(L,U),{Accept:"application/json+clicky"}))??{filters:{}}},enabled:!!O&&S==="table"&&!!n.lookupFilters,staleTime:3e4,retry:0}),X=w.useMemo(()=>T?bR(E,i):[],[E,i,T]),H=w.useMemo(()=>{const $={includeLocations:["query"]};return V.data!=null&&($.lookup=V.data),F2(U,L,F,$)},[L,U,V.data]),B=w.useMemo(()=>u_(H.pagination,z.data),[H.pagination,z.data]),W=w.useMemo(()=>H.filters.map($=>xM($,l)),[H.filters,l]),se=!!O,P=se&&S==="table",J=f==="configuration"||e.key.startsWith("config-")?"Configuration":"Operations";function ne($){const Q=wi($);if(Q==null||!Q.supportsFilterMode)return{};const ae={};for(const ie of $.operation.parameters??[]){const de=L[ie.name];ie.in==="query"&&de&&(ae[ie.name]=de)}return Q.idParam&&(ae[Q.idParam]="all"),($.operation.parameters??[]).some(ie=>ie.name==="filter")&&(ae.filter=Object.entries(L).filter(([,ie])=>ie).map(([ie,de])=>`${ie}=${de}`).join(", ")||"current list filters"),ae}return j?o.jsxs("div",{className:"space-y-3",children:[o.jsx(r1,{className:"h-10 w-72"}),o.jsx(r1,{className:"h-4 w-[32rem]"}),Array.from({length:5}).map(($,Q)=>o.jsx(r1,{className:"h-12"},Q))]}):o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:J}),o.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:e.title}),o.jsx("p",{className:"mt-1 max-w-2xl text-sm text-muted-foreground",children:e.description})]}),se&&o.jsxs("div",{className:"flex gap-1 rounded-lg border p-1",children:[o.jsx(Fe,{type:"button",variant:S==="table"?"secondary":"ghost",size:"sm",className:"h-7 w-7 p-0","aria-label":"Table view","aria-pressed":S==="table",onClick:()=>N("table"),children:o.jsx(K,{icon:v2})}),o.jsx(Fe,{type:"button",variant:S==="endpoints"?"secondary":"ghost",size:"sm",className:"h-7 w-7 p-0","aria-label":"Endpoint list view","aria-pressed":S==="endpoints",onClick:()=>N("endpoints"),children:o.jsx(K,{icon:xm})})]})]}),o.jsx(W_,{actions:X,client:n,getLockedValues:ne,onExecuted:()=>{z.refetch()},...p?{commandRuntime:p}:{},...h?{formPre:h}:{},...x?{formPost:x}:{},...v?{formActions:v}:{}}),P?o.jsx(o.Fragment,{children:z.isError&&!z.data?d(z.error,`Failed to load ${O?.path??""}`):(()=>{const $=o.jsx(G_,{response:z.data??null,loading:z.isFetching,loadingMessage:`Loading ${e.title} results…`,emptyMessage:"No records returned",ariaLabel:`${e.title} results`,className:"mt-0",detailOperation:M,filterConfig:{filters:W,...H.search?{search:H.search}:{},...H.timeRange?{timeRange:H.timeRange}:{}},...p?{commandRuntime:p}:{},...B?{pagination:B}:{}});return y?y({response:z.data??null,defaultView:$,...i?{surfaceKey:i}:{}}):$})()}):o.jsx(HR,{operations:E,definition:e,renderLink:r,getCommandHref:u})]})}function MD(){if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search),t={};for(const[n,r]of e.entries())n.startsWith("__")||r!==""&&(t[n]=r);return t}function r1({className:e}){return o.jsx("div",{className:`animate-pulse rounded-md bg-muted ${e??""}`.trim()})}function AD(e){if(typeof window>"u")return;const t=LD();for(const[s,i]of Object.entries(e))i!==""&&t.set(s,i);const n=t.toString(),r=`${window.location.pathname}${n?`?${n}`:""}${window.location.hash}`;r!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,"",r)}function LD(){const e=new URLSearchParams(window.location.search),t=new URLSearchParams;for(const[n,r]of e.entries())n.startsWith("__")&&(n==="__autoRun"||n.startsWith("__arg")||t.append(n,r));return t}const J_="autoRun",kg="__arg";function ll(e){if(e.length<=1)return e;let t=e.length;for(;t>0&&e[t-1]==="/";)t--;return e.slice(0,t)}function Ji(e,t){const n=ll(e);return!n||n==="/"?t:`${n}${t}`}function Tw(e,t){var n,r;const s=((n=t.operation)==null?void 0:n.operation.operationId)??t.request.command;if(!s)return;const i=(r=t.operation)==null?void 0:r.operation["x-clicky"],l=t.request.args??[],u=t.request.flags??{};if(i?.verb==="get"&&i?.scope==="entity"&&i.surface&&l[0]){const h=new URLSearchParams;for(const[y,b]of Object.entries(u))b!==void 0&&b!==""&&h.set(y,b);const x=h.toString(),v=x?`?${x}`:"";return Ji(e,`/${encodeURIComponent(i.surface)}/${encodeURIComponent(l[0])}${v}`)}const d=new URLSearchParams;l.forEach((h,x)=>{h!==void 0&&h!==""&&d.set(`${kg}${x}`,h)});for(const[h,x]of Object.entries(u))x!==void 0&&x!==""&&d.set(h,x);t.request.autoRun&&d.set(J_,"1");const f=d.toString(),p=f?`?${f}`:"";return Ji(e,`/commands/${encodeURIComponent(s)}${p}`)}function RD(e,t){return{...e,[t.name]:t.value}}function Q_({parameters:e,onExecute:t,isPending:n,method:r,path:s,accept:i,initialValues:l}){const[u,d]=w.useReducer(RD,{parameters:e,path:s,initialValues:l},({parameters:y,path:b,initialValues:j})=>FD(Sw(y,b),b,j)),f=Sw(e,s),p=f.filter(y=>!(y.in==="path"&&l?.[y.name])),h=new Set(f.filter(Hl).map(y=>y.name)),x=p.length>=PD;function v(y){y.preventDefault();const b={},j=[];for(const S of f){const N=q_(S,u[S.name]);N!=null&&(h.has(S.name)?j.push(...BD(N)):b[S.name]=N)}j.length>0&&(b.args=j.join(",")),t(b,{Accept:i})}return o.jsxs("form",{onSubmit:v,className:"space-y-4",children:[p.length>0&&o.jsx("div",{className:x?"grid gap-2":"grid gap-4",children:p.map(y=>o.jsx(ID,{param:y,value:u[y.name]||"",inline:x,onChange:b=>d({name:y.name,value:b})},y.name))}),o.jsx("div",{className:x?"sticky bottom-0 z-10 -mx-2 flex justify-end border-t border-border bg-background/95 px-2 py-3 backdrop-blur-sm":"flex justify-end",children:o.jsx(Fe,{type:"submit",disabled:n,children:n?"Executing...":"Execute"})})]})}const PD=6;function ID({param:e,value:t,inline:n,onChange:r}){const s=e.schema,i=`param-${e.name}`;if(UD(e))return o.jsx(Uc,{param:e,fieldId:i,inline:n,children:o.jsx($D,{id:i,value:t,placeholder:C0(e)||e.name,onChange:r})});if(s?.enum)return o.jsx(Uc,{param:e,fieldId:i,inline:n,children:o.jsxs("select",{id:i,value:t,className:s1,onChange:u=>r(u.target.value),children:[o.jsxs("option",{value:"",children:["Select ",e.name]}),s.enum.map(u=>o.jsx("option",{value:String(u),children:String(u)},String(u)))]})});if(s?.type==="boolean"){const u=o.jsx("input",{id:i,type:"checkbox",className:"h-4 w-4 accent-primary",checked:t==="true",onChange:d=>r(d.target.checked?"true":"false")});return n?o.jsx(Uc,{param:e,fieldId:i,inline:!0,children:o.jsx("div",{className:"flex h-9 items-center",children:u})}):o.jsxs("div",{className:"flex items-center gap-2",children:[u,o.jsxs("label",{htmlFor:i,className:"text-sm font-medium",children:[e.name,e.required&&o.jsx("span",{className:"text-destructive",children:" *"})]}),e.description&&o.jsx("span",{className:"text-xs text-muted-foreground",children:e.description})]})}if(Y_(e)){const u=s?.format==="date-time";return o.jsx(Uc,{param:e,fieldId:i,inline:n,children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{id:i,type:u?"datetime-local":"date",value:HD(t,u),className:s1,onChange:d=>r(ZD(d.target.value,u))}),t&&o.jsx(Fe,{type:"button",variant:"outline",size:"sm","aria-label":`Clear ${e.name}`,onClick:()=>r(""),children:o.jsx(K,{icon:Tn})})]})})}const l=s?.type==="integer"||s?.type==="number"?"number":"text";return o.jsx(Uc,{param:e,fieldId:i,inline:n,children:o.jsx("input",{id:i,type:l,value:t,className:s1,onChange:u=>r(u.target.value),placeholder:s?.default!=null?String(s.default):C0(e)||e.name})})}function $D({id:e,value:t,placeholder:n,onChange:r}){const s=zD(t);function i(d,f){const p=d.split(",").map(h=>h.trim()).filter(Boolean);p.length!==0&&(r(Mw([...s,...p])),f.value="")}function l(d){r(Mw(s.filter((f,p)=>p!==d)))}function u(d){const f=d.currentTarget;if(d.key==="Enter"||d.key===","){d.preventDefault(),i(f.value,f);return}d.key==="Backspace"&&f.value===""&&s.length>0&&l(s.length-1)}return o.jsxs("div",{className:"flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent px-2 py-1 shadow-sm",children:[s.map((d,f)=>o.jsxs("span",{className:"inline-flex h-6 max-w-full items-center gap-1 rounded-md bg-muted px-2 text-xs",children:[o.jsx("span",{className:"truncate",children:d}),o.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground","aria-label":`Remove ${d}`,onClick:()=>l(f),children:o.jsx(K,{icon:Tn})})]},`${d}-${f}`)),o.jsx("input",{id:e,className:"min-w-32 flex-1 bg-transparent px-1 py-1 text-sm outline-none",placeholder:s.length===0?n:"",onKeyDown:u,onBlur:d=>i(d.currentTarget.value,d.currentTarget)})]})}function Uc({param:e,fieldId:t,inline:n,children:r}){const s=o.jsxs("label",{htmlFor:t,className:"text-sm font-medium",children:[e.name,e.required&&o.jsx("span",{className:"text-destructive",children:" *"})]});return n?o.jsxs("div",{className:"grid grid-cols-[10rem_1fr] items-start gap-x-3 gap-y-0.5",children:[o.jsx("div",{className:"flex h-9 items-center",children:s}),o.jsx("div",{className:"min-w-0",children:r}),e.description&&o.jsx("p",{className:"col-start-2 text-xs text-muted-foreground",children:e.description})]}):o.jsxs("div",{className:"space-y-1.5",children:[s,r,e.description&&o.jsx("p",{className:"text-xs text-muted-foreground",children:e.description})]})}function FD(e,t,n){const r={};for(const s of e)r[s.name]=DD(s,n?.[s.name]);for(const s of _m(t))r[s]==null&&(r[s]=n?.[s]??"");return r}function DD(e,t){var n;if(t!=null)return Ow(e,t);const r=(n=e.schema)==null?void 0:n.default;return r==null?"":Ow(e,String(r))}function Ow(e,t){const n=t.trim();return n==="[]"||n==="null"||Y_(e)&&VD(n)?"":t}function BD(e){try{const t=JSON.parse(e);if(Array.isArray(t))return t.map(String).filter(Boolean)}catch{}return e.split(",").map(t=>t.trim()).filter(Boolean)}function UD(e){var t,n;const r=`${e.name} ${e.description??""}`.toLowerCase();return((t=e.schema)==null?void 0:t.type)==="array"||String(((n=e.schema)==null?void 0:n.default)??"")==="[]"||r.includes("repeatable")}function zD(e){const t=e.trim();if(!t||t==="[]"||t==="null")return[];try{const n=JSON.parse(t);if(Array.isArray(n))return n.map(String).filter(Boolean)}catch{}return t.split(",").map(n=>n.trim()).filter(Boolean)}function Mw(e){return e.join(",")}function Y_(e){var t,n;const r=(n=(t=e.schema)==null?void 0:t.format)==null?void 0:n.toLowerCase(),s=`${e.name} ${e.description??""}`.toLowerCase();return r==="date"||r==="date-time"||s.includes("date")}function VD(e){return e.startsWith("0001-01-01")||e==="0001-01-01"}function HD(e,t){if(!e||e.startsWith("0001-01-01"))return"";if(!t)return e.slice(0,10);const n=new Date(e);if(Number.isNaN(n.getTime()))return e.slice(0,16);const r=n.getTimezoneOffset()*6e4;return new Date(n.getTime()-r).toISOString().slice(0,16)}function ZD(e,t){if(!e)return"";if(!t)return e;const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toISOString()}const s1="h-9 w-full min-w-0 rounded-md border border-input bg-background px-2 text-sm text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring";function X_({title:e,error:t,className:n}){const r=t instanceof Error?t.message:String(t??""),s=WD(t),i=!!(s.responseBody||s.status||s.url);return o.jsxs("div",{className:R("rounded-xl border border-dashed border-red-300 p-6 text-sm",n),children:[o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"font-medium text-red-600",children:e}),r&&o.jsx("div",{className:"mt-1 text-muted-foreground",children:r})]}),i&&o.jsxs("details",{className:"group mt-3",children:[o.jsxs("summary",{className:"flex cursor-pointer items-center justify-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[o.jsx(K,{icon:ds,className:"transition-transform group-open:rotate-90"}),"More details"]}),o.jsxs("div",{className:"mt-2 space-y-2 text-left font-mono text-xs",children:[(s.method||s.url||s.status)&&o.jsxs("div",{className:"text-muted-foreground",children:[s.method&&o.jsxs("span",{children:[s.method," "]}),s.url,s.status!=null&&o.jsxs("span",{children:[" - ",s.status]})]}),s.responseBody&&o.jsx("pre",{className:"max-h-64 overflow-auto rounded-md bg-muted p-2 text-xs",children:s.responseBody})]})]})]})}function WD(e){if(e==null||typeof e!="object")return{};const t=e,n={};return typeof t.method=="string"&&(n.method=t.method),typeof t.url=="string"&&(n.url=t.url),typeof t.status=="number"&&(n.status=t.status),typeof t.responseBody=="string"&&(n.responseBody=t.responseBody),n}const ju=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("g",{fill:"none",children:o.jsx("path",{d:"M13.5 7.13397C14.1667 7.51888 14.1667 8.48112 13.5 8.86602L4.5 14.0622C3.83333 14.4471 3 13.966 3 13.1962L3 2.80385C3 2.03405 3.83333 1.55292 4.5 1.93782L13.5 7.13397Z",fill:"#F2FCF3",stroke:"#208A3C"})})}),{__source:"jb-expui-run:run",__viewBox:"0 0 16 16",__group:"runtime-process",__consumerName:"play",displayName:"UiPlay"});function qD({operation:e,client:t,initialValues:n,label:r,defaultAccept:s="application/clicky+json",onNavigateAction:i}){const[l,u]=w.useState(!1),[d,f]=w.useState(!1),[p,h]=w.useState(null),[x,v]=w.useState(null);async function y(b,j){if(i){const S=KD(e.path,b);if(!S)return;const N=S.includes("?")?"&":"?";i(`${S}${N}autoRun=1`);return}f(!0),v(null),h(null);try{const S=await t.executeCommand(e.path,e.method,b,j);h(S)}catch(S){v(S)}finally{f(!1)}}return o.jsxs(o.Fragment,{children:[o.jsxs(Fe,{type:"button",variant:"outline",size:"sm",onClick:()=>u(!0),children:[o.jsx(K,{icon:ju}),r]}),o.jsx(yi,{open:l,onClose:()=>u(!1),title:r,size:"lg",children:o.jsxs("div",{className:"space-y-4",children:[o.jsx(Q_,{parameters:e.operation.parameters??[],onExecute:y,isPending:d,method:e.method,path:e.path,accept:s,initialValues:n}),x?o.jsx(X_,{title:`Failed to execute ${e.path}`,error:x}):p?o.jsx(Z_,{response:p}):null]})})]})}function KD(e,t){const n={...t},r=QD(t.args);let s=GD(e);for(const[u,d]of JD(e).entries()){const f=n[d]||r[u];if(!f)return;s=s.replace(`:${d}`,encodeURIComponent(f)),delete n[d],!n[d]&&f===r[u]&&delete n.args}const i=new URLSearchParams;for(const[u,d]of Object.entries(n))d&&u!=="autoRun"&&u!=="__autoRun"&&i.set(u,d);const l=i.toString();return l?`${s}?${l}`:s}function GD(e){const t=e.trim().replace(/^\/api\/v1\/?/,"").replace(/^\/+/,"").replace(/\/+$/,"");return t?`/${t.replace(/\{([^}]+)\}/g,":$1")}`:"/"}function JD(e){return[...e.matchAll(/\{([^}]+)\}/g)].map(t=>t[1]).filter(t=>!!t)}function QD(e){if(!e)return[];const t=e.trim();if(!t||t==="[]"||t.toLowerCase()==="null")return[];try{const n=JSON.parse(t);if(Array.isArray(n))return n.map(String).filter(Boolean)}catch{}return t.split(",").map(n=>n.trim()).filter(Boolean)}const o1="application/clicky+json",YD={};function ej({client:e,operationId:t,operation:n,operations:r=n?[n]:[],initialValues:s=YD,autoRun:i,backHref:l,backLabel:u="Back",renderLink:d,onNavigate:f,onResult:p,commandRuntime:h,hideLockedPathFilters:x=!!n,className:v}){const y=yI(e,n?void 0:t),b=n??y.operation,j=n?!1:y.isLoading,[S,N]=w.useState(!1),[k,T]=w.useState(null),[E,O]=w.useState(null),[M,L]=w.useState(!1),F=b?.operation.parameters??[],U=(b?.method??"").toUpperCase()==="GET",z=b?i??U:!1,V=JSON.stringify(F.map(we=>{var ke;return{name:we.name,in:we.in,required:we.required??!1,default:((ke=we.schema)==null?void 0:ke.default)??null}})),X=`${b?.method??""}:${b?.path??""}:${b?.operation.operationId??""}`,H=w.useMemo(()=>b?pg(F,b.method,{},{...nB(F),...Lw(s)}):Lw(s),[s,b?.method,V]),B=F.filter(we=>we.in==="path"),W=w.useMemo(()=>{const we={};for(const ke of B){const Ne=H[ke.name];typeof Ne=="string"&&Ne.trim()!==""&&(we[ke.name]=Ne)}return we},[H,B]),se=w.useMemo(()=>b?eB(b,r):void 0,[b,r]),P=w.useMemo(()=>b?XD(b,r,W):[],[W,b,r]),[J,ne]=w.useState(H);w.useEffect(()=>{ne(H)},[H]);const $=d_(J,250);w.useEffect(()=>{!U||!b||rB($,F)},[U,X,$,V]);const Q=vn({queryKey:["operation-query-lookup",b?.method,b?.path,$],queryFn:async()=>{var we;return b?await((we=e.lookupFilters)==null?void 0:we.call(e,b.path,b.method,pi($,F),{Accept:"application/json+clicky"}))??{filters:{}}:{filters:{}}},enabled:U&&!!b&&!!e.lookupFilters&&F.some(we=>we.in==="query"),staleTime:3e4,retry:0}),ae=w.useMemo(()=>U?F2(F,J,ne,{lookup:Q.data,lockedValues:W,hideLocked:x}):{filters:[]},[U,F,J,Q.data,W,x]),ie=w.useMemo(()=>u_(ae.pagination,k),[ae.pagination,k]),de=w.useRef("");async function ge(we){if(b){N(!0),O(null);try{const ke=await e.executeCommand(b.path,b.method,pi(we,b.operation.parameters??[]),{Accept:o1});T(ke),p?.(ke,b,we)}catch(ke){T(null),O(ke)}finally{N(!1)}}}w.useEffect(()=>{L(!1),T(null),O(null),de.current=""},[z,X]),w.useEffect(()=>{!z||!b||M||F.filter(ke=>ke.required?(H[ke.name]??"").trim()==="":!1).length>0||(L(!0),de.current=JSON.stringify(Tl(H)),ge(H))},[z,H,M,X,V]),w.useEffect(()=>{if(!U||!b||!M)return;const we={...$,...W};if(F.filter(xe=>xe.required?(we[xe.name]??"").trim()==="":!1).length>0)return;const Ne=JSON.stringify(Tl(we));de.current!==Ne&&(de.current=Ne,ge(we))},[U,M,$,W,V]);const ve=l==null?null:d?d({to:l,className:"text-sm text-primary underline-offset-4 hover:underline",children:u}):o.jsx("a",{href:l,className:"text-sm text-primary underline-offset-4 hover:underline",children:u});if(j)return o.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading operation..."});if(!b)return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"text-sm text-muted-foreground",children:["Unknown operation: ",o.jsx("code",{children:t})]}),ve]});const{path:Le,method:je,operation:Ue}=b;return o.jsxs("div",{className:v??"min-w-0 flex-1 space-y-6 p-6",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"min-w-0 flex-1",children:[ve,o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ym,{method:je}),o.jsx("h1",{className:"truncate text-xl font-bold",children:Ue.summary||Ue.operationId||Le})]}),o.jsx("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:Le}),Ue.operationId&&Ue.summary&&o.jsx("p",{className:"mt-2 font-mono text-xs text-muted-foreground",children:Ue.operationId}),Ue.description&&Ue.description!==Ue.summary&&o.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:Ue.description})]}),o.jsx("div",{className:"flex shrink-0 flex-col items-end gap-3",children:P.length>0&&o.jsx("div",{className:"flex flex-wrap justify-end gap-2",children:P.map(we=>we.href?d?d({key:`${we.operation.method}:${we.operation.path}`,to:we.href,className:"inline-flex h-8 items-center justify-center gap-2 rounded-md border border-input bg-background px-3 text-xs font-medium hover:bg-accent hover:text-accent-foreground",children:we.label}):o.jsx("a",{href:we.href,className:"inline-flex h-8 items-center justify-center gap-2 rounded-md border border-input bg-background px-3 text-xs font-medium hover:bg-accent hover:text-accent-foreground",children:we.label},`${we.operation.method}:${we.operation.path}`):o.jsx(qD,{operation:we.operation,client:e,initialValues:W,label:we.label,defaultAccept:o1,...f?{onNavigateAction:f}:{}},`${we.operation.method}:${we.operation.path}`))})})]}),je.toUpperCase()!=="GET"&&o.jsx("section",{className:"space-y-3",children:o.jsx("div",{className:"rounded-lg border p-4",children:o.jsx(Q_,{parameters:F,onExecute:we=>ge(we),isPending:S,method:je,path:Le,accept:o1,initialValues:H})})}),E?o.jsx(X_,{title:`Failed to load ${Le}`,error:E}):S||k?o.jsx(G_,{response:k,loading:S,loadingMessage:"Loading execution results…",ariaLabel:"Response body",detailOperation:se,...h?{commandRuntime:h}:{},...U&&z?{filterConfig:{filters:ae.filters,...ae.timeRange?{timeRange:ae.timeRange}:{}}}:{},...U&&z&&ie?{pagination:ie}:{}}):null]})}function XD(e,t,n){if(e.method.toUpperCase()!=="GET")return[];if(!Aw(e.path,n))return[];const r=e.path.replace(/\/+$/,"");return t.filter(s=>{if(s===e||!s.path.startsWith(`${r}/`)||!Aw(s.path,n))return!1;const i=s.method.toUpperCase();return i==="GET"||i==="POST"||i==="PUT"||i==="DELETE"}).map(s=>{const l=s.method.toUpperCase()==="GET"?K_(s,[],n):void 0;return{operation:s,label:tB(s),...l?{href:l}:{}}}).filter(s=>s.operation.method.toUpperCase()!=="GET"||s.href)}function eB(e,t){const n=e.method.toUpperCase(),r=`${e.path.replace(/\/+$/,"")}/{id}`;return t.find(s=>{var i;return s.method.toUpperCase()===n&&s.path===r&&((i=s.operation.parameters)==null?void 0:i.some(l=>l.in==="path"&&l.name==="id"&&l.required))})}function Aw(e,t){return _m(e).every(n=>!!t[n])}function tB(e){var t;const n=((t=e.operation["x-clicky"])==null?void 0:t.actionName)||e.path.split("/").filter(Boolean).at(-1)||e.operation.operationId||e.method;return M0(n.replace(/[_-]+/g," "))}function Lw(e){const t={};for(const[n,r]of Object.entries(e))n==="autoRun"||n.startsWith("__")||(t[n]=r);return t}function nB(e){if(typeof window>"u")return{};const t=new Set(e.filter(s=>s.in==="query").map(s=>s.name));if(t.size===0)return{};const n={},r=new URLSearchParams(window.location.search);for(const s of t){const i=r.get(s);i!=null&&i!==""&&(n[s]=i)}return n}function rB(e,t){if(typeof window>"u")return;const n=t.filter(u=>u.in==="query");if(n.length===0)return;const r=new URLSearchParams(window.location.search);for(const u of n){const d=q_(u,e[u.name]);d==null?r.delete(u.name):r.set(u.name,d)}const s=r.toString(),i=`${window.location.pathname}${s?`?${s}`:""}${window.location.hash}`,l=`${window.location.pathname}${window.location.search}${window.location.hash}`;i!==l&&window.history.replaceState(window.history.state,"",i)}function sB(e,t){const n=e instanceof Error?e.message:String(e??"");return o.jsxs("div",{className:"rounded-xl border border-destructive/40 bg-destructive/5 p-4 text-sm text-destructive",children:[o.jsx("div",{className:"font-medium",children:t}),n&&o.jsx("div",{className:"mt-1 whitespace-pre-wrap text-xs opacity-80",children:n})]})}function oB({id:e,definition:t,entities:n,client:r,renderLink:s,allOperations:i=!1,operationIdPrefix:l,listOperationId:u,detailOperationId:d,surfaceKey:f,backHref:p,backLabel:h="Back",renderError:x=sB,commandRuntime:v,formPre:y,formPost:b,formActions:j}){const{operations:S,isLoading:N}=_i(r),k=w.useMemo(()=>rd(S,f),[S,f]),T=k.length>0,E=w.useMemo(()=>T?k:(i?S:D3(S,n)).filter(B=>l?(B.operation.operationId??"").startsWith(l):!0),[i,n,l,S,k,T]),O=w.useMemo(()=>T?U3(E,f):(u?E.find(W=>W.method==="get"&&W.operation.operationId===u):void 0)??pR(E,n),[E,n,u,f,T]),M=w.useMemo(()=>T?z3(E,f):d?E.find(B=>B.method==="get"&&B.operation.operationId===d):hR(E,O),[d,E,O,f,T]),L=w.useMemo(()=>{var B,W;return((W=(B=M?.operation.parameters)==null?void 0:B.find(se=>se.in==="path"))==null?void 0:W.name)??"id"},[M]),F=w.useMemo(()=>e?{[L]:e}:{},[e,L]),U=w.useMemo(()=>T?yR(E,f):M==null?[]:E.filter(B=>B.method!=="get"&&B.path.startsWith(`${M.path}/`)),[E,M,f,T]),z=vn({queryKey:["entity-detail",t.key,e,M?.path],queryFn:async()=>r.executeCommand(M.path,M.method,F,{Accept:"application/json+clicky"}),enabled:!!M&&!!e,staleTime:3e4,retry:0}),V=vn({queryKey:["entity-detail-raw",t.key,e,M?.path],queryFn:async()=>r.executeCommand(M.path,M.method,F,{Accept:"application/json"}),enabled:!!M&&!!e,staleTime:3e4,retry:0}),X=w.useMemo(()=>{var B;const W=(B=V.data)==null?void 0:B.parsed;return W&&typeof W=="object"&&!Array.isArray(W)?W:void 0},[V.data]),H=p==null?null:s?s({to:p,className:"text-sm text-primary underline-offset-4 hover:underline",children:h}):o.jsx("a",{href:p,className:"text-sm text-primary underline-offset-4 hover:underline",children:h});return N?o.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading entity…"}):!M||!e?o.jsxs("div",{className:"space-y-4",children:[H,o.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown entity detail route."})]}):o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"flex items-start justify-between gap-4",children:o.jsxs("div",{className:"min-w-0 space-y-2",children:[H,o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ym,{method:M.method}),o.jsx("code",{className:"rounded-md bg-muted px-2 py-1 text-sm",children:M.path})]}),o.jsxs("div",{children:[o.jsxs("h1",{className:"text-2xl font-semibold tracking-tight",children:[t.title,": ",e]}),o.jsx("p",{className:"mt-1 max-w-3xl text-sm text-muted-foreground",children:t.description})]})]})}),o.jsx(W_,{actions:U,client:r,getLockedValues:()=>({[L]:e}),onExecuted:()=>{z.refetch()},hideLockedInForm:!0,...X?{initialValue:X}:{},...v?{commandRuntime:v}:{},...y?{formPre:y}:{},...b?{formPost:b}:{},...j?{formActions:j}:{}}),z.isLoading?o.jsxs("section",{className:"rounded-xl border bg-card p-4",children:[o.jsx("h2",{className:"text-lg font-medium",children:"Entity detail"}),o.jsx(R0,{loading:!0,loadingMessage:"Loading entity detail…"})]}):z.isError?x(z.error,`Failed to load ${M.path}`):o.jsxs("section",{className:"rounded-xl border bg-card p-4",children:[o.jsx("h2",{className:"text-lg font-medium",children:"Entity detail"}),o.jsx(R0,{response:z.data??null,...v?{commandRuntime:v}:{}})]})]})}const Rw=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1-4 0v-4a2 2 0 0 1 2-2m5 0v8h4m-8-1l1 1M3 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1"})}),{__source:"tabler:sql",__viewBox:"0 0 24 24",__group:"uir-sql",__consumerName:"uir-sql-query",displayName:"UiSqlQuery"}),fr=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M126 128a6 6 0 0 1-2.25 4.69l-40 32a6 6 0 0 1-7.5-9.38L110.4 128l-34.15-27.31a6 6 0 1 1 7.5-9.38l40 32A6 6 0 0 1 126 128m50 26h-40a6 6 0 0 0 0 12h40a6 6 0 0 0 0-12m54-98v144a14 14 0 0 1-14 14H40a14 14 0 0 1-14-14V56a14 14 0 0 1 14-14h176a14 14 0 0 1 14 14m-12 0a2 2 0 0 0-2-2H40a2 2 0 0 0-2 2v144a2 2 0 0 0 2 2h176a2 2 0 0 0 2-2Z"})}),{__source:"ph:terminal-window-light",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"terminal",displayName:"UiTerminal"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m-91 94.25l-40 32a8 8 0 1 1-10-12.5L107.19 128L75 102.25a8 8 0 1 1 10-12.5l40 32a8 8 0 0 1 0 12.5M176 168h-40a8 8 0 0 1 0-16h40a8 8 0 0 1 0 16"})}),{__source:"ph:terminal-window-fill",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"terminal",displayName:"UiTerminalFilled"});const Ng=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M180 146h-22v-36h22a34 34 0 1 0-34-34v22h-36V76a34 34 0 1 0-34 34h22v36H76a34 34 0 1 0 34 34v-22h36v22a34 34 0 1 0 34-34m-22-70a22 22 0 1 1 22 22h-22ZM54 76a22 22 0 0 1 44 0v22H76a22 22 0 0 1-22-22m44 104a22 22 0 1 1-22-22h22Zm12-70h36v36h-36Zm70 92a22 22 0 0 1-22-22v-22h22a22 22 0 0 1 0 44"})}),{__source:"ph:command-light",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"command",displayName:"UiCommand"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M116 116h24v24h-24ZM86 72a14 14 0 0 0 0 28h14V86a14 14 0 0 0-14-14m98 14a14 14 0 0 0-28 0v14h14a14 14 0 0 0 14-14M72 170a14 14 0 0 0 28 0v-14H86a14 14 0 0 0-14 14M224 48v160a16 16 0 0 1-16 16H48a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16m-68 92v-24h14a30 30 0 1 0-30-30v14h-24V86a30 30 0 1 0-30 30h14v24H86a30 30 0 1 0 30 30v-14h24v14a30 30 0 1 0 30-30Zm0 30a14 14 0 1 0 14-14h-14Z"})}),{__source:"ph:command-fill",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"command",displayName:"UiCommandFilled"});const iB=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 32 32",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M6.398 0A6.407 6.407 0 0 0 0 6.398a6.402 6.402 0 0 0 5.559 6.34l-2.18 2.16a.66.66 0 0 0 0 .922c.25.25.672.25.922 0l1.46-1.48v4.86H.642a.642.642 0 0 0-.641.64v11.52c0 .355.29.64.64.64h11.52a.635.635 0 0 0 .453-.187.635.635 0 0 0 .188-.454V19.84a.641.641 0 0 0-.64-.64H7.038v-4.86L8.5 15.82c.125.125.293.18.46.18a.653.653 0 0 0 .462-.18.668.668 0 0 0 0-.922l-2.18-2.16a6.392 6.392 0 0 0 5.52-5.699h4.898L16.18 8.5a.66.66 0 0 0 0 .922c.125.125.297.18.46.18a.653.653 0 0 0 .462-.18L19.52 7l5.44 5.441v5.22L23.5 16.18a.66.66 0 0 0-.922 0 .668.668 0 0 0 0 .922l2.184 2.16a6.405 6.405 0 0 0-5.563 6.34A6.407 6.407 0 0 0 25.602 32 6.407 6.407 0 0 0 32 25.602a6.402 6.402 0 0 0-5.559-6.34l2.18-2.16a.66.66 0 0 0 0-.922.66.66 0 0 0-.922 0l-1.46 1.48v-5.219L31.82 6.86a.656.656 0 0 0 0-.918L26.06.18a.656.656 0 0 0-.918 0L19.52 5.8l-2.418-2.42a.66.66 0 0 0-.922 0 .66.66 0 0 0 0 .922l1.48 1.46h-4.902A6.392 6.392 0 0 0 6.398 0"})}),{__source:"incumbent",__viewBox:"0 0 32 32",__group:"playbooks-workflows",__consumerName:"workflow",displayName:"UiWorkflow"}),aB=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M229.18 173a6 6 0 0 1-2.16 8.2l-96 56a6 6 0 0 1-6 0l-96-56a6 6 0 0 1 6-10.36l93 54.23l93-54.23a6 6 0 0 1 8.16 2.16M221 122.82l-93 54.23l-93-54.23a6 6 0 0 0-6 10.36l96 56a6 6 0 0 0 6 0l96-56a6 6 0 0 0-6-10.36M26 80a6 6 0 0 1 3-5.18l96-56a6 6 0 0 1 6 0l96 56a6 6 0 0 1 0 10.36l-96 56a6 6 0 0 1-6 0l-96-56A6 6 0 0 1 26 80m17.91 0L128 129.05L212.09 80L128 31Z"})}),{__source:"ph:stack-light",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"boxes",displayName:"UiBoxes"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"currentColor",children:[o.jsx("path",{d:"m220 169.09l-92 53.65l-92-53.65a8 8 0 0 0-8 13.82l96 56a8 8 0 0 0 8.06 0l96-56a8 8 0 1 0-8.06-13.82"}),o.jsx("path",{d:"m220 121.09l-92 53.65l-92-53.65a8 8 0 0 0-8 13.82l96 56a8 8 0 0 0 8.06 0l96-56a8 8 0 1 0-8.06-13.82"}),o.jsx("path",{d:"m28 86.91l96 56a8 8 0 0 0 8.06 0l96-56a8 8 0 0 0 0-13.82l-96-56a8 8 0 0 0-8.06 0l-96 56a8 8 0 0 0 0 13.82"})]})}),{__source:"ph:stack-fill",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"boxes",displayName:"UiBoxesFilled"});const P0=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"})}),{__source:"lucide:activity",__viewBox:"0 0 24 24",__group:"ui-controls",__consumerName:"activity",displayName:"UiActivity"}),Pw=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M230 208a6 6 0 0 1-6 6H32a6 6 0 0 1-6-6V48a6 6 0 0 1 12 0v98.78l54.05-47.3a6 6 0 0 1 7.55-.28l60.11 45.08l60.34-52.8a6 6 0 0 1 7.9 9l-64 56a6 6 0 0 1-7.55.28l-60.11-45.04l-58.29 51V202h186a6 6 0 0 1 6 6"})}),{__source:"ph:chart-line-light",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"graph",displayName:"UiGraph"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m-16 136a8 8 0 0 1 0 16H56a8 8 0 0 1-8-8V72a8 8 0 0 1 16 0v62.92l34.88-29.07a8 8 0 0 1 9.56-.51l43 28.69l43.41-36.18a8 8 0 0 1 10.24 12.3l-48 40a8 8 0 0 1-9.56.51l-43-28.69L64 155.75V176Z"})}),{__source:"ph:chart-line-fill",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"graph",displayName:"UiGraphFilled"});const ui=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 26a102 102 0 1 0 102 102A102.12 102.12 0 0 0 128 26m81.57 64h-40.38a132.6 132.6 0 0 0-25.73-50.67A90.29 90.29 0 0 1 209.57 90m8.43 38a89.7 89.7 0 0 1-3.83 26h-42.36a155.4 155.4 0 0 0 0-52h42.36a89.7 89.7 0 0 1 3.83 26m-90 87.83a110 110 0 0 1-15.19-19.45A124.2 124.2 0 0 1 99.35 166h57.3a124.2 124.2 0 0 1-13.46 30.38A110 110 0 0 1 128 215.83M96.45 154a139.2 139.2 0 0 1 0-52h63.1a139.2 139.2 0 0 1 0 52ZM38 128a89.7 89.7 0 0 1 3.83-26h42.36a155.4 155.4 0 0 0 0 52H41.83A89.7 89.7 0 0 1 38 128m90-87.83a110 110 0 0 1 15.19 19.45A124.2 124.2 0 0 1 156.65 90h-57.3a124.2 124.2 0 0 1 13.46-30.38A110 110 0 0 1 128 40.17m-15.46-.84A132.6 132.6 0 0 0 86.81 90H46.43a90.29 90.29 0 0 1 66.11-50.67M46.43 166h40.38a132.6 132.6 0 0 0 25.73 50.67A90.29 90.29 0 0 1 46.43 166m97 50.67A132.6 132.6 0 0 0 169.19 166h40.38a90.29 90.29 0 0 1-66.11 50.67Z"})}),{__source:"ph:globe-light",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"globe",displayName:"UiGlobe"}),tj=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 16h.01m-7.798-4.423a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11zm19.734.436H2.054M6 16h.01"})}),{__source:"lucide:hard-drive",__viewBox:"0 0 24 24",__group:"ui-controls",__consumerName:"hard-drive",displayName:"UiHardDrive"}),nj=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 32 32",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M8.96 0c-.565 0-.98.219-1.28.46-.008.005-.012.017-.02.02a2.11 2.11 0 0 0-.238.22.173.173 0 0 0-.043.038c0 .008.004.016 0 .024l-1.14 1.277c.25-.074.519-.117.8-.117h17.922c.281 0 .547.039.8.117L24.579.7c-.317-.427-.907-.7-1.477-.7ZM7.04 3.2c-.743 0-1.278.538-1.278 1.28v26.24c0 .742.535 1.281 1.277 1.281h17.922c.742 0 1.277-.54 1.277-1.281V4.48c0-.742-.535-1.28-1.277-1.28Zm3.198 3.198h11.524c.383 0 .636.258.636.641v3.2c0 .386-.253.64-.636.64H10.238c-.383 0-.636-.254-.636-.64v-3.2c0-.383.253-.64.636-.64m0 5.761h11.524c.383 0 .636.254.636.64V16c0 .387-.253.64-.636.64H10.238c-.383 0-.636-.253-.636-.64v-3.2c0-.386.253-.64.636-.64M16 20.48a1.282 1.282 0 1 1-.001 2.564A1.282 1.282 0 0 1 16 20.48m0 4.48c.703 0 1.281.575 1.281 1.278a1.286 1.286 0 0 1-2.562 0c0-.703.578-1.277 1.281-1.277m0 0"})}),{__source:"incumbent",__viewBox:"0 0 32 32",__group:"infrastructure",__consumerName:"server",displayName:"UiServer"}),Iw=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",children:[o.jsx("path",{d:"M12 14C12.5523 14 13 13.5523 13 13C13 12.4477 12.5523 12 12 12C11.4477 12 11 12.4477 11 13C11 13.5523 11.4477 14 12 14Z",fill:"#6C707E"}),o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 16C9 16 8 13 8 13C8 13 9 10 12 10C15 10 16 13 16 13C16 13 15 16 12 16ZM14.9024 12.9785L14.9131 13L14.9024 13.0215C14.787 13.2525 14.6081 13.5582 14.3568 13.8598C13.8602 14.4557 13.1189 15 12 15C10.8811 15 10.1398 14.4557 9.64322 13.8598C9.39186 13.5582 9.21302 13.2525 9.09755 13.0215L9.08686 13L9.09755 12.9785C9.21302 12.7475 9.39186 12.4418 9.64322 12.1402C10.1398 11.5443 10.8811 11 12 11C13.1189 11 13.8602 11.5443 14.3568 12.1402C14.6081 12.4418 14.787 12.7475 14.9024 12.9785Z",fill:"#6C707E"}),o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 4C1 2.89543 1.89543 2 3 2H13C14.1046 2 15 2.89543 15 4V10.0002C14.7066 9.77678 14.374 9.57312 14 9.40875V6H11V9.09561C10.6382 9.16692 10.3053 9.27503 10 9.40931V6H6V13H7V14H3C1.89543 14 1 13.1046 1 12V4ZM6 3H10V5H6V3ZM5 3H3C2.44772 3 2 3.44772 2 4V5H5V3ZM2 6V12C2 12.5523 2.44772 13 3 13H5V6H2ZM14 5V4C14 3.44772 13.5523 3 13 3H11V5H14Z",fill:"#6C707E"})]})}),{__source:"jb-expui-toolwindows:toolWindowDataView",__viewBox:"0 0 16 16",__group:"uir-sql",__consumerName:"uir-sql-database",displayName:"UiSqlDatabase"}),lB=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"})}),{__source:"ph:database-light",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabase"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"})}),{__source:"ph:database-fill",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 4v16M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-light + plus marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabasePlus"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 4v16M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-fill + plus marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabasePlusFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-light + minus marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseMinus"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-fill + minus marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseMinusFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M5 13l4 4 10-10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-light + tick marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseCheck"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M5 13l4 4 10-10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-fill + tick marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseCheckFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-light + cross marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseCross"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-fill + cross marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseCrossFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M5 7h14M9 7V5a1 1 0 011-1h4a1 1 0 011 1v2M7 7l1 12a2 2 0 002 2h4a2 2 0 002-2l1-12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-light + trash marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseTrash"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M5 7h14M9 7V5a1 1 0 011-1h4a1 1 0 011 1v2M7 7l1 12a2 2 0 002 2h4a2 2 0 002-2l1-12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-fill + trash marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseTrashFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#d97706",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M6 4h12v3l-5 5 5 5v3H6v-3l5-5-5-5V4z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})]})]}),{__source:"ph:database-light + hourglass marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabasePending"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#d97706",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M6 4h12v3l-5 5 5 5v3H6v-3l5-5-5-5V4z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})]})]}),{__source:"ph:database-fill + hourglass marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabasePendingFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#0ea5e9",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 8.5v.01M11 12h1v5h1",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-light + info marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseInfo"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#0ea5e9",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 8.5v.01M11 12h1v5h1",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-fill + info marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseInfoFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#d97706",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 7v6M12 16v.01",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-light + warning marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseWarning"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#d97706",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 7v6M12 16v.01",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-fill + warning marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseWarningFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M7 7l10 10M17 7L7 17",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-light + error marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseError"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M7 7l10 10M17 7L7 17",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:database-fill + error marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseErrorFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 19V6M6 11l6-5l6 5",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-light + up marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseUp"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 19V6M6 11l6-5l6 5",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-fill + up marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseUpFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54m0 12c44.45 0 82 19.23 82 42s-37.55 42-82 42s-82-19.23-82-42s37.55-42 82-42m82 138c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 171.16 92.37 182 128 182s66-10.84 82-27.21Zm0-48c0 22.77-37.55 42-82 42s-82-19.23-82-42v-21.21C62 123.16 92.37 134 128 134s66-10.84 82-27.21Z"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#0ea5e9",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 5v13M6 13l6 5l6-5",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-light + down marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseDown"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64Zm-21.61 74.92C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#0ea5e9",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 5v13M6 13l6 5l6-5",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:database-fill + down marker",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"database",displayName:"UiDatabaseDownFilled"});const cB={database:lB,sql:Iw,"sql-database":Iw,server:nj,"hard-drive":tj,globe:ui,http:ui,api:ui,graph:Pw,metrics:Pw,activity:P0,logs:P0,boxes:aB,workflow:iB,table:v2,command:Ng,cmd:Ng,terminal:fr,query:Rw,"sql-query":Rw,search:$s};function uB(e){if(e)return cB[e.toLowerCase()]}const dB="clicky-ui:sidebar:collapsed";function fB({client:e,basePath:t="",showApiExplorer:n=!0,formExtensions:r,formActions:s,resultRenderer:i}){const l=r?.pre,u=r?.post,{pathname:d,renderLink:f,navigate:p}=A2(),{spec:h}=_i(e),x=w.useMemo(()=>vR(h),[h]),v=w.useMemo(()=>vB(x),[x]),y=w.useMemo(()=>x.find(M=>!M.admin)??x[0],[x]),b=w.useMemo(()=>gB(d,t),[t,d]),j=w.useMemo(()=>mB(b),[b]),S=w.useMemo(()=>pB(j,x),[j,x]),N=w.useMemo(()=>({client:e,hrefForCommand:M=>Tw(t,M),onNavigate:M=>{const L=Tw(t,M);L&&p(L)}}),[t,e,p]),{initialValues:k}=w.useMemo(()=>S.kind==="command"?yB():{initialValues:{},autoRun:!1},[S.kind,d]),T=w.useMemo(()=>({key:"explorer",title:"API Explorer",description:"Every operation exposed by the current OpenAPI spec."}),[]),E=w.useMemo(()=>{const M=v.map(L=>({label:L.label,items:L.surfaces.map(F=>{const U=uB(F.icon);return{key:F.key,label:F.title,...U?{icon:U}:{},active:hB(S,F.key),to:Ji(t,`/${F.key}`)}})}));return n&&M.push({items:[{key:T.key,label:T.title,active:S.kind==="explorer"||S.kind==="command",to:Ji(t,"/explorer")}]}),M},[v,t,S,n,T]);return w.useEffect(()=>{y==null||b!=="/"||p(Ji(t,`/${y.key}`),{replace:!0})},[t,y,b,p]),o.jsx(td,{brand:o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"truncate text-sm font-semibold",children:h?.info.title??"Clicky Explorer"}),o.jsx("div",{className:"truncate text-xs text-sidebar-foreground/60",children:"Metadata-driven entity explorer"})]}),navSections:E,sidebarFooter:o.jsx(E2,{}),collapsedStorageKey:dB,contentClassName:"p-6",children:S.kind==="surface"?S.surface?o.jsx(Ew,{definition:zy(S.surface),entities:[S.surface.entity],client:e,renderLink:f,surfaceKey:S.surface.key,commandRuntime:N,...l?{formPre:l}:{},...u?{formPost:u}:{},...s?{formActions:s}:{},...i?{resultRenderer:i}:{}}):o.jsx($w,{surfaceKey:S.surfaceKey}):S.kind==="entity"?S.surface?o.jsx(oB,{definition:zy(S.surface),entities:[S.surface.entity],client:e,renderLink:f,surfaceKey:S.surface.key,backHref:Ji(t,`/${S.surface.key}`),backLabel:`Back to ${S.surface.title}`,commandRuntime:N,...l?{formPre:l}:{},...u?{formPost:u}:{},...s?{formActions:s}:{},...S.id?{id:S.id}:{}}):o.jsx($w,{surfaceKey:S.surfaceKey}):S.kind==="command"?o.jsx(ej,{client:e,backHref:Ji(t,"/explorer"),backLabel:"Back to API Explorer",renderLink:f,commandRuntime:N,initialValues:k,autoRun:!0,...S.operationId?{operationId:S.operationId}:{}}):S.kind==="explorer"?o.jsx(Ew,{definition:T,entities:[],allOperations:!0,client:e,renderLink:f,commandRuntime:N}):y==null?o.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading surfaces…"}):o.jsx("div",{className:"text-sm text-muted-foreground",children:"Redirecting…"})})}function mB(e){const t=ll(e)||"/";if(t==="/")return{kind:"root"};const n=t.replace(/^\/+/,"").split("/");if(n[0]==="explorer")return{kind:"explorer"};if(n[0]==="commands")return n[1]?{kind:"command",operationId:n[1]}:{kind:"command"};const r=n[0]??"";return n[1]?{kind:"entity",surfaceKey:r,id:decodeURIComponent(n[1])}:{kind:"surface",surfaceKey:r}}function pB(e,t){if(e.kind!=="surface"&&e.kind!=="entity")return e;const n=t.find(r=>r.key===e.surfaceKey);return n?{...e,surface:n}:e}function hB(e,t){return e.kind==="surface"&&e.surfaceKey===t||e.kind==="entity"&&e.surfaceKey===t}function gB(e,t){const n=ll(t);return!n||n==="/"?ll(e)||"/":e===n?"/":e.startsWith(`${n}/`)?ll(e.slice(n.length))||"/":ll(e)||"/"}function $w({surfaceKey:e}){return o.jsxs("div",{className:"p-6 text-sm text-muted-foreground",children:["Unknown surface: ",o.jsx("code",{children:e})]})}const xB="__autoRun";function vB(e){const t=[],n=new Map;for(const r of e){const s=r.parent??"";n.has(s)||(n.set(s,[]),t.push(s)),n.get(s).push(r)}return t.map(r=>({parent:r,label:r===""?"Other":bB(r),surfaces:n.get(r)}))}function bB(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function yB(){if(typeof window>"u")return{initialValues:{},autoRun:!1};const e=new URLSearchParams(window.location.search),t={};let n=!1;const r=[];for(const[i,l]of e.entries()){if(i===J_||i===xB){n=l==="1"||l==="true";continue}if(i.startsWith(kg)){const u=Number.parseInt(i.slice(kg.length),10);Number.isFinite(u)&&u>=0&&(r[u]=l);continue}t[i]=l}const s=r.filter(i=>i!==void 0).join(" ");return s!==""&&(t.args=s),{initialValues:t,autoRun:n}}var wB=Object.defineProperty,_B=(e,t,n)=>t in e?wB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ja=(e,t,n)=>_B(e,typeof t!="symbol"?t+"":t,n);class jB extends Error{constructor(t,n={}){super(t),Ja(this,"status"),Ja(this,"method"),Ja(this,"url"),Ja(this,"responseBody"),Ja(this,"responseData"),Ja(this,"responseHeaders"),this.name="OperationsApiClientError",this.status=n.status,this.method=n.method,this.url=n.url,this.responseBody=n.responseBody,this.responseData=n.responseData,this.responseHeaders=n.responseHeaders}}function kB(e={}){const t=e.fetch??fetch,n=e.openApiPath??"/api/openapi.json";async function r(u,d){var f;const p=new Headers(u),h=await((f=e.prepareHeaders)==null?void 0:f.call(e,p,d));return h?new Headers(h):p}async function s(u,d,f={}){const p=EB(e.baseUrl,u),h=await r(f.headers,{path:u,method:d});return t(p,{...f,method:d,headers:h,...e.credentials?{credentials:e.credentials}:{}})}async function i(){const u=await s(n,"GET",{headers:{Accept:"application/json"}}),d=await so(u,"json");if(!u.ok)throw Jc(u,"GET",n,d);return d.data}async function l(u,d,f){var p;return await((p=e.defaultParams)==null?void 0:p.call(e,{path:u,method:d,params:f}))??f}return{getOpenAPISpec:i,async executeCommand(u,d,f,p){const h=d.toUpperCase(),x=a1(u,f),v=await l(x.path,h,x.params),y=Fw(p,"Accept");if(h==="GET"){const j=Of(x.path,v),S=await s(j,h,{...p?{headers:p}:{},requestUrl:j});return Tf(S,await so(S,i1(y)),{method:h,requestUrl:j})}const b=await s(x.path,h,{headers:{"Content-Type":"application/json",...p},body:JSON.stringify(v)});return Tf(b,await so(b,i1(y)),{method:h,requestUrl:x.path})},async executeCommandBody(u,d,f){const p=Fw(f,"Accept"),h=await s(u,"POST",{headers:{"Content-Type":"application/json",...f},body:JSON.stringify(d)});return Tf(h,await so(h,i1(p)),{method:"POST",requestUrl:u})},async getSchema(u){const d=await s(u,"GET",{headers:{Accept:"application/schema+json"}});if(!d.ok||!(d.headers.get("Content-Type")||"").toLowerCase().includes("schema"))return;const h=(await so(d,"json")).data;return h&&typeof h=="object"?h:void 0},async submitForm(u,d,f,p){const h=d.toUpperCase(),x=await s(u,h,{headers:{"Content-Type":"application/json",...p},body:JSON.stringify(f)});return Tf(x,await so(x,"json"),{method:h,requestUrl:u})},async lookupFilters(u,d,f,p){const h=d.toUpperCase(),x=a1(u,f);if(h==="GET"){const b=Of(x.path,{...x.params,__lookup:"filters"}),j=await s(b,"GET",{headers:{Accept:"application/json+clicky",...p}});if(j.status===404)return{filters:{}};const S=await so(j,"json");if(!j.ok)throw Jc(j,"GET",b,S);return S.data??{filters:{}}}const v=await s(Of(x.path,{__lookup:"filters"}),h,{headers:{Accept:"application/json+clicky","Content-Type":"application/json",...p},body:JSON.stringify(x.params)});if(v.status===404)return{filters:{}};const y=await so(v,"json");if(!v.ok)throw Jc(v,h,x.path,y);return y.data??{filters:{}}},async lookupFilterOptions(u,d,f,p,h){var x,v;const y=d.toUpperCase(),b=a1(u,{}),j={...h,__lookup:"filters",__lookup_filter:f,__lookup_q:p},S=Of(b.path,j),N=await s(S,y,{headers:{Accept:"application/json+clicky"}}),k=await so(N,"json");if(!N.ok)throw Jc(N,y,S,k);return((v=(x=k.data)==null?void 0:x.filters)==null?void 0:v[f])??{}}}}function i1(e){if(!e)return"json";const t=e.toLowerCase();return t.includes("application/pdf")?"blob":t.includes("text/")||t.includes("application/x-yaml")||t.includes("application/yaml")?"text":"json"}async function so(e,t){const n=e.headers.get("Content-Type")||"";if(t==="blob")return{data:void 0,text:"[binary]",blob:await e.blob(),contentType:n};const r=await e.text();if(t==="text"||!OB(r,n))return{data:r,text:r,contentType:n};try{return{data:JSON.parse(r),text:r,contentType:n}}catch{return{data:r,text:r,contentType:n}}}function Tf(e,t,n){const r=rj(e.headers),s=t.data,i=t.blob!=null?"[binary]":typeof s=="string"?s:t.text||JSON.stringify(s,null,2),l=MB(s);if(!e.ok&&!l)throw Jc(e,n.method,n.requestUrl,t);const u=sj(s),d=r["x-execution-success"],f=d==null?e.ok&&!u:d!=="false",p=parseInt(r["x-exit-code"]??(f?"0":"1"),10),h=r["x-cli-command"],x=r["x-error"]||u,v=TB(r);return{success:f,stdout:i,output:i,exit_code:Number.isFinite(p)?p:f?0:1,contentType:t.contentType||r["content-type"]||"application/json",requestUrl:n.requestUrl,responseHeaders:r,...v?{pagination:v}:{},...h?{cli:h}:{},...x?{error:x}:{},...t.blob?{blob:t.blob}:{},...t.blob==null&&typeof s!="string"?{parsed:s}:{}}}function Jc(e,t,n,r){const s=rj(e.headers),i=s["x-error"]||AB(r.data)||`${t} ${n} failed with ${e.status}: ${r.text||e.statusText}`;return new jB(i,{status:e.status,method:t,url:n,responseBody:r.text,responseData:r.data,responseHeaders:s})}function a1(e,t){const n={...t};let r=e;const s=[...e.matchAll(/\{([^{}]+)\}/g)].map(f=>f[1]).filter(f=>!!f),i=NB(t.args);let l=!1;const u=[];for(const[f,p]of s.entries()){const h=n[p],x=h||i[f];x&&(r=r.replace(`{${p}}`,encodeURIComponent(x)),delete n[p],!h&&i[f]&&(l=!0),h&&(u[f]=h))}const d=i.length>0&&i.length===u.filter(Boolean).length&&i.every((f,p)=>f===u[p]);return(l||d)&&delete n.args,{path:r,params:CB(n)}}function NB(e){if(!e)return[];const t=e.trim();if(!t||t==="[]"||t.toLowerCase()==="null")return[];try{const n=JSON.parse(t);if(Array.isArray(n))return n.map(String).filter(Boolean)}catch{}return t.split(",").map(n=>n.trim()).filter(Boolean)}function CB(e){const t={...e};return delete t.autoRun,delete t.__autoRun,t}function Of(e,t){const n=new URLSearchParams(SB(t)).toString();return n?`${e}${e.includes("?")?"&":"?"}${n}`:e}function SB(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==""))}function EB(e,t){return!e||/^https?:\/\//i.test(t)?t:`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`}function Fw(e,t){const n=t.toLowerCase();for(const[r,s]of Object.entries(e??{}))if(r.toLowerCase()===n)return s}function rj(e){const t={};return e.forEach((n,r)=>{t[r.toLowerCase()]=n}),t}function TB(e){const t={},n=l1(e["x-total-count"]),r=l1(e["x-page-limit"]),s=l1(e["x-page-offset"]);return n!==void 0&&(t.total=n),r!==void 0&&(t.limit=r),s!==void 0&&(t.offset=s),Object.keys(t).length>0?t:void 0}function l1(e){if(e==null||e.trim()==="")return;const t=parseInt(e,10);return Number.isFinite(t)?t:void 0}function OB(e,t){const n=e.trim();return n!==""&&(t.toLowerCase().includes("json")||n.startsWith("{")||n.startsWith("["))}function MB(e){if(!e||typeof e!="object")return!1;const t=e;return t.version!=null&&t.node!=null&&typeof t.node=="object"}function Cg(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.plain=="string"&&t.plain!=="")return t.plain;if(typeof t.text=="string"&&t.text!=="")return t.text;if(Array.isArray(t.children))for(const n of t.children){const r=Cg(n);if(r)return r}}function sj(e){if(!e||typeof e!="object")return;const t=e.node;if(!t||typeof t!="object")return;const n=t;if(n.kind!=="map"||!Array.isArray(n.fields))return;let r,s=!1;for(const i of n.fields){if(!i||typeof i!="object")continue;const l=i;l.name==="Error"&&(r=Cg(l.value)),l.name==="Success"&&Cg(l.value)==="false"&&(s=!0)}return s?r:void 0}function AB(e){if(!e||typeof e!="object")return;const t=e;return typeof t.error=="string"&&t.error?t.error:typeof t.message=="string"&&t.message?t.message:sj(e)}function LB({adapter:e,children:t}){return o.jsx(I3.Provider,{value:e,children:t})}const RB=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M198 75.64V40a14 14 0 0 0-14-14H72a14 14 0 0 0-14 14v36a14.06 14.06 0 0 0 5.6 11.2L118 128l-54.4 40.8A14.06 14.06 0 0 0 58 180v36a14 14 0 0 0 14 14h112a14 14 0 0 0 14-14v-35.64a14.08 14.08 0 0 0-5.56-11.17L138 128l54.49-41.19A14.08 14.08 0 0 0 198 75.64M70 40a2 2 0 0 1 2-2h112a2 2 0 0 1 2 2v35.64a2 2 0 0 1-.79 1.6L178.9 82H76.67l-5.87-4.4A2 2 0 0 1 70 76Zm58 80.49L92.67 94H163Zm58 59.87V216a2 2 0 0 1-2 2H72a2 2 0 0 1-2-2v-36a2 2 0 0 1 .8-1.6L122 140v28a6 6 0 0 0 12 0v-27.94l51.21 38.7a2 2 0 0 1 .79 1.6"})}),{__source:"ph:hourglass-medium-light",__viewBox:"0 0 256 256",__group:"time",__consumerName:"hourglass",displayName:"UiHourglass"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M200 75.64V40a16 16 0 0 0-16-16H72a16 16 0 0 0-16 16v36a16.07 16.07 0 0 0 6.4 12.8l52.27 39.2l-52.27 39.2A16.07 16.07 0 0 0 56 180v36a16 16 0 0 0 16 16h112a16 16 0 0 0 16-16v-35.64a16.09 16.09 0 0 0-6.35-12.77L141.27 128l52.38-39.59A16.09 16.09 0 0 0 200 75.64m-16 104.72V216H72v-36l48-36v24a8 8 0 0 0 16 0v-23.92Zm0-104.72L178.23 80H77.33L72 76V40h112Z"})}),{__source:"ph:hourglass-medium-fill",__viewBox:"0 0 256 256",__group:"time",__consumerName:"hourglass",displayName:"UiHourglassFilled"});const PB=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M232 114h-98V86h10a14 14 0 0 0 14-14V40a14 14 0 0 0-14-14h-32a14 14 0 0 0-14 14v32a14 14 0 0 0 14 14h10v28H24a6 6 0 0 0 0 12h34v36H48a14 14 0 0 0-14 14v32a14 14 0 0 0 14 14h32a14 14 0 0 0 14-14v-32a14 14 0 0 0-14-14H70v-36h116v36h-10a14 14 0 0 0-14 14v32a14 14 0 0 0 14 14h32a14 14 0 0 0 14-14v-32a14 14 0 0 0-14-14h-10v-36h34a6 6 0 0 0 0-12M110 72V40a2 2 0 0 1 2-2h32a2 2 0 0 1 2 2v32a2 2 0 0 1-2 2h-32a2 2 0 0 1-2-2M82 176v32a2 2 0 0 1-2 2H48a2 2 0 0 1-2-2v-32a2 2 0 0 1 2-2h32a2 2 0 0 1 2 2m128 0v32a2 2 0 0 1-2 2h-32a2 2 0 0 1-2-2v-32a2 2 0 0 1 2-2h32a2 2 0 0 1 2 2"})}),{__source:"ph:network-light",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"network",displayName:"UiNetwork"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M240 120a8 8 0 0 1-8 8h-32v32h8a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h8v-32H72v32h8a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H48a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h8v-32H24a8 8 0 0 1 0-16h96V88h-8a16 16 0 0 1-16-16V40a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16h-8v24h96a8 8 0 0 1 8 8"})}),{__source:"ph:network-fill",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"network",displayName:"UiNetworkFilled"});const Ol=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M67.84 92.61L25.37 128l42.47 35.39a6 6 0 1 1-7.68 9.22l-48-40a6 6 0 0 1 0-9.22l48-40a6 6 0 0 1 7.68 9.22m176 30.78l-48-40a6 6 0 1 0-7.68 9.22L230.63 128l-42.47 35.39a6 6 0 1 0 7.68 9.22l48-40a6 6 0 0 0 0-9.22m-81.79-89a6 6 0 0 0-7.69 3.61l-64 176a6 6 0 0 0 3.64 7.64a6.2 6.2 0 0 0 2 .36a6 6 0 0 0 5.64-3.95l64-176a6 6 0 0 0-3.59-7.69Z"})}),{__source:"ph:code-light",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"code-2",displayName:"UiCode2"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16M92.8 145.6a8 8 0 1 1-9.6 12.8l-32-24a8 8 0 0 1 0-12.8l32-24a8 8 0 0 1 9.6 12.8L69.33 128Zm58.89-71.4l-32 112a8 8 0 1 1-15.38-4.4l32-112a8 8 0 0 1 15.38 4.4m53.11 60.2l-32 24a8 8 0 0 1-9.6-12.8l23.47-17.6l-23.47-17.6a8 8 0 1 1 9.6-12.8l32 24a8 8 0 0 1 0 12.8"})}),{__source:"ph:code-fill",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"code-2",displayName:"UiCode2Filled"});const IB=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 58h-28.79L165 36.67a6 6 0 0 0-5-2.67H96a6 6 0 0 0-5 2.67L76.78 58H48a22 22 0 0 0-22 22v112a22 22 0 0 0 22 22h160a22 22 0 0 0 22-22V80a22 22 0 0 0-22-22m10 134a10 10 0 0 1-10 10H48a10 10 0 0 1-10-10V80a10 10 0 0 1 10-10h32a6 6 0 0 0 5-2.67L99.21 46h57.57L171 67.33a6 6 0 0 0 5 2.67h32a10 10 0 0 1 10 10ZM128 90a42 42 0 1 0 42 42a42 42 0 0 0-42-42m0 72a30 30 0 1 1 30-30a30 30 0 0 1-30 30"})}),{__source:"ph:camera-light",__viewBox:"0 0 256 256",__group:"media",__consumerName:"camera",displayName:"UiCamera"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 56h-27.72l-13.63-20.44A8 8 0 0 0 160 32H96a8 8 0 0 0-6.65 3.56L75.71 56H48a24 24 0 0 0-24 24v112a24 24 0 0 0 24 24h160a24 24 0 0 0 24-24V80a24 24 0 0 0-24-24m-44 76a36 36 0 1 1-36-36a36 36 0 0 1 36 36"})}),{__source:"ph:camera-fill",__viewBox:"0 0 256 256",__group:"media",__consumerName:"camera",displayName:"UiCameraFilled"});const Dw=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M150 40a6 6 0 0 1-6 6h-32a6 6 0 0 1 0-12h32a6 6 0 0 1 6 6m-6 170h-32a6 6 0 0 0 0 12h32a6 6 0 0 0 0-12m64-176h-24a6 6 0 0 0 0 12h24a2 2 0 0 1 2 2v24a6 6 0 0 0 12 0V48a14 14 0 0 0-14-14m8 72a6 6 0 0 0-6 6v32a6 6 0 0 0 12 0v-32a6 6 0 0 0-6-6m0 72a6 6 0 0 0-6 6v24a2 2 0 0 1-2 2h-24a6 6 0 0 0 0 12h24a14 14 0 0 0 14-14v-24a6 6 0 0 0-6-6M40 150a6 6 0 0 0 6-6v-32a6 6 0 0 0-12 0v32a6 6 0 0 0 6 6m32 60H48a2 2 0 0 1-2-2v-24a6 6 0 0 0-12 0v24a14 14 0 0 0 14 14h24a6 6 0 0 0 0-12m0-176H48a14 14 0 0 0-14 14v24a6 6 0 0 0 12 0V48a2 2 0 0 1 2-2h24a6 6 0 0 0 0-12"})}),{__source:"ph:selection-light",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"select",displayName:"UiSelect"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16M104 200H72a16 16 0 0 1-16-16v-32a8 8 0 0 1 16 0v32h32a8 8 0 0 1 0 16m0-128H72v32a8 8 0 0 1-16 0V72a16 16 0 0 1 16-16h32a8 8 0 0 1 0 16m96 112a16 16 0 0 1-16 16h-32a8 8 0 0 1 0-16h32v-32a8 8 0 0 1 16 0Zm0-80a8 8 0 0 1-16 0V72h-32a8 8 0 0 1 0-16h32a16 16 0 0 1 16 16Z"})}),{__source:"ph:selection-fill",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"select",displayName:"UiSelectFilled"});const oo=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 50H40a6 6 0 0 0-6 6v152a14 14 0 0 0 14 14h40a14 14 0 0 0 14-14v-50h52v18a14 14 0 0 0 14 14h40a14 14 0 0 0 14-14V56a6 6 0 0 0-6-6m-6 64h-44V62h44ZM90 62v52H46V62Zm0 146a2 2 0 0 1-2 2H48a2 2 0 0 1-2-2v-82h44Zm12-62V62h52v84Zm106 32h-40a2 2 0 0 1-2-2v-50h44v50a2 2 0 0 1-2 2"})}),{__source:"ph:kanban-light",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"kanban",displayName:"UiKanban"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M160 56v96a8 8 0 0 1-8 8h-40a8 8 0 0 1-8-8V56a8 8 0 0 1 8-8h40a8 8 0 0 1 8 8m64-8h-40a8 8 0 0 0-8 8v52a4 4 0 0 0 4 4h48a4 4 0 0 0 4-4V56a8 8 0 0 0-8-8m4 80h-48a4 4 0 0 0-4 4v44a16 16 0 0 0 16 16h24a16 16 0 0 0 16-16v-44a4 4 0 0 0-4-4M80 48H40a8 8 0 0 0-8 8v52a4 4 0 0 0 4 4h48a4 4 0 0 0 4-4V56a8 8 0 0 0-8-8m4 80H36a4 4 0 0 0-4 4v76a16 16 0 0 0 16 16h24a16 16 0 0 0 16-16v-76a4 4 0 0 0-4-4"})}),{__source:"ph:kanban-fill",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"kanban",displayName:"UiKanbanFilled"});const $B=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M138 180a10 10 0 1 1-10-10a10 10 0 0 1 10 10M128 74c-21 0-38 15.25-38 34v4a6 6 0 0 0 12 0v-4c0-12.13 11.66-22 26-22s26 9.87 26 22s-11.66 22-26 22a6 6 0 0 0-6 6v8a6 6 0 0 0 12 0v-2.42c18.11-2.58 32-16.66 32-33.58c0-18.75-17-34-38-34m102 54A102 102 0 1 1 128 26a102.12 102.12 0 0 1 102 102m-12 0a90 90 0 1 0-90 90a90.1 90.1 0 0 0 90-90"})}),{__source:"ph:question-light",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"question",displayName:"UiQuestion"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 168a12 12 0 1 1 12-12a12 12 0 0 1-12 12m8-48.72v.72a8 8 0 0 1-16 0v-8a8 8 0 0 1 8-8c13.23 0 24-9 24-20s-10.77-20-24-20s-24 9-24 20v4a8 8 0 0 1-16 0v-4c0-19.85 17.94-36 40-36s40 16.15 40 36c0 17.38-13.76 31.93-32 35.28"})}),{__source:"ph:question-fill",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"question",displayName:"UiQuestionFilled"});const Qf=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("g",{fill:"none",children:o.jsx("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"1.5",fill:"#FFF7F7",stroke:"#DB3B4B"})})}),{__source:"jb-expui-run:stop",__viewBox:"0 0 16 16",__group:"runtime-process",__consumerName:"stop",displayName:"UiStop"}),Z2=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M246 152a6 6 0 0 1-6 6h-18v18a6 6 0 0 1-12 0v-18h-18a6 6 0 0 1 0-12h18v-18a6 6 0 0 1 12 0v18h18a6 6 0 0 1 6 6M56 70h18v18a6 6 0 0 0 12 0V70h18a6 6 0 0 0 0-12H86V40a6 6 0 0 0-12 0v18H56a6 6 0 0 0 0 12m128 124h-10v-10a6 6 0 0 0-12 0v10h-10a6 6 0 0 0 0 12h10v10a6 6 0 0 0 12 0v-10h10a6 6 0 0 0 0-12m33.9-115.41L78.58 217.9a14 14 0 0 1-19.8 0l-20.69-20.69a14 14 0 0 1 0-19.8L177.41 38.1a14 14 0 0 1 19.8 0l20.69 20.69a14 14 0 0 1 0 19.8M167.51 112L144 88.49L46.58 185.9a2 2 0 0 0 0 2.83l20.69 20.68a2 2 0 0 0 2.82 0Zm41.9-44.73l-20.68-20.68a2 2 0 0 0-2.83 0L152.48 80L176 103.52l33.41-33.42a2 2 0 0 0 0-2.83"})}),{__source:"ph:magic-wand-light",__viewBox:"0 0 256 256",__group:"ai-ml",__consumerName:"magic-wand",displayName:"UiMagicWand"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M248 152a8 8 0 0 1-8 8h-16v16a8 8 0 0 1-16 0v-16h-16a8 8 0 0 1 0-16h16v-16a8 8 0 0 1 16 0v16h16a8 8 0 0 1 8 8M56 72h16v16a8 8 0 0 0 16 0V72h16a8 8 0 0 0 0-16H88V40a8 8 0 0 0-16 0v16H56a8 8 0 0 0 0 16m128 120h-8v-8a8 8 0 0 0-16 0v8h-8a8 8 0 0 0 0 16h8v8a8 8 0 0 0 16 0v-8h8a8 8 0 0 0 0-16m35.31-112L80 219.31a16 16 0 0 1-22.62 0l-20.7-20.68a16 16 0 0 1 0-22.63L176 36.69a16 16 0 0 1 22.63 0l20.68 20.68a16 16 0 0 1 0 22.63M208 68.69L187.31 48l-32 32L176 100.69Z"})}),{__source:"ph:magic-wand-fill",__viewBox:"0 0 256 256",__group:"ai-ml",__consumerName:"magic-wand",displayName:"UiMagicWandFilled"});const ms=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M200 50h-66V16a6 6 0 0 0-12 0v34H56a30 30 0 0 0-30 30v112a30 30 0 0 0 30 30h144a30 30 0 0 0 30-30V80a30 30 0 0 0-30-30m18 142a18 18 0 0 1-18 18H56a18 18 0 0 1-18-18V80a18 18 0 0 1 18-18h144a18 18 0 0 1 18 18ZM74 108a10 10 0 1 1 10 10a10 10 0 0 1-10-10m88 0a10 10 0 1 1 10 10a10 10 0 0 1-10-10m2 30H92a26 26 0 0 0 0 52h72a26 26 0 0 0 0-52m-22 12v28h-28v-28Zm-64 14a14 14 0 0 1 14-14h10v28H92a14 14 0 0 1-14-14m86 14h-10v-28h10a14 14 0 0 1 0 28"})}),{__source:"ph:robot-light",__viewBox:"0 0 256 256",__group:"ai-ml",__consumerName:"robot-ai",displayName:"UiRobotAi"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M200 48h-64V16a8 8 0 0 0-16 0v32H56a32 32 0 0 0-32 32v112a32 32 0 0 0 32 32h144a32 32 0 0 0 32-32V80a32 32 0 0 0-32-32m-28 48a12 12 0 1 1-12 12a12 12 0 0 1 12-12m-76 88H80a16 16 0 0 1 0-32h16Zm-12-64a12 12 0 1 1 12-12a12 12 0 0 1-12 12m60 64h-32v-32h32Zm32 0h-16v-32h16a16 16 0 0 1 0 32"})}),{__source:"ph:robot-fill",__viewBox:"0 0 256 256",__group:"ai-ml",__consumerName:"robot-ai",displayName:"UiRobotAiFilled"});const oj=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[o.jsx("path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}),o.jsx("path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}),o.jsx("circle",{cx:"11.5",cy:"14.5",r:"2.5"}),o.jsx("path",{d:"M13.3 16.3L15 18"})]})}),{__source:"lucide:file-search",__viewBox:"0 0 24 24",__group:"ui-controls",__consumerName:"file-search",displayName:"UiFileSearch"}),ij=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[o.jsx("path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}),o.jsx("path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}),o.jsx("path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"})]})}),{__source:"lucide:layers",__viewBox:"0 0 24 24",__group:"ui-controls",__consumerName:"layers",displayName:"UiLayers"}),FB=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 32 32",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M16.332 4.668c.555 0 1 .445 1 1v5.664H23c.55 0 1 .45 1 1s-.45 1-1 1h-5.668V19c0 .55-.45 1-1 1s-1-.45-1-1v-5.668H9.668c-.55 0-1-.45-1-1s.45-1 1-1h5.664V5.668c0-.55.45-1 1-1m-7.582 21c0-.555.445-1 1-1H23c.55 0 1 .45 1 1s-.45 1-1 1H9.75c-.55 0-1-.45-1-1"})}),{__source:"incumbent",__viewBox:"0 0 32 32",__group:"git-source-control",__consumerName:"diff",displayName:"UiDiff"}),DB=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 42H40a14 14 0 0 0-14 14v144a14 14 0 0 0 14 14h176a14 14 0 0 0 14-14V56a14 14 0 0 0-14-14M40 54h176a2 2 0 0 1 2 2v107.57l-29.47-29.47a14 14 0 0 0-19.8 0l-21.42 21.42l-45.41-45.42a14 14 0 0 0-19.8 0L38 154.2V56a2 2 0 0 1 2-2m-2 146v-28.83l52.58-52.58a2 2 0 0 1 2.84 0L176.83 202H40a2 2 0 0 1-2-2m178 2h-22.2l-38-38l21.41-21.42a2 2 0 0 1 2.83 0l38 38V200a2 2 0 0 1-2.04 2m-70-102a10 10 0 1 1 10 10a10 10 0 0 1-10-10"})}),{__source:"ph:image-light",__viewBox:"0 0 256 256",__group:"media",__consumerName:"image",displayName:"UiImage"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m-60 48a12 12 0 1 1-12 12a12 12 0 0 1 12-12m60 112H40v-39.31l46.34-46.35a8 8 0 0 1 11.32 0L165 181.66a8 8 0 0 0 11.32-11.32l-17.66-17.65L173 138.34a8 8 0 0 1 11.31 0L216 170.07z"})}),{__source:"ph:image-fill",__viewBox:"0 0 256 256",__group:"media",__consumerName:"image",displayName:"UiImageFilled"});const jm=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M196.89 130.94L144.4 111.6l-19.34-52.49a13.92 13.92 0 0 0-26.12 0L79.6 111.6l-52.49 19.34a13.92 13.92 0 0 0 0 26.12L79.6 176.4l19.34 52.49a13.92 13.92 0 0 0 26.12 0l19.34-52.49l52.49-19.34a13.92 13.92 0 0 0 0-26.12m-4.15 14.86l-55.08 20.3a6 6 0 0 0-3.56 3.56l-20.3 55.08a1.92 1.92 0 0 1-3.6 0l-20.3-55.08a6 6 0 0 0-3.56-3.56l-55.08-20.3a1.92 1.92 0 0 1 0-3.6l55.08-20.3a6 6 0 0 0 3.56-3.56l20.3-55.08a1.92 1.92 0 0 1 3.6 0l20.3 55.08a6 6 0 0 0 3.56 3.56l55.08 20.3a1.92 1.92 0 0 1 0 3.6M146 40a6 6 0 0 1 6-6h18V16a6 6 0 0 1 12 0v18h18a6 6 0 0 1 0 12h-18v18a6 6 0 0 1-12 0V46h-18a6 6 0 0 1-6-6m100 48a6 6 0 0 1-6 6h-10v10a6 6 0 0 1-12 0V94h-10a6 6 0 0 1 0-12h10V72a6 6 0 0 1 12 0v10h10a6 6 0 0 1 6 6"})}),{__source:"ph:sparkle-light",__viewBox:"0 0 256 256",__group:"ai-ml",__consumerName:"sparkles",displayName:"UiSparkles"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 144a15.78 15.78 0 0 1-10.42 14.94L146 178l-19 51.62a15.92 15.92 0 0 1-29.88 0L78 178l-51.62-19a15.92 15.92 0 0 1 0-29.88L78 110l19-51.62a15.92 15.92 0 0 1 29.88 0L146 110l51.62 19A15.78 15.78 0 0 1 208 144m-56-96h16v16a8 8 0 0 0 16 0V48h16a8 8 0 0 0 0-16h-16V16a8 8 0 0 0-16 0v16h-16a8 8 0 0 0 0 16m88 32h-8v-8a8 8 0 0 0-16 0v8h-8a8 8 0 0 0 0 16h8v8a8 8 0 0 0 16 0v-8h8a8 8 0 0 0 0-16"})}),{__source:"ph:sparkle-fill",__viewBox:"0 0 256 256",__group:"ai-ml",__consumerName:"sparkles",displayName:"UiSparklesFilled"});const W2=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M219.21 160.24a6 6 0 0 0-5.78-.35a22 22 0 1 1-11.05-41.83a22.15 22.15 0 0 1 11.05 2.06a6 6 0 0 0 8.57-5.42V72a14 14 0 0 0-14-14h-38.52a35 35 0 0 0 .52-6a34.1 34.1 0 0 0-10.73-24.78a33.64 33.64 0 0 0-25.45-9.15A34 34 0 0 0 102.54 58H64a14 14 0 0 0-14 14v34.53a34 34 0 0 0-30.79 10.2a34 34 0 0 0 22.31 57.18a34.3 34.3 0 0 0 8.48-.44V208a14 14 0 0 0 14 14h144a14 14 0 0 0 14-14v-42.69a6 6 0 0 0-2.79-5.07M210 208a2 2 0 0 1-2 2H64a2 2 0 0 1-2-2v-42.69a6 6 0 0 0-6-6a5.9 5.9 0 0 0-2.57.58a22 22 0 0 1-31.38-18.46a22 22 0 0 1 31.38-21.31A6 6 0 0 0 62 114.7V72a2 2 0 0 1 2-2h46.69a6 6 0 0 0 5.42-8.57a22.25 22.25 0 0 1-2-11a22 22 0 1 1 41.83 11A6 6 0 0 0 161.3 70H208a2 2 0 0 1 2 2v34.54a34 34 0 0 0-39.93 31.28a33.7 33.7 0 0 0 9.14 25.45A34.15 34.15 0 0 0 210 173.48Z"})}),{__source:"ph:puzzle-piece-light",__viewBox:"0 0 256 256",__group:"layout-dashboard",__consumerName:"puzzle",displayName:"UiPuzzle"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M165.78 224H208a16 16 0 0 0 16-16v-37.65a8 8 0 0 0-11.06-7.35a23.4 23.4 0 0 1-8.94 1.77c-13.23 0-24-11.1-24-24.73s10.77-24.73 24-24.73a23.4 23.4 0 0 1 8.94 1.77a8 8 0 0 0 11.06-7.43V72a16 16 0 0 0-16-16h-36.22a35 35 0 0 0 .22-4a36 36 0 0 0-72 0a35 35 0 0 0 .22 4H64a16 16 0 0 0-16 16v32.22a35 35 0 0 0-4-.22a36 36 0 0 0 0 72a35 35 0 0 0 4-.22V208a16 16 0 0 0 16 16h42.22"})}),{__source:"ph:puzzle-piece-fill",__viewBox:"0 0 256 256",__group:"layout-dashboard",__consumerName:"puzzle",displayName:"UiPuzzleFilled"});const q2=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224.91 69.75a6 6 0 0 0-9.63-2.16l-41.07 37.9l-19.51-4.19l-4.19-19.51l37.9-41.07a6 6 0 0 0-2.16-9.63a70 70 0 0 0-89.77 94.39l-61.39 53c-.11.09-.21.19-.32.3a30 30 0 0 0 42.43 42.45c.11-.11.21-.21.3-.32l53-61.39a70 70 0 0 0 94.39-89.77ZM160 154a58 58 0 0 1-28-7.22a6 6 0 0 0-7.45 1.33l-55.98 64.77a18 18 0 0 1-25.45-25.45l64.76-55.94a6 6 0 0 0 1.32-7.49a58 58 0 0 1 64-84.53l-33.62 36.46a6 6 0 0 0-1.45 5.33l5.65 26.35a6 6 0 0 0 4.61 4.61l26.35 5.65a6 6 0 0 0 5.33-1.45l36.42-33.62A58.06 58.06 0 0 1 160 154"})}),{__source:"ph:wrench-light",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"wrench",displayName:"UiWrench"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M232 96a72 72 0 0 1-100.94 66L79 222.22c-.12.14-.26.29-.39.42a32 32 0 0 1-45.26-45.26c.14-.13.28-.27.43-.39L94 124.94a72.07 72.07 0 0 1 83.54-98.78a8 8 0 0 1 3.93 13.19L144 80l5.66 26.35L176 112l40.65-37.52a8 8 0 0 1 13.19 3.93A72.6 72.6 0 0 1 232 96"})}),{__source:"ph:wrench-fill",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"wrench",displayName:"UiWrenchFilled"});function Qi(e,t){return e.length<=t?e:`${e.slice(0,t)}…`}function BB(e){if(Array.isArray(e))return e;const t=e.trim();if(!t)return[];try{const n=JSON.parse(t);return Array.isArray(n)?n:[n]}catch{}return t.split(` +`).map(n=>n.trim()).filter(Boolean).map(n=>{try{return JSON.parse(n)}catch{throw new Error(`SessionViewer: invalid session JSON line: ${Qi(n,80)}`)}})}function UB(e){return e==="user"||e==="assistant"?e:"assistant"}function K2(e,t,n,r,s,i={}){return{id:e,kind:"tool",tool:t,...n?{toolInput:n}:{},...r?{toolResponse:r}:{},...s?{timestamp:s}:{},...i.model?{model:i.model}:{},...i.reasoningEffort?{reasoningEffort:i.reasoningEffort}:{},...i.source?{source:i.source}:{},...i.cwd?{cwd:i.cwd}:{}}}function zB(e,t,n,r,s){if(e.type==="tool_use"||e.name&&e.input)return e.name?K2(n,e.name,e.input,void 0,r,s?{cwd:s}:{}):null;if(e.type==="thinking"||e.thinking){const i=e.thinking??e.text;return i?{id:n,kind:"thinking",text:i,...r?{timestamp:r}:{}}:null}return e.text?{id:n,kind:t==="user"?"user":"assistant",text:e.text,...r?{timestamp:r}:{}}:null}function VB(e){if(Array.isArray(e)&&ZB(e))return JB(e);const t=BB(e),n=[];return t.forEach((r,s)=>{var i,l;const u=r.uuid??`e${s}`;if(r.isApiErrorMessage){n.push({id:`${u}-err`,kind:"error",text:HB(r),...r.error?{errorType:r.error}:{},...r.apiErrorStatus?{errorStatus:r.apiErrorStatus}:{},...r.timestamp?{timestamp:r.timestamp}:{}});return}const d=r.tool_use;if(d?.tool){const p=d.cwd??r.cwd;n.push(K2(`${u}-tool`,d.tool,d.input,d.response,d.timestamp??r.timestamp,{...d.model?{model:d.model}:{},...d.reasoning_effort?{reasoningEffort:d.reasoning_effort}:{},...d.source?{source:d.source}:{},...p?{cwd:p}:{}}));return}const f=UB(((i=r.message)==null?void 0:i.role)??r.type);for(const[p,h]of(((l=r.message)==null?void 0:l.content)??[]).entries()){const x=zB(h,f,`${u}-${p}`,r.timestamp,r.cwd);x&&n.push(x)}}),n}function HB(e){const t=e.apiErrorStatus?` (HTTP ${e.apiErrorStatus})`:"";return`${e.error??"API error"}${t}`}function ZB(e){const t=e[0];return typeof t=="object"&&t!==null&&Array.isArray(t.parts)}function WB(e){return!!e.toolName&&(e.type==="dynamic-tool"||e.type.startsWith("tool-"))}function qB(e){if(e!=null)return typeof e=="string"?e:JSON.stringify(e)}function KB(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0}function GB(e,t,n,r){return WB(e)?K2(n,e.toolName,KB(e.input),qB(e.output),r.timestamp,{...r.model?{model:r.model}:{},...r.reasoningEffort?{reasoningEffort:r.reasoningEffort}:{},...r.source?{source:r.source}:{},...r.cwd?{cwd:r.cwd}:{}}):e.type==="reasoning"?e.text?{id:n,kind:"thinking",text:e.text,...r.timestamp?{timestamp:r.timestamp}:{}}:null:e.type==="text"&&e.text?{id:n,kind:t,text:e.text,...r.timestamp?{timestamp:r.timestamp}:{}}:null}function JB(e){const t=[];return e.forEach((n,r)=>{const s=n.provenance,i=n.id??s?.uuid??`m${r}`;if(s?.apiErrorStatus){t.push({id:`${i}-err`,kind:"error",text:`API error (HTTP ${s.apiErrorStatus})`,errorStatus:s.apiErrorStatus,...s.timestamp?{timestamp:s.timestamp}:{}});return}const l=n.role==="user"?"user":"assistant",u={...s?.timestamp?{timestamp:s.timestamp}:{},...s?.cwd?{cwd:s.cwd}:{},...s?.model?{model:s.model}:{},...s?.reasoningEffort?{reasoningEffort:s.reasoningEffort}:{},...s?.source?{source:s.source}:{}};n.parts.forEach((d,f)=>{const p=GB(d,l,`${i}-${f}`,u);p&&t.push(p)})}),t}const QB={Read:{icon:og,tone:"sky",label:"Read file",summaryOnly:!0},Write:{icon:FB,tone:"amber",label:"Write file",summaryOnly:!0},Edit:{icon:yu,tone:"violet",label:"Edit file",summaryOnly:!0},MultiEdit:{icon:ij,tone:"violet",label:"Multi-edit",summaryOnly:!0},NotebookEdit:{icon:yu,tone:"violet",label:"Edit notebook",summaryOnly:!0},Grep:{icon:$s,tone:"amber",label:"Grep"},Glob:{icon:oj,tone:"sky",label:"Glob"},Bash:{icon:fr,tone:"emerald",label:"Run command"},BashOutput:{icon:Ol,tone:"emerald",label:"Shell output"},KillShell:{icon:Qf,tone:"rose",label:"Kill shell"},KillBash:{icon:Qf,tone:"rose",label:"Kill shell"},Task:{icon:ms,tone:"indigo",label:"Sub-agent task"},Agent:{icon:ms,tone:"indigo",label:"Sub-agent task"},Skill:{icon:Z2,tone:"fuchsia",label:"Invoke skill"},TodoWrite:{icon:oo,tone:"sky",label:"Update todos"},TaskCreate:{icon:oo,tone:"sky",label:"Create task"},TaskUpdate:{icon:oo,tone:"sky",label:"Update task"},TaskList:{icon:oo,tone:"sky",label:"List tasks"},TaskGet:{icon:oo,tone:"sky",label:"Get task"},TaskOutput:{icon:oo,tone:"sky",label:"Task output"},TaskStop:{icon:Qf,tone:"rose",label:"Stop task"},ToolSearch:{icon:$s,tone:"amber",label:"Search tools"},AskUserQuestion:{icon:$B,tone:"sky",label:"Ask user"},EnterPlanMode:{icon:oo,tone:"sky",label:"Enter plan mode"},ExitPlanMode:{icon:oo,tone:"sky",label:"Exit plan mode"},WebFetch:{icon:S_,tone:"sky",label:"Fetch URL"},WebSearch:{icon:ui,tone:"sky",label:"Web search"},browser_navigate:{icon:ui,tone:"sky",label:"Navigate"},browser_navigate_back:{icon:ui,tone:"sky",label:"Navigate back"},browser_click:{icon:Dw,tone:"sky",label:"Click"},browser_triple_click:{icon:Dw,tone:"sky",label:"Triple click"},browser_type:{icon:fr,tone:"emerald",label:"Type text"},browser_press_key:{icon:Ng,tone:"amber",label:"Press key"},browser_snapshot:{icon:og,tone:"violet",label:"Snapshot"},browser_take_screenshot:{icon:IB,tone:"violet",label:"Screenshot"},browser_evaluate:{icon:Ol,tone:"violet",label:"Evaluate JS"},browser_network_requests:{icon:PB,tone:"emerald",label:"Network"},browser_wait_for:{icon:RB,tone:"amber",label:"Wait"},browser_close:{icon:Tn,tone:"rose",label:"Close browser"}},YB=new Set(["iconify","icons8","lucide","react-icons"]),XB=new Set(["gemini","openai","anthropic"]);function aj(e){const t=e.startsWith("mcp__")?e.slice(5):e,n=t.indexOf("__");return n<0?null:{server:t.slice(0,n),name:t.slice(n+2)}}function lj(e){const t=QB[e];if(t)return t;const n=aj(e);if(n){const r=`${n.server}: ${n.name.replace(/_/g," ")}`;return YB.has(n.server)?{icon:DB,tone:"pink",label:r}:XB.has(n.server)?{icon:jm,tone:"violet",label:r}:{icon:W2,tone:"violet",label:r}}return{icon:q2,tone:"slate",label:e}}function eU(e){let t=0,n=0;const r=new Map;for(const l of e)l.kind==="tool"&&(t+=1),(l.kind==="user"||l.kind==="assistant")&&(n+=1),l.model&&r.set(l.model,(r.get(l.model)??0)+1);let s,i=0;for(const[l,u]of r)u>i&&(i=u,s=l);return{toolCount:t,messageCount:n,...s?{model:s}:{}}}const tU={build:"Build",test:"Test",install:"Install",explore:"Explore",lint:"Lint",cleanup:"Cleanup",git:"Git",docker:"Docker",k8s:"Kubernetes",run:"Run",plan:"Plan",edit:"Edit",clarify:"Clarify",read:"Read",other:"Other"},I0={install:100,edit:90,run:80,test:70,build:60,cleanup:50,docker:40,k8s:40,git:30,explore:20,lint:20,plan:20,read:15,clarify:10,other:0},G2=[["build",{commands:["go build","make build","make all","cargo build","npm run build","yarn build","task build","gradle build","mvn compile","mvn package","dotnet build","pnpm build","bun build","mage","bazel build","nx build","turbo build","javac"],patterns:[".*gradle.*(build|compile|bootJar|jar).*",".*mvn.*(compile|package)","^go build","^make\\s*$","^make\\s+(build|all)\\b","^cargo build","^task build"]}],["test",{commands:["go test","pytest","npm test","yarn test","task test","make test","cargo test","mvn test","gradle test","vitest","jest","bun test","dotnet test","ginkgo","gotestsum","zig test"],patterns:[".*gradle.*test",".*mvn.*test","^go test","^pytest","^npm (run )?test","^make\\s+test","^vitest","^jest","^bun test","^ginkgo","^gotestsum"]}],["install",{commands:["npm install","npm i","yarn install","yarn add","go mod tidy","go mod download","go get","pip install","pip3 install","cargo add","brew install","apt install","apt-get install","pnpm install","pnpm add","bun install","bun add","poetry install","poetry add","uv pip install","pdm install","pdm add"],patterns:["^npm (install|i)\\b","^yarn (install|add)\\b","^pip3? install","^go (mod tidy|mod download|get)","^pnpm (install|add)\\b","^bun (install|add)\\b","^poetry (install|add)\\b","^uv pip install","^pdm (install|add)\\b"]}],["explore",{tools:["Read","Grep","Glob","LSP","WebFetch","WebSearch"],commands:["ls","md5","echo","find","grep","rg","ag","cat","head","tail","less","more","tree","wc","file","stat","du","df","pwd","which","whereis","type","fd","bat","exa","eza","fzf","jq","yq","ripgrep","sd","diff","go list","git status","git diff","git log","ps","printenv","sed"],patterns:["^ls\\b","^find\\b","^grep\\b","^rg\\b","^cat\\b","^head\\b","^tail\\b","^tree\\b","^fd\\b","^bat\\b","^exa\\b","^eza\\b","^jq\\b","^yq\\b","^diff\\b","^go list\\b","^git\\s+(status|diff|log)\\b"]}],["lint",{commands:["golangci-lint","eslint","gofmt","go fmt","prettier","black","flake8","pylint","rubocop","shellcheck","task fmt","make fmt","make lint","biome","ruff","mypy","staticcheck","buf lint","deno lint","oxlint"],patterns:["lint","^go fmt","^gofmt","^prettier","^black\\b","^biome\\b","^ruff\\b","^mypy\\b","^staticcheck\\b"]}],["cleanup",{commands:["rm","rmdir","git clean","make clean","cargo clean","go clean","npm cache clean","docker prune","docker system prune"],patterns:["^rm\\b","^rmdir\\b","clean\\b","prune\\b"]}],["git",{commands:["git show","git branch","git checkout","git switch","git commit","git push","git pull","git fetch","git merge","git rebase","git stash","git add","git reset","git clone","git remote","git tag"],patterns:["^git\\b"]}],["docker",{commands:["docker run","docker build","docker push","docker pull","docker ps","docker images","docker logs","docker exec","docker stop","docker start","docker rm","docker rmi","docker-compose","podman"],patterns:["^docker\\b","^docker-compose\\b","^podman\\b"]}],["k8s",{commands:["kubectl","helm","k9s","kubectx","kubens","kustomize","minikube","kind"],patterns:["^kubectl\\b","^helm\\b","^k9s\\b","^kubectx\\b","^kubens\\b","^kustomize\\b","^minikube\\b","^kind\\b"]}],["run",{tools:["KillShell"],commands:["go run","python","python3","node","bun run","deno run","ruby","perl","php","java"],patterns:[".*gradle.*run.*","^go run\\b","^python3?\\b","^node\\b","^bun run\\b","^deno run\\b","^ruby\\b","^perl\\b","^php\\b","^java\\s+-jar\\b","^\\./[\\w.-]+\\.(sh|bash|py|rb|pl)$","^bash\\s+\\S+\\.sh"]}],["plan",{tools:["Task","TodoWrite","EnterPlanMode"],commands:["task","make help","task explore","task plan","task todos","task todo"],patterns:["^task\\s*$","^task\\s+--list","^make\\s+help"]}],["edit",{tools:["Edit","Write","NotebookEdit"],commands:["mkdir"],patterns:["sed.* -i"]}],["clarify",{tools:["AskUserQuestion","ExitPlanMode","TaskOutput"]}]],nU=G2.map(([e,t])=>[e,(t.patterns??[]).map(n=>new RegExp(n))]);function Bw(e,t){if(!t.matched||t.category==="other")return e;if(!e.matched||e.category==="other"||t.specificity>e.specificity)return t;if(t.specificityr?t:nI0[i]-I0[s]||s.localeCompare(i)),tools:[...n].map(([s,i])=>({key:s,label:i})).sort((s,i)=>s.label.localeCompare(i.label)),sources:[...r].sort()}}function Uw(e){return typeof e=="string"?e:e.label}function aU(e){return typeof e=="string"?e:e.prompt}function lU(e){return e.type==="reasoning"}function cU(e){return e.type==="file"}const uU=[{value:"default",label:"Default",description:"Prompt for dangerous operations using standard Claude behavior."},{value:"auto",label:"Auto",description:"Use Claude's classifier to approve or deny permission prompts."},{value:"acceptEdits",label:"Accept edits",description:"Automatically accept file edit operations."},{value:"dontAsk",label:"Don't ask",description:"Do not prompt; deny actions that are not pre-approved."},{value:"plan",label:"Plan",description:"Planning mode with no tool execution."},{value:"bypassPermissions",label:"Bypass",description:"Bypass permission checks when explicitly allowed by the host."}];function uj(e){return e.type==="dynamic-tool"}function dU(e){return e.type.startsWith("tool-")}function dj(e){return uj(e)?e.toolName:e.type.slice(5)}const fj=w.createContext(null);function id(){const e=w.useContext(fj);if(!e)throw new Error("useChatWindowManager must be used within ");return e}const fU=6,zw=520,Vw=700,Hw=30,J2=ri.chatWindow;function mj(e){return`chat-panels:${e}`}function mU(e){if(typeof window>"u")return[];try{const t=localStorage.getItem(mj(e));return t?JSON.parse(t).map((r,s)=>({...r,initialModel:null,zIndex:J2+s,initialPrompt:null,contextItems:[]})):[]}catch{return[]}}function pU(e,t){const n=t.map(r=>({id:r.id,threadId:r.threadId,x:r.x,y:r.y,width:r.width,height:r.height,maximized:r.maximized}));localStorage.setItem(mj(e),JSON.stringify(n))}let hU=0;function gU(){return`panel-${++hU}-${Date.now()}`}function c1(e,t){const n=[...e].sort((r,s)=>r.zIndex-s.zIndex);if(t){const r=n.findIndex(s=>s.id===t);if(r>=0){const[s]=n.splice(r,1);s&&n.push(s)}}return n.map((r,s)=>({...r,zIndex:J2+s}))}function xU({icon:e=b0,label:t="Open chat",className:n}){const{panels:r,openPanel:s}=id();return r.length>0?null:o.jsx("button",{type:"button","data-testid":"chat-fab",title:t,"aria-label":t,onClick:()=>s(),style:{zIndex:ri.chatFab},className:R("fixed bottom-4 right-4 flex h-12 w-12 items-center justify-center","rounded-full bg-primary text-primary-foreground shadow-lg transition-colors hover:bg-primary/90",n),children:o.jsx(K,{...typeof e=="string"?{name:e}:{icon:e},className:"size-5"})})}var pj="vercel.ai.error",vU=Symbol.for(pj),Zw,Ww,Ds=class hj extends(Ww=Error,Zw=vU,Ww){constructor({name:t,message:n,cause:r}){super(n),this[Zw]=!0,this.name=t,this.cause=r}static isInstance(t){return hj.hasMarker(t,pj)}static hasMarker(t,n){const r=Symbol.for(n);return t!=null&&typeof t=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}};function gj(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var xj="AI_InvalidArgumentError",vj=`vercel.ai.error.${xj}`,bU=Symbol.for(vj),qw,Kw,yU=class extends(Kw=Ds,qw=bU,Kw){constructor({message:e,cause:t,argument:n}){super({name:xj,message:e,cause:t}),this[qw]=!0,this.argument=n}static isInstance(e){return Ds.hasMarker(e,vj)}},bj="AI_JSONParseError",yj=`vercel.ai.error.${bj}`,wU=Symbol.for(yj),Gw,Jw,Qw=class extends(Jw=Ds,Gw=wU,Jw){constructor({text:e,cause:t}){super({name:bj,message:`JSON parsing failed: Text: ${e}. +Error message: ${gj(t)}`,cause:t}),this[Gw]=!0,this.text=e}static isInstance(e){return Ds.hasMarker(e,yj)}},wj="AI_TypeValidationError",_j=`vercel.ai.error.${wj}`,_U=Symbol.for(_j),Yw,Xw,Ml=class Sg extends(Xw=Ds,Yw=_U,Xw){constructor({value:t,cause:n,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const i=[];r.entityName&&i.push(r.entityName),r.entityId&&i.push(`id: "${r.entityId}"`),s+=i.join(", "),s+=")"}super({name:wj,message:`${s}: Value: ${JSON.stringify(t)}. +Error message: ${gj(n)}`,cause:n}),this[Yw]=!0,this.value=t,this.context=r}static isInstance(t){return Ds.hasMarker(t,_j)}static wrap({value:t,cause:n,context:r}){var s,i,l;return Sg.isInstance(n)&&n.value===t&&((s=n.context)==null?void 0:s.field)===r?.field&&((i=n.context)==null?void 0:i.entityName)===r?.entityName&&((l=n.context)==null?void 0:l.entityId)===r?.entityId?n:new Sg({value:t,cause:n,context:r})}},e4;function le(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=l.prototype,p=Object.keys(f);for(let h=0;hn?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class yl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class jj extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(e4=globalThis).__zod_globalConfig??(e4.__zod_globalConfig={});const Q2=globalThis.__zod_globalConfig;function bo(e){return Q2}function kj(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function Eg(e,t){return typeof t=="bigint"?t.toString():t}function km(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Y2(e){return e==null}function X2(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function jU(e,t){const n=e/t,r=Math.round(n),s=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r){};function ku(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const NU=km(()=>{if(Q2.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Al(e){if(ku(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ku(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Cj(e){return Al(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const CU=new Set(["string","number","symbol"]);function Ll(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ki(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Be(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function SU(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const EU={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function TU(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=ji(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return ba(this,"shape",l),l},checks:[]});return ki(e,i)}function OU(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=ji(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return ba(this,"shape",l),l},checks:[]});return ki(e,i)}function MU(e,t){if(!Al(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=ji(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return ba(this,"shape",i),i}});return ki(e,s)}function AU(e,t){if(!Al(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ji(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return ba(this,"shape",r),r}});return ki(e,n)}function LU(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=ji(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return ba(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ki(e,n)}function RU(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=ji(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return ba(this,"shape",d),d},checks:[]});return ki(t,l)}function PU(e,t,n){const r=ji(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:s[l]}))}else for(const l in s)i[l]=new e({type:"nonoptional",innerType:s[l]});return ba(this,"shape",i),i}});return ki(t,r)}function cl(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Af(e){return typeof e=="string"?e:e?.message}function yo(e,t,n){const r=e.message?e.message:Af(e.inst?._zod.def?.error?.(e))??Af(t?.error?.(e))??Af(n.customError?.(e))??Af(n.localeError?.(e))??"Invalid input",{inst:s,continue:i,input:l,...u}=e;return u.path??(u.path=[]),u.message=r,t?.reportInput&&(u.input=l),u}function ex(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Nu(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Sj=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Eg,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ej=le("$ZodError",Sj),Tj=le("$ZodError",Sj,{Parent:Error});function $U(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function FU(e,t=n=>n.message){const n={_errors:[]},r=(s,i=[])=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>r({issues:u},[...i,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...i,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...i,...l.path]);else{const u=[...i,...l.path];if(u.length===0)n._errors.push(t(l));else{let d=n,f=0;for(;f(t,n,r,s)=>{const i=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new yl;if(l.issues.length){const u=new(s?.Err??e)(l.issues.map(d=>yo(d,i,bo())));throw Nj(u,s?.callee),u}return l.value},nx=e=>async(t,n,r,s)=>{const i=r?{...r,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new(s?.Err??e)(l.issues.map(d=>yo(d,i,bo())));throw Nj(u,s?.callee),u}return l.value},Nm=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new yl;return i.issues.length?{success:!1,error:new(e??Ej)(i.issues.map(l=>yo(l,s,bo())))}:{success:!0,data:i.value}},DU=Nm(Tj),Cm=e=>async(t,n,r)=>{const s=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>yo(l,s,bo())))}:{success:!0,data:i.value}},BU=Cm(Tj),UU=e=>(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return tx(e)(t,n,s)},zU=e=>(t,n,r)=>tx(e)(t,n,r),VU=e=>async(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return nx(e)(t,n,s)},HU=e=>async(t,n,r)=>nx(e)(t,n,r),ZU=e=>(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return Nm(e)(t,n,s)},WU=e=>(t,n,r)=>Nm(e)(t,n,r),qU=e=>async(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return Cm(e)(t,n,s)},KU=e=>async(t,n,r)=>Cm(e)(t,n,r),GU=/^[cC][0-9a-z]{6,}$/,JU=/^[0-9a-z]+$/,QU=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,YU=/^[0-9a-vA-V]{20}$/,XU=/^[A-Za-z0-9]{27}$/,ez=/^[a-zA-Z0-9_-]{21}$/,tz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nz=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,r4=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,rz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,sz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function oz(){return new RegExp(sz,"u")}const iz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,az=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,lz=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Oj=/^[A-Za-z0-9_-]*$/,dz=/^https?$/,fz=/^\+[1-9]\d{6,14}$/,Mj="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",mz=new RegExp(`^${Mj}$`);function Aj(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function pz(e){return new RegExp(`^${Aj(e)}$`)}function hz(e){const t=Aj({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Mj}T(?:${r})$`)}const gz=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},xz=/^-?\d+$/,Lj=/^-?\d+(?:\.\d+)?$/,vz=/^(?:true|false)$/i,bz=/^null$/i,yz=/^[^A-Z]*$/,wz=/^[^a-z]*$/,hr=le("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Rj={number:"number",bigint:"bigint",object:"date"},Pj=le("$ZodCheckLessThan",(e,t)=>{hr.init(e,t);const n=Rj[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?r.value<=t.value:r.value{hr.init(e,t);const n=Rj[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_z=le("$ZodCheckMultipleOf",(e,t)=>{hr.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):jU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),jz=le("$ZodCheckNumberFormat",(e,t)=>{hr.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,i]=EU[t.format];e._zod.onattach.push(l=>{const u=l._zod.bag;u.format=t.format,u.minimum=s,u.maximum=i,n&&(u.pattern=xz)}),e._zod.check=l=>{const u=l.value;if(n){if(!Number.isInteger(u)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?l.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}ui&&l.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),kz=le("$ZodCheckMaxLength",(e,t)=>{var n;hr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Y2(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const s=r.value;if(s.length<=t.maximum)return;const l=ex(s);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Nz=le("$ZodCheckMinLength",(e,t)=>{var n;hr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Y2(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const l=ex(s);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Cz=le("$ZodCheckLengthEquals",(e,t)=>{var n;hr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Y2(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,i=s.length;if(i===t.length)return;const l=ex(s),u=i>t.length;r.issues.push({origin:l,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Sm=le("$ZodCheckStringFormat",(e,t)=>{var n,r;hr.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Sz=le("$ZodCheckRegex",(e,t)=>{Sm.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ez=le("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=yz),Sm.init(e,t)}),Tz=le("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=wz),Sm.init(e,t)}),Oz=le("$ZodCheckIncludes",(e,t)=>{hr.init(e,t);const n=Ll(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Mz=le("$ZodCheckStartsWith",(e,t)=>{hr.init(e,t);const n=new RegExp(`^${Ll(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Az=le("$ZodCheckEndsWith",(e,t)=>{hr.init(e,t);const n=new RegExp(`.*${Ll(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Lz=le("$ZodCheckOverwrite",(e,t)=>{hr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Rz{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` +`).filter(l=>l),s=Math.min(...r.map(l=>l.length-l.trimStart().length)),i=r.map(l=>l.slice(s)).map(l=>" ".repeat(this.indent*2)+l);for(const l of i)this.content.push(l)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,s.join(` +`))}}const Pz={major:4,minor:4,patch:3},Pt=le("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pz;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const i of s._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,u,d)=>{let f=cl(l),p;for(const h of u){if(h._zod.def.when){if(IU(l)||!h._zod.def.when(l))continue}else if(f)continue;const x=l.issues.length,v=h._zod.check(l);if(v instanceof Promise&&d?.async===!1)throw new yl;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,l.issues.length!==x&&(f||(f=cl(l,x)))});else{if(l.issues.length===x)continue;f||(f=cl(l,x))}}return p?p.then(()=>l):l},i=(l,u,d)=>{if(cl(l))return l.aborted=!0,l;const f=s(u,r,d);if(f instanceof Promise){if(d.async===!1)throw new yl;return f.then(p=>e._zod.parse(p,d))}return e._zod.parse(f,d)};e._zod.run=(l,u)=>{if(u.skipChecks)return e._zod.parse(l,u);if(u.direction==="backward"){const f=e._zod.parse({value:l.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(p=>i(p,l,u)):i(f,l,u)}const d=e._zod.parse(l,u);if(d instanceof Promise){if(u.async===!1)throw new yl;return d.then(f=>s(f,r,u))}return s(d,r,u)}}ut(e,"~standard",()=>({validate:s=>{try{const i=DU(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return BU(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),rx=le("$ZodString",(e,t)=>{Pt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??gz(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Dt=le("$ZodStringFormat",(e,t)=>{Sm.init(e,t),rx.init(e,t)}),Iz=le("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=nz),Dt.init(e,t)}),$z=le("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=r4(r))}else t.pattern??(t.pattern=r4());Dt.init(e,t)}),Fz=le("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=rz),Dt.init(e,t)}),Dz=le("$ZodURL",(e,t)=>{Dt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim();if(!t.normalize&&t.protocol?.source===dz.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Bz=le("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=oz()),Dt.init(e,t)}),Uz=le("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ez),Dt.init(e,t)}),zz=le("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=GU),Dt.init(e,t)}),Vz=le("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=JU),Dt.init(e,t)}),Hz=le("$ZodULID",(e,t)=>{t.pattern??(t.pattern=QU),Dt.init(e,t)}),Zz=le("$ZodXID",(e,t)=>{t.pattern??(t.pattern=YU),Dt.init(e,t)}),Wz=le("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=XU),Dt.init(e,t)}),qz=le("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=hz(t)),Dt.init(e,t)}),Kz=le("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=mz),Dt.init(e,t)}),Gz=le("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=pz(t)),Dt.init(e,t)}),Jz=le("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tz),Dt.init(e,t)}),Qz=le("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=iz),Dt.init(e,t),e._zod.bag.format="ipv4"}),Yz=le("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=az),Dt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Xz=le("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=lz),Dt.init(e,t)}),eV=le("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=cz),Dt.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,i]=r;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function $j(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const tV=le("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=uz),Dt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{$j(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function nV(e){if(!Oj.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return $j(n)}const rV=le("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Oj),Dt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{nV(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),sV=le("$ZodE164",(e,t)=>{t.pattern??(t.pattern=fz),Dt.init(e,t)});function oV(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const iV=le("$ZodJWT",(e,t)=>{Dt.init(e,t),e._zod.check=n=>{oV(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Fj=le("$ZodNumber",(e,t)=>{Pt.init(e,t),e._zod.pattern=e._zod.bag.pattern??Lj,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),aV=le("$ZodNumberFormat",(e,t)=>{jz.init(e,t),Fj.init(e,t)}),lV=le("$ZodBoolean",(e,t)=>{Pt.init(e,t),e._zod.pattern=vz,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),cV=le("$ZodNull",(e,t)=>{Pt.init(e,t),e._zod.pattern=bz,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const s=n.value;return s===null||n.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),n}}),uV=le("$ZodUnknown",(e,t)=>{Pt.init(e,t),e._zod.parse=n=>n}),dV=le("$ZodNever",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function s4(e,t,n){e.issues.length&&t.issues.push(...ul(n,e.issues)),t.value[n]=e.value}const fV=le("$ZodArray",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let l=0;ls4(f,n,l))):s4(d,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function $0(e,t,n,r,s,i){const l=n in r;if(e.issues.length){if(s&&i&&!l)return;t.issues.push(...ul(n,e.issues))}if(!l&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?l&&(t.value[n]=void 0):t.value[n]=e.value}function Dj(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=SU(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Bj(e,t,n,r,s,i){const l=[],u=s.keySet,d=s.catchall._zod,f=d.def.type,p=d.optin==="optional",h=d.optout==="optional";for(const x in t){if(x==="__proto__"||u.has(x))continue;if(f==="never"){l.push(x);continue}const v=d.run({value:t[x],issues:[]},r);v instanceof Promise?e.push(v.then(y=>$0(y,n,x,t,p,h))):$0(v,n,x,t,p,h)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const mV=le("$ZodObject",(e,t)=>{if(Pt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...u};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=km(()=>Dj(t));ut(e._zod,"propValues",()=>{const u=t.shape,d={};for(const f in u){const p=u[f]._zod;if(p.values){d[f]??(d[f]=new Set);for(const h of p.values)d[f].add(h)}}return d});const s=ku,i=t.catchall;let l;e._zod.parse=(u,d)=>{l??(l=r.value);const f=u.value;if(!s(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};const p=[],h=l.shape;for(const x of l.keys){const v=h[x],y=v._zod.optin==="optional",b=v._zod.optout==="optional",j=v._zod.run({value:f[x],issues:[]},d);j instanceof Promise?p.push(j.then(S=>$0(S,u,x,f,y,b))):$0(j,u,x,f,y,b)}return i?Bj(p,f,u,d,r.value,e):p.length?Promise.all(p).then(()=>u):u}}),pV=le("$ZodObjectJIT",(e,t)=>{mV.init(e,t);const n=e._zod.parse,r=km(()=>Dj(t)),s=x=>{const v=new Rz(["shape","payload","ctx"]),y=r.value,b=k=>{const T=n4(k);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};v.write("const input = payload.value;");const j=Object.create(null);let S=0;for(const k of y.keys)j[k]=`key_${S++}`;v.write("const newResult = {};");for(const k of y.keys){const T=j[k],E=n4(k),O=x[k],M=O?._zod?.optin==="optional",L=O?._zod?.optout==="optional";v.write(`const ${T} = ${b(k)};`),M&&L?v.write(` + if (${T}.issues.length) { + if (${E} in input) { + payload.issues = payload.issues.concat(${T}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${E}, ...iss.path] : [${E}] + }))); + } + } + + if (${T}.value === undefined) { + if (${E} in input) { + newResult[${E}] = undefined; + } + } else { + newResult[${E}] = ${T}.value; + } + + `):M?v.write(` + if (${T}.issues.length) { + payload.issues = payload.issues.concat(${T}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${E}, ...iss.path] : [${E}] + }))); + } + + if (${T}.value === undefined) { + if (${E} in input) { + newResult[${E}] = undefined; + } + } else { + newResult[${E}] = ${T}.value; + } + + `):v.write(` + const ${T}_present = ${E} in input; + if (${T}.issues.length) { + payload.issues = payload.issues.concat(${T}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${E}, ...iss.path] : [${E}] + }))); + } + if (!${T}_present && !${T}.issues.length) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: undefined, + path: [${E}] + }); + } + + if (${T}_present) { + if (${T}.value === undefined) { + newResult[${E}] = undefined; + } else { + newResult[${E}] = ${T}.value; + } + } + + `)}v.write("payload.value = newResult;"),v.write("return payload;");const N=v.compile();return(k,T)=>N(x,k,T)};let i;const l=ku,u=!Q2.jitless,f=u&&NU.value,p=t.catchall;let h;e._zod.parse=(x,v)=>{h??(h=r.value);const y=x.value;return l(y)?u&&f&&v?.async===!1&&v.jitless!==!0?(i||(i=s(t.shape)),x=i(x,v),p?Bj([],y,x,v,h,e):x):n(x,v):(x.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),x)}});function o4(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!cl(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(l=>yo(l,r,bo())))}),t)}const Uj=le("$ZodUnion",(e,t)=>{Pt.init(e,t),ut(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ut(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ut(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ut(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${r.map(s=>X2(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,s)=>{if(n)return n(r,s);let i=!1;const l=[];for(const u of t.options){const d=u._zod.run({value:r.value,issues:[]},s);if(d instanceof Promise)l.push(d),i=!0;else{if(d.issues.length===0)return d;l.push(d)}}return i?Promise.all(l).then(u=>o4(u,r,e,s)):o4(l,r,e,s)}}),hV=le("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Uj.init(e,t);const n=e._zod.parse;ut(e._zod,"propValues",()=>{const s={};for(const i of t.options){const l=i._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,d]of Object.entries(l)){s[u]||(s[u]=new Set);for(const f of d)s[u].add(f)}}return s});const r=km(()=>{const s=t.options,i=new Map;for(const l of s){const u=l._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,l)}}return i});e._zod.parse=(s,i)=>{const l=s.value;if(!ku(l))return s.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),s;const u=r.value.get(l?.[t.discriminator]);return u?u._zod.run(s,i):t.unionFallback||i.direction==="backward"?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:l,path:[t.discriminator],inst:e}),s)}}),gV=le("$ZodIntersection",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},r),l=t.right._zod.run({value:s,issues:[]},r);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([d,f])=>i4(n,d,f)):i4(n,i,l)}});function Tg(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Al(e)&&Al(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of r){const l=Tg(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};s[i]=l.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;ru.l&&u.r).map(([u])=>u);if(i.length&&s&&e.issues.push({...s,keys:i}),cl(e))return e;const l=Tg(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const xV=le("$ZodRecord",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Al(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],l=t.keyType._zod.values;if(l){n.value={};const u=new Set;for(const f of l)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);const p=t.keyType._zod.run({value:f,issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(v=>yo(v,r,bo())),input:f,path:[f],inst:e});continue}const h=p.value,x=t.valueType._zod.run({value:s[f],issues:[]},r);x instanceof Promise?i.push(x.then(v=>{v.issues.length&&n.issues.push(...ul(f,v.issues)),n.value[h]=v.value})):(x.issues.length&&n.issues.push(...ul(f,x.issues)),n.value[h]=x.value)}let d;for(const f in s)u.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:d})}else{n.value={};for(const u of Reflect.ownKeys(s)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,u))continue;let d=t.keyType._zod.run({value:u,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Lj.test(u)&&d.issues.length){const h=t.keyType._zod.run({value:Number(u),issues:[]},r);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(d=h)}if(d.issues.length){t.mode==="loose"?n.value[u]=s[u]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>yo(h,r,bo())),input:u,path:[u],inst:e});continue}const p=t.valueType._zod.run({value:s[u],issues:[]},r);p instanceof Promise?i.push(p.then(h=>{h.issues.length&&n.issues.push(...ul(u,h.issues)),n.value[d.value]=h.value})):(p.issues.length&&n.issues.push(...ul(u,p.issues)),n.value[d.value]=p.value)}}return i.length?Promise.all(i).then(()=>n):n}}),vV=le("$ZodEnum",(e,t)=>{Pt.init(e,t);const n=kj(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>CU.has(typeof s)).map(s=>typeof s=="string"?Ll(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const l=s.value;return r.has(l)||s.issues.push({code:"invalid_value",values:n,input:l,inst:e}),s}}),bV=le("$ZodLiteral",(e,t)=>{if(Pt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Ll(r):r?Ll(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,s)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),yV=le("$ZodTransform",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new jj(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(l=>(n.value=l,n.fallback=!0,n));if(s instanceof Promise)throw new yl;return n.value=s,n.fallback=!0,n}});function a4(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const zj=le("$ZodOptional",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ut(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${X2(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const s=n.value,i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(l=>a4(l,s)):a4(i,s)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),wV=le("$ZodExactOptional",(e,t)=>{zj.init(e,t),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),_V=le("$ZodNullable",(e,t)=>{Pt.init(e,t),ut(e._zod,"optin",()=>t.innerType._zod.optin),ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${X2(n.source)}|null)$`):void 0}),ut(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),jV=le("$ZodDefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>l4(i,t)):l4(s,t)}});function l4(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const kV=le("$ZodPrefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),NV=le("$ZodNonOptional",(e,t)=>{Pt.init(e,t),ut(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>c4(i,e)):c4(s,e)}});function c4(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const CV=le("$ZodCatch",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>yo(l,r,bo()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>yo(i,r,bo()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),SV=le("$ZodPipe",(e,t)=>{Pt.init(e,t),ut(e._zod,"values",()=>t.in._zod.values),ut(e._zod,"optin",()=>t.in._zod.optin),ut(e._zod,"optout",()=>t.out._zod.optout),ut(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(l=>Lf(l,t.in,r)):Lf(i,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(i=>Lf(i,t.out,r)):Lf(s,t.out,r)}});function Lf(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const EV=le("$ZodReadonly",(e,t)=>{Pt.init(e,t),ut(e._zod,"propValues",()=>t.innerType._zod.propValues),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"optin",()=>t.innerType?._zod?.optin),ut(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(u4):u4(s)}});function u4(e){return e.value=Object.freeze(e.value),e}const TV=le("$ZodLazy",(e,t)=>{Pt.init(e,t),ut(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),ut(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ut(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ut(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ut(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),OV=le("$ZodCustom",(e,t)=>{hr.init(e,t),Pt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(i=>d4(i,n,r,e));d4(s,n,r,e)}});function d4(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(Nu(s))}}var f4;class MV{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const s={...r,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function AV(){return new MV}(f4=globalThis).__zod_globalRegistry??(f4.__zod_globalRegistry=AV());const Qc=globalThis.__zod_globalRegistry;function LV(e,t){return new e({type:"string",...Be(t)})}function RV(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Be(t)})}function m4(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Be(t)})}function PV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Be(t)})}function IV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Be(t)})}function $V(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Be(t)})}function FV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Be(t)})}function DV(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Be(t)})}function BV(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Be(t)})}function UV(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Be(t)})}function zV(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Be(t)})}function VV(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Be(t)})}function HV(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Be(t)})}function ZV(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Be(t)})}function WV(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Be(t)})}function qV(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Be(t)})}function KV(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Be(t)})}function GV(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Be(t)})}function JV(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Be(t)})}function QV(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Be(t)})}function YV(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Be(t)})}function XV(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Be(t)})}function eH(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Be(t)})}function tH(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Be(t)})}function nH(e,t){return new e({type:"string",format:"date",check:"string_format",...Be(t)})}function rH(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Be(t)})}function sH(e,t){return new e({type:"string",format:"duration",check:"string_format",...Be(t)})}function oH(e,t){return new e({type:"number",checks:[],...Be(t)})}function iH(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Be(t)})}function aH(e,t){return new e({type:"boolean",...Be(t)})}function lH(e,t){return new e({type:"null",...Be(t)})}function cH(e){return new e({type:"unknown"})}function uH(e,t){return new e({type:"never",...Be(t)})}function p4(e,t){return new Pj({check:"less_than",...Be(t),value:e,inclusive:!1})}function u1(e,t){return new Pj({check:"less_than",...Be(t),value:e,inclusive:!0})}function h4(e,t){return new Ij({check:"greater_than",...Be(t),value:e,inclusive:!1})}function d1(e,t){return new Ij({check:"greater_than",...Be(t),value:e,inclusive:!0})}function g4(e,t){return new _z({check:"multiple_of",...Be(t),value:e})}function Vj(e,t){return new kz({check:"max_length",...Be(t),maximum:e})}function F0(e,t){return new Nz({check:"min_length",...Be(t),minimum:e})}function Hj(e,t){return new Cz({check:"length_equals",...Be(t),length:e})}function dH(e,t){return new Sz({check:"string_format",format:"regex",...Be(t),pattern:e})}function fH(e){return new Ez({check:"string_format",format:"lowercase",...Be(e)})}function mH(e){return new Tz({check:"string_format",format:"uppercase",...Be(e)})}function pH(e,t){return new Oz({check:"string_format",format:"includes",...Be(t),includes:e})}function hH(e,t){return new Mz({check:"string_format",format:"starts_with",...Be(t),prefix:e})}function gH(e,t){return new Az({check:"string_format",format:"ends_with",...Be(t),suffix:e})}function Wl(e){return new Lz({check:"overwrite",tx:e})}function xH(e){return Wl(t=>t.normalize(e))}function vH(){return Wl(e=>e.trim())}function bH(){return Wl(e=>e.toLowerCase())}function yH(){return Wl(e=>e.toUpperCase())}function wH(){return Wl(e=>kU(e))}function _H(e,t,n){return new e({type:"array",element:t,...Be(n)})}function jH(e,t,n){const r=Be(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function kH(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Be(n)})}function NH(e,t){const n=CH(r=>(r.addIssue=s=>{if(typeof s=="string")r.issues.push(Nu(s,r.value,n._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),r.issues.push(Nu(i))}},e(r.value,r)),t);return n}function CH(e,t){const n=new hr({check:"custom",...Be(t)});return n._zod.check=e,n}function D0(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Qc,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ct(e,t,n={path:[],schemaPath:[]}){var r;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const u=e._zod.toJSONSchema?.();if(u)l.schema=u;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const x=l.schema,v=t.processors[s.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);v(e,t,x,p)}const h=e._zod.parent;h&&(l.ref||(l.ref=h),Ct(h,t,p),t.seen.get(h).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&Wn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function B0(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const u=e.metadataRegistry.get(l[0])?.id;if(u){const d=r.get(u);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,l[0])}}const s=l=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const h=e.external.registry.get(l[0])?.id,x=e.external.uri??(y=>y);if(h)return{ref:x(h)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${x("__shared")}#/${u}/${v}`}}if(l[1]===n)return{ref:"#"};const f=`#/${u}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:f+p}},i=l=>{if(l[1].schema.$ref)return;const u=l[1],{ref:d,defId:f}=s(l);u.def={...u.schema},f&&(u.defId=f);const p=u.schema;for(const h in p)delete p[h];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const u=l[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const u=l[1];if(t===l[0]){i(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(u.cycle){i(l);continue}if(u.count>1&&e.reused==="ref"){i(l);continue}}}function U0(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const d=e.seen.get(u);if(d.ref===null)return;const f=d.def??d.schema,p={...f},h=d.ref;if(d.ref=null,h){r(h);const v=e.seen.get(h),y=v.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(y)):Object.assign(f,y),Object.assign(f,p),u._zod.parent===h)for(const j in f)j==="$ref"||j==="allOf"||j in p||delete f[j];if(y.$ref&&v.def)for(const j in f)j==="$ref"||j==="allOf"||j in v.def&&JSON.stringify(f[j])===JSON.stringify(v.def[j])&&delete f[j]}const x=u._zod.parent;if(x&&x!==h){r(x);const v=e.seen.get(x);if(v?.schema.$ref&&(f.$ref=v.schema.$ref,v.def))for(const y in f)y==="$ref"||y==="allOf"||y in v.def&&JSON.stringify(f[y])===JSON.stringify(v.def[y])&&delete f[y]}e.override({zodSchema:u,jsonSchema:f,path:d.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(u)}Object.assign(s,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&s.id===i&&delete s.id;const l=e.external?.defs??{};for(const u of e.seen.entries()){const d=u[1];d.def&&d.defId&&(d.def.id===d.defId&&delete d.def.id,l[d.defId]=d.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?s.$defs=l:s.definitions=l);try{const u=JSON.parse(JSON.stringify(s));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:z0(t,"input",e.processors),output:z0(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function Wn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Wn(r.element,n);if(r.type==="set")return Wn(r.valueType,n);if(r.type==="lazy")return Wn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Wn(r.innerType,n);if(r.type==="intersection")return Wn(r.left,n)||Wn(r.right,n);if(r.type==="record"||r.type==="map")return Wn(r.keyType,n)||Wn(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Wn(r.in,n)||Wn(r.out,n);if(r.type==="object"){for(const s in r.shape)if(Wn(r.shape[s],n))return!0;return!1}if(r.type==="union"){for(const s of r.options)if(Wn(s,n))return!0;return!1}if(r.type==="tuple"){for(const s of r.items)if(Wn(s,n))return!0;return!!(r.rest&&Wn(r.rest,n))}return!1}const SH=(e,t={})=>n=>{const r=D0({...n,processors:t});return Ct(e,r),B0(r,e),U0(r,e)},z0=(e,t,n={})=>r=>{const{libraryOptions:s,target:i}=r??{},l=D0({...s??{},target:i,io:t,processors:n});return Ct(e,l),B0(l,e),U0(l,e)},EH={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zj=(e,t,n,r)=>{const s=n;s.type="string";const{minimum:i,maximum:l,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof l=="number"&&(s.maxLength=l),u&&(s.format=EH[u]??u,s.format===""&&delete s.format,u==="time"&&delete s.format),f&&(s.contentEncoding=f),d&&d.size>0){const p=[...d];p.length===1?s.pattern=p[0].source:p.length>1&&(s.allOf=[...p.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},Wj=(e,t,n,r)=>{const s=n,{minimum:i,maximum:l,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:p}=e._zod.bag;typeof u=="string"&&u.includes("int")?s.type="integer":s.type="number";const h=typeof p=="number"&&p>=(i??Number.NEGATIVE_INFINITY),x=typeof f=="number"&&f<=(l??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";h?v?(s.minimum=p,s.exclusiveMinimum=!0):s.exclusiveMinimum=p:typeof i=="number"&&(s.minimum=i),x?v?(s.maximum=f,s.exclusiveMaximum=!0):s.exclusiveMaximum=f:typeof l=="number"&&(s.maximum=l),typeof d=="number"&&(s.multipleOf=d)},qj=(e,t,n,r)=>{n.type="boolean"},TH=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},OH=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Kj=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},MH=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},AH=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Gj=(e,t,n,r)=>{n.not={}},LH=(e,t,n,r)=>{},Jj=(e,t,n,r)=>{},RH=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Qj=(e,t,n,r)=>{const s=e._zod.def,i=kj(s.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},Yj=(e,t,n,r)=>{const s=e._zod.def,i=[];for(const l of s.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),i.every(l=>typeof l=="boolean")&&(n.type="boolean"),i.every(l=>l===null)&&(n.type="null"),n.enum=i},PH=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},IH=(e,t,n,r)=>{const s=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");s.type="string",s.pattern=i.source},$H=(e,t,n,r)=>{const s=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:u,mime:d}=e._zod.bag;l!==void 0&&(i.minLength=l),u!==void 0&&(i.maxLength=u),d?d.length===1?(i.contentMediaType=d[0],Object.assign(s,i)):(Object.assign(s,i),s.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(s,i)},FH=(e,t,n,r)=>{n.type="boolean"},Xj=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},DH=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},ek=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},BH=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},UH=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},tk=(e,t,n,r)=>{const s=n,i=e._zod.def,{minimum:l,maximum:u}=e._zod.bag;typeof l=="number"&&(s.minItems=l),typeof u=="number"&&(s.maxItems=u),s.type="array",s.items=Ct(i.element,t,{...r,path:[...r.path,"items"]})},nk=(e,t,n,r)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const l=i.shape;for(const f in l)s.properties[f]=Ct(l[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(l)),d=new Set([...u].filter(f=>{const p=i.shape[f]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(s.required=Array.from(d)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=Ct(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},rk=(e,t,n,r)=>{const s=e._zod.def,i=s.inclusive===!1,l=s.options.map((u,d)=>Ct(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=l:n.anyOf=l},sk=(e,t,n,r)=>{const s=e._zod.def,i=Ct(s.left,t,{...r,path:[...r.path,"allOf",0]}),l=Ct(s.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(i)?i.allOf:[i],...u(l)?l.allOf:[l]];n.allOf=d},zH=(e,t,n,r)=>{const s=n,i=e._zod.def;s.type="array";const l=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((x,v)=>Ct(x,t,{...r,path:[...r.path,l,v]})),f=i.rest?Ct(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(s.prefixItems=d,f&&(s.items=f)):t.target==="openapi-3.0"?(s.items={anyOf:d},f&&s.items.anyOf.push(f),s.minItems=d.length,f||(s.maxItems=d.length)):(s.items=d,f&&(s.additionalItems=f));const{minimum:p,maximum:h}=e._zod.bag;typeof p=="number"&&(s.minItems=p),typeof h=="number"&&(s.maxItems=h)},ok=(e,t,n,r)=>{const s=n,i=e._zod.def;s.type="object";const l=i.keyType,d=l._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){const p=Ct(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});s.patternProperties={};for(const h of d)s.patternProperties[h.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=Ct(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),s.additionalProperties=Ct(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=l._zod.values;if(f){const p=[...f].filter(h=>typeof h=="string"||typeof h=="number");p.length>0&&(s.required=p)}},ik=(e,t,n,r)=>{const s=e._zod.def,i=Ct(s.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},ak=(e,t,n,r)=>{const s=e._zod.def;Ct(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},lk=(e,t,n,r)=>{const s=e._zod.def;Ct(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},ck=(e,t,n,r)=>{const s=e._zod.def;Ct(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},uk=(e,t,n,r)=>{const s=e._zod.def;Ct(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType;let l;try{l=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},dk=(e,t,n,r)=>{const s=e._zod.def,i=s.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?i?s.out:s.in:s.out;Ct(l,t,r);const u=t.seen.get(e);u.ref=l},fk=(e,t,n,r)=>{const s=e._zod.def;Ct(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},VH=(e,t,n,r)=>{const s=e._zod.def;Ct(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},sx=(e,t,n,r)=>{const s=e._zod.def;Ct(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},mk=(e,t,n,r)=>{const s=e._zod.innerType;Ct(s,t,r);const i=t.seen.get(e);i.ref=s},x4={string:Zj,number:Wj,boolean:qj,bigint:TH,symbol:OH,null:Kj,undefined:MH,void:AH,never:Gj,any:LH,unknown:Jj,date:RH,enum:Qj,literal:Yj,nan:PH,template_literal:IH,file:$H,success:FH,custom:Xj,function:DH,transform:ek,map:BH,set:UH,array:tk,object:nk,union:rk,intersection:sk,tuple:zH,record:ok,nullable:ik,nonoptional:ak,default:lk,prefault:ck,catch:uk,pipe:dk,readonly:fk,promise:VH,optional:sx,lazy:mk};function HH(e,t){if("_idmap"in e){const r=e,s=D0({...t,processors:x4}),i={};for(const d of r._idmap.entries()){const[f,p]=d;Ct(p,s)}const l={},u={registry:r,uri:t?.uri,defs:i};s.external=u;for(const d of r._idmap.entries()){const[f,p]=d;B0(s,p),l[f]=U0(s,p)}if(Object.keys(i).length>0){const d=s.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[d]:i}}return{schemas:l}}const n=D0({...t,processors:x4});return Ct(e,n),B0(n,e),U0(n,e)}const ZH=le("ZodISODateTime",(e,t)=>{qz.init(e,t),Ht.init(e,t)});function WH(e){return tH(ZH,e)}const qH=le("ZodISODate",(e,t)=>{Kz.init(e,t),Ht.init(e,t)});function KH(e){return nH(qH,e)}const GH=le("ZodISOTime",(e,t)=>{Gz.init(e,t),Ht.init(e,t)});function JH(e){return rH(GH,e)}const QH=le("ZodISODuration",(e,t)=>{Jz.init(e,t),Ht.init(e,t)});function YH(e){return sH(QH,e)}const XH=(e,t)=>{Ej.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>FU(e,n)},flatten:{value:n=>$U(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Eg,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Eg,2)}},isEmpty:{get(){return e.issues.length===0}}})},Kr=le("ZodError",XH,{Parent:Error}),eZ=tx(Kr),tZ=nx(Kr),nZ=Nm(Kr),pk=Cm(Kr),rZ=UU(Kr),sZ=zU(Kr),oZ=VU(Kr),iZ=HU(Kr),aZ=ZU(Kr),lZ=WU(Kr),cZ=qU(Kr),uZ=KU(Kr),v4=new WeakMap;function ad(e,t,n){const r=Object.getPrototypeOf(e);let s=v4.get(r);if(s||(s=new Set,v4.set(r,s)),!s.has(t)){s.add(t);for(const i in n){const l=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){const u=l.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}const It=le("ZodType",(e,t)=>(Pt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:z0(e,"input"),output:z0(e,"output")}}),e.toJSONSchema=SH(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>eZ(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>nZ(e,n,r),e.parseAsync=async(n,r)=>tZ(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>pk(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>rZ(e,n,r),e.decode=(n,r)=>sZ(e,n,r),e.encodeAsync=async(n,r)=>oZ(e,n,r),e.decodeAsync=async(n,r)=>iZ(e,n,r),e.safeEncode=(n,r)=>aZ(e,n,r),e.safeDecode=(n,r)=>lZ(e,n,r),e.safeEncodeAsync=async(n,r)=>cZ(e,n,r),e.safeDecodeAsync=async(n,r)=>uZ(e,n,r),ad(e,"ZodType",{check(...n){const r=this.def;return this.clone(ji(r,{checks:[...r.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return ki(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(oW(n,r))},superRefine(n,r){return this.check(iW(n,r))},overwrite(n){return this.check(Wl(n))},optional(){return _4(this)},exactOptional(){return ZZ(this)},nullable(){return j4(this)},nullish(){return _4(j4(this))},nonoptional(n){return QZ(this,n)},array(){return ql(this)},or(n){return Qn([this,n])},and(n){return BZ(this,n)},transform(n){return k4(this,VZ(n))},default(n){return KZ(this,n)},prefault(n){return JZ(this,n)},catch(n){return XZ(this,n)},pipe(n){return k4(this,n)},readonly(){return nW(this)},describe(n){const r=this.clone();return Qc.add(r,{description:n}),r},meta(...n){if(n.length===0)return Qc.get(this);const r=this.clone();return Qc.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Qc.get(e)?.description},configurable:!0}),e)),hk=le("_ZodString",(e,t)=>{rx.init(e,t),It.init(e,t),e._zod.processJSONSchema=(r,s,i)=>Zj(e,r,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ad(e,"_ZodString",{regex(...r){return this.check(dH(...r))},includes(...r){return this.check(pH(...r))},startsWith(...r){return this.check(hH(...r))},endsWith(...r){return this.check(gH(...r))},min(...r){return this.check(F0(...r))},max(...r){return this.check(Vj(...r))},length(...r){return this.check(Hj(...r))},nonempty(...r){return this.check(F0(1,...r))},lowercase(r){return this.check(fH(r))},uppercase(r){return this.check(mH(r))},trim(){return this.check(vH())},normalize(...r){return this.check(xH(...r))},toLowerCase(){return this.check(bH())},toUpperCase(){return this.check(yH())},slugify(){return this.check(wH())}})}),dZ=le("ZodString",(e,t)=>{rx.init(e,t),hk.init(e,t),e.email=n=>e.check(RV(fZ,n)),e.url=n=>e.check(DV(mZ,n)),e.jwt=n=>e.check(eH(EZ,n)),e.emoji=n=>e.check(BV(pZ,n)),e.guid=n=>e.check(m4(b4,n)),e.uuid=n=>e.check(PV(Rf,n)),e.uuidv4=n=>e.check(IV(Rf,n)),e.uuidv6=n=>e.check($V(Rf,n)),e.uuidv7=n=>e.check(FV(Rf,n)),e.nanoid=n=>e.check(UV(hZ,n)),e.guid=n=>e.check(m4(b4,n)),e.cuid=n=>e.check(zV(gZ,n)),e.cuid2=n=>e.check(VV(xZ,n)),e.ulid=n=>e.check(HV(vZ,n)),e.base64=n=>e.check(QV(NZ,n)),e.base64url=n=>e.check(YV(CZ,n)),e.xid=n=>e.check(ZV(bZ,n)),e.ksuid=n=>e.check(WV(yZ,n)),e.ipv4=n=>e.check(qV(wZ,n)),e.ipv6=n=>e.check(KV(_Z,n)),e.cidrv4=n=>e.check(GV(jZ,n)),e.cidrv6=n=>e.check(JV(kZ,n)),e.e164=n=>e.check(XV(SZ,n)),e.datetime=n=>e.check(WH(n)),e.date=n=>e.check(KH(n)),e.time=n=>e.check(JH(n)),e.duration=n=>e.check(YH(n))});function Ee(e){return LV(dZ,e)}const Ht=le("ZodStringFormat",(e,t)=>{Dt.init(e,t),hk.init(e,t)}),fZ=le("ZodEmail",(e,t)=>{Fz.init(e,t),Ht.init(e,t)}),b4=le("ZodGUID",(e,t)=>{Iz.init(e,t),Ht.init(e,t)}),Rf=le("ZodUUID",(e,t)=>{$z.init(e,t),Ht.init(e,t)}),mZ=le("ZodURL",(e,t)=>{Dz.init(e,t),Ht.init(e,t)}),pZ=le("ZodEmoji",(e,t)=>{Bz.init(e,t),Ht.init(e,t)}),hZ=le("ZodNanoID",(e,t)=>{Uz.init(e,t),Ht.init(e,t)}),gZ=le("ZodCUID",(e,t)=>{zz.init(e,t),Ht.init(e,t)}),xZ=le("ZodCUID2",(e,t)=>{Vz.init(e,t),Ht.init(e,t)}),vZ=le("ZodULID",(e,t)=>{Hz.init(e,t),Ht.init(e,t)}),bZ=le("ZodXID",(e,t)=>{Zz.init(e,t),Ht.init(e,t)}),yZ=le("ZodKSUID",(e,t)=>{Wz.init(e,t),Ht.init(e,t)}),wZ=le("ZodIPv4",(e,t)=>{Qz.init(e,t),Ht.init(e,t)}),_Z=le("ZodIPv6",(e,t)=>{Yz.init(e,t),Ht.init(e,t)}),jZ=le("ZodCIDRv4",(e,t)=>{Xz.init(e,t),Ht.init(e,t)}),kZ=le("ZodCIDRv6",(e,t)=>{eV.init(e,t),Ht.init(e,t)}),NZ=le("ZodBase64",(e,t)=>{tV.init(e,t),Ht.init(e,t)}),CZ=le("ZodBase64URL",(e,t)=>{rV.init(e,t),Ht.init(e,t)}),SZ=le("ZodE164",(e,t)=>{sV.init(e,t),Ht.init(e,t)}),EZ=le("ZodJWT",(e,t)=>{iV.init(e,t),Ht.init(e,t)}),gk=le("ZodNumber",(e,t)=>{Fj.init(e,t),It.init(e,t),e._zod.processJSONSchema=(r,s,i)=>Wj(e,r,s),ad(e,"ZodNumber",{gt(r,s){return this.check(h4(r,s))},gte(r,s){return this.check(d1(r,s))},min(r,s){return this.check(d1(r,s))},lt(r,s){return this.check(p4(r,s))},lte(r,s){return this.check(u1(r,s))},max(r,s){return this.check(u1(r,s))},int(r){return this.check(y4(r))},safe(r){return this.check(y4(r))},positive(r){return this.check(h4(0,r))},nonnegative(r){return this.check(d1(0,r))},negative(r){return this.check(p4(0,r))},nonpositive(r){return this.check(u1(0,r))},multipleOf(r,s){return this.check(g4(r,s))},step(r,s){return this.check(g4(r,s))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function TZ(e){return oH(gk,e)}const OZ=le("ZodNumberFormat",(e,t)=>{aV.init(e,t),gk.init(e,t)});function y4(e){return iH(OZ,e)}const MZ=le("ZodBoolean",(e,t)=>{lV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>qj(e,n,r)});function Gn(e){return aH(MZ,e)}const AZ=le("ZodNull",(e,t)=>{cV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Kj(e,n,r)});function LZ(e){return lH(AZ,e)}const RZ=le("ZodUnknown",(e,t)=>{uV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Jj()});function As(){return cH(RZ)}const PZ=le("ZodNever",(e,t)=>{dV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Gj(e,n,r)});function xk(e){return uH(PZ,e)}const IZ=le("ZodArray",(e,t)=>{fV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>tk(e,n,r,s),e.element=t.element,ad(e,"ZodArray",{min(n,r){return this.check(F0(n,r))},nonempty(n){return this.check(F0(1,n))},max(n,r){return this.check(Vj(n,r))},length(n,r){return this.check(Hj(n,r))},unwrap(){return this.element}})});function ql(e,t){return _H(IZ,e,t)}const vk=le("ZodObject",(e,t)=>{pV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>nk(e,n,r,s),ut(e,"shape",()=>t.shape),ad(e,"ZodObject",{keyof(){return yk(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:As()})},loose(){return this.clone({...this._zod.def,catchall:As()})},strict(){return this.clone({...this._zod.def,catchall:xk()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return MU(this,n)},safeExtend(n){return AU(this,n)},merge(n){return LU(this,n)},pick(n){return TU(this,n)},omit(n){return OU(this,n)},partial(...n){return RU(wk,this,n[0])},required(...n){return PU(_k,this,n[0])}})});function wt(e,t){const n={type:"object",shape:e??{},...Be(t)};return new vk(n)}function At(e,t){return new vk({type:"object",shape:e,catchall:xk(),...Be(t)})}const bk=le("ZodUnion",(e,t)=>{Uj.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>rk(e,n,r,s),e.options=t.options});function Qn(e,t){return new bk({type:"union",options:e,...Be(t)})}const $Z=le("ZodDiscriminatedUnion",(e,t)=>{bk.init(e,t),hV.init(e,t)});function FZ(e,t,n){return new $Z({type:"union",options:t,discriminator:e,...Be(n)})}const DZ=le("ZodIntersection",(e,t)=>{gV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>sk(e,n,r,s)});function BZ(e,t){return new DZ({type:"intersection",left:e,right:t})}const w4=le("ZodRecord",(e,t)=>{xV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ok(e,n,r,s),e.keyType=t.keyType,e.valueType=t.valueType});function ca(e,t,n){return!t||!t._zod?new w4({type:"record",keyType:Ee(),valueType:e,...Be(t)}):new w4({type:"record",keyType:e,valueType:t,...Be(n)})}const Og=le("ZodEnum",(e,t)=>{vV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(r,s,i)=>Qj(e,r,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const i={};for(const l of r)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Og({...t,checks:[],...Be(s),entries:i})},e.exclude=(r,s)=>{const i={...t.entries};for(const l of r)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new Og({...t,checks:[],...Be(s),entries:i})}});function yk(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Og({type:"enum",entries:n,...Be(t)})}const UZ=le("ZodLiteral",(e,t)=>{bV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Yj(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ge(e,t){return new UZ({type:"literal",values:Array.isArray(e)?e:[e],...Be(t)})}const zZ=le("ZodTransform",(e,t)=>{yV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ek(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new jj(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Nu(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(Nu(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function VZ(e){return new zZ({type:"transform",transform:e})}const wk=le("ZodOptional",(e,t)=>{zj.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>sx(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function _4(e){return new wk({type:"optional",innerType:e})}const HZ=le("ZodExactOptional",(e,t)=>{wV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>sx(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function ZZ(e){return new HZ({type:"optional",innerType:e})}const WZ=le("ZodNullable",(e,t)=>{_V.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ik(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function j4(e){return new WZ({type:"nullable",innerType:e})}const qZ=le("ZodDefault",(e,t)=>{jV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>lk(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function KZ(e,t){return new qZ({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Cj(t)}})}const GZ=le("ZodPrefault",(e,t)=>{kV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ck(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function JZ(e,t){return new GZ({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Cj(t)}})}const _k=le("ZodNonOptional",(e,t)=>{NV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ak(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function QZ(e,t){return new _k({type:"nonoptional",innerType:e,...Be(t)})}const YZ=le("ZodCatch",(e,t)=>{CV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>uk(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function XZ(e,t){return new YZ({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const eW=le("ZodPipe",(e,t)=>{SV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>dk(e,n,r,s),e.in=t.in,e.out=t.out});function k4(e,t){return new eW({type:"pipe",in:e,out:t})}const tW=le("ZodReadonly",(e,t)=>{EV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>fk(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function nW(e){return new tW({type:"readonly",innerType:e})}const rW=le("ZodLazy",(e,t)=>{TV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>mk(e,n,r,s),e.unwrap=()=>e._zod.def.getter()});function sW(e){return new rW({type:"lazy",getter:e})}const ox=le("ZodCustom",(e,t)=>{OV.init(e,t),It.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Xj(e,n)});function jk(e,t){return jH(ox,e??(()=>!0),t)}function oW(e,t={}){return kH(ox,e,t)}function iW(e,t){return NH(e,t)}function V0(e,t={}){const n=new ox({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Be(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(tt||(tt={}));class f1 extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}const N4=10,aW=13,Vi=32;function m1(e){}function lW(e){if(typeof e=="function")throw new TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");const{onEvent:t=m1,onError:n=m1,onRetry:r=m1,onComment:s,maxBufferSize:i}=e,l=[];let u=0,d=!0,f,p="",h=0,x,v=!1;function y(E){if(v)throw new Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(d&&(d=!1,E.charCodeAt(0)===239&&E.charCodeAt(1)===187&&E.charCodeAt(2)===191&&(E=E.slice(3))),l.length===0){const L=j(E);L!==""&&(l.push(L),u=L.length),b();return}if(E.indexOf(` +`)===-1&&E.indexOf("\r")===-1){l.push(E),u+=E.length,b();return}l.push(E);const O=l.join("");l.length=0,u=0;const M=j(O);M!==""&&(l.push(M),u=M.length),b()}function b(){i!==void 0&&(u+p.length<=i||(v=!0,l.length=0,u=0,f=void 0,p="",h=0,x=void 0,n(new f1(`Buffered data exceeded max buffer size of ${i} characters`,{type:"max-buffer-size-exceeded"}))))}function j(E){let O=0;if(E.indexOf("\r")===-1){let M=E.indexOf(` +`,O);for(;M!==-1;){if(O===M){h>0&&t({id:f,event:x,data:p}),f=void 0,p="",h=0,x=void 0,O=M+1,M=E.indexOf(` +`,O);continue}const L=E.charCodeAt(O);if(C4(E,O,L)){const F=E.charCodeAt(O+5)===Vi?O+6:O+5,U=E.slice(F,M);if(h===0&&E.charCodeAt(M+1)===N4){t({id:f,event:x,data:U}),f=void 0,p="",x=void 0,O=M+2,M=E.indexOf(` +`,O);continue}p=h===0?U:`${p} +${U}`,h++}else S4(E,O,L)?x=E.slice(E.charCodeAt(O+6)===Vi?O+7:O+6,M)||void 0:S(E,O,M);O=M+1,M=E.indexOf(` +`,O)}return E.slice(O)}for(;O20?`${E.slice(0,20)}…`:E}"`,{type:"unknown-field",field:E,value:O,line:M}));break}}function k(){h>0&&t({id:f,event:x,data:p}),f=void 0,p="",h=0,x=void 0}function T(E={}){if(E.consume&&l.length>0){const O=l.join("");S(O,0,O.length)}d=!0,f=void 0,p="",h=0,x=void 0,l.length=0,u=0,v=!1}return{feed:y,reset:T}}function C4(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function S4(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class cW extends TransformStream{constructor({onError:t,onRetry:n,onComment:r,maxBufferSize:s}={}){let i;super({start(l){i=lW({onEvent:u=>{l.enqueue(u)},onError(u){typeof t=="function"&&t(u),(t==="terminate"||u.type==="max-buffer-size-exceeded")&&l.error(u)},onRetry:n,onComment:r,maxBufferSize:s})},transform(l){i.feed(l)}})}}var ld=({prefix:e,size:t=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const i=n.length,l=new Array(t);for(let u=0;u`${e}${r}${s()}`},uW=ld();function Qa(e){if(e==null)return{};const t={};if(e instanceof Headers)e.forEach((n,r)=>{t[r.toLowerCase()]=n});else{Array.isArray(e)||(e=Object.entries(e));for(const[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}var dW=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,fW=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function E4(e){const t=JSON.parse(e);return t===null||typeof t!="object"||dW.test(e)===!1&&fW.test(e)===!1?t:mW(t)}function mW(e){let t=[e];for(;t.length;){const n=t;t=[];for(const r of n){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const i=r[s];i&&typeof i=="object"&&t.push(i)}}}return e}function pW(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return E4(e)}try{return E4(e)}finally{Error.stackTraceLimit=t}}function ix(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:n}=e;if(n!=null)for(const r of Object.keys(n))n[r]=Hi(n[r])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(Hi):Hi(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(Hi)),e.allOf!=null&&(e.allOf=e.allOf.map(Hi)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(Hi));const{definitions:t}=e;if(t!=null)for(const n of Object.keys(t))t[n]=Hi(t[n]);return e}function Hi(e){return typeof e=="boolean"?e:ix(e)}var hW=Symbol("Let zodToJsonSchema decide on which parser to use"),T4={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},gW=e=>typeof e=="string"?{...T4,name:e}:{...T4,...e};function Mr(){return{}}function xW(e,t){var n,r,s;const i={type:"array"};return(n=e.type)!=null&&n._def&&((s=(r=e.type)==null?void 0:r._def)==null?void 0:s.typeName)!==tt.ZodAny&&(i.items=vt(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}function vW(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value;break}return t}function bW(){return{type:"boolean"}}function kk(e,t){return vt(e.type._def,t)}var yW=(e,t)=>vt(e.innerType._def,t);function Nk(e,t,n){const r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,i)=>Nk(e,t,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return wW(e)}}var wW=e=>{const t={type:"integer",format:"unix-time"};for(const n of e.checks)switch(n.kind){case"min":t.minimum=n.value;break;case"max":t.maximum=n.value;break}return t};function _W(e,t){return{...vt(e.innerType._def,t),default:e.defaultValue()}}function jW(e,t){return t.effectStrategy==="input"?vt(e.schema._def,t):Mr()}function kW(e){return{type:"string",enum:Array.from(e.values)}}var NW=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function CW(e,t){const n=[vt(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),vt(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return n.forEach(s=>{if(NW(s))r.push(...s.allOf);else{let i=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:l,...u}=s;i=u}r.push(i)}}),r.length?{allOf:r}:void 0}function SW(e){const t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var p1=void 0,is={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(p1===void 0&&(p1=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),p1),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}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-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Ck(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value;break;case"max":n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":as(n,"email",r.message,t);break;case"format:idn-email":as(n,"idn-email",r.message,t);break;case"pattern:zod":Zn(n,is.email,r.message,t);break}break;case"url":as(n,"uri",r.message,t);break;case"uuid":as(n,"uuid",r.message,t);break;case"regex":Zn(n,r.regex,r.message,t);break;case"cuid":Zn(n,is.cuid,r.message,t);break;case"cuid2":Zn(n,is.cuid2,r.message,t);break;case"startsWith":Zn(n,RegExp(`^${h1(r.value,t)}`),r.message,t);break;case"endsWith":Zn(n,RegExp(`${h1(r.value,t)}$`),r.message,t);break;case"datetime":as(n,"date-time",r.message,t);break;case"date":as(n,"date",r.message,t);break;case"time":as(n,"time",r.message,t);break;case"duration":as(n,"duration",r.message,t);break;case"length":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"includes":{Zn(n,RegExp(h1(r.value,t)),r.message,t);break}case"ip":{r.version!=="v6"&&as(n,"ipv4",r.message,t),r.version!=="v4"&&as(n,"ipv6",r.message,t);break}case"base64url":Zn(n,is.base64url,r.message,t);break;case"jwt":Zn(n,is.jwt,r.message,t);break;case"cidr":{r.version!=="v6"&&Zn(n,is.ipv4Cidr,r.message,t),r.version!=="v4"&&Zn(n,is.ipv6Cidr,r.message,t);break}case"emoji":Zn(n,is.emoji(),r.message,t);break;case"ulid":{Zn(n,is.ulid,r.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{as(n,"binary",r.message,t);break}case"contentEncoding:base64":{n.contentEncoding="base64";break}case"pattern:zod":{Zn(n,is.base64,r.message,t);break}}break}case"nanoid":Zn(n,is.nanoid,r.message,t)}return n}function h1(e,t){return t.patternStrategy==="escape"?TW(e):e}var EW=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function TW(e){let t="";for(let n=0;ni.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function Zn(e,t,n,r){var s;e.pattern||(s=e.allOf)!=null&&s.some(i=>i.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:O4(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=O4(t,r)}function O4(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},s=r.i?e.source.toLowerCase():e.source;let i="",l=!1,u=!1,d=!1;for(let f=0;ftypeof t[t[i]]!="number").map(i=>t[i]),s=Array.from(new Set(r.map(i=>typeof i)));return{type:s.length===1?s[0]==="string"?"string":"number":["string","number"],enum:r}}function AW(){return{not:Mr()}}function LW(){return{type:"null"}}var Mg={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function RW(e,t){const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(r=>r._def.typeName in Mg&&(!r._def.checks||!r._def.checks.length))){const r=n.reduce((s,i)=>{const l=Mg[i._def.typeName];return l&&!s.includes(l)?[...s,l]:s},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){const r=n.reduce((s,i)=>{const l=typeof i._def.value;switch(l){case"string":case"number":case"boolean":return[...s,l];case"bigint":return[...s,"integer"];case"object":if(i._def.value===null)return[...s,"null"];default:return s}},[]);if(r.length===n.length){const s=r.filter((i,l,u)=>u.indexOf(i)===l);return{type:s.length>1?s:s[0],enum:n.reduce((i,l)=>i.includes(l._def.value)?i:[...i,l._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,s)=>[...r,...s._def.values.filter(i=>!r.includes(i))],[])};return PW(e,t)}var PW=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((r,s)=>vt(r._def,{...t,currentPath:[...t.currentPath,"anyOf",`${s}`]})).filter(r=>!!r&&(!t.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function IW(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Mg[e.innerType._def.typeName],"null"]};const n=vt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function $W(e){const t={type:"number"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"int":t.type="integer";break;case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value;break}return t}function FW(e,t){const n={type:"object",properties:{}},r=[],s=e.shape();for(const l in s){let u=s[l];if(u===void 0||u._def===void 0)continue;const d=BW(u),f=vt(u._def,{...t,currentPath:[...t.currentPath,"properties",l],propertyPath:[...t.currentPath,"properties",l]});f!==void 0&&(n.properties[l]=f,d||r.push(l))}r.length&&(n.required=r);const i=DW(e,t);return i!==void 0&&(n.additionalProperties=i),n}function DW(e,t){if(e.catchall._def.typeName!=="ZodNever")return vt(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function BW(e){try{return e.isOptional()}catch{return!0}}var UW=(e,t)=>{var n;if(t.currentPath.toString()===((n=t.propertyPath)==null?void 0:n.toString()))return vt(e.innerType._def,t);const r=vt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Mr()},r]}:Mr()},zW=(e,t)=>{if(t.pipeStrategy==="input")return vt(e.in._def,t);if(t.pipeStrategy==="output")return vt(e.out._def,t);const n=vt(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),r=vt(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(s=>s!==void 0)}};function VW(e,t){return vt(e.type._def,t)}function HW(e,t){const r={type:"array",uniqueItems:!0,items:vt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(r.minItems=e.minSize.value),e.maxSize&&(r.maxItems=e.maxSize.value),r}function ZW(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,r)=>vt(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:vt(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,r)=>vt(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function WW(){return{not:Mr()}}function qW(){return Mr()}var KW=(e,t)=>vt(e.innerType._def,t),GW=(e,t,n)=>{switch(t){case tt.ZodString:return Ck(e,n);case tt.ZodNumber:return $W(e);case tt.ZodObject:return FW(e,n);case tt.ZodBigInt:return vW(e);case tt.ZodBoolean:return bW();case tt.ZodDate:return Nk(e,n);case tt.ZodUndefined:return WW();case tt.ZodNull:return LW();case tt.ZodArray:return xW(e,n);case tt.ZodUnion:case tt.ZodDiscriminatedUnion:return RW(e,n);case tt.ZodIntersection:return CW(e,n);case tt.ZodTuple:return ZW(e,n);case tt.ZodRecord:return Sk(e,n);case tt.ZodLiteral:return SW(e);case tt.ZodEnum:return kW(e);case tt.ZodNativeEnum:return MW(e);case tt.ZodNullable:return IW(e,n);case tt.ZodOptional:return UW(e,n);case tt.ZodMap:return OW(e,n);case tt.ZodSet:return HW(e,n);case tt.ZodLazy:return()=>e.getter()._def;case tt.ZodPromise:return VW(e,n);case tt.ZodNaN:case tt.ZodNever:return AW();case tt.ZodEffects:return jW(e,n);case tt.ZodAny:return Mr();case tt.ZodUnknown:return qW();case tt.ZodDefault:return _W(e,n);case tt.ZodBranded:return kk(e,n);case tt.ZodReadonly:return KW(e,n);case tt.ZodCatch:return yW(e,n);case tt.ZodPipeline:return zW(e,n);case tt.ZodFunction:case tt.ZodVoid:case tt.ZodSymbol:return;default:return(r=>{})()}},JW=(e,t)=>{let n=0;for(;n{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:JW(t.currentPath,e.path)};case"none":case"seen":return e.path.lengtht.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Mr()):t.$refStrategy==="seen"?Mr():void 0}},YW=(e,t,n)=>(e.description&&(n.description=e.description),n),XW=e=>{const t=gW(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([r,s])=>[s._def,{def:s._def,path:[...t.basePath,t.definitionPath,r],jsonSchema:void 0}]))}},eq=(e,t)=>{var n;const r=XW(t);let s=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((f,[p,h])=>{var x;return{...f,[p]:(x=vt(h._def,{...r,currentPath:[...r.basePath,r.definitionPath,p]},!0))!=null?x:Mr()}},{}):void 0;const i=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,l=(n=vt(e._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1))!=null?n:Mr(),u=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;u!==void 0&&(l.title=u);const d=i===void 0?s?{...l,[r.definitionPath]:s}:l:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...s,[i]:l}};return d.$schema="http://json-schema.org/draft-07/schema#",d},Ag=Symbol.for("vercel.ai.schema");function tq(e){let t;return()=>(t==null&&(t=e()),t)}function Em(e,{validate:t}={}){return{[Ag]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function nq(e){return typeof e=="object"&&e!==null&&Ag in e&&e[Ag]===!0&&"jsonSchema"in e&&"validate"in e}function ax(e){return e==null?Em({properties:{},additionalProperties:!1}):nq(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?Ek(e):rq(e):e()}function rq(e){return Em(()=>ix(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{const n=await e["~standard"].validate(t);return"value"in n?{success:!0,value:n.value}:{success:!1,error:new Ml({value:t,cause:n.issues})}}})}function sq(e,t){var n;const r=(n=void 0)!=null?n:!1;return Em(()=>eq(e,{$refStrategy:r?"root":"none"}),{validate:async s=>{const i=await e.safeParseAsync(s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function oq(e,t){var n;const r=(n=void 0)!=null?n:!1;return Em(()=>ix(HH(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"})),{validate:async s=>{const i=await pk(e,s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function iq(e){return"_zod"in e}function Ek(e,t){return iq(e)?oq(e):sq(e)}async function M4({value:e,schema:t,context:n}){const r=await Cu({value:e,schema:t,context:n});if(!r.success)throw Ml.wrap({value:e,cause:r.error,context:n});return r.value}async function Cu({value:e,schema:t,context:n}){const r=ax(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};const s=await r.validate(e);return s.success?{success:!0,value:s.value,rawValue:e}:{success:!1,error:Ml.wrap({value:e,cause:s.error,context:n}),rawValue:e}}catch(s){return{success:!1,error:Ml.wrap({value:e,cause:s,context:n}),rawValue:e}}}async function ua({text:e,schema:t}){try{const n=pW(e);return t==null?{success:!0,value:n,rawValue:n}:await Cu({value:n,schema:t})}catch(n){return{success:!1,error:Qw.isInstance(n)?n:new Qw({text:e,cause:n}),rawValue:void 0}}}function aq({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new cW).pipeThrough(new TransformStream({async transform({data:n},r){n!=="[DONE]"&&r.enqueue(await ua({text:n,schema:t}))}}))}async function Go(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var lq=Object.defineProperty,cq=(e,t)=>{for(var n in t)lq(e,n,{get:t[n],enumerable:!0})},Tk="AI_NoObjectGeneratedError",Ok=`vercel.ai.error.${Tk}`,uq=Symbol.for(Ok),Mk,di=class extends Ds{constructor({message:e="No object generated.",cause:t,text:n,response:r,usage:s,finishReason:i}){super({name:Tk,message:e,cause:t}),this[Mk]=!0,this.text=n,this.response=r,this.usage=s,this.finishReason=i}static isInstance(e){return Ds.hasMarker(e,Ok)}};Mk=uq;var Ak="AI_UIMessageStreamError",Lk=`vercel.ai.error.${Ak}`,dq=Symbol.for(Lk),Rk,Ya=class extends Ds{constructor({chunkType:e,chunkId:t,message:n}){super({name:Ak,message:n}),this[Rk]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return Ds.hasMarker(e,Lk)}};Rk=dq;var Pk=Qn([Ee(),V0(Uint8Array),V0(ArrayBuffer),jk(e=>{var t,n;return(n=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?n:!1},{message:"Must be a Buffer"})]),da=sW(()=>Qn([LZ(),Ee(),TZ(),Gn(),ca(Ee(),da.optional()),ql(da)])),lt=ca(Ee(),ca(Ee(),da.optional())),Ik=wt({type:Ge("text"),text:Ee(),providerOptions:lt.optional()}),fq=wt({type:Ge("image"),image:Qn([Pk,V0(URL)]),mediaType:Ee().optional(),providerOptions:lt.optional()}),$k=wt({type:Ge("file"),data:Qn([Pk,V0(URL)]),filename:Ee().optional(),mediaType:Ee(),providerOptions:lt.optional()}),mq=wt({type:Ge("reasoning"),text:Ee(),providerOptions:lt.optional()}),pq=wt({type:Ge("tool-call"),toolCallId:Ee(),toolName:Ee(),input:As(),providerOptions:lt.optional(),providerExecuted:Gn().optional()}),hq=FZ("type",[wt({type:Ge("text"),value:Ee(),providerOptions:lt.optional()}),wt({type:Ge("json"),value:da,providerOptions:lt.optional()}),wt({type:Ge("execution-denied"),reason:Ee().optional(),providerOptions:lt.optional()}),wt({type:Ge("error-text"),value:Ee(),providerOptions:lt.optional()}),wt({type:Ge("error-json"),value:da,providerOptions:lt.optional()}),wt({type:Ge("content"),value:ql(Qn([wt({type:Ge("text"),text:Ee(),providerOptions:lt.optional()}),wt({type:Ge("media"),data:Ee(),mediaType:Ee()}),wt({type:Ge("file-data"),data:Ee(),mediaType:Ee(),filename:Ee().optional(),providerOptions:lt.optional()}),wt({type:Ge("file-url"),url:Ee(),providerOptions:lt.optional()}),wt({type:Ge("file-id"),fileId:Qn([Ee(),ca(Ee(),Ee())]),providerOptions:lt.optional()}),wt({type:Ge("image-data"),data:Ee(),mediaType:Ee(),providerOptions:lt.optional()}),wt({type:Ge("image-url"),url:Ee(),providerOptions:lt.optional()}),wt({type:Ge("image-file-id"),fileId:Qn([Ee(),ca(Ee(),Ee())]),providerOptions:lt.optional()}),wt({type:Ge("custom"),providerOptions:lt.optional()})]))})]),Fk=wt({type:Ge("tool-result"),toolCallId:Ee(),toolName:Ee(),output:hq,providerOptions:lt.optional()}),gq=wt({type:Ge("tool-approval-request"),approvalId:Ee(),toolCallId:Ee()}),xq=wt({type:Ge("tool-approval-response"),approvalId:Ee(),approved:Gn(),reason:Ee().optional()}),vq=wt({role:Ge("system"),content:Ee(),providerOptions:lt.optional()}),bq=wt({role:Ge("user"),content:Qn([Ee(),ql(Qn([Ik,fq,$k]))]),providerOptions:lt.optional()}),yq=wt({role:Ge("assistant"),content:Qn([Ee(),ql(Qn([Ik,$k,mq,pq,Fk,gq]))]),providerOptions:lt.optional()}),wq=wt({role:Ge("tool"),content:ql(Qn([Fk,xq])),providerOptions:lt.optional()});Qn([vq,bq,yq,wq]);function Dk(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;const n={...e};for(const r in t)if(!(r==="__proto__"||r==="constructor"||r==="prototype")&&Object.prototype.hasOwnProperty.call(t,r)){const s=t[r];if(s===void 0)continue;const i=r in e?e[r]:void 0,l=s!==null&&typeof s=="object"&&!Array.isArray(s)&&!(s instanceof Date)&&!(s instanceof RegExp),u=i!=null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp);l&&u?n[r]=Dk(i,s):n[r]=s}return n}new TextEncoder;var _q={};cq(_q,{array:()=>Cq,choice:()=>Sq,json:()=>Eq,object:()=>Nq,text:()=>kq});function jq(e){const t=["ROOT"];let n=-1,r=null;function s(d,f,p){switch(d){case'"':{n=f,t.pop(),t.push(p),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{n=f,r=f,t.pop(),t.push(p),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(p),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=f,t.pop(),t.push(p),t.push("INSIDE_NUMBER");break}case"{":{n=f,t.pop(),t.push(p),t.push("INSIDE_OBJECT_START");break}case"[":{n=f,t.pop(),t.push(p),t.push("INSIDE_ARRAY_START");break}}}function i(d,f){switch(d){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{n=f,t.pop();break}}}function l(d,f){switch(d){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=f,t.pop();break}}}for(let d=0;d=0;d--)switch(t[d]){case"INSIDE_STRING":{u+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{u+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{u+="]";break}case"INSIDE_LITERAL":{const p=e.substring(r,e.length);"true".startsWith(p)?u+="true".slice(p.length):"false".startsWith(p)?u+="false".slice(p.length):"null".startsWith(p)&&(u+="null".slice(p.length))}}return u}async function cd(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await ua({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await ua({text:jq(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var kq=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),Nq=({schema:e,name:t,description:n})=>{const r=ax(e);return{name:"object",responseFormat:Go(r.jsonSchema).then(s=>({type:"json",schema:s,...t!=null&&{name:t},...n!=null&&{description:n}})),async parseCompleteOutput({text:s},i){const l=await ua({text:s});if(!l.success)throw new di({message:"No object generated: could not parse the response.",cause:l.error,text:s,response:i.response,usage:i.usage,finishReason:i.finishReason});const u=await Cu({value:l.value,schema:r});if(!u.success)throw new di({message:"No object generated: response did not match schema.",cause:u.error,text:s,response:i.response,usage:i.usage,finishReason:i.finishReason});return u.value},async parsePartialOutput({text:s}){const i=await cd(s);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:i.value}}},createElementStreamTransform(){}}},Cq=({element:e,name:t,description:n})=>{const r=ax(e);return{name:"array",responseFormat:Go(r.jsonSchema).then(s=>{const{$schema:i,...l}=s;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:l}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}}),async parseCompleteOutput({text:s},i){const l=await ua({text:s});if(!l.success)throw new di({message:"No object generated: could not parse the response.",cause:l.error,text:s,response:i.response,usage:i.usage,finishReason:i.finishReason});const u=l.value;if(u==null||typeof u!="object"||!("elements"in u)||!Array.isArray(u.elements))throw new di({message:"No object generated: response did not match schema.",cause:new Ml({value:u,cause:"response must be an object with an elements array"}),text:s,response:i.response,usage:i.usage,finishReason:i.finishReason});for(const d of u.elements){const f=await Cu({value:d,schema:r});if(!f.success)throw new di({message:"No object generated: response did not match schema.",cause:f.error,text:s,response:i.response,usage:i.usage,finishReason:i.finishReason})}return u.elements},async parsePartialOutput({text:s}){const i=await cd(s);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const l=i.value;if(l==null||typeof l!="object"||!("elements"in l)||!Array.isArray(l.elements))return;const u=i.state==="repaired-parse"&&l.elements.length>0?l.elements.slice(0,-1):l.elements,d=[];for(const f of u){const p=await Cu({value:f,schema:r});p.success&&d.push(p.value)}return{partial:d}}}},createElementStreamTransform(){let s=0;return new TransformStream({transform({partialOutput:i},l){if(i!=null)for(;s({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}),async parseCompleteOutput({text:r},s){const i=await ua({text:r});if(!i.success)throw new di({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:s.response,usage:s.usage,finishReason:s.finishReason});const l=i.value;if(l==null||typeof l!="object"||!("result"in l)||typeof l.result!="string"||!e.includes(l.result))throw new di({message:"No object generated: response did not match schema.",cause:new Ml({value:l,cause:"response must be an object that contains a choice value."}),text:r,response:s.response,usage:s.usage,finishReason:s.finishReason});return l.result},async parsePartialOutput({text:r}){const s=await cd(r);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const i=s.value;if(i==null||typeof i!="object"||!("result"in i)||typeof i.result!="string")return;const l=e.filter(u=>u.startsWith(i.result));return s.state==="successful-parse"?l.includes(i.result)?{partial:i.result}:void 0:l.length===1?{partial:l[0]}:void 0}}},createElementStreamTransform(){}}),Eq=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:n},r){const s=await ua({text:n});if(!s.success)throw new di({message:"No object generated: could not parse the response.",cause:s.error,text:n,response:r.response,usage:r.usage,finishReason:r.finishReason});return s.value},async parsePartialOutput({text:n}){const r=await cd(n);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return r.value===void 0?void 0:{partial:r.value}}},createElementStreamTransform(){}});ld({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)} + +`)},flush(e){e.enqueue(`data: [DONE] + +`)}})}});var zc=ca(Ee(),da.optional()),Tq=tq(()=>Ek(Qn([At({type:Ge("text-start"),id:Ee(),providerMetadata:lt.optional()}),At({type:Ge("text-delta"),id:Ee(),delta:Ee(),providerMetadata:lt.optional()}),At({type:Ge("text-end"),id:Ee(),providerMetadata:lt.optional()}),At({type:Ge("error"),errorText:Ee()}),At({type:Ge("tool-input-start"),toolCallId:Ee(),toolName:Ee(),providerExecuted:Gn().optional(),providerMetadata:lt.optional(),toolMetadata:zc.optional(),dynamic:Gn().optional(),title:Ee().optional()}),At({type:Ge("tool-input-delta"),toolCallId:Ee(),inputTextDelta:Ee()}),At({type:Ge("tool-input-available"),toolCallId:Ee(),toolName:Ee(),input:As(),providerExecuted:Gn().optional(),providerMetadata:lt.optional(),toolMetadata:zc.optional(),dynamic:Gn().optional(),title:Ee().optional()}),At({type:Ge("tool-input-error"),toolCallId:Ee(),toolName:Ee(),input:As(),providerExecuted:Gn().optional(),providerMetadata:lt.optional(),toolMetadata:zc.optional(),dynamic:Gn().optional(),errorText:Ee(),title:Ee().optional()}),At({type:Ge("tool-approval-request"),approvalId:Ee(),toolCallId:Ee(),signature:Ee().optional()}),At({type:Ge("tool-output-available"),toolCallId:Ee(),output:As(),providerExecuted:Gn().optional(),providerMetadata:lt.optional(),toolMetadata:zc.optional(),dynamic:Gn().optional(),preliminary:Gn().optional()}),At({type:Ge("tool-output-error"),toolCallId:Ee(),errorText:Ee(),providerExecuted:Gn().optional(),providerMetadata:lt.optional(),toolMetadata:zc.optional(),dynamic:Gn().optional()}),At({type:Ge("tool-output-denied"),toolCallId:Ee()}),At({type:Ge("reasoning-start"),id:Ee(),providerMetadata:lt.optional()}),At({type:Ge("reasoning-delta"),id:Ee(),delta:Ee(),providerMetadata:lt.optional()}),At({type:Ge("reasoning-end"),id:Ee(),providerMetadata:lt.optional()}),At({type:Ge("source-url"),sourceId:Ee(),url:Ee(),title:Ee().optional(),providerMetadata:lt.optional()}),At({type:Ge("source-document"),sourceId:Ee(),mediaType:Ee(),title:Ee(),filename:Ee().optional(),providerMetadata:lt.optional()}),At({type:Ge("file"),url:Ee(),mediaType:Ee(),providerMetadata:lt.optional()}),At({type:jk(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:Ee().optional(),data:As(),transient:Gn().optional()}),At({type:Ge("start-step")}),At({type:Ge("finish-step")}),At({type:Ge("start"),messageId:Ee().optional(),messageMetadata:As().optional()}),At({type:Ge("finish"),finishReason:yk(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:As().optional()}),At({type:Ge("abort"),reason:Ee().optional()}),At({type:Ge("message-metadata"),messageMetadata:As()})])));function Oq(e){return e.type.startsWith("data-")}function lu(){return Object.create(null)}function Lg(e){return e.type.startsWith("tool-")}function Mq(e){return e.type==="dynamic-tool"}function Su(e){return Lg(e)||Mq(e)}function A4(e){return e.type.split("-").slice(1).join("-")}function Aq({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:lu(),activeReasoningParts:lu(),partialToolCalls:lu()}}function Lq({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:s,onToolCall:i,onData:l}){return e.pipeThrough(new TransformStream({async transform(u,d){await r(async({state:f,write:p})=>{var h,x,v,y;function b(k){const E=f.message.parts.filter(Su).find(O=>O.toolCallId===k);if(E==null)throw new Ya({chunkType:"tool-invocation",chunkId:k,message:`No tool invocation found for tool call ID "${k}".`});return E}function j(k){var T;const E=f.message.parts.find(L=>Lg(L)&&L.toolCallId===k.toolCallId),O=k,M=E;if(E!=null){E.state=k.state,M.input=O.input,M.output=O.output,M.errorText=O.errorText,M.rawInput=O.rawInput,M.preliminary=O.preliminary,k.title!==void 0&&(M.title=k.title),k.toolMetadata!==void 0&&(M.toolMetadata=k.toolMetadata),M.providerExecuted=(T=O.providerExecuted)!=null?T:E.providerExecuted;const L=O.providerMetadata;if(L!=null)if(k.state==="output-available"||k.state==="output-error"){const F=E;F.resultProviderMetadata=L}else E.callProviderMetadata=L}else f.message.parts.push({type:`tool-${k.toolName}`,toolCallId:k.toolCallId,state:k.state,title:k.title,...k.toolMetadata!==void 0?{toolMetadata:k.toolMetadata}:{},input:O.input,output:O.output,rawInput:O.rawInput,errorText:O.errorText,providerExecuted:O.providerExecuted,preliminary:O.preliminary,...O.providerMetadata!=null&&(k.state==="output-available"||k.state==="output-error")?{resultProviderMetadata:O.providerMetadata}:{},...O.providerMetadata!=null&&!(k.state==="output-available"||k.state==="output-error")?{callProviderMetadata:O.providerMetadata}:{}})}function S(k){var T,E;const O=f.message.parts.find(F=>F.type==="dynamic-tool"&&F.toolCallId===k.toolCallId),M=k,L=O;if(O!=null){O.state=k.state,L.toolName=k.toolName,L.input=M.input,L.output=M.output,L.errorText=M.errorText,L.rawInput=(T=M.rawInput)!=null?T:L.rawInput,L.preliminary=M.preliminary,k.title!==void 0&&(L.title=k.title),k.toolMetadata!==void 0&&(L.toolMetadata=k.toolMetadata),L.providerExecuted=(E=M.providerExecuted)!=null?E:O.providerExecuted;const F=M.providerMetadata;if(F!=null)if(k.state==="output-available"||k.state==="output-error"){const U=O;U.resultProviderMetadata=F}else O.callProviderMetadata=F}else f.message.parts.push({type:"dynamic-tool",toolName:k.toolName,toolCallId:k.toolCallId,state:k.state,input:M.input,output:M.output,errorText:M.errorText,preliminary:M.preliminary,providerExecuted:M.providerExecuted,title:k.title,...k.toolMetadata!==void 0?{toolMetadata:k.toolMetadata}:{},...M.providerMetadata!=null&&(k.state==="output-available"||k.state==="output-error")?{resultProviderMetadata:M.providerMetadata}:{},...M.providerMetadata!=null&&!(k.state==="output-available"||k.state==="output-error")?{callProviderMetadata:M.providerMetadata}:{}})}async function N(k){if(k!=null){const T=f.message.metadata!=null?Dk(f.message.metadata,k):k;t!=null&&await M4({value:T,schema:t,context:{field:"message.metadata",entityId:f.message.id}}),f.message.metadata=T}}switch(u.type){case"text-start":{const k={type:"text",text:"",providerMetadata:u.providerMetadata,state:"streaming"};f.activeTextParts[u.id]=k,f.message.parts.push(k),p();break}case"text-delta":{const k=f.activeTextParts[u.id];if(k==null)throw new Ya({chunkType:"text-delta",chunkId:u.id,message:`Received text-delta for missing text part with ID "${u.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});k.text+=u.delta,k.providerMetadata=(h=u.providerMetadata)!=null?h:k.providerMetadata,p();break}case"text-end":{const k=f.activeTextParts[u.id];if(k==null)throw new Ya({chunkType:"text-end",chunkId:u.id,message:`Received text-end for missing text part with ID "${u.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});k.state="done",k.providerMetadata=(x=u.providerMetadata)!=null?x:k.providerMetadata,delete f.activeTextParts[u.id],p();break}case"reasoning-start":{const k={type:"reasoning",text:"",providerMetadata:u.providerMetadata,state:"streaming"};f.activeReasoningParts[u.id]=k,f.message.parts.push(k),p();break}case"reasoning-delta":{const k=f.activeReasoningParts[u.id];if(k==null)throw new Ya({chunkType:"reasoning-delta",chunkId:u.id,message:`Received reasoning-delta for missing reasoning part with ID "${u.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});k.text+=u.delta,k.providerMetadata=(v=u.providerMetadata)!=null?v:k.providerMetadata,p();break}case"reasoning-end":{const k=f.activeReasoningParts[u.id];if(k==null)throw new Ya({chunkType:"reasoning-end",chunkId:u.id,message:`Received reasoning-end for missing reasoning part with ID "${u.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});k.providerMetadata=(y=u.providerMetadata)!=null?y:k.providerMetadata,k.state="done",delete f.activeReasoningParts[u.id],p();break}case"file":{f.message.parts.push({type:"file",mediaType:u.mediaType,url:u.url,...u.providerMetadata!=null?{providerMetadata:u.providerMetadata}:{}}),p();break}case"source-url":{f.message.parts.push({type:"source-url",sourceId:u.sourceId,url:u.url,title:u.title,providerMetadata:u.providerMetadata}),p();break}case"source-document":{f.message.parts.push({type:"source-document",sourceId:u.sourceId,mediaType:u.mediaType,title:u.title,filename:u.filename,providerMetadata:u.providerMetadata}),p();break}case"tool-input-start":{const k=f.message.parts.filter(Lg);f.partialToolCalls[u.toolCallId]={text:"",toolName:u.toolName,index:k.length,dynamic:u.dynamic,title:u.title,toolMetadata:u.toolMetadata},u.dynamic?S({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-streaming",input:void 0,providerExecuted:u.providerExecuted,title:u.title,toolMetadata:u.toolMetadata,providerMetadata:u.providerMetadata}):j({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-streaming",input:void 0,providerExecuted:u.providerExecuted,title:u.title,toolMetadata:u.toolMetadata,providerMetadata:u.providerMetadata}),p();break}case"tool-input-delta":{const k=f.partialToolCalls[u.toolCallId];if(k==null)throw new Ya({chunkType:"tool-input-delta",chunkId:u.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${u.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});k.text+=u.inputTextDelta;const{value:T}=await cd(k.text);k.dynamic?S({toolCallId:u.toolCallId,toolName:k.toolName,state:"input-streaming",input:T,title:k.title,toolMetadata:k.toolMetadata}):j({toolCallId:u.toolCallId,toolName:k.toolName,state:"input-streaming",input:T,title:k.title,toolMetadata:k.toolMetadata}),p();break}case"tool-input-available":{u.dynamic?S({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-available",input:u.input,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:u.title,toolMetadata:u.toolMetadata}):j({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-available",input:u.input,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:u.title,toolMetadata:u.toolMetadata}),p(),i&&!u.providerExecuted&&await i({toolCall:u});break}case"tool-input-error":{const k=f.message.parts.filter(Su).find(E=>E.toolCallId===u.toolCallId);(k!=null?k.type==="dynamic-tool":!!u.dynamic)?S({toolCallId:u.toolCallId,toolName:u.toolName,state:"output-error",input:u.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,toolMetadata:u.toolMetadata}):j({toolCallId:u.toolCallId,toolName:u.toolName,state:"output-error",input:void 0,rawInput:u.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,toolMetadata:u.toolMetadata}),p();break}case"tool-approval-request":{const k=b(u.toolCallId);k.state="approval-requested",k.approval={id:u.approvalId,...u.signature!=null?{signature:u.signature}:{}},p();break}case"tool-output-denied":{const k=b(u.toolCallId);k.state="output-denied",p();break}case"tool-output-available":{const k=b(u.toolCallId);k.type==="dynamic-tool"?S({toolCallId:u.toolCallId,toolName:k.toolName,state:"output-available",input:k.input,output:u.output,preliminary:u.preliminary,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:k.title,toolMetadata:k.toolMetadata}):j({toolCallId:u.toolCallId,toolName:A4(k),state:"output-available",input:k.input,output:u.output,providerExecuted:u.providerExecuted,preliminary:u.preliminary,providerMetadata:u.providerMetadata,title:k.title,toolMetadata:k.toolMetadata}),p();break}case"tool-output-error":{const k=b(u.toolCallId);k.type==="dynamic-tool"?S({toolCallId:u.toolCallId,toolName:k.toolName,state:"output-error",input:k.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:k.title,toolMetadata:k.toolMetadata}):j({toolCallId:u.toolCallId,toolName:A4(k),state:"output-error",input:k.input,rawInput:k.rawInput,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:k.title,toolMetadata:k.toolMetadata}),p();break}case"start-step":{f.message.parts.push({type:"step-start"});break}case"finish-step":{f.activeTextParts=lu(),f.activeReasoningParts=lu();break}case"start":{u.messageId!=null&&(f.message.id=u.messageId),await N(u.messageMetadata),(u.messageId!=null||u.messageMetadata!=null)&&p();break}case"finish":{u.finishReason!=null&&(f.finishReason=u.finishReason),await N(u.messageMetadata),u.messageMetadata!=null&&p();break}case"message-metadata":{await N(u.messageMetadata),u.messageMetadata!=null&&p();break}case"error":{s?.(new Error(u.errorText));break}default:if(Oq(u)){if(n?.[u.type]!=null){const E=f.message.parts.findIndex(M=>"id"in M&&"data"in M&&M.id===u.id&&M.type===u.type),O=E>=0?E:f.message.parts.length;await M4({value:u.data,schema:n[u.type],context:{field:`message.parts[${O}].data`,entityName:u.type,entityId:u.id}})}const k=u;if(k.transient){l?.(k);break}const T=k.id!=null?f.message.parts.find(E=>k.type===E.type&&k.id===E.id):void 0;T!=null?T.data=k.data:f.message.parts.push(k),l?.(k),p()}}d.enqueue(u)})}}))}async function Rq({stream:e,onError:t}){const n=e.getReader();try{for(;;){const{done:r}=await n.read();if(r)break}}catch(r){t?.(r)}finally{n.releaseLock()}}ld({prefix:"aitxt",size:24});ca(Ee(),da.optional());ld({prefix:"aiobj",size:24});var Pq=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(r){n(r)}}),this.processQueue()})}};ld({prefix:"aiobj",size:24});async function Bk(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{const{name:n,type:r}=t,s=await new Promise((i,l)=>{const u=new FileReader;u.onload=d=>{var f;i((f=d.target)==null?void 0:f.result)},u.onerror=d=>l(d),u.readAsDataURL(t)});return{type:"file",mediaType:r,filename:n,url:s}}))}var Iq=class{constructor({api:e="/api/chat",credentials:t,headers:n,body:r,fetch:s,prepareSendMessagesRequest:i,prepareReconnectToStreamRequest:l}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=s,this.prepareSendMessagesRequest=i,this.prepareReconnectToStreamRequest=l}async sendMessages({abortSignal:e,...t}){var n,r,s,i,l;const u=await Go(this.body),d=await Go(this.headers),f=await Go(this.credentials),p={...Qa(d),...Qa(t.headers)},h=await((n=this.prepareSendMessagesRequest)==null?void 0:n.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...u,...t.body},headers:p,credentials:f,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),x=(r=h?.api)!=null?r:this.api,v=h?.headers!==void 0?Qa(h.headers):p,y=h?.body!==void 0?h.body:{...u,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},b=(s=h?.credentials)!=null?s:f,S=await((i=this.fetch)!=null?i:globalThis.fetch)(x,{method:"POST",headers:{"Content-Type":"application/json",...v},body:JSON.stringify(y),credentials:b,signal:e});if(!S.ok)throw new Error((l=await S.text())!=null?l:"Failed to fetch the chat response.");if(!S.body)throw new Error("The response body is empty.");return this.processResponseStream(S.body)}async reconnectToStream(e){var t,n,r,s,i;const l=await Go(this.body),u=await Go(this.headers),d=await Go(this.credentials),f={...Qa(u),...Qa(e.headers)},p=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...l,...e.body},headers:f,credentials:d,requestMetadata:e.metadata})),h=(n=p?.api)!=null?n:`${this.api}/${e.chatId}/stream`,x=p?.headers!==void 0?Qa(p.headers):f,v=(r=p?.credentials)!=null?r:d,b=await((s=this.fetch)!=null?s:globalThis.fetch)(h,{method:"GET",headers:x,credentials:v});if(b.status===204)return null;if(!b.ok)throw new Error((i=await b.text())!=null?i:"Failed to fetch the chat response.");if(!b.body)throw new Error("The response body is empty.");return this.processResponseStream(b.body)}},Uk=class extends Iq{constructor(e={}){super(e)}processResponseStream(e){return aq({stream:e,schema:Tq}).pipeThrough(new TransformStream({async transform(t,n){if(!t.success)throw t.error;n.enqueue(t.value)}}))}},$q=class{constructor({generateId:e=uW,id:t=e(),transport:n=new Uk,messageMetadataSchema:r,dataPartSchemas:s,state:i,onError:l,onToolCall:u,onFinish:d,onData:f,sendAutomaticallyWhen:p}){this.activeResponse=void 0,this.jobExecutor=new Pq,this.sendMessage=async(h,x)=>{var v,y,b,j;if(h==null){await this.makeRequest({trigger:"submit-message",messageId:(v=this.lastMessage)==null?void 0:v.id,...x});return}let S;if("text"in h||"files"in h?S={parts:[...Array.isArray(h.files)?h.files:await Bk(h.files),..."text"in h&&h.text!=null?[{type:"text",text:h.text}]:[]]}:S=h,h.messageId!=null){const N=this.state.messages.findIndex(k=>k.id===h.messageId);if(N===-1)throw new Error(`message with id ${h.messageId} not found`);if(this.state.messages[N].role!=="user")throw new Error(`message with id ${h.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,N+1),this.state.replaceMessage(N,{...S,id:h.messageId,role:(y=S.role)!=null?y:"user",metadata:h.metadata})}else this.state.pushMessage({...S,id:(b=S.id)!=null?b:this.generateId(),role:(j=S.role)!=null?j:"user",metadata:h.metadata});await this.makeRequest({trigger:"submit-message",messageId:h.messageId,...x})},this.regenerate=async({messageId:h,...x}={})=>{const v=h==null?this.state.messages.length-1:this.state.messages.findIndex(y=>y.id===h);if(v===-1)throw new Error(`message ${h} not found`);this.state.messages=this.state.messages.slice(0,this.messages[v].role==="assistant"?v:v+1),await this.makeRequest({trigger:"regenerate-message",messageId:h,...x})},this.resumeStream=async(h={})=>{await this.makeRequest({trigger:"resume-stream",...h})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:h,approved:x,reason:v,options:y})=>this.jobExecutor.run(async()=>{const b=this.state.messages,j=b[b.length-1],S=N=>Su(N)&&N.state==="approval-requested"&&N.approval.id===h?{...N,state:"approval-responded",approval:{id:h,approved:x,reason:v}}:N;this.state.replaceMessage(b.length-1,{...j,parts:j.parts.map(S)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(S)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(N=>{var k;N&&this.makeRequest({trigger:"submit-message",messageId:(k=this.lastMessage)==null?void 0:k.id,...y})})}),this.addToolOutput=async({state:h="output-available",toolCallId:x,output:v,errorText:y,options:b})=>this.jobExecutor.run(async()=>{const j=this.state.messages,S=j[j.length-1],N=k=>Su(k)&&k.toolCallId===x?{...k,state:h,output:v,errorText:y}:k;this.state.replaceMessage(j.length-1,{...S,parts:S.parts.map(N)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(N)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(k=>{var T;k&&this.makeRequest({trigger:"submit-message",messageId:(T=this.lastMessage)==null?void 0:T.id,...b})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var h;this.status!=="streaming"&&this.status!=="submitted"||(h=this.activeResponse)!=null&&h.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=s,this.state=i,this.onError=l,this.onToolCall=u,this.onFinish=d,this.onData=f,this.sendAutomaticallyWhen=p}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:s}){var i,l,u;let d;if(e==="resume-stream")try{const v=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(v==null)return;d=v}catch(v){this.onError&&v instanceof Error&&this.onError(v),this.setStatus({status:"error",error:v});return}this.setStatus({status:"submitted",error:void 0});const f=this.lastMessage;let p=!1,h=!1,x=!1;try{const v={state:Aq({lastMessage:this.state.snapshot(f),messageId:this.generateId()}),abortController:new AbortController};v.abortController.signal.addEventListener("abort",()=>{p=!0}),this.activeResponse=v;let y;e==="resume-stream"?y=d:y=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:v.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:s});const b=j=>this.jobExecutor.run(()=>j({state:v.state,write:()=>{var S;this.setStatus({status:"streaming"}),v.state.message.id===((S=this.lastMessage)==null?void 0:S.id)?this.state.replaceMessage(this.state.messages.length-1,v.state.message):this.state.pushMessage(v.state.message)}}));await Rq({stream:Lq({stream:y,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:b,onError:j=>{throw j}}),onError:j=>{throw j}}),this.setStatus({status:"ready"})}catch(v){if(p||v.name==="AbortError")return p=!0,this.setStatus({status:"ready"}),null;x=!0,v instanceof TypeError&&(v.message.toLowerCase().includes("fetch")||v.message.toLowerCase().includes("network"))&&(h=!0),this.onError&&v instanceof Error&&this.onError(v),this.setStatus({status:"error",error:v})}finally{try{(l=this.onFinish)==null||l.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:p,isDisconnect:h,isError:x,finishReason:(i=this.activeResponse)==null?void 0:i.state.finishReason})}catch(v){console.error(v)}this.activeResponse=void 0}!x&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:(u=this.lastMessage)==null?void 0:u.id,metadata:t,headers:n,body:r})}};function Fq({messages:e}){const t=e[e.length-1];if(!t||t.role!=="assistant")return!1;const n=t.parts.reduce((s,i,l)=>i.type==="step-start"?l:s,-1),r=t.parts.slice(n+1).filter(Su);return r.filter(s=>s.state==="approval-responded").length>0&&r.every(s=>s.state==="output-available"||s.state==="output-error"||s.state==="approval-responded")}var g1,L4;function Dq(){if(L4)return g1;L4=1;function e(t,n){if(typeof t!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);let r,s=0;return function(...l){clearTimeout(r);const u=Date.now(),d=u-s,f=n-d;f<=0?(s=u,t.apply(this,l)):r=setTimeout(()=>{s=Date.now(),t.apply(this,l)},f)}}return g1=e,g1}var Bq=Dq();const Uq=Jg(Bq);var zk=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Lt=(e,t,n)=>(zk(e,t,"read from private field"),n?n.call(e):t.get(e)),Os=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ko=(e,t,n,r)=>(zk(e,t,"write to private field"),t.set(e,n),n);function zq(e,t){return t!=null?Uq(e,t):e}var Ur,Yf,Xf,Yc,Xc,eu,ol,Rg,Pg,Vq=class{constructor(e=[]){Os(this,Ur,void 0),Os(this,Yf,"ready"),Os(this,Xf,void 0),Os(this,Yc,new Set),Os(this,Xc,new Set),Os(this,eu,new Set),this.pushMessage=t=>{Ko(this,Ur,Lt(this,Ur).concat(t)),Lt(this,ol).call(this)},this.popMessage=()=>{Ko(this,Ur,Lt(this,Ur).slice(0,-1)),Lt(this,ol).call(this)},this.replaceMessage=(t,n)=>{Ko(this,Ur,[...Lt(this,Ur).slice(0,t),this.snapshot(n),...Lt(this,Ur).slice(t+1)]),Lt(this,ol).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,n)=>{const r=n?zq(t,n):t;return Lt(this,Yc).add(r),()=>{Lt(this,Yc).delete(r)}},this["~registerStatusCallback"]=t=>(Lt(this,Xc).add(t),()=>{Lt(this,Xc).delete(t)}),this["~registerErrorCallback"]=t=>(Lt(this,eu).add(t),()=>{Lt(this,eu).delete(t)}),Os(this,ol,()=>{Lt(this,Yc).forEach(t=>t())}),Os(this,Rg,()=>{Lt(this,Xc).forEach(t=>t())}),Os(this,Pg,()=>{Lt(this,eu).forEach(t=>t())}),Ko(this,Ur,e)}get status(){return Lt(this,Yf)}set status(e){Ko(this,Yf,e),Lt(this,Rg).call(this)}get error(){return Lt(this,Xf)}set error(e){Ko(this,Xf,e),Lt(this,Pg).call(this)}get messages(){return Lt(this,Ur)}set messages(e){Ko(this,Ur,[...e]),Lt(this,ol).call(this)}};Ur=new WeakMap;Yf=new WeakMap;Xf=new WeakMap;Yc=new WeakMap;Xc=new WeakMap;eu=new WeakMap;ol=new WeakMap;Rg=new WeakMap;Pg=new WeakMap;var il,R4=class extends $q{constructor({messages:t,...n}){const r=new Vq(t);super({...n,state:r}),Os(this,il,void 0),this["~registerMessagesCallback"]=(s,i)=>Lt(this,il)["~registerMessagesCallback"](s,i),this["~registerStatusCallback"]=s=>Lt(this,il)["~registerStatusCallback"](s),this["~registerErrorCallback"]=s=>Lt(this,il)["~registerErrorCallback"](s),Ko(this,il,r)}};il=new WeakMap;function Hq({experimental_throttle:e,resume:t=!1,...n}={}){const r=w.useRef("chat"in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});"chat"in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});const s={...n,onToolCall:x=>{var v,y;return(y=(v=r.current).onToolCall)==null?void 0:y.call(v,x)},onData:x=>{var v,y;return(y=(v=r.current).onData)==null?void 0:y.call(v,x)},onFinish:x=>{var v,y;return(y=(v=r.current).onFinish)==null?void 0:y.call(v,x)},onError:x=>{var v,y;return(y=(v=r.current).onError)==null?void 0:y.call(v,x)},sendAutomaticallyWhen:x=>{var v,y,b;return(b=(y=(v=r.current).sendAutomaticallyWhen)==null?void 0:y.call(v,x))!=null?b:!1}},i=w.useRef("chat"in n?n.chat:new R4(s));("chat"in n&&n.chat!==i.current||"id"in n&&i.current.id!==n.id)&&(i.current="chat"in n?n.chat:new R4(s));const u=w.useCallback(x=>i.current["~registerMessagesCallback"](x,e),[e,i.current.id]),d=w.useSyncExternalStore(u,()=>i.current.messages,()=>i.current.messages),f=w.useSyncExternalStore(i.current["~registerStatusCallback"],()=>i.current.status,()=>i.current.status),p=w.useSyncExternalStore(i.current["~registerErrorCallback"],()=>i.current.error,()=>i.current.error),h=w.useCallback(x=>{typeof x=="function"&&(x=x(i.current.messages)),i.current.messages=x},[i]);return w.useEffect(()=>{t&&i.current.resumeStream()},[t,i]),{id:i.current.id,messages:d,setMessages:h,sendMessage:i.current.sendMessage,regenerate:i.current.regenerate,clearError:i.current.clearError,stop:i.current.stop,error:p,resumeStream:i.current.resumeStream,status:f,addToolResult:i.current.addToolOutput,addToolOutput:i.current.addToolOutput,addToolApprovalResponse:i.current.addToolApprovalResponse}}let x1=null;function Zq(){return x1||(x1=Rt(()=>import("./mermaid-GHXKKRXX-Cue24Ovd.js").then(e=>e.i),__vite__mapDeps([12,13,3,4])).then(e=>e.Streamdown).catch(e=>(console.warn("clicky-ui: streamdown not available; rendering markdown as plain text",e),null))),x1}function Ig(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Ig).join(""):w.isValidElement(e)?Ig(e.props.children):""}function Wq({className:e,children:t,...n}){var r;if(!("data-block"in n))return o.jsx("code",{className:R("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",e),children:t});const s=(r=/language-([\w-]+)/.exec(e??""))==null?void 0:r[1],i=Ig(t).replace(/\n$/,"");return o.jsx(fs,{source:i,language:s,className:"not-prose my-4",copyable:!0,downloadable:!0,themeToggle:!0})}const qq={code:Wq};function Kq({text:e,className:t}){const[n,r]=w.useState(null);return w.useEffect(()=>{let s=!1;return Zq().then(i=>{s||r(()=>i)}),()=>{s=!0}},[]),n?o.jsx("div",{className:R("prose prose-sm max-w-none dark:prose-invert",t),children:o.jsx(n,{parseIncompleteMarkdown:!0,components:qq,children:e})}):o.jsx("pre",{className:R("whitespace-pre-wrap text-sm",t),children:e})}const wl=Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#ef4444",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M164.24 100.24L136.48 128l27.76 27.76a6 6 0 1 1-8.48 8.48L128 136.48l-27.76 27.76a6 6 0 0 1-8.48-8.48L119.52 128l-27.76-27.76a6 6 0 0 1 8.48-8.48L128 119.52l27.76-27.76a6 6 0 0 1 8.48 8.48M230 128A102 102 0 1 1 128 26a102.12 102.12 0 0 1 102 102m-12 0a90 90 0 1 0-90 90a90.1 90.1 0 0 0 90-90"})})},{__source:"ph:x-circle-light",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"circle-x",__defaultColor:"#ef4444",displayName:"UiCircleX"});Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#ef4444",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m37.66 130.34a8 8 0 0 1-11.32 11.32L128 139.31l-26.34 26.35a8 8 0 0 1-11.32-11.32L116.69 128l-26.35-26.34a8 8 0 0 1 11.32-11.32L128 116.69l26.34-26.35a8 8 0 0 1 11.32 11.32L139.31 128Z"})})},{__source:"ph:x-circle-fill",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"circle-x",__defaultColor:"#ef4444",displayName:"UiCircleXFilled"});const Eu=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 26a102 102 0 1 0 102 102A102.12 102.12 0 0 0 128 26m0 192a90 90 0 1 1 90-90a90.1 90.1 0 0 1-90 90m62-90a6 6 0 0 1-6 6h-56a6 6 0 0 1-6-6V72a6 6 0 0 1 12 0v50h50a6 6 0 0 1 6 6"})}),{__source:"ph:clock-light",__viewBox:"0 0 256 256",__group:"time",__consumerName:"clock",displayName:"UiClock"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m56 112h-56a8 8 0 0 1-8-8V72a8 8 0 0 1 16 0v48h48a8 8 0 0 1 0 16"})}),{__source:"ph:clock-fill",__viewBox:"0 0 256 256",__group:"time",__consumerName:"clock",displayName:"UiClockFilled"});const Vk=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 26a102 102 0 1 0 102 102A102.12 102.12 0 0 0 128 26m0 192a90 90 0 1 1 90-90a90.1 90.1 0 0 1-90 90"})}),{__source:"ph:circle-light",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"circle-outline",displayName:"UiCircleOutline"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M232 128A104 104 0 1 1 128 24a104.13 104.13 0 0 1 104 104"})}),{__source:"ph:circle-fill",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"circle-outline",displayName:"UiCircleOutlineFilled"});const Gq={"approval-requested":"Awaiting approval","approval-responded":"Responded","input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-denied":"Denied","output-error":"Error"},Jq={"approval-requested":{icon:Eu,className:"text-amber-600"},"approval-responded":{icon:mr,className:"text-sky-600"},"input-streaming":{icon:Vk,className:"text-muted-foreground"},"input-available":{icon:Eu,className:"text-muted-foreground animate-pulse"},"output-available":{icon:mr,className:"text-emerald-600"},"output-denied":{icon:wl,className:"text-orange-600"},"output-error":{icon:wl,className:"text-destructive"}};function Qq({part:e,defaultOpen:t=!1,onApprove:n,renderToolResult:r,className:s}){const i=e.state==="approval-requested",[l,u]=w.useState(t||i),d=Jq[e.state],f=dj(e);return o.jsxs("div",{className:R("not-prose mb-1 w-full",s),children:[o.jsxs("button",{type:"button","aria-expanded":l,onClick:()=>u(p=>!p),className:"flex w-full items-center justify-between gap-2 py-0.5 text-muted-foreground hover:text-foreground",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx(K,{icon:q2,className:"size-3 shrink-0"}),o.jsx("span",{className:"truncate font-mono text-xs",children:f}),o.jsx(K,{icon:d.icon,title:Gq[e.state],className:R("size-3 shrink-0",d.className)})]}),o.jsx(K,{icon:Vt,className:R("size-3 shrink-0 transition-transform",l&&"rotate-180")})]}),l&&o.jsxs("div",{className:"space-y-1 pl-4 pt-0.5",children:[o.jsx(Xq,{input:e.input}),o.jsx(eK,{part:e,...r?{renderToolResult:r}:{}})]}),i&&o.jsx(Yq,{part:e,onApprove:n})]})}function Yq({part:e,onApprove:t}){const n="approval"in e?e.approval:void 0;return!n||!t?null:o.jsxs("div",{className:"mt-1.5 flex items-center gap-2 pl-4",children:[o.jsx(Fe,{type:"button",size:"sm",onClick:()=>t(n.id,!0),children:"Approve"}),o.jsx(Fe,{type:"button",size:"sm",variant:"outline",onClick:()=>t(n.id,!1),children:"Deny"})]})}function Xq({input:e}){return e==null?null:o.jsx("div",{className:"overflow-hidden text-xs",children:o.jsx(fs,{language:"json",source:JSON.stringify(e,null,2)})})}function eK({part:e,renderToolResult:t}){const n=e.state==="output-error"?e.errorText:void 0,r=e.state==="output-available"?e.output:void 0;if(r===void 0&&n===void 0)return null;const s=dj(e),i=r!==void 0?t?.({part:e,toolName:s,output:r}):null;return o.jsxs("div",{className:R("overflow-x-auto text-xs",n?"text-destructive":"text-muted-foreground"),children:[n!==void 0&&o.jsx("div",{children:n}),i??(r!==void 0&&o.jsx(fs,{language:"json",source:typeof r=="string"?r:JSON.stringify(r,null,2)}))]})}const Tm=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M222 48v48a6 6 0 0 1-6 6h-48a6 6 0 0 1 0-12h33.52l-18.05-18a81.5 81.5 0 0 0-57.53-24h-.46a81.5 81.5 0 0 0-57.29 23.28a6 6 0 1 1-8.38-8.58a93.38 93.38 0 0 1 65.67-26.76h.52a93.45 93.45 0 0 1 66 27.53l18 18V48a6 6 0 0 1 12 0m-34.19 136.72a81.5 81.5 0 0 1-57.29 23.34h-.46a81.5 81.5 0 0 1-57.53-24L54.48 166H88a6 6 0 0 0 0-12H40a6 6 0 0 0-6 6v48a6 6 0 0 0 12 0v-33.52l18 18.05a93.45 93.45 0 0 0 66 27.53h.52a93.38 93.38 0 0 0 65.67-26.76a6 6 0 1 0-8.38-8.58"})}),{__source:"ph:arrows-clockwise-light",__viewBox:"0 0 256 256",__group:"actions-tools",__consumerName:"refresh",displayName:"UiRefresh"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 48v48a8 8 0 0 1-8 8h-48a8 8 0 0 1-5.66-13.66L180.65 72a79.48 79.48 0 0 0-54.72-22.09h-.45a79.52 79.52 0 0 0-55.89 22.8a8 8 0 0 1-11.18-11.44A96 96 0 0 1 192 60.7l18.36-18.36A8 8 0 0 1 224 48m-37.59 135.29a80 80 0 0 1-111.06.71l18.31-18.31A8 8 0 0 0 88 152H40a8 8 0 0 0-8 8v48a8 8 0 0 0 13.66 5.66L64 195.3a95.42 95.42 0 0 0 66 26.76h.53a95.36 95.36 0 0 0 67.07-27.33a8 8 0 0 0-11.18-11.44Z"})}),{__source:"ph:arrows-clockwise-fill",__viewBox:"0 0 256 256",__group:"actions-tools",__consumerName:"refresh",displayName:"UiRefreshFilled"});function tK({text:e,onRegenerate:t,className:n}){const[r,s]=w.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),1500)}catch(l){console.warn("clicky-ui: copy to clipboard failed",l)}};return o.jsxs("div",{className:R("flex items-center gap-1 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",n),children:[o.jsx("button",{type:"button","aria-label":r?"Copied":"Copy message",onClick:i,className:"rounded p-1 hover:bg-accent hover:text-accent-foreground",children:o.jsx(K,{icon:r?mr:sd,className:R("size-3.5",r&&"text-emerald-600")})}),t&&o.jsx("button",{type:"button","aria-label":"Regenerate response",onClick:t,className:"rounded p-1 hover:bg-accent hover:text-accent-foreground",children:o.jsx(K,{icon:Tm,className:"size-3.5"})})]})}const lx=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M246 124a54.13 54.13 0 0 0-32-49.33V72a46 46 0 0 0-86-22.67A46 46 0 0 0 42 72v2.67a54 54 0 0 0 0 98.63v2.7a46 46 0 0 0 86 22.67A46 46 0 0 0 214 176v-2.7a54.07 54.07 0 0 0 32-49.3M88 210a34 34 0 0 1-34-32.94a53.7 53.7 0 0 0 10 .94h8a6 6 0 0 0 0-12h-8a42 42 0 0 1-14-81.61a6 6 0 0 0 4-5.66V72a34 34 0 0 1 68 0v73.05A45.9 45.9 0 0 0 88 130a6 6 0 0 0 0 12a34 34 0 0 1 0 68m104-44h-8a6 6 0 0 0 0 12h8a53.7 53.7 0 0 0 10-.94A34 34 0 1 1 168 142a6 6 0 0 0 0-12a45.9 45.9 0 0 0-34 15.05V72a34 34 0 0 1 68 0v6.73a6 6 0 0 0 4 5.66A42 42 0 0 1 192 166m14-54a6 6 0 0 1-6 6h-4a34 34 0 0 1-34-34v-4a6 6 0 0 1 12 0v4a22 22 0 0 0 22 22h4a6 6 0 0 1 6 6m-146 6h-4a6 6 0 0 1 0-12h4a22 22 0 0 0 22-22v-4a6 6 0 0 1 12 0v4a34 34 0 0 1-34 34"})}),{__source:"ph:brain-light",__viewBox:"0 0 256 256",__group:"ai-ml",__consumerName:"brain",displayName:"UiBrain"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M212 76v-4a44 44 0 0 0-74.86-31.31a3.93 3.93 0 0 0-1.14 2.8v88.72a4 4 0 0 0 6.2 3.33a47.67 47.67 0 0 1 25.48-7.54a8.18 8.18 0 0 1 8.31 7.58a8 8 0 0 1-8 8.42a32 32 0 0 0-32 32v33.88a4 4 0 0 0 1.49 3.12a47.92 47.92 0 0 0 74.21-17.16a4 4 0 0 0-4.49-5.56A68 68 0 0 1 192 192h-7.73a8.18 8.18 0 0 1-8.25-7.47a8 8 0 0 1 8-8.53h8a51.6 51.6 0 0 0 24-5.88A52 52 0 0 0 212 76m-12 36h-4a36 36 0 0 1-36-36v-4a8 8 0 0 1 16 0v4a20 20 0 0 0 20 20h4a8 8 0 0 1 0 16M88 28a44.05 44.05 0 0 0-44 44v4a52 52 0 0 0-4 94.12A51.6 51.6 0 0 0 64 176h7.73a8.18 8.18 0 0 1 8.27 7.47a8 8 0 0 1-8 8.53h-8a67.5 67.5 0 0 1-15.21-1.73a4 4 0 0 0-4.5 5.55A47.93 47.93 0 0 0 118.51 213a4 4 0 0 0 1.49-3.12V176a32 32 0 0 0-32-32a8 8 0 0 1-8-8.42a8.18 8.18 0 0 1 8.32-7.58a47.67 47.67 0 0 1 25.48 7.54a4 4 0 0 0 6.2-3.33V43.49a4 4 0 0 0-1.14-2.81A43.85 43.85 0 0 0 88 28m8 48a36 36 0 0 1-36 36h-4a8 8 0 0 1 0-16h4a20 20 0 0 0 20-20v-4a8 8 0 0 1 16 0Z"})}),{__source:"ph:brain-fill",__viewBox:"0 0 256 256",__group:"ai-ml",__consumerName:"brain",displayName:"UiBrainFilled"});function nK({text:e,defaultOpen:t=!1,className:n}){const[r,s]=w.useState(t);return e?o.jsxs("div",{className:R("not-prose w-full",n),children:[o.jsxs("button",{type:"button","aria-expanded":r,onClick:()=>s(i=>!i),className:"flex items-center gap-1.5 py-0.5 text-xs text-muted-foreground hover:text-foreground",children:[o.jsx(K,{icon:lx,className:"size-3 shrink-0"}),o.jsx("span",{children:"Reasoning"}),o.jsx(K,{icon:Vt,className:R("size-3 shrink-0 transition-transform",r&&"rotate-180")})]}),r&&o.jsx("div",{className:"mt-1 border-l-2 border-border pl-3 text-xs italic text-muted-foreground",children:o.jsx("p",{className:"whitespace-pre-wrap break-words",children:e})})]}):null}function rK({message:e,className:t,onRegenerate:n,onApprove:r,renderToolResult:s}){const i=e.role==="user",l=e.parts.filter(u=>u.type==="text").map(u=>u.text).join("");return o.jsxs("div",{className:R("group flex w-full max-w-[95%] flex-col gap-2",i?"ml-auto items-end":"items-start",t),children:[o.jsx("div",{className:R("flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-hidden text-sm",i&&"rounded-lg bg-secondary px-4 py-3 text-secondary-foreground"),children:e.parts.map((u,d)=>o.jsx(sK,{part:u,isUser:i,onApprove:r,renderToolResult:s},`${e.id}-${d}`))}),!i&&l&&o.jsx(tK,{text:l,onRegenerate:n?()=>n(e.id):void 0})]})}function sK({part:e,isUser:t,onApprove:n,renderToolResult:r}){return e.type==="text"?t?o.jsx("span",{className:"whitespace-pre-wrap break-words",children:e.text}):o.jsx(Kq,{text:e.text}):lU(e)?o.jsx(nK,{text:e.text}):cU(e)?o.jsx(oK,{part:e}):uj(e)||dU(e)?o.jsx(Qq,{part:e,onApprove:n,...r?{renderToolResult:r}:{}}):null}function oK({part:e}){var t;return((t=e.mediaType)==null?void 0:t.startsWith("image/"))&&e.url?o.jsx("img",{src:e.url,alt:e.filename??"attachment",className:"max-h-48 max-w-full rounded-md border border-border"}):o.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs text-muted-foreground hover:text-foreground",children:[o.jsx(K,{icon:od,className:"size-3.5 shrink-0"}),o.jsx("span",{className:"truncate",children:e.filename??e.mediaType??"file"})]})}const Hk=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m204.24 148.24l-72 72a6 6 0 0 1-8.48 0l-72-72a6 6 0 0 1 8.48-8.48L122 201.51V40a6 6 0 0 1 12 0v161.51l61.76-61.75a6 6 0 0 1 8.48 8.48"})}),{__source:"ph:arrow-down-light",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"arrow-down",displayName:"UiArrowDown"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m205.66 149.66l-72 72a8 8 0 0 1-11.32 0l-72-72A8 8 0 0 1 56 136h64V40a8 8 0 0 1 16 0v96h64a8 8 0 0 1 5.66 13.66"})}),{__source:"ph:arrow-down-fill",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"arrow-down",displayName:"UiArrowDownFilled"});const Zk=Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#94a3b8",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M134 32v32a6 6 0 0 1-12 0V32a6 6 0 0 1 12 0m39.25 56.75A6 6 0 0 0 177.5 87l22.62-22.63a6 6 0 0 0-8.48-8.48L169 78.5a6 6 0 0 0 4.24 10.25ZM224 122h-32a6 6 0 0 0 0 12h32a6 6 0 0 0 0-12m-46.5 47a6 6 0 0 0-8.5 8.5l22.63 22.62a6 6 0 0 0 8.48-8.48ZM128 186a6 6 0 0 0-6 6v32a6 6 0 0 0 12 0v-32a6 6 0 0 0-6-6m-49.5-17l-22.62 22.64a6 6 0 1 0 8.48 8.48L87 177.5a6 6 0 1 0-8.5-8.5M70 128a6 6 0 0 0-6-6H32a6 6 0 0 0 0 12h32a6 6 0 0 0 6-6m-5.64-72.12a6 6 0 0 0-8.48 8.48L78.5 87a6 6 0 1 0 8.5-8.5Z"})})},{__source:"ph:spinner-light",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"loader",__defaultColor:"#94a3b8",displayName:"UiLoader"});Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#94a3b8",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m33.94 58.75l17-17a8 8 0 0 1 11.32 11.32l-17 17a8 8 0 0 1-11.31-11.31ZM48 136a8 8 0 0 1 0-16h24a8 8 0 0 1 0 16Zm46.06 37.25l-17 17a8 8 0 0 1-11.32-11.32l17-17a8 8 0 0 1 11.31 11.31Zm0-79.19a8 8 0 0 1-11.31 0l-17-17a8 8 0 0 1 11.34-11.29l17 17a8 8 0 0 1-.03 11.29M136 208a8 8 0 0 1-16 0v-24a8 8 0 0 1 16 0Zm0-136a8 8 0 0 1-16 0V48a8 8 0 0 1 16 0Zm54.23 118.23a8 8 0 0 1-11.32 0l-17-17a8 8 0 0 1 11.31-11.31l17 17a8 8 0 0 1 .01 11.31M208 136h-24a8 8 0 0 1 0-16h24a8 8 0 0 1 0 16"})})},{__source:"ph:spinner-fill",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"loader",__defaultColor:"#94a3b8",displayName:"UiLoaderFilled"});function iK({messages:e,status:t,error:n,onClearError:r,emptyState:s,className:i,...l}){const u=w.useRef(null),[d,f]=w.useState(!0),p=t==="submitted"||t==="streaming"&&!aK(e),h=n?.message||(t==="error"?"The assistant request failed.":void 0),x=()=>{const y=u.current;if(!y)return;const b=y.scrollHeight-y.scrollTop-y.clientHeight;f(b<32)};w.useEffect(()=>{const y=u.current;y&&d&&(y.scrollTop=y.scrollHeight)});const v=()=>{const y=u.current;y&&y.scrollTo({top:y.scrollHeight,behavior:"smooth"})};return o.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[o.jsx("div",{ref:u,onScroll:x,role:"log",className:R("flex-1 overflow-y-auto",i),children:e.length===0&&s?o.jsx("div",{className:"flex size-full flex-col items-center justify-center gap-3 p-8 text-center",children:s}):o.jsxs("div",{className:"flex flex-col gap-8 p-4",children:[e.map(y=>o.jsx(rK,{message:y,...l},y.id)),p&&o.jsx(lK,{}),h&&o.jsx(cK,{message:h,onClear:r})]})}),!d&&e.length>0&&o.jsx("button",{type:"button","aria-label":"Scroll to latest",onClick:v,className:"absolute bottom-3 left-1/2 flex size-8 -translate-x-1/2 items-center justify-center rounded-full border border-border bg-background text-muted-foreground shadow-md hover:text-foreground",children:o.jsx(K,{icon:Hk,className:"size-4"})})]})}function aK(e){const t=e[e.length-1];return t?.role!=="assistant"?!1:t.parts.some(n=>n.type==="step-start"?!1:n.type==="text"||n.type==="reasoning"?n.text.length>0:!0)}function lK(){return o.jsxs("div",{className:"flex w-full max-w-[95%] items-center gap-2 text-sm text-muted-foreground",children:[o.jsx(K,{icon:Zk,className:"size-4 shrink-0 animate-spin"}),o.jsx("span",{children:"Waiting for response..."})]})}function cK({message:e,onClear:t}){return o.jsxs("div",{role:"alert",className:"flex w-full max-w-[95%] items-start gap-2 rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",children:[o.jsx(K,{icon:wl,className:"mt-0.5 size-4 shrink-0"}),o.jsx("div",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words",children:e}),t&&o.jsx("button",{type:"button",className:"shrink-0 text-xs underline-offset-2 hover:underline",onClick:t,children:"Dismiss"})]})}const v1=5*1024*1024;function uK({onAdd:e,disabled:t,className:n}){const r=w.useRef(null),s=async i=>{const l=i.target.files;if(!l||l.length===0)return;const u=Array.from(l).filter(f=>f.size>v1);u.length>0&&console.warn(`clicky-ui: ${u.length} attachment(s) exceed ${v1} bytes and were skipped`);const d=Array.from(l).filter(f=>f.size<=v1);if(d.length>0){const f=new DataTransfer;d.forEach(p=>f.items.add(p)),e(await Bk(f.files))}i.target.value=""};return o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:r,type:"file",multiple:!0,hidden:!0,onChange:s}),o.jsx(Fe,{type:"button",size:"icon",variant:"ghost","aria-label":"Attach files",disabled:t,onClick:()=>{var i;return(i=r.current)==null?void 0:i.click()},className:n,children:o.jsx(K,{icon:pr,className:"size-4"})})]})}function dK({files:e,onRemove:t,className:n}){return e.length===0?null:o.jsx("div",{className:R("flex flex-wrap gap-2 px-1",n),children:e.map((r,s)=>{var i;return o.jsxs("div",{className:"flex items-center gap-1.5 rounded-md border border-border bg-background py-1 pl-2 pr-1 text-xs",children:[(i=r.mediaType)!=null&&i.startsWith("image/")&&r.url?o.jsx("img",{src:r.url,alt:r.filename??"",className:"size-6 rounded object-cover"}):o.jsx(K,{icon:od,className:"size-3.5 text-muted-foreground"}),o.jsx("span",{className:"max-w-32 truncate",children:r.filename??r.mediaType??"file"}),o.jsx("button",{type:"button","aria-label":"Remove attachment",onClick:()=>t(s),className:"rounded p-0.5 text-muted-foreground hover:bg-accent hover:text-accent-foreground",children:o.jsx(K,{icon:Tn,className:"size-3"})})]},`${r.filename??"file"}-${s}`)})})}const Wk=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M204.24 116.24a6 6 0 0 1-8.48 0L134 54.49V216a6 6 0 0 1-12 0V54.49l-61.76 61.75a6 6 0 0 1-8.48-8.48l72-72a6 6 0 0 1 8.48 0l72 72a6 6 0 0 1 0 8.48"})}),{__source:"ph:arrow-up-light",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"arrow-up",displayName:"UiArrowUp"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M207.39 115.06A8 8 0 0 1 200 120h-64v96a8 8 0 0 1-16 0v-96H56a8 8 0 0 1-5.66-13.66l72-72a8 8 0 0 1 11.32 0l72 72a8 8 0 0 1 1.73 8.72"})}),{__source:"ph:arrow-up-fill",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"arrow-up",displayName:"UiArrowUpFilled"});function fK({onSubmit:e,onStop:t,status:n,placeholder:r="What would you like to know?",enableAttachments:s=!1,toolbar:i,className:l}){const[u,d]=w.useState(""),[f,p]=w.useState([]),h=n==="submitted"||n==="streaming",x=()=>{const j=u.trim();!j&&f.length===0||h||(e(j,f),d(""),p([]))},v=j=>{j.preventDefault(),x()},y=j=>{j.key==="Enter"&&!j.shiftKey&&!j.nativeEvent.isComposing&&(j.preventDefault(),x())},b=u.trim().length>0||f.length>0;return o.jsxs("form",{onSubmit:v,className:R("flex flex-col gap-2 rounded-lg border border-input bg-background p-2",l),children:[s&&o.jsx(dK,{files:f,onRemove:j=>p(S=>S.filter((N,k)=>k!==j))}),o.jsxs("div",{className:"flex items-end gap-2",children:[o.jsx("textarea",{value:u,onChange:j=>d(j.target.value),onKeyDown:y,placeholder:r,rows:1,className:"max-h-48 min-h-9 flex-1 resize-none bg-transparent px-1 py-1.5 text-sm outline-none placeholder:text-muted-foreground"}),h&&t?o.jsx(Fe,{type:"button",size:"icon",variant:"secondary","aria-label":"Stop",onClick:t,children:o.jsx(K,{icon:Qf,className:"size-4"})}):o.jsx(Fe,{type:"submit",size:"icon","aria-label":"Send",disabled:!b,children:o.jsx(K,{icon:Wk,className:"size-4"})})]}),(i||s)&&o.jsxs("div",{className:"flex items-center gap-2",children:[s&&o.jsx(uK,{onAdd:j=>p(S=>[...S,...j]),disabled:h}),i]})]})}function mK({suggestions:e,onSelect:t,className:n}){return e.length===0?null:o.jsx("div",{className:R("flex flex-wrap justify-center gap-2",n),children:e.map((r,s)=>o.jsx("button",{type:"button",onClick:()=>t(aU(r)),className:"rounded-full border border-border bg-background px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:Uw(r)},`${Uw(r)}-${s}`))})}const pK={anthropic:Oy,claude:Oy,openai:wA,google:vA,googleai:My,gemini:My};function $g(e){return e?pK[e.toLowerCase()]:void 0}function Om({models:e,value:t,onChange:n,className:r,size:s="sm"}){if(e.length===0)return null;const i=e.find(u=>u.id===t),l=$g(i?.provider);return o.jsx(er,{ariaLabel:"Model",value:t??"",onChange:n,allowCustomValue:!1,required:!0,size:s,className:R("w-48",r),...l?{prefix:o.jsx(l,{className:"size-4"})}:{},options:e.map(u=>{const d=$g(u.provider);return{value:u.id,label:u.label,...d?{icon:o.jsx(d,{className:"size-4"})}:{},disabled:u.configured===!1}})})}function Mm({efforts:e,value:t,onChange:n,className:r,size:s="sm"}){return o.jsx(er,{ariaLabel:"Reasoning effort",value:t??"",onChange:n,allowCustomValue:!1,required:!0,size:s,className:R("w-36",r),options:[{value:"",label:"No reasoning"},...e.map(i=>{var l;return{value:i,label:`${(l=i[0])==null?void 0:l.toUpperCase()}${i.slice(1)} reasoning`}})]})}function P4(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function hK(e){return e>80?"text-red-500":e>50?"text-amber-500":"text-emerald-500"}function gK(e){return e>80?"bg-red-500":e>50?"bg-amber-500":"bg-emerald-500"}function xK({usedTokens:e,maxTokens:t,messageCount:n,modelLabel:r,modelIcon:s,cost:i,className:l=""}){const u=t>0?Math.min(100,Math.round(e/t*100)):0,d=8,f=2*Math.PI*d,p=f-u/100*f;return o.jsx(Fl,{align:"right",className:l,menuClassName:"w-64 p-3",trigger:o.jsxs("button",{type:"button",title:"Context usage",className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[s&&o.jsx(s,{className:"size-3.5 shrink-0"}),o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",className:R("shrink-0",hK(u)),children:[o.jsx("circle",{cx:"10",cy:"10",r:d,fill:"none",stroke:"currentColor",strokeWidth:"2.5",opacity:"0.15"}),o.jsx("circle",{cx:"10",cy:"10",r:d,fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:f,strokeDashoffset:p,strokeLinecap:"round",transform:"rotate(-90 10 10)"}),o.jsx("text",{x:"10",y:"10",textAnchor:"middle",dominantBaseline:"central",fontSize:"6",fill:"currentColor",fontWeight:"600",children:u})]})]}),children:()=>o.jsxs("div",{className:"space-y-2.5 text-xs",children:[o.jsx("div",{className:"text-xs font-semibold",children:"Context Usage"}),r&&o.jsxs("div",{className:"flex items-center gap-2",children:[s&&o.jsx(s,{className:"size-4 shrink-0"}),o.jsx("span",{className:"font-medium",children:r})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"mb-1 flex justify-between",children:[o.jsx("span",{className:"text-muted-foreground",children:"Tokens"}),o.jsxs("span",{children:[P4(e)," / ",P4(t)]})]}),o.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:o.jsx("div",{className:R("h-full rounded-full transition-all",gK(u)),style:{width:`${u}%`}})})]}),n!=null&&o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{className:"text-muted-foreground",children:"Messages"}),o.jsx("span",{children:n})]}),i!=null&&i>0&&o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{className:"text-muted-foreground",children:"Est. cost"}),o.jsxs("span",{children:["$",i<.01?i.toFixed(4):i.toFixed(2)]})]})]})})}const vK=["low","medium","high"];function bK({api:e="/api/chat",models:t,modelsApi:n="/api/chat/models",defaultModel:r,model:s,reasoningEfforts:i=vK,defaultReasoningEffort:l="",reasoningEffort:u,temperature:d,budget:f,permissionMode:p,onModelChange:h,onReasoningEffortChange:x,onUsage:v,suggestions:y,enableAttachments:b=!1,toolApproval:j,threadId:S,renderToolResult:N,body:k,transport:T,initialMessages:E,initialPrompt:O,onInitialPromptSent:M,placeholder:L,emptyState:F,className:U}){const[z,V]=w.useState(t??[]),[X,H]=w.useState(s??r),[B,W]=w.useState(u??l),[se,P]=w.useState(null),J=w.useRef(r),ne=w.useRef(null);w.useEffect(()=>{t&&(V(t),H(Ie=>{var _e;return Ie??s??((_e=t.find(be=>be.configured!==!1))==null?void 0:_e.id)}))},[t,s]),w.useEffect(()=>{if(t||!n)return;let Ie=!1;return fetch(n).then(_e=>_e.ok?_e.json():Promise.reject(new Error(`models ${_e.status}`))).then(_e=>{Ie||(V(_e),H(be=>{var Ce;return be??s??((Ce=_e.find(Te=>Te.configured!==!1))==null?void 0:Ce.id)}))}).catch(_e=>console.warn("clicky-ui: failed to load chat models",_e)),()=>{Ie=!0}},[t,n,s]),w.useEffect(()=>{s!==void 0&&H(s)},[s]),w.useEffect(()=>{u!==void 0&&W(u)},[u]),w.useEffect(()=>{s===void 0&&(!r||r===J.current||(J.current=r,H(r)))},[s,r]);const $=z.find(Ie=>Ie.id===X),Q=!$||$.reasoning,ae=w.useRef({});ae.current={...k,...X?{model:X}:{},...B?{reasoningEffort:B}:{},...d!==void 0?{temperature:d}:{},...f&&(f.cost!==void 0||f.maxTokens!==void 0)?{budget:f}:{},...p?{permissionMode:p}:{},...j?{toolApproval:j}:{},...S?{threadId:S}:{}};const ie=w.useMemo(()=>T??new Uk({api:e,body:()=>ae.current}),[T,e]),{messages:de,sendMessage:ge,regenerate:ve,addToolApprovalResponse:Le,status:je,error:Ue,clearError:we,stop:ke}=Hq({transport:ie,sendAutomaticallyWhen:Fq,...E?{messages:E}:{}});w.useEffect(()=>{if(!O||je!=="ready"||ne.current===O.id)return;const Ie=O.text.trim();Ie&&(ne.current=O.id,ge({text:Ie}),M?.())},[O,M,ge,je]);const Ne=w.useRef(v);Ne.current=v,w.useEffect(()=>{var Ie,_e,be;if(je!=="ready")return;const Ce=[...de].reverse().find(Oe=>Oe.role==="assistant"),Te=Ce?.metadata;if(!Te)return;const Y=Te.threadCostUsd??((Ie=Te.costBreakdown)==null?void 0:Ie.totalUsd)??Te.cost,Se={usedTokens:Te.contextTokens??((_e=Te.usage)==null?void 0:_e.totalTokens)??0,maxTokens:$?.contextWindow??0,messageCount:de.length,...Y!=null?{cost:Y}:{},...Te.usage?{usage:Te.usage}:{},...Te.costBreakdown?{costBreakdown:Te.costBreakdown}:{},...$?.label?{modelLabel:$.label}:{}};P(Se),(be=Ne.current)==null||be.call(Ne,Se)},[de,je,$]);const xe=Ie=>{H(Ie),h?.(Ie)},Re=Ie=>{W(Ie),x?.(Ie)},et=$g($?.provider),Ve=z.length>0||Q||se&&se.maxTokens>0?o.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[o.jsx(Om,{models:z,value:X,onChange:xe}),Q&&o.jsx(Mm,{efforts:i,value:B,onChange:Re}),se&&se.maxTokens>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex-1"}),o.jsx(xK,{usedTokens:se.usedTokens,maxTokens:se.maxTokens,...se.messageCount!=null?{messageCount:se.messageCount}:{},...se.cost!=null?{cost:se.cost}:{},...se.modelLabel?{modelLabel:se.modelLabel}:{},...et?{modelIcon:et}:{}})]})]}):void 0,st=de.length===0&&(F||y?.length)?o.jsxs("div",{className:"flex flex-col items-center gap-4",children:[F,y&&y.length>0&&o.jsx(mK,{suggestions:y,onSelect:Ie=>{ge({text:Ie})}})]}):void 0;return o.jsxs("div",{className:R("flex h-full flex-col",U),children:[o.jsx(iK,{messages:de,status:je,error:Ue,onClearError:we,emptyState:st,onRegenerate:Ie=>{ve({messageId:Ie})},onApprove:(Ie,_e,be)=>{Le(be?{id:Ie,approved:_e,reason:be}:{id:Ie,approved:_e})},...N?{renderToolResult:N}:{}}),o.jsx("div",{className:"p-4 pt-0",children:o.jsx(fK,{status:je,onStop:()=>{ke()},placeholder:L,enableAttachments:b,toolbar:Ve,onSubmit:(Ie,_e)=>{ge({text:Ie,files:_e})}})})]})}function yK({threadId:e,onSelect:t,onNew:n,api:r="/api/chat/threads",source:s,query:i,className:l=""}){const[u,d]=w.useState([]),[f,p]=w.useState(!1),h=i?`${r}?${i}`:r,x=w.useCallback(async()=>{p(!0);try{if(s)d(await s.load());else{const j=await fetch(h);j.ok&&d(await j.json())}}catch(j){console.warn("clicky-ui: failed to load threads",j)}finally{p(!1)}},[s,h]);w.useEffect(()=>{x()},[x]);const v=w.useCallback(async(j,S)=>{var N;S.stopPropagation();try{s?await((N=s.remove)==null?void 0:N.call(s,j)):await fetch(`${r}/${j}`,{method:"DELETE"}),d(k=>k.filter(T=>T.id!==j)),j===e&&n()}catch(k){console.warn("clicky-ui: failed to delete thread",k)}},[s,r,e,n]),y=u.find(j=>j.id===e),b=y?.title||"New Chat";return o.jsx(Fl,{align:"left",className:l,onOpenChange:j=>{j&&x()},menuClassName:"min-w-[220px] max-w-[320px] max-h-72 overflow-y-auto",trigger:o.jsxs("button",{type:"button",className:"flex max-w-[200px] items-center gap-1 truncate rounded px-2 py-1 text-sm font-medium hover:bg-muted",children:[o.jsx(K,{icon:b0,className:"size-3.5 shrink-0"}),o.jsx("span",{className:"truncate",children:b}),o.jsx(K,{icon:Vt,className:"size-3 shrink-0 opacity-50"})]}),children:j=>o.jsxs("div",{className:"py-1",children:[o.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-popover-foreground hover:bg-accent",onClick:()=>{n(),j()},children:[o.jsx(K,{icon:pr,className:"size-3"})," New Chat"]}),o.jsx("div",{className:"my-1 border-t border-border"}),f&&u.length===0&&o.jsx("div",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:"Loading…"}),u.length===0&&!f&&o.jsx("div",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:"No previous conversations"}),u.map(S=>o.jsxs("div",{role:"button",tabIndex:0,className:R("group/thread flex w-full cursor-pointer items-center gap-2 px-3 py-1.5 text-left text-xs hover:bg-accent",S.id===e&&"font-semibold"),onClick:()=>{t(S.id),j()},onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),t(S.id),j())},children:[o.jsx(K,{icon:b0,className:"size-3 shrink-0"}),o.jsx("span",{className:"flex-1 truncate",children:S.title||"Untitled"}),S.totalCostUsd!=null&&S.totalCostUsd>0&&o.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:["$",S.totalCostUsd.toFixed(2)]}),o.jsx("button",{type:"button","aria-label":"Delete conversation",className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 hover:text-destructive group-hover/thread:opacity-100",onClick:N=>{v(S.id,N)},children:o.jsx(K,{icon:Vl,className:"size-3"})})]},S.id))]})})}const wK={className:"text-muted-foreground bg-muted"};function _K(e,t){return t?.[e]??wK}function jK(e){const t=e.fields;return t?Object.entries(t).filter(([,n])=>n!=null&&n!=="").map(([,n])=>n).join(" "):""}function kK({items:e,onRemove:t,typeConfig:n,className:r}){if(e.length===0)return null;const s=!t;return o.jsx("div",{className:R(s?"flex flex-wrap gap-1":"flex flex-wrap gap-1.5 px-2 py-1.5",r),children:e.map(i=>{const l=_K(i.type,n),u=jK(i);return o.jsxs("span",{"data-testid":`context-badge-${i.type}`,className:R("inline-flex items-center gap-1.5 rounded-lg border",s?"px-1.5 py-0.5 text-[10px]":"px-2 py-1 text-xs",l.className),children:[l.icon&&o.jsx(K,{...typeof l.icon=="string"?{name:l.icon}:{icon:l.icon},className:"size-3.5 shrink-0"}),o.jsx("span",{className:"font-medium truncate max-w-[180px]",children:i.label}),u&&o.jsx("span",{className:"opacity-70 truncate max-w-[100px]",children:u}),t&&o.jsx("button",{type:"button","data-testid":"context-badge-remove","aria-label":`Remove ${i.label}`,onClick:()=>t(i.id),className:"ml-0.5 opacity-60 hover:opacity-100",children:o.jsx(K,{icon:Tn,className:"size-3"})})]},i.id)})})}const Am=["x-oi","pa-"].join(""),NK=["@oi","pa-"].join(""),CK=`${Am}type`,Fg=`${Am}ascode`,SK=`${Am}format`,EK=`${Am}client-ref`,TK=new RegExp(`${NK}([a-z][\\w-]*)\\s*`,"gi");function on(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return e}function Vc(e,t){const n=e[t];return typeof n=="string"?n:void 0}function qk(e){if(Array.isArray(e.enum)&&e.enum.length>0)return e;for(const t of[...e.anyOf??[],...e.oneOf??[]])if(Array.isArray(t.enum)&&t.enum.length>0)return t}function OK(e){const t=qk(e);if(t?.enum)return`enum(${t.enum.length})`;if(e.const!==void 0)return"const";const n=e.type;return Array.isArray(n)?n.join(" | "):n||(e.properties||e.additionalProperties||e.patternProperties?"object":e.items?"array":"any")}function MK(e){const t=qk(e);if(!t?.enum||t.enum.length===0)return;const n=t["x-enum-labels"]??e["x-enum-labels"],r=n&&typeof n=="object"?n:void 0;return t.enum.map(s=>{const i=String(s),l=r?.[i];return l&&l!==i?{value:i,label:l}:{value:i}})}function AK(e){const t=e["x-location"];if(!t||typeof t!="object"||Array.isArray(t))return;const n=t;if(typeof n.path=="string")return{path:n.path,startLine:typeof n.startLine=="number"?n.startLine:void 0,endLine:typeof n.endLine=="number"?n.endLine:void 0}}function LK(e){if(!e)return{};const t=[...e.matchAll(TK)];if(t.length===0){const u=e.trim();return u?{text:u}:{}}const n={},r=t[0];if(!r)return{};const s=r.index??0,i=e.slice(0,s).trim();i&&(n.text=i);const l=[];return t.forEach((u,d)=>{var f,p;const h=(f=u[1])==null?void 0:f.toLowerCase();if(!h)return;const x=(u.index??0)+u[0].length,v=d+10&&(n.annotations=l),n}function Kk(e){const t=LK(typeof e.description=="string"?e.description:void 0);return{type:OK(e),platformType:Vc(e,CK),ascode:Vc(e,Fg)??t.ascode,format:Vc(e,SK)??(typeof e.format=="string"?e.format:void 0),clientRef:e[EK]===!0?!0:void 0,layout:Vc(e,"x-layout"),enumValues:MK(e),location:AK(e),source:Vc(e,"x-source"),query:t.query,annotations:t.annotations,description:t.text}}function RK(e){return!!(e.platformType||e.ascode||e.format||e.clientRef||e.layout||e.enumValues||e.location||e.source||e.query||e.annotations||e.description)}function H0(e){if(!e)return{};const t={...e.properties};for(const n of e.allOf??[])if(!(n.if!==void 0||n.then!==void 0))for(const[r,s]of Object.entries(n.properties??{}))t[r]=s;return t}function Gk(e,t,n){if(RK(n))return[{key:`${e}/__detail`,label:t,detail:n}]}function cx(e,t,n){const r=`${n}/${e}`,s=Kk(t),i={key:r,label:e,badge:s.type,platformType:s.platformType,ascode:s.ascode,description:s.description,meta:s},l=fa(t,r);return l.length>0?(i.children=l,i.count=l.length):i.children=Gk(r,e,s),i}function I4(e,t,n){const r=Kk(t),s=fa(t,n);return{key:n,label:e,badge:r.type,platformType:r.platformType,ascode:r.ascode,description:r.description,meta:r,...s.length>0?{count:s.length,children:s}:{children:Gk(n,e,r)}}}function fa(e,t){const n=[],r=H0(on(e)),s=H0(on(e.items)),i=Object.keys(r).length>0?r:s;for(const[u,d]of Object.entries(i))n.push(cx(u,d,t));const l=on(e.additionalProperties);l&&n.push(I4("(any key)",l,`${t}/*`));for(const[u,d]of Object.entries(e.patternProperties??{}))n.push(I4(`/${u}/`,d,`${t}/pattern/${u}`));return n}function PK(e){var t,n,r;const s=new Set,i=(t=e.properties)==null?void 0:t.activity;i&&Array.isArray(i.enum)&&i.enum.forEach(l=>s.add(String(l)));for(const l of e.allOf??[]){const u=(r=(n=l.if)==null?void 0:n.properties)==null?void 0:r.activity;u?.const!==void 0&&s.add(String(u.const)),Array.isArray(u?.enum)&&u.enum.forEach(d=>s.add(String(d)))}return[...s].sort()}function IK(e,t){var n,r,s,i,l;for(const u of e.allOf??[]){const d=(r=(n=u.if)==null?void 0:n.properties)==null?void 0:r.activity;if(!(d?.const===t||Array.isArray(d?.enum)&&d.enum.includes(t)))continue;const p=on((i=(s=u.then)==null?void 0:s.properties)==null?void 0:i.input);if(p)return p}return on((l=e.properties)==null?void 0:l.input)}function $K(e,t){const n=`branch/${e}/activity`,r=PK(t),s=r.map(l=>{const u=IK(t,l),d=u?fa(u,`${n}/${l}/input`):[],f=[];return d.length>0&&f.push({key:`${n}/${l}/input`,label:"input",badge:"object",count:d.length,children:d}),{key:`${n}/${l}`,label:l,badge:"activity",...f.length>0?{children:f,count:f.length}:{}}}),i=FK(t,n);return{key:n,label:`activity - ${e}`,badge:"branch",count:r.length,children:[...s,...i]}}function FK(e,t){const n=[];for(const[r,s]of Object.entries(H0(e)))r==="activity"||r==="input"||n.push(cx(r,s,`${t}/_controls`));return n.length===0?[]:[{key:`${t}/_controls`,label:"(common fields)",badge:"fields",count:n.length,children:n}]}function DK(e){var t;const n=on((t=e.properties)==null?void 0:t.CountryCode);return n&&Array.isArray(n.enum)?n.enum.map(String).sort():[]}function BK(e,t){var n,r,s;for(const i of e.allOf??[]){const l=((n=i.if)==null?void 0:n.properties)??{},u=l.CountryCode;if(u?.const!==t||l.AddressType!==void 0)continue;const d=on((s=(r=i.then)==null?void 0:r.properties)==null?void 0:s.AddressType);if(d&&Array.isArray(d.enum))return d.enum.map(String).sort()}return[]}function UK(e,t,n){var r,s,i;for(const l of e.allOf??[]){const u=((r=l.if)==null?void 0:r.properties)??{},d=u.CountryCode,f=u.AddressType;if(d?.const!==t||f?.const!==n)continue;const p=on((i=(s=l.then)==null?void 0:s.properties)==null?void 0:i.fields);if(p)return p}}function $4(e,t){const n=on(t.additionalProperties);if(!n)return;const r=on(t.propertyNames),s=DK(n),i=s.map(l=>{const d=BK(n,l).map(f=>{const p=UK(n,l,f),h=p?fa(p,`${e}/${l}/${f}/fields`):[],x=h.length>0?[{key:`${e}/${l}/${f}/fields`,label:"fields",badge:"object",count:h.length,children:h}]:[];return{key:`${e}/${l}/${f}`,label:f,badge:"activity",...x.length>0?{children:x,count:x.length}:{}}});return{key:`${e}/${l}`,label:l,badge:"branch",count:d.length,children:d}});return{key:e,label:"addresses",badge:"branch",count:s.length,...r?.[Fg]?{ascode:String(r[Fg])}:{},children:i}}function F4(e,t){const n=fa(t,`branch/${e}`);return{key:`branch/${e}`,label:e,badge:"branch",count:n.length,children:n}}function zK(e){var t,n,r,s,i;const l=on((n=(t=e.properties)==null?void 0:t.steps)==null?void 0:n.items),u=l?.oneOf??[];if(u.length===0)return;const d=[];for(const f of u){const p=(r=f.required)==null?void 0:r[0];if(!p)continue;const h=on((s=f.properties)==null?void 0:s[p]);h&&((i=h.required)!=null&&i.includes("activity")?d.push($K(p,h)):p==="policy"?d.push({...F4(p,h),label:"policy-create"}):d.push(F4(p,h)))}return{key:"steps",label:"Steps",badge:"branch",count:d.length,children:d}}function VK(e){var t,n,r,s,i;const l=on((t=e.properties)==null?void 0:t.setup);if(!l)return;const u=[];for(const p of["scheme","customer"]){const h=on((n=l.properties)==null?void 0:n[p]),x=on((r=h?.properties)==null?void 0:r.fields);if(x){const b=fa(x,`setup/${p}/fields`);u.push({key:`setup/${p}`,label:`${p} fields`,badge:"fields",count:b.length,children:b})}const v=on((s=h?.properties)==null?void 0:s.addresses),y=v?$4(`setup/${p}/addresses`,v):void 0;y&&u.push({...y,label:`${p} addresses`})}const d=on((i=l.properties)==null?void 0:i.clients),f=Object.keys(d?.properties??{});if(d&&f.length>0){const p=f.map(h=>{var x,v,y;const b=on((v=on((x=d.properties)==null?void 0:x[h]))==null?void 0:v.items),j=b?fa(b,`setup/clients/${h}`).filter(T=>T.label!=="addresses"):[],S=on((y=b?.properties)==null?void 0:y.addresses),N=S?$4(`setup/clients/${h}/addresses`,S):void 0,k=N?[...j,N]:j;return{key:`setup/clients/${h}`,label:h,badge:"clientType",count:k.length,children:k}});u.push({key:"setup/clients",label:"clients",badge:"clientTypes",count:f.length,children:p})}return{key:"setup",label:"Setup",badge:"group",count:u.length,children:u}}function HK(e){const t=new Set(["setup","steps"]),n=[];for(const[r,s]of Object.entries(H0(e)))t.has(r)||n.push(cx(r,s,"root"));return n}function ZK(e){const t=[],n=VK(e);n&&t.push(n);const r=zK(e);return r&&t.push(r),t.push(...HK(e)),t}function WK(e){var t;const[n]=e.children??[];return((t=e.children)==null?void 0:t.length)===1&&!!n?.detail}function Dg({schema:e,roots:t,buildTree:n=ZK,className:r,empty:s=o.jsx("p",{className:"p-3 text-sm text-muted-foreground",children:"This schema has no fields."}),showControls:i,toolbarClassName:l,defaultOpenDepth:u=1,renderDetail:d}){const f=w.useMemo(()=>t??n(E3(e)),[n,t,e]);return o.jsx(Qu,{className:R("text-sm",r),roots:f,getKey:p=>p.key,getChildren:p=>p.children,isSecondary:p=>!!p.detail,getSearchText:p=>p.detail?"":`${p.label} ${p.badge??""} ${p.platformType??""} ${p.ascode??""}`,defaultOpen:(p,h)=>hp.detail?"cursor-default":h?"bg-primary/10 border-l-2 border-primary":"hover:bg-accent",renderRow:({node:p})=>p.detail?o.jsx("div",{className:"min-w-0 flex-1",children:d?d(p.detail):o.jsx(QK,{meta:p.detail})}):o.jsx(KK,{node:p}),empty:s,...i!==void 0?{showControls:i}:{},...l!==void 0?{toolbarClassName:l}:{}})}const qK={branch:"bg-violet-100 text-violet-700 dark:bg-violet-950/50 dark:text-violet-200",group:"bg-violet-100 text-violet-700 dark:bg-violet-950/50 dark:text-violet-200",activity:"bg-emerald-100 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-200",clientType:"bg-sky-100 text-sky-700 dark:bg-sky-950/50 dark:text-sky-200",clientTypes:"bg-sky-100 text-sky-700 dark:bg-sky-950/50 dark:text-sky-200",fields:"bg-amber-100 text-amber-700 dark:bg-amber-950/50 dark:text-amber-200",object:"bg-muted text-muted-foreground",array:"bg-muted text-muted-foreground",string:"bg-muted text-muted-foreground",number:"bg-muted text-muted-foreground",integer:"bg-muted text-muted-foreground",boolean:"bg-muted text-muted-foreground",const:"bg-muted text-muted-foreground"};function KK({node:e}){const t=e.badge?qK[e.badge]:void 0;return o.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[o.jsx("span",{className:"shrink-0 whitespace-nowrap font-mono",children:e.label}),e.badge&&o.jsx("span",{className:R("shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",t??"bg-muted text-muted-foreground"),children:e.badge}),e.count!==void 0&&o.jsx("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] tabular-nums text-muted-foreground",children:e.count}),e.platformType&&o.jsx("span",{className:"shrink-0 rounded bg-indigo-50 px-1.5 py-0.5 text-[10px] text-indigo-700 dark:bg-indigo-950/50 dark:text-indigo-200",children:e.platformType}),e.ascode&&o.jsxs("span",{className:"shrink-0 rounded bg-rose-50 px-1.5 py-0.5 text-[10px] text-rose-700 dark:bg-rose-950/50 dark:text-rose-200",children:["code: ",e.ascode]}),e.description&&o.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:e.description})]})}const GK=12,JK=["OI","PA type"].join("");function QK({meta:e}){var t;const n=e.enumValues??[],r=n.slice(0,GK),s=n.length-r.length,i=e.location;return o.jsxs("div",{className:"my-1 space-y-2 rounded-md border border-border bg-muted/30 p-2 text-xs",children:[o.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[o.jsx(Xa,{label:JK,value:e.platformType}),o.jsx(Xa,{label:"AsCode",value:e.ascode}),o.jsx(Xa,{label:"Format",value:e.format}),o.jsx(Xa,{label:"Layout",value:e.layout}),o.jsx(Xa,{label:"Client ref",value:e.clientRef?"yes":void 0}),(t=e.annotations)==null?void 0:t.map(l=>o.jsx(Xa,{label:l.key,value:l.value},l.key))]}),e.description&&o.jsx("p",{className:"text-muted-foreground",children:e.description}),n.length>0&&o.jsxs("div",{className:"space-y-0.5",children:[o.jsxs("p",{className:"font-medium text-muted-foreground",children:["Enum (",n.length,")"]}),o.jsx("ul",{className:"max-h-48 space-y-0.5 overflow-auto",children:r.map(l=>o.jsxs("li",{children:[o.jsx("span",{className:"font-mono",children:l.value}),l.label&&o.jsxs("span",{className:"text-muted-foreground",children:[" - ",l.label]})]},l.value))}),s>0&&o.jsxs("p",{className:"text-muted-foreground",children:["+",s," more"]})]}),e.query&&o.jsxs("div",{className:"space-y-0.5",children:[o.jsx("p",{className:"font-medium text-muted-foreground",children:"Query"}),o.jsx("div",{className:"max-h-64 overflow-auto",children:o.jsx(fs,{language:"sql",source:e.query})})]}),i&&o.jsxs("div",{className:"space-y-0.5",children:[o.jsx("p",{className:"font-medium text-muted-foreground",children:"Source location"}),o.jsx("p",{className:"break-all font-mono",children:YK(i.path,i.startLine,i.endLine)})]}),e.source&&o.jsxs("div",{className:"space-y-0.5",children:[o.jsx("p",{className:"font-medium text-muted-foreground",children:"Source"}),o.jsx("div",{className:"max-h-64 overflow-auto",children:o.jsx(fs,{language:"xml",source:e.source})})]})]})}function Xa({label:e,value:t}){return t==null?null:o.jsxs(o.Fragment,{children:[o.jsx("dt",{className:"text-muted-foreground",children:e}),o.jsx("dd",{className:"break-all font-mono",children:t})]})}function YK(e,t,n){return t===void 0?e:n===void 0||n===t?`${e}:${t}`:`${e}:${t}-${n}`}const D4="Tools",B4="General",Jk={type:"object",properties:{}};function XK({tools:e,className:t}){var n;const[r,s]=w.useState(""),[i,l]=w.useState("group"),[u,d]=w.useState("schema"),[f,p]=w.useState(()=>new Set),[h,x]=w.useState(((n=e[0])==null?void 0:n.name)??null),v=r.trim().length>0,y=w.useMemo(()=>{const k=r.trim().toLowerCase();return k?e.filter(T=>[T.name,T.label,T.title,T.description,T.group,T.parent,T.entity,T.icon,T.defaultPermission,T.source,T.server,...lG(T.annotations),...T.hints??[]].filter(Boolean).some(E=>String(E).toLowerCase().includes(k))):e},[r,e]),b=e.find(k=>k.name===h)??y[0]??e[0],j=w.useMemo(()=>iG(y,i),[y,i]),S=k=>p(T=>{const E=new Set(T);return E.has(k)?E.delete(k):E.add(k),E}),N=k=>v||!f.has(k);return o.jsx("div",{className:R("min-h-0 overflow-hidden rounded-md border border-border bg-background",t),children:o.jsx(P3,{defaultSplit:34,minLeft:24,minRight:42,className:"min-h-0",leftClass:"flex min-h-0 flex-col overflow-hidden",rightClass:"min-h-0 overflow-y-auto",left:o.jsx(eG,{query:r,view:i,sections:j,active:b,filteredCount:y.length,isOpen:N,onQueryChange:s,onViewChange:l,onToggle:S,onSelect:x}),right:b?o.jsx(nG,{tool:b,tab:u,onTabChange:d}):o.jsx("div",{className:"px-3 py-8 text-center text-xs text-muted-foreground",children:"No tools"})})})}function eG({query:e,view:t,sections:n,active:r,filteredCount:s,isOpen:i,onQueryChange:l,onViewChange:u,onToggle:d,onSelect:f}){return o.jsxs(o.Fragment,{children:[o.jsxs("label",{className:"flex h-9 shrink-0 items-center gap-2 border-b border-border px-2 text-xs",children:[o.jsx(K,{icon:$s,className:"size-3.5 text-muted-foreground"}),o.jsx("input",{value:e,onChange:p=>l(p.target.value),placeholder:"Search tools",className:"min-w-0 flex-1 bg-transparent outline-none"})]}),o.jsxs("div",{className:"flex shrink-0 items-center gap-1 border-b border-border px-2 py-1",children:[o.jsx(U4,{active:t==="group",icon:zl,label:"Group",onClick:()=>u("group")}),o.jsx(U4,{active:t==="tree",icon:ij,label:"Tree",onClick:()=>u("tree")})]}),o.jsxs(TA,{className:"min-h-0 flex-1 overflow-y-auto divide-y-0",children:[n.map(p=>{const h=`p:${p.label}`,x=i(h);return o.jsxs(OA,{children:[o.jsx(MA,{className:"px-0 py-0",children:o.jsxs("button",{type:"button",onClick:()=>d(h),className:"flex w-full items-center gap-1 px-2 py-1 text-left text-[10px] font-semibold uppercase tracking-wider text-muted-foreground hover:bg-muted",children:[o.jsx(K,{icon:x?Vt:ds,className:"size-3 shrink-0"}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:p.label}),o.jsx("span",{className:"tabular-nums text-muted-foreground/70",children:p.count})]})}),x&&p.children.map(v=>{const y=`s:${p.label}///${v.label}`,b=i(y);return o.jsxs("div",{children:[o.jsxs("button",{type:"button",onClick:()=>d(y),className:"flex w-full items-center gap-1 border-b border-border bg-background px-2 py-1 pl-3 text-left text-[11px] font-medium text-foreground/80 hover:bg-accent/50",children:[o.jsx(K,{icon:b?Vt:ds,className:"size-3 shrink-0 text-muted-foreground"}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:v.label}),o.jsx("span",{className:"tabular-nums text-[10px] text-muted-foreground/70",children:v.tools.length})]}),b&&v.tools.map(j=>o.jsx(tG,{tool:j,active:r?.name===j.name,onSelect:()=>f(j.name)},j.name))]},y)})]},h)}),s===0&&o.jsx("div",{className:"px-3 py-8 text-center text-xs text-muted-foreground",children:"No matching tools"})]})]})}function tG({tool:e,active:t,onSelect:n}){return o.jsx(AA,{active:t,role:"button",tabIndex:0,"aria-selected":t,className:"px-2 py-2 pl-6",onClick:n,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),n())},children:o.jsxs("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)] gap-2",children:[e.icon?o.jsx(K,{name:e.icon,className:"mt-0.5 size-3.5 text-muted-foreground"}):o.jsx(K,{icon:q2,className:"mt-0.5 size-3.5 text-muted-foreground"}),o.jsx("span",{className:"min-w-0 truncate text-xs font-medium",children:e.label||e.name})]})})}function nG({tool:e,tab:t,onTabChange:n}){const r=Qk(e),s=w.useMemo(()=>aG(e),[e]);return o.jsxs("div",{className:"space-y-3 p-3",children:[o.jsxs("div",{className:"min-w-0 space-y-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.icon?o.jsx(K,{name:e.icon,className:"size-4 text-muted-foreground"}):o.jsx(K,{icon:Ol,className:"size-4 text-muted-foreground"}),o.jsxs("div",{className:"min-w-0 truncate text-sm font-medium",children:[e.parent?`${e.parent} `:"",e.label||e.name]}),o.jsx(rG,{strict:r})]}),e.description&&o.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:e.description})]}),o.jsxs("dl",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs",children:[o.jsx(cs,{label:"Tool ID",value:e.name,mono:!0}),o.jsx(cs,{label:"Default",value:e.defaultPermission}),o.jsx(cs,{label:"Strictness",value:r?"Strict":"Loose"}),o.jsx(cs,{label:"Icon",value:e.icon,mono:!0}),o.jsx(cs,{label:"Source",value:e.source}),o.jsx(cs,{label:"Group",value:e.group}),o.jsx(cs,{label:"Parent",value:e.parent}),o.jsx(cs,{label:"Server",value:e.server}),o.jsx(cs,{label:"Method",value:e.method}),o.jsx(cs,{label:"Path",value:e.path,mono:!0})]}),o.jsx(sG,{annotations:e.annotations}),o.jsx(oG,{annotations:e.annotations}),e.hints&&e.hints.length>0&&o.jsxs("div",{className:"rounded border border-border bg-muted/20 p-2",children:[o.jsx("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Hints"}),o.jsx("ul",{className:"space-y-1 text-xs text-muted-foreground",children:e.hints.map(i=>o.jsx("li",{children:i},i))})]})]}),o.jsx(F3,{value:t,onChange:i=>n(i),tabs:[{id:"schema",label:"Schema"},{id:"json",label:"JSON"}]}),t==="schema"?o.jsxs("div",{role:"tabpanel",className:"space-y-3",children:[o.jsx(Dg,{schema:e.inputSchema??Jk,defaultOpenDepth:2,showControls:!1}),e.outputSchema&&o.jsxs("div",{className:"border-t border-border pt-3",children:[o.jsx("div",{className:"mb-2 text-xs font-semibold",children:"Output"}),o.jsx(Dg,{schema:e.outputSchema,defaultOpenDepth:1,showControls:!1})]})]}):o.jsx("div",{role:"tabpanel",children:o.jsx(fs,{language:"json",source:JSON.stringify(s,null,2),jsonDefaultOpenDepth:2,copyable:!0})})]})}function U4({active:e,icon:t,label:n,onClick:r}){return o.jsxs("button",{type:"button",onClick:r,"aria-pressed":e,className:R("flex items-center gap-1 rounded px-2 py-0.5 text-[11px] font-medium",e?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),children:[o.jsx(K,{icon:t,className:"size-3.5"}),n]})}function rG({strict:e}){return o.jsx("span",{className:R("shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",e?"bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"bg-amber-500/10 text-amber-700 dark:text-amber-300"),title:e?"Strict input schema":"Loose input schema",children:e?"Strict":"Loose"})}function sG({annotations:e,compact:t=!1}){const n=fG(e);return n.length===0?null:o.jsx("div",{className:R("flex flex-wrap gap-1",t?"text-[9px]":"text-[10px]"),children:n.map(r=>o.jsx("span",{className:R("rounded px-1.5 py-0.5 font-medium",r.className),children:r.label},r.key))})}function oG({annotations:e}){const t=uG(e);return t.length===0?null:o.jsxs("div",{className:"rounded border border-border bg-muted/20 p-2",children:[o.jsx("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Annotations"}),o.jsx("dl",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs",children:t.map(([n,r])=>o.jsx(cs,{label:n,value:dG(r),mono:typeof r!="boolean"},n))})]})}function cs({label:e,value:t,mono:n=!1}){return t==null||t===""?null:o.jsxs(o.Fragment,{children:[o.jsx("dt",{className:"text-muted-foreground",children:e}),o.jsx("dd",{className:R("min-w-0 break-all",n&&"font-mono"),children:String(t)})]})}function iG(e,t){const n=i=>t==="group"?i.group||D4:i.parent||B4,r=i=>t==="group"?i.parent||B4:i.group||D4,s=new Map;for(const i of e){const l=n(i),u=r(i),d=s.get(l)??new Map;(d.get(u)??d.set(u,[]).get(u)).push(i),s.set(l,d)}return[...s.entries()].map(([i,l])=>{const u=[...l.entries()].map(([d,f])=>({label:d,tools:[...f].sort((p,h)=>(p.label||p.name).localeCompare(h.label||h.name))})).sort((d,f)=>d.label.localeCompare(f.label));return{label:i,count:u.reduce((d,f)=>d+f.tools.length,0),children:u}}).sort((i,l)=>i.label.localeCompare(l.label))}function Qk(e){var t;return e.strict!==void 0?e.strict:((t=e.inputSchema)==null?void 0:t.additionalProperties)===!1}function aG(e){var t;return z4({name:e.name,description:e.description??((t=e.annotations)==null?void 0:t.title)??e.title??e.label,inputSchema:e.inputSchema??Jk,outputSchema:e.outputSchema,strict:Qk(e),annotations:e.annotations,metadata:z4({label:e.label,title:e.title,icon:e.icon,group:e.group,parent:e.parent,entity:e.entity,defaultPermission:e.defaultPermission,source:e.source,server:e.server,method:e.method,path:e.path,operationName:e.operationName,preferenceKey:e.preferenceKey})})}function z4(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>!(t==null||typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0)))}function lG(e){return e?Object.entries(e).flatMap(([t,n])=>[t,cG(n)]).filter(t=>!!t):[]}function cG(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e)}function uG(e){if(!e)return[];const t=["title","readOnlyHint","destructiveHint","idempotentHint","openWorldHint"],n=new Set(t),r=t.filter(i=>e[i]!==void 0).map(i=>[i,e[i]]),s=Object.entries(e).filter(([i])=>!n.has(i));return[...r,...s]}function dG(e){return typeof e=="boolean"?e?"true":"false":typeof e=="string"||typeof e=="number"||typeof e=="bigint"?String(e):JSON.stringify(e)}function fG(e){return e?[e.readOnlyHint?{key:"readOnlyHint",label:"Read only",className:"bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"}:null,e.destructiveHint?{key:"destructiveHint",label:"Destructive",className:"bg-rose-500/10 text-rose-700 dark:text-rose-300"}:null,e.idempotentHint?{key:"idempotentHint",label:"Idempotent",className:"bg-sky-500/10 text-sky-700 dark:text-sky-300"}:null,e.openWorldHint?{key:"openWorldHint",label:"Open world",className:"bg-violet-500/10 text-violet-700 dark:text-violet-300"}:null].filter(t=>t!==null):[]}const V4=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M62 106.6V40a6 6 0 0 0-12 0v66.6a30 30 0 0 0 0 58.8V216a6 6 0 0 0 12 0v-50.6a30 30 0 0 0 0-58.8M56 154a18 18 0 1 1 18-18a18 18 0 0 1-18 18m78-95.4V40a6 6 0 0 0-12 0v18.6a30 30 0 0 0 0 58.8V216a6 6 0 0 0 12 0v-98.6a30 30 0 0 0 0-58.8m-6 47.4a18 18 0 1 1 18-18a18 18 0 0 1-18 18m102 62a30.05 30.05 0 0 0-24-29.4V40a6 6 0 0 0-12 0v98.6a30 30 0 0 0 0 58.8V216a6 6 0 0 0 12 0v-18.6a30.05 30.05 0 0 0 24-29.4m-30 18a18 18 0 1 1 18-18a18 18 0 0 1-18 18"})}),{__source:"ph:sliders-light",__viewBox:"0 0 256 256",__group:"configs-metadata",__consumerName:"sliders",displayName:"UiSliders"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M84 136a28 28 0 0 1-20 26.83V216a8 8 0 0 1-16 0v-53.17a28 28 0 0 1 0-53.66V40a8 8 0 0 1 16 0v69.17A28 28 0 0 1 84 136m52-74.83V40a8 8 0 0 0-16 0v21.17a28 28 0 0 0 0 53.66V216a8 8 0 0 0 16 0V114.83a28 28 0 0 0 0-53.66m72 80V40a8 8 0 0 0-16 0v101.17a28 28 0 0 0 0 53.66V216a8 8 0 0 0 16 0v-21.17a28 28 0 0 0 0-53.66"})}),{__source:"ph:sliders-fill",__viewBox:"0 0 256 256",__group:"configs-metadata",__consumerName:"sliders",displayName:"UiSlidersFilled"});const oa=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 42H48a14 14 0 0 0-14 14v56c0 51.94 25.12 83.4 46.2 100.64c22.73 18.6 45.27 24.89 46.22 25.15a6 6 0 0 0 3.16 0c.95-.26 23.49-6.55 46.22-25.15C196.88 195.4 222 163.94 222 112V56a14 14 0 0 0-14-14m2 70c0 37.76-13.94 68.39-41.44 91.06A131.2 131.2 0 0 1 128 225.72a131 131 0 0 1-40.56-22.66C59.94 180.39 46 149.76 46 112V56a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Z"})}),{__source:"ph:shield-light",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShield"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 56v56c0 52.72-25.52 84.67-46.93 102.19c-23.06 18.86-46 25.27-47 25.53a8 8 0 0 1-4.2 0c-1-.26-23.91-6.67-47-25.53C57.52 196.67 32 164.72 32 112V56a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16"})}),{__source:"ph:shield-fill",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M208 42H48a14 14 0 0 0-14 14v56c0 51.94 25.12 83.4 46.2 100.64c22.73 18.6 45.27 24.89 46.22 25.15a6 6 0 0 0 3.16 0c.95-.26 23.49-6.55 46.22-25.15C196.88 195.4 222 163.94 222 112V56a14 14 0 0 0-14-14m2 70c0 37.76-13.94 68.39-41.44 91.06A131.2 131.2 0 0 1 128 225.72a131 131 0 0 1-40.56-22.66C59.94 180.39 46 149.76 46 112V56a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Z"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"#16a34a",children:o.jsx("path",{d:"M12 4v16M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})})]}),{__source:"ph:shield-light + plus marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldPlus"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"#16a34a",d:"M224 56v56c0 52.72-25.52 84.67-46.93 102.19c-23.06 18.86-46 25.27-47 25.53a8 8 0 0 1-4.2 0c-1-.26-23.91-6.67-47-25.53C57.52 196.67 32 164.72 32 112V56a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"white",children:o.jsx("path",{d:"M12 4v16M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})})]}),{__source:"ph:shield-fill + plus marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldPlusFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M208 42H48a14 14 0 0 0-14 14v56c0 51.94 25.12 83.4 46.2 100.64c22.73 18.6 45.27 24.89 46.22 25.15a6 6 0 0 0 3.16 0c.95-.26 23.49-6.55 46.22-25.15C196.88 195.4 222 163.94 222 112V56a14 14 0 0 0-14-14m2 70c0 37.76-13.94 68.39-41.44 91.06A131.2 131.2 0 0 1 128 225.72a131 131 0 0 1-40.56-22.66C59.94 180.39 46 149.76 46 112V56a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Z"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"#dc2626",children:o.jsx("path",{d:"M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})})]}),{__source:"ph:shield-light + minus marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldMinus"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"#dc2626",d:"M224 56v56c0 52.72-25.52 84.67-46.93 102.19c-23.06 18.86-46 25.27-47 25.53a8 8 0 0 1-4.2 0c-1-.26-23.91-6.67-47-25.53C57.52 196.67 32 164.72 32 112V56a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"white",children:o.jsx("path",{d:"M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})})]}),{__source:"ph:shield-fill + minus marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldMinusFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M208 42H48a14 14 0 0 0-14 14v56c0 51.94 25.12 83.4 46.2 100.64c22.73 18.6 45.27 24.89 46.22 25.15a6 6 0 0 0 3.16 0c.95-.26 23.49-6.55 46.22-25.15C196.88 195.4 222 163.94 222 112V56a14 14 0 0 0-14-14m2 70c0 37.76-13.94 68.39-41.44 91.06A131.2 131.2 0 0 1 128 225.72a131 131 0 0 1-40.56-22.66C59.94 180.39 46 149.76 46 112V56a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Z"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"#16a34a",children:o.jsx("path",{d:"M5 13l4 4 10-10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})]}),{__source:"ph:shield-light + tick marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldCheck"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"#16a34a",d:"M224 56v56c0 52.72-25.52 84.67-46.93 102.19c-23.06 18.86-46 25.27-47 25.53a8 8 0 0 1-4.2 0c-1-.26-23.91-6.67-47-25.53C57.52 196.67 32 164.72 32 112V56a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"white",children:o.jsx("path",{d:"M5 13l4 4 10-10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})]}),{__source:"ph:shield-fill + tick marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldCheckFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M208 42H48a14 14 0 0 0-14 14v56c0 51.94 25.12 83.4 46.2 100.64c22.73 18.6 45.27 24.89 46.22 25.15a6 6 0 0 0 3.16 0c.95-.26 23.49-6.55 46.22-25.15C196.88 195.4 222 163.94 222 112V56a14 14 0 0 0-14-14m2 70c0 37.76-13.94 68.39-41.44 91.06A131.2 131.2 0 0 1 128 225.72a131 131 0 0 1-40.56-22.66C59.94 180.39 46 149.76 46 112V56a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Z"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"#dc2626",children:o.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})})]}),{__source:"ph:shield-light + cross marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldCross"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"#dc2626",d:"M224 56v56c0 52.72-25.52 84.67-46.93 102.19c-23.06 18.86-46 25.27-47 25.53a8 8 0 0 1-4.2 0c-1-.26-23.91-6.67-47-25.53C57.52 196.67 32 164.72 32 112V56a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"white",children:o.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})})]}),{__source:"ph:shield-fill + cross marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldCrossFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M208 42H48a14 14 0 0 0-14 14v56c0 51.94 25.12 83.4 46.2 100.64c22.73 18.6 45.27 24.89 46.22 25.15a6 6 0 0 0 3.16 0c.95-.26 23.49-6.55 46.22-25.15C196.88 195.4 222 163.94 222 112V56a14 14 0 0 0-14-14m2 70c0 37.76-13.94 68.39-41.44 91.06A131.2 131.2 0 0 1 128 225.72a131 131 0 0 1-40.56-22.66C59.94 180.39 46 149.76 46 112V56a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Z"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"#d97706",children:o.jsx("path",{d:"M6 4h12v3l-5 5 5 5v3H6v-3l5-5-5-5V4z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})})]}),{__source:"ph:shield-light + hourglass marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldPending"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"#d97706",d:"M224 56v56c0 52.72-25.52 84.67-46.93 102.19c-23.06 18.86-46 25.27-47 25.53a8 8 0 0 1-4.2 0c-1-.26-23.91-6.67-47-25.53C57.52 196.67 32 164.72 32 112V56a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"white",children:o.jsx("path",{d:"M6 4h12v3l-5 5 5 5v3H6v-3l5-5-5-5V4z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})})]}),{__source:"ph:shield-fill + hourglass marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldPendingFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M208 42H48a14 14 0 0 0-14 14v56c0 51.94 25.12 83.4 46.2 100.64c22.73 18.6 45.27 24.89 46.22 25.15a6 6 0 0 0 3.16 0c.95-.26 23.49-6.55 46.22-25.15C196.88 195.4 222 163.94 222 112V56a14 14 0 0 0-14-14m2 70c0 37.76-13.94 68.39-41.44 91.06A131.2 131.2 0 0 1 128 225.72a131 131 0 0 1-40.56-22.66C59.94 180.39 46 149.76 46 112V56a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Z"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"#d97706",children:o.jsx("path",{d:"M12 7v6M12 16v.01",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})})]}),{__source:"ph:shield-light + warning marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldWarning"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"#d97706",d:"M224 56v56c0 52.72-25.52 84.67-46.93 102.19c-23.06 18.86-46 25.27-47 25.53a8 8 0 0 1-4.2 0c-1-.26-23.91-6.67-47-25.53C57.52 196.67 32 164.72 32 112V56a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"white",children:o.jsx("path",{d:"M12 7v6M12 16v.01",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})})]}),{__source:"ph:shield-fill + warning marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldWarningFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M208 42H48a14 14 0 0 0-14 14v56c0 51.94 25.12 83.4 46.2 100.64c22.73 18.6 45.27 24.89 46.22 25.15a6 6 0 0 0 3.16 0c.95-.26 23.49-6.55 46.22-25.15C196.88 195.4 222 163.94 222 112V56a14 14 0 0 0-14-14m2 70c0 37.76-13.94 68.39-41.44 91.06A131.2 131.2 0 0 1 128 225.72a131 131 0 0 1-40.56-22.66C59.94 180.39 46 149.76 46 112V56a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Z"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"#0ea5e9",children:o.jsx("path",{d:"M12 8.5v.01M11 12h1v5h1",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})]}),{__source:"ph:shield-light + info marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldInfo"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"#0ea5e9",d:"M224 56v56c0 52.72-25.52 84.67-46.93 102.19c-23.06 18.86-46 25.27-47 25.53a8 8 0 0 1-4.2 0c-1-.26-23.91-6.67-47-25.53C57.52 196.67 32 164.72 32 112V56a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16"}),o.jsx("g",{transform:"translate(64.000 64.000) scale(5.3333)",color:"white",children:o.jsx("path",{d:"M12 8.5v.01M11 12h1v5h1",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})]}),{__source:"ph:shield-fill + info marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"shield",displayName:"UiShieldInfoFilled"});const b1=["auto","ask","off","on"],mG={on:"On",auto:"Auto",ask:"Ask",off:"Off"},pG={on:"Always allow this tool to run automatically.",auto:"Use the backend's default permission policy.",ask:"Ask before running this tool.",off:"Hide this tool from the model."};function Yk({mode:e}){return o.jsx("span",{className:R("shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",e==="on"&&"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",e==="auto"&&"bg-sky-500/10 text-sky-600 dark:text-sky-400",e==="ask"&&"bg-amber-500/10 text-amber-600 dark:text-amber-500",e==="off"&&"text-muted-foreground"),title:pG[e],children:mG[e]})}function hG({group:e,count:t,collapsed:n,mode:r,onCollapseToggle:s,onModeToggle:i}){return o.jsxs("div",{className:"grid grid-cols-[1.25rem_minmax(0,1fr)] items-center gap-1 px-1 py-0.5",children:[o.jsx("button",{type:"button","aria-label":`${n?"Expand":"Collapse"} ${e}`,title:`${n?"Expand":"Collapse"} ${e}`,className:"inline-flex size-5 items-center justify-center rounded text-muted-foreground hover:bg-background hover:text-foreground",onClick:s,children:o.jsx(K,{icon:n?ds:Vt,className:"size-3.5"})}),o.jsxs("button",{type:"button","aria-label":`Toggle ${e} group`,title:`Cycle all ${t} ${t===1?"tool":"tools"} in ${e}`,className:"flex min-w-0 items-center gap-1.5 rounded px-1 py-0.5 text-left hover:bg-background/70",onClick:i,children:[o.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[o.jsx("span",{className:"min-w-0 truncate text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:e}),o.jsx("span",{className:"shrink-0 rounded bg-background px-1 text-[10px] text-muted-foreground",children:t})]}),o.jsx("span",{className:"shrink-0",children:o.jsx(Yk,{mode:r})})]})]})}function gG({entry:e,mode:t,onToggle:n}){return o.jsxs("button",{type:"button",className:"flex w-full items-center justify-between gap-2 rounded px-1.5 py-0.5 text-left hover:bg-accent",title:e.tool.name,onClick:()=>n(e,t),children:[o.jsx("span",{className:R("min-w-0 truncate text-xs",t==="off"&&"text-muted-foreground line-through"),children:e.label}),o.jsx(Yk,{mode:t})]})}function Xk({groups:e,value:t,onChange:n,emptyLabel:r="No tools available"}){const[s,i]=w.useState({});if(e.length===0)return o.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:r});const l=f=>i(p=>({...p,[f]:!p[f]})),u=(f,p)=>n({...t,[f.key]:H4(p)}),d=(f,p)=>{const h=H4(p),x={...t};for(const v of f)x[v.key]=h;n(x)};return o.jsx("div",{className:"space-y-1",children:e.map(([f,p])=>{const h=s[f]??!1,x=NG(p,t);return o.jsxs("div",{children:[o.jsx(hG,{group:f,count:p.length,collapsed:h,mode:x,onCollapseToggle:()=>l(f),onModeToggle:()=>d(p,x)}),!h&&o.jsx("div",{className:"p-0.5",children:p.map(v=>o.jsx(gG,{entry:v,mode:eN(v,t),onToggle:u},v.key))})]},f)})})}function xG({tools:e,value:t,onChange:n,models:r=[],model:s,onModelChange:i,reasoningEfforts:l=["low","medium","high"],reasoningEffort:u="",onReasoningEffortChange:d,permissionMode:f="default",onPermissionModeChange:p,temperature:h,onTemperatureChange:x,budget:v,onBudgetChange:y,usage:b,toolsLoading:j=!1,toolsError:S=null,className:N=""}){const[k,T]=w.useState(!1),[E,O]=w.useState("config"),M=w.useMemo(()=>wG(e),[e]);return o.jsxs(o.Fragment,{children:[o.jsx(Fl,{align:"right",className:N,menuClassName:"w-72 max-h-[70vh] overflow-y-auto p-1",trigger:o.jsx(Fe,{variant:"ghost",size:"icon",title:"Tool preferences","data-testid":"tool-preferences-btn",children:o.jsx(K,{icon:V4,className:"size-4"})}),children:L=>o.jsxs("div",{children:[o.jsx("div",{className:"mb-1 px-1 text-xs font-semibold",children:"Tool Preferences"}),o.jsx(Xk,{groups:M,value:t,onChange:n,emptyLabel:"No tools available"}),o.jsx("div",{className:"mt-2 border-t border-border pt-2",children:o.jsx("button",{type:"button",className:"w-full rounded px-2 py-1.5 text-left text-xs hover:bg-accent",onClick:()=>{L(),T(!0)},children:"Advanced"})})]})}),o.jsx(yi,{open:k,onClose:()=>T(!1),title:"Advanced Chat Settings",size:"xl",children:o.jsxs("div",{className:"flex h-[70vh] min-h-0 flex-col gap-3",children:[o.jsxs("div",{className:"flex items-center gap-1 rounded border border-border bg-muted/30 p-1",children:[["config","permissions","browser"].map(L=>o.jsxs("button",{type:"button",className:R("inline-flex h-8 items-center gap-1.5 rounded px-3 text-xs font-medium capitalize",E===L?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:bg-background/60"),onClick:()=>O(L),children:[o.jsx(K,{icon:L==="config"?V4:L==="permissions"?oa:Ol,className:"size-3.5"}),L]},L)),o.jsx("div",{className:"flex-1"}),j&&o.jsx("span",{className:"pr-2 text-[11px] text-muted-foreground",children:"Loading tools"}),S&&o.jsx("span",{className:"pr-2 text-[11px] text-destructive",children:S})]}),E==="config"?o.jsx(vG,{models:r,model:s,onModelChange:i,reasoningEfforts:l,reasoningEffort:u,onReasoningEffortChange:d,permissionMode:f,onPermissionModeChange:p,temperature:h,onTemperatureChange:x,budget:v,onBudgetChange:y,usage:b}):E==="permissions"?o.jsx(yG,{groups:M,value:t,onChange:n}):o.jsx(XK,{tools:e,className:"min-h-0 flex-1"})]})})]})}function vG({models:e,model:t,onModelChange:n,reasoningEfforts:r,reasoningEffort:s,onReasoningEffortChange:i,permissionMode:l,onPermissionModeChange:u,temperature:d,onTemperatureChange:f,budget:p,onBudgetChange:h,usage:x}){const v=(y,b)=>{const j={...p},S=W4(b,y==="maxTokens");S===void 0?delete j[y]:j[y]=S,h?.(j)};return o.jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)_minmax(18rem,24rem)] gap-4 overflow-y-auto",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsxs("section",{className:"space-y-3",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Model"}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx(Om,{models:e,value:t,onChange:y=>n?.(y),className:"w-64"}),o.jsx(Mm,{efforts:r,value:s,onChange:y=>i?.(y),className:"w-44"})]}),o.jsxs("label",{className:"grid max-w-md grid-cols-[9rem_minmax(0,1fr)] items-center gap-3 text-xs",children:[o.jsx("span",{className:"text-muted-foreground",children:"Permission mode"}),o.jsx("select",{"aria-label":"Permission mode",value:l,onChange:y=>u?.(y.target.value),className:"h-8 rounded border border-border bg-background px-2 text-xs",children:uU.map(y=>o.jsx("option",{value:y.value,title:y.description,children:y.label},y.value))})]})]}),o.jsxs("section",{className:"space-y-3",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Generation"}),o.jsxs("label",{className:"grid grid-cols-[8rem_minmax(0,1fr)_4rem] items-center gap-3 text-xs",children:[o.jsx("span",{className:"text-muted-foreground",children:"Temperature"}),o.jsx("input",{type:"range",min:0,max:2,step:.1,value:d??0,onChange:y=>f?.(Number(y.target.value))}),o.jsx("input",{type:"number",min:0,max:2,step:.1,value:d??"",onChange:y=>f?.(W4(y.target.value)),className:"h-8 rounded border border-border bg-background px-2 text-xs"})]})]}),o.jsxs("section",{className:"space-y-3",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Budget"}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("label",{className:"space-y-1 text-xs",children:[o.jsx("span",{className:"text-muted-foreground",children:"Max cost"}),o.jsx("input",{type:"number",min:0,step:.01,value:p?.cost??"",onChange:y=>v("cost",y.target.value),className:"h-8 w-full rounded border border-border bg-background px-2 text-xs"})]}),o.jsxs("label",{className:"space-y-1 text-xs",children:[o.jsx("span",{className:"text-muted-foreground",children:"Max tokens"}),o.jsx("input",{type:"number",min:0,step:1,value:p?.maxTokens??"",onChange:y=>v("maxTokens",y.target.value),className:"h-8 w-full rounded border border-border bg-background px-2 text-xs"})]})]})]})]}),o.jsx(bG,{usage:x})]})}function bG({usage:e}){const t=e?.usage,n=e?.costBreakdown;return o.jsxs("aside",{className:"space-y-3 border-l border-border pl-4",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Usage"}),o.jsxs("div",{className:"overflow-hidden rounded border border-border",children:[o.jsx(jr,{label:"Context",value:`${qo(e?.usedTokens)} / ${qo(e?.maxTokens)}`}),o.jsx(jr,{label:"Input tokens",value:qo(t?.inputTokens)}),o.jsx(jr,{label:"Output tokens",value:qo(t?.outputTokens)}),o.jsx(jr,{label:"Reasoning tokens",value:qo(t?.reasoningTokens)}),o.jsx(jr,{label:"Cache read tokens",value:qo(t?.cacheReadTokens)}),o.jsx(jr,{label:"Cache write tokens",value:qo(t?.cacheWriteTokens)}),o.jsx(jr,{label:"Total tokens",value:qo(t?.totalTokens)})]}),o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Cost"}),o.jsxs("div",{className:"overflow-hidden rounded border border-border",children:[o.jsx(jr,{label:"Input",value:el(n?.inputUsd)}),o.jsx(jr,{label:"Output",value:el(n?.outputUsd)}),o.jsx(jr,{label:"Reasoning",value:el(n?.reasoningUsd)}),o.jsx(jr,{label:"Cache read",value:el(n?.cacheReadUsd)}),o.jsx(jr,{label:"Cache write",value:el(n?.cacheWriteUsd)}),o.jsx(jr,{label:"Thread total",value:el(e?.cost??n?.totalUsd),strong:!0})]})]})}function jr({label:e,value:t,strong:n=!1}){return o.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-3 border-b border-border px-2 py-1.5 text-xs last:border-b-0",children:[o.jsx("span",{className:"truncate text-muted-foreground",children:e}),o.jsx("span",{className:R("font-mono",n&&"font-semibold text-foreground"),children:t})]})}function yG({groups:e,value:t,onChange:n}){return o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto rounded border border-border p-1",children:o.jsx(Xk,{groups:e,value:t,onChange:n,emptyLabel:"No tools"})})}function wG(e){const t={};for(const n of e){const r=jG(n),s={key:n.name,label:n.label||n.name,group:r,tool:n,defaultPermission:kG(n)};(t[r]??(t[r]=[])).push(s)}return Object.entries(t).map(([n,r])=>[n,[...r].sort((s,i)=>s.label.localeCompare(i.label))]).sort(([n],[r])=>n.localeCompare(r))}function _G(e){switch(e.trim().toLowerCase()){case"on":case"enabled":return"on";case"auto":return"auto";case"ask":return"ask";case"off":case"disabled":return"off";default:return}}function jG(e){return e.group??"Tools"}function kG(e){return e.defaultPermission??"auto"}function eN(e,t){return _G(t[e.key]??"")??e.defaultPermission}function NG(e,t){return e.reduce((n,r)=>CG(n,eN(r,t)),"on")}function H4(e){const t=b1.indexOf(e);return b1[((t>=0?t:0)+1)%b1.length]}function CG(e,t){return Z4(e)>=Z4(t)?e:t}function Z4(e){switch(e){case"on":return 0;case"auto":return 1;case"ask":return 2;case"off":return 3}}function W4(e,t=!1){if(e.trim()==="")return;const n=Number(e);if(Number.isFinite(n))return t?Math.max(0,Math.trunc(n)):n}function qo(e){return e==null||!Number.isFinite(e)?"-":new Intl.NumberFormat().format(e)}function el(e){return e==null||!Number.isFinite(e)?"-":`$${e.toFixed(e>=1?4:6)}`}function SG(e){return e.length===0?"":`Context: +${e.map(n=>{const r=Object.entries(n.fields??{}).filter(([,s])=>s!=null&&s!=="").map(([s,i])=>`${s}: ${i}`).join(", ");return r?`[${n.type}] ${n.label} (${r})`:`[${n.type}] ${n.label}`}).join(` +`)} + +`}function EG({base:e,contextItems:t,tools:n,toolPrefs:r}){return{...e,...t.length?{context:SG(t),contextItems:t}:{},...n?{toolPreferences:r??{}}:{}}}const tN="clicky-ui.chat-window.preferences",TG=[],OG=` +.chat-maximized .react-draggable { + transform: none !important; + width: auto !important; + height: auto !important; + inset: 0 !important; + position: absolute !important; +}`;function MG({panel:e,chat:t,title:n="Assistant",threadsApi:r="/api/chat/threads",threadsSource:s,contextTypeConfig:i,tools:l,defaultToolMode:u="ask",toolsApi:d="/api/chat/tools",headerExtras:f}){const{updatePanel:p,closePanel:h,bringToFront:x,maximizePanel:v,openPanel:y}=id(),[b,j]=w.useState(null),[S]=w.useState(()=>AG()),N=e.initialModel??t?.model??t?.defaultModel??S.model,[k,T]=w.useState(N),[E,O]=w.useState(t?.reasoningEffort??t?.defaultReasoningEffort??S.reasoningEffort??""),[M,L]=w.useState(t?.temperature??S.temperature),[F,U]=w.useState(t?.budget??S.budget??{}),[z,V]=w.useState(t?.permissionMode??S.permissionMode??"default"),[X,H]=w.useState(null),[B,W]=w.useState(S.toolPrefs??{}),[se,P]=w.useState(void 0),[J,ne]=w.useState(!1),[$,Q]=w.useState(null),[ae,ie]=w.useState([]),de=l??se??TG,ge=t?.modelsApi===void 0?"/api/chat/models":t.modelsApi,ve=t?.models??ae;w.useEffect(()=>{t?.model!==void 0&&T(t.model)},[t?.model]),w.useEffect(()=>{t?.model!==void 0||e.initialModel||t?.defaultModel&&T(t.defaultModel)},[t?.defaultModel,t?.model,e.initialModel]),w.useEffect(()=>{t?.reasoningEffort!==void 0&&O(t.reasoningEffort)},[t?.reasoningEffort]),w.useEffect(()=>{t?.temperature!==void 0&&L(t.temperature)},[t?.temperature]),w.useEffect(()=>{t?.budget!==void 0&&U(t.budget)},[t?.budget]),w.useEffect(()=>{t?.permissionMode!==void 0&&V(t.permissionMode)},[t?.permissionMode]),w.useEffect(()=>{e.initialModel&&T(e.initialModel)},[e.initialModel]),w.useEffect(()=>{if(l||d===null)return;let _e=!0;return ne(!0),Q(null),fetch(d).then(be=>be.ok?be.json():Promise.reject(new Error(`tools ${be.status}`))).then(be=>{_e&&P(RG(be))}).catch(be=>{_e&&Q(be instanceof Error?be.message:String(be))}).finally(()=>{_e&&ne(!1)}),()=>{_e=!1}},[l,d]),w.useEffect(()=>{if(t?.models||!ge)return;let _e=!0;return fetch(ge).then(be=>be.ok?be.json():Promise.reject(new Error(`models ${be.status}`))).then(be=>{_e&&(ie(be),T(Ce=>{var Te;return Ce??((Te=be.find(Y=>Y.configured!==!1))==null?void 0:Te.id)}))}).catch(be=>console.warn("clicky-ui: failed to load chat models",be)),()=>{_e=!1}},[t?.models,ge]),w.useEffect(()=>{LG({...k?{model:k}:{},...E?{reasoningEffort:E}:{},...M!==void 0?{temperature:M}:{},...F.cost!==void 0||F.maxTokens!==void 0?{budget:F}:{},permissionMode:z,toolPrefs:B})},[F,k,z,E,M,B]),w.useEffect(()=>{de.length&&W(_e=>{const be={..._e};let Ce=!1;for(const Te of de){const Y=Te.name;be[Y]===void 0&&(be[Y]=Te.defaultPermission??u,Ce=!0)}return Ce?be:_e})},[u,de]),w.useEffect(()=>{let _e=!0;return Rt(()=>import("./index-DAs1rq5_.js"),__vite__mapDeps([14,15])).then(be=>{_e&&j(()=>be.Rnd)}),()=>{_e=!1}},[]);const Le=w.useCallback(_e=>p(e.id,{contextItems:e.contextItems.filter(be=>be.id!==_e)}),[p,e.id,e.contextItems]),je=EG({base:t?.body,contextItems:e.contextItems,tools:de,toolPrefs:B}),Ue=e.initialPrompt??t?.initialPrompt??null,we=e.initialModel??t?.defaultModel,ke=w.useCallback(()=>{var _e;e.initialPrompt&&p(e.id,{initialPrompt:null}),(_e=t?.onInitialPromptSent)==null||_e.call(t)},[t,e.id,e.initialPrompt,p]),Ne=w.useCallback(_e=>{var be;H(_e),(be=t?.onUsage)==null||be.call(t,_e)},[t]),xe=w.useCallback(_e=>{var be;T(_e),(be=t?.onModelChange)==null||be.call(t,_e)},[t]),Re=w.useCallback(_e=>{var be;O(_e),(be=t?.onReasoningEffortChange)==null||be.call(t,_e)},[t]),et=w.useCallback(_e=>{var be;V(_e),(be=t?.onPermissionModeChange)==null||be.call(t,_e)},[t]),Ve=o.jsxs("div",{className:"chat-drag-handle flex cursor-move items-center gap-1 border-b border-border bg-muted/40 px-2 py-1.5",children:[s!=null||r!==null?o.jsx(yK,{threadId:e.threadId,onSelect:_e=>p(e.id,{threadId:_e}),onNew:()=>p(e.id,{threadId:null}),...s?{source:s}:r!==null?{api:r}:{}}):o.jsx("span",{className:"px-1 text-sm font-medium",children:n}),o.jsx("div",{className:"flex-1"}),f,o.jsx(xG,{tools:de,value:B,onChange:W,models:ve,model:k,onModelChange:xe,reasoningEfforts:t?.reasoningEfforts??["low","medium","high"],reasoningEffort:E,onReasoningEffortChange:Re,permissionMode:z,onPermissionModeChange:et,temperature:M,onTemperatureChange:L,budget:F,onBudgetChange:U,usage:X,toolsLoading:J,toolsError:$}),o.jsx(Fe,{variant:"ghost",size:"icon",title:"New window",onClick:()=>y(),children:o.jsx(K,{icon:pr,className:"size-4"})}),o.jsx(Fe,{variant:"ghost",size:"icon",title:e.maximized?"Restore":"Maximize",onClick:()=>v(e.id),children:o.jsx(K,{icon:L2,className:"size-4"})}),o.jsx(Fe,{variant:"ghost",size:"icon",title:"Close",onClick:()=>h(e.id),children:o.jsx(K,{icon:Tn,className:"size-4"})})]}),st=o.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-lg border border-border bg-background shadow-xl",children:[Ve,o.jsx(kK,{items:e.contextItems,onRemove:Le,...i?{typeConfig:i}:{}}),o.jsx("div",{className:"min-h-0 flex-1",children:o.jsx(bK,{...t,...ve.length?{models:ve,modelsApi:null}:{},...we?{defaultModel:we}:{},...k?{model:k}:{},reasoningEffort:E,permissionMode:z,onModelChange:xe,onReasoningEffortChange:Re,...M!==void 0?{temperature:M}:{},budget:F,onUsage:Ne,...e.threadId?{threadId:e.threadId}:{},body:je,initialPrompt:Ue,onInitialPromptSent:ke})})]}),Ie=R("fixed pointer-events-none",e.maximized?"inset-4 chat-maximized":"inset-0");return b?o.jsxs("div",{className:Ie,style:{zIndex:e.zIndex},children:[o.jsx("style",{children:OG}),o.jsx(b,{default:{x:e.x,y:e.y,width:e.width,height:e.height},style:{pointerEvents:"auto"},minWidth:360,minHeight:400,bounds:"parent",dragHandleClassName:"chat-drag-handle",disableDragging:e.maximized,enableResizing:!e.maximized,onDragStart:()=>x(e.id),onDragStop:(_e,be)=>p(e.id,{x:be.x,y:be.y}),onResizeStop:(_e,be,Ce,Te,Y)=>p(e.id,{width:Ce.offsetWidth,height:Ce.offsetHeight,x:Y.x,y:Y.y}),children:st})]}):o.jsx("div",{className:Ie,style:{zIndex:e.zIndex},children:o.jsx("div",{className:"pointer-events-auto h-full",style:e.maximized?{position:"relative",width:"100%",height:"100%"}:{position:"absolute",left:e.x,top:e.y,width:e.width,height:e.height},children:st})})}function AG(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(tN);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object")return{};const{toolPrefs:n,...r}=t,s=DG(n);return{...r,...s?{toolPrefs:s}:{}}}catch{return{}}}function LG(e){if(!(typeof window>"u"))try{window.localStorage.setItem(tN,JSON.stringify(e))}catch{}}function RG(e){return(Array.isArray(e)?e:e&&typeof e=="object"&&Array.isArray(e.tools)?e.tools:[]).flatMap(n=>PG(n))}function PG(e){if(!e||typeof e!="object")return[];const t=e,n=$n(t.name);if(!n)return[];const r=$n(t.label)??$n(t.title)??$n(t.operationName)??n,s=nN(t.defaultPermission??t.defaultMode),i=$n(t.group),l=$n(t.parent),u=$n(t.entity),d=$n(t.preferenceKey),f=$n(t.icon),p=$n(t.description),h=IG(t.hints),x=$n(t.source),v=$n(t.server),y=$n(t.method),b=$n(t.path),j=$n(t.operationName),S=$n(t.title),N=$G(t.strict),k=FG(t.annotations),T=q4(t.inputSchema),E=q4(t.outputSchema);return[{name:n,label:r,...i?{group:i}:{},...l?{parent:l}:{},...u?{entity:u}:{},...d?{preferenceKey:d}:{},...s?{defaultPermission:s}:{},...f?{icon:f}:{},...p?{description:p}:{},...h?{hints:h}:{},...x?{source:x}:{},...v?{server:v}:{},...y?{method:y}:{},...b?{path:b}:{},...j?{operationName:j}:{},...S?{title:S}:{},...N!==void 0?{strict:N}:{},...k?{annotations:k}:{},...T?{inputSchema:T}:{},...E?{outputSchema:E}:{}}]}function $n(e){return typeof e=="string"&&e.trim()?e:void 0}function IG(e){if(!Array.isArray(e))return;const t=e.filter(n=>typeof n=="string"&&n.trim().length>0);return t.length>0?t:void 0}function q4(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return e}function $G(e){return typeof e=="boolean"?e:void 0}function FG(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return e}function DG(e){if(!e||typeof e!="object"||Array.isArray(e))return;const t={};for(const[n,r]of Object.entries(e)){const s=nN(r);n&&s&&(t[n]=s)}return Object.keys(t).length?t:void 0}function nN(e){if(typeof e=="string")switch(e.trim().toLowerCase()){case"on":case"enabled":return"on";case"ask":return"ask";case"off":case"disabled":return"off";case"auto":return"auto";default:return}}function BG(e){const{panels:t}=id();return o.jsx(o.Fragment,{children:t.map(n=>o.jsx(MG,{panel:n,...e},n.id))})}function UG({storageId:e="default",children:t}){const[n,r]=w.useState([]),s=w.useRef(!1),i=w.useRef(null);w.useEffect(()=>{if(s.current)return;s.current=!0;const b=mU(e);b.length>0&&r(b)},[e]);const l=w.useCallback(b=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>pU(e,b),1e3)},[e]);w.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const u=w.useCallback(b=>{const j=typeof window<"u"?window.innerWidth:1200,S=typeof window<"u"?window.innerHeight:800;return{x:Math.max(40,j-zw-16-b*Hw),y:Math.max(40,S-Vw-16-b*Hw)}},[]),d=w.useCallback(b=>{const j=gU();return r(S=>{if(S.length>=fU)return S;const N=u(S.length),k={id:j,threadId:b?.threadId??null,initialModel:b?.initialModel??null,x:N.x,y:N.y,width:zw,height:Vw,zIndex:J2,maximized:!1,initialPrompt:b?.initialPrompt??null,contextItems:b?.contextItems??[]},T=c1([...S,k],j);return l(T),T}),j},[u,l]),f=w.useCallback(b=>{r(j=>{const S=j.filter(N=>N.id!==b);return l(S),S})},[l]),p=w.useCallback((b,j)=>{r(S=>{const N=S.map(k=>k.id===b?{...k,...j}:k);return l(N),N})},[l]),h=w.useCallback(b=>{r(j=>c1(j,b))},[]),x=w.useCallback(b=>{r(j=>{const S=j.find(E=>E.id===b);if(!S)return j;const N=!S.maximized,k=j.map(E=>E.id===b?{...E,maximized:N}:N&&E.maximized?{...E,maximized:!1}:E),T=c1(k,b);return l(T),T})},[l]),v=w.useCallback(b=>{var j;const S=n[n.length-1];if(!S)return d(b);const N={};return b?.initialPrompt&&(N.initialPrompt=b.initialPrompt),(j=b?.contextItems)!=null&&j.length&&(N.contextItems=[...S.contextItems,...b.contextItems.filter(k=>!S.contextItems.some(T=>T.id===k.id))]),p(S.id,N),h(S.id),S.id},[n,d,p,h]),y={panels:n,openPanel:d,closePanel:f,updatePanel:p,bringToFront:h,maximizePanel:x,findOrCreatePanel:v};return o.jsx(fj.Provider,{value:y,children:t})}const zG="h-control-h w-full rounded-md border border-border bg-background px-density-2 text-sm outline-none focus:ring-2 focus:ring-ring";function _t({label:e,hint:t,children:n}){return o.jsxs("label",{className:"block min-w-0 space-y-1 text-xs text-muted-foreground",children:[o.jsxs("span",{children:[e,t&&o.jsxs("span",{className:"text-muted-foreground/70",children:[" (",t,")"]})]}),n]})}function xn({value:e,onChange:t,placeholder:n,ariaLabel:r,icon:s,mono:i=!1}){return o.jsx(Gu,{"aria-label":r,value:e??"",onChange:t,placeholder:n,prefix:s?o.jsx(K,{icon:s,className:"size-4 text-muted-foreground/70"}):void 0,inputClassName:R(i&&"font-mono text-xs"),className:"bg-background"})}function rN({value:e,onChange:t,ariaLabel:n,children:r}){return o.jsx("select",{"aria-label":n,value:e,onChange:s=>t(s.target.value),className:zG,children:r})}function K4({onClick:e,children:t,ariaLabel:n}){return o.jsx("button",{type:"button","aria-label":n,onClick:e,className:"inline-flex h-control-h items-center gap-1 rounded-md border border-border bg-background px-density-2 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground",children:t})}function dl({label:e,value:t,onChange:n,min:r,max:s,step:i,icon:l,integer:u=!1}){return o.jsx(_t,{label:e,children:o.jsx(Gu,{type:"number","aria-label":e,value:t==null?"":String(t),min:r,max:s,step:i,onChange:d=>n(ZG(d,u)),prefix:l?o.jsx(K,{icon:l,className:"size-4 text-muted-foreground/70"}):void 0,className:"bg-background"})})}function VG({label:e,value:t,onChange:n,minHeight:r=76,placeholder:s,icon:i}){return o.jsx(_t,{label:e,children:o.jsx(Gu,{as:"textarea","aria-label":e,value:t??"",onChange:n,placeholder:s,spellCheck:!1,style:{minHeight:r},prefix:i?o.jsx(K,{icon:i,className:"mt-1 size-4 text-muted-foreground/70"}):void 0,inputClassName:"font-mono text-xs",className:"bg-background"})})}function y1({label:e,value:t,onChange:n,placeholder:r,icon:s}){const[i,l]=w.useState(!1);return o.jsx(_t,{label:e,children:o.jsx(Gu,{as:"textarea","aria-label":e,rows:1,value:t??"",onChange:n,onFocus:()=>l(!0),onBlur:()=>l(!1),placeholder:r,spellCheck:!1,prefix:s?o.jsx(K,{icon:s,className:R("size-4 text-muted-foreground/70",i?"mt-1":void 0)}):void 0,inputClassName:R("font-mono text-xs transition-[height]",i?"h-24 resize-y overflow-auto whitespace-pre-wrap":"h-5 resize-none overflow-hidden whitespace-nowrap leading-5"),className:R("bg-background",i?void 0:"h-control-h items-center py-0")})})}function HG({label:e,value:t,onChange:n,placeholder:r,icon:s}){return o.jsx(VG,{label:e,value:t?.join(` +`)??"",onChange:i=>n(i.split(/\r?\n/).map(l=>l.trim()).filter(Boolean)),minHeight:64,placeholder:r,icon:s})}function io({label:e,checked:t,onChange:n,icon:r}){return o.jsx(x2,{checked:!!t,onChange:n,className:"min-h-control-h py-density-1",label:o.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2 text-xs text-muted-foreground",children:[r&&o.jsx(K,{icon:r,className:"size-3.5 shrink-0 text-muted-foreground/70"}),o.jsx("span",{className:"min-w-0 truncate",children:e})]})})}function sN({label:e="Advanced",hint:t,children:n,defaultOpen:r=!1}){const[s,i]=w.useState(r);return o.jsxs("div",{className:"mt-density-3 border-t border-dashed border-border pt-density-2",children:[o.jsxs("button",{type:"button","aria-expanded":s,onClick:()=>i(l=>!l),className:"inline-flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground",children:[o.jsx(K,{icon:s?Vt:ds,className:"size-3.5"}),o.jsx("span",{children:e}),t&&o.jsxs("span",{className:"font-normal text-muted-foreground/70",children:["· ",t]})]}),s&&o.jsx("div",{className:"pt-density-2",children:n})]})}function ZG(e,t){if(e.trim()==="")return;const n=Number(e);if(Number.isFinite(n))return t?Math.max(0,Math.trunc(n)):n}function Bn(e,t){return{...e,...t}}function Z0(e,t,n){const r={...e};return n===void 0||n===""?delete r[t]:r[t]=n,r}function e0(e,t){return Bn(e,{prompt:{...e.prompt,...t}})}function Pf(e,t,n){const r={...e.budget};return n===void 0||n===""?delete r[t]:r[t]=n,Bn(e,{budget:r})}function Hc(e,t){return Bn(e,{memory:{...e.memory,...t}})}function WG(e,t){return Bn(e,{permissions:{...e.permissions,...t}})}function Tu(e,t){return Bn(e,{setup:{...e.setup,...t}})}function us(e,t){var n;return Tu(e,{checkout:{...(n=e.setup)==null?void 0:n.checkout,...t}})}function Xi(e,t){var n,r;return us(e,{worktree:{...(r=(n=e.setup)==null?void 0:n.checkout)==null?void 0:r.worktree,...t}})}function oN(e,t){var n,r;return us(e,{dirty:{...(r=(n=e.setup)==null?void 0:n.checkout)==null?void 0:r.dirty,...t}})}function w1(e,t){var n;return Bn(e,{workflow:{...e.workflow,verify:{...(n=e.workflow)==null?void 0:n.verify,...t}}})}function _1(e,t){var n;return Bn(e,{workflow:{...e.workflow,finalize:{...(n=e.workflow)==null?void 0:n.finalize,...t}}})}function qG(e,t){return t==="none"?us(e,{mode:t,url:"",path:"",connection:"",ref:"",depth:0}):t==="local"?us(e,{mode:t,url:"",connection:""}):us(e,{mode:t,path:""})}function KG(e,t){return t==="none"?Xi(e,{mode:t,prefix:"",base:"",path:"",keep:!1}):t==="existing"?Xi(e,{mode:t,prefix:"",base:"",keep:!1}):Xi(e,{mode:t})}function GG(e,t){return oN(e,t==="none"?{stash:t,since:""}:{stash:t})}function JG(e){var t;const n=(t=e.setup)==null?void 0:t.checkout;return n?.mode==="remote"?"remote":n?.mode==="local"||n?.path?"local":"none"}function QG(e){var t,n,r;const s=(r=(n=(t=e.setup)==null?void 0:t.checkout)==null?void 0:n.worktree)==null?void 0:r.mode;return s==="existing"?"existing":s==="new"?"new":"none"}function YG(e){var t,n,r;const s=(r=(n=(t=e.setup)==null?void 0:t.checkout)==null?void 0:n.dirty)==null?void 0:r.stash;return s==="untracked"||s==="unstaged"||s==="staged"||s==="all"?s:"none"}const If=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M160 42a86.11 86.11 0 0 0-77.57 48.88A62 62 0 1 0 72 214h88a86 86 0 0 0 0-172m0 160H72a50 50 0 0 1 0-100a51 51 0 0 1 5.91.35A85.6 85.6 0 0 0 74 128a6 6 0 0 0 12 0a74 74 0 1 1 74 74"})}),{__source:"ph:cloud-light",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"cloud",displayName:"UiCloud"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M160.06 40a88.1 88.1 0 0 0-78.77 48.67A87.5 87.5 0 0 0 72 127.73a8.18 8.18 0 0 1-7.43 8.27a8 8 0 0 1-8.57-8a103.7 103.7 0 0 1 5.34-32.92a4 4 0 0 0-4.75-5.18A64.09 64.09 0 0 0 8 152c0 35.19 29.75 64 65 64h87a88.09 88.09 0 0 0 87.93-91.48C246.11 77.54 207.07 40 160.06 40"})}),{__source:"ph:cloud-fill",__viewBox:"0 0 256 256",__group:"infrastructure",__consumerName:"cloud",displayName:"UiCloudFilled"});const ux=[{id:"claude",label:"Claude",provider:"claude-agent",modes:[{id:"agent",label:"Agent",backend:"claude-agent",icon:ms,title:"Claude Agent SDK"},{id:"cli",label:"CLI",backend:"claude-cli",icon:fr,title:"Claude Code CLI"},{id:"cmux",label:"cmux",backend:"claude-cmux",icon:hg,title:"Claude multiplexer"}]},{id:"codex",label:"Codex",provider:"codex-cli",modes:[{id:"cli",label:"CLI",backend:"codex-cli",icon:fr,title:"Codex CLI"},{id:"cmux",label:"cmux",backend:"codex-cmux",icon:hg,title:"Codex multiplexer"}]},{id:"openai",label:"OpenAI",provider:"openai",modes:[{id:"api",label:"API",backend:"openai",icon:If,title:"OpenAI API"}]},{id:"anthropic",label:"Anthropic",provider:"anthropic",modes:[{id:"api",label:"API",backend:"anthropic",icon:If,title:"Anthropic API"}]},{id:"gemini",label:"Gemini",provider:"googleai",modes:[{id:"api",label:"API",backend:"gemini",icon:If,title:"Gemini API"},{id:"cli",label:"CLI",backend:"gemini-cli",icon:fr,title:"Gemini CLI"}]},{id:"deepseek",label:"DeepSeek",provider:"deepseek",modes:[{id:"api",label:"API",backend:"deepseek",icon:If,title:"DeepSeek API"}]}];function _l(e,t){const n=e.find(s=>s.id===t);if(n)return n;const r=e[0];if(!r)throw new Error("SpecRuntimeFamily catalog must not be empty");return r}function dx(e){const t=e.modes[0];if(!t)throw new Error(`SpecRuntimeFamily "${e.id}" must have at least one mode`);return t}function XG(e,t,n){const r=_l(e,t);return(r.modes.find(i=>i.id===n)??dx(r)).backend}function iN(e,t){const n=(t??"").toLowerCase();for(const s of e)for(const i of s.modes)if(i.backend.toLowerCase()===n)return{family:s.id,mode:i.id};const r=_l(e,"");return{family:r.id,mode:dx(r).id}}function eJ(e,t=ux){const n=(e??"").toLowerCase();for(const r of t)for(const s of r.modes)if(s.backend.toLowerCase()===n)return`${r.label} ${s.label}`;return"Prompt default"}function tJ(e,t){return t?e.filter(n=>n.provider===t.provider):e}function nJ(e,t,n){if(!e)return!0;const r=t.find(s=>s.id===e);return r?!n||r.provider===n.provider:!1}function aN({value:e,onChange:t,families:n=ux,models:r=[]}){const s=iN(n,e.backend),i=_l(n,s.family),l=(u,d)=>{const f=XG(n,u,d);if(f===(e.backend??""))return;const p=_l(n,u);let h=Z0(Bn(e,{backend:f}),"cliArgs",void 0);nJ(e.model,r,p)||(h=Z0(h,"model",void 0)),t(h)};return o.jsxs("div",{className:"grid gap-density-2",children:[o.jsx(_t,{label:"Family",children:o.jsx(Tr,{"aria-label":"Provider family",size:"sm",wrap:!0,value:i.id,options:n.map(u=>({id:u.id,label:u.label})),onChange:u=>l(u,dx(_l(n,u)).id)})}),o.jsx(_t,{label:"Mode",hint:"runtime",children:o.jsx(Tr,{"aria-label":"Runtime mode",size:"sm",wrap:!0,value:s.mode,options:i.modes.map(u=>({id:u.id,label:u.label,...u.icon?{icon:u.icon}:{},...u.title?{title:u.title}:{}})),onChange:u=>l(i.id,u)})})]})}function rJ({value:e,onChange:t,cliOptions:n}){const r=w.useId();return o.jsx(vm,{idPrefix:`spec-cli-${r}`,schema:n.schema,value:e.cliArgs??{},onChange:s=>t(Bn(e,{cliArgs:s})),size:"sm"})}function sJ(e){var t,n;if(typeof e.valueFrom=="string"){const r=e.valueFrom.trim();for(const s of["secret","configmap"]){const i=`${s}://`;if(r.startsWith(i)){const[l="",u=""]=r.slice(i.length).split("/",2);return{kind:s,name:l,key:u}}}return{kind:"value",value:r}}if((t=e.valueFrom)!=null&&t.secretKeyRef)return{kind:"secret",name:e.valueFrom.secretKeyRef.name??"",key:e.valueFrom.secretKeyRef.key??""};if((n=e.valueFrom)!=null&&n.configMapKeyRef)return{kind:"configmap",name:e.valueFrom.configMapKeyRef.name??"",key:e.valueFrom.configMapKeyRef.key??""};if(e.value!==void 0)return{kind:"value",value:e.value}}function oJ(e,t){const n={name:e};return t?.kind==="value"?n.value=t.value:t&&(n.valueFrom=`${t.kind}://${t.name}/${t.key}`),n}function iJ(e){const t=e?.trim()??"";for(const n of["secret","configmap"]){const r=`${n}://`;if(t.startsWith(r)){const[s="",i=""]=t.slice(r.length).split("/",2);return{kind:n,name:s,key:i}}}return t?{kind:"value",value:t}:void 0}function aJ(e){return e?e.kind==="value"?e.value:`${e.kind}://${e.name}/${e.key}`:""}const lJ=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M215.15 40.85A78 78 0 0 0 86.2 121.31l-56.1 56.1a13.94 13.94 0 0 0-4.1 9.9V216a14 14 0 0 0 14 14h32a6 6 0 0 0 6-6v-18h18a6 6 0 0 0 6-6v-18h18a6 6 0 0 0 4.24-1.76l10.45-10.44A77.6 77.6 0 0 0 160 174h.1a78 78 0 0 0 55.05-133.15M226 98.16c-1.12 35.16-30.67 63.8-65.88 63.84a65.9 65.9 0 0 1-24.51-4.67a6 6 0 0 0-6.64 1.26L117.51 170H96a6 6 0 0 0-6 6v18H72a6 6 0 0 0-6 6v18H40a2 2 0 0 1-2-2v-28.69a2 2 0 0 1 .58-1.41l58.83-58.83a6 6 0 0 0 1.26-6.64A65.6 65.6 0 0 1 94 95.92c0-35.21 28.68-64.76 63.83-65.92A66 66 0 0 1 226 98.16M190 76a10 10 0 1 1-10-10a10 10 0 0 1 10 10"})}),{__source:"ph:key-light",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"key",displayName:"UiKey"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216.57 39.43a80 80 0 0 0-132.66 81.35L28.69 176A15.86 15.86 0 0 0 24 187.31V216a16 16 0 0 0 16 16h32a8 8 0 0 0 8-8v-16h16a8 8 0 0 0 8-8v-16h16a8 8 0 0 0 5.66-2.34l9.56-9.57A79.7 79.7 0 0 0 160 176h.1a80 80 0 0 0 56.47-136.57M180 92a16 16 0 1 1 16-16a16 16 0 0 1-16 16"})}),{__source:"ph:key-fill",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"key",displayName:"UiKeyFilled"});function cJ({value:e,onChange:t,secretSelector:n}){var r;return o.jsx(dJ,{value:(r=e.setup)==null?void 0:r.envVars,onChange:s=>t(Tu(e,{envVars:s})),secretSelector:n})}function uJ({value:e,onChange:t}){var n;return o.jsx(HG,{label:"Dotenv files",value:(n=e.setup)==null?void 0:n.dotenv,onChange:r=>t(Tu(e,{dotenv:r})),placeholder:".env",icon:Zl})}function dJ({value:e,onChange:t,secretSelector:n}){const r=e&&e.length>0?e:[{name:"",value:""}],s=(i,l)=>{t(r.map((u,d)=>d===i?{...u,...l}:u))};return o.jsxs("div",{className:"space-y-density-2",children:[o.jsxs("div",{className:"flex items-center justify-between gap-density-2",children:[o.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:"Environment variables"}),o.jsxs(K4,{onClick:()=>t([...r,{name:"",value:""}]),children:[o.jsx(K,{icon:pr,className:"size-3.5"}),"Add"]})]}),o.jsxs("div",{className:"overflow-hidden rounded-md border border-border",children:[o.jsxs("div",{className:"grid grid-cols-[minmax(6rem,1fr)_minmax(0,1fr)_auto] gap-density-2 border-b border-border bg-muted/40 px-density-2 py-density-1 text-[10px] font-semibold uppercase text-muted-foreground md:grid-cols-[minmax(8rem,12rem)_minmax(0,1fr)_auto]",children:[o.jsx("span",{children:"Name"}),o.jsx("span",{children:"Value"}),o.jsx("span",{className:"sr-only",children:"Actions"})]}),o.jsx("div",{className:"divide-y divide-border",children:r.map((i,l)=>o.jsxs("div",{className:"grid gap-density-2 px-density-2 py-density-2 md:grid-cols-[minmax(8rem,12rem)_minmax(0,1fr)_auto]",children:[o.jsx(xn,{value:i.name,onChange:u=>s(l,{name:u}),placeholder:"API_TOKEN",ariaLabel:"Environment variable name",icon:R3,mono:!0}),o.jsx("div",{className:"min-w-0",children:n?o.jsx(g3,{value:sJ(i),onChange:u=>t(r.map((d,f)=>f===l?oJ(d.name??"",u):d)),loadResources:n.loadResources,loadKeyPreview:n.loadKeyPreview,...n.allowLiteral!==void 0?{allowLiteral:n.allowLiteral}:{},...n.strict!==void 0?{strict:n.strict}:{},className:"min-w-0 flex-wrap"}):o.jsx(xn,{value:typeof i.valueFrom=="string"?i.valueFrom:i.value,onChange:u=>s(l,{value:u,valueFrom:""}),placeholder:"secret://name/key",ariaLabel:"Environment variable value",icon:lJ,mono:!0})}),o.jsx("div",{className:"flex items-center",children:o.jsxs(K4,{onClick:()=>t(r.filter((u,d)=>d!==l)),ariaLabel:`Remove ${i.name||"environment variable"}`,children:[o.jsx(K,{icon:Vl,className:"size-3.5"}),"Remove"]})})]},l))})]})]})}function fJ({status:e,saveLabel:t,onSave:n,onCancel:r}){return o.jsxs("div",{className:"sticky bottom-0 z-10 flex items-center justify-between gap-density-3 border-t border-border bg-background/90 px-density-4 py-density-2 backdrop-blur",children:[o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold text-emerald-700 dark:text-emerald-300",children:[o.jsx(K,{icon:mr,className:"size-4"}),e]}),o.jsxs("div",{className:"flex items-center gap-density-2",children:[r&&o.jsx(Fe,{size:"sm",variant:"outline",onClick:r,children:"Cancel"}),n&&o.jsxs(Fe,{size:"sm",onClick:n,children:[o.jsx(K,{icon:ju,className:"size-4"}),t]})]})]})}const mJ=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M134 154.6V88a6 6 0 0 0-12 0v66.6a30 30 0 1 0 12 0m-6 47.4a18 18 0 1 1 18-18a18 18 0 0 1-18 18m38-67V48a38 38 0 0 0-76 0v87a62 62 0 1 0 76 0m-38 99a50 50 0 0 1-28.57-91a6 6 0 0 0 2.57-5V48a26 26 0 0 1 52 0v90a6 6 0 0 0 2.57 4.92A50 50 0 0 1 128 234"})}),{__source:"ph:thermometer-simple-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"thermometer",displayName:"UiThermometer"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M160 146.08V40a32 32 0 0 0-64 0v106.08a56 56 0 1 0 64 0M128 24a16 16 0 0 1 16 16v64h-32V40a16 16 0 0 1 16-16"})}),{__source:"ph:thermometer-simple-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"thermometer",displayName:"UiThermometerFilled"});const pJ=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M152 122h-18V54h10a34 34 0 0 1 34 34a6 6 0 0 0 12 0a46.06 46.06 0 0 0-46-46h-10V24a6 6 0 0 0-12 0v18h-10a46 46 0 0 0 0 92h10v68h-18a34 34 0 0 1-34-34a6 6 0 0 0-12 0a46.06 46.06 0 0 0 46 46h18v18a6 6 0 0 0 12 0v-18h18a46 46 0 0 0 0-92m-40 0a34 34 0 0 1 0-68h10v68Zm40 80h-18v-68h18a34 34 0 0 1 0 68"})}),{__source:"ph:currency-dollar-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"currency-dollar",displayName:"UiCurrencyDollar"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M160 152a16 16 0 0 1-16 16h-8v-32h8a16 16 0 0 1 16 16m72-24A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-56 24a32 32 0 0 0-32-32h-8V88h4a16 16 0 0 1 16 16a8 8 0 0 0 16 0a32 32 0 0 0-32-32h-4v-8a8 8 0 0 0-16 0v8h-4a32 32 0 0 0 0 64h4v32h-8a16 16 0 0 1-16-16a8 8 0 0 0-16 0a32 32 0 0 0 32 32h8v8a8 8 0 0 0 16 0v-8h8a32 32 0 0 0 32-32m-76-48a16 16 0 0 0 16 16h4V88h-4a16 16 0 0 0-16 16"})}),{__source:"ph:currency-dollar-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"currency-dollar",displayName:"UiCurrencyDollarFilled"});const hJ=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224.56 103.81c-11.13-6.06-26.09-10.42-42.56-12.47V84c0-12.12-9.58-23.1-27-30.93C139.16 45.93 118.2 42 96 42s-43.16 3.93-59 11.07C19.58 60.9 10 71.88 10 84v40c0 12.12 9.58 23.1 27 30.93c10.49 4.72 23.21 8 37 9.73V172c0 12.12 9.58 23.1 27 30.93c15.84 7.14 36.8 11.07 59 11.07s43.16-3.93 59-11.07c17.39-7.83 27-18.81 27-30.93v-40c0-10.65-7.61-20.66-21.44-28.19m-5.74 10.54C228.61 119.68 234 126 234 132c0 14.19-30.39 30-74 30a167 167 0 0 1-21.21-1.34a111 111 0 0 0 16.21-5.73c17.39-7.83 27-18.81 27-30.93v-20.57c14.4 1.93 27.3 5.73 36.82 10.92m-110.66 39.23c-3.92.27-8 .42-12.16.42c-5.3 0-10.4-.24-15.28-.67a2 2 0 0 0-.37 0c-3.58-.33-7-.77-10.35-1.3v-27.91A178 178 0 0 0 96 126a178 178 0 0 0 26-1.88V152c-4.34.69-8.91 1.22-13.69 1.56ZM170 105.89V124c0 9.54-13.75 19.8-36 25.51v-27.66a115 115 0 0 0 21-6.92a66.2 66.2 0 0 0 15-9.04M96 54c43.61 0 74 15.81 74 30s-30.39 30-74 30s-74-15.81-74-30s30.39-30 74-30m-74 70v-18.11a66.2 66.2 0 0 0 15 9a115 115 0 0 0 21 6.92v27.66C35.75 143.8 22 133.54 22 124m64 48v-6.28c3.3.18 6.63.28 10 .28q5.91 0 11.66-.37a123 123 0 0 0 14.34 4.21v27.67C99.75 191.8 86 181.54 86 172m48 28v-27.9a178 178 0 0 0 26 1.9a178 178 0 0 0 26-1.88V200a170 170 0 0 1-52 0m64-2.49v-27.66a115 115 0 0 0 21-6.92a66.2 66.2 0 0 0 15-9V172c0 9.54-13.75 19.8-36 25.51"})}),{__source:"ph:coins-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"coins",displayName:"UiCoins"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M184 89.57V84c0-25.08-37.83-44-88-44S8 58.92 8 84v40c0 20.89 26.25 37.49 64 42.46V172c0 25.08 37.83 44 88 44s88-18.92 88-44v-40c0-20.7-25.42-37.32-64-42.43m-128 57.3C36.41 141.4 24 132.39 24 124v-14.07c8.16 5.78 19.09 10.44 32 13.57Zm80-23.37c12.91-3.13 23.84-7.79 32-13.57V124c0 8.39-12.41 17.4-32 22.87Zm-16 71.37c-19.59-5.47-32-14.48-32-22.87v-4.17c2.63.1 5.29.17 8 .17c3.88 0 7.67-.13 11.39-.35a122 122 0 0 0 12.61 3.76Zm0-44.62A163 163 0 0 1 96 152a163 163 0 0 1-24-1.75v-23.79A184 184 0 0 0 96 128a184 184 0 0 0 24-1.54Zm64 48a165.5 165.5 0 0 1-48 0V174.4a179.5 179.5 0 0 0 24 1.6a184 184 0 0 0 24-1.54ZM232 172c0 8.39-12.41 17.4-32 22.87V171.5c12.91-3.13 23.84-7.79 32-13.57Z"})}),{__source:"ph:coins-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"coins",displayName:"UiCoinsFilled"});const lN=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M26 128a70.08 70.08 0 0 1 70-70h113.51l-13.75-13.76a6 6 0 0 1 8.48-8.48l24 24a6 6 0 0 1 0 8.48l-24 24a6 6 0 0 1-8.48-8.48L209.51 70H96a58.07 58.07 0 0 0-58 58a6 6 0 0 1-12 0m198-6a6 6 0 0 0-6 6a58.07 58.07 0 0 1-58 58H46.49l13.75-13.76a6 6 0 0 0-8.48-8.48l-24 24a6 6 0 0 0 0 8.48l24 24a6 6 0 0 0 8.48-8.48L46.49 198H160a70.08 70.08 0 0 0 70-70a6 6 0 0 0-6-6"})}),{__source:"ph:repeat-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"repeat",displayName:"UiRepeat"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M24 128a72.08 72.08 0 0 1 72-72h96V40a8 8 0 0 1 13.66-5.66l24 24a8 8 0 0 1 0 11.32l-24 24A8 8 0 0 1 192 88V72H96a56.06 56.06 0 0 0-56 56a8 8 0 0 1-16 0m200-8a8 8 0 0 0-8 8a56.06 56.06 0 0 1-56 56H64v-16a8 8 0 0 0-13.66-5.66l-24 24a8 8 0 0 0 0 11.32l24 24A8 8 0 0 0 64 216v-16h96a72.08 72.08 0 0 0 72-72a8 8 0 0 0-8-8"})}),{__source:"ph:repeat-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"repeat",displayName:"UiRepeatFilled"});const gJ=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 42a94 94 0 1 0 94 94a94.11 94.11 0 0 0-94-94m0 176a82 82 0 1 1 82-82a82.1 82.1 0 0 1-82 82m44.24-126.24a6 6 0 0 1 0 8.48l-40 40a6 6 0 1 1-8.48-8.48l40-40a6 6 0 0 1 8.48 0M98 16a6 6 0 0 1 6-6h48a6 6 0 0 1 0 12h-48a6 6 0 0 1-6-6"})}),{__source:"ph:timer-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"timer",displayName:"UiTimer"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 40a96 96 0 1 0 96 96a96.11 96.11 0 0 0-96-96m45.66 61.66l-40 40a8 8 0 0 1-11.32-11.32l40-40a8 8 0 0 1 11.32 11.32M96 16a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16h-48a8 8 0 0 1-8-8"})}),{__source:"ph:timer-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"timer",displayName:"UiTimerFilled"});const xJ=["low","medium","high","xhigh"];function vJ({value:e,onChange:t,models:n,families:r}){var s,i,l,u;return o.jsxs("div",{className:"grid gap-density-2",children:[o.jsx(aN,{value:e,onChange:t,models:n,...r?{families:r}:{}}),o.jsxs("div",{className:"grid gap-density-2 md:grid-cols-3",children:[o.jsx(_t,{label:"Model",children:n.length>0?o.jsx(Om,{models:n,value:e.model,onChange:d=>t(Bn(e,{model:d})),className:"w-full",size:"md"}):o.jsx(xn,{value:e.model,onChange:d=>t(Bn(e,{model:d})),placeholder:"claude-sonnet-4-6",icon:jm,mono:!0})}),o.jsx(_t,{label:"Effort",children:o.jsx(Mm,{efforts:xJ,value:e.effort??"",onChange:d=>t(Bn(e,{effort:d})),className:"w-full",size:"md"})}),o.jsx(dl,{label:"Temperature",value:e.temperature,onChange:d=>t(Z0(e,"temperature",d)),icon:mJ,min:0,max:2,step:.1})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-density-2 md:grid-cols-4",children:[o.jsx(dl,{label:"Max cost (USD)",value:(s=e.budget)==null?void 0:s.cost,onChange:d=>t(Pf(e,"cost",d)),icon:pJ,min:0,step:.01}),o.jsx(dl,{label:"Max tokens",value:(i=e.budget)==null?void 0:i.maxTokens,onChange:d=>t(Pf(e,"maxTokens",d)),icon:hJ,min:0,step:1,integer:!0}),o.jsx(dl,{label:"Max turns",value:(l=e.budget)==null?void 0:l.maxTurns,onChange:d=>t(Pf(e,"maxTurns",d)),icon:lN,min:0,max:100,step:1,integer:!0}),o.jsx(_t,{label:"Timeout",children:o.jsx(xn,{value:(u=e.budget)==null?void 0:u.timeout,onChange:d=>t(Pf(e,"timeout",d)),placeholder:"30m",icon:gJ,mono:!0})})]})]})}function bJ({value:e,onChange:t}){return o.jsx("div",{className:"grid gap-density-2 sm:grid-cols-[minmax(10rem,16rem)]",children:o.jsx(io,{label:"Disable prompt caching",checked:e.noCache,onChange:n=>t(Bn(e,{noCache:n}))})})}const yJ=["default","acceptEdits","auto","bypassPermissions","dontAsk","plan"],wJ=["none","new","existing"],_J=["none","untracked","unstaged","staged","all"],jJ=["all","changed"];function kJ(e){const t={},n=NJ(e);return Yn(n)&&(t.spec=n),t}function NJ(e){var t;const n={},r=xt(e.model);r&&(n.model=r);const s=xt(e.id);s&&(n.id=s);const i=xt(e.backend);i&&(n.backend=i),e.temperature!=null&&Number.isFinite(e.temperature)&&(n.temperature=e.temperature);const l=xt(e.effort);l&&(n.effort=l),e.noCache&&(n.noCache=!0);const u=CJ(e.prompt);u&&(n.prompt=u);const d=SJ(e.budget);d&&(n.budget=d);const f=EJ(e.memory);f&&(n.memory=f);const p=TJ(e.permissions,(t=e.memory)==null?void 0:t.skills);p&&(n.permissions=p);const h=OJ(e.setup);return h&&(n.setup=h),e.cliArgs&&Yn(e.cliArgs)&&(n.cliArgs=e.cliArgs),n}function CJ(e){if(!e)return;const t={},n=xt(e.user);n&&(t.user=n);const r=xt(e.system);r&&(t.system=r);const s=xt(e.appendSystem);s&&(t.appendSystem=s);const i=xt(e.source);i&&(t.source=i);const l=$J(e.metadata);return l&&(t.metadata=l),Yn(t)?t:void 0}function SJ(e){if(!e)return;const t={};e.cost!=null&&Number.isFinite(e.cost)&&e.cost>0&&(t.cost=e.cost),e.maxTokens!=null&&Number.isFinite(e.maxTokens)&&e.maxTokens>0&&(t.maxTokens=Math.trunc(e.maxTokens)),e.maxTurns!=null&&Number.isFinite(e.maxTurns)&&e.maxTurns>0&&(t.maxTurns=Math.trunc(e.maxTurns));const n=xt(e.timeout);return n&&(t.timeout=n),Yn(t)?t:void 0}function EJ(e){if(!e)return;const t={};return e.skipProject&&(t.skipProject=!0),e.skipUser&&(t.skipUser=!0),e.skipHooks&&(t.skipHooks=!0),e.skipMemory&&(t.skipMemory=!0),e.bare&&(t.bare=!0),Yn(t)?t:void 0}function TJ(e,t){if(!e&&!t?.length)return;const n={};e?.mode&&e.mode!=="default"&&(n.mode=e.mode);const r=xi(e?.presets);r&&(n.presets=r);const s=PJ(e?.tools);s&&(n.tools=s);const i=IJ(e?.mcp);i&&(n.mcp=i);const l=G4(e?.plugins);l&&(n.plugins=l);const u=G4(e?.skills,t);return u&&(n.skills=u),Yn(n)?n:void 0}function OJ(e){if(!e)return;const t={},n=xt(e.cwd);n&&(t.cwd=n);const r=xt(e.baseDir);r&&(t.baseDir=r);const s=xi(e.dotenv);s&&(t.dotenv=s);const i=MJ(e.envVars);i&&(t.envVars=i);const l=RJ(e.checkout);return l&&(t.checkout=l),Yn(t)?t:void 0}function MJ(e){if(!e)return;const t=[];for(const n of e){const r=xt(n.name);if(!r)continue;const s={name:r},i=xt(n.value),l=typeof n.valueFrom=="string"?AJ(n.valueFrom):LJ(n.valueFrom);i&&(s.value=i),l&&(s.valueFrom=l),(s.value||s.valueFrom)&&t.push(s)}return t.length>0?t:void 0}function AJ(e){const t=xt(e);if(!t)return;const[n,r=""]=t.split("://",2),[s="",i=""]=r.split("/",2).map(l=>l.trim());if(s){if(n==="secret"&&i)return{secretKeyRef:{name:s,key:i}};if(n==="configmap"&&i)return{configMapKeyRef:{name:s,key:i}};if(n==="serviceaccount")return{serviceAccount:s};if(n==="helm"&&i)return{helmRef:{name:s,key:i}}}}function LJ(e){var t,n,r,s,i,l;if(!e)return;const u={},d=xt((t=e.secretKeyRef)==null?void 0:t.name),f=xt((n=e.secretKeyRef)==null?void 0:n.key);d&&f&&(u.secretKeyRef={name:d,key:f});const p=xt((r=e.configMapKeyRef)==null?void 0:r.name),h=xt((s=e.configMapKeyRef)==null?void 0:s.key);p&&h&&(u.configMapKeyRef={name:p,key:h});const x=xt(e.serviceAccount);x&&(u.serviceAccount=x);const v=xt((i=e.helmRef)==null?void 0:i.name),y=xt((l=e.helmRef)==null?void 0:l.key);return v&&y&&(u.helmRef={name:v,key:y}),Yn(u)?u:void 0}function RJ(e){var t,n,r,s,i,l,u,d,f,p;if(!e)return;const h={};(e.mode==="remote"||e.mode==="local")&&(h.mode=e.mode);const x=xt(e.url);x&&(h.url=x);const v=xt(e.path);v&&(h.path=v);const y=xt(e.connection);y&&(h.connection=y);const b=xt(e.ref);b&&(h.ref=b),e.depth!=null&&Number.isFinite(e.depth)&&e.depth>0&&(h.depth=Math.trunc(e.depth));const j={},S=(t=e.worktree)==null?void 0:t.mode;(S==="new"||S==="existing")&&(j.mode=S);const N=xt((n=e.worktree)==null?void 0:n.prefix);N&&(j.prefix=N);const k=xt((r=e.worktree)==null?void 0:r.base);k&&(j.base=k);const T=xt((s=e.worktree)==null?void 0:s.path);T&&(j.path=T),j.mode==="new"&&((i=e.worktree)!=null&&i.keep)&&(j.keep=!0),Yn(j)&&(h.worktree=j);const E={},O=(l=e.dirty)==null?void 0:l.stash;(O==="untracked"||O==="unstaged"||O==="staged"||O==="all")&&(E.stash=O),(u=e.dirty)!=null&&u.staged&&(E.staged=!0),(d=e.dirty)!=null&&d.unstaged&&(E.unstaged=!0),(f=e.dirty)!=null&&f.untracked&&(E.untracked=!0);const M=xt((p=e.dirty)==null?void 0:p.since);return M&&(E.since=M),Yn(E)&&(h.dirty=E),Yn(h)?h:void 0}function PJ(e){const t=fx(e);return Yn(t)?t:void 0}function G4(e,t){const n=Ou(e,t);return Yn(n)?n:void 0}function IJ(e){if(!e)return;const t={};for(const[n,r]of Object.entries(e)){const s=n.trim();if(s){if(s==="servers"){const i=Array.isArray(r)?xi(r.filter(l=>typeof l=="string")):void 0;i&&(t.servers=i);continue}if(s==="disabled"){r===!0&&(t.disabled=!0);continue}px(r)&&(t[s]=r)}}return Yn(t)?t:void 0}function fx(e){const t={};if(!e)return t;const n=e;for(const r of xi(n.allow)??[])t[r]="allow";for(const r of xi(n.deny)??[])t[r]="deny";for(const[r,s]of Object.entries(n.modes??{})){const i=r.trim();i&&(s==="enabled"&&(t[i]="auto"),s==="ask"&&(t[i]="ask"),s==="disabled"&&(t[i]="deny"))}for(const[r,s]of Object.entries(e)){const i=r.trim();!i||i==="allow"||i==="deny"||i==="modes"||FJ(s)&&(t[i]=s)}return t}function Ou(e,t){const n={};for(const r of xi(t)??[])n[r]="enabled";if(!e)return n;if(Array.isArray(e)){for(const r of xi(e)??[])n[r]="enabled";return n}for(const[r,s]of Object.entries(e)){const i=r.trim();i&&px(s)&&(n[i]=s)}return n}function mx(e){const t={};if(!e)return t;const n=xi(e.servers);n&&(t.servers=n),e.disabled&&(t.disabled=!0);for(const[r,s]of Object.entries(e)){const i=r.trim();!i||i==="servers"||i==="disabled"||px(s)&&(t[i]=s)}return t}function $J(e){if(!e)return;const t={};for(const[n,r]of Object.entries(e)){const s=n.trim();s&&(t[s]=r)}return Yn(t)?t:void 0}function xi(e){if(!e)return;const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));return t.length>0?t:void 0}function xt(e){return e?.trim()??""}function Yn(e){return Object.keys(e).length>0}function FJ(e){return e==="auto"||e==="ask"||e==="allow"||e==="deny"}function px(e){return e==="enabled"||e==="disabled"}const DJ=Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#0ea5e9",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M142 176a6 6 0 0 1-6 6a14 14 0 0 1-14-14v-40a2 2 0 0 0-2-2a6 6 0 0 1 0-12a14 14 0 0 1 14 14v40a2 2 0 0 0 2 2a6 6 0 0 1 6 6m-18-82a10 10 0 1 0-10-10a10 10 0 0 0 10 10m106 34A102 102 0 1 1 128 26a102.12 102.12 0 0 1 102 102m-12 0a90 90 0 1 0-90 90a90.1 90.1 0 0 0 90-90"})})},{__source:"ph:info-light",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"info",__defaultColor:"#0ea5e9",displayName:"UiInfo"});Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#0ea5e9",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m-4 48a12 12 0 1 1-12 12a12 12 0 0 1 12-12m12 112a16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16a16 16 0 0 1 16 16v40a8 8 0 0 1 0 16"})})},{__source:"ph:info-fill",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"info",__defaultColor:"#0ea5e9",displayName:"UiInfoFilled"});function BJ({entries:e,emptyLabel:t,onEntryModeChange:n,onGroupModeChange:r,groupIcon:s,footer:i,className:l,compact:u=!1}){const[d,f]=w.useState({}),p=w.useMemo(()=>VJ(e),[e]);return o.jsxs("div",{className:R("space-y-density-2",l),children:[p.length>0&&o.jsx("div",{className:"divide-y divide-border overflow-hidden rounded-md border border-border",children:p.map(([h,x])=>{const v=d[h]??!1,y=s?.(h,x)??oa,b=HJ(x),j=ZJ(x),S=()=>f(N=>({...N,[h]:!N[h]}));return o.jsxs("div",{children:[o.jsxs("div",{className:R("flex cursor-pointer items-center gap-1 bg-muted/50 hover:bg-muted",u?"px-1 py-0.5":"px-density-2 py-density-1"),onClick:S,children:[o.jsx("button",{type:"button","aria-label":`${v?"Expand":"Collapse"} ${h}`,"aria-expanded":!v,title:`${v?"Expand":"Collapse"} ${h}`,className:"inline-flex size-6 shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-background hover:text-foreground",onClick:N=>{N.stopPropagation(),S()},children:o.jsx(K,{icon:v?ds:Vt,className:"size-3.5"})}),o.jsx(K,{icon:y,className:"size-4 shrink-0 text-muted-foreground"}),o.jsx("span",{className:"min-w-0 truncate text-[10px] font-semibold uppercase text-muted-foreground",children:h}),o.jsx("span",{className:"shrink-0 rounded bg-background px-1.5 py-0.5 text-[10px] text-muted-foreground",children:x.length}),b.length>0&&o.jsx("span",{className:"ml-auto",onClick:N=>N.stopPropagation(),children:o.jsx(cN,{ariaLabel:`${h} group policy`,options:b,value:j,size:"group",onChange:N=>r(x,N),buttonLabel:N=>`Set ${h} group to ${N.label}`})})]}),!v&&o.jsx("div",{className:"divide-y divide-border/60 border-t border-border",children:x.map(N=>o.jsx(UJ,{entry:N,compact:u,onChange:k=>n(N,k)},N.id))})]},h)})}),p.length===0&&o.jsx("div",{className:"rounded-md border border-border px-density-2 py-density-3 text-xs text-muted-foreground",children:t}),i]})}function UJ({entry:e,compact:t,onChange:n}){const r=e.icon,s=e.mode==="deny"||e.mode==="disabled";return o.jsxs("div",{title:e.id,className:R("flex items-center gap-1.5",t?"px-2 py-1":"px-density-2 py-density-1"),children:[o.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[r&&o.jsx(K,{icon:r,className:R("size-4 shrink-0",s?"text-muted-foreground/45":"text-muted-foreground")}),o.jsx("span",{className:R("min-w-0 truncate text-xs",s&&"text-muted-foreground line-through"),children:e.label}),(e.description||e.source||e.sourcePath)&&o.jsx(zJ,{entry:e})]}),o.jsx(cN,{ariaLabel:`${e.label} policy`,options:e.options,value:e.mode,onChange:n})]})}function cN({ariaLabel:e,options:t,value:n,onChange:r,size:s="entry",buttonLabel:i}){return o.jsx("span",{role:"radiogroup","aria-label":e,className:"inline-flex flex-wrap items-center gap-0.5",children:t.map(l=>{const u=l.id===n;return o.jsx("button",{type:"button",role:"radio","aria-checked":u,"aria-label":i?.(l),title:l.title??i?.(l),onClick:()=>r(l.id),className:R("rounded border font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",s==="group"?"px-1.5 py-0.5 text-[10px]":"min-w-12 px-1.5 py-0.5 text-[10px]",u?WJ(l.tone):"border-border bg-background text-muted-foreground hover:border-muted-foreground/40 hover:text-foreground"),children:l.label},l.id)})})}function zJ({entry:e}){const t=[e.description,e.source?`Source: ${e.source}`:void 0,e.sourcePath].filter(Boolean);return t.length===0?null:o.jsx(nd,{placement:"top",delay:120,trigger:o.jsx("span",{"aria-label":`Info for ${e.label}`,className:"inline-flex size-5 items-center justify-center rounded text-muted-foreground hover:bg-background hover:text-foreground",children:o.jsx(K,{icon:DJ,className:"size-3.5"})}),cardClassName:"max-w-xs whitespace-normal text-xs",children:o.jsx("div",{className:"space-y-1",children:t.map(n=>o.jsx("div",{children:n},n))})})}function VJ(e){const t=new Map;for(const n of e)t.set(n.group,[...t.get(n.group)??[],n]);return Array.from(t.entries())}function HJ(e){var t;const n=((t=e[0])==null?void 0:t.options)??[];if(e.length===0)return[];const r=J4(n);return e.every(s=>J4(s.options)===r)?n:[]}function ZJ(e){var t;const n=(t=e[0])==null?void 0:t.mode;return n&&e.every(r=>r.mode===n)?n:"mixed"}function J4(e){return e.map(t=>t.id).join("\0")}function WJ(e="neutral"){switch(e){case"success":return"border-emerald-600 bg-emerald-600 text-white shadow-sm dark:border-emerald-500 dark:bg-emerald-500 dark:text-emerald-950";case"warning":return"border-amber-500 bg-amber-500 text-white shadow-sm dark:border-amber-400 dark:bg-amber-400 dark:text-amber-950";case"danger":return"border-red-600 bg-red-600 text-white shadow-sm dark:border-red-500 dark:bg-red-500 dark:text-red-950";case"info":return"border-sky-600 bg-sky-600 text-white shadow-sm dark:border-sky-500 dark:bg-sky-500 dark:text-sky-950";case"neutral":return"border-slate-600 bg-slate-700 text-white shadow-sm dark:border-slate-300 dark:bg-slate-300 dark:text-slate-950"}}const qJ=["auto","ask","allow","deny"],KJ=["enabled","disabled"];function GJ(e,t){return{tools:e?.tools??t.map(n=>{const r={id:n.name,label:n.label||n.name,defaultMode:dN(n.defaultPermission)};return n.group&&(r.group=n.group),n.description&&(r.description=n.description),r}),mcp:e?.mcp??[],plugins:e?.plugins??[],skills:e?.skills??[]}}function JJ(e,t,n,r,s){return[...XJ(e.tools,t),...j1("mcp",e.mcp,nQ(n),n.servers,n.disabled?"disabled":"enabled"),...j1("plugins",e.plugins,r),...j1("skills",e.skills,s)]}function QJ(e,t){var n,r,s,i,l,u;const d=Ou((n=e.permissions)==null?void 0:n.skills,(r=e.memory)==null?void 0:r.skills);if((s=e.memory)!=null&&s.skipSkills){for(const f of t.skills)d[f.id]="disabled";for(const f of e.memory.skills??[])d[f]="disabled"}return JJ(t,fx((i=e.permissions)==null?void 0:i.tools),mx((l=e.permissions)==null?void 0:l.mcp),Ou((u=e.permissions)==null?void 0:u.plugins),d)}function uN(e,t,n){var r,s,i,l,u;const d={...fx((r=e.permissions)==null?void 0:r.tools)};let f={...mx((s=e.permissions)==null?void 0:s.mcp)};const p={...Ou((i=e.permissions)==null?void 0:i.plugins)},h={...Ou((l=e.permissions)==null?void 0:l.skills,(u=e.memory)==null?void 0:u.skills)};let x=!1;for(const y of t)y.domain==="tools"&&mN(n)?d[y.id]=n:y.domain==="mcp"&&cu(n)?f=tQ(f,y.id,n):y.domain==="plugins"&&cu(n)?p[y.id]=n:y.domain==="skills"&&cu(n)&&(h[y.id]=n,x=!0);const v={...e.memory};return delete v.skipSkills,{...e,permissions:{...e.permissions,tools:d,mcp:f,plugins:p,skills:h},...x?{memory:{...v,skills:[]}}:void 0}}function YJ(e,t,n){const r=n.trim();if(!r)return;const s=t==="tools"?"auto":"enabled";return uN(e,[{id:r,label:r,group:fN(t),domain:t,mode:s}],s)}function XJ(e,t){const n=[],r=new Set,s=(i,l)=>{const u=i.trim();!u||r.has(u)||(r.add(u),n.push({id:u,label:l?.label||u,group:l?.group||"Tools",domain:"tools",mode:t[u]??dN(l?.defaultMode),description:l?.description,source:l?.source,sourcePath:l?.sourcePath}))};for(const i of e)s(i.id,i);for(const i of Object.keys(t))s(i,void 0);return n}function j1(e,t,n,r=void 0,s="enabled"){const i=[],l=new Set,u=(d,f)=>{const p=d.trim();!p||l.has(p)||(l.add(p),i.push({id:p,label:f?.label||p,group:f?.group||fN(e),domain:e,mode:n[p]??rQ(f?.defaultMode,s),description:f?.description,source:f?.source,sourcePath:f?.sourcePath}))};for(const d of t)u(d.id,d);for(const d of r??[])u(d,void 0);for(const d of Object.keys(n))u(d,void 0);return i}function eQ(e){return e.domain==="tools"?qJ:KJ}function tQ(e,t,n){const r={...mx(e)},s=new Set(r.servers??[]);return n==="enabled"&&s.add(t),s.size>0?r.servers=Array.from(s):delete r.servers,r[t]=n,r}function nQ(e){const t={};for(const[n,r]of Object.entries(e)){const s=n.trim();!s||s==="servers"||s==="disabled"||cu(r)&&(t[s]=r)}return t}function dN(e){return mN(e)?e:e==="on"?"allow":e==="enabled"?"auto":e==="off"||e==="disabled"?"deny":e==="ask"?"ask":"auto"}function rQ(e,t){return cu(e)?e:t}function fN(e){switch(e){case"tools":return"Tools";case"mcp":return"MCP";case"plugins":return"Plugins";case"skills":return"Skills"}}function sQ(e){switch(e){case"tools":return"Tool name";case"mcp":return"server name";case"plugins":return"/path/to/plugin";case"skills":return"$CWD/.skills"}}function mN(e){return e==="auto"||e==="ask"||e==="allow"||e==="deny"}function cu(e){return e==="enabled"||e==="disabled"}const pN="clicky-ui:spec-runtime-editor:permission-presets:v1",hx=[{id:"edit",label:"Edit",description:"Edits auto, shell and web ask.",mode:"acceptEdits",policies:{Read:"allow",Edit:"auto",Write:"auto",Bash:"ask",WebSearch:"ask",WebFetch:"ask"},groupPolicies:{Files:"auto",Shell:"ask",Web:"ask"},defaultToolPolicy:"ask",resources:{mcp:"enabled",plugins:"enabled",skills:"enabled"}},{id:"plan",label:"Plan",description:"Read and web ask, writes off.",mode:"plan",policies:{Read:"allow",Edit:"deny",Write:"deny",Bash:"deny",WebSearch:"ask",WebFetch:"ask"},groupPolicies:{Files:"deny",Shell:"deny",Web:"ask"},defaultToolPolicy:"deny",resources:{mcp:"disabled",plugins:"disabled",skills:"enabled"}},{id:"readonly",label:"Read-only",description:"No writes, shell, network, or resources.",mode:"default",policies:{Read:"ask",Edit:"deny",Write:"deny",Bash:"deny",WebSearch:"deny",WebFetch:"deny"},groupPolicies:{Files:"deny",Shell:"deny",Web:"deny"},defaultToolPolicy:"deny",resources:{mcp:"disabled",plugins:"disabled",skills:"disabled"}}];function oQ(e,t,n){const r=hx.find(s=>s.id===t);if(!r)throw new Error(`unknown spec runtime preset ${JSON.stringify(t)}`);return hN(e,gN(r,n))}function hN(e,t){const{permissions:n,memory:r,...s}=e,i={...s,permissions:cQ(t.permissions)},l=uQ(t.memory);return l?{...i,memory:l}:i}function W0(e,t){var n;const r={mode:((n=e.permissions)==null?void 0:n.mode)||"default"},s={},i={},l={},u={},d=[];for(const p of t)if(p.domain==="tools")s[p.id]=p.mode;else if(p.domain==="mcp"){const h=p.mode;i[p.id]=h,h==="enabled"&&d.push(p.id)}else p.domain==="plugins"?l[p.id]=p.mode:p.domain==="skills"&&(u[p.id]=p.mode);Object.keys(s).length>0&&(r.tools=s),(Object.keys(i).length>0||d.length>0)&&(d.length>0&&(i.servers=d),r.mcp=i),Object.keys(l).length>0&&(r.plugins=l),Object.keys(u).length>0&&(r.skills=u);const f=xN(e.memory);return f?{permissions:r,memory:f}:{permissions:r}}function iQ(e,t){var n;const r=q0(W0(e,t));return(n=hx.find(s=>q0(gN(s,t))===r))==null?void 0:n.id}function aQ(e,t,n){return q0(W0(e,t))===q0(n.snapshot)}function gN(e,t){const n={mode:e.mode},r={},s={},i={},l={},u=[];for(const d of t)if(d.domain==="tools")r[d.id]=lQ(e,d);else if(d.domain==="mcp"){const f=e.resources.mcp;s[d.id]=f,f==="enabled"&&u.push(d.id)}else d.domain==="plugins"?i[d.id]=e.resources.plugins:d.domain==="skills"&&(l[d.id]=e.resources.skills);return Object.keys(r).length>0&&(n.tools=r),(Object.keys(s).length>0||u.length>0)&&(u.length>0&&(s.servers=u),n.mcp=s),Object.keys(i).length>0&&(n.plugins=i),Object.keys(l).length>0&&(n.skills=l),{permissions:n}}function lQ(e,t){return e.policies[t.id]??e.groupPolicies[t.group]??e.defaultToolPolicy}function xN(e){if(!e)return;const t={};return e.skipProject&&(t.skipProject=!0),e.skipUser&&(t.skipUser=!0),e.skipHooks&&(t.skipHooks=!0),e.skipMemory&&(t.skipMemory=!0),e.bare&&(t.bare=!0),Object.keys(t).length>0?t:void 0}function cQ(e){const t={};if(e.mode&&(t.mode=e.mode),e.tools&&(t.tools={...e.tools}),e.mcp){const n={};for(const[r,s]of Object.entries(e.mcp))Array.isArray(s)?n[r]=[...s]:n[r]=s;t.mcp=n}return e.plugins&&!Array.isArray(e.plugins)?t.plugins={...e.plugins}:Array.isArray(e.plugins)&&(t.plugins=[...e.plugins]),e.skills&&!Array.isArray(e.skills)?t.skills={...e.skills}:Array.isArray(e.skills)&&(t.skills=[...e.skills]),t}function uQ(e){const t=xN(e);return t?{...t}:void 0}function q0(e){return JSON.stringify(vN(e))}function vN(e){if(Array.isArray(e))return[...e].sort();if(e&&typeof e=="object"){const t={};for(const n of Object.keys(e).sort()){const r=e[n];r!==void 0&&(t[n]=vN(r))}return t}return e}const dQ=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 82h-34V56a46 46 0 0 0-92 0v26H48a14 14 0 0 0-14 14v112a14 14 0 0 0 14 14h160a14 14 0 0 0 14-14V96a14 14 0 0 0-14-14M94 56a34 34 0 0 1 68 0v26H94Zm116 152a2 2 0 0 1-2 2H48a2 2 0 0 1-2-2V96a2 2 0 0 1 2-2h160a2 2 0 0 1 2 2Zm-72-56a10 10 0 1 1-10-10a10 10 0 0 1 10 10"})}),{__source:"ph:lock-light",__viewBox:"0 0 256 256",__group:"approval-review",__consumerName:"lock",displayName:"UiLock"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 80h-32V56a48 48 0 0 0-96 0v24H48a16 16 0 0 0-16 16v112a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16m-80 84a12 12 0 1 1 12-12a12 12 0 0 1-12 12m32-84H96V56a32 32 0 0 1 64 0Z"})}),{__source:"ph:lock-fill",__viewBox:"0 0 256 256",__group:"approval-review",__consumerName:"lock",displayName:"UiLockFilled"});const bN=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M236.24 19.76a6 6 0 0 0-8.48 0l-53.82 53.81l-6.79-6.78a30 30 0 0 0-42.42 0L100 91.51l-7.76-7.75a6 6 0 0 0-8.48 8.48l7.75 7.76l-24.72 24.73a30 30 0 0 0 0 42.42l6.78 6.79l-53.81 53.82a6 6 0 1 0 8.48 8.48l53.82-53.81l6.79 6.78a30 30 0 0 0 42.42 0L156 164.49l7.76 7.75a6 6 0 0 0 8.48-8.48l-7.75-7.76l24.72-24.73a30 30 0 0 0 0-42.42l-6.78-6.79l53.81-53.82a6 6 0 0 0 0-8.48m-113.45 161a18 18 0 0 1-25.46 0l-22.06-22.09a18 18 0 0 1 0-25.46L100 108.49L147.51 156Zm57.94-57.94L156 147.51L108.49 100l24.72-24.73a18 18 0 0 1 25.46 0l22.06 22.06a18 18 0 0 1 0 25.46Zm-90.3-88.59a6 6 0 0 1 11.14-4.46l8 20a6 6 0 1 1-11.14 4.46Zm-64 59.54a6 6 0 0 1 7.8-3.34l20 8a6 6 0 1 1-4.46 11.14l-20-8a6 6 0 0 1-3.34-7.8m203.14 68.46a6 6 0 0 1-7.8 3.34l-20-8a6 6 0 0 1 4.46-11.14l20 8a6 6 0 0 1 3.34 7.8m-64 59.54a6 6 0 1 1-11.14 4.46l-8-20a6 6 0 0 1 11.14-4.46Z"})}),{__source:"ph:plugs-connected-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"plugs-connected",displayName:"UiPlugsConnected"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M88.57 35a8 8 0 0 1 14.86-6l8 20a8 8 0 0 1-14.86 6ZM29 103.43l20 8a8 8 0 1 0 6-14.86l-20-8a8 8 0 0 0-6 14.86m198 49.14l-20-8a8 8 0 1 0-6 14.86l20 8a8 8 0 0 0 6-14.86M159.43 201a8 8 0 0 0-14.86 6l8 20a8 8 0 1 0 14.86-6Zm78.48-182.48a8 8 0 0 0-11.5-.18L174 70.75l-5.38-5.38a32 32 0 0 0-45.28 0l-17.2 17.17a4 4 0 0 0 0 5.66l61.7 61.66a4 4 0 0 0 5.66 0l16.74-16.74a32.76 32.76 0 0 0 9.81-22.52a31.82 31.82 0 0 0-9.37-23.17l-5.38-5.37l52.2-52.17a8.22 8.22 0 0 0 .41-11.37M85.64 90.34a8 8 0 0 0-11.49.18a8.22 8.22 0 0 0 .41 11.37l6.11 6.11l-15.33 15.31A31.82 31.82 0 0 0 56 146.47A32.75 32.75 0 0 0 65.77 169l5 4.94l-52.28 52.19a8.21 8.21 0 0 0-.61 11.1a8 8 0 0 0 11.72.43L82 185.25l5.37 5.38a32.1 32.1 0 0 0 45.29 0L148 175.31l6.34 6.35a8 8 0 0 0 11.32-11.32Z"})}),{__source:"ph:plugs-connected-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"plugs-connected",displayName:"UiPlugsConnectedFilled"});const fQ=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m241.91 118.1l-16-16a14 14 0 0 0-19.55-.23l-52.23-52.23a14 14 0 0 0-.23-19.55l-16-16a14 14 0 0 0-19.8 0l-64 64a14 14 0 0 0 0 19.8l16 16a14 14 0 0 0 19.55.23l9.87 9.88l-66.79 66.79a23 23 0 0 0 32.48 32.49L132 156.49l9.87 9.87a14 14 0 0 0 .23 19.55l16 16a14 14 0 0 0 19.8 0l64-64a14 14 0 0 0 .01-19.81m-91.56 39.76l-52.21-52.2l47.52-47.52l52.2 52.2Zm-71.76-52.45l-16-16a2 2 0 0 1 0-2.83l64-64a2 2 0 0 1 2.83 0l16 16a2 2 0 0 1 0 2.83l-64 64a2 2 0 0 1-2.83 0M56.73 214.8a11 11 0 0 1-15.52-15.52L108 132.49L123.52 148Zm176.69-85.38l-64 64a2 2 0 0 1-2.83 0l-16-16a2 2 0 0 1 0-2.83l64-64a2 2 0 0 1 2.83 0l16 16a2 2 0 0 1 0 2.83"})}),{__source:"ph:gavel-light",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"gavel",displayName:"UiGavel"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M52.69 99.31a16 16 0 0 1 0-22.63l64-64a16 16 0 0 1 22.63 22.63l-64 64a16 16 0 0 1-22.63 0m190.63 17.37a16 16 0 0 0-22.63 0l-64 64a16 16 0 0 0 0 22.63a16 16 0 0 0 22.63 0l64-64a16 16 0 0 0 0-22.63m-35.11-15.8l-53.09-53.09a4 4 0 0 0-5.66 0L87.8 109.45a4 4 0 0 0 0 5.66l15.2 15.23l-74.31 74.35a16 16 0 0 0 22.62 22.62L125.66 153l15.23 15.23a4 4 0 0 0 5.66 0l61.66-61.66a4 4 0 0 0 0-5.69"})}),{__source:"ph:gavel-fill",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"gavel",displayName:"UiGavelFilled"});const mQ=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m212.24 83.76l-56-56A6 6 0 0 0 152 26H56a14 14 0 0 0-14 14v176a14 14 0 0 0 14 14h144a14 14 0 0 0 14-14V88a6 6 0 0 0-1.76-4.24M158 46.48L193.52 82H158ZM200 218H56a2 2 0 0 1-2-2V40a2 2 0 0 1 2-2h90v50a6 6 0 0 0 6 6h50v122a2 2 0 0 1-2 2m-42-66a6 6 0 0 1-6 6h-18v18a6 6 0 0 1-12 0v-18h-18a6 6 0 0 1 0-12h18v-18a6 6 0 0 1 12 0v18h18a6 6 0 0 1 6 6"})}),{__source:"ph:file-plus-light",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"file-plus",displayName:"UiFilePlus"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"m213.66 82.34l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v176a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V88a8 8 0 0 0-2.34-5.66M152 160h-16v16a8 8 0 0 1-16 0v-16h-16a8 8 0 0 1 0-16h16v-16a8 8 0 0 1 16 0v16h16a8 8 0 0 1 0 16m0-72V43.31L196.69 88Z"})}),{__source:"ph:file-plus-fill",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"file-plus",displayName:"UiFilePlusFilled"});const $f="__custom",pQ={edit:yu,plan:zl,readonly:dQ},hQ={auto:{id:"auto",label:"Auto",tone:"info"},ask:{id:"ask",label:"Ask",tone:"warning"},allow:{id:"allow",label:"Allow",tone:"success"},deny:{id:"deny",label:"Deny",tone:"danger"},enabled:{id:"enabled",label:"Enabled",tone:"success"},disabled:{id:"disabled",label:"Disabled",tone:"neutral"}};function gQ({value:e,onChange:t,entries:n}){return o.jsx(vQ,{value:e,entries:n,onChange:t})}function xQ({value:e,onChange:t,entries:n,onApplyEntries:r,onAddEntry:s}){var i,l,u,d,f,p;return o.jsxs("div",{className:"grid gap-density-3",children:[o.jsx(_t,{label:"Mode",children:o.jsx(rN,{ariaLabel:"Permission mode",value:((i=e.permissions)==null?void 0:i.mode)||"default",onChange:h=>t(WG(e,{mode:h})),children:yJ.map(h=>o.jsx("option",{value:h,children:h},h))})}),o.jsxs("div",{className:"grid gap-density-2 sm:grid-cols-2 md:grid-cols-3",children:[o.jsx(io,{label:"Skip project",checked:(l=e.memory)==null?void 0:l.skipProject,onChange:h=>t(Hc(e,{skipProject:h}))}),o.jsx(io,{label:"Skip user",checked:(u=e.memory)==null?void 0:u.skipUser,onChange:h=>t(Hc(e,{skipUser:h}))}),o.jsx(io,{label:"Skip hooks",checked:(d=e.memory)==null?void 0:d.skipHooks,onChange:h=>t(Hc(e,{skipHooks:h}))}),o.jsx(io,{label:"Skip memory",checked:(f=e.memory)==null?void 0:f.skipMemory,onChange:h=>t(Hc(e,{skipMemory:h}))}),o.jsx(io,{label:"Bare",checked:(p=e.memory)==null?void 0:p.bare,onChange:h=>t(Hc(e,{bare:h}))})]}),o.jsx(bQ,{entries:n,emptyLabel:"No tools, MCP servers, plugins, or skills configured",onApply:r,onAdd:s})]})}function vQ({value:e,entries:t,onChange:n}){const[r,s]=w.useState([]),[i,l]=w.useState("");w.useEffect(()=>{s(_Q())},[]);const u=iQ(e,t),d=r.find(b=>aQ(e,t,b)),f=u??d?.id??$f,p=w.useMemo(()=>{const b=hx.map(N=>({id:N.id,label:N.label,description:N.description,icon:pQ[N.id]})),j=r.map(N=>({id:N.id,label:N.label,description:"Saved",icon:oa})),S=f===$f?[{id:$f,label:"Custom",description:"Manual tree",icon:oa}]:[];return[...b,...j,...S]},[f,r]),h=b=>{if(b===$f)return;if(kQ(b)){n(oQ(e,b,t));return}const j=r.find(S=>S.id===b);j&&n(hN(e,j.snapshot))},x=()=>{const b=i.trim();if(!b)return;const j=W0(e,t),S=new Date().toISOString(),N=[...r.filter(k=>k.label!==b),{id:`local:${NQ(b)}:${Date.now().toString(36)}`,label:b,snapshot:j,updatedAt:S}];k1(N),s(N),l("")},v=()=>{if(!d)return;const b=r.map(j=>j.id===d.id?{...j,snapshot:W0(e,t),updatedAt:new Date().toISOString()}:j);k1(b),s(b)},y=()=>{if(!d)return;const b=r.filter(j=>j.id!==d.id);k1(b),s(b)};return o.jsxs("div",{className:"grid gap-density-3",children:[o.jsx(Tr,{"aria-label":"Permission preset",value:f,options:p,onChange:h,size:"lg",wrap:!0,className:"w-full"}),o.jsxs("div",{className:"grid gap-density-2 sm:grid-cols-[minmax(0,1fr)_auto_auto]",children:[o.jsx(xn,{value:i,onChange:l,placeholder:"Preset name",ariaLabel:"Permission preset name",icon:oa}),o.jsxs("button",{type:"button",onClick:x,disabled:!i.trim(),className:"inline-flex h-control-h items-center justify-center gap-1 rounded-md border border-border bg-background px-density-3 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",children:[o.jsx(K,{icon:pr,className:"size-3.5"}),"Save"]}),d&&o.jsxs("span",{className:"inline-flex gap-density-2",children:[o.jsx("button",{type:"button",onClick:v,className:"inline-flex h-control-h items-center justify-center rounded-md border border-border bg-background px-density-3 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground",children:"Update"}),o.jsx("button",{type:"button",onClick:y,className:"inline-flex h-control-h items-center justify-center rounded-md border border-border bg-background px-density-3 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground",children:"Delete"})]})]})]})}function bQ({entries:e,emptyLabel:t,onApply:n,onAdd:r}){const[s,i]=w.useState("tools"),[l,u]=w.useState(""),d=w.useMemo(()=>e.map(yQ),[e]),f=()=>{r(s,l),u("")};return o.jsx(BJ,{entries:d,emptyLabel:t,onEntryModeChange:(p,h)=>n([p.data],h),onGroupModeChange:(p,h)=>n(p.map(x=>x.data),h),groupIcon:wQ,footer:o.jsxs("div",{className:"grid gap-density-2 sm:grid-cols-[8rem_minmax(0,1fr)_auto]",children:[o.jsxs(rN,{ariaLabel:"Permission kind",value:s,onChange:p=>i(p),children:[o.jsx("option",{value:"tools",children:"Tool"}),o.jsx("option",{value:"mcp",children:"MCP"}),o.jsx("option",{value:"plugins",children:"Plugin"}),o.jsx("option",{value:"skills",children:"Skill"})]}),o.jsx(xn,{value:l,onChange:u,placeholder:sQ(s),ariaLabel:"Permission identifier"}),o.jsxs("button",{type:"button",onClick:f,className:"inline-flex h-control-h items-center justify-center gap-1 rounded-md border border-border bg-background px-density-3 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground",children:[o.jsx(K,{icon:pr,className:"size-3.5"}),"Add"]})]})})}function yQ(e){const t={id:`${e.domain}:${e.id}`,label:e.label,group:e.group,mode:e.mode,options:eQ(e).map(n=>hQ[n]),data:e,icon:yN(e)};return e.description&&(t.description=e.description),e.source&&(t.source=e.source),e.sourcePath&&(t.sourcePath=e.sourcePath),t}function yN(e){if(e.domain==="mcp"){const n=e.id.toLowerCase();return n.includes("filesystem")||n.includes("file")?tj:n.includes("gavel")?fQ:n==="ado"||n.includes("kanban")?oo:bN}if(e.domain==="plugins")return W2;if(e.domain==="skills")return Z2;const t=e.id.toLowerCase();return t==="read"||t.includes("read")?Zl:t==="edit"||t.includes("edit")?yu:t==="write"||t.includes("write")?mQ:t.includes("bash")||t.includes("shell")?fr:t.includes("web")?ui:od}function wQ(e,t){const n=e.toLowerCase();if(n.includes("file"))return od;if(n.includes("shell"))return fr;if(n.includes("web"))return ui;if(n.includes("mcp"))return bN;if(n.includes("plugin"))return W2;if(n.includes("skill"))return Z2;const r=t[0];return r?yN(r.data):oa}function _Q(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(pN);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(jQ):[]}catch{return[]}}function k1(e){typeof window>"u"||window.localStorage.setItem(pN,JSON.stringify(e))}function jQ(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&typeof t.label=="string"&&typeof t.updatedAt=="string"&&!!t.snapshot&&typeof t.snapshot=="object"&&!!t.snapshot.permissions}function kQ(e){return e==="edit"||e==="plan"||e==="readonly"}function NQ(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"preset"}const CQ=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M229.19 213c-15.81-27.32-40.63-46.49-69.47-54.62a70 70 0 1 0-63.44 0C67.44 166.5 42.62 185.67 26.81 213a6 6 0 1 0 10.38 6c19.21-33.19 53.15-53 90.81-53s71.6 19.81 90.81 53a6 6 0 1 0 10.38-6M70 96a58 58 0 1 1 58 58a58.07 58.07 0 0 1-58-58"})}),{__source:"ph:user-light",__viewBox:"0 0 256 256",__group:"people-orgs",__consumerName:"user",displayName:"UiUser"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M230.93 220a8 8 0 0 1-6.93 4H32a8 8 0 0 1-6.92-12c15.23-26.33 38.7-45.21 66.09-54.16a72 72 0 1 1 73.66 0c27.39 8.95 50.86 27.83 66.09 54.16a8 8 0 0 1 .01 8"})}),{__source:"ph:user-fill",__viewBox:"0 0 256 256",__group:"people-orgs",__consumerName:"user",displayName:"UiUserFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M229.19 213c-15.81-27.32-40.63-46.49-69.47-54.62a70 70 0 1 0-63.44 0C67.44 166.5 42.62 185.67 26.81 213a6 6 0 1 0 10.38 6c19.21-33.19 53.15-53 90.81-53s71.6 19.81 90.81 53a6 6 0 1 0 10.38-6M70 96a58 58 0 1 1 58 58a58.07 58.07 0 0 1-58-58"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 4v16M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:user-light + plus marker",__viewBox:"0 0 256 256",__group:"people-orgs",__consumerName:"user",displayName:"UiUserPlus"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M230.93 220a8 8 0 0 1-6.93 4H32a8 8 0 0 1-6.92-12c15.23-26.33 38.7-45.21 66.09-54.16a72 72 0 1 1 73.66 0c27.39 8.95 50.86 27.83 66.09 54.16a8 8 0 0 1 .01 8"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 4v16M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:user-fill + plus marker",__viewBox:"0 0 256 256",__group:"people-orgs",__consumerName:"user",displayName:"UiUserPlusFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M229.19 213c-15.81-27.32-40.63-46.49-69.47-54.62a70 70 0 1 0-63.44 0C67.44 166.5 42.62 185.67 26.81 213a6 6 0 1 0 10.38 6c19.21-33.19 53.15-53 90.81-53s71.6 19.81 90.81 53a6 6 0 1 0 10.38-6M70 96a58 58 0 1 1 58 58a58.07 58.07 0 0 1-58-58"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:user-light + minus marker",__viewBox:"0 0 256 256",__group:"people-orgs",__consumerName:"user",displayName:"UiUserMinus"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M230.93 220a8 8 0 0 1-6.93 4H32a8 8 0 0 1-6.92-12c15.23-26.33 38.7-45.21 66.09-54.16a72 72 0 1 1 73.66 0c27.39 8.95 50.86 27.83 66.09 54.16a8 8 0 0 1 .01 8"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:user-fill + minus marker",__viewBox:"0 0 256 256",__group:"people-orgs",__consumerName:"user",displayName:"UiUserMinusFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M229.19 213c-15.81-27.32-40.63-46.49-69.47-54.62a70 70 0 1 0-63.44 0C67.44 166.5 42.62 185.67 26.81 213a6 6 0 1 0 10.38 6c19.21-33.19 53.15-53 90.81-53s71.6 19.81 90.81 53a6 6 0 1 0 10.38-6M70 96a58 58 0 1 1 58 58a58.07 58.07 0 0 1-58-58"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M5 13l4 4 10-10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:user-light + tick marker",__viewBox:"0 0 256 256",__group:"people-orgs",__consumerName:"user",displayName:"UiUserCheck"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M230.93 220a8 8 0 0 1-6.93 4H32a8 8 0 0 1-6.92-12c15.23-26.33 38.7-45.21 66.09-54.16a72 72 0 1 1 73.66 0c27.39 8.95 50.86 27.83 66.09 54.16a8 8 0 0 1 .01 8"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M5 13l4 4 10-10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:user-fill + tick marker",__viewBox:"0 0 256 256",__group:"people-orgs",__consumerName:"user",displayName:"UiUserCheckFilled"});const wN=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 82a46 46 0 1 0 46 46a46.06 46.06 0 0 0-46-46m0 80a34 34 0 1 1 34-34a34 34 0 0 1-34 34m108-54.4a6 6 0 0 0-2.92-4l-30.44-17.38l-.42-.71l-.12-34.31a6 6 0 0 0-2.1-4.56a110.1 110.1 0 0 0-36.07-20.31a6 6 0 0 0-4.84.45l-30.63 17.08h-1l-30.55-17.1a6 6 0 0 0-4.86-.44A109.9 109.9 0 0 0 56 46.68a6 6 0 0 0-2.12 4.55l-.16 34.34c-.14.23-.28.47-.41.71l-30.4 17.29a6 6 0 0 0-2.91 4.05a104.8 104.8 0 0 0 0 40.78a6 6 0 0 0 2.92 4l30.42 17.33l.42.71l.12 34.31a6 6 0 0 0 2.12 4.61a110.1 110.1 0 0 0 36.07 20.31a6 6 0 0 0 4.84-.45l30.61-17.08h1l30.56 17.1a6.1 6.1 0 0 0 2.92.76a5.8 5.8 0 0 0 1.93-.32a109.9 109.9 0 0 0 36-20.36a6 6 0 0 0 2.12-4.55l.16-34.34c.14-.23.28-.47.41-.71l30.42-17.29a6 6 0 0 0 2.92-4.05a104.8 104.8 0 0 0 .04-40.78m-11.25 35.79l-29.43 16.71a6.07 6.07 0 0 0-2.28 2.3c-.59 1-1.21 2.11-1.86 3.14a6 6 0 0 0-.91 3.16l-.16 33.21a98.2 98.2 0 0 1-27.52 15.53L133 200.88a6 6 0 0 0-2.93-.77h-3.88a6 6 0 0 0-3.07.76l-29.67 16.56a98 98 0 0 1-27.56-15.49l-.12-33.17a6 6 0 0 0-.91-3.16c-.64-1-1.27-2.08-1.86-3.14a6 6 0 0 0-2.27-2.3L31.3 143.4a93 93 0 0 1 0-30.79L60.68 95.9A6.07 6.07 0 0 0 63 93.6c.59-1 1.21-2.11 1.86-3.14a6 6 0 0 0 .91-3.16l.16-33.21a98.2 98.2 0 0 1 27.48-15.53L123 55.12a5.8 5.8 0 0 0 3.07.76h3.74a6 6 0 0 0 3.07-.76l29.65-16.56a98 98 0 0 1 27.56 15.49l.12 33.17a6 6 0 0 0 .91 3.16c.64 1 1.27 2.08 1.86 3.14a6 6 0 0 0 2.27 2.3l29.45 16.78a93 93 0 0 1 .03 30.79Z"})}),{__source:"ph:gear-six-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"gear-six",displayName:"UiGearSix"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M237.94 107.21a8 8 0 0 0-3.89-5.4l-29.83-17l-.12-33.62a8 8 0 0 0-2.83-6.08a111.9 111.9 0 0 0-36.72-20.67a8 8 0 0 0-6.46.59L128 41.85L97.88 25a8 8 0 0 0-6.47-.6a111.9 111.9 0 0 0-36.68 20.75a8 8 0 0 0-2.83 6.07l-.15 33.65l-29.83 17a8 8 0 0 0-3.89 5.4a106.5 106.5 0 0 0 0 41.56a8 8 0 0 0 3.89 5.4l29.83 17l.12 33.63a8 8 0 0 0 2.83 6.08a111.9 111.9 0 0 0 36.72 20.67a8 8 0 0 0 6.46-.59L128 214.15L158.12 231a7.9 7.9 0 0 0 3.9 1a8.1 8.1 0 0 0 2.57-.42a112.1 112.1 0 0 0 36.68-20.73a8 8 0 0 0 2.83-6.07l.15-33.65l29.83-17a8 8 0 0 0 3.89-5.4a106.5 106.5 0 0 0-.03-41.52M128 168a40 40 0 1 1 40-40a40 40 0 0 1-40 40"})}),{__source:"ph:gear-six-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"gear-six",displayName:"UiGearSixFilled"});function SQ({value:e,onChange:t}){var n,r,s;return o.jsxs("div",{className:"grid gap-density-2",children:[o.jsx(y1,{label:"User override",value:(n=e.prompt)==null?void 0:n.user,onChange:i=>t(e0(e,{user:i})),placeholder:"Override the rendered user prompt",icon:CQ}),o.jsx(y1,{label:"System",value:(r=e.prompt)==null?void 0:r.system,onChange:i=>t(e0(e,{system:i})),placeholder:"Replace the system prompt",icon:wN}),o.jsx(y1,{label:"Append system",value:(s=e.prompt)==null?void 0:s.appendSystem,onChange:i=>t(e0(e,{appendSystem:i})),placeholder:"Appended to the default system prompt",icon:pr})]})}const K0=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M230 64a30 30 0 1 0-36 29.4V112a10 10 0 0 1-10 10H96a21.84 21.84 0 0 0-10 2.42v-31a30 30 0 1 0-12 0v69.2a30 30 0 1 0 12 0V144a10 10 0 0 1 10-10h88a22 22 0 0 0 22-22V93.4A30.05 30.05 0 0 0 230 64M62 64a18 18 0 1 1 18 18a18 18 0 0 1-18-18m36 128a18 18 0 1 1-18-18a18 18 0 0 1 18 18M200 82a18 18 0 1 1 18-18a18 18 0 0 1-18 18"})}),{__source:"ph:git-branch-light",__viewBox:"0 0 256 256",__group:"git-source-control",__consumerName:"git-branch",displayName:"UiGitBranch"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M232 64a32 32 0 1 0-40 31v17a8 8 0 0 1-8 8H96a23.8 23.8 0 0 0-8 1.38V95a32 32 0 1 0-16 0v66a32 32 0 1 0 16 0v-17a8 8 0 0 1 8-8h88a24 24 0 0 0 24-24V95a32.06 32.06 0 0 0 24-31M64 64a16 16 0 1 1 16 16a16 16 0 0 1-16-16m32 128a16 16 0 1 1-16-16a16 16 0 0 1 16 16"})}),{__source:"ph:git-branch-fill",__viewBox:"0 0 256 256",__group:"git-source-control",__consumerName:"git-branch",displayName:"UiGitBranchFilled"});function EQ({eyebrow:e,title:t,target:n}){return o.jsxs("header",{className:"mb-density-4 border-b border-border pb-density-3",children:[o.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-muted-foreground",children:e}),o.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-density-3",children:[o.jsx("h2",{className:"text-lg font-bold tracking-tight",children:t}),n&&o.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-border bg-muted/40 px-density-2 py-0.5 font-mono text-[11px] text-muted-foreground",children:[o.jsx(K,{icon:K0,className:"size-3.5"}),n]})]})]})}function TQ({meta:e,number:t,domId:n,sectionRef:r,advanced:s,advancedHint:i,children:l,className:u}){const[d,f]=w.useState(!1),p=`${n}-body`;return o.jsxs("section",{id:n,ref:r,"aria-label":e.label,className:R("scroll-mt-4 border-t border-border py-density-4 first:border-t-0 first:pt-0",u),children:[o.jsxs("header",{children:[o.jsx("h3",{className:"text-base font-bold tracking-tight",children:o.jsxs("button",{type:"button","aria-expanded":!d,"aria-controls":p,onClick:()=>f(h=>!h),className:"group flex w-full items-center gap-density-2 text-left",children:[o.jsx(K,{icon:e.icon,className:R("size-5",e.iconClassName??"text-muted-foreground")}),o.jsx("span",{children:e.label}),o.jsx("span",{className:"text-[10px] font-bold tabular-nums text-muted-foreground/70",children:t}),o.jsx(K,{icon:d?ds:Vt,className:"ml-auto size-4 shrink-0 text-muted-foreground/70 group-hover:text-foreground"})]})}),o.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:e.hint})]}),!d&&o.jsxs("div",{id:p,className:"mt-density-3",children:[l,s&&o.jsx(sN,{hint:i,children:s})]})]})}function Fn(e,t=!0){return e===void 0?t:e!==!1}function OQ(e){var t;if(e)return typeof e=="object"&&((t=e.viewModes)!=null&&t.length)?[...e.viewModes]:["rich-text","source","diff"]}function MQ({mdx:e,options:t}){const{ConditionalContents:n,ChangeCodeMirrorLanguage:r}=e,s=[...Fn(t.codeBlocks)&&Fn(t.codeMirror)?[{when:i=>i?.editorType==="codeblock",contents:()=>o.jsx(r,{})}]:[],{fallback:()=>o.jsx(AQ,{mdx:e,options:t})}];return o.jsx(n,{options:s})}function AQ({mdx:e,options:t}){const{BlockTypeSelect:n,BoldItalicUnderlineToggles:r,CodeToggle:s,CreateLink:i,DiffSourceToggleWrapper:l,InsertAdmonition:u,InsertCodeBlock:d,InsertFrontmatter:f,InsertImage:p,InsertTable:h,InsertThematicBreak:x,ListsToggle:v,Separator:y,UndoRedo:b}=e,j=o.jsxs(o.Fragment,{children:[o.jsx(b,{}),o.jsx(y,{}),o.jsx(r,{}),o.jsx(s,{}),Fn(t.headings)&&o.jsxs(o.Fragment,{children:[o.jsx(y,{}),o.jsx(n,{})]}),Fn(t.lists)&&o.jsx(v,{}),Fn(t.links)&&o.jsxs(o.Fragment,{children:[o.jsx(y,{}),o.jsx(i,{})]}),Fn(t.images)&&o.jsx(p,{}),(Fn(t.tables)||Fn(t.thematicBreak)||Fn(t.codeBlocks))&&o.jsx(y,{}),Fn(t.tables)&&o.jsx(h,{}),Fn(t.thematicBreak)&&o.jsx(x,{}),Fn(t.codeBlocks)&&o.jsx(d,{}),(Fn(t.frontmatter)||Fn(t.admonitions))&&o.jsx(y,{}),Fn(t.frontmatter)&&o.jsx(f,{}),Fn(t.admonitions)&&o.jsx(u,{})]}),S=OQ(t.diffMode);return S?o.jsx(l,{options:S,children:j}):j}const LQ={bash:"Bash",css:"CSS",go:"Go",html:"HTML",javascript:"JavaScript",js:"JavaScript",json:"JSON",jsx:"JSX",markdown:"Markdown",python:"Python",shell:"Shell",sql:"SQL",ts:"TypeScript",tsx:"TSX",typescript:"TypeScript",yaml:"YAML"};function kr(e,t=!0){return e===void 0?t:e!==!1}function Zi(e){return typeof e=="object"&&e!==null?e:void 0}function RQ(e){if(e)return e===!0?{}:typeof e=="string"?{viewMode:e}:e}function PQ(e,t){return()=>w.createElement(MQ,{mdx:e,options:t})}function IQ(e,t){if(t?.length)return t.map(n=>({priority:n.priority,match:n.match,Editor:r=>{const s=e.useCodeBlockEditorContext();return w.createElement(n.Editor,{...r,context:{setCode:s.setCode,setLanguage:s.setLanguage,setMeta:s.setMeta}})}}))}function $Q(e,t={}){var n;const r=[];if(kr(t.toolbar)){const s=Zi(t.toolbar);r.push(e.toolbarPlugin({toolbarContents:PQ(e,t),...s?.className?{toolbarClassName:s.className}:{},...s?.position?{toolbarPosition:s.position}:{}}))}if(kr(t.headings)){const s=Zi(t.headings);r.push(e.headingsPlugin(s))}if(kr(t.lists)&&r.push(e.listsPlugin()),kr(t.quote)&&r.push(e.quotePlugin()),kr(t.links)){const s=Zi(t.links);r.push(e.linkPlugin(s?.disableAutoLink!==void 0?{disableAutoLink:s.disableAutoLink}:void 0),e.linkDialogPlugin({...s?.linkAutocompleteSuggestions?{linkAutocompleteSuggestions:s.linkAutocompleteSuggestions}:{},...s?.showLinkTitleField!==void 0?{showLinkTitleField:s.showLinkTitleField}:{}}))}if(kr(t.tables)&&r.push(e.tablePlugin()),kr(t.thematicBreak)&&r.push(e.thematicBreakPlugin()),kr(t.codeBlocks)){const s=Zi(t.codeBlocks),i={defaultCodeBlockLanguage:s?.defaultLanguage??"txt"},l=IQ(e,s?.editorDescriptors);if(l&&(i.codeBlockEditorDescriptors=l),r.push(e.codeBlockPlugin(i)),kr(t.codeMirror)){const u=Zi(t.codeMirror);r.push(e.codeMirrorPlugin({codeBlockLanguages:u?.languages??LQ,...u?.autoLoadLanguageSupport!==void 0?{autoLoadLanguageSupport:u.autoLoadLanguageSupport}:{}}))}}if(kr(t.frontmatter)&&r.push(e.frontmatterPlugin()),kr(t.admonitions)){const s=Zi(t.admonitions);r.push(e.directivesPlugin({directiveDescriptors:[e.AdmonitionDirectiveDescriptor],escapeUnknownTextDirectives:s?.escapeUnknownTextDirectives??!0}))}if(kr(t.images)){const s=Zi(t.images);r.push(e.imagePlugin({...s?.imageUploadHandler?{imageUploadHandler:s.imageUploadHandler}:{},...s?.imageAutocompleteSuggestions?{imageAutocompleteSuggestions:s.imageAutocompleteSuggestions}:{},...s?.imagePreviewHandler?{imagePreviewHandler:s.imagePreviewHandler}:{},...s?.disableImageResize!==void 0?{disableImageResize:s.disableImageResize}:{},...s?.disableImageSettingsButton!==void 0?{disableImageSettingsButton:s.disableImageSettingsButton}:{},...s?.allowSetImageDimensions!==void 0?{allowSetImageDimensions:s.allowSetImageDimensions}:{}}))}if(t.diffMode){const s=RQ(t.diffMode);r.push(e.diffSourcePlugin({...s?.viewMode?{viewMode:s.viewMode}:{},...s?.diffMarkdown!==void 0?{diffMarkdown:s.diffMarkdown}:{},...s?.readOnlyDiff!==void 0?{readOnlyDiff:s.readOnlyDiff}:{}}))}return kr(t.markdownShortcuts)&&r.push(e.markdownShortcutPlugin()),(n=t.plugins)!=null&&n.length&&r.push(...t.plugins),r}const Q4={xs:"min-h-32",sm:"min-h-36",md:"min-h-40",lg:"min-h-48",xl:"min-h-56"};let N1=null;function FQ(){return N1??(N1=Rt(()=>import("./index-Xjp-wlra.js").then(e=>e.w),__vite__mapDeps([16,13,4,5,15]))),N1}function gx({id:e,value:t="",onChange:n,readOnly:r=!1,disabled:s=!1,size:i="md",placeholder:l,className:u,contentClassName:d,textareaClassName:f,"aria-label":p,commitInitialMarkdownNormalize:h=!1,...x}){const[v,y]=w.useState(null),b=w.useRef(null),j=w.useRef(t),S=r||s;w.useEffect(()=>{let E=!1;return FQ().then(O=>{E||y(O)}).catch(()=>{E||y(null)}),()=>{E=!0}},[]),w.useEffect(()=>{var E;!v||t===j.current||(j.current=t,(E=b.current)==null||E.setMarkdown(t))},[v,t]);const N=w.useCallback((E,O=!1)=>{O&&!h||(j.current=E,n?.(E))},[h,n]),k=w.useMemo(()=>v?$Q(v,x):[],[v,x]);if(!v){const E=p??(e?void 0:"Markdown");return o.jsx("textarea",{id:e,"data-jsf-input":!0,rows:6,"aria-label":E,className:R(bi(i),"h-auto resize-y font-mono",Q4[i],f),value:t,disabled:S,placeholder:typeof l=="string"?l:void 0,onChange:O=>N(O.target.value)})}const{MDXEditor:T}=v;return o.jsx("div",{id:e,"data-jsf-input":!0,className:"min-w-0",children:o.jsx(T,{ref:b,markdown:t,readOnly:S,placeholder:l,plugins:k,className:R("clicky-mdx-editor-field",S&&"clicky-mdx-editor-field-readonly",u),contentEditableClassName:R("clicky-mdx-editor-content",Q4[i],d),onChange:N})})}const DQ=Object.freeze(Object.defineProperty({__proto__:null,MdxEditorField:gx},Symbol.toStringTag,{value:"Module"})),xx=Symbol.for("yaml.alias"),Bg=Symbol.for("yaml.document"),fi=Symbol.for("yaml.map"),_N=Symbol.for("yaml.pair"),Bs=Symbol.for("yaml.scalar"),Kl=Symbol.for("yaml.seq"),qr=Symbol.for("yaml.node.type"),Gl=e=>!!e&&typeof e=="object"&&e[qr]===xx,ud=e=>!!e&&typeof e=="object"&&e[qr]===Bg,Jl=e=>!!e&&typeof e=="object"&&e[qr]===fi,en=e=>!!e&&typeof e=="object"&&e[qr]===_N,St=e=>!!e&&typeof e=="object"&&e[qr]===Bs,dd=e=>!!e&&typeof e=="object"&&e[qr]===Kl;function Yt(e){if(e&&typeof e=="object")switch(e[qr]){case fi:case Kl:return!0}return!1}function Xt(e){if(e&&typeof e=="object")switch(e[qr]){case xx:case fi:case Bs:case Kl:return!0}return!1}const jN=e=>(St(e)||Yt(e))&&!!e.anchor,Gi=Symbol("break visit"),BQ=Symbol("skip children"),uu=Symbol("remove node");function Ql(e,t){const n=UQ(t);ud(e)?fl(null,e.contents,n,Object.freeze([e]))===uu&&(e.contents=null):fl(null,e,n,Object.freeze([]))}Ql.BREAK=Gi;Ql.SKIP=BQ;Ql.REMOVE=uu;function fl(e,t,n,r){const s=zQ(e,t,n,r);if(Xt(s)||en(s))return VQ(e,r,s),fl(e,s,n,r);if(typeof s!="symbol"){if(Yt(t)){r=Object.freeze(r.concat(t));for(let i=0;ie.replace(/[!,[\]{}]/g,t=>HQ[t]);class Jn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Jn.defaultYaml,t),this.tags=Object.assign({},Jn.defaultTags,n)}clone(){const t=new Jn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Jn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Jn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Jn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Jn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Jn.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[i,l]=r;return this.tags[i]=l,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{const l=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,l),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const l=t.slice(2,-1);return l==="!"||l==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),l)}const[,r,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const i=this.tags[r];if(i)try{return i+decodeURIComponent(s)}catch(l){return n(String(l)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+ZQ(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let s;if(t&&r.length>0&&Xt(t.contents)){const i={};Ql(t.contents,(l,u)=>{Xt(u)&&u.tag&&(i[u.tag]=!0)}),s=Object.keys(i)}else s=[];for(const[i,l]of r)i==="!!"&&l==="tag:yaml.org,2002:"||(!t||s.some(u=>u.startsWith(l)))&&n.push(`%TAG ${i} ${l}`);return n.join(` +`)}}Jn.defaultYaml={explicit:!1,version:"1.2"};Jn.defaultTags={"!!":"tag:yaml.org,2002:"};function kN(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function NN(e){const t=new Set;return Ql(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function CN(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function WQ(e,t){const n=[],r=new Map;let s=null;return{onAnchor:i=>{n.push(i),s??(s=NN(e));const l=CN(t,s);return s.add(l),l},setAnchors:()=>{for(const i of n){const l=r.get(i);if(typeof l=="object"&&l.anchor&&(St(l.node)||Yt(l.node)))l.node.anchor=l.anchor;else{const u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=i,u}}},sourceObjects:r}}function ml(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;sHr(r,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!jN(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=i=>{r.res=i,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!n?.keep?Number(e):e}class vx{constructor(t){Object.defineProperty(this,qr,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){if(!ud(t))throw new TypeError("A document argument is required");const l={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},u=Hr(this,"",l);if(typeof s=="function")for(const{count:d,res:f}of l.anchors.values())s(f,d);return typeof i=="function"?ml(i,{"":u},"",u):u}}class bx extends vx{constructor(t){super(xx),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],Ql(t,{Node:(i,l)=>{(Gl(l)||jN(l))&&r.push(l)}}),n&&(n.aliasResolveCache=r));let s;for(const i of r){if(i===this)break;i.anchor===this.source&&(s=i)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:s,maxAliasCount:i}=n,l=this.resolve(s,n);if(!l){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let u=r.get(l);if(u||(Hr(l,null,n),u=r.get(l)),u?.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(i>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=t0(s,l,r)),u.count*u.aliasCount>i)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return u.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(kN(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(t.implicitKey)return`${s} `}return s}}function t0(e,t,n){if(Gl(t)){const r=t.resolve(e),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(Yt(t)){let r=0;for(const s of t.items){const i=t0(e,s,n);i>r&&(r=i)}return r}else if(en(t)){const r=t0(e,t.key,n),s=t0(e,t.value,n);return Math.max(r,s)}return 1}const SN=e=>!e||typeof e!="function"&&typeof e!="object";class nt extends vx{constructor(t){super(Bs),this.value=t}toJSON(t,n){return n?.keep?this.value:Hr(this.value,t,n)}toString(){return String(this.value)}}nt.BLOCK_FOLDED="BLOCK_FOLDED";nt.BLOCK_LITERAL="BLOCK_LITERAL";nt.PLAIN="PLAIN";nt.QUOTE_DOUBLE="QUOTE_DOUBLE";nt.QUOTE_SINGLE="QUOTE_SINGLE";const qQ="tag:yaml.org,2002:";function KQ(e,t,n){if(t){const r=n.filter(i=>i.tag===t),s=r.find(i=>!i.format)??r[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(r=>r.identify?.(e)&&!r.format)}function Mu(e,t,n){if(ud(e)&&(e=e.contents),Xt(e))return e;if(en(e)){const h=n.schema[fi].createNode?.(n.schema,null,n);return h.items.push(e),h}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:s,onTagObj:i,schema:l,sourceObjects:u}=n;let d;if(r&&e&&typeof e=="object"){if(d=u.get(e),d)return d.anchor??(d.anchor=s(e)),new bx(d.anchor);d={anchor:null,node:null},u.set(e,d)}t?.startsWith("!!")&&(t=qQ+t.slice(2));let f=KQ(e,t,l.tags);if(!f){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const h=new nt(e);return d&&(d.node=h),h}f=e instanceof Map?l[fi]:Symbol.iterator in Object(e)?l[Kl]:l[fi]}i&&(i(f),delete n.onTagObj);const p=f?.createNode?f.createNode(n.schema,e,n):typeof f?.nodeClass?.from=="function"?f.nodeClass.from(n.schema,e,n):new nt(e);return t?p.tag=t:f.default||(p.tag=f.tag),d&&(d.node=p),p}function G0(e,t,n){let r=n;for(let s=t.length-1;s>=0;--s){const i=t[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const l=[];l[i]=r,r=l}else r=new Map([[i,r]])}return Mu(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const tu=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class EN extends vx{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Xt(r)||en(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(tu(t))this.add(n);else{const[r,...s]=t,i=this.get(r,!0);if(Yt(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,G0(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const s=this.get(n,!0);if(Yt(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...s]=t,i=this.get(r,!0);return s.length===0?!n&&St(i)?i.value:i:Yt(i)?i.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!en(n))return!1;const r=n.value;return r==null||t&&St(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const s=this.get(n,!0);return Yt(s)?s.hasIn(r):!1}setIn(t,n){const[r,...s]=t;if(s.length===0)this.set(r,n);else{const i=this.get(r,!0);if(Yt(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,G0(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}}const GQ=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function lo(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const ea=(e,t,n)=>e.endsWith(` +`)?lo(n,t):n.includes(` +`)?` +`+lo(n,t):(e.endsWith(" ")?"":" ")+n,TN="flow",Ug="block",n0="quoted";function Lm(e,t,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:l,onOverflow:u}={}){if(!s||s<0)return e;ss-Math.max(2,i)?f.push(0):h=s-r);let x,v,y=!1,b=-1,j=-1,S=-1;n===Ug&&(b=Y4(e,b,t.length),b!==-1&&(h=b+d));for(let k;k=e[b+=1];){if(n===n0&&k==="\\"){switch(j=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}S=b}if(k===` +`)n===Ug&&(b=Y4(e,b,t.length)),h=b+t.length+d,x=void 0;else{if(k===" "&&v&&v!==" "&&v!==` +`&&v!==" "){const T=e[b+1];T&&T!==" "&&T!==` +`&&T!==" "&&(x=b)}if(b>=h)if(x)f.push(x),h=x+d,x=void 0;else if(n===n0){for(;v===" "||v===" ";)v=k,k=e[b+=1],y=!0;const T=b>S+1?b-2:j-1;if(p[T])return e;f.push(T),p[T]=!0,h=T+d,x=void 0}else y=!0}v=k}if(y&&u&&u(),f.length===0)return e;l&&l();let N=e.slice(0,f[0]);for(let k=0;k({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Pm=e=>/^(%|---|\.\.\.)/m.test(e);function JQ(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let i=0,l=0;ir)return!0;if(l=i+1,s-l<=r)return!1}return!0}function du(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,s=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(Pm(e)?" ":"");let l="",u=0;for(let d=0,f=n[d];f;f=n[++d])if(f===" "&&n[d+1]==="\\"&&n[d+2]==="n"&&(l+=n.slice(u,d)+"\\ ",d+=1,u=d,f="\\"),f==="\\")switch(n[d+1]){case"u":{l+=n.slice(u,d);const p=n.substr(d+2,4);switch(p){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:p.substr(0,2)==="00"?l+="\\x"+p.substr(2):l+=n.substr(d,6)}d+=5,u=d+1}break;case"n":if(r||n[d+2]==='"'||n.length +`;let h,x;for(x=n.length;x>0;--x){const E=n[x-1];if(E!==` +`&&E!==" "&&E!==" ")break}let v=n.substring(x);const y=v.indexOf(` +`);y===-1?h="-":n===v||y!==v.length-1?(h="+",i&&i()):h="",v&&(n=n.slice(0,-v.length),v[v.length-1]===` +`&&(v=v.slice(0,-1)),v=v.replace(Vg,`$&${f}`));let b=!1,j,S=-1;for(j=0;j{O=!0});const L=Lm(`${N}${E}${v}`,f,Ug,M);if(!O)return`>${T} +${f}${L}`}return n=n.replace(/\n+/g,`$&${f}`),`|${T} +${f}${N}${n}${v}`}function QQ(e,t,n,r){const{type:s,value:i}=e,{actualString:l,implicitKey:u,indent:d,indentStep:f,inFlow:p}=t;if(u&&i.includes(` +`)||p&&/[[\]{},]/.test(i))return pl(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return u||p||!i.includes(` +`)?pl(i,t):r0(e,t,n,r);if(!u&&!p&&s!==nt.PLAIN&&i.includes(` +`))return r0(e,t,n,r);if(Pm(i)){if(d==="")return t.forceBlockIndent=!0,r0(e,t,n,r);if(u&&d===f)return pl(i,t)}const h=i.replace(/\n+/g,`$& +${d}`);if(l){const x=b=>b.default&&b.tag!=="tag:yaml.org,2002:str"&&b.test?.test(h),{compat:v,tags:y}=t.doc.schema;if(y.some(x)||v?.some(x))return pl(i,t)}return u?h:Lm(h,d,TN,Rm(t,!1))}function yx(e,t,n,r){const{implicitKey:s,inFlow:i}=t,l=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:u}=e;u!==nt.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(l.value)&&(u=nt.QUOTE_DOUBLE);const d=p=>{switch(p){case nt.BLOCK_FOLDED:case nt.BLOCK_LITERAL:return s||i?pl(l.value,t):r0(l,t,n,r);case nt.QUOTE_DOUBLE:return du(l.value,t);case nt.QUOTE_SINGLE:return zg(l.value,t);case nt.PLAIN:return QQ(l,t,n,r);default:return null}};let f=d(u);if(f===null){const{defaultKeyType:p,defaultStringType:h}=t.options,x=s&&p||h;if(f=d(x),f===null)throw new Error(`Unsupported default string type ${x}`)}return f}function ON(e,t){const n=Object.assign({blockQuote:!0,commentString:GQ,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function YQ(e,t){if(t.tag){const s=e.filter(i=>i.tag===t.tag);if(s.length>0)return s.find(i=>i.format===t.format)??s[0]}let n,r;if(St(t)){r=t.value;let s=e.filter(i=>i.identify?.(r));if(s.length>1){const i=s.filter(l=>l.test);i.length>0&&(s=i)}n=s.find(i=>i.format===t.format)??s.find(i=>!i.format)}else r=t,n=e.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){const s=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function XQ(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const s=[],i=(St(e)||Yt(e))&&e.anchor;i&&kN(i)&&(n.add(i),s.push(`&${i}`));const l=e.tag??(t.default?null:t.tag);return l&&s.push(r.directives.tagString(l)),s.join(" ")}function Rl(e,t,n,r){if(en(e))return e.toString(t,n,r);if(Gl(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const i=Xt(e)?e:t.doc.createNode(e,{onTagObj:d=>s=d});s??(s=YQ(t.doc.schema.tags,i));const l=XQ(i,s,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const u=typeof s.stringify=="function"?s.stringify(i,t,n,r):St(i)?yx(i,t,n,r):i.toString(t,n,r);return l?St(i)||u[0]==="{"||u[0]==="["?`${l} ${u}`:`${l} +${t.indent}${u}`:u}function eY({key:e,value:t},n,r,s){const{allNullValues:i,doc:l,indent:u,indentStep:d,options:{commentString:f,indentSeq:p,simpleKeys:h}}=n;let x=Xt(e)&&e.comment||null;if(h){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(Yt(e)||!Xt(e)&&typeof e=="object"){const M="With simple keys, collection cannot be used as a key value";throw new Error(M)}}let v=!h&&(!e||x&&t==null&&!n.inFlow||Yt(e)||(St(e)?e.type===nt.BLOCK_FOLDED||e.type===nt.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!v&&(h||!i),indent:u+d});let y=!1,b=!1,j=Rl(e,n,()=>y=!0,()=>b=!0);if(!v&&!n.inFlow&&j.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(n.inFlow){if(i||t==null)return y&&r&&r(),j===""?"?":v?`? ${j}`:j}else if(i&&!h||t==null&&v)return j=`? ${j}`,x&&!y?j+=ea(j,n.indent,f(x)):b&&s&&s(),j;y&&(x=null),v?(x&&(j+=ea(j,n.indent,f(x))),j=`? ${j} +${u}:`):(j=`${j}:`,x&&(j+=ea(j,n.indent,f(x))));let S,N,k;Xt(t)?(S=!!t.spaceBefore,N=t.commentBefore,k=t.comment):(S=!1,N=null,k=null,t&&typeof t=="object"&&(t=l.createNode(t))),n.implicitKey=!1,!v&&!x&&St(t)&&(n.indentAtStart=j.length+1),b=!1,!p&&d.length>=2&&!n.inFlow&&!v&&dd(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let T=!1;const E=Rl(t,n,()=>T=!0,()=>b=!0);let O=" ";if(x||S||N){if(O=S?` +`:"",N){const M=f(N);O+=` +${lo(M,n.indent)}`}E===""&&!n.inFlow?O===` +`&&k&&(O=` + +`):O+=` +${n.indent}`}else if(!v&&Yt(t)){const M=E[0],L=E.indexOf(` +`),F=L!==-1,U=n.inFlow??t.flow??t.items.length===0;if(F||!U){let z=!1;if(F&&(M==="&"||M==="!")){let V=E.indexOf(" ");M==="&"&&V!==-1&&Ve===Ff||typeof e=="symbol"&&e.description===Ff,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new nt(Symbol(Ff)),{addToJSMap:MN}),stringify:()=>Ff},nY=(e,t)=>(mo.identify(t)||St(t)&&(!t.type||t.type===nt.PLAIN)&&mo.identify(t.value))&&e?.doc.schema.tags.some(n=>n.tag===mo.tag&&n.default);function MN(e,t,n){const r=AN(e,n);if(dd(r))for(const s of r.items)C1(e,t,s);else if(Array.isArray(r))for(const s of r)C1(e,t,s);else C1(e,t,r)}function C1(e,t,n){const r=AN(e,n);if(!Jl(r))throw new Error("Merge sources must be maps or map aliases");const s=r.toJSON(null,e,Map);for(const[i,l]of s)t instanceof Map?t.has(i)||t.set(i,l):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:l,writable:!0,enumerable:!0,configurable:!0});return t}function AN(e,t){return e&&Gl(t)?t.resolve(e.doc,e):t}function LN(e,t,{key:n,value:r}){if(Xt(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(nY(e,n))MN(e,t,r);else{const s=Hr(n,"",e);if(t instanceof Map)t.set(s,Hr(r,s,e));else if(t instanceof Set)t.add(s);else{const i=rY(n,s,e),l=Hr(r,i,e);i in t?Object.defineProperty(t,i,{value:l,writable:!0,enumerable:!0,configurable:!0}):t[i]=l}}return t}function rY(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Xt(e)&&n?.doc){const r=ON(n.doc,{});r.anchors=new Set;for(const i of n.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=e.toString(r);if(!n.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),tY(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function wx(e,t,n){const r=Mu(e,void 0,n),s=Mu(t,void 0,n);return new Xn(r,s)}class Xn{constructor(t,n=null){Object.defineProperty(this,qr,{value:_N}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return Xt(n)&&(n=n.clone(t)),Xt(r)&&(r=r.clone(t)),new Xn(n,r)}toJSON(t,n){const r=n?.mapAsMap?new Map:{};return LN(n,r,this)}toString(t,n,r){return t?.doc?eY(this,t,n,r):JSON.stringify(this)}}function RN(e,t,n){return(t.inFlow??e.flow?oY:sY)(e,t,n)}function sY({comment:e,items:t},n,{blockItemPrefix:r,flowChars:s,itemIndent:i,onChompKeep:l,onComment:u}){const{indent:d,options:{commentString:f}}=n,p=Object.assign({},n,{indent:i,type:null});let h=!1;const x=[];for(let y=0;yj=null,()=>h=!0);j&&(S+=ea(S,i,f(j))),h&&j&&(h=!1),x.push(r+S)}let v;if(x.length===0)v=s.start+s.end;else{v=x[0];for(let y=1;yj=null);f||(f=h.length>p||S.includes(` +`)),y0&&(f||(f=h.reduce((N,k)=>N+k.length+2,2)+(S.length+2)>t.options.lineWidth)),f&&(S+=",")),j&&(S+=ea(S,r,u(j))),h.push(S),p=h.length}const{start:x,end:v}=n;if(h.length===0)return x+v;if(!f){const y=h.reduce((b,j)=>b+j.length+2,2);f=t.options.lineWidth>0&&y>t.options.lineWidth}if(f){let y=x;for(const b of h)y+=b?` +${i}${s}${b}`:` +`;return`${y} +${s}${v}`}else return`${x}${l}${h.join(" ")}${l}${v}`}function J0({indent:e,options:{commentString:t}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){const i=lo(t(r),e);n.push(i.trimStart())}}function ta(e,t){const n=St(t)?t.value:t;for(const r of e)if(en(r)&&(r.key===t||r.key===n||St(r.key)&&r.key.value===n))return r}class Vr extends EN{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(fi,t),this.items=[]}static from(t,n,r){const{keepUndefined:s,replacer:i}=r,l=new this(t),u=(d,f)=>{if(typeof i=="function")f=i.call(n,d,f);else if(Array.isArray(i)&&!i.includes(d))return;(f!==void 0||s)&&l.items.push(wx(d,f,r))};if(n instanceof Map)for(const[d,f]of n)u(d,f);else if(n&&typeof n=="object")for(const d of Object.keys(n))u(d,n[d]);return typeof t.sortMapEntries=="function"&&l.items.sort(t.sortMapEntries),l}add(t,n){let r;en(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new Xn(t,t?.value):r=new Xn(t.key,t.value);const s=ta(this.items,r.key),i=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);St(s.value)&&SN(r.value)?s.value.value=r.value:s.value=r.value}else if(i){const l=this.items.findIndex(u=>i(r,u)<0);l===-1?this.items.push(r):this.items.splice(l,0,r)}else this.items.push(r)}delete(t){const n=ta(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const s=ta(this.items,t)?.value;return(!n&&St(s)?s.value:s)??void 0}has(t){return!!ta(this.items,t)}set(t,n){this.add(new Xn(t,n),!0)}toJSON(t,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const i of this.items)LN(n,s,i);return s}toString(t,n,r){if(!t)return JSON.stringify(this);for(const s of this.items)if(!en(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),RN(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const Yl={collection:"map",default:!0,nodeClass:Vr,tag:"tag:yaml.org,2002:map",resolve(e,t){return Jl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Vr.from(e,t,n)};class ma extends EN{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Kl,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Df(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Df(t);if(typeof r!="number")return;const s=this.items[r];return!n&&St(s)?s.value:s}has(t){const n=Df(t);return typeof n=="number"&&n=0?t:null}const Xl={collection:"seq",default:!0,nodeClass:ma,tag:"tag:yaml.org,2002:seq",resolve(e,t){return dd(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>ma.from(e,t,n)},Im={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),yx(e,t,n,r)}},$m={identify:e=>e==null,createNode:()=>new nt(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new nt(null),stringify:({source:e},t)=>typeof e=="string"&&$m.test.test(e)?e:t.options.nullStr},_x={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new nt(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&_x.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function hs({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let l=i.indexOf(".");l<0&&(l=i.length,i+=".");let u=t-(i.length-l-1);for(;u-- >0;)i+="0"}return i}const PN={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:hs},IN={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():hs(e)}},$N={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new nt(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:hs},Fm=e=>typeof e=="bigint"||Number.isInteger(e),jx=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function FN(e,t,n){const{value:r}=e;return Fm(r)&&r>=0?n+r.toString(t):hs(e)}const DN={identify:e=>Fm(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>jx(e,2,8,n),stringify:e=>FN(e,8,"0o")},BN={identify:Fm,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>jx(e,0,10,n),stringify:hs},UN={identify:e=>Fm(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>jx(e,2,16,n),stringify:e=>FN(e,16,"0x")},iY=[Yl,Xl,Im,$m,_x,DN,BN,UN,PN,IN,$N];function X4(e){return typeof e=="bigint"||Number.isInteger(e)}const Bf=({value:e})=>JSON.stringify(e),aY=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Bf},{identify:e=>e==null,createNode:()=>new nt(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Bf},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Bf},{identify:X4,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>X4(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Bf}],lY={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},cY=[Yl,Xl].concat(aY,lY),kx={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let s=0;s1&&t("Each pair must have its own sequence indicator");const s=r.items[0]||new Xn(new nt(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore} +${s.key.commentBefore}`:r.commentBefore),r.comment){const i=s.value??s.key;i.comment=i.comment?`${r.comment} +${i.comment}`:r.comment}r=s}e.items[n]=en(r)?r:new Xn(r)}}else t("Expected a sequence for this tag");return e}function VN(e,t,n){const{replacer:r}=n,s=new ma(e);s.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let l of t){typeof r=="function"&&(l=r.call(t,String(i++),l));let u,d;if(Array.isArray(l))if(l.length===2)u=l[0],d=l[1];else throw new TypeError(`Expected [key, value] tuple: ${l}`);else if(l&&l instanceof Object){const f=Object.keys(l);if(f.length===1)u=f[0],d=l[u];else throw new TypeError(`Expected tuple with one key, not ${f.length} keys`)}else u=l;s.items.push(wx(u,d,n))}return s}const Nx={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:zN,createNode:VN};class jl extends ma{constructor(){super(),this.add=Vr.prototype.add.bind(this),this.delete=Vr.prototype.delete.bind(this),this.get=Vr.prototype.get.bind(this),this.has=Vr.prototype.has.bind(this),this.set=Vr.prototype.set.bind(this),this.tag=jl.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n?.onCreate&&n.onCreate(r);for(const s of this.items){let i,l;if(en(s)?(i=Hr(s.key,"",n),l=Hr(s.value,i,n)):i=Hr(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,l)}return r}static from(t,n,r){const s=VN(t,n,r),i=new this;return i.items=s.items,i}}jl.tag="tag:yaml.org,2002:omap";const Cx={collection:"seq",identify:e=>e instanceof Map,nodeClass:jl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=zN(e,t),r=[];for(const{key:s}of n.items)St(s)&&(r.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new jl,n)},createNode:(e,t,n)=>jl.from(e,t,n)};function HN({value:e,source:t},n){return t&&(e?ZN:WN).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const ZN={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new nt(!0),stringify:HN},WN={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new nt(!1),stringify:HN},uY={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:hs},dY={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():hs(e)}},fY={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new nt(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:hs},fd=e=>typeof e=="bigint"||Number.isInteger(e);function Dm(e,t,n,{intAsBigInt:r}){const s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const l=BigInt(e);return s==="-"?BigInt(-1)*l:l}const i=parseInt(e,n);return s==="-"?-1*i:i}function Sx(e,t,n){const{value:r}=e;if(fd(r)){const s=r.toString(t);return r<0?"-"+n+s.substr(1):n+s}return hs(e)}const mY={identify:fd,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Dm(e,2,2,n),stringify:e=>Sx(e,2,"0b")},pY={identify:fd,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Dm(e,1,8,n),stringify:e=>Sx(e,8,"0")},hY={identify:fd,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Dm(e,0,10,n),stringify:hs},gY={identify:fd,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Dm(e,2,16,n),stringify:e=>Sx(e,16,"0x")};class kl extends Vr{constructor(t){super(t),this.tag=kl.tag}add(t){let n;en(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new Xn(t.key,null):n=new Xn(t,null),ta(this.items,n.key)||this.items.push(n)}get(t,n){const r=ta(this.items,t);return!n&&en(r)?St(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=ta(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Xn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n))for(let l of n)typeof s=="function"&&(l=s.call(n,l,l)),i.items.push(wx(l,null,r));return i}}kl.tag="tag:yaml.org,2002:set";const Ex={collection:"map",identify:e=>e instanceof Set,nodeClass:kl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>kl.from(e,t,n),resolve(e,t){if(Jl(e)){if(e.hasAllNullValues(!0))return Object.assign(new kl,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Tx(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,s=l=>t?BigInt(l):Number(l),i=r.replace(/_/g,"").split(":").reduce((l,u)=>l*s(60)+s(u),s(0));return n==="-"?s(-1)*i:i}function qN(e){let{value:t}=e,n=l=>l;if(typeof t=="bigint")n=l=>BigInt(l);else if(isNaN(t)||!isFinite(t))return hs(e);let r="";t<0&&(r="-",t*=n(-1));const s=n(60),i=[t%s];return t<60?i.unshift(0):(t=(t-i[0])/s,i.unshift(t%s),t>=60&&(t=(t-i[0])/s,i.unshift(t))),r+i.map(l=>String(l).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const KN={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Tx(e,n),stringify:qN},GN={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Tx(e,!1),stringify:qN},Bm={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Bm.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,s,i,l,u]=t.map(Number),d=t[7]?Number((t[7]+"00").substr(1,3)):0;let f=Date.UTC(n,r-1,s,i||0,l||0,u||0,d);const p=t[8];if(p&&p!=="Z"){let h=Tx(p,!1);Math.abs(h)<30&&(h*=60),f-=6e4*h}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},e8=[Yl,Xl,Im,$m,ZN,WN,mY,pY,hY,gY,uY,dY,fY,kx,mo,Cx,Nx,Ex,KN,GN,Bm],t8=new Map([["core",iY],["failsafe",[Yl,Xl,Im]],["json",cY],["yaml11",e8],["yaml-1.1",e8]]),n8={binary:kx,bool:_x,float:$N,floatExp:IN,floatNaN:PN,floatTime:GN,int:BN,intHex:UN,intOct:DN,intTime:KN,map:Yl,merge:mo,null:$m,omap:Cx,pairs:Nx,seq:Xl,set:Ex,timestamp:Bm},xY={"tag:yaml.org,2002:binary":kx,"tag:yaml.org,2002:merge":mo,"tag:yaml.org,2002:omap":Cx,"tag:yaml.org,2002:pairs":Nx,"tag:yaml.org,2002:set":Ex,"tag:yaml.org,2002:timestamp":Bm};function S1(e,t,n){const r=t8.get(t);if(r&&!e)return n&&!r.includes(mo)?r.concat(mo):r.slice();let s=r;if(!s)if(Array.isArray(e))s=[];else{const i=Array.from(t8.keys()).filter(l=>l!=="yaml11").map(l=>JSON.stringify(l)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${i} or define customTags array`)}if(Array.isArray(e))for(const i of e)s=s.concat(i);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(mo)),s.reduce((i,l)=>{const u=typeof l=="string"?n8[l]:l;if(!u){const d=JSON.stringify(l),f=Object.keys(n8).map(p=>JSON.stringify(p)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${f}`)}return i.includes(u)||i.push(u),i},[])}const vY=(e,t)=>e.keyt.key?1:0;class Ox{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:s,schema:i,sortMapEntries:l,toStringDefaults:u}){this.compat=Array.isArray(t)?S1(t,"compat"):t?S1(null,t):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?xY:{},this.tags=S1(n,this.name,r),this.toStringOptions=u??null,Object.defineProperty(this,fi,{value:Yl}),Object.defineProperty(this,Bs,{value:Im}),Object.defineProperty(this,Kl,{value:Xl}),this.sortMapEntries=typeof l=="function"?l:l===!0?vY:null}clone(){const t=Object.create(Ox.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function bY(e,t){const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const d=e.directives.toString(e);d?(n.push(d),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const s=ON(e,t),{commentString:i}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const d=i(e.commentBefore);n.unshift(lo(d,""))}let l=!1,u=null;if(e.contents){if(Xt(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const p=i(e.contents.commentBefore);n.push(lo(p,""))}s.forceBlockIndent=!!e.comment,u=e.contents.comment}const d=u?void 0:()=>l=!0;let f=Rl(e.contents,s,()=>u=null,d);u&&(f+=ea(f,"",i(u))),(f[0]==="|"||f[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${f}`:n.push(f)}else n.push(Rl(e.contents,s));if(e.directives?.docEnd)if(e.comment){const d=i(e.comment);d.includes(` +`)?(n.push("..."),n.push(lo(d,""))):n.push(`... ${d}`)}else n.push("...");else{let d=e.comment;d&&l&&(d=d.replace(/^\n+/,"")),d&&((!l||u)&&n[n.length-1]!==""&&n.push(""),n.push(lo(i(d),"")))}return n.join(` +`)+` +`}class md{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,qr,{value:Bg});let s=null;typeof n=="function"||Array.isArray(n)?s=n:r===void 0&&n&&(r=n,n=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:l}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(l=this.directives.yaml.version)):this.directives=new Jn({version:l}),this.setSchema(l,r),this.contents=t===void 0?null:this.createNode(t,s,r)}clone(){const t=Object.create(md.prototype,{[qr]:{value:Bg}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Xt(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){tl(this.contents)&&this.contents.add(t)}addIn(t,n){tl(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const r=NN(this);t.anchor=!n||r.has(n)?CN(n||"a",r):n}return new bx(t.anchor)}createNode(t,n,r){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const j=N=>typeof N=="number"||N instanceof String||N instanceof Number,S=n.filter(j).map(String);S.length>0&&(n=n.concat(S)),s=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:i,anchorPrefix:l,flow:u,keepUndefined:d,onTagObj:f,tag:p}=r??{},{onAnchor:h,setAnchors:x,sourceObjects:v}=WQ(this,l||"a"),y={aliasDuplicateObjects:i??!0,keepUndefined:d??!1,onAnchor:h,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:v},b=Mu(t,p,y);return u&&Yt(b)&&(b.flow=!0),x(),b}createPair(t,n,r={}){const s=this.createNode(t,null,r),i=this.createNode(n,null,r);return new Xn(s,i)}delete(t){return tl(this.contents)?this.contents.delete(t):!1}deleteIn(t){return tu(t)?this.contents==null?!1:(this.contents=null,!0):tl(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Yt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return tu(t)?!n&&St(this.contents)?this.contents.value:this.contents:Yt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Yt(this.contents)?this.contents.has(t):!1}hasIn(t){return tu(t)?this.contents!==void 0:Yt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=G0(this.schema,[t],n):tl(this.contents)&&this.contents.set(t,n)}setIn(t,n){tu(t)?this.contents=n:this.contents==null?this.contents=G0(this.schema,Array.from(t),n):tl(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Jn({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Jn({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new Ox(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:s,onAnchor:i,reviver:l}={}){const u={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},d=Hr(this.contents,n??"",u);if(typeof i=="function")for(const{count:f,res:p}of u.anchors.values())i(p,f);return typeof l=="function"?ml(l,{"":d},"",d):d}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return bY(this,t)}}function tl(e){if(Yt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class JN extends Error{constructor(t,n,r,s){super(),this.name=t,this.code=r,this.message=s,this.pos=n}}class nu extends JN{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class yY extends JN{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const r8=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(u=>t.linePos(u));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,l=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&l.length>80){const u=Math.min(i-39,l.length-79);l="…"+l.substring(u),i-=u-1}if(l.length>80&&(l=l.substring(0,79)+"…"),r>1&&/^ *$/.test(l.substring(0,i))){let u=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);u.length>80&&(u=u.substring(0,79)+`… +`),l=u+l}if(/[^ ]/.test(l)){let u=1;const d=n.linePos[1];d?.line===r&&d.col>s&&(u=Math.max(1,Math.min(d.col-s,80-i)));const f=" ".repeat(i)+"^".repeat(u);n.message+=`: + +${l} +${f} +`}};function Pl(e,{flow:t,indicator:n,next:r,offset:s,onError:i,parentIndent:l,startOnNewline:u}){let d=!1,f=u,p=u,h="",x="",v=!1,y=!1,b=null,j=null,S=null,N=null,k=null,T=null,E=null;for(const L of e)switch(y&&(L.type!=="space"&&L.type!=="newline"&&L.type!=="comma"&&i(L.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),b&&(f&&L.type!=="comment"&&L.type!=="newline"&&i(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),b=null),L.type){case"space":!t&&(n!=="doc-start"||r?.type!=="flow-collection")&&L.source.includes(" ")&&(b=L),p=!0;break;case"comment":{p||i(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const F=L.source.substring(1)||" ";h?h+=x+F:h=F,x="",f=!1;break}case"newline":f?h?h+=L.source:(!T||n!=="seq-item-ind")&&(d=!0):x+=L.source,f=!0,v=!0,(j||S)&&(N=L),p=!0;break;case"anchor":j&&i(L,"MULTIPLE_ANCHORS","A node can have at most one anchor"),L.source.endsWith(":")&&i(L.offset+L.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),j=L,E??(E=L.offset),f=!1,p=!1,y=!0;break;case"tag":{S&&i(L,"MULTIPLE_TAGS","A node can have at most one tag"),S=L,E??(E=L.offset),f=!1,p=!1,y=!0;break}case n:(j||S)&&i(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`),T&&i(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${t??"collection"}`),T=L,f=n==="seq-item-ind"||n==="explicit-key-ind",p=!1;break;case"comma":if(t){k&&i(L,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),k=L,f=!1,p=!1;break}default:i(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),f=!1,p=!1}const O=e[e.length-1],M=O?O.offset+O.source.length:s;return y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b&&(f&&b.indent<=l||r?.type==="block-map"||r?.type==="block-seq")&&i(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:T,spaceBefore:d,comment:h,hasNewline:v,anchor:j,tag:S,newlineAfterProp:N,end:M,start:E??M}}function Au(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(` +`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(Au(t.key)||Au(t.value))return!0}return!1;default:return!0}}function Hg(e,t,n){if(t?.type==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&Au(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function QN(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const s=typeof r=="function"?r:(i,l)=>i===l||St(i)&&St(l)&&i.value===l.value;return t.some(i=>s(i.key,n))}const s8="All mapping items must start at the same column";function wY({composeNode:e,composeEmptyNode:t},n,r,s,i){const l=i?.nodeClass??Vr,u=new l(n.schema);n.atRoot&&(n.atRoot=!1);let d=r.offset,f=null;for(const p of r.items){const{start:h,key:x,sep:v,value:y}=p,b=Pl(h,{indicator:"explicit-key-ind",next:x??v?.[0],offset:d,onError:s,parentIndent:r.indent,startOnNewline:!0}),j=!b.found;if(j){if(x&&(x.type==="block-seq"?s(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==r.indent&&s(d,"BAD_INDENT",s8)),!b.anchor&&!b.tag&&!v){f=b.end,b.comment&&(u.comment?u.comment+=` +`+b.comment:u.comment=b.comment);continue}(b.newlineAfterProp||Au(x))&&s(x??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else b.found?.indent!==r.indent&&s(d,"BAD_INDENT",s8);n.atKey=!0;const S=b.end,N=x?e(n,x,b,s):t(n,S,h,null,b,s);n.schema.compat&&Hg(r.indent,x,s),n.atKey=!1,QN(n,u.items,N)&&s(S,"DUPLICATE_KEY","Map keys must be unique");const k=Pl(v??[],{indicator:"map-value-ind",next:y,offset:N.range[2],onError:s,parentIndent:r.indent,startOnNewline:!x||x.type==="block-scalar"});if(d=k.end,k.found){j&&(y?.type==="block-map"&&!k.hasNewline&&s(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&b.starte&&(e.type==="block-map"||e.type==="block-seq");function jY({composeNode:e,composeEmptyNode:t},n,r,s,i){const l=r.start.source==="{",u=l?"flow map":"flow sequence",d=i?.nodeClass??(l?Vr:ma),f=new d(n.schema);f.flow=!0;const p=n.atRoot;p&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let h=r.offset+r.start.source.length;for(let j=0;j0){const j=pd(y,b,n.options.strict,s);j.comment&&(f.comment?f.comment+=` +`+j.comment:f.comment=j.comment),f.range=[r.offset,b,j.offset]}else f.range=[r.offset,b,b];return f}function O1(e,t,n,r,s,i){const l=n.type==="block-map"?wY(e,t,n,r,i):n.type==="block-seq"?_Y(e,t,n,r,i):jY(e,t,n,r,i),u=l.constructor;return s==="!"||s===u.tagName?(l.tag=u.tagName,l):(s&&(l.tag=s),l)}function kY(e,t,n,r,s){const i=r.tag,l=i?t.directives.tagName(i.source,x=>s(i,"TAG_RESOLVE_FAILED",x)):null;if(n.type==="block-seq"){const{anchor:x,newlineAfterProp:v}=r,y=x&&i?x.offset>i.offset?x:i:x??i;y&&(!v||v.offsetx.tag===l&&x.collection===u);if(!d){const x=t.schema.knownTags[l];if(x?.collection===u)t.schema.tags.push(Object.assign({},x,{default:!1})),d=x;else return x?s(i,"BAD_COLLECTION_TYPE",`${x.tag} used for ${u} collection, but expects ${x.collection??"scalar"}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${l}`,!0),O1(e,t,n,s,l)}const f=O1(e,t,n,s,l,d),p=d.resolve?.(f,x=>s(i,"TAG_RESOLVE_FAILED",x),t.options)??f,h=Xt(p)?p:new nt(p);return h.range=f.range,h.tag=l,d?.format&&(h.format=d.format),h}function NY(e,t,n){const r=t.offset,s=CY(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};const i=s.mode===">"?nt.BLOCK_FOLDED:nt.BLOCK_LITERAL,l=t.source?SY(t.source):[];let u=l.length;for(let b=l.length-1;b>=0;--b){const j=l[b][1];if(j===""||j==="\r")u=b;else break}if(u===0){const b=s.chomp==="+"&&l.length>0?` +`.repeat(Math.max(1,l.length-1)):"";let j=r+s.length;return t.source&&(j+=t.source.length),{value:b,type:i,comment:s.comment,range:[r,j,j]}}let d=t.indent+s.indent,f=t.offset+s.length,p=0;for(let b=0;bd&&(d=j.length);else{j.length=u;--b)l[b][0].length>d&&(u=b+1);let h="",x="",v=!1;for(let b=0;bd||S[0]===" "?(x===" "?x=` +`:!v&&x===` +`&&(x=` + +`),h+=x+j.slice(d)+S,x=` +`,v=!0):S===""?x===` +`?h+=` +`:x=` +`:(h+=x+S,x=" ",v=!1)}switch(s.chomp){case"-":break;case"+":for(let b=u;bn(r+x,v,y);switch(s){case"scalar":u=nt.PLAIN,d=TY(i,f);break;case"single-quoted-scalar":u=nt.QUOTE_SINGLE,d=OY(i,f);break;case"double-quoted-scalar":u=nt.QUOTE_DOUBLE,d=MY(i,f);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}const p=r+i.length,h=pd(l,p,t,n);return{value:d,type:u,comment:h.comment,range:[r,p,h.offset]}}function TY(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),YN(e)}function OY(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),YN(e.slice(1,-1)).replace(/''/g,"'")}function YN(e){let t,n;try{t=new RegExp(`(.*?)(?i?e.slice(i,r+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function AY(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===` +`||r==="\r")&&!(r==="\r"&&e[t+2]!==` +`);)r===` +`&&(n+=` +`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}const LY={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` +`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function RY(e,t,n,r){const s=e.substr(t,n),l=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(l)}catch{const u=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}}function XN(e,t,n,r){const{value:s,type:i,comment:l,range:u}=t.type==="block-scalar"?NY(e,t,r):EY(t,e.options.strict,r),d=n?e.directives.tagName(n.source,h=>r(n,"TAG_RESOLVE_FAILED",h)):null;let f;e.options.stringKeys&&e.atKey?f=e.schema[Bs]:d?f=PY(e.schema,s,d,n,r):t.type==="scalar"?f=IY(e,s,t,r):f=e.schema[Bs];let p;try{const h=f.resolve(s,x=>r(n??t,"TAG_RESOLVE_FAILED",x),e.options);p=St(h)?h:new nt(h)}catch(h){const x=h instanceof Error?h.message:String(h);r(n??t,"TAG_RESOLVE_FAILED",x),p=new nt(s)}return p.range=u,p.source=s,i&&(p.type=i),d&&(p.tag=d),f.format&&(p.format=f.format),l&&(p.comment=l),p}function PY(e,t,n,r,s){if(n==="!")return e[Bs];const i=[];for(const u of e.tags)if(!u.collection&&u.tag===n)if(u.default&&u.test)i.push(u);else return u;for(const u of i)if(u.test?.test(t))return u;const l=e.knownTags[n];return l&&!l.collection?(e.tags.push(Object.assign({},l,{default:!1,test:void 0})),l):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Bs])}function IY({atKey:e,directives:t,schema:n},r,s,i){const l=n.tags.find(u=>(u.default===!0||e&&u.default==="key")&&u.test?.test(r))||n[Bs];if(n.compat){const u=n.compat.find(d=>d.default&&d.test?.test(r))??n[Bs];if(l.tag!==u.tag){const d=t.tagString(l.tag),f=t.tagString(u.tag),p=`Value may be parsed as either ${d} or ${f}`;i(s,"TAG_RESOLVE_FAILED",p,!0)}}return l}function $Y(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let s=t[r];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++r];s?.type==="space";)e+=s.source.length,s=t[++r];break}}return e}const FY={composeNode:eC,composeEmptyNode:Mx};function eC(e,t,n,r){const s=e.atKey,{spaceBefore:i,comment:l,anchor:u,tag:d}=n;let f,p=!0;switch(t.type){case"alias":f=DY(e,t,r),(u||d)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":f=XN(e,t,d,r),u&&(f.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{f=kY(FY,e,t,n,r),u&&(f.anchor=u.source.substring(1))}catch(h){const x=h instanceof Error?h.message:String(h);r(t,"RESOURCE_EXHAUSTION",x)}break;default:{const h=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",h),p=!1}}return f??(f=Mx(e,t.offset,void 0,null,n,r)),u&&f.anchor===""&&r(u,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!St(f)||typeof f.value!="string"||f.tag&&f.tag!=="tag:yaml.org,2002:str")&&r(d??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(f.spaceBefore=!0),l&&(t.type==="scalar"&&t.source===""?f.comment=l:f.commentBefore=l),e.options.keepSourceTokens&&p&&(f.srcToken=t),f}function Mx(e,t,n,r,{spaceBefore:s,comment:i,anchor:l,tag:u,end:d},f){const p={type:"scalar",offset:$Y(t,n,r),indent:-1,source:""},h=XN(e,p,u,f);return l&&(h.anchor=l.source.substring(1),h.anchor===""&&f(l,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(h.spaceBefore=!0),i&&(h.comment=i,h.range[2]=d),h}function DY({options:e},{offset:t,source:n,end:r},s){const i=new bx(n.substring(1));i.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const l=t+n.length,u=pd(r,l,e.strict,s);return i.range=[t,l,u.offset],u.comment&&(i.comment=u.comment),i}function BY(e,t,{offset:n,start:r,value:s,end:i},l){const u=Object.assign({_directives:t},e),d=new md(void 0,u),f={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},p=Pl(r,{indicator:"doc-start",next:s??i?.[0],offset:n,onError:l,parentIndent:0,startOnNewline:!0});p.found&&(d.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!p.hasNewline&&l(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=s?eC(f,s,p,l):Mx(f,p.end,r,null,p,l);const h=d.contents.range[2],x=pd(i,h,!1,l);return x.comment&&(d.comment=x.comment),d.range=[n,h,x.offset],d}function Zc(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function o8(e){let t="",n=!1,r=!1;for(let s=0;s{const l=Zc(n);i?this.warnings.push(new yY(l,r,s)):this.errors.push(new nu(l,r,s))},this.directives=new Jn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:s}=o8(this.prelude);if(r){const i=t.contents;if(n)t.comment=t.comment?`${t.comment} +${r}`:r;else if(s||t.directives.docStart||!i)t.commentBefore=r;else if(Yt(i)&&!i.flow&&i.items.length>0){let l=i.items[0];en(l)&&(l=l.key);const u=l.commentBefore;l.commentBefore=u?`${r} +${u}`:r}else{const l=i.commentBefore;i.commentBefore=l?`${r} +${l}`:r}}if(n){for(let i=0;i{const i=Zc(t);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",r,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=BY(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new nu(Zc(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new nu(Zc(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=pd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r} +${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new nu(Zc(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),s=new md(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}const tC="\uFEFF",nC="",rC="",Zg="";function zY(e){switch(e){case tC:return"byte-order-mark";case nC:return"doc-mode";case rC:return"flow-error-end";case Zg:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +`:case`\r +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function ls(e){switch(e){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}const i8=new Set("0123456789ABCDEFabcdef"),VY=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Uf=new Set(",[]{}"),HY=new Set(` ,[]{} +\r `),M1=e=>!e||HY.has(e);class ZY{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===` +`?!0:n==="\r"?this.buffer[t+1]===` +`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){const s=this.buffer[r+t+1];if(s===` +`||!s&&!this.atEnd)return t+r+1}return n===` +`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&ls(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&tthis.indentValue&&!ls(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&ls(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(M1),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((r!==-1&&r"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>ls(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case` +`:t=i,n=0;break;case"\r":{const l=this.buffer[i+1];if(!l&&!this.atEnd)return this.setNext("block-scalar");if(l===` +`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const i=this.continueScalar(t+1);if(i===-1)break;t=this.buffer.indexOf(` +`,i)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let s=t+1;for(r=this.buffer[s];r===" ";)r=this.buffer[++s];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===` +`;)r=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let i=t-1,l=this.buffer[i];l==="\r"&&(l=this.buffer[--i]);const u=i;for(;l===" ";)l=this.buffer[--i];if(l===` +`&&i>=this.pos&&i+1+n>u)t=i;else break}while(!0);return yield Zg,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,s;for(;s=this.buffer[++r];)if(s===":"){const i=this.buffer[r+1];if(ls(i)||t&&Uf.has(i))break;n=r}else if(ls(s)){let i=this.buffer[r+1];if(s==="\r"&&(i===` +`?(r+=1,s=` +`,i=this.buffer[r+1]):n=r),i==="#"||t&&Uf.has(i))break;if(s===` +`){const l=this.continueScalar(r+1);if(l===-1)break;r=Math.max(r,l-2)}}else{if(t&&Uf.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield Zg,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(M1),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{const n=this.flowLevel>0,r=this.charAt(1);if(ls(r)||n&&Uf.has(r)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!ls(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(VY.has(n))n=this.buffer[++t];else if(n==="%"&&i8.has(this.buffer[t+1])&&i8.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===` +`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===` +`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class WY{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n>1;this.lineStarts[i]=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function Q0(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&t?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&l8(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const s=r.items[r.items.length-1];if(s.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=r.items[r.items.length-1];s.value?r.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=r.items[r.items.length-1];!s||s.value?r.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&a8(s.start)===-1&&(n.indent===0||s.start.every(i=>i.type!=="comment"||i.indent=t.indent){const r=!this.onKeyLine&&this.indent===t.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let i=[];if(s&&n.sep&&!n.value){const l=[];for(let u=0;ut.indent&&(l.length=0);break;default:l.length=0}}l.length>=2&&(i=n.sep.splice(l[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(i.push(this.sourceToken),t.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(i.push(this.sourceToken),t.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Jo(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(sC(n.key)&&!Jo(n.sep,"newline")){const l=nl(n.start),u=n.key,d=n.sep;d.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:u,sep:d}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(Jo(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const l=nl(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?t.items.push({start:i,key:null,sep:[this.sourceToken]}):Jo(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);s||n.value?(t.items.push({start:i,key:l,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(l):(Object.assign(n,{key:l,sep:[]}),this.onKeyLine=!0);return}default:{const l=this.startBlockValue(t);if(l){if(l.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Jo(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&t.items.push({start:i});this.stack.push(l);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2]?.value?.end;if(Array.isArray(s)){Q0(s,n.start),s.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||Jo(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const r=this.startBlockValue(t);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const s=zf(r),i=nl(s);l8(t);const l=t.end.splice(1,t.end.length);l.push(this.sourceToken);const u={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(` +`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(` +`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=zf(t),r=nl(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=zf(t),r=nl(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function KY(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new WY||null,prettyErrors:t}}function GY(e,t={}){const{lineCounter:n,prettyErrors:r}=KY(t),s=new qY(n?.addNewLine),i=new UY(t);let l=null;for(const u of i.compose(s.parse(e),!0,e.length))if(!l)l=u;else if(l.options.logLevel!=="silent"){l.errors.push(new nu(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(l.errors.forEach(r8(e,n)),l.warnings.forEach(r8(e,n))),l}function JY(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(e===void 0){const{keepUndefined:s}=n??t??{};if(!s)return}return ud(e)&&!r?e.toString(n):new md(e,r,n).toString(n)}function QY(e,t={}){const n=Ax(e),{language:r,meta:s}=hd(n),i=Lx(r,s,t)&&iC(r,s)?`{} +`:"";return`\`\`\`${n} +${i}\`\`\` +`}function YY(){return`- [ ] +`}function Um(e){const t=GY(e,{prettyErrors:!1}),n=t.errors[0];if(n)return{ok:!1,error:n.message};const r=rX(t);return r==null?{ok:!0,value:{}}:lC(r)?{ok:!0,value:r}:{ok:!1,error:"YAML root must be an object"}}function oC(e){const t=lC(e)?e:{},n=JY(t,{lineWidth:0,collectionStyle:"block"});return n.endsWith(` +`)?n:`${n} +`}function XY(e){return Object.keys(e??{})}function zm(e,t){return[e,t].map(n=>n.trim()).filter(Boolean).join(" ")}function hd(e){const[t="",...n]=e.trim().split(/\s+/).filter(Boolean);return{language:t,meta:n.join(" ")}}function eX(e){return(e??"").trim().split(/\s+/).find(Boolean)??""}function Ax(e){const t=nX(e),n=aC(t);return n?`yaml ${n}`:t}function ya(e,t){const n=Rx(e),r=zm(n,t??""),s=aC(r);return s||(n==="ai"?"ai":n==="prompt"?"prompt":n==="exec"?"exec":["bash","shell","sh"].includes(n)?"shell":n==="yaml"||n==="yml"?"yaml":"code")}function tX(e,t){const n=Rx(e),r=(t??"").trim(),s=zm(n,r),i=ya(n,r);return s?i==="test"||i==="lint"?[...new Set([s,i,`yaml ${i}`])]:i==="exec"||i==="shell"?[...new Set([s,n,i,"exec"])]:i==="yaml"?[s]:[]:[]}function Lx(e,t,n){for(const r of tX(e,t)){const s=n?.[r];if(s!=null)return s}}function iC(e,t){const n=Rx(e),r=ya(n,t??"");return n==="yaml"||n==="yml"||r==="test"||r==="lint"}function aC(e){const t=e.trim().toLowerCase().split(/\s+/).filter(Boolean),n=t.at(-1);return n!=="test"&&n!=="lint"?"":t.length===1||t.length===2&&t[0]==="yaml"?n:""}function nX(e){const{language:t,meta:n}=hd(e);return zm(t,n)}function Rx(e){return(e??"").trim().toLowerCase()}function rX(e){return e.contents!=null&&!Jl(e.contents),e.toJSON()}function lC(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function sX(e,t,n){const r=e??"",s=t??"";if(Lx(r,s,n)!=null)return!0;const i=ya(r,s);return i==="test"||i==="lint"||i==="exec"||i==="ai"||i==="prompt"?!0:(r.toLowerCase()==="yaml"||r.toLowerCase()==="yml")&&eX(s)!==""}function c8({info:e,body:t,badge:n,helper:r,readOnly:s,onChange:i}){return o.jsxs("div",{className:"flex flex-col gap-2",children:[(n!=null||r!=null)&&o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n,r!=null&&o.jsx("span",{className:"text-xs text-muted-foreground",children:r})]}),o.jsx("textarea",{"aria-label":`${e||"fence"} source`,value:t,onChange:l=>i(l.currentTarget.value),readOnly:s,spellCheck:!1,className:R("min-h-40 w-full resize-y rounded-md border border-input bg-background px-3 py-2 font-mono text-xs leading-5 text-foreground shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",s&&"cursor-default bg-muted/40")})]})}function oX({info:e,body:t,schema:n,parseAsYaml:r,known:s,readOnly:i,onChangeBody:l}){const u=w.useMemo(()=>r?Um(t):void 0,[t,r]),d=w.useMemo(()=>r?void 0:iX(t),[t,r]),f=r?u?.ok===!0?u.value:void 0:d?.value;return n!=null&&f!=null?o.jsxs("div",{className:"flex flex-col border-t border-border",children:[o.jsx(A1,{title:"Structured options",children:o.jsx(vm,{schema:n,value:f,onChange:h=>l(r?oC(h):aX(h)),readOnly:i,size:"md",showPreferencesMenu:!1,persistPreferences:!1,layout:{mode:"inline",labelMaxWidth:"12rem",valueMaxWidth:"min(100%, 34rem)"}})}),o.jsx(A1,{title:"Source",children:o.jsx(c8,{info:e,body:t,readOnly:i,onChange:l})})]}):o.jsx(A1,{title:"Source",aside:cX(r,n,u,s),children:o.jsx(c8,{info:e,body:t,helper:u?.ok===!1?u.error:void 0,readOnly:i,onChange:l})})}function iX(e){const t=Um(e);return t.ok&&cC(t.value)&&typeof t.value.content=="string"?{value:t.value}:{value:{content:e}}}function aX(e){const t=typeof e.content=="string"?e.content:"",n={};for(const[r,s]of Object.entries(e))r!=="content"&&(lX(s)||(n[r]=s));return Object.keys(n).length===0?t:oC({content:t,...n})}function lX(e){return e==null||e===""?!0:Array.isArray(e)?e.length===0:cC(e)?Object.keys(e).length===0:!1}function cC(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function cX(e,t,n,r){if(n?.ok===!1)return o.jsx(xo,{variant:"status",status:"error",size:"xs",clickToCopy:!1,children:"YAML error"});if(e&&t==null&&!r)return o.jsx(xo,{variant:"status",status:"warning",size:"xs",clickToCopy:!1,children:"Unknown fence"})}function A1({title:e,aside:t,children:n}){return o.jsxs("section",{className:"border-b border-border last:border-b-0",children:[o.jsxs("div",{className:"flex min-h-9 items-center justify-between gap-3 bg-muted/30 px-4 py-2",children:[o.jsx("h4",{className:"text-xs font-semibold uppercase tracking-normal text-muted-foreground",children:e}),t]}),o.jsx("div",{className:"min-w-0 p-4",children:n})]})}const uC=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M146 92a10 10 0 1 1 10 10a10 10 0 0 1-10-10m-46-10a10 10 0 1 0 10 10a10 10 0 0 0-10-10m146 46a6 6 0 0 1-6 6h-26v10a85.9 85.9 0 0 1-3.45 24.08l23.85 10.42a6 6 0 0 1-4.8 11l-23.23-10.15a86 86 0 0 1-156.74 0L26.4 189.5a6 6 0 1 1-4.8-11l23.85-10.42A85.9 85.9 0 0 1 42 144v-10H16a6 6 0 0 1 0-12h26v-10a85.9 85.9 0 0 1 3.45-24.08L21.6 77.5a6 6 0 0 1 4.8-11l23.23 10.15a86 86 0 0 1 156.74 0L229.6 66.5a6 6 0 1 1 4.8 11l-23.85 10.42A85.9 85.9 0 0 1 214 112v10h26a6 6 0 0 1 6 6m-192-6h148v-10a74 74 0 0 0-148 0Zm68 95.74V134H54v10a74.09 74.09 0 0 0 68 73.74M202 134h-68v83.74A74.09 74.09 0 0 0 202 144Z"})}),{__source:"ph:bug-light",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"bug",displayName:"UiBug"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M168 92a12 12 0 1 1-12-12a12 12 0 0 1 12 12m-68-12a12 12 0 1 0 12 12a12 12 0 0 0-12-12m116 64a87.8 87.8 0 0 1-3 23l22.24 9.72A8 8 0 0 1 232 192a7.9 7.9 0 0 1-3.2-.67L207.38 182a88 88 0 0 1-158.76 0l-21.42 9.33a7.9 7.9 0 0 1-3.2.67a8 8 0 0 1-3.2-15.33L43 167a87.8 87.8 0 0 1-3-23v-8H16a8 8 0 0 1 0-16h24v-8a87.8 87.8 0 0 1 3-23l-22.2-9.67a8 8 0 1 1 6.4-14.66L48.62 74a88 88 0 0 1 158.76 0l21.42-9.36a8 8 0 0 1 6.4 14.66L213 89.05a87.8 87.8 0 0 1 3 23v8h24a8 8 0 0 1 0 16h-24Zm-80 0a8 8 0 0 0-16 0v64a8 8 0 0 0 16 0Zm64-32a72 72 0 0 0-144 0v8h144Z"})}),{__source:"ph:bug-fill",__viewBox:"0 0 256 256",__group:"dev-tools",__consumerName:"bug",displayName:"UiBugFilled"});const dC=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",children:[o.jsx("circle",{cx:"8",cy:"8",r:"6.5",fill:"#FFF7F7",stroke:"#DB3B4B"}),o.jsx("path",{d:"M8.46217 11.5H9.46061V10.5943H8.59311C8.26575 10.5943 8.02023 10.3488 8.02023 10.0214V6.81878H9.46061L9.46606 5.91309H8.02023V4.5H7.07635V5.44934C7.07635 5.72214 6.88539 5.91309 6.6126 5.91309H5.90878L5.90332 6.81878H6.9836L6.98906 10.1142C6.98906 10.9108 7.61104 11.5 8.46217 11.5Z",fill:"#DB3B4B"})]})}),{__source:"jb-expui-nodes:test",__viewBox:"0 0 16 16",__group:"uir-ast-code",__consumerName:"uir-test",displayName:"UiTest"});function uX({code:e,language:t,meta:n,context:r,schemas:s,readOnly:i,size:l}){const[u,d]=w.useState(!1),f=zm(t,n)||t||"fence",p=ya(t,n),h=fX(p,f),x=Lx(t,n,s),v=dX(p),y=iC(t,n),b=mX(e,y),j=y&&!Um(e).ok,S=x!=null||p==="test"||p==="lint"||p==="exec"||p==="ai"||p==="prompt";return o.jsxs("section",{className:R("my-2 w-full min-w-0 max-w-[48rem] overflow-hidden rounded-md border bg-card text-card-foreground shadow-sm transition-colors",u?"border-primary/40":"border-border hover:border-primary/30"),children:[o.jsxs("button",{type:"button","aria-expanded":u,"aria-label":`${u?"Collapse":"Expand"} ${h}`,onClick:()=>d(N=>!N),className:"flex w-full min-w-0 items-center gap-3 px-3 py-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[o.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-border bg-background text-muted-foreground shadow-sm",children:o.jsx(K,{icon:v,className:"text-2xl"})}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsxs("span",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[o.jsx("span",{className:"min-w-0 truncate text-sm font-semibold",children:h}),j&&o.jsx(xo,{variant:"status",status:"error",size:"xs",clickToCopy:!1,children:"YAML error"}),!S&&o.jsx(xo,{variant:"status",status:"warning",size:"xs",clickToCopy:!1,children:"Unknown"})]}),o.jsx("span",{className:"mt-1 block truncate font-mono text-xs text-muted-foreground",children:f}),b&&o.jsx("span",{className:"mt-0.5 block truncate text-xs text-muted-foreground",children:b})]}),o.jsx(K,{icon:u?Vt:ds,className:"text-xl text-muted-foreground"})]}),u&&o.jsx(oX,{info:f,body:e,schema:x,parseAsYaml:y,known:S,readOnly:i,size:l,onChangeBody:r.setCode})]})}function dX(e){switch(e){case"ai":case"prompt":return ms;case"test":return dC;case"lint":return uC;case"exec":case"shell":return fr;case"yaml":case"code":return ou}}function fX(e,t){return e==="test"||e==="lint"?e:t}function mX(e,t){if(t){const n=Um(e);if(n.ok){const r=n.value,s=L1(r,"name"),i=L1(r,"command"),l=L1(r,"engine");return[s,i,l].filter(Boolean).join(" - ")}}return e.split(/\r?\n/).map(n=>n.trim()).find(Boolean)??""}function L1(e,t){const n=e[t];return typeof n=="string"?n:""}const pX=w.lazy(async()=>({default:(await Rt(()=>import("./FixtureFrontmatterDialog-DBdNoV8I.js"),[])).FixtureFrontmatterDialog})),hX={ai:"AI",bash:"Bash",exec:"Exec",json:"JSON",lint:"YAML",markdown:"Markdown",prompt:"Prompt",shell:"Shell",sh:"Shell",test:"YAML",yaml:"YAML",yml:"YAML"};function gX({value:e,onChange:t,schemas:n={},allowedFences:r,frontmatterEditor:s,readOnly:i=!1,size:l="md",placeholder:u="Write fixture markdown...",className:d}){const[f,p]=w.useState(!1),h=_X(s),x=w.useMemo(()=>bX(r,n),[r,n]),v=w.useMemo(()=>vX({schemas:n,readOnly:i,size:l}),[n,i,l]),y=b=>{const j=e===""||e.endsWith(` +`)?"":` + +`;t(`${e}${j}${b}`)};return o.jsxs("div",{className:R("flex flex-col gap-3",d),children:[o.jsx(xX,{readOnly:i,fenceOptions:x,onEditFrontmatter:h?()=>p(!0):void 0,onAddFence:b=>y(QY(b,n)),onAddChecklist:()=>y(YY())}),o.jsx(gx,{value:e,onChange:t,readOnly:i,size:l,placeholder:u,"aria-label":"Fixture markdown",headings:!0,lists:!0,quote:!0,links:!0,tables:!0,thematicBreak:!0,codeBlocks:{defaultLanguage:"yaml",editorDescriptors:[v]},codeMirror:{languages:hX},markdownShortcuts:!0,diffMode:{viewMode:"rich-text",viewModes:["rich-text","source"]},className:"border-0 shadow-none",contentClassName:"min-h-96 px-4 py-3",textareaClassName:"min-h-96 rounded-none border-0 shadow-none"}),h&&o.jsx(w.Suspense,{fallback:null,children:o.jsx(pX,{open:f,markdown:e,onChange:t,onClose:()=>p(!1),size:l,options:h})})]})}function xX({readOnly:e,fenceOptions:t,onEditFrontmatter:n,onAddFence:r,onAddChecklist:s}){return e?null:o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx(Fl,{label:"Add fence",icon:pr,size:"sm",variant:"outline",menuLabel:"Add fixture fence",items:t.map(i=>({label:i.label,icon:yX(i.info),onSelect:()=>r(i.info),...i.description?{title:i.description}:{}}))}),o.jsxs(Fe,{type:"button",variant:"outline",size:"sm",onClick:s,children:[o.jsx(K,{icon:zl}),"Add checklist"]}),n&&o.jsxs(Fe,{type:"button",variant:"outline",size:"sm",onClick:n,children:[o.jsx(K,{icon:Zl}),"Frontmatter"]})]})}function vX({schemas:e,readOnly:t,size:n}){return{priority:100,match:(r,s)=>sX(r,s,e),Editor:r=>o.jsx(uX,{...r,schemas:e,readOnly:t,size:n})}}function bX(e,t){const n=e??wX(t),r=new Set,s=[];for(const i of n){const l=typeof i=="string"?i:i.info,u=Ax(l);if(!u||r.has(u))continue;r.add(u);const d=typeof i=="string"?u8(l):String(i.label??u8(l)),f=typeof i=="string"||i.description==null?void 0:String(i.description);s.push({info:u,label:d,...f?{description:f}:{}})}return s}function yX(e){const{language:t,meta:n}=hd(e);switch(ya(t,n)){case"ai":case"prompt":return ms;case"test":return dC;case"lint":return uC;case"exec":case"shell":return fr;case"yaml":case"code":return ou}}function u8(e){const{language:t,meta:n}=hd(e),r=ya(t,n);return r==="test"||r==="lint"||r==="ai"||r==="prompt"?r:Ax(e)}function wX(e){return XY(e).filter(t=>{const{language:n,meta:r}=hd(t),s=ya(n,r);return s==="test"||s==="lint"||s==="yaml"&&r.trim()!==""})}function _X(e){if(e!==!1)return typeof e=="object"?e:{}}const d8=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M248 122h-66.34a54 54 0 0 0-107.32 0H8a6 6 0 0 0 0 12h66.34a54 54 0 0 0 107.32 0H248a6 6 0 0 0 0-12m-120 48a42 42 0 1 1 42-42a42 42 0 0 1-42 42"})}),{__source:"ph:git-commit-light",__viewBox:"0 0 256 256",__group:"git-source-control",__consumerName:"git-commit",displayName:"UiGitCommit"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M256 128a8 8 0 0 1-8 8h-64.58a56 56 0 0 1-110.84 0H8a8 8 0 0 1 0-16h64.58a56 56 0 0 1 110.84 0H248a8 8 0 0 1 8 8"})}),{__source:"ph:git-commit-fill",__viewBox:"0 0 256 256",__group:"git-source-control",__consumerName:"git-commit",displayName:"UiGitCommitFilled"});const jX=jJ.map(e=>({id:e,label:e==="all"?"All files":"Changed files"}));function kX({value:e,onChange:t}){var n,r,s,i,l,u,d,f,p,h,x,v;return o.jsxs("div",{className:"grid gap-density-3",children:[o.jsx(_t,{label:"Verify fixture",children:o.jsx(gX,{value:((r=(n=e.workflow)==null?void 0:n.verify)==null?void 0:r.fixture)??"",onChange:y=>t(w1(e,{fixture:y})),size:"sm",placeholder:"Write the verify fixture markdown..."})}),o.jsxs("div",{className:"flex flex-wrap items-end gap-density-3",children:[o.jsx(_t,{label:"Scope",children:o.jsx(Tr,{"aria-label":"Verification scope",size:"sm",value:((i=(s=e.workflow)==null?void 0:s.verify)==null?void 0:i.scope)||"all",onChange:y=>t(w1(e,{scope:y})),options:jX})}),o.jsx("div",{className:"w-32",children:o.jsx(dl,{label:"Max iterations",value:(u=(l=e.workflow)==null?void 0:l.verify)==null?void 0:u.maxIterations,onChange:y=>t(w1(e,{maxIterations:y??0})),icon:lN,min:0,step:1,integer:!0})})]}),o.jsxs("div",{className:"grid gap-density-2 md:grid-cols-[minmax(8rem,10rem)_minmax(8rem,10rem)_minmax(0,1fr)]",children:[o.jsx(io,{label:"Commit",checked:(f=(d=e.workflow)==null?void 0:d.finalize)==null?void 0:f.commit,onChange:y=>t(_1(e,{commit:y})),icon:d8}),o.jsx(io,{label:"Dry run",checked:(h=(p=e.workflow)==null?void 0:p.finalize)==null?void 0:h.dryRun,onChange:y=>t(_1(e,{dryRun:y})),icon:ju}),o.jsx(_t,{label:"Commit message",children:o.jsx(xn,{value:(v=(x=e.workflow)==null?void 0:x.finalize)==null?void 0:v.commitMessage,onChange:y=>t(_1(e,{commitMessage:y})),placeholder:"Apply AI changes",icon:d8})})]})]})}const R1=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 74h-85.51l-27.9-27.9a13.94 13.94 0 0 0-9.9-4.1H40a14 14 0 0 0-14 14v144.62A13.39 13.39 0 0 0 39.38 214h177.51A13.12 13.12 0 0 0 230 200.89V88a14 14 0 0 0-14-14M40 54h52.69a2 2 0 0 1 1.41.59L113.51 74H38V56a2 2 0 0 1 2-2m178 146.89a1.11 1.11 0 0 1-1.11 1.11H39.38a1.4 1.4 0 0 1-1.38-1.38V86h178a2 2 0 0 1 2 2Z"})}),{__source:"ph:folder-light",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"folder",displayName:"UiFolder"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M216 72h-84.69L104 44.69A15.88 15.88 0 0 0 92.69 40H40a16 16 0 0 0-16 16v144.62A15.41 15.41 0 0 0 39.39 216h177.5A15.13 15.13 0 0 0 232 200.89V88a16 16 0 0 0-16-16M40 56h52.69l16 16H40Z"})}),{__source:"ph:folder-fill",__viewBox:"0 0 256 256",__group:"files-code",__consumerName:"folder",displayName:"UiFolderFilled"});const NX=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M222 64a30 30 0 1 0-36 29.4V112a10 10 0 0 1-10 10H80a10 10 0 0 1-10-10V93.4a30 30 0 1 0-12 0V112a22 22 0 0 0 22 22h42v28.6a30 30 0 1 0 12 0V134h42a22 22 0 0 0 22-22V93.4A30.05 30.05 0 0 0 222 64M46 64a18 18 0 1 1 18 18a18 18 0 0 1-18-18m100 128a18 18 0 1 1-18-18a18 18 0 0 1 18 18m46-110a18 18 0 1 1 18-18a18 18 0 0 1-18 18"})}),{__source:"ph:git-fork-light",__viewBox:"0 0 256 256",__group:"git-source-control",__consumerName:"folder-git",displayName:"UiFolderGit"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 64a32 32 0 1 0-40 31v17a8 8 0 0 1-8 8H80a8 8 0 0 1-8-8V95a32 32 0 1 0-16 0v17a24 24 0 0 0 24 24h40v25a32 32 0 1 0 16 0v-25h40a24 24 0 0 0 24-24V95a32.06 32.06 0 0 0 24-31m-80 128a16 16 0 1 1-16-16a16 16 0 0 1 16 16"})}),{__source:"ph:git-fork-fill",__viewBox:"0 0 256 256",__group:"git-source-control",__consumerName:"folder-git",displayName:"UiFolderGitFilled"});const CX=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M238 88.18a52.42 52.42 0 0 1-15.4 35.66l-34.75 34.75A52.28 52.28 0 0 1 150.62 174h-.05A52.63 52.63 0 0 1 98 119.9a6 6 0 0 1 6-5.84h.17a6 6 0 0 1 5.83 6.16A40.62 40.62 0 0 0 150.58 162a40.4 40.4 0 0 0 28.73-11.9l34.75-34.74a40.63 40.63 0 0 0-57.43-57.46l-11 11a6 6 0 0 1-8.49-8.49l11-11a52.62 52.62 0 0 1 74.43 0A52.83 52.83 0 0 1 238 88.18m-127.62 98.9l-11 11A40.36 40.36 0 0 1 70.6 210a40.63 40.63 0 0 1-28.7-69.36l34.72-34.74A40.63 40.63 0 0 1 146 135.77a6 6 0 0 0 5.83 6.16h.17a6 6 0 0 0 6-5.84a52.63 52.63 0 0 0-89.86-38.67l-34.76 34.74A52.63 52.63 0 0 0 70.56 222a52.26 52.26 0 0 0 37.22-15.42l11-11a6 6 0 1 0-8.49-8.48Z"})}),{__source:"ph:link-light",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"link",displayName:"UiLink"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m-92.3 160.49a43.31 43.31 0 0 1-55-66.43l25.37-25.37a43.35 43.35 0 0 1 61.25 0a42.9 42.9 0 0 1 9.95 15.43a8 8 0 1 1-15 5.6a27.33 27.33 0 0 0-44.9-9.72L72 137.37a27.32 27.32 0 0 0 34.68 41.91a8 8 0 1 1 9 13.21Zm79.61-62.55l-25.37 25.37A43 43 0 0 1 139.32 168a43.35 43.35 0 0 1-40.53-28.12a8 8 0 1 1 15-5.6A27.35 27.35 0 0 0 139.28 152a27.14 27.14 0 0 0 19.32-8l25.4-25.37a27.32 27.32 0 0 0-34.68-41.91a8 8 0 1 1-9-13.21a43.32 43.32 0 0 1 55 66.43Z"})}),{__source:"ph:link-fill",__viewBox:"0 0 256 256",__group:"navigation",__consumerName:"link",displayName:"UiLinkFilled"});const SX=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M229.18 173a6 6 0 0 1-2.16 8.2l-96 56a6 6 0 0 1-6 0l-96-56a6 6 0 0 1 6-10.36l93 54.23l93-54.23a6 6 0 0 1 8.16 2.16M221 122.82l-93 54.23l-93-54.23a6 6 0 0 0-6 10.36l96 56a6 6 0 0 0 6 0l96-56a6 6 0 0 0-6-10.36M26 80a6 6 0 0 1 3-5.18l96-56a6 6 0 0 1 6 0l96 56a6 6 0 0 1 0 10.36l-96 56a6 6 0 0 1-6 0l-96-56A6 6 0 0 1 26 80m17.91 0L128 129.05L212.09 80L128 31Z"})}),{__source:"ph:stack-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"stack",displayName:"UiStack"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"currentColor",children:[o.jsx("path",{d:"m220 169.09l-92 53.65l-92-53.65a8 8 0 0 0-8 13.82l96 56a8 8 0 0 0 8.06 0l96-56a8 8 0 1 0-8.06-13.82"}),o.jsx("path",{d:"m220 121.09l-92 53.65l-92-53.65a8 8 0 0 0-8 13.82l96 56a8 8 0 0 0 8.06 0l96-56a8 8 0 1 0-8.06-13.82"}),o.jsx("path",{d:"m28 86.91l96 56a8 8 0 0 0 8.06 0l96-56a8 8 0 0 0 0-13.82l-96-56a8 8 0 0 0-8.06 0l-96 56a8 8 0 0 0 0 13.82"})]})}),{__source:"ph:stack-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"stack",displayName:"UiStackFilled"});const EX=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 22v-5m3-9V2m2 6a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1zM9 8V2"})}),{__source:"lucide:plug",__viewBox:"0 0 24 24",__group:"ui-controls",__consumerName:"plug",displayName:"UiPlug"}),TX=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M241.91 137.42L142.59 38.1a13.94 13.94 0 0 0-9.9-4.1H40a6 6 0 0 0-6 6v92.69a13.94 13.94 0 0 0 4.1 9.9l99.32 99.32a14 14 0 0 0 19.8 0l84.69-84.69a14 14 0 0 0 0-19.8m-8.49 11.31l-84.69 84.69a2 2 0 0 1-2.83 0L46.59 134.1a2 2 0 0 1-.59-1.41V46h86.69a2 2 0 0 1 1.41.59l99.32 99.31a2 2 0 0 1 0 2.83M94 84a10 10 0 1 1-10-10a10 10 0 0 1 10 10"})}),{__source:"ph:tag-light",__viewBox:"0 0 256 256",__group:"configs-metadata",__consumerName:"tag",displayName:"UiTag"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M243.31 136L144 36.69A15.86 15.86 0 0 0 132.69 32H40a8 8 0 0 0-8 8v92.69A15.86 15.86 0 0 0 36.69 144L136 243.31a16 16 0 0 0 22.63 0l84.68-84.68a16 16 0 0 0 0-22.63M84 96a12 12 0 1 1 12-12a12 12 0 0 1-12 12"})}),{__source:"ph:tag-fill",__viewBox:"0 0 256 256",__group:"configs-metadata",__consumerName:"tag",displayName:"UiTagFilled"});const OX=[{id:"none",label:"None"},{id:"remote",label:"Remote"},{id:"local",label:"Local"}],MX=wJ.map(e=>({id:e,label:e==="none"?"None":e==="new"?"New":"Existing"})),AX=_J.map(e=>({id:e,label:e==="none"?"None":e.charAt(0).toUpperCase()+e.slice(1)}));function LX({value:e,onChange:t,secretSelector:n}){var r,s,i,l,u,d,f,p,h,x,v,y,b,j,S,N,k,T,E,O,M,L,F,U,z,V,X,H,B;const W=JG(e),se=QG(e);return o.jsxs("div",{className:"grid gap-density-3",children:[o.jsxs("div",{className:"grid gap-density-2 md:grid-cols-2",children:[o.jsx(_t,{label:"Directory",children:o.jsx(xn,{value:(r=e.setup)==null?void 0:r.cwd,onChange:P=>t(Tu(e,{cwd:P})),placeholder:".",icon:R1,mono:!0})}),o.jsx(_t,{label:"Base dir",children:o.jsx(xn,{value:(s=e.setup)==null?void 0:s.baseDir,onChange:P=>t(Tu(e,{baseDir:P})),placeholder:".captain/workspaces",icon:R1,mono:!0})})]}),o.jsxs("div",{className:"space-y-density-2",children:[o.jsx(_t,{label:"Git checkout",children:o.jsx(Tr,{"aria-label":"Checkout source",size:"sm",value:W,onChange:P=>t(qG(e,P)),options:OX})}),W!=="none"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid gap-density-2 md:grid-cols-[minmax(0,1fr)_9rem_6rem]",children:[W==="local"?o.jsx(_t,{label:"Local path",children:o.jsx(xn,{value:(l=(i=e.setup)==null?void 0:i.checkout)==null?void 0:l.path,onChange:P=>t(us(e,{path:P})),placeholder:"/repo",icon:NX,mono:!0})}):o.jsx(_t,{label:"Git URL",children:o.jsx(xn,{value:(d=(u=e.setup)==null?void 0:u.checkout)==null?void 0:d.url,onChange:P=>t(us(e,{url:P})),placeholder:"https://github.com/org/repo.git",icon:CX,mono:!0})}),o.jsx(_t,{label:"Ref",children:o.jsx(xn,{value:(p=(f=e.setup)==null?void 0:f.checkout)==null?void 0:p.ref,onChange:P=>t(us(e,{ref:P})),placeholder:"main",icon:K0,mono:!0})}),o.jsx(dl,{label:"Depth",value:(x=(h=e.setup)==null?void 0:h.checkout)==null?void 0:x.depth,onChange:P=>t(us(e,{depth:P??0})),icon:SX,min:0,step:1,integer:!0})]}),W!=="local"&&o.jsx(sN,{label:"Advanced",hint:"connection",children:o.jsx(_t,{label:"Connection",children:n?o.jsx(g3,{value:iJ((y=(v=e.setup)==null?void 0:v.checkout)==null?void 0:y.connection),onChange:P=>t(us(e,{connection:aJ(P)})),loadResources:n.loadResources,loadKeyPreview:n.loadKeyPreview,...n.allowLiteral!==void 0?{allowLiteral:n.allowLiteral}:{},...n.strict!==void 0?{strict:n.strict}:{},className:"min-w-0 flex-wrap"}):o.jsx(xn,{value:(j=(b=e.setup)==null?void 0:b.checkout)==null?void 0:j.connection,onChange:P=>t(us(e,{connection:P})),placeholder:"github",icon:EX,mono:!0})})})]})]}),o.jsxs("div",{className:"space-y-density-2",children:[o.jsx(_t,{label:"Worktree",children:o.jsx(Tr,{"aria-label":"Worktree mode",size:"sm",value:se,onChange:P=>t(KG(e,P)),options:MX})}),se!=="none"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid gap-density-2 md:grid-cols-3",children:[se==="new"&&o.jsxs(o.Fragment,{children:[o.jsx(_t,{label:"Worktree prefix",children:o.jsx(xn,{value:(k=(N=(S=e.setup)==null?void 0:S.checkout)==null?void 0:N.worktree)==null?void 0:k.prefix,onChange:P=>t(Xi(e,{prefix:P})),placeholder:"ai",icon:TX,mono:!0})}),o.jsx(_t,{label:"Worktree base",children:o.jsx(xn,{value:(O=(E=(T=e.setup)==null?void 0:T.checkout)==null?void 0:E.worktree)==null?void 0:O.base,onChange:P=>t(Xi(e,{base:P})),placeholder:"main",icon:K0,mono:!0})})]}),o.jsx(_t,{label:"Worktree path",children:o.jsx(xn,{value:(F=(L=(M=e.setup)==null?void 0:M.checkout)==null?void 0:L.worktree)==null?void 0:F.path,onChange:P=>t(Xi(e,{path:P})),placeholder:".shell/worktrees/spec-runtime",icon:R1,mono:!0})})]}),se==="new"&&o.jsx("div",{className:"grid gap-density-2 sm:grid-cols-[minmax(10rem,16rem)]",children:o.jsx(io,{label:"Keep worktree",checked:(V=(z=(U=e.setup)==null?void 0:U.checkout)==null?void 0:z.worktree)==null?void 0:V.keep,onChange:P=>t(Xi(e,{keep:P}))})})]})]}),o.jsxs("div",{className:"space-y-density-2",children:[o.jsx(_t,{label:"Stash",children:o.jsx(Tr,{"aria-label":"Stash mode",size:"sm",value:YG(e),onChange:P=>t(GG(e,P)),options:AX})}),o.jsx("div",{className:"grid gap-density-2 md:grid-cols-2",children:o.jsx(_t,{label:"Since",children:o.jsx(xn,{value:(B=(H=(X=e.setup)==null?void 0:X.checkout)==null?void 0:H.dirty)==null?void 0:B.since,onChange:P=>t(oN(e,{since:P})),placeholder:"origin/main",icon:Eu,mono:!0})})})]})]})}function RX(e){var t,n,r,s,i;const l=(t=e.setup)==null?void 0:t.checkout,u=((n=l?.url)==null?void 0:n.trim())||((r=l?.path)==null?void 0:r.trim());if(!u)return;const d=(s=u.replace(/\/+$/,"").split("/").pop())==null?void 0:s.replace(/\.git$/,"");if(!d)return;const f=(i=l?.ref)==null?void 0:i.trim();return f?`${d} · ${f}`:d}const PX=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224.42 104.2c-3.9-4.07-7.93-8.27-9.55-12.18c-1.5-3.63-1.58-9-1.67-14.68c-.14-9.38-.3-20-7.42-27.12S188 42.94 178.66 42.8c-5.68-.09-11-.17-14.68-1.67c-3.91-1.62-8.11-5.65-12.18-9.55C145.16 25.22 137.64 18 128 18s-17.16 7.22-23.8 13.58c-4.07 3.9-8.27 7.93-12.18 9.55c-3.63 1.5-9 1.58-14.68 1.67c-9.38.14-20 .3-27.12 7.42S42.94 68 42.8 77.34c-.09 5.68-.17 11-1.67 14.68c-1.62 3.91-5.65 8.11-9.55 12.18C25.22 110.84 18 118.36 18 128s7.22 17.16 13.58 23.8c3.9 4.07 7.93 8.27 9.55 12.18c1.5 3.63 1.58 9 1.67 14.68c.14 9.38.3 20 7.42 27.12s17.78 7.28 27.12 7.42c5.68.09 11 .17 14.68 1.67c3.91 1.62 8.11 5.65 12.18 9.55c6.64 6.36 14.16 13.58 23.8 13.58s17.16-7.22 23.8-13.58c4.07-3.9 8.27-7.93 12.18-9.55c3.63-1.5 9-1.58 14.68-1.67c9.38-.14 20-.3 27.12-7.42s7.28-17.74 7.42-27.12c.09-5.68.17-11 1.67-14.68c1.62-3.91 5.65-8.11 9.55-12.18c6.36-6.64 13.58-14.16 13.58-23.8s-7.22-17.16-13.58-23.8m-8.66 39.3c-4.67 4.86-9.5 9.9-12 15.9c-2.38 5.74-2.48 12.52-2.58 19.08c-.11 7.44-.23 15.14-3.9 18.82s-11.38 3.79-18.82 3.9c-6.56.1-13.34.2-19.08 2.58c-6 2.48-11 7.31-15.91 12c-5.25 5-10.68 10.24-15.49 10.24s-10.24-5.21-15.5-10.24c-4.86-4.67-9.9-9.5-15.9-12c-5.74-2.38-12.52-2.48-19.08-2.58c-7.44-.11-15.14-.23-18.82-3.9s-3.79-11.38-3.9-18.82c-.1-6.56-.2-13.34-2.58-19.08c-2.48-6-7.31-11-12-15.91C35.21 138.24 30 132.81 30 128s5.21-10.24 10.24-15.5c4.67-4.86 9.5-9.9 12-15.9c2.38-5.74 2.48-12.52 2.58-19.08c.11-7.44.23-15.14 3.9-18.82s11.38-3.79 18.82-3.9c6.56-.1 13.34-.2 19.08-2.58c6-2.48 11-7.31 15.91-12C117.76 35.21 123.19 30 128 30s10.24 5.21 15.5 10.24c4.86 4.67 9.9 9.5 15.9 12c5.74 2.38 12.52 2.48 19.08 2.58c7.44.11 15.14.23 18.82 3.9s3.79 11.38 3.9 18.82c.1 6.56.2 13.34 2.58 19.08c2.48 6 7.31 11 12 15.91c5 5.25 10.24 10.68 10.24 15.49s-5.23 10.22-10.26 15.48m-43.52-43.74a6 6 0 0 1 0 8.48l-56 56a6 6 0 0 1-8.48 0l-24-24a6 6 0 0 1 8.48-8.48L112 151.51l51.76-51.75a6 6 0 0 1 8.48 0"})}),{__source:"ph:seal-check-light",__viewBox:"0 0 256 256",__group:"approval-review",__consumerName:"seal-check",displayName:"UiSealCheck"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M225.86 102.82c-3.77-3.94-7.67-8-9.14-11.57c-1.36-3.27-1.44-8.69-1.52-13.94c-.15-9.76-.31-20.82-8-28.51s-18.75-7.85-28.51-8c-5.25-.08-10.67-.16-13.94-1.52c-3.56-1.47-7.63-5.37-11.57-9.14C146.28 23.51 138.44 16 128 16s-18.27 7.51-25.18 14.14c-3.94 3.77-8 7.67-11.57 9.14c-3.25 1.36-8.69 1.44-13.94 1.52c-9.76.15-20.82.31-28.51 8s-7.8 18.75-8 28.51c-.08 5.25-.16 10.67-1.52 13.94c-1.47 3.56-5.37 7.63-9.14 11.57C23.51 109.72 16 117.56 16 128s7.51 18.27 14.14 25.18c3.77 3.94 7.67 8 9.14 11.57c1.36 3.27 1.44 8.69 1.52 13.94c.15 9.76.31 20.82 8 28.51s18.75 7.85 28.51 8c5.25.08 10.67.16 13.94 1.52c3.56 1.47 7.63 5.37 11.57 9.14c6.9 6.63 14.74 14.14 25.18 14.14s18.27-7.51 25.18-14.14c3.94-3.77 8-7.67 11.57-9.14c3.27-1.36 8.69-1.44 13.94-1.52c9.76-.15 20.82-.31 28.51-8s7.85-18.75 8-28.51c.08-5.25.16-10.67 1.52-13.94c1.47-3.56 5.37-7.63 9.14-11.57c6.63-6.9 14.14-14.74 14.14-25.18s-7.51-18.27-14.14-25.18m-52.2 6.84l-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 11.32"})}),{__source:"ph:seal-check-fill",__viewBox:"0 0 256 256",__group:"approval-review",__consumerName:"seal-check",displayName:"UiSealCheckFilled"});const fC=[{id:"model",label:"Model",hint:"Which model runs, how hard it reasons, and its budget ceiling.",icon:ms,iconClassName:"text-indigo-500"},{id:"prompt",label:"Prompt",hint:"Overrides layered on top of the base agent prompt.",icon:Zl,iconClassName:"text-primary"},{id:"workspace",label:"Workspace",hint:"Where the agent checks out code and runs.",icon:K0,iconClassName:"text-sky-500"},{id:"permissions",label:"Permissions",hint:"What the agent may do without asking. Overrides the preset above.",icon:oa,iconClassName:"text-emerald-600 dark:text-emerald-400"},{id:"environment",label:"Environment",hint:"Variables and secrets injected before the run.",icon:R3,iconClassName:"text-amber-600 dark:text-amber-400"},{id:"verify",label:"Verify",hint:"How the work is checked, and what happens when it passes.",icon:PX,iconClassName:"text-emerald-600 dark:text-emerald-400"},{id:"cli",label:"CLI flags",hint:"Extra interactive CLI flags passed straight to the agent binary.",icon:fr}];function IX(e){const t=fC.findIndex(n=>n.id===e);return String(t+1).padStart(2,"0")}const $X="-15% 0px -70% 0px",FX=700;function DX(e){const[t,n]=w.useState(e[0]??""),r=w.useRef(new Map),s=w.useRef(null),i=w.useRef(0),l=w.useCallback(()=>s.current?s.current:typeof IntersectionObserver>"u"?null:(s.current=new IntersectionObserver(f=>{if(!(Date.now()-i.currentp=>{var h,x;const v=r.current.get(f);v&&((h=s.current)==null||h.unobserve(v)),p?(r.current.set(f,p),(x=l())==null||x.observe(p)):r.current.delete(f)},[l]);w.useEffect(()=>()=>{var f;return(f=s.current)==null?void 0:f.disconnect()},[]);const d=w.useCallback(f=>{var p,h;i.current=Date.now(),n(f),(h=(p=r.current.get(f))==null?void 0:p.scrollIntoView)==null||h.call(p,{behavior:"smooth",block:"start"})},[]);return{activeId:t,sectionRef:u,onNavClick:d}}const BX={model:"caching",permissions:"full permission tree",environment:"dotenv files"};function UX({value:e,onChange:t,models:n=[],families:r,tools:s=[],permissionCatalog:i,secretSelector:l,cliOptions:u,sections:d,className:f,title:p="Runtime Spec",eyebrow:h="Agent configuration",onSave:x,onCancel:v,saveLabel:y="Save & run",footerStatus:b="Ready to run"}){const j=w.useId(),S=w.useMemo(()=>GJ(i,s),[i,s]),N=w.useMemo(()=>QJ(e,S),[e,S]),k=w.useMemo(()=>d?new Set(d):void 0,[d]),T=fC.filter(z=>(z.id!=="cli"||u)&&(k==null||k.has(z.id))),E=z=>`${j}-${z}`,{sectionRef:O}=DX(T.map(z=>E(z.id))),M=(z,V)=>t(uN(e,z,V)),L=(z,V)=>{const X=YJ(e,z,V);X&&t(X)},F=z=>{switch(z){case"model":return o.jsx(vJ,{value:e,onChange:t,models:n,...r?{families:r}:{}});case"prompt":return o.jsx(SQ,{value:e,onChange:t});case"workspace":return o.jsx(LX,{value:e,onChange:t,secretSelector:l});case"permissions":return o.jsx(gQ,{value:e,onChange:t,entries:N,onApplyEntries:M,onAddEntry:L});case"environment":return o.jsx(cJ,{value:e,onChange:t,secretSelector:l});case"verify":return o.jsx(kX,{value:e,onChange:t});case"cli":return u?o.jsx(rJ,{value:e,onChange:t,cliOptions:u}):null}},U=z=>{switch(z){case"model":return o.jsx(bJ,{value:e,onChange:t});case"permissions":return o.jsx(xQ,{value:e,onChange:t,entries:N,onApplyEntries:M,onAddEntry:L});case"environment":return o.jsx(uJ,{value:e,onChange:t});default:return}};return o.jsxs("div",{className:R("@container",f),children:[o.jsxs("div",{className:"mx-auto max-w-[820px] px-density-4 py-density-4",children:[o.jsx(EQ,{eyebrow:h,title:p,target:RX(e)}),T.map(z=>o.jsx(TQ,{meta:z,number:IX(z.id),domId:E(z.id),sectionRef:O(E(z.id)),advanced:U(z.id),advancedHint:BX[z.id],children:F(z.id)},z.id))]}),(x||v)&&o.jsx(fJ,{status:b,saveLabel:y,onSave:x,onCancel:v})]})}const zX=["low","medium","high","xhigh"];function VX({value:e,onChange:t,models:n=[],families:r=ux,tools:s=[],permissionCatalog:i,secretSelector:l,cliOptions:u,reasoningEfforts:d=zX,variablesSchema:f,variables:p,onVariablesChange:h,onVariablesValidityChange:x,promptEditor:v,promptLabel:y="User prompt",promptPlaceholder:b="Override the rendered user prompt",children:j,header:S,footer:N,className:k,editSpecLabel:T="Edit spec",specModalTitle:E="Runtime spec",specSections:O}){var M;const[L,F]=w.useState(!1),U=iN(r,e.backend),z=_l(r,U.family),V=tJ(n,z);return o.jsxs("div",{className:R("grid gap-density-4",k),children:[S,o.jsxs(P1,{title:"Runtime",children:[o.jsx(aN,{value:e,onChange:t,families:r,models:n}),o.jsxs("div",{className:"grid gap-density-2 sm:grid-cols-2",children:[o.jsx(_t,{label:"Model",children:o.jsxs("div",{className:"flex min-w-0 items-center gap-density-2",children:[V.length>0?o.jsx(Om,{models:V,value:e.model,onChange:X=>t(Bn(e,{model:X})),size:"md",className:"w-full"}):o.jsx(xn,{value:e.model,onChange:X=>t(Bn(e,{model:X})),placeholder:"frontmatter/default",mono:!0}),e.model&&o.jsx(Fe,{size:"sm",variant:"ghost",onClick:()=>t(Z0(e,"model",void 0)),children:"Default"})]})}),o.jsx(_t,{label:"Effort",children:o.jsx(Mm,{efforts:d,value:e.effort??"",onChange:X=>t(Bn(e,{effort:X})),size:"md",className:"w-full"})})]}),j,o.jsx("div",{children:o.jsxs(Fe,{size:"sm",variant:"outline",onClick:()=>F(!0),children:[o.jsx(K,{icon:wN,className:"size-4"}),T]})})]}),h&&o.jsx(P1,{title:"Variables",children:o.jsx(HX,{...f?{schema:f}:{},value:p??{},onChange:h,...x?{onValidityChange:x}:{}})}),o.jsx(P1,{title:y,children:v??o.jsx("textarea",{value:((M=e.prompt)==null?void 0:M.user)??"",onChange:X=>t(e0(e,{user:X.target.value})),spellCheck:!1,placeholder:b,"aria-label":y,className:"min-h-[7rem] w-full resize-y rounded-md border border-border bg-background px-density-2 py-density-1 text-sm outline-none focus:ring-2 focus:ring-ring"})}),N,o.jsx(yi,{open:L,onClose:()=>F(!1),title:E,size:"full",closeOnEsc:!0,className:"h-[95vh]",children:o.jsx(UX,{value:e,onChange:t,models:V,families:r,tools:s,...i?{permissionCatalog:i}:{},...l?{secretSelector:l}:{},...u?{cliOptions:u}:{},...O?{sections:O}:{},onSave:()=>F(!1),onCancel:()=>F(!1),saveLabel:"Done",footerStatus:eJ(e.backend,r)})})]})}function P1({title:e,children:t}){return o.jsxs("section",{className:"space-y-density-2",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e}),t]})}function HX({schema:e,value:t,onChange:n,onValidityChange:r}){const s=w.useId(),[i,l]=w.useState(()=>ZX(t)),[u,d]=w.useState(null);if(e)return o.jsx(vm,{idPrefix:`prompt-vars-${s}`,schema:e,value:t,onChange:p=>n(p),size:"sm"});const f=p=>{if(l(p),!p.trim()){d(null),r?.(!0),n({});return}try{const h=JSON.parse(p);h&&typeof h=="object"&&!Array.isArray(h)?(d(null),r?.(!0),n(h)):(d("Expected a JSON object"),r?.(!1))}catch(h){d(h instanceof Error?h.message:"Invalid JSON"),r?.(!1)}};return o.jsxs("div",{className:"space-y-1",children:[o.jsx("textarea",{value:i,onChange:p=>f(p.target.value),spellCheck:!1,placeholder:"{}","aria-label":"Variables JSON",className:"h-28 w-full resize-y rounded-md border border-border bg-background px-density-2 py-density-1 font-mono text-xs outline-none focus:ring-2 focus:ring-ring"}),u&&o.jsx("div",{className:"text-xs text-destructive",children:u})]})}function ZX(e){return!e||Object.keys(e).length===0?"{}":JSON.stringify(e,null,2)}function mC(e,t){if(!t)return e;const n=t.replace(/\/+$/,"");return e.startsWith(`${n}/`)?e.slice(n.length+1):e}function WX(e,t){if(e!=="Bash")return;const n=t?.command;return typeof n=="string"&&n?n:void 0}const qX={Bash:["command"],Read:["file_path","notebook_path","path"],Write:["file_path","notebook_path","path","content"],Edit:["file_path","notebook_path","path","old_string","new_string"],MultiEdit:["file_path","notebook_path","path","edits"],NotebookEdit:["file_path","notebook_path","path"]};function KX(e,t,n){const r=qX[e]??[];return Object.entries(t??{}).filter(([s,i])=>!r.includes(s)&&i!==void 0&&i!==null&&i!=="").map(([s,i])=>({name:s,value:GX(i,n)}))}function GX(e,t){const n=typeof e=="string"?mC(e,t):JSON.stringify(e);return Qi(n.replace(/\s+/g," ").trim(),60)}function JX(e){let t=0,n=0;for(const{original:r,modified:s}of e)for(const i of p_(r,s))for(const l of i.lines)l.type==="add"?t+=1:l.type==="remove"&&(n+=1);return{added:t,removed:n}}function QX(e,t){if(!t)return;const n=l=>typeof t[l]=="string"?t[l]:"",r=YX(e,t,n);if(!r||r.length===0)return;const s=JX(r);if(s.added===0&&s.removed===0)return;const i=DI(n("file_path")||n("notebook_path")||n("path"));return{...s,segments:r,...i?{language:i}:{}}}function YX(e,t,n){if(e==="Write"){const r=n("content");return r?[{original:"",modified:r}]:void 0}if(e==="Edit"||e==="NotebookEdit"){const r=n("old_string"),s=n("new_string")||n("new_source");return r||s?[{original:r,modified:s}]:void 0}if(e==="MultiEdit"){const r=t.edits;return Array.isArray(r)?r.filter(s=>typeof s=="object"&&s!==null).map(s=>({original:typeof s.old_string=="string"?s.old_string:"",modified:typeof s.new_string=="string"?s.new_string:""})).filter(s=>s.original!==""||s.modified!==""):void 0}}function XX(e,t,n){if(!t)return"";const r=l=>typeof t[l]=="string"?t[l]:"",s=(...l)=>{for(const u of l){const d=r(u);if(d)return d}return""};if(aj(e)){const l=s("url","sql","query","element","method");return l?Qi(l,80):""}switch(e){case"Bash":case"browser_type":return Qi(r("command")||r("text"),80);case"Read":case"Write":case"Edit":case"MultiEdit":case"NotebookEdit":return mC(s("file_path","notebook_path","path"),n);case"Grep":return[r("pattern"),r("path")].filter(Boolean).join(" ");case"Glob":return r("pattern");case"Task":case"Agent":return Qi(s("description","prompt"),80);case"Skill":return s("skill","command","name");case"TaskCreate":return Qi(s("subject","description"),80);case"TaskUpdate":{const l=s("taskId","task_id","id"),u=r("status");return u?`${l} ${u}`.trim():l}case"TaskGet":case"TaskOutput":case"TaskStop":return s("task_id","taskId","id");case"ToolSearch":case"WebSearch":return Qi(r("query"),80);case"WebFetch":case"browser_navigate":return r("url");case"AskUserQuestion":{const l=t.questions;return Array.isArray(l)?`${l.length} questions`:""}case"ExitPlanMode":return r("planFilePath");default:return""}}const pC=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M128 26a102 102 0 1 0 102 102A102.12 102.12 0 0 0 128 26M71.44 198a66 66 0 0 1 113.12 0a89.8 89.8 0 0 1-113.12 0M94 120a34 34 0 1 1 34 34a34 34 0 0 1-34-34m99.51 69.64a77.53 77.53 0 0 0-40-31.38a46 46 0 1 0-51 0a77.53 77.53 0 0 0-40 31.38a90 90 0 1 1 131 0"})}),{__source:"ph:user-circle-light",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"user-circle",displayName:"UiUserCircle"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M172 120a44 44 0 1 1-44-44a44.05 44.05 0 0 1 44 44m60 8A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88.09 88.09 0 0 0-91.47-87.93C77.43 41.89 39.87 81.12 40 128.25a87.65 87.65 0 0 0 22.24 58.16A79.7 79.7 0 0 1 84 165.1a4 4 0 0 1 4.83.32a59.83 59.83 0 0 0 78.28 0a4 4 0 0 1 4.83-.32a79.7 79.7 0 0 1 21.79 21.31A87.62 87.62 0 0 0 216 128"})}),{__source:"ph:user-circle-fill",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"user-circle",displayName:"UiUserCircleFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26a102 102 0 1 0 102 102A102.12 102.12 0 0 0 128 26M71.44 198a66 66 0 0 1 113.12 0a89.8 89.8 0 0 1-113.12 0M94 120a34 34 0 1 1 34 34a34 34 0 0 1-34-34m99.51 69.64a77.53 77.53 0 0 0-40-31.38a46 46 0 1 0-51 0a77.53 77.53 0 0 0-40 31.38a90 90 0 1 1 131 0"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 4v16M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:user-circle-light + plus marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"user-circle",displayName:"UiUserCirclePlus"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M172 120a44 44 0 1 1-44-44a44.05 44.05 0 0 1 44 44m60 8A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88.09 88.09 0 0 0-91.47-87.93C77.43 41.89 39.87 81.12 40 128.25a87.65 87.65 0 0 0 22.24 58.16A79.7 79.7 0 0 1 84 165.1a4 4 0 0 1 4.83.32a59.83 59.83 0 0 0 78.28 0a4 4 0 0 1 4.83-.32a79.7 79.7 0 0 1 21.79 21.31A87.62 87.62 0 0 0 216 128"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M12 4v16M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:user-circle-fill + plus marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"user-circle",displayName:"UiUserCirclePlusFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26a102 102 0 1 0 102 102A102.12 102.12 0 0 0 128 26M71.44 198a66 66 0 0 1 113.12 0a89.8 89.8 0 0 1-113.12 0M94 120a34 34 0 1 1 34 34a34 34 0 0 1-34-34m99.51 69.64a77.53 77.53 0 0 0-40-31.38a46 46 0 1 0-51 0a77.53 77.53 0 0 0-40 31.38a90 90 0 1 1 131 0"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:user-circle-light + minus marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"user-circle",displayName:"UiUserCircleMinus"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M172 120a44 44 0 1 1-44-44a44.05 44.05 0 0 1 44 44m60 8A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88.09 88.09 0 0 0-91.47-87.93C77.43 41.89 39.87 81.12 40 128.25a87.65 87.65 0 0 0 22.24 58.16A79.7 79.7 0 0 1 84 165.1a4 4 0 0 1 4.83.32a59.83 59.83 0 0 0 78.28 0a4 4 0 0 1 4.83-.32a79.7 79.7 0 0 1 21.79 21.31A87.62 87.62 0 0 0 216 128"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#dc2626",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})]}),{__source:"ph:user-circle-fill + minus marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"user-circle",displayName:"UiUserCircleMinusFilled"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M128 26a102 102 0 1 0 102 102A102.12 102.12 0 0 0 128 26M71.44 198a66 66 0 0 1 113.12 0a89.8 89.8 0 0 1-113.12 0M94 120a34 34 0 1 1 34 34a34 34 0 0 1-34-34m99.51 69.64a77.53 77.53 0 0 0-40-31.38a46 46 0 1 0-51 0a77.53 77.53 0 0 0-40 31.38a90 90 0 1 1 131 0"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M5 13l4 4 10-10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:user-circle-light + tick marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"user-circle",displayName:"UiUserCircleCheck"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M172 120a44 44 0 1 1-44-44a44.05 44.05 0 0 1 44 44m60 8A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88.09 88.09 0 0 0-91.47-87.93C77.43 41.89 39.87 81.12 40 128.25a87.65 87.65 0 0 0 22.24 58.16A79.7 79.7 0 0 1 84 165.1a4 4 0 0 1 4.83.32a59.83 59.83 0 0 0 78.28 0a4 4 0 0 1 4.83-.32a79.7 79.7 0 0 1 21.79 21.31A87.62 87.62 0 0 0 216 128"}),o.jsxs("g",{transform:"translate(130.560 130.560) scale(4.8000)",color:"#16a34a",children:[o.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"white"}),o.jsx("path",{d:"M5 13l4 4 10-10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})]}),{__source:"ph:user-circle-fill + tick marker",__viewBox:"0 0 256 256",__group:"security-auth",__consumerName:"user-circle",displayName:"UiUserCircleCheckFilled"});const hC=Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#d97706",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M235.07 189.09L147.61 37.22a22.75 22.75 0 0 0-39.22 0L20.93 189.09a21.53 21.53 0 0 0 0 21.72A22.35 22.35 0 0 0 40.55 222h174.9a22.35 22.35 0 0 0 19.6-11.19a21.53 21.53 0 0 0 .02-21.72m-10.41 15.71a10.46 10.46 0 0 1-9.21 5.2H40.55a10.46 10.46 0 0 1-9.21-5.2a9.51 9.51 0 0 1 0-9.72l87.45-151.87a10.75 10.75 0 0 1 18.42 0l87.46 151.87a9.51 9.51 0 0 1-.01 9.72M122 144v-40a6 6 0 0 1 12 0v40a6 6 0 0 1-12 0m16 36a10 10 0 1 1-10-10a10 10 0 0 1 10 10"})})},{__source:"ph:warning-light",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"warning-triangle",__defaultColor:"#d97706",displayName:"UiWarningTriangle"});Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#d97706",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72M120 104a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0Zm8 88a12 12 0 1 1 12-12a12 12 0 0 1-12 12"})})},{__source:"ph:warning-fill",__viewBox:"0 0 256 256",__group:"health-status",__consumerName:"warning-triangle",__defaultColor:"#d97706",displayName:"UiWarningTriangleFilled"});const gC={sky:"bg-sky-100 text-sky-700 [[data-theme=dark]_&]:bg-sky-500/15 [[data-theme=dark]_&]:text-sky-300",amber:"bg-amber-100 text-amber-700 [[data-theme=dark]_&]:bg-amber-500/15 [[data-theme=dark]_&]:text-amber-300",violet:"bg-violet-100 text-violet-700 [[data-theme=dark]_&]:bg-violet-500/15 [[data-theme=dark]_&]:text-violet-300",emerald:"bg-emerald-100 text-emerald-700 [[data-theme=dark]_&]:bg-emerald-500/15 [[data-theme=dark]_&]:text-emerald-300",rose:"bg-rose-100 text-rose-700 [[data-theme=dark]_&]:bg-rose-500/15 [[data-theme=dark]_&]:text-rose-300",indigo:"bg-indigo-100 text-indigo-700 [[data-theme=dark]_&]:bg-indigo-500/15 [[data-theme=dark]_&]:text-indigo-300",fuchsia:"bg-fuchsia-100 text-fuchsia-700 [[data-theme=dark]_&]:bg-fuchsia-500/15 [[data-theme=dark]_&]:text-fuchsia-300",pink:"bg-pink-100 text-pink-700 [[data-theme=dark]_&]:bg-pink-500/15 [[data-theme=dark]_&]:text-pink-300",slate:"bg-muted text-muted-foreground"};function eee({event:e,last:t,defaultExpanded:n}){if(e.kind==="user")return o.jsx(tee,{event:e});const r=nee(e);return o.jsxs("li",{"data-event-kind":e.kind,className:"relative flex gap-density-3 pb-density-4 last:pb-0",children:[!t&&o.jsx("span",{"aria-hidden":!0,className:"absolute bottom-0 left-[10px] top-[22px] w-px bg-border"}),o.jsx("span",{className:R("relative z-[1] flex h-[21px] w-[21px] shrink-0 items-center justify-center rounded-full",gC[r.tone]),children:o.jsx(K,{icon:r.icon,className:"h-3 w-3"})}),o.jsx("div",{className:"min-w-0 flex-1 pt-px",children:o.jsx(ree,{event:e,visual:r,defaultExpanded:n})})]})}function tee({event:e}){return o.jsx("li",{"data-event-kind":"user",className:"relative flex justify-end pb-density-4 last:pb-0",children:o.jsxs("div",{className:"flex max-w-[85%] items-start gap-density-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"mb-0.5 text-right text-xs font-medium text-muted-foreground",children:"You"}),o.jsx("div",{className:"whitespace-pre-wrap break-words rounded-lg bg-accent px-density-3 py-density-2 text-right leading-relaxed text-accent-foreground",children:e.text})]}),o.jsx("span",{className:R("relative z-[1] flex h-[21px] w-[21px] shrink-0 items-center justify-center rounded-full",gC.slate),children:o.jsx(K,{icon:pC,className:"h-3 w-3"})})]})})}function nee(e){switch(e.kind){case"tool":{const t=lj(e.tool??"");return{icon:t.icon,tone:t.tone,label:t.label,summaryOnly:t.summaryOnly??!1}}case"user":return{icon:pC,tone:"slate",label:"User",summaryOnly:!1};case"assistant":return{icon:jm,tone:"indigo",label:"Assistant",summaryOnly:!1};case"thinking":return{icon:lx,tone:"slate",label:"Thinking",summaryOnly:!1};case"error":return{icon:hC,tone:"rose",label:"Error",summaryOnly:!1}}}function ree({event:e,visual:t,defaultExpanded:n}){return e.kind==="tool"?o.jsx(see,{event:e,visual:t,defaultExpanded:n}):e.kind==="thinking"?o.jsx(lee,{event:e}):e.kind==="error"?o.jsx(cee,{event:e}):o.jsx(aee,{event:e})}function see({event:e,visual:t,defaultExpanded:n}){const r=XX(e.tool??"",e.toolInput,e.cwd),s=WX(e.tool??"",e.toolInput),[i,l]=w.useState(n);if(s!==void 0)return o.jsxs("div",{className:"not-prose",children:[o.jsxs("div",{className:"flex items-start gap-1.5",children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx(fs,{bare:!0,language:"bash",source:s})}),e.toolResponse!==void 0&&o.jsx("button",{type:"button","aria-expanded":i,"aria-label":"Toggle response",onClick:()=>l(h=>!h),className:"text-muted-foreground hover:text-foreground",children:o.jsx(K,{icon:Vt,className:R("size-3 shrink-0 transition-transform",i&&"rotate-180")})})]}),i&&e.toolResponse!==void 0&&o.jsx("div",{className:"mt-1.5",children:o.jsx(f8,{response:e.toolResponse})})]});const u=e.toolInput!==void 0||e.toolResponse!==void 0,d=KX(e.tool??"",e.toolInput,e.cwd),f=QX(e.tool??"",e.toolInput),p=o.jsxs(o.Fragment,{children:[t.summaryOnly&&r?o.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-foreground",children:r}):o.jsx("span",{className:"shrink-0 font-medium text-foreground",children:t.label}),f&&o.jsxs("span",{className:"shrink-0 font-mono text-xs",children:[f.added>0&&o.jsxs("span",{className:"text-emerald-600 [[data-theme=dark]_&]:text-emerald-400",children:["+",f.added]}),f.removed>0&&o.jsxs("span",{className:"ml-1 text-rose-600 [[data-theme=dark]_&]:text-rose-400",children:["-",f.removed]})]}),d.length>0&&o.jsx(oee,{params:d})]});return o.jsxs("div",{className:"not-prose",children:[u?o.jsxs("button",{type:"button","aria-expanded":i,onClick:()=>l(h=>!h),className:"flex w-full items-center gap-1.5 text-left hover:text-foreground",children:[p,o.jsx(K,{icon:Vt,className:R("ml-auto size-3 shrink-0 text-muted-foreground transition-transform",i&&"rotate-180")})]}):o.jsx("div",{className:"flex items-center gap-1.5",children:p}),i&&u&&o.jsxs("div",{className:"mt-1.5 space-y-1.5",children:[f?o.jsx(iee,{diff:f}):e.toolInput!==void 0&&o.jsx(xC,{language:"json",source:JSON.stringify(e.toolInput,null,2)}),e.toolResponse!==void 0&&o.jsx(f8,{response:e.toolResponse})]})]})}function oee({params:e}){return o.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:e.map(t=>o.jsxs("span",{className:"[&:not(:first-child)]:ml-2",children:[o.jsxs("span",{className:"text-muted-foreground/70",children:[t.name,": "]}),o.jsx("span",{className:"text-muted-foreground",children:t.value})]},t.name))})}function iee({diff:e}){return o.jsx("div",{className:"space-y-1.5",children:e.segments.map((t,n)=>o.jsx(y_,{bare:!0,showLineNumbers:!1,original:t.original,modified:t.modified,...e.language?{language:e.language}:{}},n))})}function f8({response:e}){const t=e.trim(),n=t.startsWith("{")||t.startsWith("[");return o.jsx(xC,{language:n?"json":"text",source:e})}function xC({language:e,source:t}){return o.jsx("div",{className:"overflow-x-auto text-xs",children:o.jsx(fs,{bare:!0,language:e,source:t})})}function aee({event:e}){return o.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-foreground",children:e.text})}function lee({event:e}){const[t,n]=w.useState(!1);return o.jsx("div",{className:"not-prose",children:o.jsxs("button",{type:"button","aria-expanded":t,onClick:()=>n(r=>!r),className:"flex w-full items-start gap-1.5 text-left text-xs italic leading-relaxed text-muted-foreground hover:text-foreground",children:[o.jsx("span",{className:R("min-w-0 flex-1",t?"whitespace-pre-wrap break-words":"truncate"),children:e.text}),o.jsx(K,{icon:Vt,className:R("mt-0.5 size-3 shrink-0 transition-transform",t&&"rotate-180")})]})})}function cee({event:e}){return o.jsx("div",{className:"rounded-md border border-rose-200 bg-rose-50 px-density-3 py-1.5 text-xs text-rose-700 [[data-theme=dark]_&]:border-rose-500/30 [[data-theme=dark]_&]:bg-rose-500/10 [[data-theme=dark]_&]:text-rose-300",children:e.text})}const uee=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M118 60a10 10 0 1 1 10 10a10 10 0 0 1-10-10m10 58a10 10 0 1 0 10 10a10 10 0 0 0-10-10m0 68a10 10 0 1 0 10 10a10 10 0 0 0-10-10"})}),{__source:"ph:dots-three-vertical-light",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"dots-vertical",displayName:"UiDotsVertical"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M160 16H96a16 16 0 0 0-16 16v192a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V32a16 16 0 0 0-16-16m-32 192a12 12 0 1 1 12-12a12 12 0 0 1-12 12m0-68a12 12 0 1 1 12-12a12 12 0 0 1-12 12m0-68a12 12 0 1 1 12-12a12 12 0 0 1-12 12"})}),{__source:"ph:dots-three-vertical-fill",__viewBox:"0 0 256 256",__group:"ui-controls",__consumerName:"dots-vertical",displayName:"UiDotsVerticalFilled"});const dee=[{value:void 0,icon:n_,label:"Use page density"},{value:"compact",icon:gm,label:"Compact"},{value:"comfortable",icon:xm,label:"Comfortable"},{value:"spacious",icon:zl,label:"Spacious"}],fee=[{value:void 0,icon:S2,label:"Use page theme"},{value:"light",icon:Yu,label:"Light"},{value:"dark",icon:Xu,label:"Dark"}];function mee({density:e,onDensityChange:t,theme:n,onThemeChange:r,filters:s,hiddenCategories:i,hiddenTools:l,hiddenSources:u,onToggleCategory:d,onToggleTool:f,onToggleSource:p,showThinking:h,onToggleThinking:x,hasThinking:v}){return o.jsx(Fl,{icon:uee,hideChevron:!0,variant:"ghost",size:"icon",align:"right",title:"Session options",menuLabel:"Session options",menuClassName:"min-w-[12rem] max-h-[70vh] overflow-auto px-1",children:()=>o.jsxs("div",{className:"text-popover-foreground",children:[o.jsx(m8,{label:"Density",options:dee,value:e,onChange:t}),o.jsx(m8,{label:"Theme",options:fee,value:n,onChange:r}),s.categories.length>0&&o.jsx(Vf,{heading:"Categories",children:s.categories.map(y=>o.jsx(Hf,{label:tU[y],checked:!i.has(y),onToggle:()=>d(y)},y))}),s.tools.length>0&&o.jsx(Vf,{heading:"Tools",children:s.tools.map(y=>o.jsx(Hf,{label:y.label,checked:!l.has(y.key),onToggle:()=>f(y.key)},y.key))}),s.sources.length>1&&o.jsx(Vf,{heading:"Source",children:s.sources.map(y=>o.jsx(Hf,{label:y,checked:!u.has(y),onToggle:()=>p(y)},y))}),v&&o.jsx(Vf,{children:o.jsx(Hf,{label:"Reasoning",checked:h,onToggle:x})})]})})}function m8({label:e,options:t,value:n,onChange:r}){return o.jsxs("div",{className:"flex items-center justify-between gap-2 px-2 py-1",children:[o.jsx("span",{className:"text-xs text-muted-foreground",children:e}),o.jsx("div",{className:"flex items-center gap-0.5 rounded-md border border-border p-0.5",children:t.map(s=>{const i=n===s.value;return o.jsx("button",{type:"button",role:"menuitemradio","aria-checked":i,"aria-label":s.label,title:s.label,onClick:()=>r(s.value),className:R("flex h-5 w-5 items-center justify-center rounded transition-colors focus:outline-none",i?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground focus:text-foreground"),children:o.jsx(K,{icon:s.icon,className:"text-xs"})},s.label)})})]})}function Vf({heading:e,children:t}){return o.jsxs("div",{className:"mt-1 border-t border-border pt-0.5",children:[e&&o.jsx("div",{className:"px-2 py-1 text-[11px] font-medium text-muted-foreground",children:e}),t]})}const pee="flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-xs transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:outline-none";function Hf({label:e,checked:t,onToggle:n}){return o.jsxs("button",{type:"button",role:"menuitemcheckbox","aria-checked":t,className:R(pee,!t&&"text-muted-foreground"),onClick:n,children:[o.jsx("span",{"aria-hidden":!0,className:R("flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border",t?"border-primary bg-primary text-primary-foreground":"border-input"),children:t&&o.jsx(K,{icon:mr,className:"text-[0.6rem]"})}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:e})]})}function hee(e,t,n){return Math.min(e+Math.max(1,t),n)}function gee(e,t){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function xee(e,t){return e<=t}const vee=()=>typeof window>"u"?void 0:window;function bee(e){const{total:t,enabled:n,windowSize:r,batchSize:s,resetKey:i}=e,l=e.bottomThreshold??64,u=e.topThreshold??600,d=w.useRef(null),f=w.useRef(null),p=w.useRef(!0),h=w.useRef(null),x=w.useRef(!0),v=w.useRef(!1),[y,b]=w.useState(()=>Math.min(r,t)),S=Math.max(0,t-(n?y:t)),N=n&&S>0,k=w.useRef(N);k.current=N;const T=w.useCallback(()=>{const M=d.current;M&&(M.scrollTop=M.scrollHeight)},[]),E=w.useCallback(()=>{if(v.current||!k.current)return;v.current=!0;const M=d.current;h.current=M?M.scrollHeight:null,b(L=>hee(L,s,t))},[s,t]),O=w.useRef(E);return O.current=E,w.useLayoutEffect(()=>{n&&(b(Math.min(r,t)),p.current=!0,v.current=!1,x.current=!0)},[n,i,r,t]),w.useLayoutEffect(()=>{const M=d.current;!n||!M||(x.current?(x.current=!1,h.current=null,M.scrollTop=M.scrollHeight):h.current!=null&&(M.scrollTop+=M.scrollHeight-h.current,h.current=null),v.current=!1)},[n,y]),w.useEffect(()=>{const M=d.current;if(!n||!M)return;const L=()=>{p.current=gee(M,l),k.current&&xee(M.scrollTop,u)&&O.current()};return M.addEventListener("scroll",L,{passive:!0}),()=>M.removeEventListener("scroll",L)},[n,l,u]),w.useEffect(()=>{const M=f.current;if(!n||!M||typeof ResizeObserver>"u")return;const L=new ResizeObserver(()=>{p.current&&T()});return L.observe(M),()=>L.disconnect()},[n,T]),w.useEffect(()=>{if(!n||!N)return;const M=vee(),L=M?.requestIdleCallback??(z=>window.setTimeout(z,200)),F=M?.cancelIdleCallback??window.clearTimeout,U=L(()=>O.current());return()=>F(U)},[n,i,N]),{scrollRef:d,contentRef:f,startIndex:S,hasMore:N}}function I1(e,t){const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function vC({session:e,className:t,defaultExpanded:n=!1,showThinking:r=!0,showHeader:s=!0,showMenu:i=!0,menuContainer:l,defaultDensity:u,defaultTheme:d,scrollable:f=!1,windowSize:p=60,batchSize:h=40}){var x;const v=w.useMemo(()=>VB(e),[e]),y=e2(),[b,j]=w.useState(u),[S,N]=w.useState(d),[k,T]=w.useState(()=>new Set),[E,O]=w.useState(()=>new Set),[M,L]=w.useState(()=>new Set),[F,U]=w.useState(void 0),z=F??r,V=w.useMemo(()=>iU(v),[v]),X=w.useMemo(()=>v.some(ge=>ge.kind==="thinking"),[v]),H={hiddenCategories:k,hiddenTools:E,hiddenSources:M,showThinking:z},B=v.filter(ge=>oU(ge,H)),W=`${v.length}:${((x=v[0])==null?void 0:x.id)??""}`,{scrollRef:se,contentRef:P,startIndex:J}=bee({total:B.length,enabled:f,windowSize:p,batchSize:h,resetKey:W});if(v.length===0)return o.jsx("div",{className:R("rounded-md border border-dashed border-border p-density-4 text-center text-sm text-muted-foreground",t),children:"No session activity."});const ne=eU(v),$=b??y,Q={...b?{"data-density":b}:{},...S?{"data-theme":S}:{}},ae=i?o.jsx(mee,{density:b,onDensityChange:j,theme:S,onThemeChange:N,filters:V,hiddenCategories:k,hiddenTools:E,hiddenSources:M,onToggleCategory:ge=>T(ve=>I1(ve,ge)),onToggleTool:ge=>O(ve=>I1(ve,ge)),onToggleSource:ge=>L(ve=>I1(ve,ge)),showThinking:z,onToggleThinking:()=>U(!z),hasThinking:X}):null,ie=ae&&!l,de=B.length===0?o.jsx("div",{className:"rounded-md border border-dashed border-border p-density-4 text-center text-sm text-muted-foreground",children:"All actions are hidden by the active filters."}):o.jsx("ol",{className:"relative",children:B.slice(J).map((ge,ve)=>o.jsx(eee,{event:ge,last:J+ve===B.length-1,defaultExpanded:n},ge.id))});return o.jsx("div",{className:R("text-sm",f&&"flex h-full min-h-0 flex-col",t),...Q,children:o.jsxs($8,{density:$,children:[ae&&l&&pa.createPortal(ae,l),(s||ie)&&o.jsxs("div",{className:R("flex items-center justify-between gap-density-3",f?"shrink-0 border-b border-border px-density-4 py-density-2 md:px-density-6":"mb-density-3"),children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-x-density-3 gap-y-1 text-xs text-muted-foreground",children:[s&&ne.model&&o.jsxs("span",{className:"inline-flex items-center gap-1 font-medium text-foreground",children:[o.jsx(K,{icon:ms,className:"size-3.5"}),ne.model]}),s&&o.jsxs("span",{children:[ne.toolCount," actions"]}),s&&o.jsxs("span",{children:[ne.messageCount," messages"]})]}),ie&&ae]}),f?o.jsx("div",{ref:se,className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx("div",{ref:P,className:"p-density-4 md:p-density-6",children:de})}):de]})})}const ps=kB(),yee="claude-agent-sonnet";function wee(e){const t=ia(e.operation.operationId),n=ia(e.operation["x-clicky"]?.command),r=ia(e.path.replace(/^\/api\/v1\/?/,""));return t==="ai/agent"||n==="ai/agent"||r==="ai/agent"}function _ee(e){const n=(ia(e.operation["x-clicky"]?.command)||ia(e.operation.operationId)||ia(e.path.replace(/^\/api\/v1\/?/,""))).split("/")[0];return!["ai","serve","mcp","hook","container","sandbox","port","configure"].includes(n)}function jee(e){const t=Is(e.backend).toLowerCase(),n=Is(e.model).toLowerCase();return t.includes("codex")||n.includes("codex")||n.includes("gpt-5-codex")?"codex-gpt-5-codex":n.includes("opus")?"claude-agent-opus":n.includes("haiku")?"claude-agent-haiku":n.startsWith("claude-agent-")?n:yee}function kee(e,t){const n=Is(e.prompt).trim();return n?n.length>96?`${n.slice(0,93)}...`:n:`Captain agent ${t}`}function Nee(e){return Cee(e.responseHeaders)||fu(e.parsed)||h8(e.stdout)||h8(e.output)}function Cee(e){return e&&(e["x-session-id"]||e["x-provider-session-id"]||e["x-captain-session-id"])||""}function fu(e,t=""){if(e==null)return"";if(typeof e=="string")return g8(t)?e.trim():"";if(Array.isArray(e)){for(const s of e){const i=fu(s,t);if(i)return i}return""}if(typeof e!="object")return"";const n=e;for(const s of["sessionId","sessionID","session_id","SessionID","ProviderSessionID","providerSessionId"]){const i=Is(n[s]).trim();if(i)return i}const r=Is(n.name)||Is(n.label)||t;if(g8(r)){const s=p8(n.value)||p8(n);if(s)return s}for(const s of["node","fields","rows","value","children","items"]){const i=fu(n[s],r);if(i)return i}for(const[s,i]of Object.entries(n)){const l=fu(i,s);if(l)return l}return""}function p8(e){if(e==null)return"";if(typeof e=="string")return e.trim();if(typeof e!="object")return"";const t=e;return(Is(t.plain)||Is(t.text)||Is(t.value)).trim()}function h8(e){if(!e)return"";try{const n=JSON.parse(e),r=fu(n);if(r)return r}catch{}return(e.match(/"sessionId"\s*:\s*"([^"]+)"/i)||e.match(/"session_id"\s*:\s*"([^"]+)"/i)||e.match(/\bSession\s+([A-Za-z0-9_.:-]+)/i))?.[1]?.trim()??""}function g8(e){const t=ia(e);return t==="session"||t==="session/id"||t==="sessionid"||t==="provider/session/id"||t==="providersessionid"}function ia(e){return Is(e).trim().toLowerCase().replace(/^\/+|\/+$/g,"").replace(/[_\s.-]+/g,"/").replace(/\/+/g,"/")}function Is(e){return typeof e=="string"?e:""}function See({onNavigate:e}){const{operations:t,isLoading:n,error:r}=_i(ps),s=w.useMemo(()=>t.find(wee),[t]),{openPanel:i}=id(),[l,u]=w.useState(""),[d,f]=w.useState(!1);async function p(h,x,v){if(u(""),!h.success){u(h.error||"Agent command failed.");return}const y=Nee(h);if(!y){u("Agent command completed without a session id.");return}const b=jee(v);f(!0);try{const j=await Eee({providerSessionId:y,title:kee(v,y),model:b});i({threadId:j.id,initialModel:b}),e(j.launchUrl||`/chat/${encodeURIComponent(j.id)}`)}catch(j){u(j instanceof Error?j.message:String(j))}finally{f(!1)}}return n?o.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading operations..."}):r?o.jsx("div",{className:"p-6 text-sm text-destructive",children:r instanceof Error?r.message:String(r)}):s?o.jsxs("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 p-4 md:p-6",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border pb-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h1",{className:"truncate text-lg font-semibold",children:"New Captain Agent"}),o.jsx("div",{className:"truncate text-xs text-muted-foreground",children:s.operation["x-clicky"]?.command??"captain ai agent"})]}),o.jsx(Fe,{variant:"outline",size:"sm",onClick:()=>e("/operations"),children:"Operations"})]}),l&&o.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:l}),d&&o.jsx("div",{className:"rounded-md border border-border bg-muted/40 px-3 py-2 text-sm text-muted-foreground",children:"Opening chat window..."}),o.jsx(ej,{client:ps,operation:s,operations:t,autoRun:!1,backHref:"/operations",backLabel:"Operations",onNavigate:e,onResult:p})]}):o.jsxs("div",{className:"p-6",children:[o.jsx("div",{className:"mb-4 text-sm text-muted-foreground",children:"`captain ai agent` was not found in the operation catalog."}),o.jsx(Fe,{onClick:()=>e("/operations"),children:"Open operations"})]})}async function Eee(e){const t=await fetch("/api/captain/chat/threads/from-agent",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text();throw new Error(n||`Create chat thread failed with ${t.status}`)}return await t.json()}const Tee="Disabled",Oee={"Accounting Read":"on","Accounting Transaction Write":"ask","Accounting Metadata Write":"ask","Comments Read":"on","Comments Write":"ask","Xero Read":"off","Xero Write":"off","Takealot Read":"on","Takealot Write":"off","Admin Read":"on","Admin Write":"ask"};function Mee(e,t){const n=new Map;for(const s of[])n.set(s.key,s);const r=[];for(const s of e){const i=Aee(s.operation,s,n);i&&r.push(i)}return r}function Aee(e,t,n){if(!e.operationId||Fee(e,t))return null;const r=e["x-clicky"],s=r?.toolHints,i=$ee(e,t);if(i===Tee)return null;const l=r?.surface?n?.get(r.surface):void 0,u=s?.parent||l?.title||l?.entity,d=s?.icon||l?.icon,f=s?.defaultPermission??(i?zee(i):void 0),p=e.description??e.summary;return{name:e.operationId,label:Vee(e),...i?{group:i,preferenceKey:i}:r?.surface?{group:r.surface}:{},...f?{defaultPermission:f}:{},...u?{parent:u}:{},...l?.entity?{entity:l.entity}:{},...d?{icon:d}:{},...p?{description:p}:{},...t?.method?{method:t.method.toUpperCase()}:{},...t?.path?{path:t.path}:{},strict:s?.strict??!0,annotations:Lee(e,t,i,p),inputSchema:Zee(e)}}function Lee(e,t,n,r){var s,i,l;const u=(s=e["x-clicky"])==null?void 0:s.toolHints,d=((i=t?.method)==null?void 0:i.toUpperCase())??"",f={},p=u?.title??e.summary??((l=e["x-clicky"])==null?void 0:l.actionName)??r;return p&&(f.title=p),u?.readOnlyHint!==void 0?f.readOnlyHint=u.readOnlyHint:Ree(e,t,n)&&(f.readOnlyHint=!0),u?.idempotentHint!==void 0?f.idempotentHint=u.idempotentHint:Pee(d)&&(f.idempotentHint=!0),u?.destructiveHint!==void 0?f.destructiveHint=u.destructiveHint:Iee(e,t,n)&&(f.destructiveHint=!0),u?.openWorldHint!==void 0&&(f.openWorldHint=u.openWorldHint),f}function Ree(e,t,n){var r;return(((r=t?.method)==null?void 0:r.toUpperCase())??"")==="GET"||!!n?.toLowerCase().includes(" read")||bC(e.operationId??"")}function Pee(e){return e==="GET"||e==="HEAD"||e==="OPTIONS"||e==="PUT"||e==="DELETE"}function Iee(e,t,n){var r;const s=((r=t?.method)==null?void 0:r.toUpperCase())??"";if(s==="DELETE")return!0;if(s==="GET"||s==="HEAD"||s==="OPTIONS")return!1;const i=`${n??""} ${t?.path??""} ${e.operationId??""}`.toLowerCase();return/\b(write|delete|remove|destroy|void|sync|create|update|patch|post)\b/.test(i)}function $ee(e,t){var n;const r=e["x-clicky"];return(n=r?.toolHints)!=null&&n.group?r.toolHints.group:r?.group?r.group:Bee(e,t)}function Fee(e,t){var n;return x8(e.operationId)||x8((n=e["x-clicky"])==null?void 0:n.command)||Dee(t?.path)}function x8(e){if(!e)return!1;const n=e.replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/[/_.-]+/g," ").trim().toLowerCase().split(/\s+/)[0];return n==="completion"||n==="help"}function Dee(e){if(!e)return!1;const t=e.split("/").filter(Boolean).map(s=>s.toLowerCase()),r=(t[0]==="api"&&/^v\d+$/.test(t[1]??"")?t.slice(2):t)[0];return r==="completion"||r==="help"}function Bee(e,t){var n;const r=e.operationId??"",s=e.tags??[],i=t?.path??"",l=((n=t?.method)==null?void 0:n.toUpperCase())??"",u=Uee(l);if(i.startsWith("/api/v1/provider/")||r.startsWith("provider"))return u?"Xero Write":"Xero Read";if(i.startsWith("/api/v1/comments")||i.startsWith("/api/v1/comment-messages")||/^(comments|commentMessages|comment)/.test(r))return u?"Comments Write":"Comments Read";if(i==="/api/v1/accounts/mapping"||r.startsWith("accountMapping")||i==="/api/v1/entity/metadata"||r.startsWith("entityMetadata")||i.startsWith("/api/v1/companies/")||r.startsWith("companyBranding"))return u?"Accounting Metadata Write":"Accounting Read";if(i.startsWith("/api/v1/transactions")||i.startsWith("/api/v1/journals")||/^(transactions|journals)/.test(r))return u?"Accounting Transaction Write":"Accounting Read";if(i.startsWith("/api/v1/rules/")||i.startsWith("/api/v1/rates/")||i.startsWith("/api/v1/template/")||i.startsWith("/api/v1/formula/")||s.some(d=>["rules","rates","template","formula"].includes(d))||/^(rules|rates|template|formula)/.test(r))return u&&!bC(r)?"Admin Write":"Admin Read"}function Uee(e){return e==="POST"||e==="PUT"||e==="PATCH"||e==="DELETE"}function bC(e){return/(list|load|render|pdf|eval|context|validate|preview|coverage|entries|get|history|export)/i.test(e)}function zee(e){return Oee[e]??"ask"}function Vee(e){var t,n;const r=e["x-clicky"],s=((t=r?.actionName)==null?void 0:t.trim())||((n=r?.verb)==null?void 0:n.trim());return s&&s!=="action"?s.charAt(0).toUpperCase()+s.slice(1):e.summary?e.summary:Hee(e.operationId??"")}function Hee(e){const t=e.replace(/[_-]+/g," ").replace(/([a-z\d])([A-Z])/g,"$1 $2");return t.charAt(0).toUpperCase()+t.slice(1)}function Zee(e){const t={},n=[];for(const s of e.parameters??[])t[s.name]=Wee(s),s.required&&n.push(s.name);const r=Kee(e);if(r?.properties)for(const[s,i]of Object.entries(r.properties))t[s]=yC(i);return{type:"object",properties:t,required:n,additionalProperties:!1}}function Wee(e){const t=yC(e.schema);return e.description&&!t.description&&(t.description=e.description),t}function yC(e){if(!e)return{type:"string"};const t={type:qee(e.type)};return e.description!==void 0&&(t.description=e.description),e.enum!==void 0&&(t.enum=e.enum),e.default!==void 0&&(t.default=e.default),t}function qee(e){switch(e){case"object":case"array":case"string":case"integer":case"number":case"boolean":case"null":return e;default:return"string"}}function Kee(e){var t,n,r;const s=(t=e.requestBody)==null?void 0:t.content;if(s)return((n=s["application/json"])==null?void 0:n.schema)??((r=Object.values(s)[0])==null?void 0:r.schema)}function Gee(){const{operations:e}=_i(ps),t=w.useMemo(()=>Mee(e.filter(_ee)),[e]);return o.jsxs(o.Fragment,{children:[o.jsx(xU,{}),o.jsx(BG,{threadsApi:"/api/chat/threads",tools:t,defaultToolMode:"auto",chat:{api:"/api/chat",modelsApi:"/api/chat/models",defaultModel:"claude-agent-sonnet",enableAttachments:!0,toolApproval:"manual",suggestions:["Summarize this run","Show recent changed files","Check the current repo status"],placeholder:"Continue the agent session..."}})]})}function Jee({threadId:e,model:t,onNavigate:n}){const{panels:r,openPanel:s}=id();return w.useEffect(()=>{e&&(r.some(i=>i.threadId===e)||s({threadId:e,initialModel:t||null}))},[t,s,r,e]),o.jsx("div",{className:"flex h-full min-h-0 items-center justify-center p-6",children:o.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o.jsx("div",{className:"text-sm font-medium",children:"Chat window opened"}),o.jsx(Fe,{size:"sm",variant:"outline",onClick:()=>n("/"),children:"New agent"})]})})}const Qee=/^(?:bg|text|border|fill|stroke)-/;function Yee(e){return Qee.test(e.trim())}function Px({segments:e,total:t,height:n="h-2",className:r}){if(t===0)return null;const s=e.filter(i=>i.count>0).map(i=>`${i.count} ${i.label}`).join(", ");return o.jsx("div",{className:R("w-full bg-muted rounded-full flex overflow-hidden",n,r),title:s,role:"progressbar","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":e.reduce((i,l)=>i+l.count,0),children:e.map((i,l)=>{if(i.count===0)return null;const u=i.count/t*100,d=Yee(i.color);return o.jsx("div",{className:R(d?i.color:void 0,n,"transition-all duration-300"),style:{width:`${u}%`,...d?{}:{backgroundColor:i.color}},title:`${i.count} ${i.label}`},l)})})}function v8({title:e,rows:t,footer:n,trigger:r,placement:s="top",className:i}){return o.jsx(nd,{placement:s,delay:150,trigger:r,cardClassName:"min-w-[9rem]",...i?{className:i}:{},children:o.jsxs("div",{className:"flex flex-col gap-1 text-[11px]",children:[o.jsx("div",{className:"font-medium text-foreground",children:e}),o.jsx("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-0.5 tabular-nums",children:t.map(l=>o.jsxs(w.Fragment,{children:[o.jsx("dt",{className:"text-muted-foreground",children:l.label}),o.jsx("dd",{className:R("text-right font-medium text-foreground",l.tone),children:l.value})]},l.label))}),n?o.jsx("div",{className:"mt-0.5 text-[10px] text-muted-foreground",children:n}):null]})})}const Xee=e=>Math.min(1,Math.max(0,e));function ete(e,t,n=1e3){const r=e!==void 0,s=(e??0)/n,i=t!==void 0&&t>0,l=i?t/n:void 0,u=Math.max(1,Math.ceil(i?l:s)),d=i?Math.min(100,Math.round(s/l*100)):0,f=Array.from({length:u},(p,h)=>({fill:Xee(s-h)}));return{hasUsage:r,usageUnits:s,barCount:u,pct:d,bars:f,...l!==void 0&&{limitUnits:l}}}function tte(e,[t,n]){return e>=n?"bg-red-500":e>=t?"bg-amber-500":"bg-emerald-500"}function nte({icon:e}){return typeof e=="string"?o.jsx(K,{name:e,width:14,height:14,className:"text-muted-foreground"}):o.jsx(K,{icon:e,width:14,height:14,className:"text-muted-foreground"})}function rte(e){return Number.isInteger(e)?String(e):e.toFixed(1)}function ste({usage:e,max:t,unit:n,title:r,icon:s,thresholds:i=[75,90],variant:l="default",showLabel:u=!0,showValue:d=!0,showCapacity:f=!1,orientation:p,stats:h,hoverCard:x=!0,hoverFooter:v,className:y}){const b=n?.perBar??1e3,j=n?.label??"cores",S=n?.barLabel??"core",N=n?.format??rte,k=ete(e,t,b),T=tte(k.pct,i),E=N(k.usageUnits),O=k.limitUnits!==void 0?N(k.limitUnits):"?",M=k.hasUsage?f?`${E} / ${O} ${j}`:`${E} ${j}`:"—",L=k.hasUsage?f?`${E}/${O} ${j}`:`${E} ${j}`:"—",F=`${r}: ${L}`,U=l==="cell",z=k.limitUnits===void 0?void 0:k.pct>=i[1]?"text-red-500":k.pct>=i[0]?"text-amber-500":"text-emerald-500",V=ae=>`${N(ae)} ${j}`,X=k.hasUsage?[{label:"Current",value:V(k.usageUnits),...z?{tone:z}:{}},...h?[{label:"Min",value:V(h.min/b)},{label:"Max",value:V(h.max/b)},{label:"Avg",value:V(h.avg/b)}]:[],...k.limitUnits!==void 0?[{label:"Capacity",value:V(k.limitUnits)}]:[]]:[],H=p??"vertical",B=k.barCount>4,W=U?L:M,se=!u||!d?F:void 0,P=o.jsx("span",{className:R("flex shrink-0",H==="vertical"?R("items-end",U?"h-4 gap-px":"h-10 gap-0.5"):R("flex-col justify-center",U?"h-4 w-10 gap-px":"h-10 w-16 gap-0.5")),"aria-hidden":U?"true":void 0,"data-orientation":H,"data-bar-count":k.barCount,"data-bar-density":B?"compact":"default",children:k.bars.map((ae,ie)=>{const de=Math.round(ae.fill*100);return o.jsx("span",{className:R("relative overflow-hidden bg-muted",H==="vertical"?R("h-full",U?B?"w-[3px] rounded-[2px]":"w-1.5 rounded-[2px]":B?"w-1 rounded-sm":"w-2 rounded-sm"):R("min-h-px w-full flex-1 rounded-[2px]")),title:`${S} ${ie+1}: ${de}%`,"aria-label":U?void 0:`${S} ${ie+1}: ${de}%`,"data-fill":ae.fill,children:o.jsx("span",{className:R("absolute bottom-0 left-0 transition-all duration-300",T),style:H==="vertical"?{height:`${de}%`,right:0}:{width:`${de}%`,top:0}})},ie)})}),J=d?o.jsx("span",{className:R("shrink-0 font-semibold tabular-nums text-foreground",U?null:"text-xs"),children:W}):null,ne=s||u?o.jsxs("span",{className:R("inline-flex min-w-0 items-center gap-1 text-xs text-muted-foreground"),children:[s?o.jsx(nte,{icon:s}):null,u?o.jsx("span",{className:"min-w-0 truncate",children:r}):null]}):null,$=x&&X.length>0;if(U){const ae=o.jsxs("span",{className:R("inline-flex min-w-0 items-center gap-1.5 whitespace-nowrap align-middle text-xs",y),...$?{}:{title:F},"aria-label":$?F:se,children:[ne,P,J]});return $?o.jsx(v8,{title:r,rows:X,footer:v,trigger:ae}):ae}const Q=o.jsxs("div",{className:R("flex flex-col items-center gap-1",y),...$?{}:{title:se},"aria-label":$?F:se,children:[P,J,ne]});return $?o.jsx(v8,{title:r,rows:X,footer:v,trigger:Q,className:"w-full justify-center"}):Q}const Ix=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[o.jsx("path",{d:"M12 12v-2m0 8v-2m4-4v-2m0 8v-2M2 11h1.5M20 18v-2m.5-5H22M4 18v-2m4-4v-2m0 8v-2"}),o.jsx("rect",{width:"20",height:"10",x:"2",y:"6",rx:"2"})]})}),{__source:"lucide:memory-stick",__viewBox:"0 0 24 24",__group:"ui-controls",__consumerName:"memory-stick",displayName:"UiMemoryStick"}),b8=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M204.24 195.76a6 6 0 1 1-8.48 8.48L128 136.49l-67.76 67.75a6 6 0 0 1-8.48-8.48L119.51 128L51.76 60.24a6 6 0 0 1 8.48-8.48L128 119.51l67.76-67.75a6 6 0 0 1 8.48 8.48L136.49 128Z"})}),{__source:"ph:x-light",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"cancel",displayName:"UiCancel"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m-26.34 138.34a8 8 0 0 1-11.32 11.32L128 139.31l-42.34 42.35a8 8 0 0 1-11.32-11.32L116.69 128L74.34 85.66a8 8 0 0 1 11.32-11.32L128 116.69l42.34-42.35a8 8 0 0 1 11.32 11.32L139.31 128Z"})}),{__source:"ph:x-fill",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"cancel",displayName:"UiCancelFilled"});const $1=Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#059669",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M172.24 99.76a6 6 0 0 1 0 8.48l-56 56a6 6 0 0 1-8.48 0l-24-24a6 6 0 0 1 8.48-8.48L112 151.51l51.76-51.75a6 6 0 0 1 8.48 0M230 128A102 102 0 1 1 128 26a102.12 102.12 0 0 1 102 102m-12 0a90 90 0 1 0-90 90a90.1 90.1 0 0 0 90-90"})})},{__source:"ph:check-circle-light",__viewBox:"0 0 256 256",__group:"approval-review",__consumerName:"pass",__defaultColor:"#059669",displayName:"UiPass"});Object.assign(({size:e="1em",className:t,title:n,style:r,...s})=>{const l=typeof t=="string"&&/\btext-/.test(t)||r&&r.color!=null?r:{color:"#059669",...r};return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,style:l,...s,children:o.jsx("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m45.66 85.66l-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 11.32"})})},{__source:"ph:check-circle-fill",__viewBox:"0 0 256 256",__group:"approval-review",__consumerName:"pass",__defaultColor:"#059669",displayName:"UiPassFilled"});const ote={success:"text-green-600 dark:text-green-400",PASS:"text-green-600 dark:text-green-400",completed:"text-green-600 dark:text-green-400",failed:"text-red-600 dark:text-red-400",FAIL:"text-red-600 dark:text-red-400",ERR:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",running:"text-blue-600 dark:text-blue-400",pending:"text-gray-400",canceled:"text-gray-400",SKIP:"text-gray-400"},ite={pending:Eu,running:Zk,success:$1,PASS:$1,completed:$1,failed:wl,FAIL:wl,ERR:wl,warning:hC,canceled:b8,SKIP:b8},ate={success:"bg-green-100 dark:bg-green-500/20",completed:"bg-green-100 dark:bg-green-500/20",PASS:"bg-green-100 dark:bg-green-500/20",failed:"bg-red-100 dark:bg-red-500/20",FAIL:"bg-red-100 dark:bg-red-500/20",ERR:"bg-red-100 dark:bg-red-500/20",warning:"bg-yellow-100 dark:bg-yellow-500/20",running:"bg-blue-100 dark:bg-blue-500/20",pending:"bg-gray-100 dark:bg-gray-500/20"};function Lu(e){return ote[e]??"text-gray-500"}function $x(e){return ite[e]??Vk}function wC(e){return ate[e]??"bg-gray-100 dark:bg-gray-500/20"}function y8(e){switch(e){case"error":return"text-red-500";case"warn":return"text-yellow-600 dark:text-yellow-400";case"debug":return"text-gray-400";default:return"text-gray-500"}}function _C(e){return[{count:e.ok,color:"bg-green-500",label:"passed"},{count:e.warn,color:"bg-yellow-400",label:"warnings"},{count:e.fail,color:"bg-red-500",label:"failed"},{count:e.run,color:"bg-blue-500",label:"running"},{count:e.pending,color:"bg-gray-300",label:"pending"}]}function lte(e){let t=0,n=0,r=0,s=0,i=0;for(const l of e)switch(l.status){case"success":case"PASS":t+=1;break;case"warning":n+=1;break;case"failed":case"FAIL":case"ERR":r+=1;break;case"running":s+=1;break;case"pending":i+=1;break;default:t+=1}return{ok:t,warn:n,fail:r,run:s,pending:i}}const w8=5,_8=3;function cte({snapshots:e,title:t,compact:n,className:r}){const s=e.filter(l=>l.type==="group"),i=e.filter(l=>l.type==="task");return s.length===0?o.jsxs("div",{className:R("text-sm text-muted-foreground",r),children:[t?`${t}: `:"","No tasks yet."]}):o.jsxs("div",{className:R(n?"space-y-2":"space-y-3",r),children:[t&&o.jsx("h2",{className:"text-sm font-semibold",children:t}),s.map(l=>o.jsx(ute,{group:l,tasks:i.filter(u=>u.groupId===l.groupId||u.group===l.id),compact:n},l.groupId||l.id))]})}function j8(e){return e.status==="failed"||e.status==="FAIL"||e.status==="ERR"||e.status==="warning"}function ute({group:e,tasks:t,compact:n}){const[r,s]=w.useState(!1),i=e.total??t.length,l=lte(t),u=l.ok+l.warn+l.fail,d=i>0?`${u}/${i}`:"",f=t.filter(E=>E.status==="running"),p=t.filter(E=>E.status==="pending"),h=t.filter(E=>E.status!=="running"&&E.status!=="pending"),x=h.filter(j8),v=h.filter(E=>!j8(E)),y=v.length-w8,b=!r&&y>0,j=b?v.slice(-w8):v,S=p.length-_8,N=!r&&S>0,k=N?p.slice(0,_8):p,T=e.status!=="running"&&e.status!=="pending";return o.jsxs("div",{className:R("rounded-lg border bg-card",n?"p-3":"p-4"),children:[o.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[o.jsxs("h3",{className:"flex items-center gap-1.5 text-sm font-semibold",children:[o.jsx(K,{icon:$x(e.status),className:R(Lu(e.status),e.status==="running"&&"animate-spin")}),o.jsx("span",{children:e.name}),d&&o.jsx("span",{className:"text-xs text-muted-foreground",children:d}),e.kind&&o.jsx("span",{className:"rounded-full bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:e.kind})]}),T&&o.jsx("span",{className:R("rounded-full px-2 py-0.5 text-xs",Lu(e.status),wC(e.status)),children:e.status})]}),i>0&&o.jsx("div",{className:"mb-3",children:o.jsx(Px,{segments:_C(l),total:i,height:"h-1.5"})}),y>0||S>0?o.jsx("button",{type:"button",className:"border-b py-1.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>s(E=>!E),children:r?"▲ collapse":`... ${(b?y:0)+(N?S:0)} more tasks`}):null,[...j,...x,...f,...k].map(E=>o.jsx(dte,{task:E},E.id))]})}function dte({task:e}){const[t,n]=w.useState(!1),r=e.logs??[],s=r.length>0,i=e.error?void 0:r.filter(f=>f.level==="warn").at(-1),l=e.progress??0,u=typeof e.maxValue=="number"&&e.maxValue>0&&l>0,d=u?Math.round(l/e.maxValue*100):0;return o.jsxs("div",{className:R("flex items-start gap-3 border-b py-2 last:border-0",s&&"-mx-1 cursor-pointer rounded px-1 hover:bg-muted/50"),onClick:s?()=>n(f=>!f):void 0,children:[o.jsx(K,{icon:$x(e.status),className:R(Lu(e.status),"mt-0.5 text-lg",e.status==="running"&&"animate-spin")}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-sm font-medium",children:[o.jsx("span",{className:"truncate",children:e.name}),e.error&&o.jsx("span",{className:"truncate text-xs font-normal text-red-500",children:e.error}),i&&o.jsx("span",{className:R("truncate text-xs font-normal",y8("warn")),children:i.message}),s&&o.jsx("span",{className:"inline-flex shrink-0 items-center rounded-full bg-muted px-1.5 text-[10px] font-medium text-muted-foreground",children:r.length})]}),e.duration&&o.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.duration})]}),(e.description||u)&&o.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[e.description&&o.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-muted-foreground",children:e.description}),u&&o.jsxs("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:[l,"/",e.maxValue," · ",d,"%"]})]}),u&&e.status==="running"&&o.jsx("div",{className:"mt-1",children:o.jsx(Px,{segments:[{count:l,color:"bg-blue-500",label:"done"}],total:e.maxValue,height:"h-1"})}),t&&s&&o.jsx("div",{className:"mt-1 ml-1 max-h-48 space-y-0.5 overflow-y-auto border-l-2 pl-2",children:r.map((f,p)=>o.jsxs("div",{className:R("text-xs",y8(f.level)),children:[o.jsx("span",{className:"mr-1 font-mono text-muted-foreground",children:f.level.substring(0,3)}),f.message]},p))})]})]})}function fte({basePath:e,kind:t,pollMs:n,className:r,selectedId:s,onSelectRun:i}){const[l,u]=w.useState(t??""),[d,f]=w.useState(""),{runs:p,status:h}=U8({basePath:e,kind:t??(l||void 0),status:d||void 0,pollMs:n}),x=w.useMemo(()=>{const v=new Set;for(const y of p)y.kind&&v.add(y.kind);return[...v].sort()},[p]);return o.jsxs("div",{className:R("space-y-3",r),children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[!t&&o.jsxs("select",{className:"rounded-md border bg-background px-2 py-1 text-xs",value:l,onChange:v=>u(v.target.value),children:[o.jsx("option",{value:"",children:"All kinds"}),x.map(v=>o.jsx("option",{value:v,children:v},v))]}),o.jsxs("select",{className:"rounded-md border bg-background px-2 py-1 text-xs",value:d,onChange:v=>f(v.target.value),children:[o.jsx("option",{value:"",children:"Any status"}),o.jsx("option",{value:"running",children:"Running"}),o.jsx("option",{value:"pending",children:"Pending"}),o.jsx("option",{value:"success",children:"Success"}),o.jsx("option",{value:"failed",children:"Failed"}),o.jsx("option",{value:"warning",children:"Warning"})]}),o.jsx("span",{className:"text-xs text-muted-foreground",children:h})]}),p.length===0?o.jsx("div",{className:"rounded-lg border border-dashed p-6 text-center text-sm text-muted-foreground",children:"No background tasks."}):o.jsx("div",{className:"overflow-hidden rounded-lg border bg-card",children:p.map(v=>o.jsx(mte,{run:v,basePath:e,pollMs:n,selectedId:s,onSelectRun:i},v.id))})]})}function mte({run:e,basePath:t,pollMs:n,selectedId:r,onSelectRun:s}){const[i,l]=w.useState(!1),u=s!==void 0,d=u?r===e.id:i,f=()=>{u?s(d?null:e.id):l(h=>!h)},p=e.status!=="running"&&e.status!=="pending";return o.jsxs("div",{className:"border-b last:border-0",children:[o.jsxs("button",{type:"button",className:"flex w-full items-center justify-between gap-4 px-4 py-3 text-left hover:bg-muted/50",onClick:f,children:[o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(K,{icon:$x(e.status),className:R(Lu(e.status),e.status==="running"&&"animate-spin")}),o.jsx("span",{className:"truncate font-medium",children:e.name}),e.kind&&o.jsx("span",{className:"rounded-full bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:e.kind}),p&&o.jsx("span",{className:R("rounded-full px-2 py-0.5 text-xs",Lu(e.status),wC(e.status)),children:e.status})]}),o.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-0.5 text-xs text-muted-foreground",children:[e.startedAt&&o.jsx(K3,{value:e.startedAt,format:"relative"}),o.jsxs("span",{children:[e.completed+e.failed,"/",e.total," done",e.failed>0?`, ${e.failed} failed`:""]}),Object.entries(e.labels??{}).map(([h,x])=>o.jsxs("span",{className:"font-mono",children:[h,"=",x]},h))]})]}),o.jsx("div",{className:"w-40 shrink-0",children:o.jsx(Px,{segments:_C({ok:e.completed,warn:0,fail:e.failed,run:e.running,pending:Math.max(0,e.total-e.completed-e.failed-e.running)}),total:e.total||1,height:"h-1.5"})})]}),d&&o.jsx(pte,{runId:e.id,basePath:t,pollMs:n})]})}function pte({runId:e,basePath:t,pollMs:n}){const{snapshots:r}=Z7({id:e,basePath:t,pollMs:n});return o.jsx("div",{className:"border-t bg-muted/30 px-4 py-3",children:o.jsx(cte,{snapshots:r,compact:!0})})}const hte=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 202h-10V40a6 6 0 0 0-6-6h-56a6 6 0 0 0-6 6v42H96a6 6 0 0 0-6 6v42H48a6 6 0 0 0-6 6v66H32a6 6 0 0 0 0 12h192a6 6 0 0 0 0-12M158 46h44v156h-44Zm-56 48h44v108h-44Zm-48 48h36v60H54Z"})}),{__source:"ph:chart-bar-light",__viewBox:"0 0 256 256",__group:"data-analytics",__consumerName:"chart-bar",displayName:"UiChartBar"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M232 208a8 8 0 0 1-8 8H32a8 8 0 0 1 0-16h8v-64a8 8 0 0 1 8-8h24a8 8 0 0 1 8 8v64h16V88a8 8 0 0 1 8-8h32a8 8 0 0 1 8 8v112h16V40a8 8 0 0 1 8-8h40a8 8 0 0 1 8 8v160h8a8 8 0 0 1 8 8"})}),{__source:"ph:chart-bar-fill",__viewBox:"0 0 256 256",__group:"data-analytics",__consumerName:"chart-bar",displayName:"UiChartBarFilled"});const Fx=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M134 80v44.6l37.09 22.25a6 6 0 0 1-6.18 10.3l-40-24A6 6 0 0 1 122 128V80a6 6 0 0 1 12 0m-6-46a93.4 93.4 0 0 0-66.49 27.56c-8.58 8.68-16 17-23.51 25.8V64a6 6 0 0 0-12 0v40a6 6 0 0 0 6 6h40a6 6 0 0 0 0-12H44.73C52.86 88.29 60.79 79.35 70 70a82 82 0 1 1 1.7 117.62a6 6 0 1 0-8.24 8.72A94 94 0 1 0 128 34"})}),{__source:"ph:clock-counter-clockwise-light",__viewBox:"0 0 256 256",__group:"runtime-process",__consumerName:"history",displayName:"UiHistory"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M224 128a96 96 0 0 1-161.89 69.82a8 8 0 1 1 11-11.64a80 80 0 1 0-1.68-114.75A439 439 0 0 0 61.35 82l16.31 16.34A8 8 0 0 1 72 112H32a8 8 0 0 1-8-8V64a8 8 0 0 1 13.66-5.66L50 70.7c3.22-3.49 6.54-7 10.06-10.55A96 96 0 0 1 224 128m-96-56a8 8 0 0 0-8 8v48a8 8 0 0 0 3.88 6.86l40 24a8 8 0 1 0 8.24-13.72L136 123.47V80a8 8 0 0 0-8-8"})}),{__source:"ph:clock-counter-clockwise-fill",__viewBox:"0 0 256 256",__group:"runtime-process",__consumerName:"history",displayName:"UiHistoryFilled"});const jC=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M160 110h48a14 14 0 0 0 14-14V48a14 14 0 0 0-14-14h-48a14 14 0 0 0-14 14v18h-18a22 22 0 0 0-22 22v34H70v-10a14 14 0 0 0-14-14H24a14 14 0 0 0-14 14v32a14 14 0 0 0 14 14h32a14 14 0 0 0 14-14v-10h36v34a22 22 0 0 0 22 22h18v18a14 14 0 0 0 14 14h48a14 14 0 0 0 14-14v-48a14 14 0 0 0-14-14h-48a14 14 0 0 0-14 14v18h-18a10 10 0 0 1-10-10V88a10 10 0 0 1 10-10h18v18a14 14 0 0 0 14 14M58 144a2 2 0 0 1-2 2H24a2 2 0 0 1-2-2v-32a2 2 0 0 1 2-2h32a2 2 0 0 1 2 2Zm100 16a2 2 0 0 1 2-2h48a2 2 0 0 1 2 2v48a2 2 0 0 1-2 2h-48a2 2 0 0 1-2-2Zm0-112a2 2 0 0 1 2-2h48a2 2 0 0 1 2 2v48a2 2 0 0 1-2 2h-48a2 2 0 0 1-2-2Z"})}),{__source:"ph:tree-structure-light",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"list-tree",displayName:"UiListTree"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M144 96V80h-16a8 8 0 0 0-8 8v80a8 8 0 0 0 8 8h16v-16a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v48a16 16 0 0 1-16 16h-48a16 16 0 0 1-16-16v-16h-16a24 24 0 0 1-24-24v-32H72v8a16 16 0 0 1-16 16H24a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16v8h32V88a24 24 0 0 1 24-24h16V48a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v48a16 16 0 0 1-16 16h-48a16 16 0 0 1-16-16"})}),{__source:"ph:tree-structure-fill",__viewBox:"0 0 256 256",__group:"trees-lists-tables",__consumerName:"list-tree",displayName:"UiListTreeFilled"});const gte=Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M217.9 73.42L182.58 38.1a13.9 13.9 0 0 0-9.89-4.1H48a14 14 0 0 0-14 14v160a14 14 0 0 0 14 14h160a14 14 0 0 0 14-14V83.31a13.9 13.9 0 0 0-4.1-9.89M170 210H86v-58a2 2 0 0 1 2-2h80a2 2 0 0 1 2 2Zm40-2a2 2 0 0 1-2 2h-26v-58a14 14 0 0 0-14-14H88a14 14 0 0 0-14 14v58H48a2 2 0 0 1-2-2V48a2 2 0 0 1 2-2h124.69a2 2 0 0 1 1.41.58l35.32 35.32a2 2 0 0 1 .58 1.41ZM158 72a6 6 0 0 1-6 6H96a6 6 0 0 1 0-12h56a6 6 0 0 1 6 6"})}),{__source:"ph:floppy-disk-light",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"save",displayName:"UiSave"});Object.assign(({size:e="1em",className:t,title:n,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 256 256",role:n?"img":"presentation","aria-label":n,"aria-hidden":n?void 0:!0,className:t,...r,children:o.jsx("path",{fill:"currentColor",d:"M219.31 72L184 36.69A15.86 15.86 0 0 0 172.69 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V83.31A15.86 15.86 0 0 0 219.31 72M208 208h-24v-56a16 16 0 0 0-16-16H88a16 16 0 0 0-16 16v56H48V48h124.69L208 83.31ZM160 72a8 8 0 0 1-8 8H96a8 8 0 0 1 0-16h56a8 8 0 0 1 8 8"})}),{__source:"ph:floppy-disk-fill",__viewBox:"0 0 256 256",__group:"forms-editing",__consumerName:"save",displayName:"UiSaveFilled"});const xte={total:"Total",find:"Find files",parse:"Parse history",enrich:"Live processes"};function vte(e){return e.desc||xte[e.name]||e.name}function kC(e){if(!e)return[];const t=[];for(const n of e.split(",")){const r=n.split(";").map(i=>i.trim()).filter(Boolean);if(r.length===0)continue;const s={name:r[0],dur:0};for(const i of r.slice(1)){const l=i.indexOf("=");if(l<0)continue;const u=i.slice(0,l).trim();let d=i.slice(l+1).trim();d.length>=2&&d.startsWith('"')&&d.endsWith('"')&&(d=d.slice(1,-1)),u==="desc"?s.desc=d:u==="dur"&&(s.dur=Number(d)||0)}t.push(s)}return t}function F1(e){return e>=1e3?`${(e/1e3).toFixed(1)} s`:e<10?`${e.toFixed(1)} ms`:`${Math.round(e)} ms`}const NC=[{id:"all",label:"All"},{id:"claude",label:"Claude"},{id:"codex",label:"Codex"}];async function CC(e){const t=await ps.executeCommand("/api/captain/sessions/live","GET",{source:e.source,all:e.allProjects?"true":"false",q:e.query??"",limit:String(e.limit??100)},{Accept:"application/json"});if(!t.success)throw new Error(t.error||"Failed to load sessions.");const n=kC(t.responseHeaders?.["server-timing"]);return{...t.parsed,...n.length?{timing:n}:{}}}async function bte(e){const t=await ps.executeCommand("/api/v1/sessions/{id}","GET",{id:e},{Accept:"application/json"});if(!t.success)throw new Error(t.error||"Failed to load session.");const n=kC(t.responseHeaders?.["server-timing"]);return{...t.parsed,...n.length?{timing:n}:{}}}function k8(e){return e?(e.inputCost??0)+(e.outputCost??0)+(e.reasoningCost??0)+(e.cacheReadCost??0)+(e.cacheWriteCost??0):0}function yte(e){let t=0;for(const n of e??[])for(const r of n.parts)(r.type==="dynamic-tool"||r.type.startsWith("tool-"))&&(t+=1);return t}function wte(e){return e.git?.branch?`${e.git.branch} - ${Nl(e.id)}`:e.model?`${e.model} - ${Nl(e.id)}`:Nl(e.id)}function Vm(e){return e.detailAvailable===!1&&e.live?.pid?`${e.source} process ${e.live.pid}`:e.gitBranch?`${e.gitBranch} - ${Nl(e.id)}`:e.model?`${e.model} - ${Nl(e.id)}`:Nl(e.id)||e.key}function Nl(e){return e.length>12?e.slice(0,12):e}function Dx(e){if(!e)return"No timestamp";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function oi(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:String(e)}function Bx(e){return e?e<.01?"<$0.01":`$${e.toFixed(2)}`:"$0"}function SC(e){return e?e.split("/").filter(Boolean).slice(-2).join("/")||e:"Unknown project"}function EC(e){if(!e)return"No command";const t=e.split(/\s+/)[0]??e;return t.split("/").pop()||t}function gn(e){const t=e.endedAt??e.startedAt;if(!t)return 0;const n=new Date(t).getTime();return Number.isNaN(n)?0:n}function Y0(e){return Math.max(0,...(e.health??[]).map(t=>_te(t.severity)))}function _te(e){return e==="critical"?3:e==="warning"?2:e==="info"?1:0}function jte(e){return e==="critical"?"border-destructive/50 text-destructive":e==="warning"?"border-amber-500/50 text-amber-700":"border-border text-muted-foreground"}function TC(e){return e==="critical"?"bg-destructive":e==="warning"?"bg-amber-500":"bg-muted-foreground"}function Ux(e){return e instanceof Error?e.message:String(e)}const kte={perBar:25,label:"%",barLabel:"25%",format:e=>`${Math.round(e*25)}`},Nte=[{id:"list",label:"List"},{id:"cards",label:"Cards"}],Cte=[{id:"model",label:"Model"},{id:"health",label:"Health"},{id:"context",label:"Context"},{id:"cpu",label:"CPU"},{id:"memory",label:"Memory"},{id:"tokens",label:"Tokens"},{id:"recent",label:"Recent"}],N8="grid grid-cols-[minmax(12rem,1.4fr)_5.25rem_6.25rem] sm:grid-cols-[minmax(13rem,1.5fr)_5.25rem_6.25rem_6.25rem] lg:grid-cols-[minmax(15rem,1.6fr)_5.5rem_7rem_7rem_7rem_6rem_7rem_5.5rem]",Ste=[{label:"Model",sort:"model"},{label:"Status",sort:"health"},{label:"CPU",sort:"cpu"},{label:"Memory",sort:"memory"},{label:"Context",sort:"context"},{label:"Tokens",sort:"tokens"},{label:"Updated",sort:"recent"},{label:"Actions"}];function Ete({onNavigate:e}){const[t,n]=w.useState("all"),[r,s]=w.useState(!1),[i,l]=w.useState(""),[u,d]=w.useState("list"),[f,p]=w.useState("health"),[h,x]=w.useState("desc"),v=vn({queryKey:["sessions-dashboard",t,r,i],queryFn:()=>CC({source:t,allProjects:r,query:i,limit:200}),refetchInterval:5e3,refetchIntervalInBackground:!1}),y=v.data?.sessions??[],b=w.useMemo(()=>y.filter(Dte).sort((O,M)=>Bte(O,M,f,h)),[y,f,h]),j=w.useMemo(()=>zte(b),[b]),S=w.useMemo(()=>y.filter(O=>(O.health?.length??0)>0).sort((O,M)=>Y0(M)-Y0(O)||gn(M)-gn(O)),[y]),N=w.useMemo(()=>y.filter(O=>!O.live&&O.detailAvailable!==!1).sort((O,M)=>gn(M)-gn(O)).slice(0,6),[y]),k=O=>{O.detailAvailable!==!1&&e(`/sessions/${encodeURIComponent(O.key)}`)},T=O=>{p(O),x(Ute(O))},E=O=>{if(f===O){x(M=>M==="asc"?"desc":"asc");return}T(O)};return o.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-background",children:[o.jsx(Tte,{source:t,onSourceChange:n,allProjects:r,onAllProjectsChange:s,query:i,onQueryChange:l,view:u,onViewChange:d,sort:f,onSortChange:T,loading:v.isFetching,onRefresh:()=>{v.refetch()},onNewAgent:()=>e("/agent")}),o.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[v.error?o.jsx("div",{className:"border-b border-border p-density-4 text-sm text-destructive",children:Ux(v.error)}):null,o.jsx(Ote,{summary:v.data?.summary,liveCount:b.length,loading:v.isLoading}),o.jsxs("div",{className:"grid min-h-0 gap-density-4 px-density-4 pb-density-4 xl:grid-cols-[minmax(0,1fr)_22rem]",children:[o.jsxs("section",{className:"min-w-0",children:[o.jsx("div",{className:"mb-density-2 flex min-w-0 items-center justify-between gap-density-2",children:o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-sm font-semibold",children:"Running Sessions"}),o.jsx("div",{className:"truncate text-xs text-muted-foreground",children:v.isFetching?"Refreshing...":`${b.length} live / ${y.length} shown`})]})}),b.length===0&&!v.isLoading?o.jsx(Fte,{onNewAgent:()=>e("/agent")}):u==="cards"?o.jsx(Rte,{groups:j,onOpen:k}):o.jsx(Ate,{groups:j,sort:f,sortDirection:h,onSortChange:E,onOpen:k})]}),o.jsxs("aside",{className:"min-w-0 space-y-density-4",children:[o.jsx(Ite,{sessions:S,onOpen:k}),o.jsx($te,{sessions:N,onOpen:k})]})]})]})]})}function Tte({source:e,onSourceChange:t,allProjects:n,onAllProjectsChange:r,query:s,onQueryChange:i,view:l,onViewChange:u,sort:d,onSortChange:f,loading:p,onRefresh:h,onNewAgent:x}){return o.jsxs("div",{className:"shrink-0 border-b border-border px-density-4 py-density-3",children:[o.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-density-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h1",{className:"truncate text-lg font-semibold leading-tight",children:"Running Sessions"}),o.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:p?"Refreshing live process data":"Live agent process dashboard"})]}),o.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-density-2",children:[o.jsxs(Fe,{size:"sm",variant:"outline",onClick:h,children:[o.jsx(K,{icon:Tm,className:"size-4"}),"Refresh"]}),o.jsxs(Fe,{size:"sm",onClick:x,children:[o.jsx(K,{icon:ms,className:"size-4"}),"New Agent"]})]})]}),o.jsxs("div",{className:"mt-density-3 grid gap-density-2 lg:grid-cols-[minmax(14rem,1fr)_auto_auto_auto_auto]",children:[o.jsx(g2,{value:s,onChange:i,placeholder:"Search sessions",shortcut:null}),o.jsx(Tr,{value:e,options:NC,onChange:t,size:"sm","aria-label":"Session source"}),o.jsx(x2,{checked:n,onChange:r,label:"All projects"}),o.jsx(Tr,{value:l,options:Nte,onChange:u,size:"sm","aria-label":"Dashboard view"}),o.jsxs("label",{className:"flex min-w-[8rem] items-center gap-2 text-xs text-muted-foreground",children:["Sort",o.jsx("select",{value:d,onChange:v=>f(v.target.value),className:"h-8 rounded border border-border bg-background px-2 text-xs text-foreground",children:Cte.map(v=>o.jsx("option",{value:v.id,children:v.label},v.id))})]})]})]})}function Ote({summary:e,liveCount:t,loading:n}){const r=[{label:"Live",value:e?`${e.liveSessions}/${e.totalSessions}`:n?"--":"0/0",detail:`${e?.activeSessions??t} active`,icon:P0},{label:"Alerts",value:e?.alertSessions??0,detail:`${e?.stoppedSessions??0} stopped`,icon:hte},{label:"Context",value:e?.lowestContextFree!==void 0?`${e.lowestContextFree}%`:"--",detail:"lowest free",icon:Ix},{label:"Tokens",value:oi(e?.totalTokens??0),detail:`${oi(e?.outputTokens??0)} output`,icon:fr},{label:"Cache",value:oi(e?.cacheReadTokens??0),detail:`${oi(e?.cacheCreationTokens??0)} created`,icon:Fx},{label:"Cost",value:Bx(e?.costUsd??0),detail:"estimated",icon:Eu}];return o.jsx("section",{className:"grid grid-cols-2 gap-density-2 p-density-4 md:grid-cols-3 2xl:grid-cols-6",children:r.map(s=>o.jsx(Mte,{...s},s.label))})}function Mte({label:e,value:t,detail:n,icon:r}){return o.jsxs("div",{className:"min-w-0 rounded border border-border bg-card px-density-3 py-density-2",children:[o.jsxs("div",{className:"flex items-center justify-between gap-density-2",children:[o.jsx("div",{className:"truncate text-[10px] font-medium uppercase text-muted-foreground",children:e}),o.jsx(K,{icon:r,className:"size-4 shrink-0 text-muted-foreground"})]}),o.jsx("div",{className:"mt-1 truncate text-2xl font-semibold leading-tight",children:t}),o.jsx("div",{className:"mt-1 truncate text-xs text-muted-foreground",children:n})]})}function Ate({groups:e,sort:t,sortDirection:n,onSortChange:r,onOpen:s}){return o.jsxs("div",{className:"min-w-0 max-w-[72rem] overflow-hidden rounded border border-border",children:[o.jsx("div",{className:`${N8} border-b border-border bg-muted/40 px-density-3 py-2 text-[11px] font-medium uppercase text-muted-foreground`,children:Ste.map(i=>o.jsx(Lte,{column:i,sort:t,sortDirection:n,onSortChange:r},i.label))}),o.jsx("div",{children:e.map(i=>o.jsxs("section",{className:"border-b border-border last:border-b-0",children:[o.jsx(OC,{group:i}),o.jsx("div",{className:"divide-y divide-border",children:i.sessions.map(l=>o.jsxs("div",{role:l.detailAvailable===!1?void 0:"button",tabIndex:l.detailAvailable===!1?void 0:0,onClick:()=>zx(l,s),onKeyDown:u=>IC(u,l,s),className:`${N8} cursor-pointer items-center gap-density-2 px-density-3 py-density-2 text-sm transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[disabled=true]:cursor-default data-[disabled=true]:hover:bg-transparent`,"data-disabled":l.detailAvailable===!1?"true":void 0,children:[o.jsx(MC,{session:l}),o.jsx(Pte,{session:l}),o.jsx(X0,{title:"CPU",value:l.live.cpuPercent,icon:B2,thresholds:[60,85]}),o.jsx(X0,{title:"Memory",value:l.live.memoryPercent,icon:Ix,thresholds:[70,90]}),o.jsx(AC,{session:l}),o.jsx(Wg,{value:oi(l.tokens?.totalTokens??0)}),o.jsx(Wg,{value:$C(l.endedAt??l.startedAt)}),o.jsx(LC,{session:l,onOpen:s})]},l.key))})]},i.key))})]})}function Lte({column:e,sort:t,sortDirection:n,onSortChange:r}){if(!e.sort)return o.jsx("div",{className:"truncate px-1",children:e.label});const s=t===e.sort;return o.jsxs("button",{type:"button","aria-sort":s?n==="asc"?"ascending":"descending":"none",onClick:()=>r(e.sort),className:"inline-flex min-w-0 items-center gap-1 rounded px-1 py-0.5 text-left uppercase transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[o.jsx("span",{className:"truncate",children:e.label}),s?o.jsx(K,{icon:n==="asc"?Wk:Hk,className:"size-3 shrink-0"}):null]})}function Rte({groups:e,onOpen:t}){return o.jsx("div",{className:"space-y-density-4",children:e.map(n=>o.jsxs("section",{className:"min-w-0",children:[o.jsx(OC,{group:n}),o.jsx("div",{className:"mt-density-2 grid gap-density-3 md:grid-cols-2 2xl:grid-cols-3",children:n.sessions.map(r=>o.jsxs("div",{role:r.detailAvailable===!1?void 0:"button",tabIndex:r.detailAvailable===!1?void 0:0,onClick:()=>zx(r,t),onKeyDown:s=>IC(s,r,t),className:"min-w-0 cursor-pointer rounded border border-border bg-card p-density-3 transition-colors hover:border-muted-foreground/40 hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[disabled=true]:cursor-default data-[disabled=true]:hover:border-border data-[disabled=true]:hover:bg-card","data-disabled":r.detailAvailable===!1?"true":void 0,children:[o.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-density-2",children:[o.jsx(MC,{session:r}),o.jsx(LC,{session:r,onOpen:t,compact:!0})]}),o.jsxs("div",{className:"mt-density-3 grid grid-cols-2 gap-density-2 text-xs",children:[o.jsx(rl,{label:"Status",value:r.live.status??"active"}),o.jsx(rl,{label:"Tokens",value:oi(r.tokens?.totalTokens??0)}),o.jsx(rl,{label:"CPU",value:o.jsx(X0,{title:"CPU",value:r.live.cpuPercent,icon:B2,thresholds:[60,85]})}),o.jsx(rl,{label:"Memory",value:o.jsx(X0,{title:"Memory",value:r.live.memoryPercent,icon:Ix,thresholds:[70,90]})}),o.jsx(rl,{label:"Updated",value:$C(r.endedAt??r.startedAt)}),o.jsx(rl,{label:"Branch",value:r.gitBranch??"--"})]}),o.jsx("div",{className:"mt-density-3",children:o.jsx(AC,{session:r,expanded:!0})}),o.jsx("div",{className:"mt-density-2 truncate text-[11px] text-muted-foreground",children:EC(r.live.command)})]},r.key))})]},n.key))})}function OC({group:e}){return o.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-density-2 bg-muted/20 px-density-3 py-2 text-xs",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"truncate font-semibold",children:e.label}),e.detail?o.jsx("div",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:e.detail}):null]}),o.jsx("div",{className:"shrink-0 rounded border border-border bg-background px-2 py-0.5 text-[11px] text-muted-foreground",children:e.sessions.length})]})}function X0({title:e,value:t,icon:n,thresholds:r}){return o.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-1",children:[o.jsx(ste,{variant:"cell",title:e,icon:n,usage:t,max:100,unit:kte,thresholds:r,showValue:!1,orientation:"vertical",hoverCard:!1,className:"max-w-full"}),o.jsx("span",{className:"text-[11px] tabular-nums text-muted-foreground",children:Zte(t)})]})}function MC({session:e}){const t=qg(e),n=Hte(e.reasoningEffort);return o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx("span",{className:"grid size-6 shrink-0 place-items-center rounded border border-border bg-muted/50 text-muted-foreground",children:o.jsx(K,{icon:Vte(e),className:"size-3.5"})}),o.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:t}),o.jsx("span",{className:"shrink-0 rounded border border-border px-1.5 py-0.5 text-[10px] uppercase text-muted-foreground",children:e.source})]}),o.jsxs("div",{className:"mt-1 flex min-w-0 items-center gap-2 text-[11px] text-muted-foreground",children:[n?o.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1",children:[o.jsx(K,{icon:lx,className:"size-3 shrink-0"}),o.jsx("span",{className:"truncate",children:n})]}):null,o.jsx("span",{className:"truncate",children:Vm(e)})]}),o.jsxs("div",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:[e.live?.pid?`pid ${e.live.pid} - `:"",EC(e.live?.command)]})]})}function Pte({session:e}){const t=e.health?.[0];return o.jsx("div",{className:"min-w-0",children:o.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${t?TC(t.severity):"bg-emerald-500"}`}),o.jsx("span",{className:"truncate text-xs font-medium",children:e.live.status??"active"})]})})}function AC({session:e,expanded:t=!1}){const n=e.context?.freePercent;return n===void 0?o.jsx(Wg,{value:"--"}):o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2 text-xs",children:[o.jsxs("span",{className:Wte(n),children:[n,"% free"]}),t&&e.context?.windowTokens?o.jsx("span",{className:"text-muted-foreground",children:oi(e.context.windowTokens)}):null]}),o.jsx("div",{className:"mt-1 h-1.5 overflow-hidden rounded bg-muted",children:o.jsx("div",{className:`h-full rounded ${qte(n)}`,style:{width:`${Math.max(0,Math.min(100,n))}%`}})})]})}function LC({session:e,onOpen:t,compact:n=!1}){return o.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[o.jsxs(Fe,{size:"sm",variant:"ghost",disabled:e.detailAvailable===!1,onClick:r=>{r.stopPropagation(),t(e)},"aria-label":"Open session history",children:[o.jsx(K,{icon:Fx,className:"size-4"}),n?null:"Open"]}),o.jsx(Fe,{size:"sm",variant:"ghost",onClick:r=>{r.stopPropagation(),Kte(e)},"aria-label":"Copy session reference",children:o.jsx(K,{icon:sd,className:"size-4"})})]})}function Ite({sessions:e,onOpen:t}){return o.jsx(RC,{title:"Health",count:e.length,children:e.length===0?o.jsx(PC,{children:"Clear"}):o.jsx("div",{className:"divide-y divide-border",children:e.slice(0,6).map(n=>{const r=n.health?.[0];return o.jsxs("button",{type:"button",disabled:n.detailAvailable===!1,onClick:()=>t(n),className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-density-2 py-density-2 text-left disabled:cursor-default",children:[o.jsx("span",{className:`mt-1 h-2 w-2 rounded-full ${TC(r?.severity??"info")}`}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:"block truncate text-xs font-medium",children:r?.kind.replace(/_/g," ")??"health"}),o.jsx("span",{className:"block truncate text-[11px] text-muted-foreground",children:Vm(n)}),o.jsx("span",{className:"block truncate text-[11px] text-muted-foreground",children:r?.message??Dx(n.endedAt??n.startedAt)})]})]},n.key)})})})}function $te({sessions:e,onOpen:t}){return o.jsx(RC,{title:"Recent History",count:e.length,children:e.length===0?o.jsx(PC,{children:"None"}):o.jsx("div",{className:"divide-y divide-border",children:e.map(n=>o.jsxs("button",{type:"button",onClick:()=>t(n),className:"block w-full min-w-0 py-density-2 text-left",children:[o.jsx("span",{className:"block truncate text-xs font-medium",children:Vm(n)}),o.jsx("span",{className:"block truncate text-[11px] text-muted-foreground",children:Dx(n.endedAt??n.startedAt)}),o.jsx("span",{className:"block truncate text-[11px] text-muted-foreground",children:SC(n.cwd)})]},n.key))})})}function RC({title:e,count:t,children:n}){return o.jsxs("section",{className:"min-w-0 rounded border border-border bg-card px-density-3 py-density-2",children:[o.jsxs("div",{className:"flex items-center justify-between gap-density-2",children:[o.jsx("div",{className:"truncate text-xs font-semibold uppercase text-muted-foreground",children:e}),o.jsx("div",{className:"shrink-0 text-xs text-muted-foreground",children:t})]}),o.jsx("div",{className:"mt-1 min-h-[2.5rem]",children:n})]})}function Fte({onNewAgent:e}){return o.jsxs("div",{className:"flex min-h-[16rem] flex-col items-center justify-center rounded border border-dashed border-border p-density-6 text-center",children:[o.jsx("div",{className:"text-sm font-medium",children:"No running sessions."}),o.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:"Start an agent or switch scope."}),o.jsxs(Fe,{className:"mt-density-3",size:"sm",onClick:e,children:[o.jsx(K,{icon:ms,className:"size-4"}),"New Agent"]})]})}function PC({children:e}){return o.jsx("div",{className:"py-density-2 text-xs text-muted-foreground",children:e})}function rl({label:e,value:t}){const n=typeof t=="string"||typeof t=="number";return o.jsxs("div",{className:"min-w-0 rounded border border-border px-2 py-1.5",children:[o.jsx("div",{className:"truncate text-[10px] uppercase text-muted-foreground",children:e}),o.jsx("div",{className:n?"truncate text-xs font-medium":"mt-1 min-w-0",children:t})]})}function Wg({value:e}){return o.jsx("div",{className:"truncate text-xs text-muted-foreground",children:e})}function Dte(e){return!!e.live}function Bte(e,t,n,r){return n==="model"?Wi(qg(e).localeCompare(qg(t))||gn(t)-gn(e),r,"asc"):n==="context"?Wi((e.context?.freePercent??101)-(t.context?.freePercent??101)||gn(t)-gn(e),r,"asc"):Wi(n==="cpu"?(t.live.cpuPercent??-1)-(e.live.cpuPercent??-1)||gn(t)-gn(e):n==="memory"?(t.live.memoryPercent??-1)-(e.live.memoryPercent??-1)||gn(t)-gn(e):n==="tokens"?C8(t)-C8(e)||gn(t)-gn(e):n==="recent"?gn(t)-gn(e):Y0(t)-Y0(e)||(e.context?.freePercent??101)-(t.context?.freePercent??101)||(t.live.cpuPercent??-1)-(e.live.cpuPercent??-1)||gn(t)-gn(e),r,"desc")}function Wi(e,t,n){return t===n?e:-e}function Ute(e){return e==="model"||e==="context"?"asc":"desc"}function C8(e){return e.tokens?.totalTokens??0}function zte(e){const t=new Map;for(const n of e){const r=n.live.cwd??n.cwd,s=r||"unknown",i=SC(r),l=t.get(s);if(l){l.sessions.push(n);continue}t.set(s,{key:s,label:i,detail:r&&r!==i?r:void 0,sessions:[n]})}return[...t.values()]}function zx(e,t){e.detailAvailable!==!1&&t(e)}function IC(e,t,n){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),zx(t,n))}function qg(e){return e.model||e.provider||e.source}function Vte(e){const t=`${e.provider??""} ${e.model??""} ${e.source}`.toLowerCase();return t.includes("claude")||t.includes("anthropic")?jm:t.includes("codex")||t.includes("openai")||t.includes("gpt")?ms:fr}function Hte(e){return e?e.replace(/_/g," "):void 0}function Zte(e){return e===void 0?"--":`${e.toFixed(1)}%`}function $C(e){if(!e)return"--";const t=new Date(e).getTime();if(Number.isNaN(t))return e;const n=Date.now()-t;return n<6e4?"now":n<36e5?`${Math.round(n/6e4)}m ago`:n<864e5?`${Math.round(n/36e5)}h ago`:`${Math.round(n/864e5)}d ago`}function Wte(e){return e<=10?"font-medium text-destructive":e<=25?"font-medium text-amber-700":"font-medium text-emerald-700"}function qte(e){return e<=10?"bg-destructive":e<=25?"bg-amber-500":"bg-emerald-500"}function Kte(e){if(!navigator.clipboard)return;const t=e.live?.pid?`${e.source}:${e.live.pid}`:e.key;navigator.clipboard.writeText(t).catch(()=>{})}function Gte(e,t){const{enabled:n=!0,events:r=[],onEvent:s,onStatus:i}=t,l=w.useRef(s),u=w.useRef(i);l.current=s,u.current=i;const d=r.join(",");w.useEffect(()=>{if(!e||!n)return;const f=y=>u.current?.(y);f("connecting");const p=new EventSource(e);let h=!1;p.onopen=()=>f("open"),p.onmessage=y=>l.current("message",y.data),p.onerror=()=>{h||f("reconnecting")};const v=(d?d.split(","):[]).map(y=>{const b=j=>l.current(y,j.data);return p.addEventListener(y,b),{name:y,handler:b}});return()=>{h=!0;for(const{name:y,handler:b}of v)p.removeEventListener(y,b);p.close(),f("closed")}},[e,n,d])}const Jte="/api/captain/prompt/runs";function Qte(e,t=Jte){const[n,r]=w.useState([]),[s,i]=w.useState(),[l,u]=w.useState("idle"),[d,f]=w.useState(),[p,h]=w.useState(!1),x=w.useRef(new Map),v=w.useRef([]),y=w.useRef(0);w.useEffect(()=>{x.current=new Map,v.current=[],y.current=0,r([]),i(void 0),f(void 0),h(!1),u(e?"connecting":"idle")},[e]);const b=w.useCallback((S,N)=>{if(S==="done"){const E=D1(N);E&&i(E),E?.error?(f(E.error),u("error")):u("done"),h(!0);return}if(S==="error"){f(D1(N)?.error??"run failed"),u("error"),h(!0);return}const k=D1(N);if(!k)return;const T=k.id??`auto-${y.current++}`;x.current.has(T)||v.current.push(T),x.current.set(T,k),r(v.current.map(E=>x.current.get(E))),u(E=>E==="done"||E==="error"?E:"streaming")},[]),j=e?`${t}/${encodeURIComponent(e)}/stream`:void 0;return Gte(j,{enabled:!!j&&!p,events:["entry","done","error"],onEvent:b}),{messages:n,summary:s,status:l,error:d}}function D1(e){try{return JSON.parse(e)}catch{return}}function Yte({runID:e}){const{messages:t,summary:n,status:r,error:s}=Qte(e),i=t.length===0;return o.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-density-3",children:[o.jsx("div",{className:"flex items-center gap-density-2 text-xs text-muted-foreground",children:o.jsx(tne,{status:r})}),s&&o.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-density-3 text-sm text-destructive",children:s}),o.jsx("div",{className:"min-h-0 flex-1 overflow-auto rounded-md border border-border",children:i?o.jsx("div",{className:"flex min-h-[240px] items-center justify-center p-density-6 text-sm text-muted-foreground",children:r==="done"?"No session activity.":"Starting run…"}):o.jsx("div",{className:"p-density-4",children:o.jsx(vC,{session:t,defaultExpanded:!1})})}),n&&o.jsx(nne,{summary:n})]})}const Xte={idle:"idle",connecting:"connecting…",streaming:"streaming…",done:"done",error:"error"},ene={idle:"bg-muted-foreground",connecting:"bg-blue-500 animate-pulse",streaming:"bg-blue-500 animate-pulse",done:"bg-green-500",error:"bg-destructive"};function tne({status:e}){return o.jsxs("span",{className:"inline-flex items-center gap-density-1",children:[o.jsx("span",{className:`size-2 rounded-full ${ene[e]}`}),Xte[e]]})}function nne({summary:e}){const t=[];return e.model&&t.push(e.model),e.backend&&t.push(e.backend),e.duration&&t.push(e.duration),e.inputTokens!=null&&t.push(`${e.inputTokens} in`),e.outputTokens!=null&&t.push(`${e.outputTokens} out`),e.costUSD!=null&&t.push(`$${e.costUSD.toFixed(4)}`),e.sessionId&&t.push(`session ${e.sessionId}`),o.jsx("div",{className:"flex flex-wrap gap-density-2 border-t border-border pt-density-2 text-xs text-muted-foreground",children:t.map((n,r)=>o.jsx("span",{className:"truncate",children:n},r))})}const FC="/api/captain";function rne({onSelectRun:e}){const{runs:t}=U8({kind:"prompt",status:"running",basePath:FC}),[n,r]=w.useState(!1);return t.length===0?null:o.jsxs("div",{className:"relative",children:[o.jsxs("button",{type:"button",onClick:()=>r(s=>!s),className:"flex items-center gap-density-1 rounded-full border border-border px-density-2 py-density-1 text-xs text-muted-foreground hover:bg-muted",children:[o.jsx("span",{className:"size-2 rounded-full bg-blue-500 animate-pulse"}),t.length," running"]}),n&&o.jsx("div",{className:"absolute right-0 z-20 mt-density-1 w-72 rounded-md border border-border bg-background p-density-1 shadow-md",children:t.map(s=>o.jsxs("button",{type:"button",onClick:()=>{e(s.id),r(!1)},className:"flex w-full items-center justify-between gap-density-2 rounded px-density-2 py-density-1 text-left text-xs hover:bg-muted",children:[o.jsx("span",{className:"truncate",children:s.name}),o.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.status})]},s.id))})]})}function sne({activeRunID:e,onSelectRun:t}){return o.jsx("div",{className:"h-full overflow-auto",children:o.jsx(fte,{basePath:FC,kind:"prompt",selectedId:e,onSelectRun:n=>t(n??void 0)})})}const DC={Badge:rne,RunsTab:sne},Hm="captain:sidebar:collapsed";function Kg(e){return[{items:[{key:"dashboard",label:"Dashboard",to:"/",icon:P0,active:e==="dashboard"},{key:"agent",label:"Agent",to:"/agent",icon:ms,active:e==="agent"},{key:"sessions",label:"Sessions",to:"/sessions",icon:Fx,active:e==="sessions"},{key:"prompts",label:"Prompts",to:"/prompts",icon:Zl,active:e==="prompts"},{key:"operations",label:"Operations",to:"/operations",icon:nj,active:e==="operations"}]}]}function Gg(){return o.jsxs(o.Fragment,{children:[o.jsx(E2,{}),o.jsx(v3,{})]})}const one=[{id:"all",label:"All"},{id:"embedded",label:"Embedded"},{id:"local",label:"Local"}],S8={budget:{timeout:"2h"}},ine=[{name:"Read",label:"Read",group:"Files",description:"Read files from the workspace.",defaultPermission:"ask"},{name:"Edit",label:"Edit",group:"Files",description:"Apply targeted file edits.",defaultPermission:"ask"},{name:"MultiEdit",label:"MultiEdit",group:"Files",description:"Apply multiple edits to one file.",defaultPermission:"ask"},{name:"Write",label:"Write",group:"Files",description:"Create or overwrite files.",defaultPermission:"ask"},{name:"Glob",label:"Glob",group:"Search",description:"Find files by glob pattern.",defaultPermission:"ask"},{name:"Grep",label:"Grep",group:"Search",description:"Search file contents.",defaultPermission:"ask"},{name:"LS",label:"List",group:"Search",description:"List directory contents.",defaultPermission:"ask"},{name:"Bash",label:"Bash",group:"Shell",description:"Run shell commands.",defaultPermission:"ask"},{name:"Task",label:"Task",group:"Agent",description:"Launch a delegated agent task.",defaultPermission:"ask"},{name:"TodoWrite",label:"Todos",group:"Agent",description:"Track an agent todo list.",defaultPermission:"ask"},{name:"WebFetch",label:"Web Fetch",group:"Web",description:"Fetch content from a URL.",defaultPermission:"ask"},{name:"WebSearch",label:"Web Search",group:"Web",description:"Search the web.",defaultPermission:"ask"}];function ane({selectedId:e,onNavigate:t,navSections:n,actions:r}){const{operations:s,isLoading:i,error:l}=_i(ps),u=w.useMemo(()=>hne(s),[s]),[d,f]=w.useState("all"),[p,h]=w.useState(""),[x,v]=w.useState("runner"),[y,b]=w.useState(""),[j,S]=w.useState({}),[N,k]=w.useState(!0),[T,E]=w.useState(S8),[O,M]=w.useState(),[L,F]=w.useState(),[U,z]=w.useState(),[V,X]=w.useState(),[H,B]=w.useState(!1),W=vn({queryKey:["prompts",u.list?.path,u.list?.method,d,p],queryFn:()=>gne(T8(u.list,"list"),{source:d,query:p}),enabled:!!u.list}),se=vn({queryKey:["chat-models"],queryFn:xne}),P=vn({queryKey:["permission-catalog"],queryFn:()=>vne()}),J=W.data??[],ne=se.data??[];w.useEffect(()=>{e||J.length===0||t(`/prompts/${encodeURIComponent(J[0].id)}`,{replace:!0})},[t,J,e]);const $=w.useMemo(()=>J.find(xe=>xe.id===e),[J,e]),Q=vn({queryKey:["prompt",u.get?.path,u.get?.method,e],queryFn:()=>jne(T8(u.get,"get"),String(e)),enabled:!!(u.get&&e)}),ae=Q.data??$,ie=Q.data,de=w.useMemo(()=>Sne(J),[J]),ge=!!(ie&&u.update&&(!ie.writable||y!==ie.content)),ve=!!e,Le=!!(u.list&&u.get&&u.render&&u.run);w.useEffect(()=>{if(!ie)return;b(ie.content);const xe=ie.inputDefault??{};S(xe),k(!0),E({...S8,...Tne(ie)}),M(void 0),F(void 0),z(void 0)},[ie?.id]);async function je(){await W.refetch(),e&&await Q.refetch()}async function Ue(){if(!(!ie||!u.update)){z(void 0),X("save");try{const xe=await s0(u.update,{id:ie.id},{content:y});await W.refetch(),xe.id===ie.id?(b(xe.content),await Q.refetch()):t(`/prompts/${encodeURIComponent(xe.id)}`)}catch(xe){z(ii(xe))}finally{X(void 0)}}}async function we(){if(!(!ie||!u.render)){z(void 0),X("render");try{const xe=await s0(u.render,{id:ie.id},{variables:j,...M8(T,ne)});M(xe),F(void 0)}catch(xe){z(ii(xe))}finally{X(void 0)}}}async function ke(){if(!(!ie||!u.run)){z(void 0),X("run");try{const xe=await s0(u.run,{id:ie.id},{variables:j,...M8(T,ne)});M(void 0),F(xe.runId),v("runner")}catch(xe){z(ii(xe))}finally{X(void 0)}}}async function Ne(){if(!(!ie||!u.delete)){z(void 0),X("delete");try{await kne(u.delete,{id:ie.id},{}),t("/prompts",{replace:!0}),await W.refetch()}catch(xe){z(ii(xe))}finally{X(void 0)}}}return o.jsxs(td,{className:"h-screen",brand:o.jsx("div",{className:"text-sm font-semibold",children:"Captain"}),navSections:n,collapsedStorageKey:Hm,actions:r,bodySidebar:o.jsx(lne,{source:d,onSourceChange:f,query:p,onQueryChange:h,prompts:J,selectedId:e,loading:W.isLoading||i,error:W.error??l,onSelect:xe=>t(`/prompts/${encodeURIComponent(xe.id)}`),onRefresh:()=>{je()},onCreate:()=>B(!0)}),bodyHeader:o.jsx(cne,{prompt:ae,loading:Q.isLoading,ready:Le}),bodyActions:o.jsxs("div",{className:"flex items-center gap-density-2",children:[o.jsx(DC.Badge,{onSelectRun:xe=>{F(xe),v("runner")}}),ie?.writable&&u.delete&&o.jsxs(Fe,{size:"sm",variant:"ghost",loading:V==="delete",onClick:()=>{Ne()},children:[o.jsx(K,{icon:Vl,className:"size-4"}),"Delete"]}),ie&&u.update&&o.jsxs(Fe,{size:"sm",variant:"outline",disabled:!ge,loading:V==="save",onClick:()=>{Ue()},children:[o.jsx(K,{icon:gte,className:"size-4"}),ie.writable?"Save":"Save to Local"]}),o.jsxs(Fe,{size:"sm",variant:"outline",onClick:()=>{je()},children:[o.jsx(K,{icon:Tm,className:"size-4"}),"Refresh"]})]}),bodySplit:30,contentClassName:"p-0 overflow-hidden",children:[o.jsx(une,{detail:ie,hasSelection:ve,loading:Q.isLoading,error:Q.error??U,tab:x,onTabChange:xe=>v(xe),draft:y,onDraftChange:b,variables:j,variablesValid:N,onVariablesChange:S,onVariablesValidityChange:k,runtime:T,onRuntimeChange:E,models:ne,tools:ine,permissionCatalog:P.data,renderResult:O,activeRunID:L,onSelectRun:xe=>{F(xe),xe&&v("runner")},onRender:()=>{we()},onRun:()=>{ke()},renderLoading:V==="render",runLoading:V==="run",renderEnabled:!!(u.render&&ie),runEnabled:!!(u.run&&ie)}),o.jsx(pne,{open:H,onClose:()=>B(!1),sources:de,createOp:u.create,seedContent:ie?.content,onCreated:xe=>{B(!1),W.refetch(),t(`/prompts/${encodeURIComponent(xe.id)}`)}})]})}function lne({source:e,onSourceChange:t,query:n,onQueryChange:r,prompts:s,selectedId:i,loading:l,error:u,onSelect:d,onRefresh:f,onCreate:p}){return o.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-background",children:[o.jsxs("div",{className:"shrink-0 space-y-density-2 border-b border-border p-density-3",children:[o.jsxs("div",{className:"flex items-center justify-between gap-density-2",children:[o.jsx("div",{className:"text-sm font-semibold",children:"Prompts"}),o.jsxs("div",{className:"flex items-center gap-density-1",children:[o.jsx(Fe,{size:"sm",variant:"ghost",onClick:f,title:"Refresh prompts",children:o.jsx(K,{icon:Tm,className:"size-4"})}),o.jsx(Fe,{size:"sm",variant:"ghost",onClick:p,title:"Create prompt",children:o.jsx(K,{icon:pr,className:"size-4"})})]})]}),o.jsx(g2,{value:n,onChange:r,placeholder:"Search prompts",shortcut:null}),o.jsx(Tr,{value:e,options:one,onChange:t,size:"sm","aria-label":"Prompt source",className:"w-full"}),o.jsx("div",{className:"text-xs text-muted-foreground",children:l?"Loading...":`${s.length} prompts`})]}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:u?o.jsx("div",{className:"p-density-3 text-sm text-destructive",children:ii(u)}):s.length===0&&!l?o.jsx("div",{className:"p-density-3 text-sm text-muted-foreground",children:"No prompts found."}):o.jsx("div",{className:"divide-y divide-border",children:s.map(h=>{const x=h.id===i;return o.jsxs("button",{type:"button",onClick:()=>d(h),className:["block w-full px-density-3 py-density-2 text-left transition-colors",x?"bg-accent text-accent-foreground":"hover:bg-muted/60"].join(" "),children:[o.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-density-2",children:[o.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:h.name}),o.jsx("span",{className:"shrink-0 rounded border border-border px-1.5 py-0.5 text-[11px] uppercase text-muted-foreground",children:h.sourceKind})]}),o.jsxs("div",{className:"mt-1 truncate text-xs text-muted-foreground",children:[h.model||h.backend||"no model",h.variables?.length?` - ${h.variables.length} vars`:""]}),o.jsx("div",{className:"mt-1 truncate text-xs text-muted-foreground",children:h.relPath}),h.description&&o.jsx("div",{className:"mt-1 line-clamp-2 text-xs text-muted-foreground",children:h.description}),h.parseError&&o.jsx("div",{className:"mt-1 truncate text-xs text-destructive",children:h.parseError})]},h.id)})})})]})}function cne({prompt:e,loading:t,ready:n}){return n?t&&!e?o.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading prompt..."}):e?o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-density-2",children:[o.jsx("div",{className:"truncate text-sm font-semibold",children:e.name}),o.jsx("span",{className:"rounded border border-border px-1.5 py-0.5 text-[11px] uppercase text-muted-foreground",children:e.sourceKind}),e.writable&&o.jsx("span",{className:"rounded border border-border px-1.5 py-0.5 text-[11px] uppercase text-muted-foreground",children:"editable"})]}),o.jsxs("div",{className:"mt-1 flex min-w-0 flex-wrap gap-x-density-3 gap-y-1 text-xs text-muted-foreground",children:[e.model&&o.jsx("span",{children:e.model}),e.backend&&o.jsx("span",{children:e.backend}),o.jsx("span",{className:"max-w-full truncate",children:e.path})]})]}):o.jsxs("div",{children:[o.jsx("div",{className:"text-sm font-semibold",children:"Prompt Workbench"}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Select or create a prompt."})]}):o.jsxs("div",{children:[o.jsx("div",{className:"text-sm font-semibold",children:"Prompt Workbench"}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading prompt operations..."})]})}function une({detail:e,hasSelection:t,loading:n,error:r,tab:s,onTabChange:i,draft:l,onDraftChange:u,variables:d,variablesValid:f,onVariablesChange:p,onVariablesValidityChange:h,runtime:x,onRuntimeChange:v,models:y,tools:b,permissionCatalog:j,renderResult:S,activeRunID:N,onSelectRun:k,onRender:T,onRun:E,renderLoading:O,runLoading:M,renderEnabled:L,runEnabled:F}){const U=vn({queryKey:["prompt-schema"],queryFn:bne});if(!t)return o.jsx("div",{className:"flex h-full items-center justify-center p-6 text-sm text-muted-foreground",children:"Select a prompt."});if(n&&!e)return o.jsx("div",{className:"flex h-full items-center justify-center p-6 text-sm text-muted-foreground",children:"Loading prompt..."});if(!e)return o.jsx("div",{className:"h-full overflow-auto p-density-4 text-sm text-destructive",children:r?ii(r):"Prompt not found."});const z=O8(e.inputSchema),V=U.data?.backends?.find(X=>X.backend===x.backend)?.args;return o.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[o.jsx("div",{className:"shrink-0 border-b border-border px-density-4 pt-density-3",children:o.jsx(F3,{value:s,onChange:i,tabs:[{id:"runner",label:"Run",icon:ju},{id:"schema",label:"Schema",icon:jC},{id:"source",label:"Source",icon:Ol},{id:"runs",label:"Runs",icon:fr}]})}),o.jsxs("div",{className:"min-h-0 flex-1 overflow-auto p-density-4",children:[!!r&&o.jsx("div",{className:"mb-density-3 text-sm text-destructive",children:ii(r)}),s==="source"?o.jsx(dne,{detail:e,draft:l,onDraftChange:u}):s==="runs"?o.jsx(DC.RunsTab,{activeRunID:N,onSelectRun:k}):s==="schema"?o.jsx(mne,{inputSchema:z,outputSchema:O8(e.outputSchema)}):o.jsxs("div",{className:"grid min-h-full gap-density-4 xl:grid-cols-[minmax(340px,0.9fr)_minmax(0,1.1fr)]",children:[o.jsxs("div",{className:"space-y-density-4",children:[o.jsx(VX,{value:x,onChange:v,models:Mne(y),tools:b,secretSelector:yne,variables:d,onVariablesChange:p,onVariablesValidityChange:h,...j?{permissionCatalog:j}:{},...z?{variablesSchema:z}:{},...V?{cliOptions:{schema:V}}:{}},e.id),o.jsxs("div",{className:"flex flex-wrap gap-density-2",children:[o.jsxs(Fe,{size:"sm",variant:"outline",loading:O,disabled:!L||!z&&!f,onClick:T,children:[o.jsx(K,{icon:Ol,className:"size-4"}),"Render"]}),o.jsxs(Fe,{size:"sm",loading:M,disabled:!F||!z&&!f,onClick:E,children:[o.jsx(K,{icon:ju,className:"size-4"}),"Run"]})]})]}),o.jsx(fne,{renderResult:S,activeRunID:N})]})]})]})}function dne({detail:e,draft:t,onDraftChange:n}){return o.jsxs("div",{className:"space-y-density-2",children:[!e.writable&&o.jsx("div",{className:"rounded-md border border-border bg-muted/40 px-density-3 py-density-2 text-xs text-muted-foreground",children:"This is an embedded prompt. Saving your edits creates a local, editable copy."}),o.jsx(BC,{label:"Prompt Source",value:t,onChange:n,minHeight:"calc(100vh - 18rem)"})]})}function BC({label:e,value:t,onChange:n,readOnly:r=!1,minHeight:s}){return o.jsxs("div",{className:"overflow-hidden rounded-md border border-border bg-card",children:[o.jsx("div",{className:"border-b border-border px-density-3 py-density-2 text-sm font-medium text-card-foreground",children:e}),o.jsx("div",{className:"p-density-3",style:{minHeight:s},children:o.jsx(gx,{value:t,onChange:n,readOnly:r,size:"xl",codeBlocks:{defaultLanguage:"markdown"},codeMirror:{languages:{bash:"Bash",handlebars:"Handlebars",markdown:"Markdown",text:"Text",yaml:"YAML"}},diffMode:{viewMode:"source"},markdownShortcuts:!1,contentClassName:"font-mono text-xs leading-relaxed",textareaClassName:"font-mono text-xs leading-relaxed",className:"min-w-0 rounded-md border border-border bg-background",placeholder:"Prompt markdown"})})]})}function B1({label:e,children:t}){return o.jsxs("div",{className:"block space-y-1 text-xs text-muted-foreground",children:[o.jsx("span",{children:e}),t]})}function fne({renderResult:e,activeRunID:t}){return t?o.jsx(Yte,{runID:t}):e?o.jsxs("div",{className:"space-y-density-3",children:[e.validationError&&o.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-density-3 text-sm text-destructive",children:e.validationError}),o.jsx(fs,{language:"markdown",source:e.user||""}),o.jsx(fs,{language:"json",source:JSON.stringify(e.input??e,null,2)})]}):o.jsx("div",{className:"flex min-h-[280px] items-center justify-center rounded-md border border-dashed border-border p-density-6 text-sm text-muted-foreground",children:"Render or run the selected prompt."})}function mne({inputSchema:e,outputSchema:t}){return o.jsxs("div",{className:"grid min-h-full gap-density-4 xl:grid-cols-2",children:[o.jsx(E8,{title:"Input schema",icon:o.jsx(K,{icon:oj,className:"size-4 text-muted-foreground"}),schema:e,emptyLabel:"This prompt declares no input schema."}),o.jsx(E8,{title:"Output schema",icon:o.jsx(K,{icon:jC,className:"size-4 text-muted-foreground"}),schema:t,emptyLabel:"This prompt declares no output schema."})]})}function E8({title:e,icon:t,schema:n,emptyLabel:r}){return o.jsxs("section",{className:"space-y-density-2",children:[o.jsxs("div",{className:"flex items-center gap-density-2 text-sm font-semibold",children:[t,e]}),n?o.jsx("div",{className:"rounded-md border border-border p-density-3",children:o.jsx(Dg,{schema:n,showControls:!0,defaultOpenDepth:1})}):o.jsx("div",{className:"flex min-h-[120px] items-center justify-center rounded-md border border-dashed border-border p-density-4 text-sm text-muted-foreground",children:r})]})}function pne({open:e,onClose:t,sources:n,createOp:r,seedContent:s,onCreated:i}){const[l,u]=w.useState(""),[d,f]=w.useState(""),[p,h]=w.useState(""),[x,v]=w.useState(U1("")),[y,b]=w.useState(!1),[j,S]=w.useState();w.useEffect(()=>{e&&(u(""),f(""),h(n[0]?.id??""),v(s||U1("")),S(void 0))},[e,s,n]);async function N(){if(r){b(!0),S(void 0);try{const k=await s0(r,{},{target:p,name:l,relPath:d,content:x});i(k)}catch(k){S(ii(k))}finally{b(!1)}}}return o.jsx(yi,{open:e,onClose:t,title:"New Prompt",size:"xl",footer:o.jsxs("div",{className:"flex justify-end gap-density-2",children:[o.jsx(Fe,{size:"sm",variant:"ghost",onClick:t,children:"Cancel"}),o.jsxs(Fe,{size:"sm",loading:y,disabled:!r,onClick:()=>{N()},children:[o.jsx(K,{icon:pr,className:"size-4"}),"Create"]})]}),children:o.jsxs("div",{className:"space-y-density-3",children:[j&&o.jsx("div",{className:"text-sm text-destructive",children:j}),o.jsxs("div",{className:"grid gap-density-3 md:grid-cols-3",children:[o.jsx(B1,{label:"Name",children:o.jsx("input",{value:l,onChange:k=>{const T=k.target.value;u(T),d||v(U1(T))},className:"h-control-h w-full rounded-md border border-border bg-background px-density-3 text-sm outline-none focus:ring-2 focus:ring-ring"})}),o.jsx(B1,{label:"Path",children:o.jsx("input",{value:d,onChange:k=>f(k.target.value),className:"h-control-h w-full rounded-md border border-border bg-background px-density-3 text-sm outline-none focus:ring-2 focus:ring-ring",placeholder:"name.prompt"})}),o.jsx(B1,{label:"Target",children:o.jsx("select",{value:p,onChange:k=>h(k.target.value),className:"h-control-h w-full rounded-md border border-border bg-background px-density-3 text-sm outline-none focus:ring-2 focus:ring-ring",children:n.length===0?o.jsx("option",{value:"",children:"Default writable source"}):n.map(k=>o.jsx("option",{value:k.id,children:k.label},k.id))})})]}),o.jsx(BC,{label:"Prompt Source",value:x,onChange:v,minHeight:420})]})})}function hne(e){return{list:qi(e,"list"),get:qi(e,"get"),create:qi(e,"create"),update:qi(e,"update"),delete:qi(e,"delete"),render:qi(e,"action","render"),run:qi(e,"action","run")}}function qi(e,t,n){return e.find(r=>{const s=r.operation["x-clicky"];if(!s||s.verb!==t||n&&s.actionName!==n)return!1;const i=(s.surface||"").toLowerCase(),l=(s.command||"").toLowerCase(),u=r.path.toLowerCase();return i==="prompt"||i==="prompts"||l==="prompt"||l.startsWith("prompt ")||u.includes("/prompt")})}function T8(e,t){if(!e)throw new Error(`Prompt ${t} operation is not available.`);return e}async function gne(e,t){const n=await ps.executeCommand(e.path,e.method,{source:t.source,query:t.query},{Accept:"application/json"});return Zm(n)}async function xne(){const e=await fetch("/api/chat/models",{headers:{Accept:"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t||`Model catalog failed with ${e.status}`)}return await e.json()}async function vne(){const e=await fetch("/api/captain/ai/permissions/catalog",{headers:{Accept:"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t||`Permission catalog failed with ${e.status}`)}return await e.json()}async function bne(){const e=await fetch("/api/captain/ai/prompt/schema",{headers:{Accept:"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t||`Prompt schema failed with ${e.status}`)}return await e.json()}const yne={loadResources:wne,loadKeyPreview:_ne};async function wne(e){const t=await fetch(`/api/captain/secrets/resources?kind=${encodeURIComponent(e)}`,{headers:{Accept:"application/json"}});return t.ok?await t.json():[]}async function _ne(e,t){const n=await fetch(`/api/captain/secrets/preview?kind=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,{headers:{Accept:"application/json"}});return n.ok?await n.json():[]}async function jne(e,t){const n=await ps.executeCommand(e.path,e.method,{id:t},{Accept:"application/json"});return Zm(n)}async function s0(e,t,n){const r=await ps.submitForm(Nne(e.path,t),e.method,n,{Accept:"application/json"});return Zm(r)}async function kne(e,t,n){const r=await ps.executeCommand(e.path,e.method,Cne(e.path,t,n),{Accept:"application/json"});return Zm(r)}function Zm(e){if(!e.success)throw new Error(e.error||e.output||"Operation failed.");return e.parsed}function Nne(e,t){let n=e;for(const[r,s]of Object.entries(t))n=n.replace(`{${r}}`,encodeURIComponent(s));return n}function Cne(e,t,n){const r={...n};for(const s of e.matchAll(/\{([^{}]+)\}/g)){const i=s[1];i&&t[i]&&(r[i]=t[i])}return r}function Sne(e){const t=new Set,n=[];for(const r of e)!r.writable||t.has(r.sourceId)||(t.add(r.sourceId),n.push({id:r.sourceId,label:r.source}));return n}function O8(e){if(!e||typeof e!="object")return;const t=e.properties;if(!(!t||typeof t!="object"||Array.isArray(t)))return{...e,type:"object",properties:t}}function M8(e,t){return Ene(kJ(e),t)}function Ene(e,t){const n=e.spec;if(!n||typeof n!="object"||Array.isArray(n))return e;const r={...n};if(typeof r.model=="string"){const s=Ane(r.model,t);s.model&&s.model!==r.model&&((typeof r.id!="string"||!r.id.trim())&&(r.id=r.model),r.model=s.model),s.backend&&(typeof r.backend!="string"||!r.backend.trim())&&(r.backend=s.backend)}return{...e,spec:r}}function Tne(e){const t=e.backend?.trim()||One(e.model||"");return t?{backend:t}:{}}function One(e){const t=e.trim().toLowerCase();return t?t.startsWith("anthropic/")?"anthropic":t.startsWith("openai/")?"openai":t.startsWith("googleai/")?"gemini":t.startsWith("deepseek/")||t.startsWith("deepseek-")?"deepseek":t.startsWith("claude-agent-")?"claude-agent":t.startsWith("claude-code-")?"claude-cli":t.startsWith("codex")?"codex-cli":t.startsWith("gemini-cli-")?"gemini-cli":t.startsWith("claude-")?"anthropic":t.startsWith("gemini-")||t.startsWith("models/gemini-")?"gemini":t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.startsWith("o4")?"openai":"":""}function Mne(e){return e.map(t=>t.configured===!1?{...t,configured:!0}:t)}function Ane(e,t){const n=e.trim();if(!n)return{model:"",backend:""};const r=t.find(i=>i.id===n);if(!r)return{model:n,backend:""};const s=Lne(r.provider);return r.provider==="anthropic"||r.provider==="openai"||r.provider==="googleai"||r.provider==="deepseek"?{model:Rne(n),backend:s}:r.provider==="codex-cli"&&n.startsWith("codex-")?{model:n.slice(6),backend:s}:{model:n,backend:s}}function Lne(e){switch(e){case"googleai":return"gemini";case"anthropic":case"openai":case"deepseek":case"claude-agent":case"claude-cli":case"codex-cli":case"gemini-cli":return e;default:return""}}function Rne(e){const t=e.indexOf("/");return t>=0?e.slice(t+1):e}function U1(e){const t=e.trim()||"new prompt";return`--- +name: ${JSON.stringify(t)} +description: "" +input: + schema: + input: string +--- +{{role "user"}} +{{input}} +`}function ii(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unexpected error."}function UC({metrics:e,align:t="left"}){if(!e||e.length===0)return null;const n=e.find(l=>l.name==="total"),r=e.filter(l=>l.name!=="total"&&l.dur>0);if(!n&&r.length===0)return null;const s=n?.dur??r.reduce((l,u)=>l+u.dur,0),i=Math.max(...r.map(l=>l.dur),1);return o.jsxs("div",{className:"group relative inline-flex",children:[o.jsxs("span",{className:"inline-flex cursor-default items-center gap-1 rounded border border-border px-1.5 py-0.5 text-[10px] tabular-nums text-muted-foreground",title:"Server timing — hover for the breakdown",children:[o.jsx(Pne,{}),F1(s)]}),o.jsxs("div",{className:["invisible absolute top-full z-50 mt-1 w-56 rounded-md border border-border bg-popover p-2.5 text-popover-foreground opacity-0 shadow-lg transition-opacity group-hover:visible group-hover:opacity-100",t==="right"?"right-0":"left-0"].join(" "),children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between text-xs font-medium",children:[o.jsx("span",{children:"Server timing"}),o.jsx("span",{className:"tabular-nums text-muted-foreground",children:F1(s)})]}),r.length===0?o.jsx("div",{className:"text-[11px] text-muted-foreground",children:"No phase breakdown."}):o.jsx("ul",{className:"space-y-1.5",children:r.map(l=>o.jsxs("li",{children:[o.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[o.jsx("span",{className:"text-muted-foreground",children:vte(l)}),o.jsx("span",{className:"tabular-nums",children:F1(l.dur)})]}),o.jsx("div",{className:"mt-0.5 h-1 overflow-hidden rounded-full bg-muted",children:o.jsx("div",{className:"h-full rounded-full bg-primary/70",style:{width:`${Math.max(l.dur/i*100,4)}%`}})})]},l.name))})]})]})}function Pne(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3","aria-hidden":"true",children:[o.jsx("circle",{cx:"12",cy:"12",r:"9"}),o.jsx("path",{d:"M12 7v5l3 2"})]})}function Ine({selectedId:e,onNavigate:t,navSections:n,actions:r}){return e?o.jsx($ne,{selectedId:e,onNavigate:t,navSections:n,actions:r}):o.jsx(Fne,{onNavigate:t,navSections:n,actions:r})}function $ne({selectedId:e,onNavigate:t,navSections:n,actions:r}){const s=vn({queryKey:["session",e],queryFn:()=>bte(e)});return o.jsx(td,{className:"h-screen",brand:o.jsx("div",{className:"text-sm font-semibold",children:"Captain"}),navSections:n,collapsedStorageKey:Hm,actions:r,bodyHeader:o.jsx(Bne,{session:s.data,timing:s.data?.timing,loading:s.isLoading}),bodyActions:o.jsxs("div",{className:"flex items-center gap-density-2",children:[o.jsx(Fe,{size:"sm",variant:"ghost",onClick:()=>t("/sessions"),children:"← Sessions"}),o.jsx(Fe,{size:"sm",variant:"outline",onClick:()=>{s.refetch()},children:"Refresh"})]}),contentClassName:"p-0 overflow-hidden",children:o.jsx(Une,{session:s.data,loading:s.isLoading,error:s.error})})}function Fne({onNavigate:e,navSections:t,actions:n}){const[r,s]=w.useState("all"),[i,l]=w.useState(!1),[u,d]=w.useState(""),f=vn({queryKey:["sessions",r,i,u],queryFn:()=>CC({source:r,allProjects:i,query:u})}),p=f.data?.sessions??[];return o.jsx(td,{className:"h-screen",brand:o.jsx("div",{className:"text-sm font-semibold",children:"Captain"}),navSections:t,collapsedStorageKey:Hm,actions:n,bodyHeader:o.jsx("div",{className:"text-sm font-semibold",children:"Sessions"}),bodyActions:o.jsx(Fe,{size:"sm",variant:"outline",onClick:()=>{f.refetch()},children:"Refresh"}),contentClassName:"p-0 overflow-hidden",children:o.jsx(Dne,{source:r,onSourceChange:s,allProjects:i,onAllProjectsChange:l,query:u,onQueryChange:d,sessions:p,summary:f.data?.summary,timing:f.data?.timing,total:f.data?.total??0,loading:f.isLoading,error:f.error,onSelect:h=>e(`/sessions/${encodeURIComponent(h.key)}`)})})}function Dne({source:e,onSourceChange:t,allProjects:n,onAllProjectsChange:r,query:s,onQueryChange:i,sessions:l,summary:u,timing:d,total:f,loading:p,error:h,onSelect:x}){return o.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-background",children:[o.jsxs("div",{className:"shrink-0 space-y-density-2 border-b border-border p-density-3",children:[o.jsxs("div",{className:"grid gap-density-2 md:grid-cols-[minmax(14rem,1fr)_auto_auto]",children:[o.jsx(g2,{value:s,onChange:i,placeholder:"Search sessions",shortcut:null}),o.jsx(Tr,{value:e,options:NC,onChange:t,size:"sm","aria-label":"Session source"}),o.jsx(x2,{checked:n,onChange:r,label:"All projects"})]}),o.jsx(zne,{summary:u,loading:p}),o.jsxs("div",{className:"flex items-center justify-between gap-density-2 text-xs text-muted-foreground",children:[o.jsx("span",{children:p?"Loading...":`${l.length} shown / ${f} total`}),o.jsx(UC,{metrics:d,align:"right"})]})]}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:h?o.jsx("div",{className:"p-density-3 text-sm text-destructive",children:Ux(h)}):l.length===0&&!p?o.jsx("div",{className:"p-density-3 text-sm text-muted-foreground",children:"No sessions found."}):o.jsx("div",{className:"mx-auto max-w-4xl divide-y divide-border",children:l.map(v=>{const y=v.detailAvailable!==!1;return o.jsxs("button",{type:"button",onClick:()=>y&&x(v),disabled:!y,className:["block w-full px-density-3 py-density-2 text-left transition-colors",y?"hover:bg-muted/60":"cursor-default opacity-75"].join(" "),children:[o.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-density-2",children:[o.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:Vm(v)}),o.jsx("span",{className:"shrink-0 rounded border border-border px-1.5 py-0.5 text-[11px] uppercase text-muted-foreground",children:v.source})]}),o.jsx(Vne,{session:v}),o.jsxs("div",{className:"mt-1 truncate text-xs text-muted-foreground",children:[Dx(v.endedAt??v.startedAt),v.model?` - ${v.model}`:""]}),o.jsx("div",{className:"mt-1 truncate text-xs text-muted-foreground",children:v.cwd??v.id})]},v.key)})})})]})}function Bne({session:e,timing:t,loading:n}){return n&&!e?o.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading session..."}):e?o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-density-2",children:[o.jsx("div",{className:"truncate text-sm font-semibold",children:wte(e)}),o.jsx("span",{className:"rounded border border-border px-1.5 py-0.5 text-[11px] uppercase text-muted-foreground",children:e.source}),e.live&&o.jsx("span",{className:"rounded border border-border px-1.5 py-0.5 text-[11px] uppercase text-muted-foreground",children:e.live.status||"live"}),o.jsx(UC,{metrics:t})]}),o.jsxs("div",{className:"mt-1 flex min-w-0 flex-wrap gap-x-density-3 gap-y-1 text-xs text-muted-foreground",children:[e.model&&o.jsx("span",{children:e.model}),o.jsxs("span",{children:[yte(e.messages)," actions"]}),o.jsxs("span",{children:[e.messages?.length??0," messages"]}),k8(e.cost)?o.jsx("span",{children:Bx(k8(e.cost))}):null,e.live?.pid&&o.jsxs("span",{children:["pid=",e.live.pid]}),e.cwd&&o.jsx("span",{className:"max-w-full truncate",children:e.cwd})]})]}):o.jsxs("div",{children:[o.jsx("div",{className:"text-sm font-semibold",children:"Session Browser"}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Select a session to inspect activity."})]})}function Une({session:e,loading:t,error:n}){return t?o.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6 text-sm text-muted-foreground",children:"Loading session..."}):n?o.jsx("div",{className:"min-h-0 flex-1 overflow-auto p-6 text-sm text-destructive",children:Ux(n)}):o.jsx("div",{className:"flex h-full min-h-0 flex-col",children:o.jsx(vC,{session:e?.messages??[],defaultExpanded:!1,scrollable:!0})})}function zne({summary:e,loading:t}){if(!e&&t)return null;const n=[["Live",e?`${e.liveSessions}/${e.totalSessions}`:"--"],["Active",e?.activeSessions??0],["Alerts",e?.alertSessions??0],["Tokens",oi(e?.totalTokens??0)],["Cost",Bx(e?.costUsd??0)],["Context",e?.lowestContextFree!==void 0?`${e.lowestContextFree}%`:"--"]];return o.jsx("div",{className:"grid grid-cols-3 gap-1.5 md:grid-cols-6",children:n.map(([r,s])=>o.jsxs("div",{className:"min-w-0 rounded border border-border px-2 py-1",children:[o.jsx("div",{className:"truncate text-[10px] uppercase text-muted-foreground",children:r}),o.jsx("div",{className:"truncate text-xs font-medium",children:s})]},r))})}function Vne({session:e}){const t=e.health??[],n=[e.live?{key:"live",label:e.live.status||"live",className:"border-emerald-500/40 text-emerald-700"}:null,...t.slice(0,2).map(r=>({key:r.kind,label:r.kind.replace(/_/g," "),className:jte(r.severity)}))].filter(Boolean);return n.length===0?null:o.jsx("div",{className:"mt-1 flex min-w-0 flex-wrap gap-1",children:n.map(r=>o.jsx("span",{className:`rounded border px-1.5 py-0.5 text-[10px] uppercase ${r.className}`,children:r.label},r.key))})}function Hne(){const e=w.useMemo(()=>new J8({defaultOptions:{queries:{retry:!1,gcTime:3e5}}}),[]),t=$3(),n=Kne(t.pathname,window.location.search);return o.jsx(Y8,{client:e,children:o.jsx(LB,{adapter:t,children:o.jsxs(UG,{storageId:"captain-chat",children:[n.kind==="sessions"?o.jsx(Ine,{selectedId:n.sessionId,onNavigate:t.navigate,navSections:Kg("sessions"),actions:o.jsx(Gg,{})}):n.kind==="prompts"?o.jsx(ane,{selectedId:n.promptId,onNavigate:t.navigate,navSections:Kg("prompts"),actions:o.jsx(Gg,{})}):o.jsx(Zne,{active:qne(n),onNavigate:t.navigate,children:n.kind==="dashboard"?o.jsx(Ete,{onNavigate:t.navigate}):n.kind==="operations"?o.jsx(fB,{client:ps,basePath:"/operations",showApiExplorer:!0}):n.kind==="chat"?o.jsx(Jee,{threadId:n.threadId,model:n.model,onNavigate:t.navigate}):o.jsx("div",{className:"h-full overflow-auto",children:o.jsx(See,{onNavigate:t.navigate})})}),o.jsx(Gee,{})]})})})}function Zne({active:e,onNavigate:t,children:n}){return o.jsx(td,{className:"h-screen",brand:o.jsx(Wne,{onNavigate:t}),navSections:Kg(e),collapsedStorageKey:Hm,actions:o.jsx(Gg,{}),contentClassName:"p-0 overflow-hidden",children:n})}function Wne({onNavigate:e}){return o.jsx("button",{type:"button",className:"text-sm font-semibold",onClick:()=>e("/"),children:"Captain"})}function qne(e){return e.kind==="dashboard"?"dashboard":e.kind==="operations"?"operations":e.kind==="prompts"?"prompts":e.kind==="sessions"?"sessions":"agent"}function Kne(e,t){if(e.startsWith("/operations"))return{kind:"operations"};if(e.startsWith("/prompts")){const n=e.slice(8).replace(/^\/+/,""),r=n?decodeURIComponent(n.split("/")[0]??""):void 0;return r?{kind:"prompts",promptId:r}:{kind:"prompts"}}if(e.startsWith("/sessions")){const n=e.slice(9).replace(/^\/+/,""),r=n?decodeURIComponent(n.split("/")[0]??""):void 0;return r?{kind:"sessions",sessionId:r}:{kind:"sessions"}}if(e.startsWith("/chat/")){const n=decodeURIComponent(e.slice(6).split("/")[0]??""),r=new URLSearchParams(t).get("model")||void 0;return n?{kind:"chat",threadId:n,model:r}:{kind:"dashboard"}}return e.startsWith("/agent")?{kind:"agent"}:{kind:"dashboard"}}E7.createRoot(document.getElementById("root")).render(o.jsx(co.StrictMode,{children:o.jsx(L7,{children:o.jsx(F7,{children:o.jsx(Hne,{})})})}));export{Gne as A,xo as B,K as I,vm as J,yi as M,Qne as R,UX as S,ms as U,Rt as _,PX as a,ou as b,NJ as c,Fe as d,mr as e,n5 as f,pa as g,Jg as h,co as i,o as j,A9 as k,Yg as l,iO as m,Du as n,Fu as o,GY as p,Yne as q,w as r,JY as s,Bu as t,M9 as u,Xne as v,tre as w,ere as x,$u as y,Jne as z}; diff --git a/pkg/cli/webapp/dist/assets/index-C3Ux1Lgv.js b/pkg/cli/webapp/dist/assets/index-C3Ux1Lgv.js new file mode 100644 index 0000000..4b434fd --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-C3Ux1Lgv.js @@ -0,0 +1,3 @@ +let T=!1,ce=!1;function ht(t=!0,e=!1){T=t,ce=e}function ut(t,e=3){if(T&&!(typeof T=="number"&&e>T)){if(ce)throw new Error(`[SHIKI DEPRECATE]: ${t}`);console.trace(`[SHIKI DEPRECATE]: ${t}`)}}function be(t){return Z(t)}function Z(t){return Array.isArray(t)?Ae(t):t instanceof RegExp?t:typeof t=="object"?Pe(t):t}function Ae(t){let e=[];for(let s=0,n=t.length;s{for(let n in s)t[n]=s[n]}),t}function he(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?he(t.substring(0,t.length-1)):t.substr(~e+1)}var z=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,L=class{static hasCaptures(t){return t===null?!1:(z.lastIndex=0,z.test(t))}static replaceCaptures(t,e,s){return t.replace(z,(n,r,i,a)=>{let c=s[parseInt(r||i,10)];if(c){let o=e.substring(c.start,c.end);for(;o[0]===".";)o=o.substring(1);switch(a){case"downcase":return o.toLowerCase();case"upcase":return o.toUpperCase();default:return o}}else return n})}};function ue(t,e){return te?1:0}function pe(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let s=t.length,n=e.length;if(s===n){for(let r=0;rthis._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find(r=>ke(t.parent,r.parentScopes));return n?new me(n.fontStyle,n.foreground,n.background):null}},q=class B{constructor(e,s){this.parent=e,this.scopeName=s}static push(e,s){for(const n of s)e=new B(e,n);return e}static from(...e){let s=null;for(let n=0;n"){if(s===e.length-1)return!1;n=e[++s],r=!0}for(;t&&!Ne(t.scopeName,n);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Ne(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var me=class{constructor(t,e,s){this.fontStyle=t,this.foregroundId=e,this.backgroundId=s}};function ve(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,s=[],n=0;for(let r=0,i=e.length;r1&&(_=p.slice(0,p.length-1),_.reverse()),s[n++]=new Ee(S,_,r,o,l,h)}}return s}var Ee=class{constructor(t,e,s,n,r,i){this.scope=t,this.parentScopes=e,this.index=s,this.fontStyle=n,this.foreground=r,this.background=i}},Ge=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(Ge||{});function Le(t,e){t.sort((o,l)=>{let h=ue(o.scope,l.scope);return h!==0||(h=pe(o.parentScopes,l.parentScopes),h!==0)?h:o.index-l.index});let s=0,n="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let o=t.shift();o.fontStyle!==-1&&(s=o.fontStyle),o.foreground!==null&&(n=o.foreground),o.background!==null&&(r=o.background)}let i=new Te(e),a=new me(s,i.getId(n),i.getId(r)),c=new xe(new H(0,null,-1,0,0),[]);for(let o=0,l=t.length;oe?console.log("how did this happen?"):this.scopeDepth=e,s!==-1&&(this.fontStyle=s),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},xe=class Q{constructor(e,s=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=s}_rulesWithParentScopes;static _cmpBySpecificity(e,s){if(e.scopeDepth!==s.scopeDepth)return s.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===">"&&n++,s.parentScopes[r]===">"&&r++,!(n>=e.parentScopes.length||r>=s.parentScopes.length);){const i=s.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return s.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),r,i;if(n===-1?(r=e,i=""):(r=e.substring(0,n),i=e.substring(n+1)),this._children.hasOwnProperty(r))return this._children[r].match(i)}const s=this._rulesWithParentScopes.concat(this._mainRule);return s.sort(Q._cmpBySpecificity),s}insert(e,s,n,r,i,a){if(s===""){this._doInsertHere(e,n,r,i,a);return}let c=s.indexOf("."),o,l;c===-1?(o=s,l=""):(o=s.substring(0,c),l=s.substring(c+1));let h;this._children.hasOwnProperty(o)?h=this._children[o]:(h=new Q(this._mainRule.clone(),H.cloneArr(this._rulesWithParentScopes)),this._children[o]=h),h.insert(e+1,l,n,r,i,a)}_doInsertHere(e,s,n,r,i){if(s===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,c=this._rulesWithParentScopes.length;a>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,s,n,r,i,a,c){let o=C.getLanguageId(e),l=C.getTokenType(e),h=C.containsBalancedBrackets(e)?1:0,u=C.getFontStyle(e),f=C.getForeground(e),d=C.getBackground(e);return s!==0&&(o=s),n!==8&&(l=n),r!==null&&(h=r?1:0),i!==-1&&(u=i),a!==0&&(f=a),c!==0&&(d=c),(o<<0|l<<8|h<<10|u<<11|f<<15|d<<24)>>>0}};function j(t,e){const s=[],n=Me(t);let r=n.next();for(;r!==null;){let o=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":o=1;break;case"L":o=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=n.next()}let l=a();if(s.push({matcher:l,priority:o}),r!==",")break;r=n.next()}return s;function i(){if(r==="-"){r=n.next();const o=i();return l=>!!o&&!o(l)}if(r==="("){r=n.next();const o=c();return r===")"&&(r=n.next()),o}if(te(r)){const o=[];do o.push(r),r=n.next();while(te(r));return l=>e(o,l)}return null}function a(){const o=[];let l=i();for(;l;)o.push(l),l=i();return h=>o.every(u=>u(h))}function c(){const o=[];let l=a();for(;l&&(o.push(l),r==="|"||r===",");){do r=n.next();while(r==="|"||r===",");l=a()}return h=>o.some(u=>u(h))}}function te(t){return!!t&&!!t.match(/[\w\.:]+/)}function Me(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,s=e.exec(t);return{next:()=>{if(!s)return null;const n=s[0];return s=e.exec(t),n}}}function ge(t){typeof t.dispose=="function"&&t.dispose()}var N=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},je=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Oe=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},$e=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new N(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Oe;for(const s of t)We(s,this.initialScopeName,this.repo,e);for(const s of e.references)if(s instanceof N){if(this.seenFullScopeRequests.has(s.scopeName))continue;this.seenFullScopeRequests.add(s.scopeName),this.Q.push(s)}else{if(this.seenFullScopeRequests.has(s.scopeName)||this.seenPartialScopeRequests.has(s.toKey()))continue;this.seenPartialScopeRequests.add(s.toKey()),this.Q.push(s)}}};function We(t,e,s,n){const r=s.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=s.lookup(e);t instanceof N?x({baseGrammar:i,selfGrammar:r},n):X(t.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},n);const a=s.injections(t.scopeName);if(a)for(const c of a)n.add(new N(c))}function X(t,e,s){if(e.repository&&e.repository[t]){const n=e.repository[t];O([n],e,s)}}function x(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&O(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&O(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function O(t,e,s){for(const n of t){if(s.visitedRule.has(n))continue;s.visitedRule.add(n);const r=n.repository?le({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&O(n.patterns,{...e,repository:r},s);const i=n.include;if(!i)continue;const a=Re(i);switch(a.kind){case 0:x({...e,selfGrammar:e.baseGrammar},s);break;case 1:x(e,s);break;case 2:X(a.ruleName,{...e,repository:r},s);break;case 3:case 4:const c=a.scopeName===e.selfGrammar.scopeName?e.selfGrammar:a.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const o={baseGrammar:e.baseGrammar,selfGrammar:c,repository:r};a.kind===4?X(a.ruleName,o,s):x(o,s)}else a.kind===4?s.add(new je(a.scopeName,a.ruleName)):s.add(new N(a.scopeName));break}}}var De=class{kind=0},Fe=class{kind=1},ze=class{constructor(t){this.ruleName=t}kind=2},qe=class{constructor(t){this.scopeName=t}kind=3},Ue=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Re(t){if(t==="$base")return new De;if(t==="$self")return new Fe;const e=t.indexOf("#");if(e===-1)return new qe(t);if(e===0)return new ze(t.substring(1));{const s=t.substring(0,e),n=t.substring(e+1);return new Ue(s,n)}}var Ke=/\\(\d+)/,se=/\\(\d+)/g,He=-1,Ce=-2;var G=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,s,n){this.$location=t,this.id=e,this._name=s||null,this._nameIsCapturing=L.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=L.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${he(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:L.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:L.replaceCaptures(this._contentName,t,e)}},Qe=class extends G{retokenizeCapturedWithRuleId;constructor(t,e,s,n,r){super(t,e,s,n),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,s,n){throw new Error("Not supported!")}},Xe=class extends G{_match;captures;_cachedCompiledPatterns;constructor(t,e,s,n,r){super(t,e,s,null),this._match=new v(n,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,s,n){return this._getCachedCompiledPatterns(t).compileAG(t,s,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new E,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ne=class extends G{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,s,n,r){super(t,e,s,n),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const s of this.patterns)t.getRule(s).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,s,n){return this._getCachedCompiledPatterns(t).compileAG(t,s,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new E,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},V=class extends G{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,s,n,r,i,a,c,o,l){super(t,e,s,n),this._begin=new v(r,this.id),this.beginCaptures=i,this._end=new v(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=o||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,s,n){return this._getCachedCompiledPatterns(t,e).compileAG(t,s,n)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new E;for(const s of this.patterns)t.getRule(s).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},$=class extends G{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,s,n,r,i,a,c,o){super(t,e,s,n),this._begin=new v(r,this.id),this.beginCaptures=i,this.whileCaptures=c,this._while=new v(a,Ce),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,s,n){return this._getCachedCompiledPatterns(t).compileAG(t,s,n)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new E;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,s,n){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,s,n)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new E,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},Se=class m{static createCaptureRule(e,s,n,r,i){return e.registerRule(a=>new Qe(s,a,n,r,i))}static getCompiledRuleId(e,s,n){return e.id||s.registerRule(r=>{if(e.id=r,e.match)return new Xe(e.$vscodeTextmateLocation,e.id,e.name,e.match,m._compileCaptures(e.captures,s,n));if(typeof e.begin>"u"){e.repository&&(n=le({},n,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,m._compilePatterns(i,s,n))}return e.while?new $(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,m._compileCaptures(e.beginCaptures||e.captures,s,n),e.while,m._compileCaptures(e.whileCaptures||e.captures,s,n),m._compilePatterns(e.patterns,s,n)):new V(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,m._compileCaptures(e.beginCaptures||e.captures,s,n),e.end,m._compileCaptures(e.endCaptures||e.captures,s,n),e.applyEndPatternLast,m._compilePatterns(e.patterns,s,n))}),e.id}static _compileCaptures(e,s,n){let r=[];if(e){let i=0;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const c=parseInt(a,10);c>i&&(i=c)}for(let a=0;a<=i;a++)r[a]=null;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const c=parseInt(a,10);let o=0;e[a].patterns&&(o=m.getCompiledRuleId(e[a],s,n)),r[c]=m.createCaptureRule(s,e[a].$vscodeTextmateLocation,e[a].name,e[a].contentName,o)}}return r}static _compilePatterns(e,s,n){let r=[];if(e)for(let i=0,a=e.length;ie.substring(r.start,r.end));return se.lastIndex=0,this.source.replace(se,(r,i)=>de(n[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],s=[],n=[],r=[],i,a,c,o;for(i=0,a=this.source.length;is.source);this._cached=new re(t,e,this._items.map(s=>s.ruleId))}return this._cached}compileAG(t,e,s){return this._hasAnchors?e?s?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,s)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,s)),this._anchorCache.A1_G0):s?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,s)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,s)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,s){let n=this._items.map(r=>r.resolveAnchors(e,s));return new re(t,n,this._items.map(r=>r.ruleId))}},re=class{constructor(t,e,s){this.regExps=e,this.rules=s,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,s=this.rules.length;e{const s=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new U(s,n)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const s=e.match(J.STANDARD_TOKEN_TYPE_REGEXP);if(!s)return 8;switch(s[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Je=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([s,n])=>de(s));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},ie=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function we(t,e,s,n,r,i,a,c){const o=e.content.length;let l=!1,h=-1;if(a){const d=Ye(t,e,s,n,r,i);r=d.stack,n=d.linePos,s=d.isFirstLine,h=d.anchorPosition}const u=Date.now();for(;!l;){if(c!==0&&Date.now()-u>c)return new ie(r,!0);f()}return new ie(r,!1);function f(){const d=Ze(t,e,s,n,r,h);if(!d){i.produce(r,o),l=!0;return}const p=d.captureIndices,S=d.matchedRuleId,_=p&&p.length>0?p[0].end>n:!1;if(S===He){const R=r.getRule(t);i.produce(r,p[0].start),r=r.withContentNameScopesList(r.nameScopesList),P(t,e,s,r,i,R.endCaptures,p),i.produce(r,p[0].end);const g=r;if(r=r.parent,h=g.getAnchorPos(),!_&&g.getEnterPos()===n){r=g,i.produce(r,o),l=!0;return}}else{const R=t.getRule(S);i.produce(r,p[0].start);const g=r,A=R.getName(e.content,p),I=r.contentNameScopesList.pushAttributed(A,t);if(r=r.push(S,n,h,p[0].end===o,null,I,I),R instanceof V){const y=R;P(t,e,s,r,i,y.beginCaptures,p),i.produce(r,p[0].end),h=p[0].end;const D=y.getContentName(e.content,p),F=I.pushAttributed(D,t);if(r=r.withContentNameScopesList(F),y.endHasBackReferences&&(r=r.withEndRule(y.getEndWithResolvedBackReferences(e.content,p))),!_&&g.hasSameRuleAs(r)){r=r.pop(),i.produce(r,o),l=!0;return}}else if(R instanceof $){const y=R;P(t,e,s,r,i,y.beginCaptures,p),i.produce(r,p[0].end),h=p[0].end;const D=y.getContentName(e.content,p),F=I.pushAttributed(D,t);if(r=r.withContentNameScopesList(F),y.whileHasBackReferences&&(r=r.withEndRule(y.getWhileWithResolvedBackReferences(e.content,p))),!_&&g.hasSameRuleAs(r)){r=r.pop(),i.produce(r,o),l=!0;return}}else if(P(t,e,s,r,i,R.captures,p),i.produce(r,p[0].end),r=r.pop(),!_){r=r.safePop(),i.produce(r,o),l=!0;return}}p[0].end>n&&(n=p[0].end,s=!1)}}function Ye(t,e,s,n,r,i){let a=r.beginRuleCapturedEOL?0:-1;const c=[];for(let o=r;o;o=o.pop()){const l=o.getRule(t);l instanceof $&&c.push({rule:l,stack:o})}for(let o=c.pop();o;o=c.pop()){const{ruleScanner:l,findOptions:h}=st(o.rule,t,o.stack.endRule,s,n===a),u=l.findNextMatchSync(e,n,h);if(u){if(u.ruleId!==Ce){r=o.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(i.produce(o.stack,u.captureIndices[0].start),P(t,e,s,o.stack,i,o.rule.whileCaptures,u.captureIndices),i.produce(o.stack,u.captureIndices[0].end),a=u.captureIndices[0].end,u.captureIndices[0].end>n&&(n=u.captureIndices[0].end,s=!1))}else{r=o.stack.pop();break}}return{stack:r,linePos:n,anchorPosition:a,isFirstLine:s}}function Ze(t,e,s,n,r,i){const a=et(t,e,s,n,r,i),c=t.getInjections();if(c.length===0)return a;const o=tt(c,t,e,s,n,r,i);if(!o)return a;if(!a)return o;const l=a.captureIndices[0].start,h=o.captureIndices[0].start;return h=c)&&(c=A,o=g.captureIndices,l=g.ruleId,h=p.priority,c===r))break}return o?{priorityMatch:h===-1,captureIndices:o,matchedRuleId:l}:null}function Ie(t,e,s,n,r){return{ruleScanner:t.compileAG(e,s,n,r),findOptions:0}}function st(t,e,s,n,r){return{ruleScanner:t.compileWhileAG(e,s,n,r),findOptions:0}}function P(t,e,s,n,r,i,a){if(i.length===0)return;const c=e.content,o=Math.min(i.length,a.length),l=[],h=a[0].end;for(let u=0;uh)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?r.produceFromScopes(l[l.length-1].scopes,d.start):r.produce(n,d.start),f.retokenizeCapturedWithRuleId){const S=f.getName(c,a),_=n.contentNameScopesList.pushAttributed(S,t),R=f.getContentName(c,a),g=_.pushAttributed(R,t),A=n.push(f.retokenizeCapturedWithRuleId,d.start,-1,!1,null,_,g),I=t.createOnigString(c.substring(0,d.end));we(t,I,s&&d.start===0,d.start,A,r,!1,0),ge(I);continue}const p=f.getName(c,a);if(p!==null){const _=(l.length>0?l[l.length-1].scopes:n.contentNameScopesList).pushAttributed(p,t);l.push(new nt(_,d.end))}}for(;l.length>0;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var nt=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function rt(t,e,s,n,r,i,a,c){return new ot(t,e,s,n,r,i,a,c)}function oe(t,e,s,n,r){const i=j(e,W),a=Se.getCompiledRuleId(s,n,r.repository);for(const c of i)t.push({debugSelector:e,matcher:c.matcher,ruleId:a,grammar:r,priority:c.priority})}function W(t,e){if(e.length{for(let r=s;rs&&t.substr(0,s)===e&&t[s]==="."}var ot=class{constructor(t,e,s,n,r,i,a,c){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=c,this._basicScopeAttributesProvider=new Ve(s,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=ae(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const o of Object.keys(r)){const l=j(o,W);for(const h of l)this._tokenTypeMatchers.push({matcher:h.matcher,type:r[o]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},e=[],s=this._rootScopeName,n=t.lookup(s);if(n){const r=n.injections;if(r)for(let a in r)oe(e,a,r[a],this,n);const i=this._grammarRepository.injections(s);i&&i.forEach(a=>{const c=this.getExternalGrammar(a);if(c){const o=c.injectionSelector;o&&oe(e,o,c,this,c)}})}return e.sort((r,i)=>r.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,s=t(e);return this._ruleId2desc[e]=s,s}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const s=this._grammarRepository.lookup(t);if(s)return this._includedGrammars[t]=ae(s,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,s=0){const n=this._tokenize(t,e,!1,s);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(t,e,s=0){const n=this._tokenize(t,e,!0,s);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(t,e,s,n){this._rootId===-1&&(this._rootId=Se.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!e||e===Y.NULL){r=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),u=M.set(0,l.languageId,l.tokenType,null,h.fontStyle,h.foregroundId,h.backgroundId),f=this.getRule(this._rootId).getName(null,null);let d;f?d=k.createRootAndLookUpScopeName(f,u,this):d=k.createRoot("unknown",u),e=new Y(null,this._rootId,-1,-1,!1,null,d,d)}else r=!1,e.reset();t=t+` +`;const i=this.createOnigString(t),a=i.content.length,c=new ct(s,t,this._tokenTypeMatchers,this.balancedBracketSelectors),o=we(this,i,r,0,e,c,!0,n);return ge(i),{lineLength:a,lineTokens:c,ruleStack:o.stack,stoppedEarly:o.stoppedEarly}}};function ae(t,e){return t=be(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var k=class w{constructor(e,s,n){this.parent=e,this.scopePath=s,this.tokenAttributes=n}static fromExtension(e,s){let n=e,r=e?.scopePath??null;for(const i of s)r=q.push(r,i.scopeNames),n=new w(n,r,i.encodedTokenAttributes);return n}static createRoot(e,s){return new w(null,new q(null,e),s)}static createRootAndLookUpScopeName(e,s,n){const r=n.getMetadataForScope(e),i=new q(null,e),a=n.themeProvider.themeMatch(i),c=w.mergeAttributes(s,r,a);return new w(null,i,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return w.equals(this,e)}static equals(e,s){do{if(e===s||!e&&!s)return!0;if(!e||!s||e.scopeName!==s.scopeName||e.tokenAttributes!==s.tokenAttributes)return!1;e=e.parent,s=s.parent}while(!0)}static mergeAttributes(e,s,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),M.set(e,s.languageId,s.tokenType,null,r,i,a)}pushAttributed(e,s){if(e===null)return this;if(e.indexOf(" ")===-1)return w._pushAttributed(this,e,s);const n=e.split(/ /g);let r=this;for(const i of n)r=w._pushAttributed(r,i,s);return r}static _pushAttributed(e,s,n){const r=n.getMetadataForScope(s),i=e.scopePath.push(s),a=n.themeProvider.themeMatch(i),c=w.mergeAttributes(e.tokenAttributes,r,a);return new w(e,i,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const s=[];let n=this;for(;n&&n!==e;)s.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?s.reverse():void 0}},Y=class b{constructor(e,s,n,r,i,a,c,o){this.parent=e,this.ruleId=s,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=c,this.contentNameScopesList=o,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new b(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:b._equals(this,e)}static _equals(e,s){return e===s?!0:this._structuralEquals(e,s)?k.equals(e.contentNameScopesList,s.contentNameScopesList):!1}static _structuralEquals(e,s){do{if(e===s||!e&&!s)return!0;if(!e||!s||e.depth!==s.depth||e.ruleId!==s.ruleId||e.endRule!==s.endRule)return!1;e=e.parent,s=s.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){b._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,s,n,r,i,a,c){return new b(this,e,s,n,r,i,a,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,s){return this.parent&&(s=this.parent._writeString(e,s)),e[s++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,s}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new b(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let s=this;for(;s&&s._enterPos===e._enterPos;){if(s.ruleId===e.ruleId)return!0;s=s.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,s){const n=k.fromExtension(e?.nameScopesList??null,s.nameScopesList);return new b(e,s.ruleId,s.enterPos??-1,s.anchorPos??-1,s.beginRuleCapturedEOL,s.endRule,n,k.fromExtension(n,s.contentNameScopesList))}},at=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(s=>s==="*"?(this.allowAny=!0,[]):j(s,W).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(s=>j(s,W).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},ct=class{constructor(t,e,s,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=t,this._tokenTypeOverrides=s,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let n=t?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=t?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(i)&&(n=M.set(n,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(i))}if(r&&(n=M.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=e;return}const s=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:s}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const s=new Uint32Array(this._binaryTokens.length);for(let n=0,r=this._binaryTokens.length;n0;)a.Q.map(c=>this._loadSingleGrammar(c.scopeName)),a.processQueue();return this._grammarForScopeName(e,s,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const s=this._options.loadGrammar(e);if(s){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(s,n)}}addGrammar(e,s=[],n=0,r=null){return this._syncRegistry.addGrammar(e,s),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,s=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,s,n,r,i)}},ft=Y.NULL;export{M as E,Ge as F,ft as I,pt as R,K as T,ht as e,ut as w}; diff --git a/pkg/cli/webapp/dist/assets/index-C9q4Fmxx.js b/pkg/cli/webapp/dist/assets/index-C9q4Fmxx.js new file mode 100644 index 0000000..38e137c --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-C9q4Fmxx.js @@ -0,0 +1 @@ +const d=/["&'<>`]/g,h=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,f=/[|\\{}()[\]^$+*?.]/g,o=new WeakMap;function m(r,e){if(r=r.replace(e.subset?x(e.subset):d,t),e.subset||e.escapeOnly)return r;return r.replace(h,a).replace(p,t);function a(c,i,u){return e.format((c.charCodeAt(0)-55296)*1024+c.charCodeAt(1)-56320+65536,u.charCodeAt(i+2),e)}function t(c,i,u){return e.format(c.charCodeAt(0),u.charCodeAt(i+1),e)}}function x(r){let e=o.get(r);return e||(e=A(r),o.set(r,e)),e}function A(r){const e=[];let a=-1;for(;++a",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},y=["cent","copy","divide","gt","lt","not","para","times"],g={}.hasOwnProperty,s={};let n;for(n in l)g.call(l,n)&&(s[l[n]]=n);const R=/[^\dA-Za-z]/;function S(r,e,a,t){const c=String.fromCharCode(r);if(g.call(s,c)){const i=s[c],u="&"+i;return a&&C.includes(i)&&!y.includes(i)&&(!t||e&&e!==61&&R.test(String.fromCharCode(e)))?u:u+";"}return""}function q(r,e,a){let t=O(r,e,a.omitOptionalSemicolons),c;if((a.useNamedReferences||a.useShortestReferences)&&(c=S(r,e,a.omitOptionalSemicolons,a.attribute)),(a.useShortestReferences||!c)&&a.useShortestReferences){const i=b(r,e,a.omitOptionalSemicolons);i.length=65&&O<=90||O>=97&&O<=122||O>=161}function y(O){return O>=48&&O<=57}function h(O){let $;return O.next==d&&(($=O.peek(1))==d||$==S)}const nO=new i((O,$)=>{if($.dialectEnabled(c)){let Q;if(O.next<0&&$.canShift(Z))O.acceptToken(Z);else if(((Q=O.peek(-1))==r||Q<0)&&$.canShift(T)){let t=0;for(;O.next!=r&&R.includes(O.next);)O.advance(),t++;O.next==r||h(O)?O.acceptToken(T,-t):t&&O.acceptToken(s)}else if(O.next==r)O.acceptToken(A,1);else if(R.includes(O.next)){for(O.advance();O.next!=r&&R.includes(O.next);)O.advance();O.acceptToken(s)}}else{let Q=0;for(;R.includes(O.next);)O.advance(),Q++;Q&&O.acceptToken(s)}},{contextual:!0}),rO=new i((O,$)=>{if(h(O)){if(O.advance(),$.dialectEnabled(c)){let Q=-1;for(let t=1;;t++){let a=O.peek(-t-1);if(a==r||a<0){Q=t+1;break}else if(!R.includes(a))break}if(Q>-1){let t=O.next==S,a=0;for(O.advance();O.next>=0;)if(O.next==r){O.advance();let n=0;for(;O.next!=r&&R.includes(O.next);)n++,O.advance();if(n=0;)O.advance();O.acceptToken(G)}else{for(O.advance();O.next>=0;){let{next:Q}=O;if(O.advance(),Q==S&&O.next==d){O.advance();break}}O.acceptToken(p)}}}),RO=new i((O,$)=>{(O.next==tO||O.next==q)&&$.dialectEnabled(c)&&O.acceptToken(O.next==q?B:H,1)}),iO=new i((O,$)=>{if(!$.dialectEnabled(c))return;let Q=$.context.depth;if(O.next<0&&Q){O.acceptToken(X);return}if(O.peek(-1)==r){let a=0;for(;O.next!=r&&R.includes(O.next);)O.advance(),a++;a!=Q&&O.next!=r&&!h(O)&&(a{for(let Q=!1,t=0,a=0;;a++){let{next:n}=O;if(o(n)||n==l||n==m||Q&&y(n))!Q&&(n!=l||a>0)&&(Q=!0),t===a&&n==l&&t++,O.advance();else if(n==f&&O.peek(1)==u){O.acceptToken(K,2);break}else{Q&&O.acceptToken(t==2&&$.canShift(Y)?Y:$.canShift(z)?z:n==J?L:F);break}}}),lO=new i(O=>{if(O.next==QO){for(O.advance();o(O.next)||O.next==l||O.next==m||y(O.next);)O.advance();O.next==f&&O.peek(1)==u?O.acceptToken(D,2):O.acceptToken(I)}}),dO=new i(O=>{if(R.includes(O.peek(-1))){let{next:$}=O;(o($)||$==m||$==f||$==$O||$==OO||$==M&&o(O.peek(1))||$==l||$==aO||$==S)&&O.acceptToken(C)}}),SO=new i(O=>{if(!R.includes(O.peek(-1))){let{next:$}=O;if($==eO&&(O.advance(),O.acceptToken(w)),o($)){do O.advance();while(o(O.next)||y(O.next));O.acceptToken(w)}}});function b(O,$){this.parent=O,this.depth=$,this.hash=(O?O.hash+O.hash<<8:0)+$+($<<4)}const cO=new b(null,0),sO=new _({start:cO,shift(O,$,Q,t){return $==j?new b(O,Q.pos-t.pos):$==X?O.parent:O},hash(O){return O.hash}}),XO=W({"AtKeyword import charset namespace keyframes media supports include mixin use forward extend at-root":e.definitionKeyword,"Keyword selector":e.keyword,ControlKeyword:e.controlKeyword,NamespaceName:e.namespace,KeyframeName:e.labelName,KeyframeRangeName:e.operatorKeyword,TagName:e.tagName,"ClassName Suffix":e.className,PseudoClassName:e.constant(e.className),IdName:e.labelName,"FeatureName PropertyName":e.propertyName,AttributeName:e.attributeName,NumberLiteral:e.number,KeywordQuery:e.keyword,UnaryQueryOp:e.operatorKeyword,"CallTag ValueName":e.atom,VariableName:e.variableName,SassVariableName:e.special(e.variableName),Callee:e.operatorKeyword,Unit:e.unit,"UniversalSelector NestingSelector IndentedMixin IndentedInclude":e.definitionOperator,MatchOp:e.compareOperator,"ChildOp SiblingOp, LogicOp":e.logicOperator,BinOp:e.arithmeticOperator,"Important Global Default":e.modifier,Comment:e.blockComment,LineComment:e.lineComment,ColorLiteral:e.color,"ParenthesizedContent StringLiteral":e.string,"InterpolationStart InterpolationContinue InterpolationEnd":e.meta,': "..."':e.punctuation,"PseudoOp #":e.derefOperator,"; ,":e.separator,"( )":e.paren,"[ ]":e.squareBracket,"{ }":e.brace}),PO={__proto__:null,not:62,using:197,as:207,with:211,without:211,hide:225,show:225,if:263,from:269,to:271,through:273,in:279},mO={__proto__:null,url:82,"url-prefix":82,domain:82,regexp:82,lang:104,"nth-child":104,"nth-last-child":104,"nth-of-type":104,"nth-last-of-type":104,dir:104,"host-context":104},fO={__proto__:null,"@import":162,"@include":194,"@mixin":200,"@function":200,"@use":204,"@extend":214,"@at-root":218,"@forward":222,"@media":228,"@charset":232,"@namespace":236,"@keyframes":242,"@supports":254,"@if":258,"@else":260,"@for":266,"@each":276,"@while":282,"@debug":286,"@warn":286,"@error":286,"@return":286},yO={__proto__:null,layer:166,not:184,only:184,selector:190},hO=v.deserialize({version:14,states:"!$WQ`Q+tOOO#fQ+tOOP#mOpOOOOQ#U'#Ch'#ChO#rQ(pO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ly#j#m%eQ#VhQ#_mQ$h!uR&^$iW#Rhm!u$iQ#^lQ$|#QQ%S#SQ&m%PQ&n%QQ'p&dR(f'oQ%O#QQ'v&kR)R(nQ#apQ$k!vQ$n!xQ$q!zQ$v#OQ%V#WQ%W#YQ%]#_Q%d#hQ&]$hQ&f$uQ&q%XQ'k&^Q'l&_S'm&`&bQ(k'sQ(}(eR)Q(jR&h$wR#ft",nodeNames:"⚠ InterpolationEnd InterpolationContinue Unit VariableName InterpolationStart LineComment Comment IndentedMixin IndentedInclude StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector SuffixedSelector Suffix Interpolation SassVariableName ValueName ) ( ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp LogicOp UnaryExpression LogicOp NamespacedValue . CallExpression Callee ArgList : ... , CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName ClassSelector ClassName PseudoClassSelector :: PseudoClassName PseudoClassName ArgList PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp PlaceholderSelector ClassName Block { Declaration PropertyName Map Important Global Default ; } ImportStatement AtKeyword import Layer layer LayerName KeywordQuery FeatureQuery FeatureName BinaryQuery ComparisonQuery CompareOp UnaryQuery LogicOp ParenthesizedQuery SelectorQuery selector IncludeStatement include Keyword MixinStatement mixin UseStatement use Keyword Star Keyword ExtendStatement extend RootStatement at-root ForwardStatement forward Keyword MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports IfStatement ControlKeyword ControlKeyword Keyword ForStatement ControlKeyword Keyword Keyword Keyword EachStatement ControlKeyword Keyword WhileStatement ControlKeyword OutputStatement ControlKeyword AtRule Styles",maxTerm:196,context:sO,nodeProps:[["openedBy",1,"InterpolationStart",5,"InterpolationEnd",21,"(",43,"[",78,"{"],["isolate",-3,6,7,26,""],["closedBy",22,")",44,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POy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RW!#}P;=`<%l#r",tokenizers:[iO,dO,lO,SO,oO,nO,rO,RO,0,1,2,3,4],topRules:{StyleSheet:[0,10],Styles:[1,145]},dialects:{indented:0},specialized:[{term:172,get:O=>PO[O]||-1},{term:171,get:O=>mO[O]||-1},{term:80,get:O=>fO[O]||-1},{term:173,get:O=>yO[O]||-1}],tokenPrec:3217}),P=V.define({name:"sass",parser:hO.configure({props:[k.add({Block:E,Comment(O,$){return{from:O.from+2,to:$.sliceDoc(O.to-2,O.to)=="*/"?O.to-2:O.to}}}),U.add({Declaration:N()})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"$-"}}),wO=P.configure({dialect:"indented",props:[U.add({"Block RuleSet":O=>O.baseIndent+O.unit}),k.add({Block:O=>({from:O.from,to:O.to})})]}),YO=x(O=>O.name=="VariableName"||O.name=="SassVariableName");function kO(O){return new g(O?.indented?wO:P,P.data.of({autocomplete:YO}))}export{kO as sass,YO as sassCompletionSource,P as sassLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-CjqsAOBG.css b/pkg/cli/webapp/dist/assets/index-CjqsAOBG.css new file mode 100644 index 0000000..7f06d92 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-CjqsAOBG.css @@ -0,0 +1 @@ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:var(--fs-font-sans);--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-800:oklch(45.3% .124 130.933);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-700:oklch(51.1% .096 186.391);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-600:oklch(60.9% .126 221.723);--color-cyan-700:oklch(52% .105 223.128);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-950:oklch(25.7% .09 281.288);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-950:oklch(28.3% .141 291.089);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-fuchsia-100:oklch(95.2% .037 318.852);--color-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-300:oklch(82.3% .12 346.018);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-700:oklch(52.5% .223 3.958);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-950:oklch(27.1% .105 12.094);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--fs-font-sans);--default-mono-font-family:var(--fs-font-mono);--spacing-density-1:calc(var(--spacing-unit,.25rem) * 1);--spacing-density-2:calc(var(--spacing-unit,.25rem) * 2);--spacing-density-3:calc(var(--spacing-unit,.25rem) * 3);--spacing-density-4:calc(var(--spacing-unit,.25rem) * 4);--spacing-density-6:calc(var(--spacing-unit,.25rem) * 6);--spacing-density-8:calc(var(--spacing-unit,.25rem) * 8);--spacing-control-h:var(--control-height,2.25rem);--spacing-control-px:var(--control-padding-x,.75rem)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\@container{container-type:inline-size}.\[container-type\:size\]{container-type:size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-4{inset:calc(var(--spacing) * 4)}.inset-x-0{inset-inline:0}.inset-x-3{inset-inline:calc(var(--spacing) * 3)}.inset-y-0{inset-block:0}.-top-0\.5{top:calc(var(--spacing) * -.5)}.top-0{top:0}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-9{top:calc(var(--spacing) * 9)}.top-\[22px\]{top:22px}.top-\[calc\(100\%\+0\.375rem\)\]{top:calc(100% + .375rem)}.-right-0\.5{right:calc(var(--spacing) * -.5)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.right-7{right:calc(var(--spacing) * 7)}.right-\[3\.75rem\]{right:3.75rem}.right-auto{right:auto}.-bottom-0\.5{bottom:calc(var(--spacing) * -.5)}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-2\.5{bottom:calc(var(--spacing) * 2.5)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.-left-0\.5{left:calc(var(--spacing) * -.5)}.left-0{left:0}.left-0\.5{left:calc(var(--spacing) * .5)}.left-1{left:var(--spacing)}.left-1\.5{left:calc(var(--spacing) * 1.5)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-\[10px\]{left:10px}.left-auto{left:auto}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[999\]{z-index:999}.z-\[9999\]{z-index:9999}.z-\[N\]{z-index:N}.z-\[…\]{z-index:…}.col-span-2{grid-column:span 2/span 2}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-density-2{margin:var(--spacing-density-2)}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-mx-density-4{margin-inline:calc(var(--spacing-density-4) * -1)}.mx-0\.5{margin-inline:calc(var(--spacing) * .5)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.-my-density-3{margin-block:calc(var(--spacing-density-3) * -1)}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-4{margin-block:calc(var(--spacing) * 4)}.-mt-density-4{margin-top:calc(var(--spacing-density-4) * -1)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mt-density-1{margin-top:var(--spacing-density-1)}.mt-density-2{margin-top:var(--spacing-density-2)}.mt-density-3{margin-top:var(--spacing-density-3)}.mt-density-4{margin-top:var(--spacing-density-4)}.mt-px{margin-top:1px}.-mr-px{margin-right:-1px}.mr-1{margin-right:var(--spacing)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-auto{margin-right:auto}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-density-2{margin-bottom:var(--spacing-density-2)}.mb-density-3{margin-bottom:var(--spacing-density-3)}.mb-density-4{margin-bottom:var(--spacing-density-4)}.-ml-px{margin-left:-1px}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-5{margin-left:calc(var(--spacing) * 5)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-12{margin-left:calc(var(--spacing) * 12)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[display\:-webkit-box\]{display:-webkit-box}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-\[clamp\(…\)\]{width:clamp(…);height:clamp(…)}.size-full{width:100%;height:100%}.h-0{height:0}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-40{height:calc(var(--spacing) * 40)}.h-64{height:calc(var(--spacing) * 64)}.h-\[16px\]{height:16px}.h-\[18px\]{height:18px}.h-\[21px\]{height:21px}.h-\[34px\]{height:34px}.h-\[60vh\]{height:60vh}.h-\[70vh\]{height:70vh}.h-\[75vh\]{height:75vh}.h-\[92vh\]{height:92vh}.h-\[95vh\]{height:95vh}.h-\[240px\]{height:240px}.h-\[280px\]{height:280px}.h-\[320px\]{height:320px}.h-\[400px\]{height:400px}.h-\[420px\]{height:420px}.h-\[440px\]{height:440px}.h-\[460px\]{height:460px}.h-\[480px\]{height:480px}.h-\[500px\]{height:500px}.h-\[560px\]{height:560px}.h-\[600px\]{height:600px}.h-\[640px\]{height:640px}.h-\[720px\]{height:720px}.h-auto{height:auto}.h-control-h{height:var(--spacing-control-h)}.h-density-4{height:var(--spacing-density-4)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[26rem\]{max-height:26rem}.max-h-\[40vh\]{max-height:40vh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[520px\]{max-height:520px}.max-h-\[calc\(100vh-1rem\)\]{max-height:calc(100vh - 1rem)}.max-h-\[min\(32rem\,calc\(100vh-2rem\)\)\]{max-height:min(32rem,100vh - 2rem)}.max-h-\[min\(34rem\,calc\(100vh-2rem\)\)\]{max-height:min(34rem,100vh - 2rem)}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-5{min-height:calc(var(--spacing) * 5)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-10{min-height:calc(var(--spacing) * 10)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-14{min-height:calc(var(--spacing) * 14)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-20{min-height:calc(var(--spacing) * 20)}.min-h-28{min-height:calc(var(--spacing) * 28)}.min-h-32{min-height:calc(var(--spacing) * 32)}.min-h-36{min-height:calc(var(--spacing) * 36)}.min-h-40{min-height:calc(var(--spacing) * 40)}.min-h-48{min-height:calc(var(--spacing) * 48)}.min-h-56{min-height:calc(var(--spacing) * 56)}.min-h-80{min-height:calc(var(--spacing) * 80)}.min-h-96{min-height:calc(var(--spacing) * 96)}.min-h-\[4\.25rem\]{min-height:4.25rem}.min-h-\[5rem\]{min-height:5rem}.min-h-\[7rem\]{min-height:7rem}.min-h-\[12rem\]{min-height:12rem}.min-h-\[14rem\]{min-height:14rem}.min-h-\[18px\]{min-height:18px}.min-h-\[34rem\]{min-height:34rem}.min-h-\[48px\]{min-height:48px}.min-h-control-h{min-height:var(--spacing-control-h)}.min-h-px{min-height:1px}.w-0{width:0}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-5\/6{width:83.3333%}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-96{width:calc(var(--spacing) * 96)}.w-\[3px\]{width:3px}.w-\[15\.5rem\]{width:15.5rem}.w-\[21px\]{width:21px}.w-\[22\.5rem\]{width:22.5rem}.w-\[22rem\]{width:22rem}.w-\[24rem\]{width:24rem}.w-\[28rem\]{width:28rem}.w-\[30rem\]{width:30rem}.w-\[32rem\]{width:32rem}.w-\[34px\]{width:34px}.w-\[34rem\]{width:34rem}.w-\[52px\]{width:52px}.w-\[52rem\]{width:52rem}.w-\[58rem\]{width:58rem}.w-\[64rem\]{width:64rem}.w-\[200px\]{width:200px}.w-\[320px\]{width:320px}.w-\[360px\]{width:360px}.w-\[420px\]{width:420px}.w-\[480px\]{width:480px}.w-\[560px\]{width:560px}.w-\[640px\]{width:640px}.w-\[720px\]{width:720px}.w-\[min\(20rem\,85vw\)\]{width:min(20rem,85vw)}.w-\[min\(34rem\,calc\(100vw-2rem\)\)\]{width:min(34rem,100vw - 2rem)}.w-\[min\(100\%\,28rem\)\]{width:min(100%,28rem)}.w-auto{width:auto}.w-control-h{width:var(--spacing-control-h)}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-32{max-width:calc(var(--spacing) * 32)}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\[8\.5rem\]{max-width:8.5rem}.max-w-\[9\.5rem\]{max-width:9.5rem}.max-w-\[12rem\]{max-width:12rem}.max-w-\[15rem\]{max-width:15rem}.max-w-\[16rem\]{max-width:16rem}.max-w-\[18rem\]{max-width:18rem}.max-w-\[20rem\]{max-width:20rem}.max-w-\[22rem\]{max-width:22rem}.max-w-\[28rem\]{max-width:28rem}.max-w-\[32rem\]{max-width:32rem}.max-w-\[36rem\]{max-width:36rem}.max-w-\[40ch\]{max-width:40ch}.max-w-\[48rem\]{max-width:48rem}.max-w-\[50ch\]{max-width:50ch}.max-w-\[85\%\]{max-width:85%}.max-w-\[90vw\]{max-width:90vw}.max-w-\[95\%\]{max-width:95%}.max-w-\[95vw\]{max-width:95vw}.max-w-\[100px\]{max-width:100px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[320px\]{max-width:320px}.max-w-\[820px\]{max-width:820px}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-4{min-width:calc(var(--spacing) * 4)}.min-w-12{min-width:calc(var(--spacing) * 12)}.min-w-20{min-width:calc(var(--spacing) * 20)}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-32{min-width:calc(var(--spacing) * 32)}.min-w-36{min-width:calc(var(--spacing) * 36)}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-56{min-width:calc(var(--spacing) * 56)}.min-w-64{min-width:calc(var(--spacing) * 64)}.min-w-72{min-width:calc(var(--spacing) * 72)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[9rem\]{min-width:9rem}.min-w-\[11rem\]{min-width:11rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[14rem\]{min-width:14rem}.min-w-\[16px\]{min-width:16px}.min-w-\[16rem\]{min-width:16rem}.min-w-\[18px\]{min-width:18px}.min-w-\[18rem\]{min-width:18rem}.min-w-\[80px\]{min-width:80px}.min-w-\[150px\]{min-width:150px}.min-w-\[170px\]{min-width:170px}.min-w-\[220px\]{min-width:220px}.min-w-full{min-width:100%}.min-w-max{min-width:max-content}.flex-1{flex:1}.flex-\[1_1_14rem\]{flex:14rem}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.border-spacing-y-density-2{--tw-border-spacing-y:var(--spacing-density-2);border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-8{--tw-translate-x:calc(var(--spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[1\.25rem_minmax\(0\,1fr\)\]{grid-template-columns:1.25rem minmax(0,1fr)}.grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.grid-cols-\[1rem_minmax\(0\,1fr\)\]{grid-template-columns:1rem minmax(0,1fr)}.grid-cols-\[2rem_1fr\]{grid-template-columns:2rem 1fr}.grid-cols-\[2rem_minmax\(0\,1fr\)\]{grid-template-columns:2rem minmax(0,1fr)}.grid-cols-\[3\.5rem_minmax\(24rem\,1fr\)\]{grid-template-columns:3.5rem minmax(24rem,1fr)}.grid-cols-\[8rem_minmax\(0\,1fr\)_4rem\]{grid-template-columns:8rem minmax(0,1fr) 4rem}.grid-cols-\[9rem_minmax\(0\,1fr\)\]{grid-template-columns:9rem minmax(0,1fr)}.grid-cols-\[10rem_1fr\]{grid-template-columns:10rem 1fr}.grid-cols-\[10rem_1fr_9rem\]{grid-template-columns:10rem 1fr 9rem}.grid-cols-\[10rem_1fr_auto\]{grid-template-columns:10rem 1fr auto}.grid-cols-\[18rem_24rem_30rem\]{grid-template-columns:18rem 24rem 30rem}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_minmax\(0\,1fr\)\]{grid-template-columns:auto minmax(0,1fr)}.grid-cols-\[fit-content\(30ch\)_minmax\(0\,1fr\)\]{grid-template-columns:fit-content(30ch) minmax(0,1fr)}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(0\,1fr\)_minmax\(18rem\,24rem\)\]{grid-template-columns:minmax(0,1fr) minmax(18rem,24rem)}.grid-cols-\[minmax\(0\,14rem\)_minmax\(0\,1fr\)_4rem\]{grid-template-columns:minmax(0,14rem) minmax(0,1fr) 4rem}.grid-cols-\[minmax\(4rem\,8rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(4rem,8rem) minmax(0,1fr)}.grid-cols-\[minmax\(6rem\,1fr\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(6rem,1fr) minmax(0,1fr) auto}.grid-cols-\[minmax\(7rem\,12rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(7rem,12rem) minmax(0,1fr)}.grid-cols-\[minmax\(8rem\,14rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(8rem,14rem) minmax(0,1fr)}.grid-cols-subgrid{grid-template-columns:subgrid}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-density-1{gap:var(--spacing-density-1)}.gap-density-2{gap:var(--spacing-density-2)}.gap-density-3{gap:var(--spacing-density-3)}.gap-density-4{gap:var(--spacing-density-4)}.gap-px{gap:1px}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-density-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing-density-1) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing-density-1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-density-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing-density-2) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing-density-2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-density-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing-density-3) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing-density-3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-density-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing-density-4) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing-density-4) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-1\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-density-3{column-gap:var(--spacing-density-3)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-0>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(0px * var(--tw-divide-y-reverse));border-bottom-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)),:where(.divide-border\/60>:not(:last-child)){border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\/60>:not(:last-child)){border-color:color-mix(in oklab,var(--border) 60%,transparent)}}:where(.divide-border\/70>:not(:last-child)){border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\/70>:not(:last-child)){border-color:color-mix(in oklab,var(--border) 70%,transparent)}}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[2px\]{border-radius:2px}.rounded-\[5px\]{border-radius:5px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-500{border-color:var(--color-amber-500)}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-500{border-color:var(--color-blue-500)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-border\/60{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,var(--border) 60%,transparent)}}.border-border\/70{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/70{border-color:color-mix(in oklab,var(--border) 70%,transparent)}}.border-current\/10{border-color:currentColor}@supports (color:color-mix(in lab,red,red)){.border-current\/10{border-color:color-mix(in oklab,currentcolor 10%,transparent)}}.border-destructive,.border-destructive\/20{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/20{border-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.border-destructive\/30{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/30{border-color:color-mix(in oklab,var(--destructive) 30%,transparent)}}.border-destructive\/40{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/40{border-color:color-mix(in oklab,var(--destructive) 40%,transparent)}}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-600{border-color:var(--color-emerald-600)}.border-foreground,.border-foreground\/20{border-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.border-foreground\/20{border-color:color-mix(in oklab,var(--foreground) 20%,transparent)}}.border-green-500{border-color:var(--color-green-500)}.border-green-500\/50{border-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.border-green-500\/50{border-color:color-mix(in oklab,var(--color-green-500) 50%,transparent)}}.border-input{border-color:var(--input)}.border-muted-foreground\/50{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.border-muted-foreground\/50{border-color:color-mix(in oklab,var(--muted-foreground) 50%,transparent)}}.border-primary,.border-primary\/30{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,var(--primary) 30%,transparent)}}.border-primary\/40{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,var(--primary) 40%,transparent)}}.border-primary\/70{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/70{border-color:color-mix(in oklab,var(--primary) 70%,transparent)}}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-400{border-color:var(--color-red-400)}.border-red-500{border-color:var(--color-red-500)}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500) 50%,transparent)}}.border-red-600{border-color:var(--color-red-600)}.border-rose-200{border-color:var(--color-rose-200)}.border-rose-300{border-color:var(--color-rose-300)}.border-sidebar-border{border-color:var(--sidebar-border)}.border-sky-200{border-color:var(--color-sky-200)}.border-sky-300{border-color:var(--color-sky-300)}.border-sky-500\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/30{border-color:color-mix(in oklab,var(--color-sky-500) 30%,transparent)}}.border-sky-600{border-color:var(--color-sky-600)}.border-slate-600{border-color:var(--color-slate-600)}.border-transparent{border-color:#0000}.border-yellow-300{border-color:var(--color-yellow-300)}.border-yellow-400{border-color:var(--color-yellow-400)}.border-yellow-500{border-color:var(--color-yellow-500)}.border-yellow-500\/30{border-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/30{border-color:color-mix(in oklab,var(--color-yellow-500) 30%,transparent)}}.border-yellow-500\/40{border-color:#edb20066}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/40{border-color:color-mix(in oklab,var(--color-yellow-500) 40%,transparent)}}.border-t-primary{border-top-color:var(--primary)}.border-l-blue-500{border-left-color:var(--color-blue-500)}.border-l-border{border-left-color:var(--border)}.border-l-current\/25{border-left-color:currentColor}@supports (color:color-mix(in lab,red,red)){.border-l-current\/25{border-left-color:color-mix(in oklab,currentcolor 25%,transparent)}}.border-l-green-500{border-left-color:var(--color-green-500)}.border-l-red-500{border-left-color:var(--color-red-500)}.border-l-yellow-500{border-left-color:var(--color-yellow-500)}.bg-\[\#000000\],.bg-\[rgb\(0\,0\,0\)\]{background-color:#000}.bg-accent,.bg-accent\/60{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\/60{background-color:color-mix(in oklab,var(--accent) 60%,transparent)}}.bg-accent\/70{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\/70{background-color:color-mix(in oklab,var(--accent) 70%,transparent)}}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\/85{background-color:#fffbebd9}@supports (color:color-mix(in lab,red,red)){.bg-amber-50\/85{background-color:color-mix(in oklab,var(--color-amber-50) 85%,transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\/70{background-color:#fef3c6b3}@supports (color:color-mix(in lab,red,red)){.bg-amber-100\/70{background-color:color-mix(in oklab,var(--color-amber-100) 70%,transparent)}}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-400\/15{background-color:#fcbb0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/15{background-color:color-mix(in oklab,var(--color-amber-400) 15%,transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/\[0\.03\]{background-color:#f99c0008}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/\[0\.03\]{background-color:color-mix(in oklab,var(--color-amber-500) 3%,transparent)}}.bg-background,.bg-background\/80{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/80{background-color:color-mix(in oklab,var(--background) 80%,transparent)}}.bg-background\/90{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/90{background-color:color-mix(in oklab,var(--background) 90%,transparent)}}.bg-background\/95{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/95{background-color:color-mix(in oklab,var(--background) 95%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-current{background-color:currentColor}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-destructive,.bg-destructive\/5{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/5{background-color:color-mix(in oklab,var(--destructive) 5%,transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/10{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.bg-emerald-50\/80{background-color:#ecfdf5cc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/80{background-color:color-mix(in oklab,var(--color-emerald-50) 80%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/12{background-color:#00bb7f1f}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/12{background-color:color-mix(in oklab,var(--color-emerald-500) 12%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-foreground{background-color:var(--foreground)}.bg-fuchsia-100{background-color:var(--color-fuchsia-100)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/5{background-color:#00c7580d}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/5{background-color:color-mix(in oklab,var(--color-green-500) 5%,transparent)}}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500) 10%,transparent)}}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500) 20%,transparent)}}.bg-green-500\/80{background-color:#00c758cc}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/80{background-color:color-mix(in oklab,var(--color-green-500) 80%,transparent)}}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-input{background-color:var(--input)}.bg-lime-100{background-color:var(--color-lime-100)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\/30{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/30{background-color:color-mix(in oklab,var(--muted-foreground) 30%,transparent)}}.bg-muted-foreground\/40{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/40{background-color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.bg-muted\/20{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,var(--muted) 20%,transparent)}}.bg-muted\/25{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/25{background-color:color-mix(in oklab,var(--muted) 25%,transparent)}}.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/30{background-color:color-mix(in oklab,var(--muted) 30%,transparent)}}.bg-muted\/35{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/35{background-color:color-mix(in oklab,var(--muted) 35%,transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,var(--muted) 40%,transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-muted\/60{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/60{background-color:color-mix(in oklab,var(--muted) 60%,transparent)}}.bg-muted\/70{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/70{background-color:color-mix(in oklab,var(--muted) 70%,transparent)}}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500\/5{background-color:#fe6e000d}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/5{background-color:color-mix(in oklab,var(--color-orange-500) 5%,transparent)}}.bg-pink-100{background-color:var(--color-pink-100)}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/5{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,var(--primary) 5%,transparent)}}.bg-primary\/10{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,var(--primary) 10%,transparent)}}.bg-primary\/15{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,var(--primary) 15%,transparent)}}.bg-primary\/60{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/60{background-color:color-mix(in oklab,var(--primary) 60%,transparent)}}.bg-primary\/70{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/70{background-color:color-mix(in oklab,var(--primary) 70%,transparent)}}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/50{background-color:#fef2f280}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/50{background-color:color-mix(in oklab,var(--color-red-50) 50%,transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-50\/85{background-color:#fff1f2d9}@supports (color:color-mix(in lab,red,red)){.bg-rose-50\/85{background-color:color-mix(in oklab,var(--color-rose-50) 85%,transparent)}}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.bg-rose-500\/12{background-color:#ff23571f}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/12{background-color:color-mix(in oklab,var(--color-rose-500) 12%,transparent)}}.bg-secondary,.bg-secondary\/50{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/50{background-color:color-mix(in oklab,var(--secondary) 50%,transparent)}}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-accent{background-color:var(--sidebar-accent)}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-sky-500\/5{background-color:#00a5ef0d}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/5{background-color:color-mix(in oklab,var(--color-sky-500) 5%,transparent)}}.bg-sky-500\/10{background-color:#00a5ef1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-sky-500) 10%,transparent)}}.bg-sky-500\/12{background-color:#00a5ef1f}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/12{background-color:color-mix(in oklab,var(--color-sky-500) 12%,transparent)}}.bg-sky-600{background-color:var(--color-sky-600)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-teal-100{background-color:var(--color-teal-100)}.bg-transparent{background-color:#0000}.bg-violet-50{background-color:var(--color-violet-50)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-500\/5{background-color:#edb2000d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/5{background-color:color-mix(in oklab,var(--color-yellow-500) 5%,transparent)}}.bg-yellow-500\/10{background-color:#edb2001a}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/10{background-color:color-mix(in oklab,var(--color-yellow-500) 10%,transparent)}}.bg-gradient-to-l{--tw-gradient-position:to left in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-border\/30{--tw-gradient-from:var(--border)}@supports (color:color-mix(in lab,red,red)){.from-border\/30{--tw-gradient-from:color-mix(in oklab, var(--border) 30%, transparent)}}.from-border\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-sky-400{fill:var(--color-sky-400)}.stroke-amber-600{stroke:var(--color-amber-600)}.object-cover{object-fit:cover}.\!p-0{padding:0!important}.\!p-1{padding:var(--spacing)!important}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-density-1{padding:var(--spacing-density-1)}.p-density-2{padding:var(--spacing-density-2)}.p-density-3{padding:var(--spacing-density-3)}.p-density-4{padding:var(--spacing-density-4)}.p-density-6{padding:var(--spacing-density-6)}.p-density-8{padding:var(--spacing-density-8)}.px-0{padding-inline:0}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-control-px{padding-inline:var(--spacing-control-px)}.px-density-2{padding-inline:var(--spacing-density-2)}.px-density-3{padding-inline:var(--spacing-density-3)}.px-density-4{padding-inline:var(--spacing-density-4)}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-density-1{padding-block:var(--spacing-density-1)}.py-density-2{padding-block:var(--spacing-density-2)}.py-density-3{padding-block:var(--spacing-density-3)}.py-density-4{padding-block:var(--spacing-density-4)}.py-px{padding-block:1px}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-density-2{padding-top:var(--spacing-density-2)}.pt-px{padding-top:1px}.pr-0\.5{padding-right:calc(var(--spacing) * .5)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-5{padding-right:calc(var(--spacing) * 5)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-12{padding-right:calc(var(--spacing) * 12)}.pr-14{padding-right:calc(var(--spacing) * 14)}.pr-\[5\.5rem\]{padding-right:5.5rem}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-density-3{padding-bottom:var(--spacing-density-3)}.pb-density-4{padding-bottom:var(--spacing-density-4)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-density-3{padding-left:var(--spacing-density-3)}.text-center{text-align:center}.text-end{text-align:end}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-\[-0\.125em\]{vertical-align:-.125em}.align-baseline{vertical-align:baseline}.align-bottom{vertical-align:bottom}.align-middle{vertical-align:middle}.align-super{vertical-align:super}.align-top{vertical-align:top}.font-mono{font-family:var(--fs-font-mono)}.font-sans{font-family:var(--fs-font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.6rem\]{font-size:.6rem}.text-\[0\.9em\]{font-size:.9em}.text-\[0\.65em\]{font-size:.65em}.text-\[0\.65rem\]{font-size:.65rem}.text-\[0\.75em\]{font-size:.75em}.text-\[0\.85em\]{font-size:.85em}.text-\[1em\]{font-size:1em}.text-\[9\.5px\]{font-size:9.5px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.05em\]{--tw-tracking:-.05em;letter-spacing:-.05em}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.03em\]{--tw-tracking:.03em;letter-spacing:.03em}.tracking-\[0\.12em\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-\[0\.14em\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\[0\.18em\]{--tw-tracking:.18em;letter-spacing:.18em}.tracking-\[0\.24em\]{--tw-tracking:.24em;letter-spacing:.24em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#111\]{color:#111}.text-\[\#fff\]{color:#fff}.text-\[hsl\(0\,0\%\,0\%\)\]{color:#000}.text-accent-foreground{color:var(--accent-foreground)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-background{color:var(--background)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-border{color:var(--border)}.text-card-foreground{color:var(--card-foreground)}.text-cyan-600{color:var(--color-cyan-600)}.text-cyan-700{color:var(--color-cyan-700)}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-destructive\/90{color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.text-destructive\/90{color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-950\/80{color:#002c22cc}@supports (color:color-mix(in lab,red,red)){.text-emerald-950\/80{color:color-mix(in oklab,var(--color-emerald-950) 80%,transparent)}}.text-foreground,.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,var(--foreground) 80%,transparent)}}.text-fuchsia-700{color:var(--color-fuchsia-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-700{color:var(--color-indigo-700)}.text-inherit{color:inherit}.text-lime-800{color:var(--color-lime-800)}.text-muted{color:var(--muted)}.text-muted-foreground,.text-muted-foreground\/20{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/20{color:color-mix(in oklab,var(--muted-foreground) 20%,transparent)}}.text-muted-foreground\/45{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/45{color:color-mix(in oklab,var(--muted-foreground) 45%,transparent)}}.text-muted-foreground\/60{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted-foreground) 60%,transparent)}}.text-muted-foreground\/70{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted-foreground) 70%,transparent)}}.text-muted-foreground\/80{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,var(--muted-foreground) 80%,transparent)}}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-pink-700{color:var(--color-pink-700)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/55{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/55{color:color-mix(in oklab,var(--sidebar-foreground) 55%,transparent)}}.text-sidebar-foreground\/60{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/60{color:color-mix(in oklab,var(--sidebar-foreground) 60%,transparent)}}.text-sidebar-foreground\/70{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/70{color:color-mix(in oklab,var(--sidebar-foreground) 70%,transparent)}}.text-sidebar-primary{color:var(--sidebar-primary)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-sky-950\/80{color:#052f4acc}@supports (color:color-mix(in lab,red,red)){.text-sky-950\/80{color:color-mix(in oklab,var(--color-sky-950) 80%,transparent)}}.text-slate-200{color:var(--color-slate-200)}.text-slate-700{color:var(--color-slate-700)}.text-teal-700{color:var(--color-teal-700)}.text-violet-600{color:var(--color-violet-600)}.text-violet-700{color:var(--color-violet-700)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.text-yellow-950{color:var(--color-yellow-950)}.text-yellow-950\/80{color:#432004cc}@supports (color:color-mix(in lab,red,red)){.text-yellow-950\/80{color:color-mix(in oklab,var(--color-yellow-950) 80%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.accent-primary{accent-color:var(--primary)}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-85{opacity:.85}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_1px_0_0_var\(--tw-shadow-color\)\]{--tw-shadow:0 1px 0 0 var(--tw-shadow-color,var(--tw-shadow-color));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-border{--tw-shadow-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.shadow-border{--tw-shadow-color:color-mix(in oklab, var(--border) var(--tw-shadow-alpha), transparent)}}.ring-amber-200\/80{--tw-ring-color:#fee685cc}@supports (color:color-mix(in lab,red,red)){.ring-amber-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-amber-200) 80%, transparent)}}.ring-border{--tw-ring-color:var(--border)}.ring-emerald-200\/80{--tw-ring-color:#a4f4cfcc}@supports (color:color-mix(in lab,red,red)){.ring-emerald-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-emerald-200) 80%, transparent)}}.ring-primary,.ring-primary\/25{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.ring-primary\/25{--tw-ring-color:color-mix(in oklab, var(--primary) 25%, transparent)}}.ring-ring{--tw-ring-color:var(--ring)}.ring-rose-200\/80{--tw-ring-color:#ffccd3cc}@supports (color:color-mix(in lab,red,red)){.ring-rose-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-rose-200) 80%, transparent)}}.ring-sky-200\/80{--tw-ring-color:#b8e6fecc}@supports (color:color-mix(in lab,red,red)){.ring-sky-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-sky-200) 80%, transparent)}}.ring-slate-200\/80{--tw-ring-color:#e2e8f0cc}@supports (color:color-mix(in lab,red,red)){.ring-slate-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-slate-200) 80%, transparent)}}.ring-violet-200\/80{--tw-ring-color:#ddd6ffcc}@supports (color:color-mix(in lab,red,red)){.ring-violet-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-violet-200) 80%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,box-shadow\]{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[height\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[stroke-dashoffset\]{transition-property:stroke-dashoffset;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[-webkit-box-orient\:vertical\]{-webkit-box-orient:vertical}.\[-webkit-line-clamp\:3\]{-webkit-line-clamp:3}.ring-inset{--tw-ring-inset:inset}.group-open\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}@media(hover:hover){.group-hover\:text-foreground:is(:where(.group):hover *){color:var(--foreground)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\/comment\:opacity-70:is(:where(.group\/comment):hover *){opacity:.7}.group-hover\/header\:bg-primary\/70:is(:where(.group\/header):hover *){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.group-hover\/header\:bg-primary\/70:is(:where(.group\/header):hover *){background-color:color-mix(in oklab,var(--primary) 70%,transparent)}}.group-hover\/thread\:opacity-100:is(:where(.group\/thread):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder,.placeholder\:text-muted-foreground\/60::placeholder{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/60::placeholder{color:color-mix(in oklab,var(--muted-foreground) 60%,transparent)}}.first\:mt-1:first-child{margin-top:var(--spacing)}.first\:mt-2:first-child{margin-top:calc(var(--spacing) * 2)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first\:pt-0:first-child{padding-top:0}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\:pb-0:last-child{padding-bottom:0}.focus-within\:border-primary\/40:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.focus-within\:border-primary\/40:focus-within{border-color:color-mix(in oklab,var(--primary) 40%,transparent)}}.focus-within\:shadow-md:focus-within{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-ring:focus-within{--tw-ring-color:var(--ring)}@media(hover:hover){.hover\:z-\[999\]:hover{z-index:999}.hover\:border-\[\#abc\]:hover{border-color:#abc}.hover\:border-border:hover{border-color:var(--border)}.hover\:border-emerald-200:hover{border-color:var(--color-emerald-200)}.hover\:border-foreground\/20:hover{border-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.hover\:border-foreground\/20:hover{border-color:color-mix(in oklab,var(--foreground) 20%,transparent)}}.hover\:border-muted-foreground\/40:hover{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.hover\:border-muted-foreground\/40:hover{border-color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.hover\:border-primary:hover,.hover\:border-primary\/30:hover{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,var(--primary) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,var(--primary) 40%,transparent)}}.hover\:border-primary\/50:hover{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,var(--primary) 50%,transparent)}}.hover\:bg-accent:hover,.hover\:bg-accent\/40:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/40:hover{background-color:color-mix(in oklab,var(--accent) 40%,transparent)}}.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.hover\:bg-background:hover,.hover\:bg-background\/60:hover{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,var(--background) 60%,transparent)}}.hover\:bg-background\/70:hover{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/70:hover{background-color:color-mix(in oklab,var(--background) 70%,transparent)}}.hover\:bg-card:hover{background-color:var(--card)}.hover\:bg-destructive\/10:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-emerald-50\/50:hover{background-color:#ecfdf580}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-50\/50:hover{background-color:color-mix(in oklab,var(--color-emerald-50) 50%,transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/40:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/40:hover{background-color:color-mix(in oklab,var(--muted) 40%,transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.hover\:bg-muted\/60:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/60:hover{background-color:color-mix(in oklab,var(--muted) 60%,transparent)}}.hover\:bg-muted\/70:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/70:hover{background-color:color-mix(in oklab,var(--muted) 70%,transparent)}}.hover\:bg-primary:hover,.hover\:bg-primary\/10:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,var(--primary) 10%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:from-primary\/20:hover{--tw-gradient-from:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:from-primary\/20:hover{--tw-gradient-from:color-mix(in oklab, var(--primary) 20%, transparent)}}.hover\:from-primary\/20:hover{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-destructive:hover{color:var(--destructive)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:border-primary:focus,.focus\:border-primary\/40:focus{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.focus\:border-primary\/40:focus{border-color:color-mix(in oklab,var(--primary) 40%,transparent)}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:bg-background:focus{background-color:var(--background)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:text-foreground:focus{color:var(--foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:relative:focus-visible{position:relative}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:bg-accent\/50:focus-visible{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:bg-accent\/50:focus-visible{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-destructive:focus-visible{--tw-ring-color:var(--destructive)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-muted:disabled,.disabled\:bg-muted\/40:disabled{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.disabled\:bg-muted\/40:disabled{background-color:color-mix(in oklab,var(--muted) 40%,transparent)}}.disabled\:text-muted-foreground:disabled,.disabled\:text-muted-foreground\/40:disabled{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.disabled\:text-muted-foreground\/40:disabled{color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-35:disabled{opacity:.35}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media(hover:hover){.disabled\:hover\:bg-transparent:disabled:hover{background-color:#0000}.disabled\:hover\:text-muted-foreground:disabled:hover{color:var(--muted-foreground)}}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-\[backdrop-filter\]\:bg-background\/80{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.supports-\[backdrop-filter\]\:bg-background\/80{background-color:color-mix(in oklab,var(--background) 80%,transparent)}}}@media(min-width:40rem){.sm\:w-48{width:calc(var(--spacing) * 48)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[8rem_minmax\(0\,1fr\)_auto\]{grid-template-columns:8rem minmax(0,1fr) auto}.sm\:grid-cols-\[minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) auto auto}.sm\:grid-cols-\[minmax\(8rem\,14rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(8rem,14rem) minmax(0,1fr)}.sm\:grid-cols-\[minmax\(10rem\,16rem\)\]{grid-template-columns:minmax(10rem,16rem)}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:p-density-4{padding:var(--spacing-density-4)}}@media(min-width:48rem){.md\:z-\[var\(--x\)\]{z-index:var(--x)}.md\:col-span-1{grid-column:span 1/span 1}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-12{height:calc(var(--spacing) * 12)}.md\:max-w-\[24rem\]{max-width:24rem}.md\:min-w-\[14rem\]{min-width:14rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[1fr_auto_1fr\]{grid-template-columns:1fr auto 1fr}.md\:grid-cols-\[minmax\(0\,1fr\)_9rem_6rem\]{grid-template-columns:minmax(0,1fr) 9rem 6rem}.md\:grid-cols-\[minmax\(7rem\,10rem\)_auto_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(7rem,10rem) auto minmax(0,1fr) auto}.md\:grid-cols-\[minmax\(8rem\,10rem\)_minmax\(8rem\,10rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(8rem,10rem) minmax(8rem,10rem) minmax(0,1fr)}.md\:grid-cols-\[minmax\(8rem\,12rem\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(8rem,12rem) minmax(0,1fr) auto}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:items-start{align-items:flex-start}.md\:justify-between{justify-content:space-between}.md\:gap-density-3{gap:var(--spacing-density-3)}.md\:p-2{padding:calc(var(--spacing) * 2)}.md\:p-density-6{padding:var(--spacing-density-6)}.md\:px-density-4{padding-inline:var(--spacing-density-4)}.md\:px-density-6{padding-inline:var(--spacing-density-6)}}@media(min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[1\.2fr_0\.8fr\]{grid-template-columns:1.2fr .8fr}.lg\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}@media(min-width:80rem){.xl\:sticky{position:sticky}.xl\:top-0{top:0}.xl\:max-h-screen{max-height:100vh}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\,1fr\)_minmax\(18rem\,24rem\)\]{grid-template-columns:minmax(0,1fr) minmax(18rem,24rem)}.xl\:grid-cols-\[minmax\(0\,1fr\)_minmax\(20rem\,26rem\)\]{grid-template-columns:minmax(0,1fr) minmax(20rem,26rem)}.xl\:self-start{align-self:flex-start}.xl\:overflow-auto{overflow:auto}}@media(prefers-color-scheme:dark){.dark\:border-amber-400{border-color:var(--color-amber-400)}.dark\:border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.dark\:border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.dark\:border-emerald-500{border-color:var(--color-emerald-500)}.dark\:border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.dark\:border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.dark\:border-red-500{border-color:var(--color-red-500)}.dark\:border-red-800{border-color:var(--color-red-800)}.dark\:border-red-900{border-color:var(--color-red-900)}.dark\:border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-500\/30{border-color:color-mix(in oklab,var(--color-rose-500) 30%,transparent)}}.dark\:border-rose-500\/40{border-color:#ff235766}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-500\/40{border-color:color-mix(in oklab,var(--color-rose-500) 40%,transparent)}}.dark\:border-sky-500{border-color:var(--color-sky-500)}.dark\:border-sky-500\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab,red,red)){.dark\:border-sky-500\/30{border-color:color-mix(in oklab,var(--color-sky-500) 30%,transparent)}}.dark\:border-sky-500\/40{border-color:#00a5ef66}@supports (color:color-mix(in lab,red,red)){.dark\:border-sky-500\/40{border-color:color-mix(in oklab,var(--color-sky-500) 40%,transparent)}}.dark\:border-slate-300{border-color:var(--color-slate-300)}.dark\:border-yellow-700{border-color:var(--color-yellow-700)}.dark\:bg-amber-400{background-color:var(--color-amber-400)}.dark\:bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.dark\:bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.dark\:bg-amber-900{background-color:var(--color-amber-900)}.dark\:bg-amber-950\/50{background-color:#46190180}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-950\/50{background-color:color-mix(in oklab,var(--color-amber-950) 50%,transparent)}}.dark\:bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500) 10%,transparent)}}.dark\:bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.dark\:bg-emerald-500{background-color:var(--color-emerald-500)}.dark\:bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.dark\:bg-emerald-900{background-color:var(--color-emerald-900)}.dark\:bg-emerald-950\/50{background-color:#002c2280}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-950\/50{background-color:color-mix(in oklab,var(--color-emerald-950) 50%,transparent)}}.dark\:bg-gray-500\/20{background-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.dark\:bg-gray-500\/20{background-color:color-mix(in oklab,var(--color-gray-500) 20%,transparent)}}.dark\:bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500) 20%,transparent)}}.dark\:bg-indigo-950\/50{background-color:#1e1a4d80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-indigo-950\/50{background-color:color-mix(in oklab,var(--color-indigo-950) 50%,transparent)}}.dark\:bg-red-500{background-color:var(--color-red-500)}.dark\:bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.dark\:bg-red-900{background-color:var(--color-red-900)}.dark\:bg-red-950{background-color:var(--color-red-950)}.dark\:bg-red-950\/30{background-color:#4608094d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-950\/30{background-color:color-mix(in oklab,var(--color-red-950) 30%,transparent)}}.dark\:bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-500\/15{background-color:color-mix(in oklab,var(--color-rose-500) 15%,transparent)}}.dark\:bg-rose-950\/30{background-color:#4d02184d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-950\/30{background-color:color-mix(in oklab,var(--color-rose-950) 30%,transparent)}}.dark\:bg-rose-950\/50{background-color:#4d021880}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-950\/50{background-color:color-mix(in oklab,var(--color-rose-950) 50%,transparent)}}.dark\:bg-sky-500{background-color:var(--color-sky-500)}.dark\:bg-sky-500\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-500\/15{background-color:color-mix(in oklab,var(--color-sky-500) 15%,transparent)}}.dark\:bg-sky-900{background-color:var(--color-sky-900)}.dark\:bg-sky-950\/50{background-color:#052f4a80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-950\/50{background-color:color-mix(in oklab,var(--color-sky-950) 50%,transparent)}}.dark\:bg-slate-300{background-color:var(--color-slate-300)}.dark\:bg-violet-500\/20{background-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-violet-500\/20{background-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.dark\:bg-violet-950\/50{background-color:#2f0d6880}@supports (color:color-mix(in lab,red,red)){.dark\:bg-violet-950\/50{background-color:color-mix(in oklab,var(--color-violet-950) 50%,transparent)}}.dark\:bg-yellow-500\/20{background-color:#edb20033}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-500\/20{background-color:color-mix(in oklab,var(--color-yellow-500) 20%,transparent)}}.dark\:bg-yellow-950{background-color:var(--color-yellow-950)}.dark\:text-amber-200{color:var(--color-amber-200)}.dark\:text-amber-300{color:var(--color-amber-300)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-amber-500{color:var(--color-amber-500)}.dark\:text-amber-950{color:var(--color-amber-950)}.dark\:text-blue-300{color:var(--color-blue-300)}.dark\:text-blue-400{color:var(--color-blue-400)}.dark\:text-emerald-100\/80{color:#d0fae5cc}@supports (color:color-mix(in lab,red,red)){.dark\:text-emerald-100\/80{color:color-mix(in oklab,var(--color-emerald-100) 80%,transparent)}}.dark\:text-emerald-200{color:var(--color-emerald-200)}.dark\:text-emerald-300{color:var(--color-emerald-300)}.dark\:text-emerald-400{color:var(--color-emerald-400)}.dark\:text-emerald-950{color:var(--color-emerald-950)}.dark\:text-green-300{color:var(--color-green-300)}.dark\:text-green-400{color:var(--color-green-400)}.dark\:text-indigo-200{color:var(--color-indigo-200)}.dark\:text-orange-300{color:var(--color-orange-300)}.dark\:text-purple-400{color:var(--color-purple-400)}.dark\:text-red-200{color:var(--color-red-200)}.dark\:text-red-300{color:var(--color-red-300)}.dark\:text-red-400{color:var(--color-red-400)}.dark\:text-red-950{color:var(--color-red-950)}.dark\:text-rose-200{color:var(--color-rose-200)}.dark\:text-rose-300{color:var(--color-rose-300)}.dark\:text-rose-400{color:var(--color-rose-400)}.dark\:text-sky-100\/80{color:#dff2fecc}@supports (color:color-mix(in lab,red,red)){.dark\:text-sky-100\/80{color:color-mix(in oklab,var(--color-sky-100) 80%,transparent)}}.dark\:text-sky-200{color:var(--color-sky-200)}.dark\:text-sky-300{color:var(--color-sky-300)}.dark\:text-sky-400{color:var(--color-sky-400)}.dark\:text-sky-950{color:var(--color-sky-950)}.dark\:text-slate-300{color:var(--color-slate-300)}.dark\:text-slate-950{color:var(--color-slate-950)}.dark\:text-violet-200{color:var(--color-violet-200)}.dark\:text-violet-300{color:var(--color-violet-300)}.dark\:text-violet-400{color:var(--color-violet-400)}.dark\:text-yellow-100\/80{color:#fef9c2cc}@supports (color:color-mix(in lab,red,red)){.dark\:text-yellow-100\/80{color:color-mix(in oklab,var(--color-yellow-100) 80%,transparent)}}.dark\:text-yellow-200{color:var(--color-yellow-200)}.dark\:text-yellow-300{color:var(--color-yellow-300)}.dark\:text-yellow-400{color:var(--color-yellow-400)}.dark\:text-yellow-500{color:var(--color-yellow-500)}.dark\:ring-amber-500\/30{--tw-ring-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-amber-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.dark\:ring-emerald-500\/30{--tw-ring-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-emerald-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.dark\:ring-rose-500\/30{--tw-ring-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-rose-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-rose-500) 30%, transparent)}}.dark\:ring-sky-500\/30{--tw-ring-color:#00a5ef4d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-sky-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.dark\:ring-slate-500\/30{--tw-ring-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-slate-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-slate-500) 30%, transparent)}}.dark\:ring-violet-500\/30{--tw-ring-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-violet-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-violet-500) 30%, transparent)}}@media(hover:hover){.dark\:hover\:border-emerald-500\/40:hover{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:border-emerald-500\/40:hover{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.dark\:hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}}}.\[\&_\.chroma\]\:bg-transparent .chroma{background-color:#0000}.\[\&_\.chroma_\.c\]\:text-slate-500 .chroma .c{color:var(--color-slate-500)}.\[\&_\.chroma_\.c\]\:italic .chroma .c{font-style:italic}.\[\&_\.chroma_\.cp\]\:text-slate-500 .chroma .cp{color:var(--color-slate-500)}.\[\&_\.chroma_\.cp\]\:italic .chroma .cp{font-style:italic}.\[\&_\.chroma_\.na\]\:text-amber-700 .chroma .na{color:var(--color-amber-700)}@media(prefers-color-scheme:dark){.\[\&_\.chroma_\.na\]\:dark\:text-amber-300 .chroma .na{color:var(--color-amber-300)}}.\[\&_\.chroma_\.nt\]\:font-semibold .chroma .nt{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.chroma_\.nt\]\:text-pink-700 .chroma .nt{color:var(--color-pink-700)}@media(prefers-color-scheme:dark){.\[\&_\.chroma_\.nt\]\:dark\:text-pink-300 .chroma .nt{color:var(--color-pink-300)}}.\[\&_\.chroma_\.s\]\:text-emerald-700 .chroma .s{color:var(--color-emerald-700)}@media(prefers-color-scheme:dark){.\[\&_\.chroma_\.s\]\:dark\:text-emerald-300 .chroma .s{color:var(--color-emerald-300)}}.\[\&_pre\]\:m-0 pre{margin:0}.\[\&_pre\]\:bg-transparent pre{background-color:#0000}.\[\&_pre\]\:leading-relaxed pre{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_pre\]\:whitespace-pre-wrap pre{white-space:pre-wrap}.\[\&_pre\.shiki\]\:\!bg-transparent pre.shiki{background-color:#0000!important}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&\:\:-moz-range-thumb\]\:pointer-events-auto::-moz-range-thumb{pointer-events:auto}.\[\&\:\:-moz-range-thumb\]\:size-3\.5::-moz-range-thumb{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\:\:-moz-range-thumb\]\:appearance-none::-moz-range-thumb{appearance:none}.\[\&\:\:-moz-range-thumb\]\:rounded-full::-moz-range-thumb{border-radius:3.40282e38px}.\[\&\:\:-moz-range-thumb\]\:border::-moz-range-thumb{border-style:var(--tw-border-style);border-width:1px}.\[\&\:\:-moz-range-thumb\]\:border-0::-moz-range-thumb{border-style:var(--tw-border-style);border-width:0}.\[\&\:\:-moz-range-thumb\]\:border-background\/80::-moz-range-thumb{border-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.\[\&\:\:-moz-range-thumb\]\:border-background\/80::-moz-range-thumb{border-color:color-mix(in oklab,var(--background) 80%,transparent)}}.\[\&\:\:-moz-range-thumb\]\:bg-muted-foreground::-moz-range-thumb{background-color:var(--muted-foreground)}.\[\&\:\:-moz-range-thumb\]\:bg-primary::-moz-range-thumb{background-color:var(--primary)}.\[\&\:\:-moz-range-thumb\]\:shadow-sm::-moz-range-thumb{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:\:-moz-range-track\]\:h-1::-moz-range-track{height:var(--spacing)}.\[\&\:\:-moz-range-track\]\:rounded-full::-moz-range-track{border-radius:3.40282e38px}.\[\&\:\:-moz-range-track\]\:bg-transparent::-moz-range-track{background-color:#0000}.\[\&\:\:-webkit-calendar-picker-indicator\]\:hidden::-webkit-calendar-picker-indicator{display:none}.\[\&\:\:-webkit-calendar-picker-indicator\]\:appearance-none::-webkit-calendar-picker-indicator{appearance:none}.\[\&\:\:-webkit-search-cancel-button\]\:appearance-none::-webkit-search-cancel-button{appearance:none}.\[\&\:\:-webkit-slider-runnable-track\]\:h-1::-webkit-slider-runnable-track{height:var(--spacing)}.\[\&\:\:-webkit-slider-runnable-track\]\:rounded-full::-webkit-slider-runnable-track{border-radius:3.40282e38px}.\[\&\:\:-webkit-slider-runnable-track\]\:bg-transparent::-webkit-slider-runnable-track{background-color:#0000}.\[\&\:\:-webkit-slider-thumb\]\:pointer-events-auto::-webkit-slider-thumb{pointer-events:auto}.\[\&\:\:-webkit-slider-thumb\]\:-mt-\[5px\]::-webkit-slider-thumb{margin-top:-5px}.\[\&\:\:-webkit-slider-thumb\]\:mt-\[-5px\]::-webkit-slider-thumb{margin-top:-5px}.\[\&\:\:-webkit-slider-thumb\]\:size-3\.5::-webkit-slider-thumb{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\:\:-webkit-slider-thumb\]\:appearance-none::-webkit-slider-thumb{appearance:none}.\[\&\:\:-webkit-slider-thumb\]\:rounded-full::-webkit-slider-thumb{border-radius:3.40282e38px}.\[\&\:\:-webkit-slider-thumb\]\:border::-webkit-slider-thumb{border-style:var(--tw-border-style);border-width:1px}.\[\&\:\:-webkit-slider-thumb\]\:border-background\/80::-webkit-slider-thumb{border-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.\[\&\:\:-webkit-slider-thumb\]\:border-background\/80::-webkit-slider-thumb{border-color:color-mix(in oklab,var(--background) 80%,transparent)}}.\[\&\:\:-webkit-slider-thumb\]\:bg-muted-foreground::-webkit-slider-thumb{background-color:var(--muted-foreground)}.\[\&\:\:-webkit-slider-thumb\]\:bg-primary::-webkit-slider-thumb{background-color:var(--primary)}.\[\&\:\:-webkit-slider-thumb\]\:shadow-sm::-webkit-slider-thumb{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:not\(\:first-child\)\]\:ml-2:not(:first-child){margin-left:calc(var(--spacing) * 2)}.\[\&\>\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&\>\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&\>svg\]\:h-4>svg{height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:w-4>svg{width:calc(var(--spacing) * 4)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:border-rose-500\/30{border-color:color-mix(in oklab,var(--color-rose-500) 30%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-amber-950\/40{background-color:#46190166}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-amber-950\/40{background-color:color-mix(in oklab,var(--color-amber-950) 40%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-fuchsia-500\/15{background-color:#e12afb26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-fuchsia-500\/15{background-color:color-mix(in oklab,var(--color-fuchsia-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-rose-500\/15{background-color:color-mix(in oklab,var(--color-rose-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-sky-500\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-sky-500\/15{background-color:color-mix(in oklab,var(--color-sky-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-amber-200{color:var(--color-amber-200)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-amber-300{color:var(--color-amber-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-emerald-300{color:var(--color-emerald-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-emerald-400{color:var(--color-emerald-400)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-fuchsia-300{color:var(--color-fuchsia-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-indigo-300{color:var(--color-indigo-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-pink-300{color:var(--color-pink-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-rose-300{color:var(--color-rose-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-rose-400{color:var(--color-rose-400)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-sky-300{color:var(--color-sky-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-violet-300{color:var(--color-violet-300)}}:root,[data-theme=light]{--fs-primary-blue:#3578e5;--fs-cta-blue:#0053f8;--fs-dark-navy:#131f3b;--fs-sky-500:#0ea5e9;--fs-indigo-500:#6366f1;--fs-gray-50:#f9fafb;--fs-gray-100:#f3f4f6;--fs-gray-200:#e5e7eb;--fs-gray-300:#d1d5db;--fs-gray-400:#9ca3af;--fs-gray-500:#6b7280;--fs-gray-600:#4b5563;--fs-gray-700:#374151;--fs-gray-800:#1f2937;--fs-gray-900:#111827;--fs-gray-950:#030712;--fs-success-50:#ecfdf5;--fs-success-100:#d1fae5;--fs-success-200:#a7f3d0;--fs-success-500:#10b981;--fs-success-600:#059669;--fs-success-700:#047857;--fs-success:var(--fs-success-600);--fs-error-50:#fff1f2;--fs-error-100:#ffe4e6;--fs-error-200:#fecdd3;--fs-error-500:#f43f5e;--fs-error-600:#e11d48;--fs-error-700:#be123c;--fs-error:var(--fs-error-600);--fs-warning-50:#fffbeb;--fs-warning-100:#fef3c7;--fs-warning-200:#fde68a;--fs-warning-500:#f59e0b;--fs-warning-600:#d97706;--fs-warning-700:#b45309;--fs-warning:var(--fs-warning-600);--fs-info-50:#f0f9ff;--fs-info-100:#e0f2fe;--fs-info-200:#bae6fd;--fs-info-500:#0ea5e9;--fs-info-600:#0284c7;--fs-info-700:#0369a1;--fs-info:var(--fs-info-600);--fs-hint-50:#f0fdfa;--fs-hint-100:#ccfbf1;--fs-hint-200:#99f6e4;--fs-hint-500:#14b8a6;--fs-hint-600:#0d9488;--fs-hint-700:#0f766e;--fs-hint:var(--fs-hint-600);--fs-prereq-50:#f5f3ff;--fs-prereq-100:#ede9fe;--fs-prereq-200:#ddd6fe;--fs-prereq-500:#8b5cf6;--fs-prereq-600:#7c3aed;--fs-prereq-700:#6d28d9;--fs-prereq:var(--fs-prereq-600);--fs-fg-1:#061431;--fs-fg-2:#030712;--fs-fg-3:#374151;--fs-fg-muted:#666;--fs-fg-subtle:#9ca3af;--fs-fg-on-brand:#fff;--fs-fg-link:var(--fs-primary-blue);--fs-bg-canvas:#fff;--fs-bg-subtle:#f9fafb;--fs-bg-muted:#f3f4f6;--fs-bg-inset:#e5e7eb;--fs-bg-inverse:var(--fs-dark-navy);--fs-bg-brand:var(--fs-primary-blue);--fs-bg-cta:var(--fs-cta-blue);--fs-border-subtle:#e5e7eb;--fs-border-default:#d1d5db;--fs-border-strong:#9ca3af;--fs-border-focus:var(--fs-primary-blue);--fs-font-sans:"Open Sans", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;--fs-font-serif:"Merriweather", Georgia, serif;--fs-font-mono:"Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;--fs-text-xs:.8125rem;--fs-text-sm:.875rem;--fs-text-base:1rem;--fs-text-md:1rem;--fs-text-lg:1.25rem;--fs-text-xl:1.5rem;--fs-text-2xl:2rem;--fs-text-3xl:2.5rem;--fs-text-4xl:3.5rem;--fs-weight-regular:400;--fs-weight-medium:500;--fs-weight-semibold:600;--fs-weight-bold:700;--fs-lh-body:1.75;--fs-lh-tight:1.5;--fs-lh-heading:1.2;--fs-tracking-body:.03rem;--fs-tracking-heading:normal;--fs-tracking-wide:.08rem;--fs-radius-xs:2px;--fs-radius-sm:4px;--fs-radius-md:6px;--fs-radius-lg:8px;--fs-radius-xl:12px;--fs-radius-2xl:16px;--fs-radius-full:9999px;--fs-shadow-xs:0 1px 2px 0 #0614310d;--fs-shadow-sm:0 1px 2px 0 #0614310f, 0 1px 3px 0 #0614311a;--fs-shadow-md:0 4px 6px -1px #06143114, 0 2px 4px -2px #0614310f;--fs-shadow-lg:0 10px 15px -3px #06143114, 0 4px 6px -4px #0614310d;--fs-shadow-xl:0 20px 25px -5px #0614311a, 0 8px 10px -6px #0614310f;--fs-shadow-focus:0 0 0 3px #3578e540;--fs-space-1:4px;--fs-space-2:8px;--fs-space-3:12px;--fs-space-4:16px;--fs-space-5:20px;--fs-space-6:24px;--fs-space-8:32px;--fs-space-10:40px;--fs-space-12:48px;--fs-space-16:64px;--fs-space-20:80px;--fs-space-24:96px;--fs-ease-out:cubic-bezier(.16, 1, .3, 1);--fs-ease-in-out:cubic-bezier(.65, 0, .35, 1);--fs-duration-fast:.12s;--fs-duration-base:.18s;--fs-duration-slow:.28s}[data-theme=dark]{--fs-fg-1:#f9fafb;--fs-fg-2:#fff;--fs-fg-3:#d1d5db;--fs-fg-muted:#9ca3af;--fs-fg-subtle:#6b7280;--fs-bg-canvas:#030712;--fs-bg-subtle:#111827;--fs-bg-muted:#1f2937;--fs-bg-inset:#374151;--fs-border-subtle:#1f2937;--fs-border-default:#374151;--fs-border-strong:#4b5563;--fs-success-50:#022c22;--fs-success-100:#064e3b;--fs-success-200:#065f46;--fs-success-500:#34d399;--fs-success-600:#6ee7b7;--fs-success-700:#a7f3d0;--fs-success:var(--fs-success-500);--fs-error-50:#4c0519;--fs-error-100:#881337;--fs-error-200:#9f1239;--fs-error-500:#fb7185;--fs-error-600:#fda4af;--fs-error-700:#fecdd3;--fs-error:var(--fs-error-500);--fs-warning-50:#451a03;--fs-warning-100:#78350f;--fs-warning-200:#92400e;--fs-warning-500:#fbbf24;--fs-warning-600:#fcd34d;--fs-warning-700:#fde68a;--fs-warning:var(--fs-warning-500);--fs-info-50:#082f49;--fs-info-100:#0c4a6e;--fs-info-200:#075985;--fs-info-500:#38bdf8;--fs-info-600:#7dd3fc;--fs-info-700:#bae6fd;--fs-info:var(--fs-info-500);--fs-hint-50:#042f2e;--fs-hint-100:#134e4a;--fs-hint-200:#115e59;--fs-hint-500:#2dd4bf;--fs-hint-600:#5eead4;--fs-hint-700:#99f6e4;--fs-hint:var(--fs-hint-500);--fs-prereq-50:#2e1065;--fs-prereq-100:#4c1d95;--fs-prereq-200:#5b21b6;--fs-prereq-500:#a78bfa;--fs-prereq-600:#c4b5fd;--fs-prereq-700:#ddd6fe;--fs-prereq:var(--fs-prereq-500)}@layer clicky-tokens{:root{--background:var(--fs-bg-canvas);--foreground:var(--fs-fg-1);--card:var(--fs-bg-canvas);--card-foreground:var(--fs-fg-1);--popover:var(--fs-bg-canvas);--popover-foreground:var(--fs-fg-1);--primary:var(--fs-primary-blue);--primary-foreground:var(--fs-fg-on-brand);--secondary:var(--fs-bg-muted);--secondary-foreground:var(--fs-fg-1);--muted:var(--fs-bg-muted);--muted-foreground:var(--fs-fg-muted);--accent:var(--fs-bg-muted);--accent-foreground:var(--fs-fg-1);--destructive:var(--fs-error);--destructive-foreground:var(--fs-fg-on-brand);--border:var(--fs-border-subtle);--input:var(--fs-border-default);--ring:var(--fs-primary-blue);--radius:var(--fs-radius-lg);--sidebar:#1e2b48;--sidebar-foreground:#c2cce0;--sidebar-border:#33425f;--sidebar-accent:#2c3c5e;--sidebar-accent-foreground:#fff;--sidebar-primary:#7cb0ff;--sidebar-primary-foreground:#fff;--sidebar-ring:var(--fs-primary-blue)}:root,[data-density=comfortable]{--spacing-unit:.25rem;--control-height:2.25rem;--control-padding-x:.75rem;--font-size-base:.875rem}[data-density=compact]{--spacing-unit:.1875rem;--control-height:1.875rem;--control-padding-x:.5rem;--font-size-base:.8125rem}[data-density=spacious]{--spacing-unit:.3125rem;--control-height:2.75rem;--control-padding-x:1rem;--font-size-base:1rem}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);font-family:var(--font-sans)}.clicky-mdx-editor-field{--accentBase:var(--background);--accentBgSubtle:var(--primary)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field{--accentBgSubtle:color-mix(in srgb, var(--primary) 6%, var(--background))}}.clicky-mdx-editor-field{--accentBg:var(--primary)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field{--accentBg:color-mix(in srgb, var(--primary) 10%, var(--background))}}.clicky-mdx-editor-field{--accentBgHover:var(--primary)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field{--accentBgHover:color-mix(in srgb, var(--primary) 14%, var(--background))}}.clicky-mdx-editor-field{--accentBgActive:var(--primary)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field{--accentBgActive:color-mix(in srgb, var(--primary) 18%, var(--background))}}.clicky-mdx-editor-field{--accentLine:var(--primary)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field{--accentLine:color-mix(in srgb, var(--primary) 24%, var(--border))}}.clicky-mdx-editor-field{--accentBorder:var(--primary)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field{--accentBorder:color-mix(in srgb, var(--primary) 34%, var(--border))}}.clicky-mdx-editor-field{--accentBorderHover:var(--primary)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field{--accentBorderHover:color-mix(in srgb, var(--primary) 45%, var(--border))}}.clicky-mdx-editor-field{--accentSolid:var(--primary);--accentSolidHover:var(--primary);--accentText:var(--primary);--accentTextContrast:var(--primary-foreground);--basePageBg:var(--popover);--baseBase:var(--background);--baseBgSubtle:var(--muted)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field{--baseBgSubtle:color-mix(in srgb, var(--muted) 55%, var(--background))}}.clicky-mdx-editor-field{--baseBg:var(--muted);--baseBgHover:var(--accent);--baseBgActive:var(--accent)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field{--baseBgActive:color-mix(in srgb, var(--accent) 80%, var(--foreground) 8%)}}.clicky-mdx-editor-field{--baseLine:var(--border);--baseBorder:var(--border);--baseBorderHover:var(--input);--baseSolid:var(--muted-foreground);--baseSolidHover:var(--foreground);--baseText:var(--muted-foreground);--baseTextContrast:var(--foreground);--font-body:var(--fs-font-sans);--font-mono:var(--fs-font-mono);background-color:var(--background);border:1px solid var(--input);border-radius:var(--radius);color:var(--foreground);overflow:hidden}.clicky-mdx-editor-field:focus-within{box-shadow:0 0 0 2px var(--ring)}.clicky-mdx-editor-field-readonly{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.clicky-mdx-editor-field-readonly{background-color:color-mix(in srgb,var(--muted) 40%,transparent)}}.clicky-mdx-editor-field .mdxeditor-root-contenteditable{border-top:1px solid var(--border)}.clicky-mdx-editor-content{font-size:var(--font-size-base);line-height:1.55}.clicky-mdx-editor-content :where(p,ul,ol,blockquote,pre,table){margin-block:.5rem}.clicky-mdx-editor-content :where(h1,h2,h3,h4,h5,h6){color:var(--foreground);margin-block:.75rem .35rem;font-weight:600;line-height:1.25}.clicky-mdx-editor-content :where(code,pre){font-family:var(--fs-font-mono)}}.stacktrace-source pre.shiki{font-size:inherit;line-height:inherit;counter-reset:shiki-line var(--shiki-start,0);white-space:normal;margin:0;padding:0;background:0 0!important}.stacktrace-source pre.shiki code{white-space:normal;display:block}.stacktrace-source pre.shiki .line{counter-increment:shiki-line;white-space:pre;min-height:1lh;padding-left:3.5rem;display:block;position:relative}.stacktrace-source pre.shiki .line:before{content:counter(shiki-line);text-align:right;width:3rem;color:var(--muted-foreground);-webkit-user-select:none;user-select:none;padding-right:.5rem;position:absolute;left:0}.stacktrace-source pre.shiki.has-highlighted .line{opacity:.55}.stacktrace-source pre.shiki .line.error{color:#b91c1c;opacity:1;background-color:#ef44441a;font-weight:700}[data-theme=dark] .stacktrace-source pre.shiki .line.error{color:#f87171}.stacktrace-source pre.shiki .line.error:before{color:#b91c1c}[data-theme=dark] .stacktrace-source pre.shiki .line.error:before{color:#f87171}@property --tw-border-spacing-x{syntax:"";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"";inherits:false;initial-value:0}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-800:oklch(45.3% .124 130.933);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-700:oklch(51.1% .096 186.391);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-600:oklch(60.9% .126 221.723);--color-cyan-700:oklch(52% .105 223.128);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-950:oklch(25.7% .09 281.288);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-950:oklch(28.3% .141 291.089);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-fuchsia-100:oklch(95.2% .037 318.852);--color-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-300:oklch(82.3% .12 346.018);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-700:oklch(52.5% .223 3.958);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-950:oklch(27.1% .105 12.094);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\@container{container-type:inline-size}.\[container-type\:size\]{container-type:size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-4{inset:calc(var(--spacing) * 4)}.inset-x-0{inset-inline:0}.inset-x-3{inset-inline:calc(var(--spacing) * 3)}.inset-y-0{inset-block:0}.-top-0\.5{top:calc(var(--spacing) * -.5)}.top-0{top:0}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-9{top:calc(var(--spacing) * 9)}.top-\[22px\]{top:22px}.top-\[calc\(100\%\+0\.375rem\)\]{top:calc(100% + .375rem)}.top-full{top:100%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.right-7{right:calc(var(--spacing) * 7)}.right-\[3\.75rem\]{right:3.75rem}.right-auto{right:auto}.-bottom-0\.5{bottom:calc(var(--spacing) * -.5)}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-2\.5{bottom:calc(var(--spacing) * 2.5)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.-left-0\.5{left:calc(var(--spacing) * -.5)}.left-0{left:0}.left-0\.5{left:calc(var(--spacing) * .5)}.left-1{left:var(--spacing)}.left-1\.5{left:calc(var(--spacing) * 1.5)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-\[10px\]{left:10px}.left-auto{left:auto}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[N\]{z-index:N}.col-span-2{grid-column:span 2/span 2}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.mx-0\.5{margin-inline:calc(var(--spacing) * .5)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-4{margin-block:calc(var(--spacing) * 4)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.-mr-px{margin-right:-1px}.mr-1{margin-right:var(--spacing)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-auto{margin-right:auto}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-px{margin-left:-1px}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-5{margin-left:calc(var(--spacing) * 5)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-12{margin-left:calc(var(--spacing) * 12)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[display\:-webkit-box\]{display:-webkit-box}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-\[clamp\(…\)\]{width:clamp(…);height:clamp(…)}.size-full{width:100%;height:100%}.h-0{height:0}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-40{height:calc(var(--spacing) * 40)}.h-64{height:calc(var(--spacing) * 64)}.h-\[16px\]{height:16px}.h-\[18px\]{height:18px}.h-\[21px\]{height:21px}.h-\[34px\]{height:34px}.h-\[60vh\]{height:60vh}.h-\[70vh\]{height:70vh}.h-\[75vh\]{height:75vh}.h-\[92vh\]{height:92vh}.h-\[95vh\]{height:95vh}.h-\[240px\]{height:240px}.h-\[280px\]{height:280px}.h-\[320px\]{height:320px}.h-\[400px\]{height:400px}.h-\[420px\]{height:420px}.h-\[440px\]{height:440px}.h-\[460px\]{height:460px}.h-\[480px\]{height:480px}.h-\[500px\]{height:500px}.h-\[560px\]{height:560px}.h-\[600px\]{height:600px}.h-\[640px\]{height:640px}.h-\[720px\]{height:720px}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[26rem\]{max-height:26rem}.max-h-\[40vh\]{max-height:40vh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[520px\]{max-height:520px}.max-h-\[calc\(100vh-1rem\)\]{max-height:calc(100vh - 1rem)}.max-h-\[min\(32rem\,calc\(100vh-2rem\)\)\]{max-height:min(32rem,100vh - 2rem)}.max-h-\[min\(34rem\,calc\(100vh-2rem\)\)\]{max-height:min(34rem,100vh - 2rem)}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-5{min-height:calc(var(--spacing) * 5)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-10{min-height:calc(var(--spacing) * 10)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-14{min-height:calc(var(--spacing) * 14)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-20{min-height:calc(var(--spacing) * 20)}.min-h-28{min-height:calc(var(--spacing) * 28)}.min-h-32{min-height:calc(var(--spacing) * 32)}.min-h-36{min-height:calc(var(--spacing) * 36)}.min-h-40{min-height:calc(var(--spacing) * 40)}.min-h-48{min-height:calc(var(--spacing) * 48)}.min-h-56{min-height:calc(var(--spacing) * 56)}.min-h-80{min-height:calc(var(--spacing) * 80)}.min-h-96{min-height:calc(var(--spacing) * 96)}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[4\.25rem\]{min-height:4.25rem}.min-h-\[5rem\]{min-height:5rem}.min-h-\[7rem\]{min-height:7rem}.min-h-\[12rem\]{min-height:12rem}.min-h-\[14rem\]{min-height:14rem}.min-h-\[16rem\]{min-height:16rem}.min-h-\[18px\]{min-height:18px}.min-h-\[34rem\]{min-height:34rem}.min-h-\[48px\]{min-height:48px}.min-h-\[120px\]{min-height:120px}.min-h-\[240px\]{min-height:240px}.min-h-\[280px\]{min-height:280px}.min-h-full{min-height:100%}.min-h-px{min-height:1px}.w-0{width:0}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-5\/6{width:83.3333%}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-96{width:calc(var(--spacing) * 96)}.w-\[3px\]{width:3px}.w-\[15\.5rem\]{width:15.5rem}.w-\[21px\]{width:21px}.w-\[22\.5rem\]{width:22.5rem}.w-\[22rem\]{width:22rem}.w-\[24rem\]{width:24rem}.w-\[28rem\]{width:28rem}.w-\[30rem\]{width:30rem}.w-\[32rem\]{width:32rem}.w-\[34px\]{width:34px}.w-\[34rem\]{width:34rem}.w-\[52px\]{width:52px}.w-\[52rem\]{width:52rem}.w-\[58rem\]{width:58rem}.w-\[64rem\]{width:64rem}.w-\[320px\]{width:320px}.w-\[360px\]{width:360px}.w-\[420px\]{width:420px}.w-\[480px\]{width:480px}.w-\[560px\]{width:560px}.w-\[640px\]{width:640px}.w-\[720px\]{width:720px}.w-\[min\(20rem\,85vw\)\]{width:min(20rem,85vw)}.w-\[min\(34rem\,calc\(100vw-2rem\)\)\]{width:min(34rem,100vw - 2rem)}.w-\[min\(100\%\,28rem\)\]{width:min(100%,28rem)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-32{max-width:calc(var(--spacing) * 32)}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\[8\.5rem\]{max-width:8.5rem}.max-w-\[9\.5rem\]{max-width:9.5rem}.max-w-\[12rem\]{max-width:12rem}.max-w-\[15rem\]{max-width:15rem}.max-w-\[16rem\]{max-width:16rem}.max-w-\[18rem\]{max-width:18rem}.max-w-\[20rem\]{max-width:20rem}.max-w-\[22rem\]{max-width:22rem}.max-w-\[28rem\]{max-width:28rem}.max-w-\[32rem\]{max-width:32rem}.max-w-\[36rem\]{max-width:36rem}.max-w-\[40ch\]{max-width:40ch}.max-w-\[48rem\]{max-width:48rem}.max-w-\[50ch\]{max-width:50ch}.max-w-\[72rem\]{max-width:72rem}.max-w-\[85\%\]{max-width:85%}.max-w-\[90vw\]{max-width:90vw}.max-w-\[95\%\]{max-width:95%}.max-w-\[95vw\]{max-width:95vw}.max-w-\[100px\]{max-width:100px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[320px\]{max-width:320px}.max-w-\[820px\]{max-width:820px}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-4{min-width:calc(var(--spacing) * 4)}.min-w-12{min-width:calc(var(--spacing) * 12)}.min-w-20{min-width:calc(var(--spacing) * 20)}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-32{min-width:calc(var(--spacing) * 32)}.min-w-36{min-width:calc(var(--spacing) * 36)}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-56{min-width:calc(var(--spacing) * 56)}.min-w-64{min-width:calc(var(--spacing) * 64)}.min-w-72{min-width:calc(var(--spacing) * 72)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[9rem\]{min-width:9rem}.min-w-\[11rem\]{min-width:11rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[14rem\]{min-width:14rem}.min-w-\[16px\]{min-width:16px}.min-w-\[16rem\]{min-width:16rem}.min-w-\[18px\]{min-width:18px}.min-w-\[18rem\]{min-width:18rem}.min-w-\[80px\]{min-width:80px}.min-w-\[150px\]{min-width:150px}.min-w-\[170px\]{min-width:170px}.min-w-\[220px\]{min-width:220px}.min-w-full{min-width:100%}.min-w-max{min-width:max-content}.flex-1{flex:1}.flex-\[1_1_14rem\]{flex:14rem}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-8{--tw-translate-x:calc(var(--spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[1\.25rem_minmax\(0\,1fr\)\]{grid-template-columns:1.25rem minmax(0,1fr)}.grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.grid-cols-\[1rem_minmax\(0\,1fr\)\]{grid-template-columns:1rem minmax(0,1fr)}.grid-cols-\[2rem_1fr\]{grid-template-columns:2rem 1fr}.grid-cols-\[2rem_minmax\(0\,1fr\)\]{grid-template-columns:2rem minmax(0,1fr)}.grid-cols-\[3\.5rem_minmax\(24rem\,1fr\)\]{grid-template-columns:3.5rem minmax(24rem,1fr)}.grid-cols-\[8rem_minmax\(0\,1fr\)_4rem\]{grid-template-columns:8rem minmax(0,1fr) 4rem}.grid-cols-\[9rem_minmax\(0\,1fr\)\]{grid-template-columns:9rem minmax(0,1fr)}.grid-cols-\[10rem_1fr\]{grid-template-columns:10rem 1fr}.grid-cols-\[10rem_1fr_9rem\]{grid-template-columns:10rem 1fr 9rem}.grid-cols-\[10rem_1fr_auto\]{grid-template-columns:10rem 1fr auto}.grid-cols-\[18rem_24rem_30rem\]{grid-template-columns:18rem 24rem 30rem}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_minmax\(0\,1fr\)\]{grid-template-columns:auto minmax(0,1fr)}.grid-cols-\[fit-content\(30ch\)_minmax\(0\,1fr\)\]{grid-template-columns:fit-content(30ch) minmax(0,1fr)}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(0\,1fr\)_minmax\(18rem\,24rem\)\]{grid-template-columns:minmax(0,1fr) minmax(18rem,24rem)}.grid-cols-\[minmax\(0\,14rem\)_minmax\(0\,1fr\)_4rem\]{grid-template-columns:minmax(0,14rem) minmax(0,1fr) 4rem}.grid-cols-\[minmax\(4rem\,8rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(4rem,8rem) minmax(0,1fr)}.grid-cols-\[minmax\(6rem\,1fr\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(6rem,1fr) minmax(0,1fr) auto}.grid-cols-\[minmax\(7rem\,12rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(7rem,12rem) minmax(0,1fr)}.grid-cols-\[minmax\(8rem\,14rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(8rem,14rem) minmax(0,1fr)}.grid-cols-\[minmax\(12rem\,1\.4fr\)_5\.25rem_6\.25rem\]{grid-template-columns:minmax(12rem,1.4fr) 5.25rem 6.25rem}.grid-cols-subgrid{grid-template-columns:subgrid}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-px{gap:1px}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-1\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-0>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(0px * var(--tw-divide-y-reverse));border-bottom-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)))}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[2px\]{border-radius:2px}.rounded-\[5px\]{border-radius:5px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/50{border-color:color-mix(in oklab,var(--color-amber-500) 50%,transparent)}}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-500{border-color:var(--color-blue-500)}.border-current\/10{border-color:currentColor}@supports (color:color-mix(in lab,red,red)){.border-current\/10{border-color:color-mix(in oklab,currentcolor 10%,transparent)}}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-emerald-600{border-color:var(--color-emerald-600)}.border-green-500{border-color:var(--color-green-500)}.border-green-500\/50{border-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.border-green-500\/50{border-color:color-mix(in oklab,var(--color-green-500) 50%,transparent)}}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-400{border-color:var(--color-red-400)}.border-red-500{border-color:var(--color-red-500)}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500) 50%,transparent)}}.border-red-600{border-color:var(--color-red-600)}.border-rose-200{border-color:var(--color-rose-200)}.border-rose-300{border-color:var(--color-rose-300)}.border-sky-200{border-color:var(--color-sky-200)}.border-sky-300{border-color:var(--color-sky-300)}.border-sky-500\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/30{border-color:color-mix(in oklab,var(--color-sky-500) 30%,transparent)}}.border-sky-600{border-color:var(--color-sky-600)}.border-slate-600{border-color:var(--color-slate-600)}.border-transparent{border-color:#0000}.border-yellow-300{border-color:var(--color-yellow-300)}.border-yellow-400{border-color:var(--color-yellow-400)}.border-yellow-500{border-color:var(--color-yellow-500)}.border-yellow-500\/30{border-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/30{border-color:color-mix(in oklab,var(--color-yellow-500) 30%,transparent)}}.border-yellow-500\/40{border-color:#edb20066}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/40{border-color:color-mix(in oklab,var(--color-yellow-500) 40%,transparent)}}.border-l-blue-500{border-left-color:var(--color-blue-500)}.border-l-current\/25{border-left-color:currentColor}@supports (color:color-mix(in lab,red,red)){.border-l-current\/25{border-left-color:color-mix(in oklab,currentcolor 25%,transparent)}}.border-l-green-500{border-left-color:var(--color-green-500)}.border-l-red-500{border-left-color:var(--color-red-500)}.border-l-yellow-500{border-left-color:var(--color-yellow-500)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\/85{background-color:#fffbebd9}@supports (color:color-mix(in lab,red,red)){.bg-amber-50\/85{background-color:color-mix(in oklab,var(--color-amber-50) 85%,transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\/70{background-color:#fef3c6b3}@supports (color:color-mix(in lab,red,red)){.bg-amber-100\/70{background-color:color-mix(in oklab,var(--color-amber-100) 70%,transparent)}}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-400\/15{background-color:#fcbb0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/15{background-color:color-mix(in oklab,var(--color-amber-400) 15%,transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/\[0\.03\]{background-color:#f99c0008}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/\[0\.03\]{background-color:color-mix(in oklab,var(--color-amber-500) 3%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-current{background-color:currentColor}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-emerald-50\/80{background-color:#ecfdf5cc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/80{background-color:color-mix(in oklab,var(--color-emerald-50) 80%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/12{background-color:#00bb7f1f}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/12{background-color:color-mix(in oklab,var(--color-emerald-500) 12%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-fuchsia-100{background-color:var(--color-fuchsia-100)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/5{background-color:#00c7580d}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/5{background-color:color-mix(in oklab,var(--color-green-500) 5%,transparent)}}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500) 10%,transparent)}}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500) 20%,transparent)}}.bg-green-500\/80{background-color:#00c758cc}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/80{background-color:color-mix(in oklab,var(--color-green-500) 80%,transparent)}}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-lime-100{background-color:var(--color-lime-100)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500\/5{background-color:#fe6e000d}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/5{background-color:color-mix(in oklab,var(--color-orange-500) 5%,transparent)}}.bg-pink-100{background-color:var(--color-pink-100)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/50{background-color:#fef2f280}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/50{background-color:color-mix(in oklab,var(--color-red-50) 50%,transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-50\/85{background-color:#fff1f2d9}@supports (color:color-mix(in lab,red,red)){.bg-rose-50\/85{background-color:color-mix(in oklab,var(--color-rose-50) 85%,transparent)}}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.bg-rose-500\/12{background-color:#ff23571f}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/12{background-color:color-mix(in oklab,var(--color-rose-500) 12%,transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-sky-500\/5{background-color:#00a5ef0d}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/5{background-color:color-mix(in oklab,var(--color-sky-500) 5%,transparent)}}.bg-sky-500\/10{background-color:#00a5ef1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-sky-500) 10%,transparent)}}.bg-sky-500\/12{background-color:#00a5ef1f}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/12{background-color:color-mix(in oklab,var(--color-sky-500) 12%,transparent)}}.bg-sky-600{background-color:var(--color-sky-600)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-teal-100{background-color:var(--color-teal-100)}.bg-transparent{background-color:#0000}.bg-violet-50{background-color:var(--color-violet-50)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-500\/5{background-color:#edb2000d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/5{background-color:color-mix(in oklab,var(--color-yellow-500) 5%,transparent)}}.bg-yellow-500\/10{background-color:#edb2001a}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/10{background-color:color-mix(in oklab,var(--color-yellow-500) 10%,transparent)}}.bg-gradient-to-l{--tw-gradient-position:to left in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-sky-400{fill:var(--color-sky-400)}.stroke-amber-600{stroke:var(--color-amber-600)}.object-cover{object-fit:cover}.\!p-0{padding:0!important}.\!p-1{padding:var(--spacing)!important}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0{padding-inline:0}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-px{padding-block:1px}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-px{padding-top:1px}.pr-0\.5{padding-right:calc(var(--spacing) * .5)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-5{padding-right:calc(var(--spacing) * 5)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-12{padding-right:calc(var(--spacing) * 12)}.pr-14{padding-right:calc(var(--spacing) * 14)}.pr-\[5\.5rem\]{padding-right:5.5rem}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-end{text-align:end}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-\[-0\.125em\]{vertical-align:-.125em}.align-baseline{vertical-align:baseline}.align-bottom{vertical-align:bottom}.align-middle{vertical-align:middle}.align-super{vertical-align:super}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.6rem\]{font-size:.6rem}.text-\[0\.9em\]{font-size:.9em}.text-\[0\.65em\]{font-size:.65em}.text-\[0\.65rem\]{font-size:.65rem}.text-\[0\.75em\]{font-size:.75em}.text-\[0\.85em\]{font-size:.85em}.text-\[1em\]{font-size:1em}.text-\[9\.5px\]{font-size:9.5px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.05em\]{--tw-tracking:-.05em;letter-spacing:-.05em}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.03em\]{--tw-tracking:.03em;letter-spacing:.03em}.tracking-\[0\.12em\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-\[0\.14em\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\[0\.18em\]{--tw-tracking:.18em;letter-spacing:.18em}.tracking-\[0\.24em\]{--tw-tracking:.24em;letter-spacing:.24em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-cyan-600{color:var(--color-cyan-600)}.text-cyan-700{color:var(--color-cyan-700)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-950\/80{color:#002c22cc}@supports (color:color-mix(in lab,red,red)){.text-emerald-950\/80{color:color-mix(in oklab,var(--color-emerald-950) 80%,transparent)}}.text-fuchsia-700{color:var(--color-fuchsia-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-700{color:var(--color-indigo-700)}.text-inherit{color:inherit}.text-lime-800{color:var(--color-lime-800)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-pink-700{color:var(--color-pink-700)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-sky-950\/80{color:#052f4acc}@supports (color:color-mix(in lab,red,red)){.text-sky-950\/80{color:color-mix(in oklab,var(--color-sky-950) 80%,transparent)}}.text-slate-200{color:var(--color-slate-200)}.text-slate-700{color:var(--color-slate-700)}.text-teal-700{color:var(--color-teal-700)}.text-violet-600{color:var(--color-violet-600)}.text-violet-700{color:var(--color-violet-700)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.text-yellow-950{color:var(--color-yellow-950)}.text-yellow-950\/80{color:#432004cc}@supports (color:color-mix(in lab,red,red)){.text-yellow-950\/80{color:color-mix(in oklab,var(--color-yellow-950) 80%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-85{opacity:.85}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_1px_0_0_var\(--tw-shadow-color\)\]{--tw-shadow:0 1px 0 0 var(--tw-shadow-color,var(--tw-shadow-color));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-amber-200\/80{--tw-ring-color:#fee685cc}@supports (color:color-mix(in lab,red,red)){.ring-amber-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-amber-200) 80%, transparent)}}.ring-emerald-200\/80{--tw-ring-color:#a4f4cfcc}@supports (color:color-mix(in lab,red,red)){.ring-emerald-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-emerald-200) 80%, transparent)}}.ring-rose-200\/80{--tw-ring-color:#ffccd3cc}@supports (color:color-mix(in lab,red,red)){.ring-rose-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-rose-200) 80%, transparent)}}.ring-sky-200\/80{--tw-ring-color:#b8e6fecc}@supports (color:color-mix(in lab,red,red)){.ring-sky-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-sky-200) 80%, transparent)}}.ring-slate-200\/80{--tw-ring-color:#e2e8f0cc}@supports (color:color-mix(in lab,red,red)){.ring-slate-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-slate-200) 80%, transparent)}}.ring-violet-200\/80{--tw-ring-color:#ddd6ffcc}@supports (color:color-mix(in lab,red,red)){.ring-violet-200\/80{--tw-ring-color:color-mix(in oklab, var(--color-violet-200) 80%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,box-shadow\]{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[height\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[stroke-dashoffset\]{transition-property:stroke-dashoffset;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[-webkit-box-orient\:vertical\]{-webkit-box-orient:vertical}.\[-webkit-line-clamp\:3\]{-webkit-line-clamp:3}.ring-inset{--tw-ring-inset:inset}.group-open\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}@media(hover:hover){.group-hover\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\/comment\:opacity-70:is(:where(.group\/comment):hover *){opacity:.7}.group-hover\/thread\:opacity-100:is(:where(.group\/thread):hover *){opacity:1}}.first\:mt-1:first-child{margin-top:var(--spacing)}.first\:mt-2:first-child{margin-top:calc(var(--spacing) * 2)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first\:pt-0:first-child{padding-top:0}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\:pb-0:last-child{padding-bottom:0}.focus-within\:shadow-md:focus-within{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.hover\:border-emerald-200:hover{border-color:var(--color-emerald-200)}.hover\:bg-emerald-50\/50:hover{background-color:#ecfdf580}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-50\/50:hover{background-color:color-mix(in oklab,var(--color-emerald-50) 50%,transparent)}}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:relative:focus-visible{position:relative}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-35:disabled{opacity:.35}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media(hover:hover){.disabled\:hover\:bg-transparent:disabled:hover{background-color:#0000}}.data-\[disabled\=true\]\:cursor-default[data-disabled=true]{cursor:default}@media(hover:hover){.data-\[disabled\=true\]\:hover\:bg-transparent[data-disabled=true]:hover{background-color:#0000}}@media(min-width:40rem){.sm\:w-48{width:calc(var(--spacing) * 48)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[8rem_minmax\(0\,1fr\)_auto\]{grid-template-columns:8rem minmax(0,1fr) auto}.sm\:grid-cols-\[minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) auto auto}.sm\:grid-cols-\[minmax\(8rem\,14rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(8rem,14rem) minmax(0,1fr)}.sm\:grid-cols-\[minmax\(10rem\,16rem\)\]{grid-template-columns:minmax(10rem,16rem)}.sm\:grid-cols-\[minmax\(13rem\,1\.5fr\)_5\.25rem_6\.25rem_6\.25rem\]{grid-template-columns:minmax(13rem,1.5fr) 5.25rem 6.25rem 6.25rem}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:calc(var(--spacing) * 3)}}@media(min-width:48rem){.md\:col-span-1{grid-column:span 1/span 1}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-12{height:calc(var(--spacing) * 12)}.md\:max-w-\[24rem\]{max-width:24rem}.md\:min-w-\[14rem\]{min-width:14rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:grid-cols-\[1fr_auto_1fr\]{grid-template-columns:1fr auto 1fr}.md\:grid-cols-\[minmax\(0\,1fr\)_9rem_6rem\]{grid-template-columns:minmax(0,1fr) 9rem 6rem}.md\:grid-cols-\[minmax\(7rem\,10rem\)_auto_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(7rem,10rem) auto minmax(0,1fr) auto}.md\:grid-cols-\[minmax\(8rem\,10rem\)_minmax\(8rem\,10rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(8rem,10rem) minmax(8rem,10rem) minmax(0,1fr)}.md\:grid-cols-\[minmax\(8rem\,12rem\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(8rem,12rem) minmax(0,1fr) auto}.md\:grid-cols-\[minmax\(14rem\,1fr\)_auto_auto\]{grid-template-columns:minmax(14rem,1fr) auto auto}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:items-start{align-items:flex-start}.md\:justify-between{justify-content:space-between}.md\:p-2{padding:calc(var(--spacing) * 2)}.md\:p-6{padding:calc(var(--spacing) * 6)}}@media(min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[1\.2fr_0\.8fr\]{grid-template-columns:1.2fr .8fr}.lg\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.lg\:grid-cols-\[minmax\(14rem\,1fr\)_auto_auto_auto_auto\]{grid-template-columns:minmax(14rem,1fr) auto auto auto auto}.lg\:grid-cols-\[minmax\(15rem\,1\.6fr\)_5\.5rem_7rem_7rem_7rem_6rem_7rem_5\.5rem\]{grid-template-columns:minmax(15rem,1.6fr) 5.5rem 7rem 7rem 7rem 6rem 7rem 5.5rem}}@media(min-width:80rem){.xl\:sticky{position:sticky}.xl\:top-0{top:0}.xl\:max-h-screen{max-height:100vh}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\,1fr\)_22rem\]{grid-template-columns:minmax(0,1fr) 22rem}.xl\:grid-cols-\[minmax\(0\,1fr\)_minmax\(18rem\,24rem\)\]{grid-template-columns:minmax(0,1fr) minmax(18rem,24rem)}.xl\:grid-cols-\[minmax\(0\,1fr\)_minmax\(20rem\,26rem\)\]{grid-template-columns:minmax(0,1fr) minmax(20rem,26rem)}.xl\:grid-cols-\[minmax\(340px\,0\.9fr\)_minmax\(0\,1\.1fr\)\]{grid-template-columns:minmax(340px,.9fr) minmax(0,1.1fr)}.xl\:self-start{align-self:flex-start}.xl\:overflow-auto{overflow:auto}}@media(min-width:96rem){.\32xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.\32xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(prefers-color-scheme:dark){.dark\:border-amber-400{border-color:var(--color-amber-400)}.dark\:border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.dark\:border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.dark\:border-emerald-500{border-color:var(--color-emerald-500)}.dark\:border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.dark\:border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.dark\:border-red-500{border-color:var(--color-red-500)}.dark\:border-red-800{border-color:var(--color-red-800)}.dark\:border-red-900{border-color:var(--color-red-900)}.dark\:border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-500\/30{border-color:color-mix(in oklab,var(--color-rose-500) 30%,transparent)}}.dark\:border-rose-500\/40{border-color:#ff235766}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-500\/40{border-color:color-mix(in oklab,var(--color-rose-500) 40%,transparent)}}.dark\:border-sky-500{border-color:var(--color-sky-500)}.dark\:border-sky-500\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab,red,red)){.dark\:border-sky-500\/30{border-color:color-mix(in oklab,var(--color-sky-500) 30%,transparent)}}.dark\:border-sky-500\/40{border-color:#00a5ef66}@supports (color:color-mix(in lab,red,red)){.dark\:border-sky-500\/40{border-color:color-mix(in oklab,var(--color-sky-500) 40%,transparent)}}.dark\:border-slate-300{border-color:var(--color-slate-300)}.dark\:border-yellow-700{border-color:var(--color-yellow-700)}.dark\:bg-amber-400{background-color:var(--color-amber-400)}.dark\:bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.dark\:bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.dark\:bg-amber-900{background-color:var(--color-amber-900)}.dark\:bg-amber-950\/50{background-color:#46190180}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-950\/50{background-color:color-mix(in oklab,var(--color-amber-950) 50%,transparent)}}.dark\:bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500) 10%,transparent)}}.dark\:bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.dark\:bg-emerald-500{background-color:var(--color-emerald-500)}.dark\:bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.dark\:bg-emerald-900{background-color:var(--color-emerald-900)}.dark\:bg-emerald-950\/50{background-color:#002c2280}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-950\/50{background-color:color-mix(in oklab,var(--color-emerald-950) 50%,transparent)}}.dark\:bg-gray-500\/20{background-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.dark\:bg-gray-500\/20{background-color:color-mix(in oklab,var(--color-gray-500) 20%,transparent)}}.dark\:bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500) 20%,transparent)}}.dark\:bg-indigo-950\/50{background-color:#1e1a4d80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-indigo-950\/50{background-color:color-mix(in oklab,var(--color-indigo-950) 50%,transparent)}}.dark\:bg-red-500{background-color:var(--color-red-500)}.dark\:bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.dark\:bg-red-900{background-color:var(--color-red-900)}.dark\:bg-red-950{background-color:var(--color-red-950)}.dark\:bg-red-950\/30{background-color:#4608094d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-950\/30{background-color:color-mix(in oklab,var(--color-red-950) 30%,transparent)}}.dark\:bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-500\/15{background-color:color-mix(in oklab,var(--color-rose-500) 15%,transparent)}}.dark\:bg-rose-950\/30{background-color:#4d02184d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-950\/30{background-color:color-mix(in oklab,var(--color-rose-950) 30%,transparent)}}.dark\:bg-rose-950\/50{background-color:#4d021880}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-950\/50{background-color:color-mix(in oklab,var(--color-rose-950) 50%,transparent)}}.dark\:bg-sky-500{background-color:var(--color-sky-500)}.dark\:bg-sky-500\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-500\/15{background-color:color-mix(in oklab,var(--color-sky-500) 15%,transparent)}}.dark\:bg-sky-900{background-color:var(--color-sky-900)}.dark\:bg-sky-950\/50{background-color:#052f4a80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-950\/50{background-color:color-mix(in oklab,var(--color-sky-950) 50%,transparent)}}.dark\:bg-slate-300{background-color:var(--color-slate-300)}.dark\:bg-violet-500\/20{background-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-violet-500\/20{background-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.dark\:bg-violet-950\/50{background-color:#2f0d6880}@supports (color:color-mix(in lab,red,red)){.dark\:bg-violet-950\/50{background-color:color-mix(in oklab,var(--color-violet-950) 50%,transparent)}}.dark\:bg-yellow-500\/20{background-color:#edb20033}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-500\/20{background-color:color-mix(in oklab,var(--color-yellow-500) 20%,transparent)}}.dark\:bg-yellow-950{background-color:var(--color-yellow-950)}.dark\:text-amber-200{color:var(--color-amber-200)}.dark\:text-amber-300{color:var(--color-amber-300)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-amber-500{color:var(--color-amber-500)}.dark\:text-amber-950{color:var(--color-amber-950)}.dark\:text-blue-300{color:var(--color-blue-300)}.dark\:text-blue-400{color:var(--color-blue-400)}.dark\:text-emerald-100\/80{color:#d0fae5cc}@supports (color:color-mix(in lab,red,red)){.dark\:text-emerald-100\/80{color:color-mix(in oklab,var(--color-emerald-100) 80%,transparent)}}.dark\:text-emerald-200{color:var(--color-emerald-200)}.dark\:text-emerald-300{color:var(--color-emerald-300)}.dark\:text-emerald-400{color:var(--color-emerald-400)}.dark\:text-emerald-950{color:var(--color-emerald-950)}.dark\:text-green-300{color:var(--color-green-300)}.dark\:text-green-400{color:var(--color-green-400)}.dark\:text-indigo-200{color:var(--color-indigo-200)}.dark\:text-orange-300{color:var(--color-orange-300)}.dark\:text-purple-400{color:var(--color-purple-400)}.dark\:text-red-200{color:var(--color-red-200)}.dark\:text-red-300{color:var(--color-red-300)}.dark\:text-red-400{color:var(--color-red-400)}.dark\:text-red-950{color:var(--color-red-950)}.dark\:text-rose-200{color:var(--color-rose-200)}.dark\:text-rose-300{color:var(--color-rose-300)}.dark\:text-rose-400{color:var(--color-rose-400)}.dark\:text-sky-100\/80{color:#dff2fecc}@supports (color:color-mix(in lab,red,red)){.dark\:text-sky-100\/80{color:color-mix(in oklab,var(--color-sky-100) 80%,transparent)}}.dark\:text-sky-200{color:var(--color-sky-200)}.dark\:text-sky-300{color:var(--color-sky-300)}.dark\:text-sky-400{color:var(--color-sky-400)}.dark\:text-sky-950{color:var(--color-sky-950)}.dark\:text-slate-300{color:var(--color-slate-300)}.dark\:text-slate-950{color:var(--color-slate-950)}.dark\:text-violet-200{color:var(--color-violet-200)}.dark\:text-violet-300{color:var(--color-violet-300)}.dark\:text-violet-400{color:var(--color-violet-400)}.dark\:text-yellow-100\/80{color:#fef9c2cc}@supports (color:color-mix(in lab,red,red)){.dark\:text-yellow-100\/80{color:color-mix(in oklab,var(--color-yellow-100) 80%,transparent)}}.dark\:text-yellow-200{color:var(--color-yellow-200)}.dark\:text-yellow-300{color:var(--color-yellow-300)}.dark\:text-yellow-400{color:var(--color-yellow-400)}.dark\:text-yellow-500{color:var(--color-yellow-500)}.dark\:ring-amber-500\/30{--tw-ring-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-amber-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.dark\:ring-emerald-500\/30{--tw-ring-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-emerald-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.dark\:ring-rose-500\/30{--tw-ring-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-rose-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-rose-500) 30%, transparent)}}.dark\:ring-sky-500\/30{--tw-ring-color:#00a5ef4d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-sky-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.dark\:ring-slate-500\/30{--tw-ring-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-slate-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-slate-500) 30%, transparent)}}.dark\:ring-violet-500\/30{--tw-ring-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.dark\:ring-violet-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-violet-500) 30%, transparent)}}@media(hover:hover){.dark\:hover\:border-emerald-500\/40:hover{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:border-emerald-500\/40:hover{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.dark\:hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}}}.\[\&_\.chroma\]\:bg-transparent .chroma{background-color:#0000}.\[\&_\.chroma_\.c\]\:text-slate-500 .chroma .c{color:var(--color-slate-500)}.\[\&_\.chroma_\.c\]\:italic .chroma .c{font-style:italic}.\[\&_\.chroma_\.cp\]\:text-slate-500 .chroma .cp{color:var(--color-slate-500)}.\[\&_\.chroma_\.cp\]\:italic .chroma .cp{font-style:italic}.\[\&_\.chroma_\.na\]\:text-amber-700 .chroma .na{color:var(--color-amber-700)}@media(prefers-color-scheme:dark){.\[\&_\.chroma_\.na\]\:dark\:text-amber-300 .chroma .na{color:var(--color-amber-300)}}.\[\&_\.chroma_\.nt\]\:font-semibold .chroma .nt{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.chroma_\.nt\]\:text-pink-700 .chroma .nt{color:var(--color-pink-700)}@media(prefers-color-scheme:dark){.\[\&_\.chroma_\.nt\]\:dark\:text-pink-300 .chroma .nt{color:var(--color-pink-300)}}.\[\&_\.chroma_\.s\]\:text-emerald-700 .chroma .s{color:var(--color-emerald-700)}@media(prefers-color-scheme:dark){.\[\&_\.chroma_\.s\]\:dark\:text-emerald-300 .chroma .s{color:var(--color-emerald-300)}}.\[\&_pre\]\:m-0 pre{margin:0}.\[\&_pre\]\:bg-transparent pre{background-color:#0000}.\[\&_pre\]\:leading-relaxed pre{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_pre\]\:whitespace-pre-wrap pre{white-space:pre-wrap}.\[\&_pre\.shiki\]\:\!bg-transparent pre.shiki{background-color:#0000!important}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&\:\:-moz-range-thumb\]\:pointer-events-auto::-moz-range-thumb{pointer-events:auto}.\[\&\:\:-moz-range-thumb\]\:size-3\.5::-moz-range-thumb{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\:\:-moz-range-thumb\]\:appearance-none::-moz-range-thumb{appearance:none}.\[\&\:\:-moz-range-thumb\]\:rounded-full::-moz-range-thumb{border-radius:3.40282e38px}.\[\&\:\:-moz-range-thumb\]\:border::-moz-range-thumb{border-style:var(--tw-border-style);border-width:1px}.\[\&\:\:-moz-range-thumb\]\:border-0::-moz-range-thumb{border-style:var(--tw-border-style);border-width:0}.\[\&\:\:-moz-range-thumb\]\:shadow-sm::-moz-range-thumb{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:\:-moz-range-track\]\:h-1::-moz-range-track{height:var(--spacing)}.\[\&\:\:-moz-range-track\]\:rounded-full::-moz-range-track{border-radius:3.40282e38px}.\[\&\:\:-moz-range-track\]\:bg-transparent::-moz-range-track{background-color:#0000}.\[\&\:\:-webkit-calendar-picker-indicator\]\:hidden::-webkit-calendar-picker-indicator{display:none}.\[\&\:\:-webkit-calendar-picker-indicator\]\:appearance-none::-webkit-calendar-picker-indicator{appearance:none}.\[\&\:\:-webkit-search-cancel-button\]\:appearance-none::-webkit-search-cancel-button{appearance:none}.\[\&\:\:-webkit-slider-runnable-track\]\:h-1::-webkit-slider-runnable-track{height:var(--spacing)}.\[\&\:\:-webkit-slider-runnable-track\]\:rounded-full::-webkit-slider-runnable-track{border-radius:3.40282e38px}.\[\&\:\:-webkit-slider-runnable-track\]\:bg-transparent::-webkit-slider-runnable-track{background-color:#0000}.\[\&\:\:-webkit-slider-thumb\]\:pointer-events-auto::-webkit-slider-thumb{pointer-events:auto}.\[\&\:\:-webkit-slider-thumb\]\:-mt-\[5px\]::-webkit-slider-thumb{margin-top:-5px}.\[\&\:\:-webkit-slider-thumb\]\:mt-\[-5px\]::-webkit-slider-thumb{margin-top:-5px}.\[\&\:\:-webkit-slider-thumb\]\:size-3\.5::-webkit-slider-thumb{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\:\:-webkit-slider-thumb\]\:appearance-none::-webkit-slider-thumb{appearance:none}.\[\&\:\:-webkit-slider-thumb\]\:rounded-full::-webkit-slider-thumb{border-radius:3.40282e38px}.\[\&\:\:-webkit-slider-thumb\]\:border::-webkit-slider-thumb{border-style:var(--tw-border-style);border-width:1px}.\[\&\:\:-webkit-slider-thumb\]\:shadow-sm::-webkit-slider-thumb{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:not\(\:first-child\)\]\:ml-2:not(:first-child){margin-left:calc(var(--spacing) * 2)}.\[\&\>\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&\>\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&\>svg\]\:h-4>svg{height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:w-4>svg{width:calc(var(--spacing) * 4)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:border-rose-500\/30{border-color:color-mix(in oklab,var(--color-rose-500) 30%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-amber-950\/40{background-color:#46190166}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-amber-950\/40{background-color:color-mix(in oklab,var(--color-amber-950) 40%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-fuchsia-500\/15{background-color:#e12afb26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-fuchsia-500\/15{background-color:color-mix(in oklab,var(--color-fuchsia-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-rose-500\/15{background-color:color-mix(in oklab,var(--color-rose-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-sky-500\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-sky-500\/15{background-color:color-mix(in oklab,var(--color-sky-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-amber-200{color:var(--color-amber-200)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-amber-300{color:var(--color-amber-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-emerald-300{color:var(--color-emerald-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-emerald-400{color:var(--color-emerald-400)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-fuchsia-300{color:var(--color-fuchsia-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-indigo-300{color:var(--color-indigo-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-pink-300{color:var(--color-pink-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-rose-300{color:var(--color-rose-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-rose-400{color:var(--color-rose-400)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-sky-300{color:var(--color-sky-300)}[data-theme=dark] .\[\[data-theme\=dark\]_\&\]\:text-violet-300{color:var(--color-violet-300)}}html,body,#root{min-height:100%}body{background:hsl(var(--background));color:hsl(var(--foreground));margin:0}button,input,select,textarea{font:inherit}@media(min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:48rem){.md\:hidden{display:none!important}.md\:block{display:block!important}.md\:flex{display:flex!important}.md\:grid{display:grid!important}.md\:inline-flex{display:inline-flex!important}.md\:flex-row{flex-direction:row}.md\:items-start{align-items:flex-start}.md\:justify-between{justify-content:space-between}.md\:gap-density-3{gap:var(--spacing-density-3)}.md\:px-density-4{padding-inline:var(--spacing-density-4)}.md\:p-density-6{padding:var(--spacing-density-6)}.md\:p-6{padding:calc(var(--spacing) * 6)}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-\[minmax\(340px\,0\.9fr\)_minmax\(0\,1\.1fr\)\]{grid-template-columns:minmax(340px,.9fr) minmax(0,1.1fr)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}:root,.light,.light-theme{--blue-1:#fbfdff;--blue-2:#f4faff;--blue-3:#e6f4fe;--blue-4:#d5efff;--blue-5:#c2e5ff;--blue-6:#acd8fc;--blue-7:#8ec8f6;--blue-8:#5eb1ef;--blue-9:#0090ff;--blue-10:#0588f0;--blue-11:#0d74ce;--blue-12:#113264}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,.light,.light-theme{--blue-1:color(display-p3 .986 .992 .999);--blue-2:color(display-p3 .96 .979 .998);--blue-3:color(display-p3 .912 .956 .991);--blue-4:color(display-p3 .853 .932 1);--blue-5:color(display-p3 .788 .894 .998);--blue-6:color(display-p3 .709 .843 .976);--blue-7:color(display-p3 .606 .777 .947);--blue-8:color(display-p3 .451 .688 .917);--blue-9:color(display-p3 .247 .556 .969);--blue-10:color(display-p3 .234 .523 .912);--blue-11:color(display-p3 .15 .44 .84);--blue-12:color(display-p3 .102 .193 .379)}}}.dark,.dark-theme{--blue-1:#0d1520;--blue-2:#111927;--blue-3:#0d2847;--blue-4:#003362;--blue-5:#004074;--blue-6:#104d87;--blue-7:#205d9e;--blue-8:#2870bd;--blue-9:#0090ff;--blue-10:#3b9eff;--blue-11:#70b8ff;--blue-12:#c2e6ff}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){.dark,.dark-theme{--blue-1:color(display-p3 .057 .081 .122);--blue-2:color(display-p3 .072 .098 .147);--blue-3:color(display-p3 .078 .154 .27);--blue-4:color(display-p3 .033 .197 .37);--blue-5:color(display-p3 .08 .245 .441);--blue-6:color(display-p3 .14 .298 .511);--blue-7:color(display-p3 .195 .361 .6);--blue-8:color(display-p3 .239 .434 .72);--blue-9:color(display-p3 .247 .556 .969);--blue-10:color(display-p3 .344 .612 .973);--blue-11:color(display-p3 .49 .72 1);--blue-12:color(display-p3 .788 .898 .99)}}}:root,.light,.light-theme{--slate-1:#fcfcfd;--slate-2:#f9f9fb;--slate-3:#f0f0f3;--slate-4:#e8e8ec;--slate-5:#e0e1e6;--slate-6:#d9d9e0;--slate-7:#cdced6;--slate-8:#b9bbc6;--slate-9:#8b8d98;--slate-10:#80838d;--slate-11:#60646c;--slate-12:#1c2024}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,.light,.light-theme{--slate-1:color(display-p3 .988 .988 .992);--slate-2:color(display-p3 .976 .976 .984);--slate-3:color(display-p3 .94 .941 .953);--slate-4:color(display-p3 .908 .909 .925);--slate-5:color(display-p3 .88 .881 .901);--slate-6:color(display-p3 .85 .852 .876);--slate-7:color(display-p3 .805 .808 .838);--slate-8:color(display-p3 .727 .733 .773);--slate-9:color(display-p3 .547 .553 .592);--slate-10:color(display-p3 .503 .512 .549);--slate-11:color(display-p3 .379 .392 .421);--slate-12:color(display-p3 .113 .125 .14)}}}.dark,.dark-theme{--slate-1:#111113;--slate-2:#18191b;--slate-3:#212225;--slate-4:#272a2d;--slate-5:#2e3135;--slate-6:#363a3f;--slate-7:#43484e;--slate-8:#5a6169;--slate-9:#696e77;--slate-10:#777b84;--slate-11:#b0b4ba;--slate-12:#edeef0}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){.dark,.dark-theme{--slate-1:color(display-p3 .067 .067 .074);--slate-2:color(display-p3 .095 .098 .105);--slate-3:color(display-p3 .13 .135 .145);--slate-4:color(display-p3 .156 .163 .176);--slate-5:color(display-p3 .183 .191 .206);--slate-6:color(display-p3 .215 .226 .244);--slate-7:color(display-p3 .265 .28 .302);--slate-8:color(display-p3 .357 .381 .409);--slate-9:color(display-p3 .415 .431 .463);--slate-10:color(display-p3 .469 .483 .514);--slate-11:color(display-p3 .692 .704 .728);--slate-12:color(display-p3 .93 .933 .94)}}}:root,.light,.light-theme{--grass-1:#fbfefb;--grass-2:#f5fbf5;--grass-3:#e9f6e9;--grass-4:#daf1db;--grass-5:#c9e8ca;--grass-6:#b2ddb5;--grass-7:#94ce9a;--grass-8:#65ba74;--grass-9:#46a758;--grass-10:#3e9b4f;--grass-11:#2a7e3b;--grass-12:#203c25}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,.light,.light-theme{--grass-1:color(display-p3 .986 .996 .985);--grass-2:color(display-p3 .966 .983 .964);--grass-3:color(display-p3 .923 .965 .917);--grass-4:color(display-p3 .872 .94 .865);--grass-5:color(display-p3 .811 .908 .802);--grass-6:color(display-p3 .733 .864 .724);--grass-7:color(display-p3 .628 .803 .622);--grass-8:color(display-p3 .477 .72 .482);--grass-9:color(display-p3 .38 .647 .378);--grass-10:color(display-p3 .344 .598 .342);--grass-11:color(display-p3 .263 .488 .261);--grass-12:color(display-p3 .151 .233 .153)}}}:root,.light,.light-theme{--cyan-1:#fafdfe;--cyan-2:#f2fafb;--cyan-3:#def7f9;--cyan-4:#caf1f6;--cyan-5:#b5e9f0;--cyan-6:#9ddde7;--cyan-7:#7dcedc;--cyan-8:#3db9cf;--cyan-9:#00a2c7;--cyan-10:#0797b9;--cyan-11:#107d98;--cyan-12:#0d3c48}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,.light,.light-theme{--cyan-1:color(display-p3 .982 .992 .996);--cyan-2:color(display-p3 .955 .981 .984);--cyan-3:color(display-p3 .888 .965 .975);--cyan-4:color(display-p3 .821 .941 .959);--cyan-5:color(display-p3 .751 .907 .935);--cyan-6:color(display-p3 .671 .862 .9);--cyan-7:color(display-p3 .564 .8 .854);--cyan-8:color(display-p3 .388 .715 .798);--cyan-9:color(display-p3 .282 .627 .765);--cyan-10:color(display-p3 .264 .583 .71);--cyan-11:color(display-p3 .08 .48 .63);--cyan-12:color(display-p3 .108 .232 .277)}}}:root,.light,.light-theme{--amber-1:#fefdfb;--amber-2:#fefbe9;--amber-3:#fff7c2;--amber-4:#ffee9c;--amber-5:#fbe577;--amber-6:#f3d673;--amber-7:#e9c162;--amber-8:#e2a336;--amber-9:#ffc53d;--amber-10:#ffba18;--amber-11:#ab6400;--amber-12:#4f3422}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,.light,.light-theme{--amber-1:color(display-p3 .995 .992 .985);--amber-2:color(display-p3 .994 .986 .921);--amber-3:color(display-p3 .994 .969 .782);--amber-4:color(display-p3 .989 .937 .65);--amber-5:color(display-p3 .97 .902 .527);--amber-6:color(display-p3 .936 .844 .506);--amber-7:color(display-p3 .89 .762 .443);--amber-8:color(display-p3 .85 .65 .3);--amber-9:color(display-p3 1 .77 .26);--amber-10:color(display-p3 .959 .741 .274);--amber-11:color(display-p3 .64 .4 0);--amber-12:color(display-p3 .294 .208 .145)}}}:root,.light,.light-theme{--red-1:#fffcfc;--red-2:#fff7f7;--red-3:#feebec;--red-4:#ffdbdc;--red-5:#ffcdce;--red-6:#fdbdbe;--red-7:#f4a9aa;--red-8:#eb8e90;--red-9:#e5484d;--red-10:#dc3e42;--red-11:#ce2c31;--red-12:#641723}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,.light,.light-theme{--red-1:color(display-p3 .998 .989 .988);--red-2:color(display-p3 .995 .971 .971);--red-3:color(display-p3 .985 .925 .925);--red-4:color(display-p3 .999 .866 .866);--red-5:color(display-p3 .984 .812 .811);--red-6:color(display-p3 .955 .751 .749);--red-7:color(display-p3 .915 .675 .672);--red-8:color(display-p3 .872 .575 .572);--red-9:color(display-p3 .83 .329 .324);--red-10:color(display-p3 .798 .294 .285);--red-11:color(display-p3 .744 .234 .222);--red-12:color(display-p3 .36 .115 .143)}}}.mdxeditor .cm-editor{--sp-font-mono:var(--font-mono);--sp-font-body:var(--font-body);padding:var(--sp-space-4) 0}.mdxeditor .sp-editor .cm-editor{padding-bottom:0}.mdxeditor .cm-scroller{padding:0!important}.mdxeditor .cm-focused{outline:none}.mdxeditor .sp-wrapper{overflow:hidden}.mdxeditor .sp-layout{border:none}.mdxeditor .sp-cm pre{white-space:break-spaces;word-break:break-word;overflow-wrap:anywhere;flex-shrink:1}.mdxeditor .cm-mergeView .cm-scroller,.mdxeditor .cm-sourceView .cm-scroller{font-family:var(--font-mono);line-height:1.3rem;font-size:var(--text-xs)}.mdxeditor .cm-gutters{font-size:var(--text-xxs);background:0 0}.mdxeditor .cm-activeLine{background:0 0}.mdxeditor .cm-tooltip-autocomplete{background:var(--baseBgSubtle)}.mdxeditor hr.selected[data-lexical-decorator=true]{outline:2px solid highlight}._editorRoot_f3hmk_53{--accentBase:var(--blue-1);--accentBgSubtle:var(--blue-2);--accentBg:var(--blue-3);--accentBgHover:var(--blue-4);--accentBgActive:var(--blue-5);--accentLine:var(--blue-6);--accentBorder:var(--blue-7);--accentBorderHover:var(--blue-8);--accentSolid:var(--blue-9);--accentSolidHover:var(--blue-10);--accentText:var(--blue-11);--accentTextContrast:var(--blue-12);--basePageBg:white;--baseBase:var(--slate-1);--baseBgSubtle:var(--slate-2);--baseBg:var(--slate-3);--baseBgHover:var(--slate-4);--baseBgActive:var(--slate-5);--baseLine:var(--slate-6);--baseBorder:var(--slate-7);--baseBorderHover:var(--slate-8);--baseSolid:var(--slate-9);--baseSolidHover:var(--slate-10);--baseText:var(--slate-11);--baseTextContrast:var(--slate-12);--admonitionTipBg:var(--cyan-4);--admonitionTipBorder:var(--cyan-8);--admonitionInfoBg:var(--grass-4);--admonitionInfoBorder:var(--grass-8);--admonitionCautionBg:var(--amber-4);--admonitionCautionBorder:var(--amber-8);--admonitionDangerBg:var(--red-4);--admonitionDangerBorder:var(--red-8);--admonitionNoteBg:var(--slate-4);--admonitionNoteBorder:var(--slate-8);--error-color:var(--red-10);--spacing-0:0px;--spacing-px:1px;--spacing-0_5:.125rem;--spacing-1:.25rem;--spacing-1_5:.375rem;--spacing-2:.5rem;--spacing-2_5:.625rem;--spacing-3:.75rem;--spacing-3_5:.875rem;--spacing-4:1rem;--spacing-5:1.25rem;--spacing-6:1.5rem;--spacing-7:1.75rem;--spacing-8:2rem;--spacing-9:2.25rem;--spacing-10:2.5rem;--spacing-11:2.75rem;--spacing-12:3rem;--spacing-14:3.5rem;--spacing-16:4rem;--spacing-20:5rem;--spacing-24:6rem;--spacing-28:7rem;--spacing-32:8rem;--spacing-36:9rem;--spacing-40:10rem;--spacing-44:11rem;--spacing-48:12rem;--spacing-52:13rem;--spacing-56:14rem;--spacing-60:15rem;--spacing-64:16rem;--spacing-72:18rem;--spacing-80:20rem;--spacing-96:24rem;--radius-none:0px;--radius-small:var(--spacing-0_5);--radius-base:var(--spacing-1);--radius-medium:var(--spacing-1_5);--radius-large:var(--spacing-2);--radius-extra-large:var(--spacing-3);--radius-full:9999px;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--font-body:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;--text-base:1rem;--text-sm:.875rem;--text-xs:.75rem;--text-xxs:.6rem;font-family:var(--font-body);color:var(--baseText)}._nestedListItem_f3hmk_158{list-style:none}._toolbarRoot_f3hmk_162{z-index:2;gap:var(--spacing-1);border-radius:var(--radius-medium);padding:var(--spacing-1_5);background-color:var(--baseBg);width:inherit;flex-direction:row;align-items:center;display:flex;position:sticky;top:0;overflow-x:auto}._toolbarRoot_f3hmk_162 div[role=separator]{margin:var(--spacing-2) var(--spacing-1);border-left:1px solid var(--baseBorder);border-right:1px solid var(--baseBase);height:var(--spacing-4)}._toolbarRoot_f3hmk_162 svg{color:var(--baseTextContrast);display:block}._readOnlyToolbarRoot_f3hmk_189{pointer-events:none;background:var(--baseBase)}._readOnlyToolbarRoot_f3hmk_189>div{opacity:.5}._toolbarModeSwitch_f3hmk_198{border:1px solid var(--baseBg);border-radius:var(--radius-medium);font-size:var(--text-xs);align-self:stretch;align-items:stretch;margin-left:auto;display:flex;opacity:1!important}._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208{padding-inline-start:var(--spacing-4);padding-inline-end:var(--spacing-4)}._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208:active,._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208[data-state=on]{background-color:var(--baseBorder)}._toolbarGroupOfGroups_f3hmk_219{margin:0 var(--spacing-1);display:flex}._toolbarToggleSingleGroup_f3hmk_224:first-of-type ._toolbarToggleItem_f3hmk_208:only-child,._toolbarToggleSingleGroup_f3hmk_224:only-child ._toolbarToggleItem_f3hmk_208:first-child,._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208:first-child{border-top-left-radius:var(--radius-base);border-bottom-left-radius:var(--radius-base)}._toolbarToggleSingleGroup_f3hmk_224:last-of-type ._toolbarToggleItem_f3hmk_208:only-child,._toolbarToggleSingleGroup_f3hmk_224:only-child ._toolbarToggleItem_f3hmk_208:last-child,._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208:last-child{border-top-right-radius:var(--radius-base);border-bottom-right-radius:var(--radius-base)}._toolbarToggleItem_f3hmk_208,._toolbarButton_f3hmk_239{all:unset;box-sizing:border-box;cursor:default;padding:var(--spacing-0_5)}@media(hover:hover){._toolbarToggleItem_f3hmk_208:hover,._toolbarButton_f3hmk_239:hover{background-color:var(--baseBgActive)}}._toolbarToggleItem_f3hmk_208:active svg,._toolbarButton_f3hmk_239:active svg{transform:translate(1px,1px)}._toolbarToggleItem_f3hmk_208[data-state=on],._toolbarButton_f3hmk_239[data-state=on],._toolbarToggleItem_f3hmk_208:active,._toolbarButton_f3hmk_239:active{color:var(--baseTextContrast);background-color:var(--baseBgActive)}._toolbarToggleItem_f3hmk_208[data-disabled],._toolbarButton_f3hmk_239[data-disabled]{pointer-events:none}._toolbarToggleItem_f3hmk_208[data-disabled] svg,._toolbarButton_f3hmk_239[data-disabled] svg{color:var(--baseBorderHover)}._toolbarButton_f3hmk_239{border-radius:var(--radius-base)}._toolbarButton_f3hmk_239+._toolbarButton_f3hmk_239{margin-left:var(--spacing-1)}._activeToolbarButton_f3hmk_275{color:var(--accentText)}._toolbarToggleSingleGroup_f3hmk_224{white-space:nowrap;align-items:center;display:flex}._toolbarNodeKindSelectContainer_f3hmk_285,._toolbarButtonDropdownContainer_f3hmk_286,._toolbarCodeBlockLanguageSelectContent_f3hmk_287,._selectContainer_f3hmk_288{filter:drop-shadow(0 2px 2px #0003);z-index:3;width:var(--spacing-36);border-bottom-left-radius:var(--radius-base);border-bottom-right-radius:var(--radius-base);background-color:var(--basePageBg);font-size:var(--text-sm)}._toolbarButtonDropdownContainer_f3hmk_286,._toolbarButtonDropdownContainer_f3hmk_286 ._selectItem_f3hmk_301:first-child{border-top-right-radius:var(--radius-base)}._toolbarNodeKindSelectTrigger_f3hmk_306,._toolbarButtonSelectTrigger_f3hmk_307,._selectTrigger_f3hmk_308{color:inherit;width:var(--spacing-36);padding:var(--spacing-0_5) var(--spacing-1);border-radius:var(--radius-medium);white-space:nowrap;font-size:var(--text-sm);background-color:#0000;background-color:var(--basePageBg);margin:0 var(--spacing-1);border:0;flex-wrap:nowrap;align-items:center;padding-inline-start:var(--spacing-2);display:flex}._toolbarNodeKindSelectTrigger_f3hmk_306[data-state=open],._toolbarButtonSelectTrigger_f3hmk_307[data-state=open],._selectTrigger_f3hmk_308[data-state=open]{filter:drop-shadow(0 2px 2px #0003);border-bottom-right-radius:var(--radius-none);border-bottom-left-radius:var(--radius-none)}._selectTrigger_f3hmk_308[data-placeholder]>span:first-child{color:var(--baseBorderHover)}._toolbarButtonSelectTrigger_f3hmk_307{width:auto;padding-inline-start:var(--spacing-2);padding-inline-end:var(--spacing-1);padding-block:var(--spacing-0_5)}._toolbarCodeBlockLanguageSelectTrigger_f3hmk_342,._toolbarCodeBlockLanguageSelectContent_f3hmk_287{width:var(--spacing-48)}._toolbarNodeKindSelectItem_f3hmk_347,._selectItem_f3hmk_301{cursor:default;padding:var(--spacing-2);display:flex}._toolbarNodeKindSelectItem_f3hmk_347[data-highlighted],._selectItem_f3hmk_301[data-highlighted]{background-color:var(--baseBg)}._toolbarNodeKindSelectItem_f3hmk_347[data-state=checked],._selectItem_f3hmk_301[data-state=checked]{color:var(--baseTextContrast);background-color:var(--baseBg)}._toolbarNodeKindSelectItem_f3hmk_347[data-highlighted],._selectItem_f3hmk_301[data-highlighted]{outline:none}._toolbarNodeKindSelectItem_f3hmk_347:last-child,._selectItem_f3hmk_301:last-child{border-bottom-left-radius:var(--radius-base);border-bottom-right-radius:var(--radius-base)}._toolbarNodeKindSelectDropdownArrow_f3hmk_372,._selectDropdownArrow_f3hmk_373{align-items:center;margin-left:auto;display:flex}._contentEditable_f3hmk_379{box-sizing:border-box;width:100%;color:var(--baseTextContrast);padding:var(--spacing-3)}._contentEditable_f3hmk_379:focus{outline:none}._codeMirrorWrapper_f3hmk_391{margin-bottom:var(--spacing-5);border:1px solid var(--baseLine);border-radius:var(--radius-medium);padding:.8rem;position:relative;overflow:hidden}._sandPackWrapper_f3hmk_400{margin-bottom:var(--spacing-5);border:1px solid var(--baseLine);border-radius:var(--radius-medium);position:relative;overflow:hidden}._codeMirrorToolbar_f3hmk_408{gap:var(--spacing-1);padding:var(--spacing-1);z-index:1;background-color:var(--baseBase);border-bottom-left-radius:var(--radius-base);display:flex;position:absolute;top:0;right:0}._frontmatterWrapper_f3hmk_412{border-radius:var(--radius-medium);padding:var(--spacing-3);background-color:var(--baseBgSubtle)}._frontmatterWrapper_f3hmk_412[data-expanded=true]{margin-bottom:var(--spacing-10)}._frontmatterToggleButton_f3hmk_422{all:unset;box-sizing:border-box;cursor:default;align-items:center;gap:var(--spacing-1);font-size:var(--text-sm);display:flex}._propertyPanelTitle_f3hmk_430{font-size:var(--text-xs);padding-top:var(--spacing-2);padding-left:var(--spacing-2);margin:0;font-weight:400}._propertyEditorTable_f3hmk_438{table-layout:fixed;border-spacing:var(--spacing-2)}._propertyEditorTable_f3hmk_438 th{text-align:left;font-size:var(--text-sm);padding:var(--spacing-2) var(--spacing-3)}._propertyEditorTable_f3hmk_438 col:first-child{width:30%}._propertyEditorTable_f3hmk_438 col:nth-child(2){width:70%}._propertyEditorTable_f3hmk_438 td:last-child ._iconButton_f3hmk_456{margin-left:var(--spacing-4);margin-right:var(--spacing-4)}._propertyEditorTable_f3hmk_438 ._readOnlyColumnCell_f3hmk_461{padding-left:0}._propertyEditorLabelCell_f3hmk_466{font-weight:400}._readOnlyColumnCell_f3hmk_461{padding-left:0}._buttonsFooter_f3hmk_474{justify-content:flex-end;gap:var(--spacing-2);display:flex}._propertyEditorInput_f3hmk_480{all:unset;box-sizing:border-box;cursor:default;width:100%;padding:var(--spacing-2) var(--spacing-3);border-radius:var(--radius-base);border:1px solid var(--baseBorder);background-color:var(--baseBase);font-size:var(--text-sm)}._iconButton_f3hmk_456{all:unset;box-sizing:border-box;cursor:default;color:var(--baseText)}@media(hover:hover){._iconButton_f3hmk_456:hover{color:var(--baseTextContrast)}}._iconButton_f3hmk_456:disabled,._iconButton_f3hmk_456:disabled:hover{color:var(--baseLine)}._primaryButton_f3hmk_506,._secondaryButton_f3hmk_507{all:unset;box-sizing:border-box;cursor:default;padding:var(--spacing-2) var(--spacing-3);border:1px solid var(--accentBorder);background-color:var(--accentSolidHover);color:var(--baseBase);font-size:var(--text-xs);border-radius:var(--radius-medium)}._primaryButton_f3hmk_506:disabled,._secondaryButton_f3hmk_507:disabled{background:var(--accentLine);border-color:var(--accentBg)}._smallButton_f3hmk_522{font-size:var(--text-xs);padding:var(--spacing-1) var(--spacing-2);border-radius:var(--radius-base)}._secondaryButton_f3hmk_507{border:1px solid var(--baseBorder);background-color:var(--baseSolidHover);color:var(--baseBase)}._dialogForm_f3hmk_534{gap:var(--spacing-2);flex-direction:row;display:flex}._linkDialogEditForm_f3hmk_540{align-items:stretch;gap:var(--spacing-2);flex-direction:column;padding:0;display:flex}._linkDialogInputContainer_f3hmk_548{flex-direction:column;align-items:stretch;display:flex}._linkDialogInputWrapper_f3hmk_554{background-color:var(--baseBase);border-radius:var(--radius-base);border:1px solid var(--baseBorder);align-items:center;display:flex}._linkDialogInputWrapper_f3hmk_554[data-visible-dropdown=true]{border-bottom-left-radius:var(--radius-none);border-bottom-right-radius:var(--radius-none);border-bottom-width:0}._linkDialogInputWrapper_f3hmk_554>button{all:unset;box-sizing:border-box;cursor:default;padding-right:var(--spacing-2)}._linkDialogInput_f3hmk_548,._dialogInput_f3hmk_575{all:unset;box-sizing:border-box;cursor:default;width:20rem;padding:var(--spacing-2) var(--spacing-3);font-size:var(--text-sm)}._linkDialogInput_f3hmk_548::-moz-placeholder{color:var(--baseBorder)}._dialogInput_f3hmk_575::-moz-placeholder{color:var(--baseBorder)}._linkDialogInput_f3hmk_548::placeholder,._dialogInput_f3hmk_575::placeholder{color:var(--baseBorder)}._linkDialogAnchor_f3hmk_586{z-index:-1;background-color:highlight;position:fixed}._linkDialogAnchor_f3hmk_586[data-visible=true]{visibility:visible}._linkDialogAnchor_f3hmk_586[data-visible=false]{visibility:hidden}._linkDialogPopoverContent_f3hmk_600,._tableColumnEditorPopoverContent_f3hmk_601,._dialogContent_f3hmk_602{filter:drop-shadow(0 2px 2px #0003);align-items:center;gap:var(--spacing-0_5);border-radius:var(--radius-medium);border:1px solid var(--baseBg);background-color:var(--basePageBg);padding:var(--spacing-1) var(--spacing-1);font-size:var(--text-sm);display:flex}._largeDialogContent_f3hmk_614{filter:drop-shadow(0 2px 2px #0003);gap:var(--spacing-0_5);border-radius:var(--radius-medium);border:1px solid var(--baseBorder);background-color:var(--baseBgSubtle);padding:var(--spacing-4);font-size:var(--text-sm)}._dialogTitle_f3hmk_624{font-size:var(--text-base);padding-left:var(--spacing-2);font-weight:600}._dialogCloseButton_f3hmk_630{all:unset;box-sizing:border-box;cursor:default;position:absolute;top:10px;right:10px}._popoverContent_f3hmk_637{filter:drop-shadow(0 2px 2px #0003);align-items:center;gap:var(--spacing-0_5);border-radius:var(--radius-medium);background-color:var(--baseBgSubtle);padding:var(--spacing-2) var(--spacing-2);font-size:var(--text-sm);z-index:1;display:flex}._popoverArrow_f3hmk_649{fill:var(--basePageBg)}._linkDialogPreviewAnchor_f3hmk_653{margin-right:var(--spacing-1);color:var(--accentText);border:1px solid #0000;align-items:center;text-decoration:none;display:flex}@media(hover:hover){._linkDialogPreviewAnchor_f3hmk_653:hover{color:var(--accentSolidHover)}}._linkDialogPreviewAnchor_f3hmk_653 span{text-overflow:ellipsis;white-space:nowrap;max-width:14rem;overflow-x:hidden}._tooltipTrigger_f3hmk_676{align-self:center}._tooltipContent_f3hmk_680{z-index:2;border-radius:var(--radius-medium);padding:var(--spacing-1) var(--spacing-2);font-size:var(--text-xs);background-color:var(--baseText);color:var(--baseBase);position:relative}._tooltipContent_f3hmk_680 svg{fill:var(--baseText)}._actionButton_f3hmk_694{all:unset;box-sizing:border-box;cursor:default;padding:var(--spacing-1);padding:var(--spacing-1) var(--spacing-1);border-radius:var(--radius-medium);color:var(--baseTextContrast)}._actionButton_f3hmk_694 svg{display:block}@media(hover:hover){._actionButton_f3hmk_694:hover{background-color:var(--baseBg)}}._actionButton_f3hmk_694:active svg{transform:translate(1px,1px)}._actionButton_f3hmk_694[data-state=on],._actionButton_f3hmk_694:active{background-color:var(--baseBg);color:var(--baseTextContrast)}._primaryActionButton_f3hmk_701{background-color:var(--accentSolid);color:var(--baseBase)}@media(hover:hover){._primaryActionButton_f3hmk_701:hover{background-color:var(--accentSolidHover);color:var(--baseBase)}}._tableEditor_f3hmk_713{table-layout:fixed;border-spacing:0;border-collapse:collapse;width:100%;height:100%}._tableEditor_f3hmk_713 thead>tr>th{text-align:right}._tableEditor_f3hmk_713>tbody>tr>td:not(._toolCell_f3hmk_724),._tableEditor_f3hmk_713>tbody>tr>th:not(._toolCell_f3hmk_724):not([data-tool-cell=true]){border:1px solid var(--baseBgActive);padding:var(--spacing-1) var(--spacing-2);white-space:normal}:is(._tableEditor_f3hmk_713>tbody>tr>td:not(._toolCell_f3hmk_724),._tableEditor_f3hmk_713>tbody>tr>th:not(._toolCell_f3hmk_724):not([data-tool-cell=true]))>div{outline:none}:is(._tableEditor_f3hmk_713>tbody>tr>td:not(._toolCell_f3hmk_724),._tableEditor_f3hmk_713>tbody>tr>th:not(._toolCell_f3hmk_724):not([data-tool-cell=true]))>div>p{margin:0}[data-active=true]:is(._tableEditor_f3hmk_713>tbody>tr>td:not(._toolCell_f3hmk_724),._tableEditor_f3hmk_713>tbody>tr>th:not(._toolCell_f3hmk_724):not([data-tool-cell=true])){outline:solid 1px var(--baseSolid)}._tableEditor_f3hmk_713 ._tableColumnEditorTrigger_f3hmk_743,._tableEditor_f3hmk_713 ._tableRowEditorTrigger_f3hmk_744,._tableEditor_f3hmk_713 ._addRowButton_f3hmk_745,._tableEditor_f3hmk_713 ._addColumnButton_f3hmk_746,._tableEditor_f3hmk_713 ._iconButton_f3hmk_456{opacity:.15}@media(hover:hover){._tableEditor_f3hmk_713:hover ._tableColumnEditorTrigger_f3hmk_743,._tableEditor_f3hmk_713:hover ._tableRowEditorTrigger_f3hmk_744,._tableEditor_f3hmk_713:hover ._addRowButton_f3hmk_745,._tableEditor_f3hmk_713:hover ._addColumnButton_f3hmk_746,._tableEditor_f3hmk_713:hover ._iconButton_f3hmk_456{opacity:.3}._tableEditor_f3hmk_713:hover ._tableColumnEditorTrigger_f3hmk_743:hover,._tableEditor_f3hmk_713:hover ._tableRowEditorTrigger_f3hmk_744:hover,._tableEditor_f3hmk_713:hover ._addRowButton_f3hmk_745:hover,._tableEditor_f3hmk_713:hover ._addColumnButton_f3hmk_746:hover,._tableEditor_f3hmk_713:hover ._iconButton_f3hmk_456:hover{opacity:1}}._toolCell_f3hmk_724{text-align:right}._toolCell_f3hmk_724 button{margin:auto;display:block}._tableColumnEditorTrigger_f3hmk_743{all:unset;box-sizing:border-box;cursor:default;color:var(--baseTextContrast);padding:var(--spacing-1);border-radius:var(--radius-full);opacity:.2}._tableColumnEditorTrigger_f3hmk_743 svg{display:block}@media(hover:hover){._tableColumnEditorTrigger_f3hmk_743:hover{background-color:var(--baseBg)}}._tableColumnEditorTrigger_f3hmk_743:active svg{transform:translate(1px,1px)}._tableColumnEditorTrigger_f3hmk_743[data-state=on],._tableColumnEditorTrigger_f3hmk_743:active{background-color:var(--baseBg);color:var(--baseTextContrast)}._tableColumnEditorTrigger_f3hmk_743[data-active=true]{opacity:1!important}._tableColumnEditorToolbar_f3hmk_788{display:flex}._tableColumnEditorToolbar_f3hmk_788>button{all:unset;box-sizing:border-box;cursor:default;padding:var(--spacing-1);color:var(--baseTextContrast)}._tableColumnEditorToolbar_f3hmk_788>button svg{display:block}@media(hover:hover){._tableColumnEditorToolbar_f3hmk_788>button:hover{background-color:var(--baseBg)}}._tableColumnEditorToolbar_f3hmk_788>button:active svg{transform:translate(1px,1px)}._tableColumnEditorToolbar_f3hmk_788>button[data-state=on],._tableColumnEditorToolbar_f3hmk_788>button:active{background-color:var(--baseBg);color:var(--baseTextContrast)}._tableColumnEditorToolbar_f3hmk_788 [role=separator]{margin-left:var(--spacing-1);margin-right:var(--spacing-1)}._toggleGroupRoot_f3hmk_801{display:inline-flex}._toggleGroupRoot_f3hmk_801 button{all:unset;box-sizing:border-box;cursor:default;padding:var(--spacing-1);color:var(--baseTextContrast)}._toggleGroupRoot_f3hmk_801 button svg{display:block}@media(hover:hover){._toggleGroupRoot_f3hmk_801 button:hover{background-color:var(--baseBg)}}._toggleGroupRoot_f3hmk_801 button:active svg{transform:translate(1px,1px)}._toggleGroupRoot_f3hmk_801 button[data-state=on],._toggleGroupRoot_f3hmk_801 button:active{background-color:var(--baseBg);color:var(--baseTextContrast)}._toggleGroupRoot_f3hmk_801 button:first-child{border-top-left-radius:var(--radius-base);border-bottom-left-radius:var(--radius-base)}._toggleGroupRoot_f3hmk_801 button:last-child{border-top-right-radius:var(--radius-base);border-bottom-right-radius:var(--radius-base)}._tableToolsColumn_f3hmk_819{width:2rem}._tableToolsColumn_f3hmk_819 button{margin:auto;display:block}._leftAlignedCell_f3hmk_828{text-align:left}._rightAlignedCell_f3hmk_832{text-align:right}._centeredCell_f3hmk_836{text-align:center}._addColumnButton_f3hmk_746,._addRowButton_f3hmk_745{all:unset;box-sizing:border-box;cursor:default;padding:var(--spacing-1);color:var(--baseTextContrast);background-color:var(--baseBase);align-items:center;display:flex}._addColumnButton_f3hmk_746 svg,._addRowButton_f3hmk_745 svg{display:block}@media(hover:hover){._addColumnButton_f3hmk_746:hover,._addRowButton_f3hmk_745:hover{background-color:var(--baseBg)}}._addColumnButton_f3hmk_746:active svg,._addRowButton_f3hmk_745:active svg{transform:translate(1px,1px)}._addColumnButton_f3hmk_746[data-state=on],._addRowButton_f3hmk_745[data-state=on],._addColumnButton_f3hmk_746:active,._addRowButton_f3hmk_745:active{background-color:var(--baseBg);color:var(--baseTextContrast)}._addColumnButton_f3hmk_746 svg,._addRowButton_f3hmk_745 svg{margin:auto}._addRowButton_f3hmk_745{width:100%;margin-top:var(--spacing-px);box-sizing:border-box;border-bottom-right-radius:var(--radius-medium);border-bottom-left-radius:var(--radius-medium)}._addColumnButton_f3hmk_746{margin-left:var(--spacing-px);border-top-right-radius:var(--radius-medium);border-bottom-right-radius:var(--radius-medium);height:100%}._dialogOverlay_f3hmk_869{background-color:var(--baseBase);z-index:51;opacity:.5;animation:.15s cubic-bezier(.16,1,.3,1) _overlayShow_f3hmk_1;position:fixed;inset:0}._dialogContent_f3hmk_602,._largeDialogContent_f3hmk_614{z-index:52;animation:.15s cubic-bezier(.16,1,.3,1) _contentShow_f3hmk_1;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}._dialogContent_f3hmk_602:focus,._largeDialogContent_f3hmk_614:focus{outline:none}@keyframes _overlayShow_f3hmk_1{0%{opacity:0}to{opacity:.5}}@keyframes _contentShow_f3hmk_1{0%{opacity:0;transform:translate(-50%,-48%)scale(.96)}to{opacity:1;transform:translate(-50%,-50%)scale(1)}}._focusedImage_f3hmk_915{outline:2px solid highlight}._imageWrapper_f3hmk_919{display:inline-block;position:relative}._imageWrapper_f3hmk_919[draggable=true]{cursor:move;cursor:grab;cursor:-webkit-grab}._editImageToolbar_f3hmk_932{gap:var(--spacing-1);padding:var(--spacing-1);z-index:1;background-color:var(--baseBase);border-bottom-left-radius:var(--radius-base);display:flex;position:absolute;top:0;right:0}._editImageButton_f3hmk_936 svg{display:block}._inlineEditor_f3hmk_942{border-radius:var(--radius-medium);padding:var(--spacing-1);gap:var(--spacing-2);background:var(--baseBg);align-items:center;display:inline-flex}._blockEditor_f3hmk_951{border-radius:var(--radius-medium);padding:var(--spacing-2);justify-content:stretch;gap:var(--spacing-2);background:var(--baseBg);align-items:center;display:flex}._blockEditor_f3hmk_951 ._nestedEditor_f3hmk_960{flex-grow:1}._nestedEditor_f3hmk_960{background:var(--basePageBg);padding:var(--spacing-1) var(--spacing-2);border-radius:var(--radius-medium)}._nestedEditor_f3hmk_960>p{margin:0}._nestedEditor_f3hmk_960:focus{outline:none}._genericComponentName_f3hmk_979{font-size:var(--text-sm);color:var(--baseText);padding-right:var(--spacing-2)}._diffSourceToggleWrapper_f3hmk_985{pointer-events:auto;opacity:1;margin-left:auto;position:sticky;right:0}._diffSourceToggle_f3hmk_985{border-radius:var(--radius-medium);background-color:var(--baseBase);display:flex}._diffSourceToggle_f3hmk_985 ._toolbarToggleItem_f3hmk_208{padding:0}._diffSourceToggle_f3hmk_985 ._toolbarToggleItem_f3hmk_208>span{padding:var(--spacing-1) var(--spacing-1);display:block}._selectWithLabel_f3hmk_1011{align-items:center;gap:var(--spacing-2);margin-left:var(--spacing-2);display:flex}._selectWithLabel_f3hmk_1011>label{font-size:var(--text-sm)}._selectWithLabel_f3hmk_1011 ._selectTrigger_f3hmk_308{border:1px solid var(--baseBorder)}._toolbarTitleMode_f3hmk_1026{font-size:var(--text-sm);margin-left:var(--spacing-2)}._imageControlWrapperResizing_f3hmk_1031{touch-action:none}._imageResizer_f3hmk_1035{background-color:var(--accentText);border:1px solid var(--baseBg);width:7px;height:7px;display:block;position:absolute}._imageResizer_f3hmk_1035._imageResizerN_f3hmk_1044{cursor:n-resize;top:-6px;left:48%}._imageResizer_f3hmk_1035._imageResizerNe_f3hmk_1050{cursor:ne-resize;top:-6px;right:-6px}._imageResizer_f3hmk_1035._imageResizerE_f3hmk_1056{cursor:e-resize;bottom:48%;right:-6px}._imageResizer_f3hmk_1035._imageResizerSe_f3hmk_1062{cursor:nwse-resize;bottom:-2px;right:-6px}._imageResizer_f3hmk_1035._imageResizerS_f3hmk_1062{cursor:s-resize;bottom:-2px;left:48%}._imageResizer_f3hmk_1035._imageResizerSw_f3hmk_1074{cursor:sw-resize;bottom:-2px;left:-6px}._imageResizer_f3hmk_1035._imageResizerW_f3hmk_1080{cursor:w-resize;bottom:48%;left:-6px}._imageResizer_f3hmk_1035._imageResizerNw_f3hmk_1086{cursor:nw-resize;top:-6px;left:-6px}._imagePlaceholder_f3hmk_1092{border:2px dashed;width:fit-content;height:fit-content;margin:12px;padding:48px}._imageDimensionsContainer_f3hmk_1100{gap:var(--spacing-4);display:flex}._placeholder_f3hmk_1105{color:var(--baseSolid);padding:var(--spacing-3);text-overflow:ellipsis;-webkit-user-select:none;user-select:none;white-space:nowrap;pointer-events:none;display:inline-block;position:absolute;top:0;overflow:hidden}._rootContentEditableWrapper_f3hmk_1118{position:relative}._downshiftContainer_f3hmk_1122{flex-direction:column;align-items:stretch;display:flex}._downshiftInputWrapper_f3hmk_1128{background-color:var(--baseBase);border-radius:var(--radius-base);border:1px solid var(--baseBorder);align-items:center;display:flex}._downshiftInputWrapper_f3hmk_1128[data-visible-dropdown=true]{border-bottom-left-radius:var(--radius-none);border-bottom-right-radius:var(--radius-none);border-bottom-width:0}._downshiftInputWrapper_f3hmk_1128>button{all:unset;box-sizing:border-box;cursor:default;padding-right:var(--spacing-2)}._downshiftInput_f3hmk_1128{all:unset;box-sizing:border-box;cursor:default;width:20rem;padding:var(--spacing-2) var(--spacing-3);font-size:var(--text-sm)}._downshiftInput_f3hmk_1128::placeholder{color:var(--baseBorder)}._downshiftAutocompleteContainer_f3hmk_1159{position:relative}._downshiftAutocompleteContainer_f3hmk_1159 ul{all:unset;box-sizing:border-box;font-size:var(--text-sm);border-bottom-left-radius:var(--radius-medium);border-bottom-right-radius:var(--radius-medium);width:100%;max-height:var(--spacing-48);border:1px solid var(--baseBorder);background-color:var(--baseBase);border-top-width:0;display:none;position:absolute;overflow:hidden auto}._downshiftAutocompleteContainer_f3hmk_1159 ul[data-visible=true]{display:block}._downshiftAutocompleteContainer_f3hmk_1159 ul li{padding:var(--spacing-2) var(--spacing-3);white-space:nowrap;margin-bottom:var(--spacing-1);text-overflow:ellipsis;overflow-x:hidden}._downshiftAutocompleteContainer_f3hmk_1159 ul li[data-selected=true]{background-color:var(--baseBgSubtle)}._downshiftAutocompleteContainer_f3hmk_1159 ul li[data-highlighted=true]{background-color:var(--baseBgHover)}._downshiftAutocompleteContainer_f3hmk_1159 ul li:last-of-type{border-bottom-left-radius:var(--radius-medium);border-bottom-right-radius:var(--radius-medium)}._textInput_f3hmk_1205{all:unset;border-radius:var(--radius-base);border:1px solid var(--baseBorder);background-color:var(--baseBase);padding:var(--spacing-2) var(--spacing-3)}form._multiFieldForm_f3hmk_1213{padding:var(--spacing-2);gap:var(--spacing-2);flex-direction:column;display:flex}form._multiFieldForm_f3hmk_1213 ._formField_f3hmk_1219{gap:var(--spacing-2);flex-direction:column;display:flex}form._multiFieldForm_f3hmk_1213 ._formField_f3hmk_1219 label{font-size:var(--text-xs)}._markdownParseError_f3hmk_1230{border-radius:var(--radius-base);border:1px solid var(--error-color);padding:var(--spacing-2);margin-block:var(--spacing-2);color:var(--error-color);font-size:var(--text-xs)}._popupContainer_f3hmk_1239{z-index:2;position:relative}._inputSizer_f3hmk_1244{vertical-align:baseline;align-items:center;display:inline-grid;position:relative}._inputSizer_f3hmk_1244:after,._inputSizer_f3hmk_1244 input{width:auto;min-width:1rem;font:inherit;resize:none;appearance:none;color:inherit;background:0 0;border:none;grid-area:1/2;margin:0;padding:0 2px}._inputSizer_f3hmk_1244 span{padding:.25em}._inputSizer_f3hmk_1244:after{content:attr(data-value);white-space:pre-wrap}:root,._light_6j9u9_1,._light-theme_6j9u9_1{--blue-1:#fbfdff;--blue-2:#f4faff;--blue-3:#e6f4fe;--blue-4:#d5efff;--blue-5:#c2e5ff;--blue-6:#acd8fc;--blue-7:#8ec8f6;--blue-8:#5eb1ef;--blue-9:#0090ff;--blue-10:#0588f0;--blue-11:#0d74ce;--blue-12:#113264}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,._light_6j9u9_1,._light-theme_6j9u9_1{--blue-1:color(display-p3 .986 .992 .999);--blue-2:color(display-p3 .96 .979 .998);--blue-3:color(display-p3 .912 .956 .991);--blue-4:color(display-p3 .853 .932 1);--blue-5:color(display-p3 .788 .894 .998);--blue-6:color(display-p3 .709 .843 .976);--blue-7:color(display-p3 .606 .777 .947);--blue-8:color(display-p3 .451 .688 .917);--blue-9:color(display-p3 .247 .556 .969);--blue-10:color(display-p3 .234 .523 .912);--blue-11:color(display-p3 .15 .44 .84);--blue-12:color(display-p3 .102 .193 .379)}}}._dark_6j9u9_1,._dark-theme_6j9u9_1{--blue-1:#0d1520;--blue-2:#111927;--blue-3:#0d2847;--blue-4:#003362;--blue-5:#004074;--blue-6:#104d87;--blue-7:#205d9e;--blue-8:#2870bd;--blue-9:#0090ff;--blue-10:#3b9eff;--blue-11:#70b8ff;--blue-12:#c2e6ff}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){._dark_6j9u9_1,._dark-theme_6j9u9_1{--blue-1:color(display-p3 .057 .081 .122);--blue-2:color(display-p3 .072 .098 .147);--blue-3:color(display-p3 .078 .154 .27);--blue-4:color(display-p3 .033 .197 .37);--blue-5:color(display-p3 .08 .245 .441);--blue-6:color(display-p3 .14 .298 .511);--blue-7:color(display-p3 .195 .361 .6);--blue-8:color(display-p3 .239 .434 .72);--blue-9:color(display-p3 .247 .556 .969);--blue-10:color(display-p3 .344 .612 .973);--blue-11:color(display-p3 .49 .72 1);--blue-12:color(display-p3 .788 .898 .99)}}}:root,._light_6j9u9_1,._light-theme_6j9u9_1{--slate-1:#fcfcfd;--slate-2:#f9f9fb;--slate-3:#f0f0f3;--slate-4:#e8e8ec;--slate-5:#e0e1e6;--slate-6:#d9d9e0;--slate-7:#cdced6;--slate-8:#b9bbc6;--slate-9:#8b8d98;--slate-10:#80838d;--slate-11:#60646c;--slate-12:#1c2024}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,._light_6j9u9_1,._light-theme_6j9u9_1{--slate-1:color(display-p3 .988 .988 .992);--slate-2:color(display-p3 .976 .976 .984);--slate-3:color(display-p3 .94 .941 .953);--slate-4:color(display-p3 .908 .909 .925);--slate-5:color(display-p3 .88 .881 .901);--slate-6:color(display-p3 .85 .852 .876);--slate-7:color(display-p3 .805 .808 .838);--slate-8:color(display-p3 .727 .733 .773);--slate-9:color(display-p3 .547 .553 .592);--slate-10:color(display-p3 .503 .512 .549);--slate-11:color(display-p3 .379 .392 .421);--slate-12:color(display-p3 .113 .125 .14)}}}._dark_6j9u9_1,._dark-theme_6j9u9_1{--slate-1:#111113;--slate-2:#18191b;--slate-3:#212225;--slate-4:#272a2d;--slate-5:#2e3135;--slate-6:#363a3f;--slate-7:#43484e;--slate-8:#5a6169;--slate-9:#696e77;--slate-10:#777b84;--slate-11:#b0b4ba;--slate-12:#edeef0}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){._dark_6j9u9_1,._dark-theme_6j9u9_1{--slate-1:color(display-p3 .067 .067 .074);--slate-2:color(display-p3 .095 .098 .105);--slate-3:color(display-p3 .13 .135 .145);--slate-4:color(display-p3 .156 .163 .176);--slate-5:color(display-p3 .183 .191 .206);--slate-6:color(display-p3 .215 .226 .244);--slate-7:color(display-p3 .265 .28 .302);--slate-8:color(display-p3 .357 .381 .409);--slate-9:color(display-p3 .415 .431 .463);--slate-10:color(display-p3 .469 .483 .514);--slate-11:color(display-p3 .692 .704 .728);--slate-12:color(display-p3 .93 .933 .94)}}}:root,._light_6j9u9_1,._light-theme_6j9u9_1{--grass-1:#fbfefb;--grass-2:#f5fbf5;--grass-3:#e9f6e9;--grass-4:#daf1db;--grass-5:#c9e8ca;--grass-6:#b2ddb5;--grass-7:#94ce9a;--grass-8:#65ba74;--grass-9:#46a758;--grass-10:#3e9b4f;--grass-11:#2a7e3b;--grass-12:#203c25}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,._light_6j9u9_1,._light-theme_6j9u9_1{--grass-1:color(display-p3 .986 .996 .985);--grass-2:color(display-p3 .966 .983 .964);--grass-3:color(display-p3 .923 .965 .917);--grass-4:color(display-p3 .872 .94 .865);--grass-5:color(display-p3 .811 .908 .802);--grass-6:color(display-p3 .733 .864 .724);--grass-7:color(display-p3 .628 .803 .622);--grass-8:color(display-p3 .477 .72 .482);--grass-9:color(display-p3 .38 .647 .378);--grass-10:color(display-p3 .344 .598 .342);--grass-11:color(display-p3 .263 .488 .261);--grass-12:color(display-p3 .151 .233 .153)}}}:root,._light_6j9u9_1,._light-theme_6j9u9_1{--cyan-1:#fafdfe;--cyan-2:#f2fafb;--cyan-3:#def7f9;--cyan-4:#caf1f6;--cyan-5:#b5e9f0;--cyan-6:#9ddde7;--cyan-7:#7dcedc;--cyan-8:#3db9cf;--cyan-9:#00a2c7;--cyan-10:#0797b9;--cyan-11:#107d98;--cyan-12:#0d3c48}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,._light_6j9u9_1,._light-theme_6j9u9_1{--cyan-1:color(display-p3 .982 .992 .996);--cyan-2:color(display-p3 .955 .981 .984);--cyan-3:color(display-p3 .888 .965 .975);--cyan-4:color(display-p3 .821 .941 .959);--cyan-5:color(display-p3 .751 .907 .935);--cyan-6:color(display-p3 .671 .862 .9);--cyan-7:color(display-p3 .564 .8 .854);--cyan-8:color(display-p3 .388 .715 .798);--cyan-9:color(display-p3 .282 .627 .765);--cyan-10:color(display-p3 .264 .583 .71);--cyan-11:color(display-p3 .08 .48 .63);--cyan-12:color(display-p3 .108 .232 .277)}}}:root,._light_6j9u9_1,._light-theme_6j9u9_1{--amber-1:#fefdfb;--amber-2:#fefbe9;--amber-3:#fff7c2;--amber-4:#ffee9c;--amber-5:#fbe577;--amber-6:#f3d673;--amber-7:#e9c162;--amber-8:#e2a336;--amber-9:#ffc53d;--amber-10:#ffba18;--amber-11:#ab6400;--amber-12:#4f3422}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,._light_6j9u9_1,._light-theme_6j9u9_1{--amber-1:color(display-p3 .995 .992 .985);--amber-2:color(display-p3 .994 .986 .921);--amber-3:color(display-p3 .994 .969 .782);--amber-4:color(display-p3 .989 .937 .65);--amber-5:color(display-p3 .97 .902 .527);--amber-6:color(display-p3 .936 .844 .506);--amber-7:color(display-p3 .89 .762 .443);--amber-8:color(display-p3 .85 .65 .3);--amber-9:color(display-p3 1 .77 .26);--amber-10:color(display-p3 .959 .741 .274);--amber-11:color(display-p3 .64 .4 0);--amber-12:color(display-p3 .294 .208 .145)}}}:root,._light_6j9u9_1,._light-theme_6j9u9_1{--red-1:#fffcfc;--red-2:#fff7f7;--red-3:#feebec;--red-4:#ffdbdc;--red-5:#ffcdce;--red-6:#fdbdbe;--red-7:#f4a9aa;--red-8:#eb8e90;--red-9:#e5484d;--red-10:#dc3e42;--red-11:#ce2c31;--red-12:#641723}@supports (color:color(display-p3 1 1 1)){@media(color-gamut:p3){:root,._light_6j9u9_1,._light-theme_6j9u9_1{--red-1:color(display-p3 .998 .989 .988);--red-2:color(display-p3 .995 .971 .971);--red-3:color(display-p3 .985 .925 .925);--red-4:color(display-p3 .999 .866 .866);--red-5:color(display-p3 .984 .812 .811);--red-6:color(display-p3 .955 .751 .749);--red-7:color(display-p3 .915 .675 .672);--red-8:color(display-p3 .872 .575 .572);--red-9:color(display-p3 .83 .329 .324);--red-10:color(display-p3 .798 .294 .285);--red-11:color(display-p3 .744 .234 .222);--red-12:color(display-p3 .36 .115 .143)}}}._bold_6j9u9_10{font-weight:700}._italic_6j9u9_14{font-style:italic}._underline_6j9u9_18{text-decoration:underline}._strikethrough_6j9u9_34{text-decoration:line-through}._underlineStrikethrough_6j9u9_38{text-decoration:underline line-through}._subscript_6j9u9_42{font-size:.8em;vertical-align:sub!important}._superscript_6j9u9_47{vertical-align:super;font-size:.8em}._code_6j9u9_52{background-color:var(--baseBg);font-family:var(--font-mono);padding:1px .25rem;font-size:94%}._quote_6j9u9_59{border-inline-start:3px solid var(--baseBorder);color:var(--baseText);margin-inline-start:0;padding-inline-start:var(--spacing-4)}._nestedListItem_6j9u9_66{list-style:none}._listitem_6j9u9_76{margin:var(--spacing-2) 0}._listItemChecked_6j9u9_80,._listItemUnchecked_6j9u9_81{padding-left:var(--spacing-6);padding-right:var(--spacing-6);margin-left:0;margin-right:0;outline:none;margin-inline-start:-1rem;list-style-type:none;position:relative}._listItemChecked_6j9u9_80{text-decoration:line-through}._listItemUnchecked_6j9u9_81:before,._listItemChecked_6j9u9_80:before{content:"";width:var(--spacing-4);height:var(--spacing-4);cursor:pointer;background-size:cover;display:block;position:absolute;top:0;left:0}._listItemUnchecked_6j9u9_81[dir=rtl]:before,._listItemChecked_6j9u9_80[dir=rtl]:before{left:auto;right:0}._listItemUnchecked_6j9u9_81:focus:before,._listItemChecked_6j9u9_80:focus:before{box-shadow:0 0 0 2px var(--accentBgActive);border-radius:var(--radius-small)}._listItemUnchecked_6j9u9_81:before{border:1px solid var(--baseBorder);border-radius:var(--radius-small)}._listItemChecked_6j9u9_80:before{border:1px solid var(--accentBorder);border-radius:var(--radius-small);background-color:var(--accentSolid);background-repeat:no-repeat}._listItemChecked_6j9u9_80:after{content:"";cursor:pointer;border-color:var(--baseBase);top:var(--spacing-0_5);width:var(--spacing-1);left:var(--spacing-1_5);right:var(--spacing-1_5);height:var(--spacing-2);border-style:solid;border-width:0 var(--spacing-0_5) var(--spacing-0_5) 0;display:block;position:absolute;transform:rotate(45deg)}._nestedListItem_6j9u9_66{list-style-type:none}._nestedListItem_6j9u9_66:before,._nestedListItem_6j9u9_66:after{display:none}._admonitionDanger_6j9u9_158,._admonitionInfo_6j9u9_159,._admonitionNote_6j9u9_160,._admonitionTip_6j9u9_161,._admonitionCaution_6j9u9_162{padding:var(--spacing-2);margin-top:var(--spacing-2);margin-bottom:var(--spacing-2);border-left:3px solid var(--admonitionBorder);background-color:var(--admonitionBg)}._admonitionInfo_6j9u9_159{--admonitionBorder:var(--admonitionInfoBorder);--admonitionBg:var(--admonitionInfoBg)}._admonitionTip_6j9u9_161{--admonitionBorder:var(--admonitionTipBorder);--admonitionBg:var(--admonitionTipBg)}._admonitionCaution_6j9u9_162{--admonitionBorder:var(--admonitionCautionBorder);--admonitionBg:var(--admonitionCautionBg)}._admonitionDanger_6j9u9_158{--admonitionBorder:var(--admonitionDangerBorder);--admonitionBg:var(--admonitionDangerBg)}._admonitionNote_6j9u9_160{--admonitionBorder:var(--admonitionNoteBorder);--admonitionBg:var(--admonitionNoteBg)}._mdxExpression_6j9u9_195{font-family:var(--font-mono);color:var(--accentText);font-size:84%}._mdxExpression_6j9u9_195 input:focus-visible{outline:none} diff --git a/pkg/cli/webapp/dist/assets/index-CkOjEmto.js b/pkg/cli/webapp/dist/assets/index-CkOjEmto.js new file mode 100644 index 0000000..dc5df36 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-CkOjEmto.js @@ -0,0 +1 @@ +import{e as G,E as A,C as N,s as I,t as p,h as Y,g as k,j,a as U,L as Z,i as B,f as D,v as M}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const h=1,F=2,L=3,K=4,H=5,J=36,ee=37,te=38,Oe=11,oe=13;function re(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function ne(e){return e==9||e==10||e==13||e==32}let Q=null,V=null,X=0;function W(e,t){let o=e.pos+t;if(V==e&&X==o)return Q;for(;ne(e.peek(t));)t++;let O="";for(;;){let r=e.peek(t);if(!re(r))break;O+=String.fromCharCode(r),t++}return V=e,X=o,Q=O||null}function _(e,t){this.name=e,this.parent=t}const ae=new N({start:null,shift(e,t,o,O){return t==h?new _(W(O,1)||"",e):e},reduce(e,t){return t==Oe&&e?e.parent:e},reuse(e,t,o,O){let r=t.type.id;return r==h||r==oe?new _(W(O,1)||"",e):e},strict:!1}),le=new A((e,t)=>{if(e.next==60){if(e.advance(),e.next==47){e.advance();let o=W(e,0);if(!o)return e.acceptToken(H);if(t.context&&o==t.context.name)return e.acceptToken(F);for(let O=t.context;O;O=O.parent)if(O.name==o)return e.acceptToken(L,-2);e.acceptToken(K)}else if(e.next!=33&&e.next!=63)return e.acceptToken(h)}},{contextual:!0});function y(e,t){return new A(o=>{let O=0,r=t.charCodeAt(0);e:for(;!(o.next<0);o.advance(),O++)if(o.next==r){for(let a=1;a"),ie=y(ee,"?>"),ce=y(te,"]]>"),me=I({Text:p.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":p.angleBracket,TagName:p.tagName,"MismatchedCloseTag/TagName":[p.tagName,p.invalid],AttributeName:p.attributeName,AttributeValue:p.attributeValue,Is:p.definitionOperator,"EntityReference CharacterReference":p.character,Comment:p.blockComment,ProcessingInst:p.processingInstruction,DoctypeDecl:p.documentMeta,Cdata:p.special(p.string)}),$e=G.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO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_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[le,se,ie,ce,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function T(e,t){let o=t&&t.getChild("TagName");return o?e.sliceString(o.from,o.to):""}function P(e,t){let o=t&&t.firstChild;return!o||o.name!="OpenTag"?"":T(e,o)}function Se(e,t,o){let O=t&&t.getChildren("Attribute").find(a=>a.from<=o&&a.to>=o),r=O&&O.getChild("AttributeName");return r?e.sliceString(r.from,r.to):""}function C(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name=="Element")return t;return null}function ge(e,t){var o;let O=k(e).resolveInner(t,-1),r=null;for(let a=O;!r&&a.parent;a=a.parent)(a.name=="OpenTag"||a.name=="CloseTag"||a.name=="SelfClosingTag"||a.name=="MismatchedCloseTag")&&(r=a);if(r&&(r.to>t||r.lastChild.type.isError)){let a=r.parent;if(O.name=="TagName")return r.name=="CloseTag"||r.name=="MismatchedCloseTag"?{type:"closeTag",from:O.from,context:a}:{type:"openTag",from:O.from,context:C(a)};if(O.name=="AttributeName")return{type:"attrName",from:O.from,context:r};if(O.name=="AttributeValue")return{type:"attrValue",from:O.from,context:r};let s=O==r||O.name=="Attribute"?O.childBefore(t):O;return s?.name=="StartTag"?{type:"openTag",from:t,context:C(a)}:s?.name=="StartCloseTag"&&s.to<=t?{type:"closeTag",from:t,context:a}:s?.name=="Is"?{type:"attrValue",from:t,context:r}:s?{type:"attrName",from:t,context:r}:null}else if(O.name=="StartCloseTag")return{type:"closeTag",from:t,context:O.parent};for(;O.parent&&O.to==t&&!(!((o=O.lastChild)===null||o===void 0)&&o.type.isError);)O=O.parent;return O.name=="Element"||O.name=="Text"||O.name=="Document"?{type:"tag",from:t,context:O.name=="Element"?O:C(O)}:null}class ue{constructor(t,o,O){this.attrs=o,this.attrValues=O,this.children=[],this.name=t.name,this.completion=Object.assign(Object.assign({type:"type"},t.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=t.textContent?t.textContent.map(r=>({label:r,type:"text"})):[]}}const b=/^[:\-\.\w\u00b7-\uffff]*$/;function E(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function R(e){return typeof e=="string"?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function pe(e,t){let o=[],O=[],r=Object.create(null);for(let n of t){let $=E(n);o.push($),n.global&&O.push($),n.values&&(r[n.name]=n.values.map(R))}let a=[],s=[],f=Object.create(null);for(let n of e){let $=O,c=r;n.attributes&&($=$.concat(n.attributes.map(l=>typeof l=="string"?o.find(d=>d.label==l)||{label:l,type:"property"}:(l.values&&(c==r&&(c=Object.create(c)),c[l.name]=l.values.map(R)),E(l)))));let u=new ue(n,$,c);f[u.name]=u,a.push(u),n.top&&s.push(u)}s.length||(s=a);for(let n=0;n{var $;let{doc:c}=n.state,u=ge(n.state,n.pos);if(!u||u.type=="tag"&&!n.explicit)return null;let{type:l,from:d,context:S}=u;if(l=="openTag"){let i=s,m=P(c,S);if(m){let g=f[m];i=g?.children||a}return{from:d,options:i.map(g=>g.completion),validFor:b}}else if(l=="closeTag"){let i=P(c,S);return i?{from:d,to:n.pos+(c.sliceString(n.pos,n.pos+1)==">"?1:0),options:[(($=f[i])===null||$===void 0?void 0:$.closeNameCompletion)||{label:i+">",type:"type"}],validFor:b}:null}else if(l=="attrName"){let i=f[T(c,S)];return{from:d,options:i?.attrs||O,validFor:b}}else if(l=="attrValue"){let i=Se(c,S,d);if(!i)return null;let m=f[T(c,S)],g=(m?.attrValues||r)[i];return!g||!g.length?null:{from:d,to:n.pos+(c.sliceString(n.pos,n.pos+1)=='"'?1:0),options:g,validFor:/^"[^"]*"?$/}}else if(l=="tag"){let i=P(c,S),m=f[i],g=[],q=S&&S.lastChild;i&&(!q||q.name!="CloseTag"||T(c,q)!=i)&&g.push(m?m.closeCompletion:{label:"",type:"type",boost:2});let v=g.concat((m?.children||(S?a:s)).map(x=>x.openCompletion));if(S&&m?.text.length){let x=S.firstChild;x.to>n.pos-20&&!/\S/.test(n.state.sliceDoc(x.to,n.pos))&&(v=v.concat(m.text))}return{from:d,options:v,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}const w=Z.define({name:"xml",parser:$e.configure({props:[B.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),D.add({Element(e){let t=e.firstChild,o=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:o.name=="CloseTag"?o.from:e.to}}}),M.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function Ce(e={}){let t=[w.data.of({autocomplete:pe(e.elements||[],e.attributes||[])})];return e.autoCloseTags!==!1&&t.push(fe),new U(w,t)}function z(e,t,o=e.length){if(!t)return"";let O=t.firstChild,r=O&&O.getChild("TagName");return r?e.sliceString(r.from,Math.min(r.to,o)):""}const fe=Y.inputHandler.of((e,t,o,O,r)=>{if(e.composing||e.state.readOnly||t!=o||O!=">"&&O!="/"||!w.isActiveAt(e.state,t,-1))return!1;let a=r(),{state:s}=a,f=s.changeByRange(n=>{var $,c,u;let{head:l}=n,d=s.doc.sliceString(l-1,l)==O,S=k(s).resolveInner(l,-1),i;if(d&&O==">"&&S.name=="EndTag"){let m=S.parent;if(((c=($=m.parent)===null||$===void 0?void 0:$.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(i=z(s.doc,m.parent,l))){let g=l+(s.doc.sliceString(l,l+1)===">"?1:0),q=``;return{range:n,changes:{from:l,to:g,insert:q}}}}else if(d&&O=="/"&&S.name=="StartCloseTag"){let m=S.parent;if(S.from==l-2&&((u=m.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(i=z(s.doc,m,l))){let g=l+(s.doc.sliceString(l,l+1)===">"?1:0),q=`${i}>`;return{range:j.cursor(l+q.length,-1),changes:{from:l,to:g,insert:q}}}}return{range:n}});return f.changes.empty?!1:(e.dispatch([a,s.update(f,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{fe as autoCloseTags,pe as completeFromSchema,Ce as xml,w as xmlLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-DAs1rq5_.js b/pkg/cli/webapp/dist/assets/index-DAs1rq5_.js new file mode 100644 index 0000000..545a68a --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-DAs1rq5_.js @@ -0,0 +1,3 @@ +import{r as E,R as xt,f as Mt,j as I,g as Dt}from"./index-Bz3KHWSS.js";import{P as d}from"./index-DINwPV8Q.js";var Nt={};function pt(t,s){for(let e=0,i=t.length;e"u")return"";const i=(e=(s=window.document)==null?void 0:s.documentElement)==null?void 0:e.style;if(!i||t in i)return"";for(let o=0;os===e.identifier)||t.changedTouches&&pt(t.changedTouches,e=>s===e.identifier)}function Ft(t){if(t.targetTouches&&t.targetTouches[0])return t.targetTouches[0].identifier;if(t.changedTouches&&t.changedTouches[0])return t.changedTouches[0].identifier}function jt(t){if(!t)return;let s=t.getElementById("react-draggable-style-el");s||(s=t.createElement("style"),s.type="text/css",s.id="react-draggable-style-el",s.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} +`,s.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} +`,t.getElementsByTagName("head")[0].appendChild(s)),t.body&&Ut(t.body,"react-draggable-transparent-selection")}function gt(t){window.requestAnimationFrame?window.requestAnimationFrame(()=>{mt(t)}):mt(t)}function mt(t){if(t)try{t.body&&Yt(t.body,"react-draggable-transparent-selection");const s=t.selection;if(s)s.empty();else{const e=(t.defaultView||window).getSelection();e&&e.type!=="Caret"&&e.removeAllRanges()}}catch{}}function Ut(t,s){t.classList?t.classList.add(s):t.className.match(new RegExp(`(?:^|\\s)${s}(?!\\S)`))||(t.className+=` ${s}`)}function Yt(t,s){t.classList?t.classList.remove(s):t.className=t.className.replace(new RegExp(`(?:^|\\s)${s}(?!\\S)`,"g"),"")}function Gt(t,s,e){if(!t.props.bounds)return[s,e];let{bounds:i}=t.props;i=typeof i=="string"?i:Vt(i);const o=dt(t);if(typeof i=="string"){const{ownerDocument:a}=o,r=a.defaultView;if(!r)throw new Error("Cannot resolve the owner window of the draggable node.");let n;if(i==="parent"?n=o.parentNode:n=o.getRootNode().querySelector(i),!(n instanceof r.HTMLElement))throw new Error('Bounds selector "'+i+'" could not find an element.');const l=n,h=r.getComputedStyle(o),p=r.getComputedStyle(l);i={left:-o.offsetLeft+R(p.paddingLeft)+R(h.marginLeft),top:-o.offsetTop+R(p.paddingTop)+R(h.marginTop),right:At(l)-Tt(o)-o.offsetLeft+R(p.paddingRight)-R(h.marginRight),bottom:Ot(l)-_t(o)-o.offsetTop+R(p.paddingBottom)-R(h.marginBottom)}}return V(i.right)&&(s=Math.min(s,i.right)),V(i.bottom)&&(e=Math.min(e,i.bottom)),V(i.left)&&(s=Math.max(s,i.left)),V(i.top)&&(e=Math.max(e,i.top)),[s,e]}function vt(t,s,e){const i=Math.round(s/t[0])*t[0],o=Math.round(e/t[1])*t[1];return[i,o]}function $t(t){return t.props.axis==="both"||t.props.axis==="x"}function It(t){return t.props.axis==="both"||t.props.axis==="y"}function nt(t,s,e){const i=typeof s=="number"?Xt(t,s):null;if(typeof s=="number"&&!i)return null;const o=dt(e),a=e.props.offsetParent||o.offsetParent||o.ownerDocument.body;return Bt(i||t,a,e.props.scale)}function at(t,s,e){const i=!V(t.lastX),o=dt(t);return i?{node:o,deltaX:0,deltaY:0,lastX:s,lastY:e,x:s,y:e}:{node:o,deltaX:s-t.lastX,deltaY:e-t.lastY,lastX:t.lastX,lastY:t.lastY,x:s,y:e}}function ht(t,s){const e=t.props.scale;return{node:s.node,x:t.state.x+s.deltaX/e,y:t.state.y+s.deltaY/e,deltaX:s.deltaX/e,deltaY:s.deltaY/e,lastX:t.state.x,lastY:t.state.y}}function Vt(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function dt(t){const s=t.findDOMNode();if(!s)throw new Error(": Unmounted during event!");return s}function B(...t){Nt.DRAGGABLE_DEBUG&&console.log(...t)}var P={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},X=P.mouse,G=class extends E.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&(typeof t.button=="number"&&t.button!==0||t.ctrlKey))return!1;const s=this.findDOMNode();if(!s||!s.ownerDocument||!s.ownerDocument.body)throw new Error(" not mounted on DragStart!");const{ownerDocument:e}=s;if(this.props.disabled||!(t.target instanceof e.defaultView.Node)||this.props.handle&&!ct(t.target,this.props.handle,s)||this.props.cancel&&ct(t.target,this.props.cancel,s))return;t.type==="touchstart"&&!this.props.allowMobileScroll&&t.preventDefault();const i=Ft(t);this.touchIdentifier=i;const o=nt(t,i,this);if(o==null)return;const{x:a,y:r}=o,n=at(this,a,r);B("DraggableCore: handleDragStart: %j",n),B("calling",this.props.onStart),!(this.props.onStart(t,n)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&jt(e),this.dragging=!0,this.lastX=a,this.lastY=r,rt(e,X.move,this.handleDrag),rt(e,X.stop,this.handleDragStop))},this.handleDrag=t=>{const s=nt(t,this.touchIdentifier,this);if(s==null)return;let{x:e,y:i}=s;if(Array.isArray(this.props.grid)){let r=e-this.lastX,n=i-this.lastY;if([r,n]=vt(this.props.grid,r,n),!r&&!n)return;e=this.lastX+r,i=this.lastY+n}const o=at(this,e,i);if(B("DraggableCore: handleDrag: %j",o),this.props.onDrag(t,o)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const r=document.createEvent("MouseEvents");r.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(r)}return}this.lastX=e,this.lastY=i},this.handleDragStop=t=>{if(!this.dragging)return;const s=nt(t,this.touchIdentifier,this);if(s==null)return;let{x:e,y:i}=s;if(Array.isArray(this.props.grid)){let n=e-this.lastX||0,l=i-this.lastY||0;[n,l]=vt(this.props.grid,n,l),e=this.lastX+n,i=this.lastY+l}const o=at(this,e,i);if(this.props.onStop(t,o)===!1||this.mounted===!1)return!1;const r=this.findDOMNode();r&&this.props.enableUserSelectHack&>(r.ownerDocument),B("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,r&&(B("DraggableCore: Removing handlers"),F(r.ownerDocument,X.move,this.handleDrag),F(r.ownerDocument,X.stop,this.handleDragStop))},this.onMouseDown=t=>(X=P.mouse,this.handleDragStart(t)),this.onMouseUp=t=>(X=P.mouse,this.handleDragStop(t)),this.onTouchStart=t=>(X=P.touch,this.handleDragStart(t)),this.onTouchEnd=t=>(X=P.touch,this.handleDragStop(t))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&rt(t,P.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:s}=t;F(s,P.mouse.move,this.handleDrag),F(s,P.touch.move,this.handleDrag),F(s,P.mouse.stop,this.handleDragStop),F(s,P.touch.stop,this.handleDragStop),F(t,P.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&>(s)}}findDOMNode(){var t;if((t=this.props)!=null&&t.nodeRef)return this.props.nodeRef.current;const s=xt;return typeof s.findDOMNode=="function"?s.findDOMNode(this):(B("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return E.cloneElement(E.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};G.displayName="DraggableCore";G.propTypes={allowAnyClick:d.bool,allowMobileScroll:d.bool,children:d.node.isRequired,disabled:d.bool,enableUserSelectHack:d.bool,offsetParent:function(t,s){if(t[s]&&t[s].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:d.arrayOf(d.number),handle:d.string,cancel:d.string,nodeRef:d.object,onStart:d.func,onDrag:d.func,onStop:d.func,onMouseDown:d.func,scale:d.number,className:Y,style:Y,transform:Y};G.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var tt=class extends E.Component{constructor(t){super(t),this.onDragStart=(s,e)=>{if(B("Draggable: onDragStart: %j",e),this.props.onStart(s,ht(this,e))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(s,e)=>{if(!this.state.dragging)return!1;B("Draggable: onDrag: %j",e);const i=ht(this,e),o={x:i.x,y:i.y,slackX:0,slackY:0};if(this.props.bounds){const{x:r,y:n}=o;o.x+=this.state.slackX,o.y+=this.state.slackY;const[l,h]=Gt(this,o.x,o.y);o.x=l,o.y=h,o.slackX=this.state.slackX+(r-o.x),o.slackY=this.state.slackY+(n-o.y),i.x=o.x,i.y=o.y,i.deltaX=o.x-this.state.x,i.deltaY=o.y-this.state.y}if(this.props.onDrag(s,i)===!1)return!1;this.setState(o)},this.onDragStop=(s,e)=>{if(!this.state.dragging||this.props.onStop(s,ht(this,e))===!1)return!1;B("Draggable: onDragStop: %j",e);const o={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:r,y:n}=this.props.position;o.x=r,o.y=n}this.setState(o)},this.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:{...t.position},slackX:0,slackY:0,isElementSVG:!1},t.position&&!(t.onDrag||t.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:t},{prevPropsPosition:s}){return t&&(!s||t.x!==s.x||t.y!==s.y)?(B("Draggable: getDerivedStateFromProps %j",{position:t,prevPropsPosition:s}),{x:t.x,y:t.y,prevPropsPosition:{...t}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var t;if((t=this.props)!=null&&t.nodeRef)return this.props.nodeRef.current;const s=xt;return typeof s.findDOMNode=="function"?s.findDOMNode(this):null}render(){const{axis:t,bounds:s,children:e,defaultPosition:i,defaultClassName:o,defaultClassNameDragging:a,defaultClassNameDragged:r,position:n,positionOffset:l,scale:h,...p}=this.props;let u={},f=null;const v=!!!n||this.state.dragging,c=n||i,y={x:$t(this)&&v?this.state.x:c.x,y:It(this)&&v?this.state.y:c.y};this.state.isElementSVG?f=kt(y,l):u=Lt(y,l);const w=E.Children.only(e),D=Mt(w.props.className||"",o,{[a]:this.state.dragging,[r]:this.state.dragged});return E.createElement(G,{...p,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},E.cloneElement(w,{className:D,style:{...w.props.style,...u},transform:f}))}};tt.displayName="Draggable";tt.propTypes={...G.propTypes,axis:d.oneOf(["both","x","y","none"]),bounds:d.oneOfType([d.shape({left:d.number,right:d.number,top:d.number,bottom:d.number}),d.string,d.oneOf([!1])]),defaultClassName:d.string,defaultClassNameDragging:d.string,defaultClassNameDragged:d.string,defaultPosition:d.shape({x:d.number,y:d.number}),positionOffset:d.shape({x:d.oneOfType([d.number,d.string]),y:d.oneOfType([d.number,d.string])}),position:d.shape({x:d.number,y:d.number}),className:Y,style:Y,transform:Y};tt.defaultProps={...G.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1};var qt=tt,S=function(){return S=Object.assign||function(t){for(var s,e=1,i=arguments.length;e"u"?void 0:Number(i),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof r>"u"?void 0:Number(r)}},ie=function(t){return Array.isArray(t)?t:[t,t]},se=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],zt="__resizable_base__",oe=(function(t){Jt(s,t);function s(e){var i,o,a,r,n=t.call(this,e)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.delta={width:0,height:0},n.appendBase=function(){if(!n.resizable||!n.window)return null;var l=n.parentNode;if(!l)return null;var h=n.window.document.createElement("div");return h.style.width="100%",h.style.height="100%",h.style.position="absolute",h.style.transform="scale(0, 0)",h.style.left="0",h.style.flex="0 0 100%",h.classList?h.classList.add(zt):h.className+=zt,l.appendChild(h),h},n.removeBase=function(l){var h=n.parentNode;h&&h.removeChild(l)},n.state={isResizing:!1,width:(o=(i=n.propsSize)===null||i===void 0?void 0:i.width)!==null&&o!==void 0?o:"auto",height:(r=(a=n.propsSize)===null||a===void 0?void 0:a.height)!==null&&r!==void 0?r:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Object.defineProperty(s.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Qt},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"size",{get:function(){var e=0,i=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,a=this.resizable.offsetHeight,r=this.resizable.style.position;r!=="relative"&&(this.resizable.style.position="relative"),e=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,i=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=r}return{width:e,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"sizeStyle",{get:function(){var e=this,i=this.props.size,o=function(n){var l;if(typeof e.state[n]>"u"||e.state[n]==="auto")return"auto";if(e.propsSize&&e.propsSize[n]&&(!((l=e.propsSize[n])===null||l===void 0)&&l.toString().endsWith("%"))){if(e.state[n].toString().endsWith("%"))return e.state[n].toString();var h=e.getParentSize(),p=Number(e.state[n].toString().replace("px","")),u=p/h[n]*100;return"".concat(u,"%")}return lt(e.state[n])},a=i&&typeof i.width<"u"&&!this.state.isResizing?lt(i.width):o("width"),r=i&&typeof i.height<"u"&&!this.state.isResizing?lt(i.height):o("height");return{width:a,height:r}},enumerable:!1,configurable:!0}),s.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var i=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(i=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var a={width:e.offsetWidth,height:e.offsetHeight};return i&&(this.parentNode.style.flexWrap=o),this.removeBase(e),a},s.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},s.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},s.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:e.flexBasis!=="auto"?e.flexBasis:void 0})}},s.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},s.prototype.createSizeForCssProperty=function(e,i){var o=this.propsSize&&this.propsSize[i];return this.state[i]==="auto"&&this.state.original[i]===e&&(typeof o>"u"||o==="auto")?"auto":e},s.prototype.calculateNewMaxFromBoundary=function(e,i){var o=this.props.boundsByDirection,a=this.state.direction,r=o&&U("left",a),n=o&&U("top",a),l,h;if(this.props.bounds==="parent"){var p=this.parentNode;p&&(l=r?this.resizableRight-this.parentLeft:p.offsetWidth+(this.parentLeft-this.resizableLeft),h=n?this.resizableBottom-this.parentTop:p.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=r?this.resizableRight:this.window.innerWidth-this.resizableLeft,h=n?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=r?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),h=n?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(e=e&&e"u"?10:a.width,u=typeof o.width>"u"||o.width<0?e:o.width,f=typeof a.height>"u"?10:a.height,g=typeof o.height>"u"||o.height<0?i:o.height,v=l||0,c=h||0;if(n){var y=(f-v)*this.ratio+c,w=(g-v)*this.ratio+c,D=(p-c)/this.ratio+v,m=(u-c)/this.ratio+v,b=Math.max(p,y),M=Math.min(u,w),W=Math.max(f,D),H=Math.min(g,m);e=Z(e,b,M),i=Z(i,W,H)}else e=Z(e,p,u),i=Z(i,f,g);return{newWidth:e,newHeight:i}},s.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if(this.props.bounds==="parent"){var i=this.parentNode;if(i){var o=i.getBoundingClientRect();this.parentLeft=o.left*e,this.parentTop=o.top*e}}if(this.props.bounds&&typeof this.props.bounds!="string"){var a=this.props.bounds.getBoundingClientRect();this.targetLeft=a.left*e,this.targetTop=a.top*e}if(this.resizable){var r=this.resizable.getBoundingClientRect(),n=r.left,l=r.top,h=r.right,p=r.bottom;this.resizableLeft=n*e,this.resizableRight=h*e,this.resizableTop=l*e,this.resizableBottom=p*e}},s.prototype.onResizeStart=function(e,i){if(!(!this.resizable||!this.window)){var o=0,a=0;if(e.nativeEvent&&te(e.nativeEvent)?(o=e.nativeEvent.clientX,a=e.nativeEvent.clientY):e.nativeEvent&&J(e.nativeEvent)&&(o=e.nativeEvent.touches[0].clientX,a=e.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var r=this.props.onResizeStart(e,i,this.resizable);if(r===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var n,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var h=this.parentNode;if(h){var p=this.window.getComputedStyle(h).flexDirection;this.flexDir=p.startsWith("row")?"row":"column",n=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:o,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:A(A({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:i,flexBasis:n};this.setState(u)}},s.prototype.onMouseMove=function(e){var i=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&J(e))try{e.preventDefault(),e.stopPropagation()}catch{}var o=this.props,a=o.maxWidth,r=o.maxHeight,n=o.minWidth,l=o.minHeight,h=J(e)?e.touches[0].clientX:e.clientX,p=J(e)?e.touches[0].clientY:e.clientY,u=this.state,f=u.direction,g=u.original,v=u.width,c=u.height,y=this.getParentSize(),w=ee(y,this.window.innerWidth,this.window.innerHeight,a,r,n,l);a=w.maxWidth,r=w.maxHeight,n=w.minWidth,l=w.minHeight;var D=this.calculateNewSizeFromDirection(h,p),m=D.newHeight,b=D.newWidth,M=this.calculateNewMaxFromBoundary(a,r);this.props.snap&&this.props.snap.x&&(b=St(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(m=St(m,this.props.snap.y,this.props.snapGap));var W=this.calculateNewSizeFromAspectRatio(b,m,{width:M.maxWidth,height:M.maxHeight},{width:n,height:l});if(b=W.newWidth,m=W.newHeight,this.props.grid){var H=wt(b,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),N=wt(m,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),_=this.props.snapGap||0,C=_===0||Math.abs(H-b)<=_?H:b,L=_===0||Math.abs(N-m)<=_?N:m;b=C,m=L}var z={width:b-g.width,height:m-g.height};if(this.delta=z,v&&typeof v=="string"){if(v.endsWith("%")){var T=b/y.width*100;b="".concat(T,"%")}else if(v.endsWith("vw")){var j=b/this.window.innerWidth*100;b="".concat(j,"vw")}else if(v.endsWith("vh")){var $=b/this.window.innerHeight*100;b="".concat($,"vh")}}if(c&&typeof c=="string"){if(c.endsWith("%")){var T=m/y.height*100;m="".concat(T,"%")}else if(c.endsWith("vw")){var j=m/this.window.innerWidth*100;m="".concat(j,"vw")}else if(c.endsWith("vh")){var $=m/this.window.innerHeight*100;m="".concat($,"vh")}}var O={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(m,"height")};this.flexDir==="row"?O.flexBasis=O.width:this.flexDir==="column"&&(O.flexBasis=O.height);var q=this.state.width!==O.width,et=this.state.height!==O.height,it=this.state.flexBasis!==O.flexBasis,k=q||et||it;k&&Dt.flushSync(function(){i.setState(O)}),this.props.onResize&&k&&this.props.onResize(e,f,this.resizable,z)}},s.prototype.onMouseUp=function(e){var i,o,a=this.state,r=a.isResizing,n=a.direction;a.original,!(!r||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(e,n,this.resizable,this.delta),this.props.size&&this.setState({width:(i=this.props.size.width)!==null&&i!==void 0?i:"auto",height:(o=this.props.size.height)!==null&&o!==void 0?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:A(A({},this.state.backgroundStyle),{cursor:"auto"})}))},s.prototype.updateSize=function(e){var i,o;this.setState({width:(i=e.width)!==null&&i!==void 0?i:"auto",height:(o=e.height)!==null&&o!==void 0?o:"auto"})},s.prototype.renderResizer=function(){var e=this,i=this.props,o=i.enable,a=i.handleStyles,r=i.handleClasses,n=i.handleWrapperStyle,l=i.handleWrapperClass,h=i.handleComponent;if(!o)return null;var p=Object.keys(o).map(function(u){return o[u]!==!1?I.jsx(Zt,{direction:u,onResizeStart:e.onResizeStart,replaceStyles:a&&a[u],className:r&&r[u],children:h&&h[u]?h[u]:null},u):null});return I.jsx("div",{className:l,style:n,children:p})},s.prototype.render=function(){var e=this,i=Object.keys(this.props).reduce(function(r,n){return se.indexOf(n)!==-1||(r[n]=e.props[n]),r},{}),o=A(A(A({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return I.jsxs(a,A({style:o,className:this.props.className},i,{ref:function(r){r&&(e.resizable=r)},children:[this.state.isResizing&&I.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},s.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},s})(E.PureComponent);var ut=function(t,s){return ut=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var o in i)i.hasOwnProperty(o)&&(e[o]=i[o])},ut(t,s)};function re(t,s){ut(t,s);function e(){this.constructor=t}t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)}var x=function(){return x=Object.assign||function(s){for(var e,i=1,o=arguments.length;i"u"?Number.MAX_SAFE_INTEGER:this.props.maxWidth,i=typeof this.props.maxHeight>"u"?Number.MAX_SAFE_INTEGER:this.props.maxHeight;return{maxWidth:e,maxHeight:i}},s.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},s.prototype.getOffsetHeight=function(e){var i=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/i;case"body":return document.body.offsetHeight/i;default:return e.offsetHeight}},s.prototype.getOffsetWidth=function(e){var i=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/i;case"body":return document.body.offsetWidth/i;default:return e.offsetWidth}},s.prototype.onDragStart=function(e,i){if(this.props.onDragStart&&this.props.onDragStart(e,i)===!1)return!1;var o=this.getDraggablePosition();if(this.originalPosition=o,!!this.props.bounds){var a=this.getParent(),r=this.props.scale,n;if(this.props.bounds==="parent")n=a;else if(this.props.bounds==="body"){var l=a.getBoundingClientRect(),h=l.left,p=l.top,u=document.body.getBoundingClientRect(),f=-(h-a.offsetLeft*r-u.left)/r,g=-(p-a.offsetTop*r-u.top)/r,v=(document.body.offsetWidth-this.resizable.size.width*r)/r+f,c=(document.body.offsetHeight-this.resizable.size.height*r)/r+g;return this.setState({bounds:{top:g,right:v,bottom:c,left:f}})}else if(this.props.bounds==="window"){if(!this.resizable)return;var y=a.getBoundingClientRect(),w=y.left,D=y.top,m=-(w-a.offsetLeft*r)/r,b=-(D-a.offsetTop*r)/r,v=(window.innerWidth-this.resizable.size.width*r)/r+m,c=(window.innerHeight-this.resizable.size.height*r)/r+b;return this.setState({bounds:{top:b,right:v,bottom:c,left:m}})}else typeof this.props.bounds=="string"?n=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(n=this.props.bounds);if(!(!(n instanceof HTMLElement)||!(a instanceof HTMLElement))){var M=n.getBoundingClientRect(),W=M.left,H=M.top,N=a.getBoundingClientRect(),_=N.left,C=N.top,L=(W-_)/r,z=H-C;if(this.resizable){this.updateOffsetFromParent();var T=this.offsetFromParent;this.setState({bounds:{top:z-T.top,right:L+(n.offsetWidth-this.resizable.size.width)-T.left/r,bottom:z+(n.offsetHeight-this.resizable.size.height)-T.top,left:L-T.left/r}})}}}},s.prototype.onDrag=function(e,i){if(this.props.onDrag){var o=this.offsetFromParent,a=o.left,r=o.top;if(!this.props.dragAxis||this.props.dragAxis==="both")return this.props.onDrag(e,x(x({},i),{x:i.x+a,y:i.y+r}));if(this.props.dragAxis==="x")return this.props.onDrag(e,x(x({},i),{x:i.x+a,y:this.originalPosition.y+r,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDrag(e,x(x({},i),{x:this.originalPosition.x+a,y:i.y+r,deltaX:0}))}},s.prototype.onDragStop=function(e,i){if(this.props.onDragStop){var o=this.offsetFromParent,a=o.left,r=o.top;if(!this.props.dragAxis||this.props.dragAxis==="both")return this.props.onDragStop(e,x(x({},i),{x:i.x+a,y:i.y+r}));if(this.props.dragAxis==="x")return this.props.onDragStop(e,x(x({},i),{x:i.x+a,y:this.originalPosition.y+r,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDragStop(e,x(x({},i),{x:this.originalPosition.x+a,y:i.y+r,deltaX:0}))}},s.prototype.onResizeStart=function(e,i,o){if(this.props.onResizeStart&&this.props.onResizeStart(e,i,o)===!1)return!1;e.stopPropagation(),this.setState({resizing:!0});var a=this.props.scale,r=this.offsetFromParent,n=this.getDraggablePosition();if(this.resizingPosition={x:n.x+r.left,y:n.y+r.top},this.originalPosition=n,this.props.bounds){var l=this.getParent(),h=void 0;this.props.bounds==="parent"?h=l:this.props.bounds==="body"?h=document.body:this.props.bounds==="window"?h=window:typeof this.props.bounds=="string"?h=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(h=this.props.bounds);var p=this.getSelfElement();if(p instanceof Element&&(h instanceof HTMLElement||h===window)&&l instanceof HTMLElement){var u=this.getMaxSizesFromProps(),f=u.maxWidth,g=u.maxHeight,v=this.getParentSize();if(f&&typeof f=="string")if(f.endsWith("%")){var c=Number(f.replace("%",""))/100;f=v.width*c}else f.endsWith("px")&&(f=Number(f.replace("px","")));if(g&&typeof g=="string")if(g.endsWith("%")){var c=Number(g.replace("%",""))/100;g=v.height*c}else g.endsWith("px")&&(g=Number(g.replace("px","")));var y=p.getBoundingClientRect(),w=y.left,D=y.top,m=this.props.bounds==="window"?{left:0,top:0}:h.getBoundingClientRect(),b=m.left,M=m.top,W=this.getOffsetWidth(h),H=this.getOffsetHeight(h),N=i.toLowerCase().endsWith("left"),_=i.toLowerCase().endsWith("right"),C=i.startsWith("top"),L=i.startsWith("bottom");if((N||C)&&this.resizable){var z=(w-b)/a+this.resizable.size.width;this.setState({maxWidth:z>Number(f)?f:z})}if(_||this.props.lockAspectRatio&&!N&&!C){var z=W+(b-w)/a;this.setState({maxWidth:z>Number(f)?f:z})}if((C||N)&&this.resizable){var z=(D-M)/a+this.resizable.size.height;this.setState({maxHeight:z>Number(g)?g:z})}if(L||this.props.lockAspectRatio&&!C&&!N){var z=H+(M-D)/a;this.setState({maxHeight:z>Number(g)?g:z})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight})},s.prototype.onResize=function(e,i,o,a){var r=this,n={x:this.originalPosition.x,y:this.originalPosition.y},l=-a.width,h=-a.height,p=["top","left","topLeft","bottomLeft","topRight"];p.includes(i)&&(i==="bottomLeft"?n.x+=l:(i==="topRight"||(n.x+=l),n.y+=h));var u=this.draggable.state;(n.x!==u.x||n.y!==u.y)&&Dt.flushSync(function(){r.draggable.setState(n)}),this.updateOffsetFromParent();var f=this.offsetFromParent,g=this.getDraggablePosition().x+f.left,v=this.getDraggablePosition().y+f.top;this.resizingPosition={x:g,y:v},this.props.onResize&&this.props.onResize(e,i,o,a,{x:g,y:v})},s.prototype.onResizeStop=function(e,i,o,a){this.setState({resizing:!1});var r=this.getMaxSizesFromProps(),n=r.maxWidth,l=r.maxHeight;this.setState({maxWidth:n,maxHeight:l}),this.props.onResizeStop&&this.props.onResizeStop(e,i,o,a,this.resizingPosition)},s.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},s.prototype.updatePosition=function(e){this.draggable.setState(e)},s.prototype.updateOffsetFromParent=function(){var e=this.props.scale,i=this.getParent(),o=this.getSelfElement();if(!i||o===null)return{top:0,left:0};var a=i.getBoundingClientRect(),r=a.left,n=a.top,l=o.getBoundingClientRect(),h=this.getDraggablePosition(),p=i.scrollLeft,u=i.scrollTop;this.offsetFromParent={left:l.left-r+p-h.x*e,top:l.top-n+u-h.y*e}},s.prototype.render=function(){var e=this,i=this.props,o=i.disableDragging,a=i.style,r=i.dragHandleClassName,n=i.position,l=i.onMouseDown,h=i.onMouseUp,p=i.dragAxis,u=i.dragGrid,f=i.bounds,g=i.enableUserSelectHack,v=i.cancel,c=i.children;i.onResizeStart,i.onResize,i.onResizeStop,i.onDragStart,i.onDrag,i.onDragStop;var y=i.resizeHandleStyles,w=i.resizeHandleClasses,D=i.resizeHandleComponent,m=i.enableResizing,b=i.resizeGrid,M=i.resizeHandleWrapperClass,W=i.resizeHandleWrapperStyle,H=i.scale,N=i.allowAnyClick,_=i.dragPositionOffset,C=ne(i,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),L=this.props.default?x({},this.props.default):void 0;delete C.default;var z=o||r?{cursor:"auto"}:{cursor:"move"},T=x(x(x({},ae),z),a),j=this.offsetFromParent,$=j.left,O=j.top,q;n&&(q={x:n.x-$,y:n.y-O});var et=this.state.resizing?void 0:q,it=this.state.resizing?"both":p;return E.createElement(qt,{ref:function(k){k&&(e.draggable=k)},handle:r?".".concat(r):void 0,defaultPosition:L,onMouseDown:l,onMouseUp:h,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:it,disabled:o,grid:u,bounds:f?this.state.bounds:void 0,position:et,enableUserSelectHack:g,cancel:v,scale:H,allowAnyClick:N,nodeRef:this.resizableElement,positionOffset:_},E.createElement(oe,x({},C,{ref:function(k){k&&(e.resizable=k,e.resizableElement.current=k.resizable)},defaultSize:L,size:this.props.size,enable:typeof m=="boolean"?he(m):m,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:T,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:b,handleWrapperClass:M,handleWrapperStyle:W,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:y,handleClasses:w,handleComponent:D,scale:this.props.scale}),c))},s.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},s})(E.PureComponent);export{de as Rnd}; diff --git a/pkg/cli/webapp/dist/assets/index-DIIxsTGV.js b/pkg/cli/webapp/dist/assets/index-DIIxsTGV.js new file mode 100644 index 0000000..5771f73 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-DIIxsTGV.js @@ -0,0 +1 @@ +const c={}.hasOwnProperty;function f(e,i){const o=i||{};function n(t,...d){let r=n.invalid;const s=n.handlers;if(t&&c.call(t,e)){const l=String(t[e]);r=c.call(s,l)?s[l]:n.unknown}if(r)return r.call(this,t,...d)}return n.handlers=o.handlers||{},n.invalid=o.invalid,n.unknown=o.unknown,n}function u(e,i){const o=String(e);if(typeof i!="string")throw new TypeError("Expected character");let n=0,t=o.indexOf(i);for(;t!==-1;)n++,t=o.indexOf(i,t+i.length);return n}export{u as c,f as z}; diff --git a/pkg/cli/webapp/dist/assets/index-DINwPV8Q.js b/pkg/cli/webapp/dist/assets/index-DINwPV8Q.js new file mode 100644 index 0000000..f7c615f --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-DINwPV8Q.js @@ -0,0 +1 @@ +import{h as f}from"./index-Bz3KHWSS.js";var p={exports:{}},n,u;function m(){if(u)return n;u=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return n=t,n}var a,y;function P(){if(y)return a;y=1;var t=m();function i(){}function s(){}return s.resetWarningCache=i,a=function(){function e(v,S,g,_,d,T){if(T!==t){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function r(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:s,resetWarningCache:i};return o.PropTypes=o,o},a}var h;function l(){return h||(h=1,p.exports=P()()),p.exports}var R=l();const b=f(R);export{b as P}; diff --git a/pkg/cli/webapp/dist/assets/index-DQ2N0BLh.js b/pkg/cli/webapp/dist/assets/index-DQ2N0BLh.js new file mode 100644 index 0000000..4fd6235 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-DQ2N0BLh.js @@ -0,0 +1,3 @@ +import{e as D,E as h,C as L,s as H,t as n,b as B,g as K,a as M,L as OO,i as eO,l as f,f as iO,o as aO,N as nO,I as rO,d as QO,u as d}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const tO=1,Z=194,j=195,oO=196,x=197,dO=198,sO=199,lO=200,TO=2,E=3,u=201,SO=24,pO=25,qO=49,gO=50,mO=55,PO=56,$O=57,hO=59,cO=60,fO=61,XO=62,yO=63,zO=65,WO=238,vO=71,RO=241,kO=242,_O=243,xO=244,uO=245,UO=246,bO=247,VO=248,Y=72,GO=249,wO=250,ZO=251,jO=252,EO=253,YO=254,FO=255,CO=256,JO=73,AO=77,NO=263,IO=112,DO=130,LO=151,HO=152,BO=155,p=10,q=13,k=32,c=9,_=35,KO=40,MO=46,R=123,U=125,F=39,C=34,b=92,Oe=111,ee=120,ie=78,ae=117,ne=85,re=new Set([pO,qO,gO,NO,zO,DO,PO,$O,WO,XO,yO,Y,JO,AO,cO,fO,LO,HO,BO,IO]);function X(O){return O==p||O==q}function y(O){return O>=48&&O<=57||O>=65&&O<=70||O>=97&&O<=102}const Qe=new h((O,e)=>{let i;if(O.next<0)O.acceptToken(sO);else if(e.context.flags&P)X(O.next)&&O.acceptToken(dO,1);else if(((i=O.peek(-1))<0||X(i))&&e.canShift(x)){let a=0;for(;O.next==k||O.next==c;)O.advance(),a++;(O.next==p||O.next==q||O.next==_)&&O.acceptToken(x,-a)}else X(O.next)&&O.acceptToken(oO,1)},{contextual:!0}),te=new h((O,e)=>{let i=e.context;if(i.flags)return;let a=O.peek(-1);if(a==p||a==q){let r=0,Q=0;for(;;){if(O.next==k)r++;else if(O.next==c)r+=8-r%8;else break;O.advance(),Q++}r!=i.indent&&O.next!=p&&O.next!=q&&O.next!=_&&(r[O,e|J])),se=new L({start:oe,reduce(O,e,i,a){return O.flags&P&&re.has(e)||(e==vO||e==Y)&&O.flags&J?O.parent:O},shift(O,e,i,a){return e==Z?new $(O,de(a.read(a.pos,i.pos)),0):e==j?O.parent:e==SO||e==mO||e==hO||e==E?new $(O,0,P):V.has(e)?new $(O,0,V.get(e)|O.flags&P):O},hash(O){return O.hash}}),le=new h(O=>{for(let e=0;e<5;e++){if(O.next!="print".charCodeAt(e))return;O.advance()}if(!/\w/.test(String.fromCharCode(O.next)))for(let e=0;;e++){let i=O.peek(e);if(!(i==k||i==c)){i!=KO&&i!=MO&&i!=p&&i!=q&&i!=_&&O.acceptToken(tO);return}}}),Te=new h((O,e)=>{let{flags:i}=e.context,a=i&s?C:F,r=(i&l)>0,Q=!(i&T),t=(i&S)>0,o=O.pos;for(;!(O.next<0);)if(t&&O.next==R)if(O.peek(1)==R)O.advance(2);else{if(O.pos==o){O.acceptToken(E,1);return}break}else if(Q&&O.next==b){if(O.pos==o){O.advance();let g=O.next;g>=0&&(O.advance(),Se(O,g)),O.acceptToken(TO);return}break}else if(O.next==b&&!Q&&O.peek(1)>-1)O.advance(2);else if(O.next==a&&(!r||O.peek(1)==a&&O.peek(2)==a)){if(O.pos==o){O.acceptToken(u,r?3:1);return}break}else if(O.next==p){if(r)O.advance();else if(O.pos==o){O.acceptToken(u);return}break}else O.advance();O.pos>o&&O.acceptToken(lO)});function Se(O,e){if(e==Oe)for(let i=0;i<2&&O.next>=48&&O.next<=55;i++)O.advance();else if(e==ee)for(let i=0;i<2&&y(O.next);i++)O.advance();else if(e==ae)for(let i=0;i<4&&y(O.next);i++)O.advance();else if(e==ne)for(let i=0;i<8&&y(O.next);i++)O.advance();else if(e==ie&&O.next==R){for(O.advance();O.next>=0&&O.next!=U&&O.next!=F&&O.next!=C&&O.next!=p;)O.advance();O.next==U&&O.advance()}}const pe=H({'async "*" "**" FormatConversion FormatSpec':n.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":n.controlKeyword,"in not and or is del":n.operatorKeyword,"from def class global nonlocal lambda":n.definitionKeyword,import:n.moduleKeyword,"with as print":n.keyword,Boolean:n.bool,None:n.null,VariableName:n.variableName,"CallExpression/VariableName":n.function(n.variableName),"FunctionDefinition/VariableName":n.function(n.definition(n.variableName)),"ClassDefinition/VariableName":n.definition(n.className),PropertyName:n.propertyName,"CallExpression/MemberExpression/PropertyName":n.function(n.propertyName),Comment:n.lineComment,Number:n.number,String:n.string,FormatString:n.special(n.string),Escape:n.escape,UpdateOp:n.updateOperator,"ArithOp!":n.arithmeticOperator,BitOp:n.bitwiseOperator,CompareOp:n.compareOperator,AssignOp:n.definitionOperator,Ellipsis:n.punctuation,At:n.meta,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace,".":n.derefOperator,", ;":n.separator}),qe={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},ge=D.deserialize({version:14,states:"##jQ`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,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ZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[le,te,Qe,Te,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:O=>qe[O]||-1}],tokenPrec:7668}),G=new nO,A=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function m(O){return(e,i,a)=>{if(a)return!1;let r=e.node.getChild("VariableName");return r&&i(r,O),!0}}const me={FunctionDefinition:m("function"),ClassDefinition:m("class"),ForStatement(O,e,i){if(i){for(let a=O.node.firstChild;a;a=a.nextSibling)if(a.name=="VariableName")e(a,"variable");else if(a.name=="in")break}},ImportStatement(O,e){var i,a;let{node:r}=O,Q=((i=r.firstChild)===null||i===void 0?void 0:i.name)=="from";for(let t=r.getChild("import");t;t=t.nextSibling)t.name=="VariableName"&&((a=t.nextSibling)===null||a===void 0?void 0:a.name)!="as"&&e(t,Q?"variable":"namespace")},AssignStatement(O,e){for(let i=O.node.firstChild;i;i=i.nextSibling)if(i.name=="VariableName")e(i,"variable");else if(i.name==":"||i.name=="AssignOp")break},ParamList(O,e){for(let i=null,a=O.node.firstChild;a;a=a.nextSibling)a.name=="VariableName"&&(!i||!/\*|AssignOp/.test(i.name))&&e(a,"variable"),i=a},CapturePattern:m("variable"),AsPattern:m("variable"),__proto__:null};function N(O,e){let i=G.get(e);if(i)return i;let a=[],r=!0;function Q(t,o){let g=O.sliceString(t.from,t.to);a.push({label:g,type:o})}return e.cursor(rO.IncludeAnonymous).iterate(t=>{if(t.name){let o=me[t.name];if(o&&o(t,Q,r)||!r&&A.has(t.name))return!1;r=!1}else if(t.to-t.from>8192){for(let o of N(O,t.node))a.push(o);return!1}}),G.set(e,a),a}const w=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,I=["String","FormatString","Comment","PropertyName"];function Pe(O){let e=K(O.state).resolveInner(O.pos,-1);if(I.indexOf(e.name)>-1)return null;let i=e.name=="VariableName"||e.to-e.from<20&&w.test(O.state.sliceDoc(e.from,e.to));if(!i&&!O.explicit)return null;let a=[];for(let r=e;r;r=r.parent)A.has(r.name)&&(a=a.concat(N(O.state.doc,r)));return{options:a,from:i?e.from:O.pos,validFor:w}}const $e=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(O=>({label:O,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(O=>({label:O,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(O=>({label:O,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(O=>({label:O,type:"function"}))),he=[d("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),d("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),d("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),d("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),d(`if \${}: + +`,{label:"if",detail:"block",type:"keyword"}),d("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),d("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),d("import ${module}",{label:"import",detail:"statement",type:"keyword"}),d("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],ce=B(I,QO($e.concat(he)));function z(O){let{node:e,pos:i}=O,a=O.lineIndent(i,-1),r=null;for(;;){let Q=e.childBefore(i);if(Q)if(Q.name=="Comment")i=Q.from;else if(Q.name=="Body"||Q.name=="MatchBody")O.baseIndentFor(Q)+O.unit<=a&&(r=Q),e=Q;else if(Q.name=="MatchClause")e=Q;else if(Q.type.is("Statement"))e=Q;else break;else break}return r}function W(O,e){let i=O.baseIndentFor(e),a=O.lineAt(O.pos,-1),r=a.from+a.text.length;return/^\s*($|#)/.test(a.text)&&O.node.toi?null:i+O.unit}const v=OO.define({name:"python",parser:ge.configure({props:[eO.add({Body:O=>{var e;let i=/^\s*(#|$)/.test(O.textAfter)&&z(O)||O.node;return(e=W(O,i))!==null&&e!==void 0?e:O.continue()},MatchBody:O=>{var e;let i=z(O);return(e=W(O,i||O.node))!==null&&e!==void 0?e:O.continue()},IfStatement:O=>/^\s*(else:|elif )/.test(O.textAfter)?O.baseIndent:O.continue(),"ForStatement WhileStatement":O=>/^\s*else:/.test(O.textAfter)?O.baseIndent:O.continue(),TryStatement:O=>/^\s*(except[ :]|finally:|else:)/.test(O.textAfter)?O.baseIndent:O.continue(),MatchStatement:O=>/^\s*case /.test(O.textAfter)?O.baseIndent+O.unit:O.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":f({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":f({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":f({closing:"]"}),MemberExpression:O=>O.baseIndent+O.unit,"String FormatString":()=>null,Script:O=>{var e;let i=z(O);return(e=i&&W(O,i))!==null&&e!==void 0?e:O.continue()}}),iO.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":aO,Body:(O,e)=>({from:O.from+1,to:O.to-(O.to==e.doc.length?0:1)}),"String FormatString":(O,e)=>({from:e.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Re(){return new M(v,[v.data.of({autocomplete:Pe}),v.data.of({autocomplete:ce})])}export{ce as globalCompletion,Pe as localCompletionSource,Re as python,v as pythonLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-DTeo6LWm.js b/pkg/cli/webapp/dist/assets/index-DTeo6LWm.js new file mode 100644 index 0000000..c76b14d --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-DTeo6LWm.js @@ -0,0 +1,2 @@ +import{L as re,a as ae,i as ne,c as ie,f as se,s as oe,t as i,E as le,b as ce,d as de,e as me,g as ue}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const pe=36,X=1,fe=2,b=3,C=4,_e=5,ge=6,he=7,ye=8,be=9,ve=10,ke=11,xe=12,Oe=13,we=14,Qe=15,Ce=16,Se=17,I=18,qe=19,E=20,W=21,R=22,Pe=23,Te=24;function q(t){return t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57}function ze(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function g(t,e,a){for(let r=!1;;){if(t.next<0)return;if(t.next==e&&!r){t.advance();return}r=a&&!r&&t.next==92,t.advance()}}function je(t,e){e:for(;;){if(t.next<0)return;if(t.next==36){t.advance();for(let a=0;a)".charCodeAt(a);for(;;){if(t.next<0)return;if(t.next==r&&t.peek(1)==39){t.advance(2);return}t.advance()}}function P(t,e){for(;!(t.next!=95&&!q(t.next));)e!=null&&(e+=String.fromCharCode(t.next)),t.advance();return e}function Le(t){if(t.next==39||t.next==34||t.next==96){let e=t.next;t.advance(),g(t,e,!1)}else P(t)}function D(t,e){for(;t.next==48||t.next==49;)t.advance();e&&t.next==e&&t.advance()}function Z(t,e){for(;;){if(t.next==46){if(e)break;e=!0}else if(t.next<48||t.next>57)break;t.advance()}if(t.next==69||t.next==101)for(t.advance(),(t.next==43||t.next==45)&&t.advance();t.next>=48&&t.next<=57;)t.advance()}function N(t){for(;!(t.next<0||t.next==10);)t.advance()}function _(t,e){for(let a=0;a!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:M(y,h)};function Be(t,e,a,r){let n={};for(let s in T)n[s]=(t.hasOwnProperty(s)?t:T)[s];return e&&(n.words=M(e,a||"",r)),n}function K(t){return new le(e=>{var a;let{next:r}=e;if(e.advance(),_(r,S)){for(;_(e.next,S);)e.advance();e.acceptToken(pe)}else if(r==36&&t.doubleDollarQuotedStrings){let n=P(e,"");e.next==36&&(e.advance(),je(e,n),e.acceptToken(b))}else if(r==39||r==34&&t.doubleQuotedStrings)g(e,r,t.backslashEscapes),e.acceptToken(b);else if(r==35&&t.hashComments||r==47&&e.next==47&&t.slashComments)N(e),e.acceptToken(X);else if(r==45&&e.next==45&&(!t.spaceAfterDashes||e.peek(1)==32))N(e),e.acceptToken(X);else if(r==47&&e.next==42){e.advance();for(let n=1;;){let s=e.next;if(e.next<0)break;if(e.advance(),s==42&&e.next==47){if(n--,e.advance(),!n)break}else s==47&&e.next==42&&(n++,e.advance())}e.acceptToken(fe)}else if((r==101||r==69)&&e.next==39)e.advance(),g(e,39,!0),e.acceptToken(b);else if((r==110||r==78)&&e.next==39&&t.charSetCasts)e.advance(),g(e,39,t.backslashEscapes),e.acceptToken(b);else if(r==95&&t.charSetCasts)for(let n=0;;n++){if(e.next==39&&n>1){e.advance(),g(e,39,t.backslashEscapes),e.acceptToken(b);break}if(!q(e.next))break;e.advance()}else if(t.plsqlQuotingMechanism&&(r==113||r==81)&&e.next==39&&e.peek(1)>0&&!_(e.peek(1),S)){let n=e.peek(1);e.advance(2),Ue(e,n),e.acceptToken(b)}else if(_(r,t.identifierQuotes)){const n=r==91?93:r;g(e,n,!1),e.acceptToken(qe)}else if(r==40)e.acceptToken(he);else if(r==41)e.acceptToken(ye);else if(r==123)e.acceptToken(be);else if(r==125)e.acceptToken(ve);else if(r==91)e.acceptToken(ke);else if(r==93)e.acceptToken(xe);else if(r==59)e.acceptToken(Oe);else if(t.unquotedBitLiterals&&r==48&&e.next==98)e.advance(),D(e),e.acceptToken(R);else if((r==98||r==66)&&(e.next==39||e.next==34)){const n=e.next;e.advance(),t.treatBitsAsBytes?(g(e,n,t.backslashEscapes),e.acceptToken(Pe)):(D(e,n),e.acceptToken(R))}else if(r==48&&(e.next==120||e.next==88)||(r==120||r==88)&&e.next==39){let n=e.next==39;for(e.advance();ze(e.next);)e.advance();n&&e.next==39&&e.advance(),e.acceptToken(C)}else if(r==46&&e.next>=48&&e.next<=57)Z(e,!0),e.acceptToken(C);else if(r==46)e.acceptToken(we);else if(r>=48&&r<=57)Z(e,!1),e.acceptToken(C);else if(_(r,t.operatorChars)){for(;_(e.next,t.operatorChars);)e.advance();e.acceptToken(Qe)}else if(_(r,t.specialVar))e.next==r&&e.advance(),Le(e),e.acceptToken(Se);else if(r==58||r==44)e.acceptToken(Ce);else if(q(r)){let n=P(e,String.fromCharCode(r));e.acceptToken(e.next==46||e.peek(-n.length-1)==46?I:(a=t.words[n.toLowerCase()])!==null&&a!==void 0?a:I)}})}const F=K(T),Xe=me.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,nodeProps:[["isolate",-4,1,2,3,19,""]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,F],topRules:{Script:[0,25]},tokenPrec:0});function z(t){let e=t.cursor().moveTo(t.from,-1);for(;/Comment/.test(e.name);)e.moveTo(e.from,-1);return e.node}function x(t,e){let a=t.sliceString(e.from,e.to),r=/^([`'"\[])(.*)([`'"\]])$/.exec(a);return r?r[2]:a}function Q(t){return t&&(t.name=="Identifier"||t.name=="QuotedIdentifier")}function Ie(t,e){if(e.name=="CompositeIdentifier"){let a=[];for(let r=e.firstChild;r;r=r.nextSibling)Q(r)&&a.push(x(t,r));return a}return[x(t,e)]}function V(t,e){for(let a=[];;){if(!e||e.name!=".")return a;let r=z(e);if(!Q(r))return a;a.unshift(x(t,r)),e=z(r)}}function Re(t,e){let a=ue(t).resolveInner(e,-1),r=Ze(t.doc,a);return a.name=="Identifier"||a.name=="QuotedIdentifier"||a.name=="Keyword"?{from:a.from,quoted:a.name=="QuotedIdentifier"?t.doc.sliceString(a.from,a.from+1):null,parents:V(t.doc,z(a)),aliases:r}:a.name=="."?{from:e,quoted:null,parents:V(t.doc,a),aliases:r}:{from:e,quoted:null,parents:[],empty:!0,aliases:r}}const De=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function Ze(t,e){let a;for(let n=e;!a;n=n.parent){if(!n)return null;n.name=="Statement"&&(a=n)}let r=null;for(let n=a.firstChild,s=!1,c=null;n;n=n.nextSibling){let l=n.name=="Keyword"?t.sliceString(n.from,n.to).toLowerCase():null,o=null;if(!s)s=l=="from";else if(l=="as"&&c&&Q(n.nextSibling))o=x(t,n.nextSibling);else{if(l&&De.has(l))break;c&&Q(n)&&(o=x(t,n))}o&&(r||(r=Object.create(null)),r[o]=Ie(t,c)),c=/Identifier$/.test(n.name)?n:null}return r}function Ne(t,e,a){return a.map(r=>({...r,label:r.label[0]==t?r.label:t+r.label+e,apply:void 0}))}const Ve=/^\w*$/,$e=/^[`'"\[]?\w*[`'"\]]?$/;function $(t){return t.self&&typeof t.self.label=="string"}class j{constructor(e,a){this.idQuote=e,this.idCaseInsensitive=a,this.list=[],this.children=void 0}child(e){let a=this.children||(this.children=Object.create(null)),r=a[e];return r||(e&&!this.list.some(n=>n.label==e)&&this.list.push(A(e,"type",this.idQuote,this.idCaseInsensitive)),a[e]=new j(this.idQuote,this.idCaseInsensitive))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let a=this.list.findIndex(r=>r.label==e.label);a>-1?this.list[a]=e:this.list.push(e)}addCompletions(e){for(let a of e)this.addCompletion(typeof a=="string"?A(a,"property",this.idQuote,this.idCaseInsensitive):a)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):$(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let a of Object.keys(e)){let r=e[a],n=null,s=a.replace(/\\?\./g,l=>l=="."?"\0":l).split("\0"),c=this;$(r)&&(n=r.self,r=r.children);for(let l=0;l{let{parents:v,from:L,quoted:B,empty:ee,aliases:O}=Re(p.state,p.pos);if(ee&&!p.explicit)return null;O&&v.length==1&&(v=O[v[0]]||v);let d=o;for(let f of v){for(;!d.children||!d.children[f];)if(d==o&&u)d=u;else if(d==u&&r)d=d.child(r);else return null;let k=d.maybeChild(f);if(!k)return null;d=k}let w=d.list;if(d==o&&O&&(w=w.concat(Object.keys(O).map(f=>({label:f,type:"constant"})))),B){let f=B[0],k=G(f),te=p.state.sliceDoc(p.pos,p.pos+1)==k;return{from:L,to:te?p.pos+1:void 0,options:Ne(f,k,w),validFor:$e}}else return{from:L,options:w,validFor:Ve}}}function Ee(t){return t==W?"type":t==E?"keyword":"variable"}function We(t,e,a){let r=Object.keys(t).map(n=>a(e?n.toUpperCase():n,Ee(t[n])));return ce(["QuotedIdentifier","String","LineComment","BlockComment","."],de(r))}let Me=Xe.configure({props:[ne.add({Statement:ie()}),se.add({Statement(t,e){return{from:Math.min(t.from+100,e.doc.lineAt(t.from).to),to:t.to}},BlockComment(t){return{from:t.from+2,to:t.to-2}}}),oe({Keyword:i.keyword,Type:i.typeName,Builtin:i.standard(i.name),Bits:i.number,Bytes:i.string,Bool:i.bool,Null:i.null,Number:i.number,String:i.string,Identifier:i.name,QuotedIdentifier:i.special(i.string),SpecialVar:i.special(i.name),LineComment:i.lineComment,BlockComment:i.blockComment,Operator:i.operator,"Semi Punctuation":i.punctuation,"( )":i.paren,"{ }":i.brace,"[ ]":i.squareBracket})]});class m{constructor(e,a,r){this.dialect=e,this.language=a,this.spec=r}get extension(){return this.language.extension}configureLanguage(e,a){return new m(this.dialect,this.language.configure(e,a),this.spec)}static define(e){let a=Be(e,e.keywords,e.types,e.builtin),r=re.define({name:"sql",parser:Me.configure({tokenizers:[{from:F,to:K(a)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new m(a,r,e)}}function Ke(t,e){return{label:t,type:e,boost:-1}}function Fe(t,e=!1,a){return We(t.dialect.words,e,a||Ke)}function Ge(t){return t.schema?Ae(t.schema,t.tables,t.schemas,t.defaultTable,t.defaultSchema,t.dialect||U):()=>null}function Ye(t){return t.schema?(t.dialect||U).language.data.of({autocomplete:Ge(t)}):[]}function it(t={}){let e=t.dialect||U;return new ae(e.language,[Ye(t),e.language.data.of({autocomplete:Fe(e,t.upperCaseKeywords,t.keywordCompletion)})])}const U=m.define({}),st=m.define({charSetCasts:!0,doubleDollarQuotedStrings:!0,operatorChars:"+-*/<>=~!@#%^&|`?",specialVar:"",keywords:y+"abort abs absent access according ada admin aggregate alias also always analyse analyze array_agg array_max_cardinality asensitive assert assignment asymmetric atomic attach attribute attributes avg backward base64 begin_frame begin_partition bernoulli bit_length blocked bom cache called cardinality catalog_name ceil ceiling chain char_length character_length character_set_catalog character_set_name character_set_schema characteristics characters checkpoint class class_origin cluster coalesce cobol collation_catalog collation_name collation_schema collect column_name columns command_function command_function_code comment comments committed concurrently condition_number configuration conflict connection_name constant constraint_catalog constraint_name constraint_schema contains content control conversion convert copy corr cost covar_pop covar_samp csv cume_dist current_catalog current_row current_schema cursor_name database datalink datatype datetime_interval_code datetime_interval_precision db debug defaults defined definer degree delimiter delimiters dense_rank depends derived detach detail dictionary disable discard dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue document dump dynamic_function dynamic_function_code element elsif empty enable encoding encrypted end_frame end_partition endexec enforced enum errcode error event every exclude excluding exclusive exp explain expression extension extract family file filter final first_value flag floor following force foreach fortran forward frame_row freeze fs functions fusion generated granted greatest groups handler header hex hierarchy hint id ignore ilike immediately immutable implementation implicit import include including increment indent index indexes info inherit inherits inline insensitive instance instantiable instead integrity intersection invoker isnull key_member key_type label lag last_value lead leakproof least length library like_regex link listen ln load location lock locked log logged lower mapping matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text min minvalue mod mode more move multiset mumps name namespace nfc nfd nfkc nfkd nil normalize normalized nothing notice notify notnull nowait nth_value ntile nullable nullif nulls number occurrences_regex octet_length octets off offset oids operator options ordering others over overlay overriding owned owner parallel parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partition pascal passing passthrough password percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding prepared print_strict_params procedural procedures program publication query quote raise range rank reassign recheck recovery refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex rename repeatable replace replica requiring reset respect restart restore result_oid returned_cardinality returned_length returned_octet_length returned_sqlstate returning reverse routine_catalog routine_name routine_schema routines row_count row_number rowtype rule scale schema_name schemas scope scope_catalog scope_name scope_schema security selective self sensitive sequence sequences serializable server server_name setof share show simple skip slice snapshot source specific_name sqlcode sqlerror sqrt stable stacked standalone statement statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time table_name tables tablesample tablespace temp template ties token top_level_count transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex trigger_catalog trigger_name trigger_schema trim trim_array truncate trusted type types uescape unbounded uncommitted unencrypted unlink unlisten unlogged unnamed untyped upper uri use_column use_variable user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema vacuum valid validate validator value_of var_pop var_samp varbinary variable_conflict variadic verbose version versioning views volatile warning whitespace width_bucket window within wrapper xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate yes",types:h+"bigint int8 bigserial serial8 varbit bool box bytea cidr circle precision float8 inet int4 json jsonb line lseg macaddr macaddr8 money numeric pg_lsn point polygon float4 int2 smallserial serial2 serial serial4 text timetz timestamptz tsquery tsvector txid_snapshot uuid xml"}),Y="accessible algorithm analyze asensitive authors auto_increment autocommit avg avg_row_length binlog btree cache catalog_name chain change changed checkpoint checksum class_origin client_statistics coalesce code collations columns comment committed completion concurrent consistent contains contributors convert database databases day_hour day_microsecond day_minute day_second delay_key_write delayed delimiter des_key_file dev_pop dev_samp deviance directory disable discard distinctrow div dual dumpfile enable enclosed ends engine engines enum errors escaped even event events every explain extended fast field fields flush force found_rows fulltext grants handler hash high_priority hosts hour_microsecond hour_minute hour_second ignore ignore_server_ids import index index_statistics infile innodb insensitive insert_method install invoker iterate keys kill linear lines list load lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modify mutex mysql_errno no_write_to_binlog offline offset one online optimize optionally outfile pack_keys parser partition partitions password phase plugin plugins prev processlist profile profiles purge query quick range read_write rebuild recover regexp relaylog remove rename reorganize repair repeatable replace require resume rlike row_format rtree schedule schema_name schemas second_microsecond security sensitive separator serializable server share show slave slow snapshot soname spatial sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result ssl starting starts std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace terminated triggers truncate uncommitted uninstall unlock upgrade use use_frm user_resources user_statistics utc_date utc_time utc_timestamp variables views warnings xa xor year_month zerofill",H=h+"bool blob long longblob longtext medium mediumblob mediumint mediumtext tinyblob tinyint tinytext text bigint int1 int2 int3 int4 int8 float4 float8 varbinary varcharacter precision datetime unsigned signed",J="charset clear edit ego help nopager notee nowarning pager print prompt quit rehash source status system tee",ot=m.define({operatorChars:"*+-%<>!=&|^",charSetCasts:!0,doubleQuotedStrings:!0,unquotedBitLiterals:!0,hashComments:!0,spaceAfterDashes:!0,specialVar:"@?",identifierQuotes:"`",keywords:y+"group_concat "+Y,types:H,builtin:J}),lt=m.define({operatorChars:"*+-%<>!=&|^",charSetCasts:!0,doubleQuotedStrings:!0,unquotedBitLiterals:!0,hashComments:!0,spaceAfterDashes:!0,specialVar:"@?",identifierQuotes:"`",keywords:y+"always generated groupby_concat hard persistent shutdown soft virtual "+Y,types:H,builtin:J});let He="approx_count_distinct approx_percentile_cont approx_percentile_disc avg checksum_agg count count_big grouping grouping_id max min product stdev stdevp sum var varp ai_generate_embeddings ai_generate_chunks cume_dist first_value lag last_value lead percentile_cont percentile_disc percent_rank left_shift right_shift bit_count get_bit set_bit collationproperty tertiary_weights @@datefirst @@dbts @@langid @@language @@lock_timeout @@max_connections @@max_precision @@nestlevel @@options @@remserver @@servername @@servicename @@spid @@textsize @@version cast convert parse try_cast try_convert try_parse asymkey_id asymkeyproperty certproperty cert_id crypt_gen_random decryptbyasymkey decryptbycert decryptbykey decryptbykeyautoasymkey decryptbykeyautocert decryptbypassphrase encryptbyasymkey encryptbycert encryptbykey encryptbypassphrase hashbytes is_objectsigned key_guid key_id key_name signbyasymkey signbycert symkeyproperty verifysignedbycert verifysignedbyasymkey @@cursor_rows @@fetch_status cursor_status datalength ident_current ident_incr ident_seed identity sql_variant_property @@datefirst current_timestamp current_timezone current_timezone_id date_bucket dateadd datediff datediff_big datefromparts datename datepart datetime2fromparts datetimefromparts datetimeoffsetfromparts datetrunc day eomonth getdate getutcdate isdate month smalldatetimefromparts switchoffset sysdatetime sysdatetimeoffset sysutcdatetime timefromparts todatetimeoffset year edit_distance edit_distance_similarity jaro_winkler_distance jaro_winkler_similarity edge_id_from_parts graph_id_from_edge_id graph_id_from_node_id node_id_from_parts object_id_from_edge_id object_id_from_node_id json isjson json_array json_contains json_modify json_object json_path_exists json_query json_value regexp_like regexp_replace regexp_substr regexp_instr regexp_count regexp_matches regexp_split_to_table abs acos asin atan atn2 ceiling cos cot degrees exp floor log log10 pi power radians rand round sign sin sqrt square tan choose greatest iif least @@procid app_name applock_mode applock_test assemblyproperty col_length col_name columnproperty databasepropertyex db_id db_name file_id file_idex file_name filegroup_id filegroup_name filegroupproperty fileproperty filepropertyex fulltextcatalogproperty fulltextserviceproperty index_col indexkey_property indexproperty next value for object_definition object_id object_name object_schema_name objectproperty objectpropertyex original_db_name parsename schema_id schema_name scope_identity serverproperty stats_date type_id type_name typeproperty dense_rank ntile rank row_number publishingservername certenclosed certprivatekey current_user database_principal_id has_dbaccess has_perms_by_name is_member is_rolemember is_srvrolemember loginproperty original_login permissions pwdencrypt pwdcompare session_user sessionproperty suser_id suser_name suser_sid suser_sname system_user user user_id user_name ascii char charindex concat concat_ws difference format left len lower ltrim nchar patindex quotename replace replicate reverse right rtrim soundex space str string_agg string_escape stuff substring translate trim unicode upper $partition @@error @@identity @@pack_received @@rowcount @@trancount binary_checksum checksum compress connectionproperty context_info current_request_id current_transaction_id decompress error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big session_context xact_state @@connections @@cpu_busy @@idle @@io_busy @@pack_sent @@packet_errors @@timeticks @@total_errors @@total_read @@total_write textptr textvalid columns_updated eventdata trigger_nestlevel vector_distance vectorproperty vector_search generate_series opendatasource openjson openquery openrowset openxml predict string_split coalesce nullif apply catch filter force include keep keepfixed modify optimize parameterization parameters partition recompile sequence set";const ct=m.define({keywords:y+"add external procedure all fetch public alter file raiserror and fillfactor read any for readtext as foreign reconfigure asc freetext references authorization freetexttable replication backup from restore begin full restrict between function return break goto revert browse grant revoke bulk group right by having rollback cascade holdlock rowcount case identity rowguidcol check identity_insert rule checkpoint identitycol save close if schema clustered in securityaudit coalesce index select collate inner semantickeyphrasetable column insert semanticsimilaritydetailstable commit intersect semanticsimilaritytable compute into session_user constraint is set contains join setuser containstable key shutdown continue kill some convert left statistics create like system_user cross lineno table current load tablesample current_date merge textsize current_time national then current_timestamp nocheck to current_user nonclustered top cursor not tran database null transaction dbcc nullif trigger deallocate of truncate declare off try_convert default offsets tsequal delete on union deny open unique desc opendatasource unpivot disk openquery update distinct openrowset updatetext distributed openxml use double option user drop or values dump order varying else outer view end over waitfor errlvl percent when escape pivot where except plan while exec precision with execute primary within group exists print writetext exit proc noexpand index forceseek forcescan holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot spatial_window_max_cells tablock tablockx updlock xlock keepidentity keepdefaults ignore_constraints ignore_triggers",types:h+"smalldatetime datetimeoffset datetime2 datetime bigint smallint smallmoney tinyint money real text nvarchar ntext varbinary image hierarchyid uniqueidentifier sql_variant xml",builtin:He,operatorChars:"*+-%<>!=^&|/",specialVar:"@",identifierQuotes:'"['}),dt=m.define({keywords:y+"abort analyze attach autoincrement conflict database detach exclusive fail glob ignore index indexed instead isnull notnull offset plan pragma query raise regexp reindex rename replace temp vacuum virtual",types:h+"bool blob long longblob longtext medium mediumblob mediumint mediumtext tinyblob tinyint tinytext text bigint int2 int8 unsigned signed real",builtin:"auth backup bail changes clone databases dbinfo dump echo eqp explain fullschema headers help import imposter indexes iotrace lint load log mode nullvalue once print prompt quit restore save scanstats separator shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width",operatorChars:"*+-%<>!=&|/~",identifierQuotes:'`"',specialVar:"@:?$"}),mt=m.define({keywords:"add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime infinity NaN",types:h+"ascii bigint blob counter frozen inet list map static text timeuuid tuple uuid varint",slashComments:!0}),ut=m.define({keywords:y+"abort accept access add all alter and any arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body by case cast char_base check close cluster clusters colauth column comment commit compress connected constant constraint crash create current currval cursor data_base database dba deallocate debugoff debugon declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry exception exception_init exchange exclusive exists external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base of off offline on online only option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw rebuild record ref references refresh rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work",builtin:"appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define echo editfile embedded feedback flagger flush heading headsep instance linesize lno loboffset logsource longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar repfooter repheader serveroutput shiftinout show showmode spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout timing trimout trimspool ttitle underline verify version wrap",types:h+"ascii bfile bfilename bigserial bit blob dec long number nvarchar nvarchar2 serial smallint string text uid varchar2 xml",operatorChars:"*/+-%<>!=~",doubleQuotedStrings:!0,charSetCasts:!0,plsqlQuotingMechanism:!0});export{mt as Cassandra,ct as MSSQL,lt as MariaSQL,ot as MySQL,ut as PLSQL,st as PostgreSQL,m as SQLDialect,dt as SQLite,U as StandardSQL,Fe as keywordCompletionSource,Ge as schemaCompletionSource,it as sql}; diff --git a/pkg/cli/webapp/dist/assets/index-DWuQGstW.js b/pkg/cli/webapp/dist/assets/index-DWuQGstW.js new file mode 100644 index 0000000..cc9cbb4 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-DWuQGstW.js @@ -0,0 +1 @@ +import{h as f,j as p,a as x,k as X,p as y,g as h,L as G,s as Z,t as Q,i as S,l as b,f as j,e as V,E as c}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const W=1,k=2,w=3,v=180,R=4,_=181,z=5,E=182,U=6;function D(O){return O>=65&&O<=90||O>=97&&O<=122}const F=new c(O=>{let a=O.pos;for(;;){let{next:r}=O;if(r<0)break;if(r==123){let n=O.peek(1);if(n==123){if(O.pos>a)break;O.acceptToken(W,2);return}else if(n==37){if(O.pos>a)break;let $=2,i=2;for(;;){let e=O.peek($);if(e==32||e==10)++$;else if(e==35)for(++$;;){let t=O.peek($);if(t<0||t==10)break;$++}else if(e==45&&i==2)i=++$;else{let t=e==101&&O.peek($+1)==110&&O.peek($+2)==100;O.acceptToken(t?w:k,i);return}}}}if(O.advance(),r==10)break}O.pos>a&&O.acceptToken(v)});function u(O,a,r){return new c(n=>{let $=n.pos;for(;;){let{next:i}=n;if(i==123&&n.peek(1)==37){let e=2;for(;;e++){let o=n.peek(e);if(o!=32&&o!=10)break}let t="";for(;;e++){let o=n.peek(e);if(!D(o))break;t+=String.fromCharCode(o)}if(t==O){if(n.pos>$)break;n.acceptToken(r,2);break}}else if(i<0)break;if(n.advance(),i==10)break}n.pos>$&&n.acceptToken(a)})}const C=u("endcomment",E,z),Y=u("endraw",_,R),N=new c(O=>{if(O.next==35){for(O.advance();!(O.next==10||O.next<0||(O.next==37||O.next==125)&&O.peek(1)==125);)O.advance();O.acceptToken(U)}}),I={__proto__:null,contains:34,or:38,and:38,true:52,false:52,empty:54,forloop:57,tablerowloop:59,continue:61,in:131,with:197,for:199,as:201,if:237,endif:241,unless:247,endunless:251,elsif:255,else:259,case:265,endcase:269,when:273,endfor:281,tablerow:287,endtablerow:291,break:295,cycle:301,echo:305,render:309,include:313,assign:317,capture:323,endcapture:327,increment:331,decrement:335},L={__proto__:null,if:86,endif:90,elsif:94,else:98,unless:104,endunless:108,case:114,endcase:118,when:122,for:128,endfor:138,tablerow:144,endtablerow:148,break:152,continue:156,cycle:160,comment:166,endcomment:172,raw:178,endraw:184,echo:188,render:192,include:204,assign:208,capture:214,endcapture:218,increment:222,decrement:226,liquid:230},H=V.deserialize({version:14,states:"KtQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DSO#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q%v%|&S&X&cT%t#g%vm#i!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#k!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#m!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT%z#n%|m#p!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&Q#r&Sm#t!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&V#u&Xm#w!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#z!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#|!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$O!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$Q!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$S!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$U!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&a$V&cm$X!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$Z!Q#d#g#n#r#u$V$^%q%v%|&S&X&c",nodeNames:"⚠ {{ {% {% {% {% InlineComment Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression contains CompareOp LogicOp AssignmentExpression AssignOp ) ( RangeExpression .. BooleanLiteral empty forloop tablerowloop continue StringLiteral NumberLiteral Filter | FilterName : , Tag TagName %} IfDirective Tag if EndTag endif Tag elsif Tag else UnlessDirective Tag unless EndTag endunless CaseDirective Tag case EndTag endcase Tag when ForDirective Tag for in Parameter ParameterName EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag continue Tag cycle Comment Tag comment CommentText EndTag endcomment RawDirective Tag raw RawText EndTag endraw Tag echo Tag render RenderParameter with for as Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement Tag liquid IfDirective Tag if EndTag endif UnlessDirective Tag unless EndTag endunless Tag elsif Tag else CaseDirective Tag case EndTag endcase Tag when ForDirective Tag EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag Tag cycle Tag echo Tag render Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement",maxTerm:220,nodeProps:[["closedBy",1,"}}",-4,2,3,4,5,"%}",23,")"],["openedBy",9,"{{",22,"(",40,"{%"],["group",-13,11,12,15,16,20,24,26,27,28,29,30,31,32,"Expression"]],skippedNodes:[0,6],repeatNodeCount:11,tokenData:")e~RmXY!|YZ!|]^!|pq!|qr#_rs#juv$[wx$gxy%Syz%X{|%^|}&x}!O&}!O!P'Z!Q![&g![!]'k!^!_'p!_!`'x!`!a'p!c!}(Q!}#O(y#P#Q)O#R#S(Q#T#o(Q#p#q)T#q#r)Y%W;'S(Q;'S;:j(s<%lO(Q~#RS%O~XY!|YZ!|]^!|pq!|~#bP!_!`#e~#jOb~~#mUOY#jZr#jrs$Ps;'S#j;'S;=`$U<%lO#j~$UOo~~$XP;=`<%l#j~$_P#q#r$b~$gOx~~$jUOY$gZw$gwx$Px;'S$g;'S;=`$|<%lO$g~%PP;=`<%l$g~%XOg~~%^Of~P%aQ!O!P%g!Q![&gP%jP!Q![%mP%rRpP!Q![%m!g!h%{#X#Y%{P&OR{|&X}!O&X!Q![&_P&[P!Q![&_P&dPpP!Q![&_P&lSpP!O!P%g!Q![&g!g!h%{#X#Y%{~&}Ou~~'QRuv$[!O!P%g!Q![&g~'`Q]S!O!P'f!Q![%m~'kOi~~'pOt~~'uPb~!_!`#e~'}Pe~!_!`#e_(ZW^WwQ%RT}!O(Q!Q![(Q!c!}(Q#R#S(Q#T#o(Q%W;'S(Q;'S;:j(s<%lO(Q_(vP;=`<%l(Q~)OO%T~~)TO%S~~)YOr~~)]P#q#r)`~)eOX~",tokenizers:[F,Y,C,N,0,1,2,3],topRules:{Template:[0,7]},dynamicPrecedences:{190:1,191:1,192:1,194:1,195:1,196:1,197:1,199:1,200:1,201:1,202:1,203:1,204:1,205:1,206:1,207:1,208:1,209:1,210:1,211:1,212:1,213:1,214:1,215:1,216:1,217:1,218:1,219:1,220:1},specialized:[{term:187,get:O=>I[O]||-1},{term:39,get:O=>L[O]||-1}],tokenPrec:0});function l(O,a){return O.split(" ").map(r=>({label:r,type:a}))}const P=l("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where","function"),m=l("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include","keyword"),T=l("empty forloop tablerowloop in with as","keyword"),A=l("first index index0 last length rindex","property"),B=l("col col0 col_first col_last first index index0 last length rindex rindex0 row","property");function M(O){var a;let{state:r,pos:n}=O,$=h(r).resolveInner(n,-1).enterUnfinishedNodesBefore(n),i=((a=$.childBefore(n))===null||a===void 0?void 0:a.name)||$.name;if($.name=="FilterName")return{type:"filter",node:$};if(O.explicit&&i=="|")return{type:"filter"};if($.name=="TagName")return{type:"tag",node:$};if(O.explicit&&i=="{%")return{type:"tag"};if($.name=="PropertyName"&&$.parent.name=="MemberExpression")return{type:"property",node:$,target:$.parent};if($.name=="."&&$.parent.name=="MemberExpression")return{type:"property",target:$.parent};if($.name=="MemberExpression"&&i==".")return{type:"property",target:$};if($.name=="VariableName")return{type:"expression",from:$.from};let e=O.matchBefore(/[\w\u00c0-\uffff]+$/);return e?{type:"expression",from:e.from}:O.explicit&&$.name!="CommentText"&&$.name!="StringLiteral"&&$.name!="NumberLiteral"&&$.name!="InlineComment"?{type:"expression"}:null}function K(O,a,r,n){let $=[];for(;;){let i=a.getChild("Expression");if(!i)return[];if(i.name=="VariableName"||i.name=="forloop"||i.name=="tablerowloop"){let e=O.sliceDoc(i.from,i.to);if(e=="forloop")return $.length?[]:A;if(e=="tablerowloop")return $.length?[]:B;$.unshift(e);break}else if(i.name=="MemberExpression"){let e=i.getChild("PropertyName");e&&$.unshift(O.sliceDoc(e.from,e.to)),a=i}else if(i.name=="SubscriptExpression"){let e=i.getChildren("Expression")[1];$.unshift(e?.name=="StringLiteral"?O.sliceDoc(e.from+1,e.to-1):"[]"),a=i}else return[]}return n?n($,O,r):[]}function J(O={}){let a=O.filters?O.filters.concat(P):P,r=O.tags?O.tags.concat(m):m,n=O.variables?O.variables.concat(T):T,{properties:$}=O;return i=>{var e;let t=M(i);if(!t)return null;let o=(e=t.from)!==null&&e!==void 0?e:t.node?t.node.from:i.pos,s;return t.type=="filter"?s=a:t.type=="tag"?s=r:t.type=="expression"?s=n:s=K(i.state,t.target,i,$),s.length?{options:s,from:o,validFor:/^[\w\u00c0-\uffff]*$/}:null}}const OO=f.inputHandler.of((O,a,r,n)=>n!="%"||a!=r||O.state.doc.sliceString(a-1,r+1)!="{}"?!1:(O.dispatch(O.state.changeByRange($=>({changes:{from:$.from,to:$.to,insert:"%%"},range:p.cursor($.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function d(O){return a=>{let r=O.test(a.textAfter);return a.lineIndent(a.node.from)+(r?0:a.unit)}}const $O=G.define({name:"liquid",parser:H.configure({props:[Z({"cycle comment endcomment raw endraw echo increment decrement liquid in with as":Q.keyword,"empty forloop tablerowloop":Q.atom,"if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue":Q.controlKeyword,"assign capture endcapture":Q.definitionKeyword,contains:Q.operatorKeyword,"render include":Q.moduleKeyword,VariableName:Q.variableName,TagName:Q.tagName,FilterName:Q.function(Q.variableName),PropertyName:Q.propertyName,CompareOp:Q.compareOperator,AssignOp:Q.definitionOperator,LogicOp:Q.logicOperator,NumberLiteral:Q.number,StringLiteral:Q.string,BooleanLiteral:Q.bool,InlineComment:Q.lineComment,CommentText:Q.blockComment,"{% %} {{ }}":Q.brace,"[ ]":Q.bracket,"( )":Q.paren,".":Q.derefOperator,", .. : |":Q.punctuation}),S.add({Tag:b({closing:"%}"}),"UnlessDirective ForDirective TablerowDirective CaptureDirective":d(/^\s*(\{%-?\s*)?end\w/),IfDirective:d(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),CaseDirective:d(/^\s*(\{%-?\s*)?(endcase|when)\b/)}),j.add({"UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(O){let a=O.firstChild,r=O.lastChild;return!a||a.name!="Tag"?null:{from:a.to,to:r.name=="EndTag"?r.from:O.to}}})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*{%-?\s*(?:end|elsif|else|when|)$/}}),q=X();function g(O){return $O.configure({wrap:y(a=>a.type.isTop?{parser:O.parser,overlay:r=>r.name=="Text"||r.name=="RawText"}:null)},"liquid")}const aO=g(q.language);function oO(O={}){let a=O.base||q,r=a.language==q.language?aO:g(a.language);return new x(r,[a.support,r.data.of({autocomplete:J(O)}),a.language.data.of({closeBrackets:{brackets:["{"]}}),OO])}export{OO as closePercentBrace,oO as liquid,J as liquidCompletionSource,aO as liquidLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-DfwARoT2.js b/pkg/cli/webapp/dist/assets/index-DfwARoT2.js new file mode 100644 index 0000000..2e4cc86 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-DfwARoT2.js @@ -0,0 +1 @@ +import{h as d,j as g,a as v,k as m,p as u,g as x,L as G,s as b,t as a,i as Z,l as R,f as h,e as k,E as f,m as w}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const X=1,T=2,y=3,U=155,z=4,j=156;function Y(O){return O>=65&&O<=90||O>=97&&O<=122}const E=new f(O=>{let i=O.pos;for(;;){let{next:t}=O;if(t<0)break;if(t==123){let r=O.peek(1);if(r==123){if(O.pos>i)break;O.acceptToken(X,2);return}else if(r==35){if(O.pos>i)break;O.acceptToken(T,2);return}else if(r==37){if(O.pos>i)break;let e=2,P=2;for(;;){let Q=O.peek(e);if(Q==32||Q==10)++e;else if(Q==35)for(++e;;){let o=O.peek(e);if(o<0||o==10)break;e++}else if(Q==45&&P==2)P=++e;else{O.acceptToken(y,P);return}}}}if(O.advance(),t==10)break}O.pos>i&&O.acceptToken(U)});function _(O,i,t){return new f(r=>{let e=r.pos;for(;;){let{next:P}=r;if(P==123&&r.peek(1)==37){let Q=2;for(;;Q++){let n=r.peek(Q);if(n!=32&&n!=10)break}let o="";for(;;Q++){let n=r.peek(Q);if(!Y(n))break;o+=String.fromCharCode(n)}if(o==O){if(r.pos>e)break;r.acceptToken(t,2);break}}else if(P<0)break;if(r.advance(),P==10)break}r.pos>e&&r.acceptToken(i)})}const W=_("endraw",j,z),V={__proto__:null,in:38,is:40,and:46,or:48,not:52,if:78,else:80,true:98,false:98,self:100,super:102,loop:104,recursive:136,scoped:160,required:162,as:256,import:260,ignore:268,missing:270,with:272,without:274,context:276},q={__proto__:null,if:112,elif:118,else:122,endif:126,for:132,endfor:140,raw:146,endraw:152,block:158,endblock:166,macro:172,endmacro:182,call:188,endcall:192,filter:198,endfilter:202,set:208,endset:212,trans:218,pluralize:222,endtrans:226,with:232,endwith:236,autoescape:242,endautoescape:246,import:254,from:258,include:266},F=k.deserialize({version:14,states:"!*dQVOPOOOOOP'#F`'#F`OeOTO'#CbOvQSO'#CdO!kOPO'#DcO!yOPO'#DnO#XOQO'#DuO#^OPO'#D{O#lOPO'#ESO#zOPO'#E[O$YOPO'#EaO$hOPO'#EfO$vOPO'#EkO%UOPO'#ErO%dOPO'#EwOOOP'#F|'#F|O%rQWO'#E|O&sO#tO'#F]OOOP'#Fq'#FqOOOP'#F_'#F_QVOPOOOOOP-E9^-E9^OOQO'#Ce'#CeO'sQSO,59OO'zQSO'#DWO(RQSO'#DXO(YQ`O'#DZOOQO'#Fr'#FrOvQSO'#CuO(aOPO'#CbOOOP'#Fd'#FdO!kOPO,59}OOOP,59},59}O(oOPO,59}O(}QWO'#E|OOOP,5:Y,5:YO)[OPO,5:YO!yOPO,5:YO)jQWO'#E|OOOQ'#Ff'#FfO)tOQO'#DxO)|OQO,5:aOOOP,5:g,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R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kS&c$u$wR'd&cQ%Q#WQ%S#YT&i%Q%SQ%W#]R&n%WQoSR#`oQ%s$YQ&S$dQ&W$gW&w%s&S&W(qR(q(fQxUR#mxS'P%z%{R'p'PQ'u'VR(c'uQ'y'XQ(e'wT(g'y(eQ'}'^R(j'}Q!uaR$m!u!bcOTVWXYZ[]^dqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kTnSoQgRQ#WhQ#YiQ#[jQ#_lQ$U!eQ$W!fQ$i!pQ$j!qQ$k!rQ$l!sQ$p!xS$q!y)gQ$r!zQ$s!{Q$t!|Q$u!}Q$z#RQ${#SQ$|#TQ$}#UQ%O#VQ%]#eQ%l$OQ&h%PQ&k%UQ&l%VQ&y%tQ'U&UQ'V&VQ'X&XQ'a&bQ'e&dQ'f&gQ'g(yQ'i&xQ'm&}Q'r'TQ'w'WS(R(z)zQ(S({Q(T(|Q(U(}Q(W)PQ(X)QQ(Y)RQ(Z)SQ([)TQ(]'hQ(m(QQ(o(`Q(t)WQ(u(pQ(w(rQ(x(vQ)U)ZQ)V)[Q)X)bQ)Y)cQ)])fQ)^)lQ)_)mQ)`)nQ)a)sQ)d*TQ)e*UQ)o)hQ)p)iQ)q)jQ)r)kQ)t)yQ)u*PQ)v*QQ)w*RQ)x*SQ*V){Q*W)|Q*X)}R*Y*OQ$c!lT$y#O)OR$x!}R#XhR#^jR%|$^R$h!o",nodeNames:"⚠ {{ {# {% {% Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression ConcatOp ArithOp ArithOp CompareOp in is StringLiteral NumberLiteral and or NotExpression not FilterExpression FilterOp FilterName FilterCall ) ( ArgumentList NamedArgument AssignOp , NamedArgument ConditionalExpression if else CallExpression ArrayExpression TupleExpression ParenthesizedExpression DictExpression Entry : Entry BooleanLiteral self super loop IfStatement Tag TagName if %} Tag elif Tag else EndTag endif ForStatement Tag for Definition recursive EndTag endfor RawStatement Tag raw RawText EndTag endraw BlockStatement Tag block scoped required EndTag endblock MacroStatement Tag macro ParamList OptionalParameter OptionalParameter EndTag endmacro CallStatement Tag call EndTag endcall FilterStatement Tag filter EndTag endfilter SetStatement Tag set EndTag endset TransStatement Tag trans Tag pluralize EndTag endtrans WithStatement Tag with EndTag endwith AutoescapeStatement Tag autoescape EndTag endautoescape Tag Tag Tag import as from import ImportItem Tag include ignore missing with without context Comment #}",maxTerm:173,nodeProps:[["closedBy",1,"}}",2,"#}",-2,3,4,"%}",32,")"],["openedBy",7,"{{",31,"(",57,"{%",140,"{#"],["group",-18,9,10,13,14,21,22,25,27,38,41,42,43,44,45,49,50,51,52,"Expression",-11,53,64,71,77,84,92,97,102,107,114,119,"Statement"]],skippedNodes:[0],repeatNodeCount:13,tokenData:".|~RqXY#YYZ#Y]^#Ypq#Yqr#krs#vuv&nwx&{xy)nyz)sz{)x{|*V|}+|}!O,R!O!P,g!P!Q,o!Q![+h![!],w!^!_,|!_!`-U!`!a,|!c!}-^!}#O.U#P#Q.Z#R#S-^#T#o-^#o#p.`#p#q.e#q#r.j#r#s.w%W;'S-^;'S;:j.O<%lO-^~#_S$d~XY#YYZ#Y]^#Ypq#Y~#nP!_!`#q~#vOb~~#yWOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~$hOe~~$kYOY#vYZ#vZr#vrs%Zs#O#v#O#P$h#P;'S#v;'S;=`&O;=`<%l#v<%lO#v~%`We~OY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~%{P;=`<%l#v~&RXOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x;=`<%l#v<%lO#v~&sP`~#q#r&v~&{O!Z~~'OWOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~'kYOY&{YZ&{Zw&{wx(Zx#O&{#O#P'h#P;'S&{;'S;=`)O;=`<%l&{<%lO&{~(`We~OY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~({P;=`<%l&{~)RXOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x;=`<%l&{<%lO&{~)sOp~~)xOo~~)}P`~z{*Q~*VO`~~*[Qa~!O!P*b!Q![+h~*eP!Q![*h~*mSf~!Q![*h!g!h*y#R#S*h#X#Y*y~*|R{|+V}!O+V!Q![+]~+YP!Q![+]~+bQf~!Q![+]#R#S+]~+mTf~!O!P*b!Q![+h!g!h*y#R#S+h#X#Y*y~,ROt~~,WRa~uv,a!O!P*b!Q![+h~,dP#q#r&v~,lPZ~!Q![*h~,tP`~!P!Q*Q~,|O!P~~-RPb~!_!`#q~-ZPs~!_!`#q!`-iVm`[p!XS$gY!Q![-^!c!}-^#R#S-^#T#o-^%W;'S-^;'S;:j.O<%lO-^!`.RP;=`<%l-^~.ZO$i~~.`O$h~~.eO$n~~.jOl~^.oP$m[#q#r.rQ.wOVQ~.|O_~",tokenizers:[E,W,1,2,3,4,5,new w("b~RPstU~XP#q#r[~aO$Q~~",17,173)],topRules:{Template:[0,5]},specialized:[{term:161,get:O=>V[O]||-1},{term:55,get:O=>q[O]||-1}],tokenPrec:3602});function S(O,i){return O.split(" ").map(t=>({label:t,type:i}))}const N=S("abs attr batch capitalize center default dictsort escape filesizeformat first float forceescape format groupby indent int items join last length list lower map max min pprint random reject rejectattr replace reverse round safe select selectattr slice sort string striptags sum title tojson trim truncate unique upper urlencode urlize wordcount wordwrap xmlattr","function"),C=S("boolean callable defined divisibleby eq escaped even filter float ge gt in integer iterable le lower lt mapping ne none number odd sameas sequence string test undefined upper range lipsum dict joiner namespace","function"),D=S("loop super self true false varargs kwargs caller name arguments catch_kwargs catch_varargs caller","keyword"),l=C.concat(D),$=S("raw endraw filter endfilter trans pluralize endtrans with endwith autoescape endautoescape if elif else endif for endfor call endcall block endblock set endset macro endmacro import include break continue debug do extends","keyword");function A(O){var i;let{state:t,pos:r}=O,e=x(t).resolveInner(r,-1).enterUnfinishedNodesBefore(r),P=((i=e.childBefore(r))===null||i===void 0?void 0:i.name)||e.name;if(e.name=="FilterName")return{type:"filter",node:e};if(O.explicit&&(P=="FilterOp"||P=="filter"))return{type:"filter"};if(e.name=="TagName")return{type:"tag",node:e};if(O.explicit&&P=="{%")return{type:"tag"};if(e.name=="PropertyName"&&e.parent.name=="MemberExpression")return{type:"prop",node:e,target:e.parent};if(e.name=="."&&e.parent.name=="MemberExpression")return{type:"prop",target:e.parent};if(e.name=="MemberExpression"&&P==".")return{type:"prop",target:e};if(e.name=="VariableName")return{type:"expr",from:e.from};if(e.name=="Comment"||e.name=="StringLiteral"||e.name=="NumberLiteral")return null;let Q=O.matchBefore(/[\w\u00c0-\uffff]+$/);return Q?{type:"expr",from:Q.from}:O.explicit?{type:"expr"}:null}function L(O,i,t,r){let e=[];for(;;){let P=i.getChild("Expression");if(!P)return[];if(P.name=="VariableName"){e.unshift(O.sliceDoc(P.from,P.to));break}else if(P.name=="MemberExpression"){let Q=P.getChild("PropertyName");Q&&e.unshift(O.sliceDoc(Q.from,Q.to)),i=P}else return[]}return r(e,O,t)}function I(O={}){let i=O.tags?O.tags.concat($):$,t=O.variables?O.variables.concat(l):l,{properties:r}=O;return e=>{var P;let Q=A(e);if(!Q)return null;let o=(P=Q.from)!==null&&P!==void 0?P:Q.node?Q.node.from:e.pos,n;return Q.type=="filter"?n=N:Q.type=="tag"?n=i:Q.type=="expr"?n=t:n=r?L(e.state,Q.target,e,r):[],n.length?{options:n,from:o,validFor:/^[\w\u00c0-\uffff]*$/}:null}}const H=d.inputHandler.of((O,i,t,r)=>r!="%"||i!=t||O.state.doc.sliceString(i-1,t+1)!="{}"?!1:(O.dispatch(O.state.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:"%%"},range:g.cursor(e.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function p(O){return i=>{let t=O.test(i.textAfter);return i.lineIndent(i.node.from)+(t?0:i.unit)}}const B=G.define({name:"jinja",parser:F.configure({props:[b({"TagName raw endraw filter endfilter as trans pluralize endtrans with endwith autoescape endautoescape":a.keyword,"required scoped recursive with without context ignore missing":a.modifier,self:a.self,"loop super":a.standard(a.variableName),"if elif else endif for endfor call endcall":a.controlKeyword,"block endblock set endset macro endmacro import from include":a.definitionKeyword,"Comment/...":a.blockComment,VariableName:a.variableName,Definition:a.definition(a.variableName),PropertyName:a.propertyName,FilterName:a.special(a.variableName),ArithOp:a.arithmeticOperator,AssignOp:a.definitionOperator,"not and or":a.logicOperator,CompareOp:a.compareOperator,"in is":a.operatorKeyword,"FilterOp ConcatOp":a.operator,StringLiteral:a.string,NumberLiteral:a.number,BooleanLiteral:a.bool,"{% %} {# #} {{ }} { }":a.brace,"( )":a.paren,".":a.derefOperator,": , .":a.punctuation}),Z.add({Tag:R({closing:"%}"}),"IfStatement ForStatement":p(/^\s*(\{%-?\s*)?(endif|endfor|else|elif)\b/),Statement:p(/^\s*(\{%-?\s*)?end\w/)}),h.add({"Statement Comment"(O){let i=O.firstChild,t=O.lastChild;return!i||i.name!="Tag"&&i.name!="{#"?null:{from:i.to,to:t.name=="EndTag"||t.name=="#}"?t.from:O.to}}})]}),languageData:{indentOnInput:/^\s*{%-?\s*(?:end|elif|else)$/}}),s=m();function c(O){return B.configure({wrap:u(i=>i.type.isTop?{parser:O.parser,overlay:t=>t.name=="Text"||t.name=="RawText"}:null)},"jinja")}const J=c(s.language);function aO(O={}){let i=O.base||s,t=i.language==s.language?J:c(i.language);return new v(t,[i.support,t.data.of({autocomplete:I(O)}),i.language.data.of({closeBrackets:{brackets:["{"]}}),H])}export{H as closePercentBrace,aO as jinja,I as jinjaCompletionSource,J as jinjaLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-Dsl_dfcV.js b/pkg/cli/webapp/dist/assets/index-Dsl_dfcV.js new file mode 100644 index 0000000..ba7e869 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-Dsl_dfcV.js @@ -0,0 +1,7 @@ +import{e as s,E as R,m as Y,C as x,s as w,t as O,a as d,b as k,d as h,L as f,i as u,r as y,c as l,l as g,f as j,o as U,g as G,u as X,N as b,I as Z}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const _=177,q=179,E=184,v=12,C=13,D=17,z=20,F=25,B=53,N=95,I=142,L=144,A=145,J=148,M=10,H=13,K=32,OO=9,$=47,QO=41,eO=125,aO=new R((Q,e)=>{for(let n=0,a=Q.next;(e.context&&(a<0||a==M||a==H||a==$&&Q.peek(n+1)==$)||a==QO||a==eO)&&Q.acceptToken(_),!(a!=K&&a!=OO);)a=Q.peek(++n)},{contextual:!0});let tO=new Set([N,E,z,v,D,L,A,I,J,C,B,F]);const iO=new x({start:!1,shift:(Q,e)=>e==q?Q:tO.has(e)}),XO=w({"func interface struct chan map const type var":O.definitionKeyword,"import package":O.moduleKeyword,"switch for go select return break continue goto fallthrough case if else defer":O.controlKeyword,range:O.keyword,Bool:O.bool,String:O.string,Rune:O.character,Number:O.number,Nil:O.null,VariableName:O.variableName,DefName:O.definition(O.variableName),TypeName:O.typeName,LabelName:O.labelName,FieldName:O.propertyName,"FunctionDecl/DefName":O.function(O.definition(O.variableName)),"TypeSpec/DefName":O.definition(O.typeName),"CallExpr/VariableName":O.function(O.variableName),LineComment:O.lineComment,BlockComment:O.blockComment,LogicOp:O.logicOperator,ArithOp:O.arithmeticOperator,BitOp:O.bitwiseOperator,"DerefOp .":O.derefOperator,"UpdateOp IncDecOp":O.updateOperator,CompareOp:O.compareOperator,"= :=":O.definitionOperator,"<-":O.operator,'~ "*"':O.modifier,"; ,":O.separator,"... :":O.punctuation,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),nO={__proto__:null,package:10,import:18,true:380,false:380,nil:383,struct:48,func:68,interface:78,chan:94,map:118,make:157,new:159,const:204,type:212,var:224,if:236,else:238,switch:242,case:248,default:250,for:260,range:266,go:270,select:274,return:284,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q*[(cS*^(i-[Q+P*`R-c-dS#w|!pS$w!j-TQ&T#xQ(R&QQ(W&UR(X&VT%|#u&OhqOScw!U!V#O#k#n&|'Y+gU$Q!R$R&jU$W!T$X&uQ$e!WY%y#u&O'})|*wQ)`']V-S'W)W*kS&[#y&]S*R(S(oR*z*QY&Y#y&](S(o*QR*W(['``OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dS&_#}&dW(S&S*S*|+^Q(e&bQ(o&lR*x*PS%U!t*`R+q+jR%S!qQ#PcQ(}&|Q)Z'YR+n+ghpOScw!U!V#O#k#n&|'Y+gQ$d!WQ$n!ZQ%g#VU%p#i'T,bU%q#j'U,cQ(j&gQ(u&sQ)Q'PQ)_']Q)y'wQ*_(kQ*a(tV-R'W)W*kT(U&S&l",nodeNames:"⚠ LineComment BlockComment SourceFile PackageClause package DefName ; ImportDecl import ImportSpec . String ) ( SpecList ExprStatement Number Bool Nil Rune VariableName TypedLiteral StructType struct } { StructBody FieldDecl FieldName , PointerType * FunctionType func Parameters Parameter ... InterfaceType interface InterfaceBody MethodElem UnderlyingType ~ TypeElem LogicOp ChannelType chan <- ParenthesizedType QualifiedType TypeName ParameterizedType ] [ TypeArgs ArrayType SliceType MapType map LiteralValue Element Key : Element Key ParenthesizedExpr FunctionLiteral Block Conversion SelectorExpr IndexExpr SliceExpr TypeAssertion CallExpr ParameterizedExpr Arguments CallExpr make new Arguments UnaryExp ArithOp LogicOp BitOp DerefOp BinaryExp ArithOp BitOp BitOp CompareOp LogicOp LogicOp SendStatement IncDecStatement IncDecOp Assignment = UpdateOp VarDecl := ConstDecl const ConstSpec SpecList TypeDecl type TypeSpec TypeParams TypeParam SpecList VarDecl var VarSpec SpecList LabeledStatement LabelName IfStatement if else SwitchStatement switch SwitchBlock Case case default TypeSwitchStatement SwitchBlock Case ForStatement for ForClause RangeClause range GoStatement go SelectStatement select SelectBlock Case ReceiveStatement ReturnStatement return GotoStatement break continue goto FallthroughStatement fallthrough DeferStatement defer FunctionDecl MethodDecl",maxTerm:218,context:iO,nodeProps:[["isolate",-3,2,12,20,""],["group",-18,12,17,18,19,20,21,22,66,67,69,70,71,72,73,74,77,81,86,"Expr",-20,16,68,93,94,96,99,101,105,111,115,117,120,126,129,134,136,141,143,147,149,"Statement",-12,23,31,33,38,46,49,50,51,52,56,57,58,"Type"],["openedBy",13,"(",25,"{",53,"["],["closedBy",14,")",26,"}",54,"]"]],propSources:[XO],skippedNodes:[0,1,2,153],repeatNodeCount:23,tokenData:":b~RvXY#iYZ#i]^#ipq#iqr#zrs$Xuv&Pvw&^wx&yxy(qyz(vz{({{|)T|})e}!O)j!O!P)u!P!Q+}!Q!R,y!R![-t![!]2^!]!^2k!^!_2p!_!`3]!`!a3e!c!}3x!}#O4j#P#Q4o#Q#R4t#R#S4|#S#T9X#T#o3x#o#p9q#p#q9v#q#r:W#r#s:]$g;'S3x;'S;=`4d<%lO3x~#nS$y~XY#iYZ#i]^#ipq#iU$PP%hQ!_!`$SS$XO!|S~$^W[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y<%lO$X~${O[~~%ORO;'S$X;'S;=`%X;=`O$X~%^X[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y;=`<%l$X<%lO$X~%|P;=`<%l$X~&UP%l~!_!`&X~&^O#U~~&cR%j~vw&l!_!`&X#Q#R&q~&qO%p~~&vP%o~!_!`&X~'OWd~OY&yZw&ywx'hx#O&y#O#P'm#P;'S&y;'S;=`(k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!|S!_!`$S!`!a3p~3uP%n~!_!`&X~3}V%O~!Q![3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~4gP;=`<%l3x~4oO!W~~4tO!V~~4yP%i~!_!`&X~5RV%O~!Q![5h!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~5o^aQ%O~!O!P*`!Q![5h!c!g3x!g!h6k!h!}3x#R#S4|#T#X3x#X#Y6k#Y#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~6pX%O~{|+T}!O+T!Q![7]!c!}3x#R#S8P#T#o3x$g;'S3x;'S;=`4d<%lO3x~7dXaQ%O~!Q![7]!c!}3x#R#S8P#T#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~8UV%O~!Q![7]!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~8rVaQ%O~!Q![3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~9[TO#S9X#S#T$v#T;'S9X;'S;=`9k<%lO9X~9nP;=`<%l9X~9vOj~~9{Q%`~!_!`&X#p#q:R~:WO%q~~:]Oi~~:bO{~",tokenizers:[aO,1,2,new Y("j~RQYZXz{^~^O$|~~aP!P!Qd~iO$}~~",25,181)],topRules:{SourceFile:[0,3]},dynamicPrecedences:{19:1,51:-1,55:2,69:-1,108:-1},specialized:[{term:184,get:Q=>nO[Q]||-1}],tokenPrec:5451}),oO=[X("func ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"declaration",type:"keyword"}),X("func (${receiver}) ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"method declaration",type:"keyword"}),X("var ${name} = ${value}",{label:"var",detail:"declaration",type:"keyword"}),X("type ${name} ${type}",{label:"type",detail:"declaration",type:"keyword"}),X("const ${name} = ${value}",{label:"const",detail:"declaration",type:"keyword"}),X("type ${name} = ${type}",{label:"type",detail:"alias declaration",type:"keyword"}),X("for ${init}; ${test}; ${update} {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for ${i} := range ${value} {\n ${}\n}",{label:"for",detail:"range",type:"keyword"}),X(`select { + \${} +}`,{label:"select",detail:"statement",type:"keyword"}),X("case ${}:\n${}",{label:"case",type:"keyword"}),X("switch ${} {\n ${}\n}",{label:"switch",detail:"statement",type:"keyword"}),X("switch ${}.(${type}) {\n ${}\n}",{label:"switch",detail:"type statement",type:"keyword"}),X("if ${} {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),X(`if \${} { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),X('import ${name} "${module}"\n${}',{label:"import",detail:"declaration",type:"keyword"})],S=new b,T=new Set(["SourceFile","Block","FunctionDecl","MethodDecl","FunctionLiteral","ForStatement","SwitchStatement","TypeSwitchStatement","IfStatement"]);function o(Q,e){return(n,a)=>{O:for(let t=n.node.firstChild,c=0,i=null;;){for(;!t;){if(!c)break O;c--,t=i.nextSibling,i=i.parent}e&&t.name==e||t.name=="SpecList"?(c++,i=t,t=t.firstChild):(t.name=="DefName"&&a(t,Q),t=t.nextSibling)}return!0}}const cO={FunctionDecl:o("function"),VarDecl:o("var","VarSpec"),ConstDecl:o("constant","ConstSpec"),TypeDecl:o("type","TypeSpec"),ImportDecl:o("constant","ImportSpec"),Parameter:o("var"),__proto__:null};function m(Q,e){let n=S.get(e);if(n)return n;let a=[],t=!0;function c(i,P){let V=Q.sliceString(i.from,i.to);a.push({label:V,type:P})}return e.cursor(Z.IncludeAnonymous).iterate(i=>{if(t)t=!1;else if(i.name){let P=cO[i.name];if(P&&P(i,c)||T.has(i.name))return!1}else if(i.to-i.from>8192){for(let P of m(Q,i.node))a.push(P);return!1}}),S.set(e,a),a}const p=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,W=["String","LineComment","BlockComment","DefName","LabelName","FieldName",".","?."],rO=Q=>{let e=G(Q.state).resolveInner(Q.pos,-1);if(W.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&p.test(Q.state.sliceDoc(e.from,e.to));if(!n&&!Q.explicit)return null;let a=[];for(let t=e;t;t=t.parent)T.has(t.name)&&(a=a.concat(m(Q.state.doc,t)));return{options:a,from:n?e.from:Q.pos,validFor:p}},r=f.define({name:"go",parser:PO.configure({props:[u.add({IfStatement:l({except:/^\s*({|else\b)/}),LabeledStatement:y,"SwitchBlock SelectBlock":Q=>{let e=Q.textAfter,n=/^\s*\}/.test(e),a=/^\s*(case|default)\b/.test(e);return Q.baseIndent+(n||a?0:Q.unit)},Block:g({closing:"}"}),BlockComment:()=>null,Statement:l({except:/^{/})}),j.add({"Block SwitchBlock SelectBlock LiteralValue InterfaceType StructType SpecList":U,BlockComment(Q){return{from:Q.from+2,to:Q.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case\b|default\b|\})$/}});let lO=Q=>({label:Q,type:"keyword"});const $O="interface struct chan map package go return break continue goto fallthrough else defer range true false nil".split(" ").map(lO);function sO(){let Q=oO.concat($O);return new d(r,[r.data.of({autocomplete:k(W,h(Q))}),r.data.of({autocomplete:rO})])}export{sO as go,r as goLanguage,rO as localCompletionSource,oO as snippets}; diff --git a/pkg/cli/webapp/dist/assets/index-RgHATUD5.js b/pkg/cli/webapp/dist/assets/index-RgHATUD5.js new file mode 100644 index 0000000..f6712ca --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-RgHATUD5.js @@ -0,0 +1,17 @@ +const He=(function(e){if(e==null)return tn;if(typeof e=="function")return Fe(e);if(typeof e=="object")return Array.isArray(e)?Gt(e):Xt(e);if(typeof e=="string")return en(e);throw new Error("Expected function, string, or object as test")});function Gt(e){const n=[];let t=-1;for(;++t":""))+")"})}return g;function g(){let c=kt,y,C,I;if((!n||u(a,s,f[f.length-1]||void 0))&&(c=an(t(a,f)),c[0]===Pe))return c;if("children"in a&&a.children){const d=a;if(d.children&&c[0]!==un)for(C=(r?d.children.length:-1)+i,I=f.concat(d);C>-1&&C-1&&e.test(String.fromCharCode(t))}}function xu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ke(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];dt.peek=dn;function bu(){return{canContainEols:["delete"],enter:{strikethrough:gn},exit:{strikethrough:kn}}}function yu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mn}],handlers:{delete:dt}}}function gn(e){this.enter({type:"delete",children:[]},e)}function kn(e){this.exit(e)}function dt(e,n,t,r){const l=t.createTracker(r),u=t.enter("strikethrough");let i=l.move("~~");return i+=t.containerPhrasing(e,{...l.current(),before:i,after:"~"}),i+=l.move("~~"),u(),i}function dn(){return"~"}function xn(e){return e.length}function bn(e,n){const t=n||{},r=(t.align||[]).concat(),l=t.stringLength||xn,u=[],i=[],o=[],a=[];let s=0,f=-1;for(;++fs&&(s=e[f].length);++da[d])&&(a[d]=S)}C.push(_)}i[f]=C,o[f]=I}let h=-1;if(typeof r=="object"&&"length"in r)for(;++ha[h]&&(a[h]=_),c[h]=_),g[h]=S}i.splice(1,0,g),o.splice(1,0,c),f=-1;const y=[];for(;++f "),u.shift(2);const i=t.indentLines(t.containerFlow(e,u.current()),Sn);return l(),i}function Sn(e,n,t){return">"+(t?"":" ")+e}function Cn(e,n){return Ge(e,n.inConstruct,!0)&&!Ge(e,n.notInConstruct,!1)}function Ge(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ri&&(i=u):u=1,l=r+n.length,r=t.indexOf(n,l);return i}function Tn(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function zn(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function En(e,n,t,r){const l=zn(t),u=e.value||"",i=l==="`"?"GraveAccent":"Tilde";if(Tn(e,t)){const h=t.enter("codeIndented"),g=t.indentLines(u,_n);return h(),g}const o=t.createTracker(r),a=l.repeat(Math.max(In(u,l)+1,3)),s=t.enter("codeFenced");let f=o.move(a);if(e.lang){const h=t.enter(`codeFencedLang${i}`);f+=o.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),h()}if(e.lang&&e.meta){const h=t.enter(`codeFencedMeta${i}`);f+=o.move(" "),f+=o.move(t.safe(e.meta,{before:f,after:` +`,encode:["`"],...o.current()})),h()}return f+=o.move(` +`),u&&(f+=o.move(u+` +`)),f+=o.move(a),s(),f}function _n(e,n,t){return(t?"":" ")+e}function ve(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Fn(e,n,t,r){const l=ve(t),u=l==='"'?"Quote":"Apostrophe",i=t.enter("definition");let o=t.enter("label");const a=t.createTracker(r);let s=a.move("[");return s+=a.move(t.safe(t.associationId(e),{before:s,after:"]",...a.current()})),s+=a.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),s+=a.move("<"),s+=a.move(t.safe(e.url,{before:s,after:">",...a.current()})),s+=a.move(">")):(o=t.enter("destinationRaw"),s+=a.move(t.safe(e.url,{before:s,after:e.title?" ":` +`,...a.current()}))),o(),e.title&&(o=t.enter(`title${u}`),s+=a.move(" "+l),s+=a.move(t.safe(e.title,{before:s,after:l,...a.current()})),s+=a.move(l),o()),i(),s}function An(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Ie(e){return"&#x"+e.toString(16).toUpperCase()+";"}function de(e){if(e===null||$(e)||pn(e))return 1;if(fn(e))return 2}function _e(e,n,t){const r=de(e),l=de(n);return r===void 0?l===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}xt.peek=Ln;function xt(e,n,t,r){const l=An(t),u=t.enter("emphasis"),i=t.createTracker(r),o=i.move(l);let a=i.move(t.containerPhrasing(e,{after:l,before:o,...i.current()}));const s=a.charCodeAt(0),f=_e(r.before.charCodeAt(r.before.length-1),s,l);f.inside&&(a=Ie(s)+a.slice(1));const h=a.charCodeAt(a.length-1),g=_e(r.after.charCodeAt(0),h,l);g.inside&&(a=a.slice(0,-1)+Ie(h));const c=i.move(l);return u(),t.attentionEncodeSurroundingInfo={after:g.outside,before:f.outside},o+a+c}function Ln(e,n,t){return t.options.emphasis||"*"}const Bn={};function je(e,n){const t=Bn,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,l=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return bt(e,r,l)}function bt(e,n,t){if(Dn(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return et(e.children,n,t)}return Array.isArray(e)?et(e,n,t):""}function et(e,n,t){const r=[];let l=-1;for(;++l",...a.current()})),s+=a.move(">")):(o=t.enter("destinationRaw"),s+=a.move(t.safe(e.url,{before:s,after:e.title?" ":")",...a.current()}))),o(),e.title&&(o=t.enter(`title${u}`),s+=a.move(" "+l),s+=a.move(t.safe(e.title,{before:s,after:l,...a.current()})),s+=a.move(l),o()),s+=a.move(")"),i(),s}function On(){return"!"}St.peek=Nn;function St(e,n,t,r){const l=e.referenceType,u=t.enter("imageReference");let i=t.enter("label");const o=t.createTracker(r);let a=o.move("![");const s=t.safe(e.alt,{before:a,after:"]",...o.current()});a+=o.move(s+"]["),i();const f=t.stack;t.stack=[],i=t.enter("reference");const h=t.safe(t.associationId(e),{before:a,after:"]",...o.current()});return i(),t.stack=f,u(),l==="full"||!s||s!==h?a+=o.move(h+"]"):l==="shortcut"?a=a.slice(0,-1):a+=o.move("]"),a}function Nn(){return"!"}Ct.peek=qn;function Ct(e,n,t){let r=e.value||"",l="`",u=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(r);)l+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u\u007F]/.test(e.url))}Tt.peek=Hn;function Tt(e,n,t,r){const l=ve(t),u=l==='"'?"Quote":"Apostrophe",i=t.createTracker(r);let o,a;if(It(e,t)){const f=t.stack;t.stack=[],o=t.enter("autolink");let h=i.move("<");return h+=i.move(t.containerPhrasing(e,{before:h,after:">",...i.current()})),h+=i.move(">"),o(),t.stack=f,h}o=t.enter("link"),a=t.enter("label");let s=i.move("[");return s+=i.move(t.containerPhrasing(e,{before:s,after:"](",...i.current()})),s+=i.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),s+=i.move("<"),s+=i.move(t.safe(e.url,{before:s,after:">",...i.current()})),s+=i.move(">")):(a=t.enter("destinationRaw"),s+=i.move(t.safe(e.url,{before:s,after:e.title?" ":")",...i.current()}))),a(),e.title&&(a=t.enter(`title${u}`),s+=i.move(" "+l),s+=i.move(t.safe(e.title,{before:s,after:l,...i.current()})),s+=i.move(l),a()),s+=i.move(")"),o(),s}function Hn(e,n,t){return It(e,t)?"<":"["}zt.peek=vn;function zt(e,n,t,r){const l=e.referenceType,u=t.enter("linkReference");let i=t.enter("label");const o=t.createTracker(r);let a=o.move("[");const s=t.containerPhrasing(e,{before:a,after:"]",...o.current()});a+=o.move(s+"]["),i();const f=t.stack;t.stack=[],i=t.enter("reference");const h=t.safe(t.associationId(e),{before:a,after:"]",...o.current()});return i(),t.stack=f,u(),l==="full"||!s||s!==h?a+=o.move(h+"]"):l==="shortcut"?a=a.slice(0,-1):a+=o.move("]"),a}function vn(){return"["}function Ve(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function jn(e){const n=Ve(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Vn(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Et(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function $n(e,n,t,r){const l=t.enter("list"),u=t.bulletCurrent;let i=e.ordered?Vn(t):Ve(t);const o=e.ordered?i==="."?")":".":jn(t);let a=n&&t.bulletLastUsed?i===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(a=!0),Et(t)===i&&f){let h=-1;for(;++h-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+u);let i=u.length+1;(l==="tab"||l==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(i=Math.ceil(i/4)*4);const o=t.createTracker(r);o.move(u+" ".repeat(i-u.length)),o.shift(i);const a=t.enter("listItem"),s=t.indentLines(t.containerFlow(e,o.current()),f);return a(),s;function f(h,g,c){return g?(c?"":" ".repeat(i))+h:(c?u:u+" ".repeat(i-u.length))+h}}function Wn(e,n,t,r){const l=t.enter("paragraph"),u=t.enter("phrasing"),i=t.containerPhrasing(e,r);return u(),l(),i}const Yn=He(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Jn(e,n,t,r){return(e.children.some(function(i){return Yn(i)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Kn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}_t.peek=Zn;function _t(e,n,t,r){const l=Kn(t),u=t.enter("strong"),i=t.createTracker(r),o=i.move(l+l);let a=i.move(t.containerPhrasing(e,{after:l,before:o,...i.current()}));const s=a.charCodeAt(0),f=_e(r.before.charCodeAt(r.before.length-1),s,l);f.inside&&(a=Ie(s)+a.slice(1));const h=a.charCodeAt(a.length-1),g=_e(r.after.charCodeAt(0),h,l);g.inside&&(a=a.slice(0,-1)+Ie(h));const c=i.move(l+l);return u(),t.attentionEncodeSurroundingInfo={after:g.outside,before:f.outside},o+a+c}function Zn(e,n,t){return t.options.strong||"*"}function Gn(e,n,t,r){return t.safe(e.value,r)}function Xn(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function er(e,n,t){const r=(Et(t)+(t.options.ruleSpaces?" ":"")).repeat(Xn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Ft={blockquote:wn,break:Xe,code:En,definition:Fn,emphasis:xt,hardBreak:Xe,heading:Pn,html:yt,image:wt,imageReference:St,inlineCode:Ct,link:Tt,linkReference:zt,list:$n,listItem:Un,paragraph:Wn,root:Jn,strong:_t,text:Gn,thematicBreak:er},tt=document.createElement("i");function $e(e){const n="&"+e+";";tt.innerHTML=n;const t=tt.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function At(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}const tr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nr(e){return e.replace(tr,rr)}function rr(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const l=t.charCodeAt(1),u=l===120||l===88;return At(t.slice(u?2:1),u?16:10)}return $e(t)||e}function wu(){return{enter:{table:ir,tableData:nt,tableHeader:nt,tableRow:lr},exit:{codeText:ar,table:ur,tableData:Be,tableHeader:Be,tableRow:Be}}}function ir(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function ur(e){this.exit(e),this.data.inTable=void 0}function lr(e){this.enter({type:"tableRow",children:[]},e)}function Be(e){this.exit(e)}function nt(e){this.enter({type:"tableCell",children:[]},e)}function ar(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,or));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function or(e,n){return n==="|"?n:e}function Su(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,l=n.stringLength,u=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:i,tableCell:a,tableRow:o}};function i(c,y,C,I){return s(f(c,C,I),c.align)}function o(c,y,C,I){const d=h(c,C,I),_=s([d]);return _.slice(0,_.indexOf(` +`))}function a(c,y,C,I){const d=C.enter("tableCell"),_=C.enter("phrasing"),S=C.containerPhrasing(c,{...I,before:u,after:u});return _(),d(),S}function s(c,y){return bn(c,{align:y,alignDelimiters:r,padding:t,stringLength:l})}function f(c,y,C){const I=c.children;let d=-1;const _=[],S=y.enter("table");for(;++dl?0:l+n:n=n>l?l:n,t=t>0?t:0,r.length<1e4)i=Array.from(r),i.unshift(n,t),e.splice(...i);else for(t&&e.splice(n,t);u0?(Y(e,e.length,0,n),e):n}const it={}.hasOwnProperty;function hr(e){const n={};let t=-1;for(;++t1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},g={...e[t][1].start};ut(h,-a),ut(g,a),i={type:a>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},o={type:a>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:g},u={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},l={type:a>1?"strong":"emphasis",start:{...i.start},end:{...o.end}},e[r][1].end={...i.start},e[t][1].start={...o.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=K(s,[["enter",e[r][1],n],["exit",e[r][1],n]])),s=K(s,[["enter",l,n],["enter",i,n],["exit",i,n],["enter",u,n]]),s=K(s,Ae(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),s=K(s,[["exit",u,n],["enter",o,n],["exit",o,n],["exit",l,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,s=K(s,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,Y(e,r-1,t-r+3,s),t=r+s.length-f-2;break}}for(t=-1;++t0&&A(b)?M(e,_,"linePrefix",u+1)(b):_(b)}function _(b){return b===null||E(b)?e.check(lt,C,D)(b):(e.enter("codeFlowValue"),S(b))}function S(b){return b===null||E(b)?(e.exit("codeFlowValue"),_(b)):(e.consume(b),S)}function D(b){return e.exit("codeFenced"),n(b)}function L(b,R,H){let O=0;return k;function k(P){return b.enter("lineEnding"),b.consume(P),b.exit("lineEnding"),T}function T(P){return b.enter("codeFencedFence"),A(P)?M(b,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):z(P)}function z(P){return P===o?(b.enter("codeFencedFenceSequence"),N(P)):H(P)}function N(P){return P===o?(O++,b.consume(P),N):O>=i?(b.exit("codeFencedFenceSequence"),A(P)?M(b,v,"whitespace")(P):v(P)):H(P)}function v(P){return P===null||E(P)?(b.exit("codeFencedFence"),R(P)):H(P)}}}function Tr(e,n,t){const r=this;return l;function l(i){return i===null?t(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),u)}function u(i){return r.parser.lazy[r.now().line]?t(i):n(i)}}const De={name:"codeIndented",tokenize:Er},zr={partial:!0,tokenize:_r};function Er(e,n,t){const r=this;return l;function l(s){return e.enter("codeIndented"),M(e,u,"linePrefix",5)(s)}function u(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?i(s):t(s)}function i(s){return s===null?a(s):E(s)?e.attempt(zr,i,a)(s):(e.enter("codeFlowValue"),o(s))}function o(s){return s===null||E(s)?(e.exit("codeFlowValue"),i(s)):(e.consume(s),o)}function a(s){return e.exit("codeIndented"),n(s)}}function _r(e,n,t){const r=this;return l;function l(i){return r.parser.lazy[r.now().line]?t(i):E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),l):M(e,u,"linePrefix",5)(i)}function u(i){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(i):E(i)?l(i):t(i)}}const Fr={name:"codeText",previous:Lr,resolve:Ar,tokenize:Br};function Ar(e){let n=e.length-4,t=3,r,l;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const l=t||0;this.setCursor(Math.trunc(n));const u=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return r&&we(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),we(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),we(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(i):e.interrupt(r.parser.constructs.flow,t,n)(i)}}function Pt(e,n,t,r,l,u,i,o,a){const s=a||Number.POSITIVE_INFINITY;let f=0;return h;function h(d){return d===60?(e.enter(r),e.enter(l),e.enter(u),e.consume(d),e.exit(u),g):d===null||d===32||d===41||Me(d)?t(d):(e.enter(r),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),C(d))}function g(d){return d===62?(e.enter(u),e.consume(d),e.exit(u),e.exit(l),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===62?(e.exit("chunkString"),e.exit(o),g(d)):d===null||d===60||E(d)?t(d):(e.consume(d),d===92?y:c)}function y(d){return d===60||d===62||d===92?(e.consume(d),c):c(d)}function C(d){return!f&&(d===null||d===41||$(d))?(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(r),n(d)):f999||c===null||c===91||c===93&&!a||c===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs?t(c):c===93?(e.exit(u),e.enter(l),e.consume(c),e.exit(l),e.exit(r),n):E(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(c))}function h(c){return c===null||c===91||c===93||E(c)||o++>999?(e.exit("chunkString"),f(c)):(e.consume(c),a||(a=!A(c)),c===92?g:h)}function g(c){return c===91||c===92||c===93?(e.consume(c),o++,h):h(c)}}function Ot(e,n,t,r,l,u){let i;return o;function o(g){return g===34||g===39||g===40?(e.enter(r),e.enter(l),e.consume(g),e.exit(l),i=g===40?41:g,a):t(g)}function a(g){return g===i?(e.enter(l),e.consume(g),e.exit(l),e.exit(r),n):(e.enter(u),s(g))}function s(g){return g===i?(e.exit(u),a(i)):g===null?t(g):E(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),M(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===i||g===null||E(g)?(e.exit("chunkString"),s(g)):(e.consume(g),g===92?h:f)}function h(g){return g===i||g===92?(e.consume(g),f):f(g)}}function Se(e,n){let t;return r;function r(l){return E(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t=!0,r):A(l)?M(e,r,t?"linePrefix":"lineSuffix")(l):n(l)}}const Hr={name:"definition",tokenize:jr},vr={partial:!0,tokenize:Vr};function jr(e,n,t){const r=this;let l;return u;function u(c){return e.enter("definition"),i(c)}function i(c){return Mt.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function o(c){return l=ke(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),c===58?(e.enter("definitionMarker"),e.consume(c),e.exit("definitionMarker"),a):t(c)}function a(c){return $(c)?Se(e,s)(c):s(c)}function s(c){return Pt(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(c)}function f(c){return e.attempt(vr,h,h)(c)}function h(c){return A(c)?M(e,g,"whitespace")(c):g(c)}function g(c){return c===null||E(c)?(e.exit("definition"),r.parser.defined.push(l),n(c)):t(c)}}function Vr(e,n,t){return r;function r(o){return $(o)?Se(e,l)(o):t(o)}function l(o){return Ot(e,u,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function u(o){return A(o)?M(e,i,"whitespace")(o):i(o)}function i(o){return o===null||E(o)?n(o):t(o)}}const $r={name:"hardBreakEscape",tokenize:Qr};function Qr(e,n,t){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),l}function l(u){return E(u)?(e.exit("hardBreakEscape"),n(u)):t(u)}}const Ur={name:"headingAtx",resolve:Wr,tokenize:Yr};function Wr(e,n){let t=e.length-2,r=3,l,u;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(l={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},u={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Y(e,r,t-r+1,[["enter",l,n],["enter",u,n],["exit",u,n],["exit",l,n]])),e}function Yr(e,n,t){let r=0;return l;function l(f){return e.enter("atxHeading"),u(f)}function u(f){return e.enter("atxHeadingSequence"),i(f)}function i(f){return f===35&&r++<6?(e.consume(f),i):f===null||$(f)?(e.exit("atxHeadingSequence"),o(f)):t(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),a(f)):f===null||E(f)?(e.exit("atxHeading"),n(f)):A(f)?M(e,o,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function a(f){return f===35?(e.consume(f),a):(e.exit("atxHeadingSequence"),o(f))}function s(f){return f===null||f===35||$(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),s)}}const Jr=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ot=["pre","script","style","textarea"],Kr={concrete:!0,name:"htmlFlow",resolveTo:Xr,tokenize:ei},Zr={partial:!0,tokenize:ni},Gr={partial:!0,tokenize:ti};function Xr(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function ei(e,n,t){const r=this;let l,u,i,o,a;return s;function s(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),h}function h(m){return m===33?(e.consume(m),g):m===47?(e.consume(m),u=!0,C):m===63?(e.consume(m),l=3,r.interrupt?n:p):ne(m)?(e.consume(m),i=String.fromCharCode(m),I):t(m)}function g(m){return m===45?(e.consume(m),l=2,c):m===91?(e.consume(m),l=5,o=0,y):ne(m)?(e.consume(m),l=4,r.interrupt?n:p):t(m)}function c(m){return m===45?(e.consume(m),r.interrupt?n:p):t(m)}function y(m){const X="CDATA[";return m===X.charCodeAt(o++)?(e.consume(m),o===X.length?r.interrupt?n:z:y):t(m)}function C(m){return ne(m)?(e.consume(m),i=String.fromCharCode(m),I):t(m)}function I(m){if(m===null||m===47||m===62||$(m)){const X=m===47,ce=i.toLowerCase();return!X&&!u&&ot.includes(ce)?(l=1,r.interrupt?n(m):z(m)):Jr.includes(i.toLowerCase())?(l=6,X?(e.consume(m),d):r.interrupt?n(m):z(m)):(l=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):u?_(m):S(m))}return m===45||te(m)?(e.consume(m),i+=String.fromCharCode(m),I):t(m)}function d(m){return m===62?(e.consume(m),r.interrupt?n:z):t(m)}function _(m){return A(m)?(e.consume(m),_):k(m)}function S(m){return m===47?(e.consume(m),k):m===58||m===95||ne(m)?(e.consume(m),D):A(m)?(e.consume(m),S):k(m)}function D(m){return m===45||m===46||m===58||m===95||te(m)?(e.consume(m),D):L(m)}function L(m){return m===61?(e.consume(m),b):A(m)?(e.consume(m),L):S(m)}function b(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),a=m,R):A(m)?(e.consume(m),b):H(m)}function R(m){return m===a?(e.consume(m),a=null,O):m===null||E(m)?t(m):(e.consume(m),R)}function H(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||$(m)?L(m):(e.consume(m),H)}function O(m){return m===47||m===62||A(m)?S(m):t(m)}function k(m){return m===62?(e.consume(m),T):t(m)}function T(m){return m===null||E(m)?z(m):A(m)?(e.consume(m),T):t(m)}function z(m){return m===45&&l===2?(e.consume(m),Q):m===60&&l===1?(e.consume(m),j):m===62&&l===4?(e.consume(m),G):m===63&&l===3?(e.consume(m),p):m===93&&l===5?(e.consume(m),re):E(m)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(Zr,ie,N)(m)):m===null||E(m)?(e.exit("htmlFlowData"),N(m)):(e.consume(m),z)}function N(m){return e.check(Gr,v,ie)(m)}function v(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),P}function P(m){return m===null||E(m)?N(m):(e.enter("htmlFlowData"),z(m))}function Q(m){return m===45?(e.consume(m),p):z(m)}function j(m){return m===47?(e.consume(m),i="",Z):z(m)}function Z(m){if(m===62){const X=i.toLowerCase();return ot.includes(X)?(e.consume(m),G):z(m)}return ne(m)&&i.length<8?(e.consume(m),i+=String.fromCharCode(m),Z):z(m)}function re(m){return m===93?(e.consume(m),p):z(m)}function p(m){return m===62?(e.consume(m),G):m===45&&l===2?(e.consume(m),p):z(m)}function G(m){return m===null||E(m)?(e.exit("htmlFlowData"),ie(m)):(e.consume(m),G)}function ie(m){return e.exit("htmlFlow"),n(m)}}function ti(e,n,t){const r=this;return l;function l(i){return E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),u):t(i)}function u(i){return r.parser.lazy[r.now().line]?t(i):n(i)}}function ni(e,n,t){return r;function r(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Le,n,t)}}const ri={name:"htmlText",tokenize:ii};function ii(e,n,t){const r=this;let l,u,i;return o;function o(p){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(p),a}function a(p){return p===33?(e.consume(p),s):p===47?(e.consume(p),L):p===63?(e.consume(p),S):ne(p)?(e.consume(p),H):t(p)}function s(p){return p===45?(e.consume(p),f):p===91?(e.consume(p),u=0,y):ne(p)?(e.consume(p),_):t(p)}function f(p){return p===45?(e.consume(p),c):t(p)}function h(p){return p===null?t(p):p===45?(e.consume(p),g):E(p)?(i=h,j(p)):(e.consume(p),h)}function g(p){return p===45?(e.consume(p),c):h(p)}function c(p){return p===62?Q(p):p===45?g(p):h(p)}function y(p){const G="CDATA[";return p===G.charCodeAt(u++)?(e.consume(p),u===G.length?C:y):t(p)}function C(p){return p===null?t(p):p===93?(e.consume(p),I):E(p)?(i=C,j(p)):(e.consume(p),C)}function I(p){return p===93?(e.consume(p),d):C(p)}function d(p){return p===62?Q(p):p===93?(e.consume(p),d):C(p)}function _(p){return p===null||p===62?Q(p):E(p)?(i=_,j(p)):(e.consume(p),_)}function S(p){return p===null?t(p):p===63?(e.consume(p),D):E(p)?(i=S,j(p)):(e.consume(p),S)}function D(p){return p===62?Q(p):S(p)}function L(p){return ne(p)?(e.consume(p),b):t(p)}function b(p){return p===45||te(p)?(e.consume(p),b):R(p)}function R(p){return E(p)?(i=R,j(p)):A(p)?(e.consume(p),R):Q(p)}function H(p){return p===45||te(p)?(e.consume(p),H):p===47||p===62||$(p)?O(p):t(p)}function O(p){return p===47?(e.consume(p),Q):p===58||p===95||ne(p)?(e.consume(p),k):E(p)?(i=O,j(p)):A(p)?(e.consume(p),O):Q(p)}function k(p){return p===45||p===46||p===58||p===95||te(p)?(e.consume(p),k):T(p)}function T(p){return p===61?(e.consume(p),z):E(p)?(i=T,j(p)):A(p)?(e.consume(p),T):O(p)}function z(p){return p===null||p===60||p===61||p===62||p===96?t(p):p===34||p===39?(e.consume(p),l=p,N):E(p)?(i=z,j(p)):A(p)?(e.consume(p),z):(e.consume(p),v)}function N(p){return p===l?(e.consume(p),l=void 0,P):p===null?t(p):E(p)?(i=N,j(p)):(e.consume(p),N)}function v(p){return p===null||p===34||p===39||p===60||p===61||p===96?t(p):p===47||p===62||$(p)?O(p):(e.consume(p),v)}function P(p){return p===47||p===62||$(p)?O(p):t(p)}function Q(p){return p===62?(e.consume(p),e.exit("htmlTextData"),e.exit("htmlText"),n):t(p)}function j(p){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Z}function Z(p){return A(p)?M(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p):re(p)}function re(p){return e.enter("htmlTextData"),i(p)}}const Qe={name:"labelEnd",resolveAll:oi,resolveTo:si,tokenize:ci},ui={tokenize:hi},li={tokenize:fi},ai={tokenize:pi};function oi(e){let n=-1;const t=[];for(;++n=3&&(s===null||E(s))?(e.exit("thematicBreak"),n(s)):t(s)}function a(s){return s===l?(e.consume(s),r++,a):(e.exit("thematicBreakSequence"),A(s)?M(e,o,"whitespace")(s):o(s))}}const U={continuation:{tokenize:Ci},exit:Ti,name:"list",tokenize:Si},yi={partial:!0,tokenize:zi},wi={partial:!0,tokenize:Ii};function Si(e,n,t){const r=this,l=r.events[r.events.length-1];let u=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,i=0;return o;function o(c){const y=r.containerState.type||(c===42||c===43||c===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||c===r.containerState.marker:Oe(c)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),c===42||c===45?e.check(Ee,t,s)(c):s(c);if(!r.interrupt||c===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(c)}return t(c)}function a(c){return Oe(c)&&++i<10?(e.consume(c),a):(!r.interrupt||i<2)&&(r.containerState.marker?c===r.containerState.marker:c===41||c===46)?(e.exit("listItemValue"),s(c)):t(c)}function s(c){return e.enter("listItemMarker"),e.consume(c),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||c,e.check(Le,r.interrupt?t:f,e.attempt(yi,g,h))}function f(c){return r.containerState.initialBlankLine=!0,u++,g(c)}function h(c){return A(c)?(e.enter("listItemPrefixWhitespace"),e.consume(c),e.exit("listItemPrefixWhitespace"),g):t(c)}function g(c){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(c)}}function Ci(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Le,l,u);function l(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,n,"listItemIndent",r.containerState.size+1)(o)}function u(o){return r.containerState.furtherBlankLines||!A(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wi,n,i)(o))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(U,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Ii(e,n,t){const r=this;return M(e,l,"listItemIndent",r.containerState.size+1);function l(u){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?n(u):t(u)}}function Ti(e){e.exit(this.containerState.type)}function zi(e,n,t){const r=this;return M(e,l,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(u){const i=r.events[r.events.length-1];return!A(u)&&i&&i[1].type==="listItemPrefixWhitespace"?n(u):t(u)}}const st={name:"setextUnderline",resolveTo:Ei,tokenize:_i};function Ei(e,n){let t=e.length,r,l,u;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(l=t)}else e[t][1].type==="content"&&e.splice(t,1),!u&&e[t][1].type==="definition"&&(u=t);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",u?(e.splice(l,0,["enter",i,n]),e.splice(u+1,0,["exit",e[r][1],n]),e[r][1].end={...e[u][1].end}):e[r][1]=i,e.push(["exit",i,n]),e}function _i(e,n,t){const r=this;let l;return u;function u(s){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),l=s,i(s)):t(s)}function i(s){return e.enter("setextHeadingLineSequence"),o(s)}function o(s){return s===l?(e.consume(s),o):(e.exit("setextHeadingLineSequence"),A(s)?M(e,a,"lineSuffix")(s):a(s))}function a(s){return s===null||E(s)?(e.exit("setextHeadingLine"),n(s)):t(s)}}function Tu(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:l};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function l(i,o){let a=-1;for(;++a1?a(y):(i.consume(y),h++,c);if(h<2&&!t)return a(y);const I=i.exit("strikethroughSequenceTemporary"),d=de(y);return I._open=!d||d===2&&!!C,I._close=!C||C===2&&!!d,o(y)}}}class Fi{constructor(){this.map=[]}add(n,t,r){Ai(this,n,t,r)}consume(n){if(this.map.sort(function(u,i){return u[0]-i[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let l=r.pop();for(;l;){for(const u of l)n.push(u);l=r.pop()}this.map.length=0}}function Ai(e,n,t,r){let l=0;if(!(t===0&&r.length===0)){for(;l-1;){const v=r.events[T][1].type;if(v==="lineEnding"||v==="linePrefix")T--;else break}const z=T>-1?r.events[T][1].type:null,N=z==="tableHead"||z==="tableRow"?b:a;return N===b&&r.parser.lazy[r.now().line]?t(k):N(k)}function a(k){return e.enter("tableHead"),e.enter("tableRow"),s(k)}function s(k){return k===124||(i=!0,u+=1),f(k)}function f(k){return k===null?t(k):E(k)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),c):t(k):A(k)?M(e,f,"whitespace")(k):(u+=1,i&&(i=!1,l+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),i=!0,f):(e.enter("data"),h(k)))}function h(k){return k===null||k===124||$(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?g:h)}function g(k){return k===92||k===124?(e.consume(k),h):h(k)}function c(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(k):(e.enter("tableDelimiterRow"),i=!1,A(k)?M(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):y(k))}function y(k){return k===45||k===58?I(k):k===124?(i=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),C):L(k)}function C(k){return A(k)?M(e,I,"whitespace")(k):I(k)}function I(k){return k===58?(u+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),d):k===45?(u+=1,d(k)):k===null||E(k)?D(k):L(k)}function d(k){return k===45?(e.enter("tableDelimiterFiller"),_(k)):L(k)}function _(k){return k===45?(e.consume(k),_):k===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(k))}function S(k){return A(k)?M(e,D,"whitespace")(k):D(k)}function D(k){return k===124?y(k):k===null||E(k)?!i||l!==u?L(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(k)):L(k)}function L(k){return t(k)}function b(k){return e.enter("tableRow"),R(k)}function R(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),R):k===null||E(k)?(e.exit("tableRow"),n(k)):A(k)?M(e,R,"whitespace")(k):(e.enter("data"),H(k))}function H(k){return k===null||k===124||$(k)?(e.exit("data"),R(k)):(e.consume(k),k===92?O:H)}function O(k){return k===92||k===124?(e.consume(k),H):H(k)}}function Di(e,n){let t=-1,r=!0,l=0,u=[0,0,0,0],i=[0,0,0,0],o=!1,a=0,s,f,h;const g=new Fi;for(;++tt[2]+1){const y=t[2]+1,C=t[3]-t[2]-1;e.add(y,C,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return l!==void 0&&(u.end=Object.assign({},ge(n.events,l)),e.add(l,0,[["exit",u,n]]),u=void 0),u}function ct(e,n,t,r,l){const u=[],i=ge(n.events,t);l&&(l.end=Object.assign({},i),u.push(["exit",l,n])),r.end=Object.assign({},i),u.push(["exit",r,n]),e.add(t+1,0,u)}function ge(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Ri={name:"tasklistCheck",tokenize:Pi};function Eu(){return{text:{91:Ri}}}function Pi(e,n,t){const r=this;return l;function l(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),u)}function u(a){return $(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),i):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),i):t(a)}function i(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(a)}function o(a){return E(a)?n(a):A(a)?e.check({tokenize:Mi},n,t)(a):t(a)}}function Mi(e,n,t){return M(e,r,"whitespace");function r(l){return l===null?t(l):n(l)}}const Oi=/[$_\p{ID_Start}]/u,Ni=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,qi=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,Hi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nt={};function _u(e){return e?Oi.test(String.fromCodePoint(e)):!1}function Fu(e,n){const r=(n||Nt).jsx?qi:Ni;return e?r.test(String.fromCodePoint(e)):!1}function Au(e,n){return(Nt.jsx?vi:Hi).test(e)}function Ce(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ht(e.position):"start"in e||"end"in e?ht(e):"line"in e||"column"in e?qe(e):""}function qe(e){return ft(e&&e.line)+":"+ft(e&&e.column)}function ht(e){return qe(e&&e.start)+"-"+qe(e&&e.end)}function ft(e){return e&&typeof e=="number"?e:1}class J extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let l="",u={},i=!1;if(t&&("line"in t&&"column"in t?u={place:t}:"start"in t&&"end"in t?u={place:t}:"type"in t?u={ancestors:[t],place:t.position}:u={...t}),typeof n=="string"?l=n:!u.cause&&n&&(i=!0,l=n.message,u.cause=n),!u.ruleId&&!u.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?u.ruleId=r:(u.source=r.slice(0,a),u.ruleId=r.slice(a+1))}if(!u.place&&u.ancestors&&u.ancestors){const a=u.ancestors[u.ancestors.length-1];a&&(u.place=a.position)}const o=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=o?o.line:void 0,this.name=Ce(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=i&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}J.prototype.file="";J.prototype.name="";J.prototype.reason="";J.prototype.message="";J.prototype.stack="";J.prototype.column=void 0;J.prototype.line=void 0;J.prototype.ancestors=void 0;J.prototype.cause=void 0;J.prototype.fatal=void 0;J.prototype.place=void 0;J.prototype.ruleId=void 0;J.prototype.source=void 0;const ji={tokenize:Vi};function Vi(e){const n=e.attempt(this.parser.constructs.contentInitial,r,l);let t;return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),M(e,n,"linePrefix")}function l(o){return e.enter("paragraph"),u(o)}function u(o){const a=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=a),t=a,i(o)}function i(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return E(o)?(e.consume(o),e.exit("chunkText"),u):(e.consume(o),i)}}const $i={tokenize:Qi},pt={tokenize:Ui};function Qi(e){const n=this,t=[];let r=0,l,u,i;return o;function o(S){if(ri))return;const R=n.events.length;let H=R,O,k;for(;H--;)if(n.events[H][0]==="exit"&&n.events[H][1].type==="chunkFlow"){if(O){k=n.events[H][1].end;break}O=!0}for(d(r),b=R;bS;){const L=t[D];n.containerState=L[1],L[0].exit.call(n,e)}t.length=S}function _(){l.write([null]),u=void 0,l=void 0,n.containerState._closeFlow=void 0}}function Ui(e,n,t){return M(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const Wi={tokenize:Yi};function Yi(e){const n=this,t=e.attempt(Le,r,e.attempt(this.parser.constructs.flowInitial,l,M(e,e.attempt(this.parser.constructs.flow,l,e.attempt(Pr,l)),"linePrefix")));return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function l(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Ji={resolveAll:Ht()},Ki=qt("string"),Zi=qt("text");function qt(e){return{resolveAll:Ht(e==="text"?Gi:void 0),tokenize:n};function n(t){const r=this,l=this.parser.constructs[e],u=t.attempt(l,i,o);return i;function i(f){return s(f)?u(f):o(f)}function o(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),a}function a(f){return s(f)?(t.exit("data"),u(f)):(t.consume(f),a)}function s(f){if(f===null)return!0;const h=l[f];let g=-1;if(h)for(;++g-1){const o=i[0];typeof o=="string"?i[0]=o.slice(r):i.shift()}u>0&&i.push(e[l].slice(0,u))}return i}function hu(e,n){let t=-1;const r=[];let l;for(;++t0){const ee=F.tokenStack[F.tokenStack.length-1];(ee[1]||gt).call(F,void 0,ee[0])}for(w.position={start:oe(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:oe(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++qi.map(i=>d[i]); +import{r as R,j as q,i as _,g as wu,h as fy,k as Cu,u as on,l as ZP,m as VQ,o as FQ,n as BQ,q as jQ,t as ZQ,v as XQ,w as zQ,x as WQ,y as UQ,_ as se,z as qQ,A as s2}from"./index-Bz3KHWSS.js";import{f as o2,a as HQ,d as YQ,e as Yx,p as GQ,h as KQ,b as a2,V as Hn,o as zi,s as Qd,c as XO,r as JQ,g as l2,m as Yt,i as dr,j as pr,k as _i,u as wo,l as Pr,n as Mc,q as eD,t as tD,v as nD,w as iD,x as rD,y as sD,z as oD,A as aD,B as lD,C as uD,D as cD,E as dy,F as hD,G as fD,H as dD,I as Dd,J as XP}from"./index-RgHATUD5.js";import{z as pD,c as hg}from"./index-DIIxsTGV.js";import{c as gD,a as zP}from"./index-C9q4Fmxx.js";import{P as Ae}from"./index-DINwPV8Q.js";var zO={exports:{}},Bt={};var u2;function mD(){if(u2)return Bt;u2=1;var t=60103,e=60106,n=60107,i=60108,r=60114,s=60109,o=60110,a=60112,l=60113,u=60120,c=60115,h=60116,d=60121,p=60122,g=60117,m=60129,v=60131;if(typeof Symbol=="function"&&Symbol.for){var S=Symbol.for;t=S("react.element"),e=S("react.portal"),n=S("react.fragment"),i=S("react.strict_mode"),r=S("react.profiler"),s=S("react.provider"),o=S("react.context"),a=S("react.forward_ref"),l=S("react.suspense"),u=S("react.suspense_list"),c=S("react.memo"),h=S("react.lazy"),d=S("react.block"),p=S("react.server.block"),g=S("react.fundamental"),m=S("react.debug_trace_mode"),v=S("react.legacy_hidden")}function b(B){if(typeof B=="object"&&B!==null){var ne=B.$$typeof;switch(ne){case t:switch(B=B.type,B){case n:case r:case i:case l:case u:return B;default:switch(B=B&&B.$$typeof,B){case o:case a:case h:case c:case s:return B;default:return ne}}case e:return ne}}}var w=s,k=t,C=a,x=n,E=h,A=c,I=e,Z=r,U=i,W=l;return Bt.ContextConsumer=o,Bt.ContextProvider=w,Bt.Element=k,Bt.ForwardRef=C,Bt.Fragment=x,Bt.Lazy=E,Bt.Memo=A,Bt.Portal=I,Bt.Profiler=Z,Bt.StrictMode=U,Bt.Suspense=W,Bt.isAsyncMode=function(){return!1},Bt.isConcurrentMode=function(){return!1},Bt.isContextConsumer=function(B){return b(B)===o},Bt.isContextProvider=function(B){return b(B)===s},Bt.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===t},Bt.isForwardRef=function(B){return b(B)===a},Bt.isFragment=function(B){return b(B)===n},Bt.isLazy=function(B){return b(B)===h},Bt.isMemo=function(B){return b(B)===c},Bt.isPortal=function(B){return b(B)===e},Bt.isProfiler=function(B){return b(B)===r},Bt.isStrictMode=function(B){return b(B)===i},Bt.isSuspense=function(B){return b(B)===l},Bt.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===n||B===r||B===m||B===i||B===l||B===u||B===v||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===c||B.$$typeof===s||B.$$typeof===o||B.$$typeof===a||B.$$typeof===g||B.$$typeof===d||B[0]===p)},Bt.typeOf=b,Bt}var c2;function OD(){return c2||(c2=1,zO.exports=mD()),zO.exports}OD();const xD={}.hasOwnProperty;function WP(t,e){let n=-1,i;if(e.extensions)for(;++n"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:wa},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:wa},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:wa},{atBreak:!0,character:"~"}];function wD(t){return t.label||!t.identifier?t.label||"":YQ(t.identifier)}function CD(t){if(!t._compiled){const e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function _D(t,e,n){const i=e.indexStack,r=t.children||[],s=[];let o=-1,a=n.before,l;i.push(-1);let u=e.createTracker(n);for(;++o0&&(a==="\r"||a===` +`)&&c.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),a=" ",u=e.createTracker(n),u.move(s.join("")));let d=e.handle(c,t,e,{...u.current(),after:h,before:a});l&&l===d.slice(0,1)&&(d=Yx(l.charCodeAt(0))+d.slice(1));const p=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,l=void 0,p&&(s.length>0&&p.before&&a===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+Yx(a.charCodeAt(0))),p.after&&(l=h)),u.move(d),s.push(d),a=d.slice(-1)}return i.pop(),s.join("")}function kD(t,e,n){const i=e.indexStack,r=t.children||[],s=e.createTracker(n),o=[];let a=-1;for(i.push(-1);++a + +`}return` + +`}const TD=/\r?\n|\r/g;function AD(t,e){const n=[];let i=0,r=0,s;for(;s=TD.exec(t);)o(t.slice(i,s.index)),n.push(s[0]),i=s.index+s[0].length,r++;return o(t.slice(i)),n.join("");function o(a){n.push(e(a,r,!a))}}function PD(t,e,n){const i=(n.before||"")+(e||"")+(n.after||""),r=[],s=[],o={};let a=-1;for(;++a=u||c+1e in t?VD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bs=(t,e,n)=>FD(t,typeof e!="symbol"?e+"":e,n);let BD=class qP{constructor(e=new Map){this.map=e}clone(){return new qP(new Map(this.map))}increment(e){const n=this.map.get(e)??0;this.map.set(e,n+1)}decrement(e,n){let i=this.map.get(e);i!==void 0&&(i-=1,this.map.set(e,i),i===0&&n())}},Vd=class{constructor(){Bs(this,"map",new Map)}getOrCreate(e){let n=this.map.get(e);return n===void 0&&(n=new Set,this.map.set(e,n)),n}get(e){return this.map.get(e)}use(e,n){const i=this.get(e);i!==void 0&&n(i)}delete(e){return this.map.delete(e)}};function Ma(t,e){return e(t),t}function py(){}const gy="cell";function Gx(t,e){return t===e}const Pf=new Map;let ch,my=class{constructor(e={}){Bs(this,"subscriptions",new Vd),Bs(this,"singletonSubscriptions",new Map),Bs(this,"graph",new Vd),Bs(this,"state",new Map),Bs(this,"distinctNodes",new Map),Bs(this,"executionMaps",new Map),Bs(this,"definitionRegistry",new Set),Bs(this,"combinedCells",[]);for(const n of Object.getOwnPropertySymbols(e))this.state.set(n,e[n])}cellInstance(e,n=!0,i=Symbol()){return this.state.has(i)||this.state.set(i,e),n!==!1&&!this.distinctNodes.has(i)&&this.distinctNodes.set(i,n===!0?Gx:n),i}signalInstance(e=!0,n=Symbol()){return e!==!1&&this.distinctNodes.set(n,e===!0?Gx:e),n}sub(e,n){this.register(e);const i=this.subscriptions.getOrCreate(e);return i.add(n),()=>i.delete(n)}singletonSub(e,n){return this.register(e),n===void 0?this.singletonSubscriptions.delete(e):this.singletonSubscriptions.set(e,n),()=>this.singletonSubscriptions.delete(e)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(e,n){const i=this.signalInstance();return this.connect({map:r=>(...s)=>{r(s)},sink:i,sources:e}),this.sub(i,n)}pubIn(e){var n;const i=Reflect.ownKeys(e),r=this.getExecutionMap(i),s=r.refCount.clone(),o=r.participatingNodes.slice(),a=new Map(this.state),l=u=>{this.graph.use(u,c=>{for(const{sources:h,sink:d}of c)h.has(u)&&s.decrement(d,()=>{o.splice(o.indexOf(d),1),l(d)})})};for(;;){const u=o.shift();if(u===void 0)break;const c=u;let h=!1;const d=p=>{const g=this.distinctNodes.get(c);if(g!=null&&g(a.get(c),p)){h=!1;return}h=!0,a.set(c,p),this.state.has(c)&&this.state.set(c,p)};if(Object.prototype.hasOwnProperty.call(e,c)?d(e[c]):r.projections.use(c,p=>{for(const g of p){const m=[...Array.from(g.sources),...Array.from(g.pulls)].map(v=>a.get(v));g.map(d)(...m)}}),h){const p=a.get(c);this.inContext(()=>{this.subscriptions.use(c,g=>{for(const m of g)m(p)})}),(n=this.singletonSubscriptions.get(c))==null||n(p)}else l(c)}}connect({sources:e,pulls:n=[],map:i,sink:r}){const s={map:i,pulls:new Set(n),sink:this.register(r),sources:new Set(e)};for(const o of[...e,...n])this.register(o),this.graph.getOrCreate(o).add(s);this.executionMaps.clear()}pub(e,n){this.pubIn({[e]:n})}pipe(e,...n){return this.combineOperators(...n)(e)}transformer(...e){return n=>Ma(this.signalInstance(),i=>(this.link(this.pipe(i,...e),n),i))}link(e,n){this.connect({map:i=>r=>{i(r)},sink:n,sources:[e]})}combine(...e){return Ma(this.signalInstance(),n=>{this.connect({map:i=>(...r)=>{i(r)},sink:n,sources:e})})}combineCells(...e){const n=this.combinedCells.find(r=>e.length===r.sources.length&&e.every((s,o)=>s===r.sources[o]));if(n)return n.cell;const i=this.cellInstance(e.map(r=>this.getValue(r)),!0);return this.connect({map:r=>(...s)=>{r(s)},sink:i,sources:e}),this.combinedCells.push({sources:e,cell:i}),i}getValue(e){return this.register(e),this.state.get(e)}getValues(e){return e.map(n=>this.getValue(n))}register(e){const n=Pf.get(e);return n===void 0||this.definitionRegistry.has(e)?e:(this.definitionRegistry.add(e),Ma(n.type===gy?this.cellInstance(n.initial,n.distinct,e):this.signalInstance(n.distinct,e),i=>{this.inContext(()=>{n.init(this,i)})}))}inContext(e){const n=ch;ch=this;const i=e();return ch=n,i}changeWith(e,n,i){this.connect({sources:[n],pulls:[e],sink:e,map:r=>(s,o)=>{r(i(o,s))}})}calculateExecutionMap(e){const n=[],i=new Set,r=new Vd,s=new BD,o=new Vd,a=(l,u=0)=>{s.increment(l),!i.has(l)&&(this.register(l),r.use(l,c=>{u=Math.max(...Array.from(c).map(h=>n.indexOf(h)))+1}),this.graph.use(l,c=>{for(const h of c)h.sources.has(l)?(o.getOrCreate(h.sink).add(h),a(h.sink,u)):r.getOrCreate(h.sink).add(l)}),i.add(l),n.splice(u,0,l))};return e.forEach(a),{participatingNodes:n,pendingPulls:r,projections:o,refCount:s}}getExecutionMap(e){let n=e;if(e.length===1){n=e[0];const r=this.executionMaps.get(n);if(r!==void 0)return r}else for(const[r,s]of this.executionMaps.entries())if(Array.isArray(r)&&r.length===e.length&&r.every(o=>e.includes(o)))return s;const i=this.calculateExecutionMap(e);return this.executionMaps.set(n,i),i}combineOperators(...e){return n=>{for(const i of e)n=i(n,this);return n}}};function Pe(t,e=py,n=!0){return Ma(Symbol(),i=>{Pf.set(i,{type:gy,distinct:n,initial:t,init:e})})}function jD(t,e,n=!0){return Ma(Symbol(),i=>{Pf.set(i,{type:gy,distinct:n,initial:t,init:(r,s)=>{r.link(e(r,s),s)}})})}function mn(t=py,e=!1){return Ma(Symbol(),n=>{Pf.set(n,{type:"signal",distinct:e,init:t})})}function Gr(t=py){return Ma(Symbol(),e=>{Pf.set(e,{type:"signal",distinct:!1,init:t})})}function ca(){if(!ch)throw new Error("This function must be called within a realm instance");return ch}const ZD=(t,e)=>{ca().link(t,e)},XD=(...t)=>{ca().pub(...t)},zD=(...t)=>ca().sub(...t),WD=(...t)=>{ca().pubIn(...t)},UD=(...t)=>ca().pipe(...t),qD=(...t)=>{ca().changeWith(...t)},HD=(...t)=>ca().combine(...t),YD=t=>ca().getValue(t),zm=R.createContext(null);function GD({children:t,initWith:e,updateWith:n={}}){const i=R.useMemo(()=>new my(e),[]);return R.useEffect(()=>{i.pubIn(n)},[n,i]),q.jsx(zm.Provider,{value:i,children:t})}function ha(){const t=R.useContext(zm);if(t===null)throw new Error("useRealm must be used within a RealmContextProvider");return t}function Pt(t){const e=ha();e.register(t);const n=R.useCallback(i=>e.sub(t,i),[e,t]);return R.useSyncExternalStore(n,()=>e.getValue(t),()=>e.getValue(t))}function $t(...t){const e=ha(),n=R.useMemo(()=>e.combineCells.apply(e,t),[e,...t]);return Pt(n)}function bt(t){const e=ha();return e.register(t),R.useCallback(n=>{e.pub(t,n)},[e,t])}function HP(t){return[Pt(t),bt(t)]}function Xr(t){return(e,n)=>{const i=n.signalInstance();return n.connect({map:r=>s=>{r(t(s))},sink:i,sources:[e]}),i}}function rn(...t){return(e,n)=>{const i=n.signalInstance();return n.connect({map:r=>(...s)=>{r(s)},pulls:t,sink:i,sources:[e]}),i}}function Oy(t){return(e,n)=>{const i=n.signalInstance();return n.connect({map:r=>()=>{r(t)},sink:i,sources:[e]}),i}}function ec(t){return(e,n)=>{const i=n.signalInstance();return n.connect({map:r=>s=>{t(s)&&r(s)},sink:i,sources:[e]}),i}}function KD(){return(t,e)=>{const n=e.signalInstance();let i=!1;return e.connect({map:r=>s=>{i||(i=!0,r(s))},sink:n,sources:[t]}),n}}function xy(t,e){return(n,i)=>{const r=i.signalInstance();return i.connect({map:s=>o=>{s(e=t(e,o))},sink:r,sources:[n]}),r}}function JD(t){return(e,n)=>{const i=n.signalInstance();let r,s=null;return n.sub(e,o=>{r=o,s===null&&(s=setTimeout(()=>{s=null,n.pub(i,r)},t))}),i}}function vy(t){return(e,n)=>{const i=n.signalInstance();let r,s=null;return n.sub(e,o=>{r=o,s!==null&&clearTimeout(s),s=setTimeout(()=>{n.pub(i,r)},t)}),i}}function eV(){return(t,e)=>{const n=e.signalInstance();return e.sub(t,i=>{queueMicrotask(()=>{e.pub(n,i)})}),n}}function tV(t){return(e,n)=>{const i=n.signalInstance(),r=Symbol();let s=r;return n.connect({map:o=>a=>{s!==r&&(o([s,a]),s=r)},sink:i,sources:[t]}),n.sub(e,o=>{s=o}),i}}function nV(t,e,n){return(i,r)=>{const s=r.signalInstance();return r.sub(i,o=>{o!==null&&typeof o=="object"&&"then"in o?(r.pub(s,t()),o.then(a=>{r.pub(s,e(a))}).catch(a=>{r.pub(s,n(a))})):r.pub(s,e(o))}),s}}function iV(t,e){return n=>t(e(n))}function rV(t,e){return e(t)}function sV(t,e){return n=>t(e,n)}function oV(t,e){return()=>t(e)}function aV(t){return e=>e[t]}function by(t,e){return e(t),t}function YP(t){t()}function lV(t){return()=>t}function uV(...t){return()=>{t.map(YP)}}function Ys(){}function En(t){return function(e){return{init:n=>{var i;return(i=t.init)==null?void 0:i.call(t,n,e)},postInit:n=>{var i;return(i=t.postInit)==null?void 0:i.call(t,n,e)},update:n=>{var i;return(i=t.update)==null?void 0:i.call(t,n,e)}}}}function GP({children:t,plugins:e}){const n=_.useMemo(()=>by(new my,i=>{var r,s;for(const o of e)(r=o.init)==null||r.call(o,i);for(const o of e)(s=o.postInit)==null||s.call(o,i)}),[]);return _.useEffect(()=>{var i;for(const r of e)(i=r.update)==null||i.call(r,n)}),_.createElement(zm.Provider,{value:n},t)}const fg=R.createContext(null);function KP(t,e){let n=null;return t!=null&&(n=t[1]),{getTheme:function(){return e??(n!=null?n.getTheme():null)}}}function ui(){const t=R.useContext(fg);return t==null&&(function(e,...n){const i=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const s of n)r.append("v",s);throw i.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),t}function Oe(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Kr=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,cV=Kr&&"documentMode"in document?document.documentMode:null,gs=Kr&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Za=Kr&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),dg=!(!Kr||!("InputEvent"in window)||cV)&&"getTargetRanges"in new window.InputEvent("input"),Ih=Kr&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),_u=Kr&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,hV=Kr&&/Android/.test(navigator.userAgent),JP=Kr&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d2=Kr&&hV&&JP,pg=Kr&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!JP;function e3(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}const fV=1,dV=3,pV=9,gV=11,Xa=0,t3=1,ku=2,mV=0,OV=1,xV=2,vV=1,bV=2,$h=4,Rh=8,yV=16,SV=32,wV=64,Wm=128,n3=1792|(112|(3|$h|Rh)|Wm),yy=1,Sy=2,wy=3,Cy=4,_y=5,ky=6,Um=Ih||_u||pg?" ":"​",no=` + +`,CV=Za?" ":Um,ii={bold:1,capitalize:1024,code:16,highlight:Wm,italic:2,lowercase:256,strikethrough:$h,subscript:32,superscript:64,underline:Rh,uppercase:512},_V={directionless:1,unmergeable:2},p2={center:Sy,end:ky,justify:Cy,left:yy,right:wy,start:_y},kV={[Sy]:"center",[ky]:"end",[Cy]:"justify",[yy]:"left",[wy]:"right",[_y]:"start"},EV={normal:0,segmented:2,token:1},TV={[mV]:"normal",[xV]:"segmented",[OV]:"token"},AV="$",g2="$config";function i3(t,e,n,i,r,s){let o=t.getFirstChild();for(;o!==null;){const a=o.__key;o.__parent===e&&(te(o)&&i3(o,a,n,i,r,s),n.has(a)||s.delete(a),r.push(a)),o=o.getNextSibling()}}const PV=100;let Kx=!1,Ey=0;function IV(t){Ey=t.timeStamp}function WO(t,e,n){const i=t.nodeName==="BR",r=e.__lexicalLineBreak;return r&&(t===r||i&&t.previousSibling===r)||i&&d0(t,n)!==void 0}function $V(t,e,n){const i=wr(Sr(n));let r=null,s=null;i!==null&&i.anchorNode===t&&(r=i.anchorOffset,s=i.focusOffset);const o=t.nodeValue;o!==null&&Fy(e,o,r,s,!1)}function RV(t,e,n){if(ce(t)){const i=t.anchor.getNode();if(i.is(n)&&t.format!==i.getFormat())return!1}return Rs(e)&&n.isAttached()}function LV(t,e,n,i){for(let r=t;r&&!l9(r);r=Wf(r)){const s=d0(r,e);if(s!==void 0){const o=At(s,n);if(o)return Ct(o)||!ln(r)?void 0:[r,o]}else if(r===i)return[i,G3(n)]}}function r3(t,e,n){Kx=!0;const i=performance.now()-Ey>PV;try{Hi(t,(()=>{const r=me()||(function(d){return d.getEditorState().read((()=>{const p=me();return p!==null?p.clone():null}))})(t),s=new Map,o=t.getRootElement(),a=t._editorState,l=t._blockCursorElement;let u=!1,c="";for(let d=0;d0){let x=0;for(let E=0;E0)for(const[d,p]of s)p.reconcileObservedMutation(d,t);const h=n.takeRecords();if(h.length>0){for(let d=0;d{r3(t,e,n)}))}let NV=class{constructor(e,n){this.key=e,this.parse=n.parse.bind(n),this.unparse=(n.unparse||FV).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function MV(t,e){return new NV(t,e)}function gg(t,e,n="latest"){const i=(n==="latest"?t.getLatest():t).__state;return i?i.getValue(e):e.defaultValue}function QV(t,e,n){const i=gg(t,n,"direct"),r=gg(e,n,"direct");return n.isEqual(i,r)?null:[i,r]}function DV(t,e,n){let i;if(Vn(),typeof n=="function"){const s=t.getLatest(),o=gg(s,e);if(i=n(o),e.isEqual(o,i))return s}else i=n;const r=t.getWritable();return Ty(r).updateFromKnown(e,i),r}function mg(t){const e=new Map,n=new Set;for(let i=typeof t=="function"?t:t.replace;i.prototype&&i.prototype.getType!==void 0;i=Object.getPrototypeOf(i)){const{ownNodeConfig:r}=Hf(i);if(r&&r.stateConfigs)for(const s of r.stateConfigs){let o;"stateConfig"in s?(o=s.stateConfig,s.flat&&n.add(o.key)):o=s,e.set(o.key,o)}}return{flatKeys:n,sharedConfigMap:e}}let VV=class a3{constructor(e,n,i=void 0,r=new Map,s=void 0){this.node=e,this.sharedNodeState=n,this.unknownState=i,this.knownState=r;const{sharedConfigMap:o}=this.sharedNodeState,a=s!==void 0?s:(function(l,u,c){let h=c.size;if(u)for(const d in u){const p=l.get(d);p&&c.has(p)||h++}return h})(o,i,r);this.size=a}getValue(e){const n=this.knownState.get(e);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(e.key,e);let i=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const r=this.unknownState[e.key];r!==void 0&&(i=e.parse(r)),this.updateFromKnown(e,i)}return i}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},n={};for(const[i,r]of this.knownState)i.isEqual(r,i.defaultValue)?delete e[i.key]:e[i.key]=i.unparse(r);for(const i of this.sharedNodeState.flatKeys)i in e&&(n[i]=e[i],delete e[i]);return m2(e)&&(n.$=e),n}getWritable(e){if(this.node===e)return this;const{sharedNodeState:n,unknownState:i}=this,r=new Map(this.knownState);return new a3(e,n,(function(s,o,a){let l;if(a)for(const[u,c]of Object.entries(a)){const h=s.get(u);h?o.has(h)||o.set(h,h.parse(c)):(l=l||{},l[u]=c)}return l})(n.sharedConfigMap,r,i),r,this.size)}updateFromKnown(e,n){const i=e.key;this.sharedNodeState.sharedConfigMap.set(i,e);const{knownState:r,unknownState:s}=this;r.has(e)||s&&i in s||(s&&(delete s[i],this.unknownState=m2(s)),this.size++),r.set(e,n)}updateFromUnknown(e,n){const i=this.sharedNodeState.sharedConfigMap.get(e);i?this.updateFromKnown(i,i.parse(n)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=n)}updateFromJSON(e){const{knownState:n}=this;for(const i of n.keys())n.set(i,i.defaultValue);if(this.size=n.size,this.unknownState=void 0,e)for(const[i,r]of Object.entries(e))this.updateFromUnknown(i,r)}};function Ty(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new VV(e,l3(e));return e.__state=n,n}function l3(t){return t.__state?t.__state.sharedNodeState:My(Uf(),t.getType()).sharedNodeState}function m2(t){if(t)for(const e in t)return t}function FV(t){return t}function O2(t,e,n){for(const[i,r]of e.knownState){if(t.has(i.key))continue;t.add(i.key);const s=n?n.getValue(i):i.defaultValue;if(s!==r&&!i.isEqual(s,r))return!0}return!1}function x2(t,e,n){const{unknownState:i}=e,r=n?n.unknownState:void 0;if(i){for(const[s,o]of Object.entries(i))if(!t.has(s)&&(t.add(s),o!==(r?r[s]:void 0)))return!0}return!1}function v2(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function b2(t,e){const n=t.__mode,i=t.__format,r=t.__style,s=e.__mode,o=e.__format,a=e.__style,l=t.__state,u=e.__state;return(n===null||n===s)&&(i===null||i===o)&&(r===null||r===a)&&(t.__state===null||l===u||(function(c,h){if(c===h)return!0;if(c&&h&&c.size!==h.size)return!1;const d=new Set;return!(c&&O2(d,c,h)||h&&O2(d,h,c)||c&&x2(d,c,h)||h&&x2(d,h,c))})(l,u))}function y2(t,e){const n=t.mergeWithSibling(e),i=gn()._normalizedNodes;return i.add(t.__key),i.add(e.__key),n}function S2(t){let e,n,i=t;if(i.__text!==""||!i.isSimpleText()||i.isUnmergeable()){for(;(e=i.getPreviousSibling())!==null&&ye(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(b2(e,i)){i=y2(e,i);break}break}e.remove()}for(;(n=i.getNextSibling())!==null&&ye(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(b2(i,n)){i=y2(i,n);break}break}n.remove()}}else i.remove()}function Uo(t){return w2(t.anchor),w2(t.focus),t}function w2(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let i,r;if(n===e.getChildrenSize()?(i=e.getChildAtIndex(n-1),r=!0):(i=e.getChildAtIndex(n),r=!1),ye(i)){t.set(i.__key,r?i.getTextContentSize():0,"text",!0);break}if(!te(i))break;t.set(i.__key,r?i.getChildrenSize():0,"element",!0)}}let za,ai,Lh,qm,Jx,ev,Wa,Fr,tv,Nh,Mn="",fs=null,ds="",Xs="",jl=!1,Og=!1;function xg(t,e){const n=Wa.get(t);if(e!==null){const i=sv(t);i.parentNode===e&&e.removeChild(i)}if(Fr.has(t)||ai._keyToDOMMap.delete(t),te(n)){const i=bg(n,Wa);nv(i,0,i.length-1,null)}n!==void 0&&By(Nh,Lh,qm,n,"destroyed")}function nv(t,e,n,i){let r=e;for(;r<=n;++r){const s=t[r];s!==void 0&&xg(s,i)}}function Ca(t,e){t.setProperty("text-align",e)}const BV="40px";function u3(t,e){const n=za.theme.indent;if(typeof n=="string"){const r=t.classList.contains(n);e>0&&!r?t.classList.add(n):e<1&&r&&t.classList.remove(n)}const i=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||BV;t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${i})`)}function c3(t,e){const n=t.style;e===0?Ca(n,""):e===yy?Ca(n,"left"):e===Sy?Ca(n,"center"):e===wy?Ca(n,"right"):e===Cy?Ca(n,"justify"):e===_y?Ca(n,"start"):e===ky&&Ca(n,"end")}function iv(t,e){const n=(function(i){const r=i.__dir;if(r!==null)return r;if(vn(i))return null;const s=i.getParentOrThrow();return vn(s)&&s.__dir===null?"auto":null})(e);n!==null?t.dir=n:t.removeAttribute("dir")}function vg(t,e){const n=Fr.get(t);n===void 0&&Oe(60);const i=n.createDOM(za,ai);if((function(r,s,o){const a=o._keyToDOMMap;(function(l,u,c){const h=`__lexicalKey_${u._key}`;l[h]=c})(s,o,r),a.set(r,s)})(t,i,ai),ye(n)?i.setAttribute("data-lexical-text","true"):Ct(n)&&i.setAttribute("data-lexical-decorator","true"),te(n)){const r=n.__indent,s=n.__size;if(iv(i,n),r!==0&&u3(i,r),s!==0){const a=s-1;rv(bg(n,Fr),n,0,a,n.getDOMSlot(i))}const o=n.__format;o!==0&&c3(i,o),n.isInline()||h3(null,n,i),p0(n)&&(Mn+=no,Xs+=no)}else{const r=n.getTextContent();if(Ct(n)){const s=n.decorate(ai,za);s!==null&&f3(t,s),i.contentEditable="false"}Mn+=r,Xs+=r}return e!==null&&e.insertChild(i),By(Nh,Lh,qm,n,"created"),i}function rv(t,e,n,i,r){const s=Mn;Mn="";let o=n;for(;o<=i;++o){vg(t[o],r);const a=Fr.get(t[o]);a!==null&&ye(a)&&(fs===null&&(fs=a.getFormat()),ds===""&&(ds=a.getStyle()))}p0(e)&&(Mn+=no),r.element.__lexicalTextContent=Mn,Mn=s+Mn}function C2(t,e){if(t){const n=t.__last;if(n){const i=e.get(n);if(i)return vr(i)?"line-break":Ct(i)&&i.isInline()?"decorator":null}return"empty"}return null}function h3(t,e,n){const i=C2(t,Wa),r=C2(e,Fr);i!==r&&e.getDOMSlot(n).setManagedLineBreak(r)}function jV(t,e,n){var i;fs=null,ds="",(function(r,s,o){const a=Mn,l=r.__size,u=s.__size;Mn="";const c=o.element;if(l===1&&u===1){const h=r.__first,d=s.__first;if(h===d)Kc(h,c);else{const g=sv(h),m=vg(d,null);try{c.replaceChild(m,g)}catch(v){if(typeof v=="object"&&v!=null){const S=`${v.toString()} Parent: ${c.tagName}, new child: {tag: ${m.tagName} key: ${d}}, old child: {tag: ${g.tagName}, key: ${h}}.`;throw new Error(S)}throw v}xg(h,null)}const p=Fr.get(d);ye(p)&&(fs===null&&(fs=p.getFormat()),ds===""&&(ds=p.getStyle()))}else{const h=bg(r,Wa),d=bg(s,Fr);if(h.length!==l&&Oe(227),d.length!==u&&Oe(228),l===0)u!==0&&rv(d,s,0,u-1,o);else if(u===0){if(l!==0){const p=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;nv(h,0,l-1,p?null:c),p&&(c.textContent="")}}else(function(p,g,m,v,S,b){const w=v-1,k=S-1;let C,x,E=b.getFirstChild(),A=0,I=0;for(;A<=w&&I<=k;){const W=g[A],B=m[I];if(W===B)E=UO(Kc(B,b.element)),A++,I++;else{C===void 0&&(C=new Set(g)),x===void 0&&(x=new Set(m));const j=x.has(W),oe=C.has(B);if(j)if(oe){const pe=Ha(ai,B);pe===E?E=UO(Kc(B,b.element)):(b.withBefore(E).insertChild(pe),Kc(B,b.element)),A++,I++}else vg(B,b.withBefore(E)),I++;else E=UO(sv(W)),xg(W,b.element),A++}const ne=Fr.get(B);ne!==null&&ye(ne)&&(fs===null&&(fs=ne.getFormat()),ds===""&&(ds=ne.getStyle()))}const Z=A>w,U=I>k;if(Z&&!U){const W=m[k+1],B=W===void 0?null:ai.getElementByKey(W);rv(m,p,I,k,b.withBefore(B))}else U&&!Z&&nv(g,A,w,b.element)})(s,h,d,l,u,o)}p0(s)&&(Mn+=no),c.__lexicalTextContent=Mn,Mn=a+Mn})(t,e,e.getDOMSlot(n)),i=e,fs==null||fs===i.__textFormat||Og||i.setTextFormat(fs),(function(r){ds===""||ds===r.__textStyle||Og||r.setTextStyle(ds)})(e)}function bg(t,e){const n=[];let i=t.__first;for(;i!==null;){const r=e.get(i);r===void 0&&Oe(101),n.push(i),i=r.__next}return n}function Kc(t,e){const n=Wa.get(t);let i=Fr.get(t);n!==void 0&&i!==void 0||Oe(61);const r=jl||ev.has(t)||Jx.has(t),s=Ha(ai,t);if(n===i&&!r){if(te(n)){const o=s.__lexicalTextContent;o!==void 0&&(Mn+=o,Xs+=o)}else{const o=n.getTextContent();Xs+=o,Mn+=o}return s}if(n!==i&&r&&By(Nh,Lh,qm,i,"updated"),i.updateDOM(n,s,za)){const o=vg(t,null);return e===null&&Oe(62),e.replaceChild(o,s),xg(t,null),o}if(te(n)&&te(i)){const o=i.__indent;(jl||o!==n.__indent)&&u3(s,o);const a=i.__format;if((jl||a!==n.__format)&&c3(s,a),r&&(jV(n,i,s),vn(i)||i.isInline()||h3(n,i,s)),p0(i)&&(Mn+=no,Xs+=no),(jl||i.__dir!==n.__dir)&&(iv(s,i),vn(i)&&!jl))for(const l of i.getChildren())te(l)&&iv(Ha(ai,l.getKey()),l)}else{const o=i.getTextContent();if(Ct(i)){const a=i.decorate(ai,za);a!==null&&f3(t,a)}Mn+=o,Xs+=o}if(!Og&&vn(i)&&i.__cachedText!==Xs){const o=i.getWritable();o.__cachedText=Xs,i=o}return s}function f3(t,e){let n=ai._pendingDecorators;const i=ai._decorators;if(n===null){if(i[t]===e)return;n=Y3(ai)}n[t]=e}function UO(t){let e=t.nextSibling;return e!==null&&e===ai._blockCursorElement&&(e=e.nextSibling),e}function ZV(t,e,n,i,r,s){Mn="",Xs="",jl=i===ku,ai=n,za=n._config,Lh=n._nodes,qm=ai._listeners.mutation,Jx=r,ev=s,Wa=t._nodeMap,Fr=e._nodeMap,Og=e._readOnly,tv=new Map(n._keyToDOMMap);const o=new Map;return Nh=o,Kc("root",null),ai=void 0,Lh=void 0,Jx=void 0,ev=void 0,Wa=void 0,Fr=void 0,za=void 0,tv=void 0,Nh=void 0,o}function sv(t){const e=tv.get(t);return e===void 0&&Oe(75,t),e}function We(t){return{type:t}}const tc=We("SELECTION_CHANGE_COMMAND"),d3=We("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),If=We("CLICK_COMMAND"),Bo=We("DELETE_CHARACTER_COMMAND"),Qa=We("INSERT_LINE_BREAK_COMMAND"),Eu=We("INSERT_PARAGRAPH_COMMAND"),Da=We("CONTROLLED_TEXT_INSERTION_COMMAND"),nc=We("PASTE_COMMAND"),yg=We("REMOVE_TEXT_COMMAND"),Tu=We("DELETE_WORD_COMMAND"),Au=We("DELETE_LINE_COMMAND"),ys=We("FORMAT_TEXT_COMMAND"),$f=We("UNDO_COMMAND"),Rf=We("REDO_COMMAND"),Lf=We("KEYDOWN_COMMAND"),Ay=We("KEY_ARROW_RIGHT_COMMAND"),p3=We("MOVE_TO_END"),Hm=We("KEY_ARROW_LEFT_COMMAND"),g3=We("MOVE_TO_START"),Ym=We("KEY_ARROW_UP_COMMAND"),Gm=We("KEY_ARROW_DOWN_COMMAND"),Ua=We("KEY_ENTER_COMMAND"),Km=We("KEY_SPACE_COMMAND"),Nf=We("KEY_BACKSPACE_COMMAND"),ic=We("KEY_ESCAPE_COMMAND"),Jm=We("KEY_DELETE_COMMAND"),Mf=We("KEY_TAB_COMMAND"),Py=We("INSERT_TAB_COMMAND"),Mh=We("INDENT_CONTENT_COMMAND"),Sg=We("OUTDENT_CONTENT_COMMAND"),e0=We("DROP_COMMAND"),m3=We("FORMAT_ELEMENT_COMMAND"),Qf=We("DRAGSTART_COMMAND"),t0=We("DRAGOVER_COMMAND"),O3=We("DRAGEND_COMMAND"),Df=We("COPY_COMMAND"),n0=We("CUT_COMMAND"),wg=We("SELECT_ALL_COMMAND"),x3=We("CLEAR_EDITOR_COMMAND"),v3=We("CLEAR_HISTORY_COMMAND"),Ul=We("CAN_REDO_COMMAND"),ql=We("CAN_UNDO_COMMAND"),Vf=We("FOCUS_COMMAND"),Ff=We("BLUR_COMMAND"),b3=We("KEY_MODIFIER_COMMAND"),Qs=Object.freeze({}),ov=30,av=[["keydown",function(t,e){if(hh=t.timeStamp,y3=t.key,!e.isComposing()&&!Ve(e,Lf,t)&&t.key!=null){if(qO&&K2(t))return Hi(e,(()=>{Fd(e,HO)})),qO=!1,void(HO="");if((function(n){return Lt(n,"ArrowRight",{shiftKey:"any"})})(t))Ve(e,Ay,t);else if((function(n){return Lt(n,"ArrowRight",js)})(t))Ve(e,p3,t);else if((function(n){return Lt(n,"ArrowLeft",{shiftKey:"any"})})(t))Ve(e,Hm,t);else if((function(n){return Lt(n,"ArrowLeft",js)})(t))Ve(e,g3,t);else if((function(n){return Lt(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(t))Ve(e,Ym,t);else if((function(n){return Lt(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(t))Ve(e,Gm,t);else if((function(n){return Lt(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(t))fh=!0,Ve(e,Ua,t);else if((function(n){return n.key===" "})(t))Ve(e,Km,t);else if((function(n){return gs&&Lt(n,"o",{ctrlKey:!0})})(t))t.preventDefault(),fh=!0,Ve(e,Qa,!0);else if((function(n){return Lt(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(t))fh=!1,Ve(e,Ua,t);else if((function(n){return Lt(n,"Backspace",{shiftKey:"any"})||gs&&Lt(n,"h",{ctrlKey:!0})})(t))K2(t)?Ve(e,Nf,t):(t.preventDefault(),Ve(e,Bo,!0));else if((function(n){return n.key==="Escape"})(t))Ve(e,ic,t);else if((function(n){return Lt(n,"Delete",{})||gs&&Lt(n,"d",{ctrlKey:!0})})(t))(function(n){return n.key==="Delete"})(t)?Ve(e,Jm,t):(t.preventDefault(),Ve(e,Bo,!1));else if((function(n){return Lt(n,"Backspace",G2)})(t))t.preventDefault(),Ve(e,Tu,!0);else if((function(n){return Lt(n,"Delete",G2)})(t))t.preventDefault(),Ve(e,Tu,!1);else if((function(n){return gs&&Lt(n,"Backspace",{metaKey:!0})})(t))t.preventDefault(),Ve(e,Au,!0);else if((function(n){return gs&&(Lt(n,"Delete",{metaKey:!0})||Lt(n,"k",{ctrlKey:!0}))})(t))t.preventDefault(),Ve(e,Au,!1);else if((function(n){return Lt(n,"b",js)})(t))t.preventDefault(),Ve(e,ys,"bold");else if((function(n){return Lt(n,"u",js)})(t))t.preventDefault(),Ve(e,ys,"underline");else if((function(n){return Lt(n,"i",js)})(t))t.preventDefault(),Ve(e,ys,"italic");else if((function(n){return Lt(n,"Tab",{shiftKey:"any"})})(t))Ve(e,Mf,t);else if((function(n){return Lt(n,"z",js)})(t))t.preventDefault(),Ve(e,$f,void 0);else if((function(n){return gs?Lt(n,"z",{metaKey:!0,shiftKey:!0}):Lt(n,"y",{ctrlKey:!0})||Lt(n,"z",{ctrlKey:!0,shiftKey:!0})})(t))t.preventDefault(),Ve(e,Rf,void 0);else{const n=e._editorState._selection;n===null||ce(n)?J2(t)&&(t.preventDefault(),Ve(e,wg,t)):(function(i){return Lt(i,"c",js)})(t)?(t.preventDefault(),Ve(e,Df,t)):(function(i){return Lt(i,"x",js)})(t)?(t.preventDefault(),Ve(e,n0,t)):J2(t)&&(t.preventDefault(),Ve(e,wg,t))}(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(t)&&Ve(e,b3,t)}}],["pointerdown",function(t,e){const n=t.target,i=t.pointerType;xl(n)&&i!=="touch"&&i!=="pen"&&t.button===0&&Hi(e,(()=>{q2(n)||(uv=!0)}))}],["compositionstart",function(t,e){Hi(e,(()=>{const n=me();if(ce(n)&&!e.isComposing()){const i=n.anchor,r=n.anchor.getNode();Fn(i.key),(t.timeStamp{Fd(e,t.data)})):(qO=!0,HO=t.data)}],["input",function(t,e){t.stopPropagation(),Hi(e,(()=>{if(ln(t.target)&&q2(t.target))return;const n=me(),i=t.data,r=k3(t);if(i!=null&&ce(n)&&C3(n,r,i,t.timeStamp,!1)){Qc&&(Fd(e,i),Qc=!1);const s=n.anchor.getNode(),o=wr(Sr(e));if(o===null)return;const a=n.isBackward(),l=a?n.anchor.offset:n.focus.offset,u=a?n.focus.offset:n.anchor.offset;dg&&!n.isCollapsed()&&ye(s)&&o.anchorNode!==null&&s.getTextContent().slice(0,l)+i+s.getTextContent().slice(l+u)===e9(o.anchorNode)||Ve(e,Da,i);const c=i.length;Za&&c>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=c),Ih||_u||pg||!e.isComposing()||(hh=0,Fn(null))}else Vy(!1,e,i!==null?i:void 0),Qc&&(Fd(e,i||void 0),Qc=!1);(function(){Vn();const s=gn();s3(s)})()}),{event:t}),Zl=null}],["click",function(t,e){Hi(e,(()=>{const n=me(),i=wr(Sr(e)),r=fo();if(i){if(ce(n)){const s=n.anchor,o=s.getNode();if(s.type==="element"&&s.offset===0&&n.isCollapsed()&&!vn(o)&&ht().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&r!==null&&n.is(r))i.removeAllRanges(),n.dirty=!0;else if(t.detail===3&&!n.isCollapsed()&&o!==n.focus.getNode()){const a=(function(l,u){let c=l;for(;c!==ht()&&c!=null;){if(u(c))return c;c=c.getParent()}return null})(o,(l=>te(l)&&!l.isInline()));te(a)&&a.select(0)}}else if(t.pointerType==="touch"||t.pointerType==="pen"){const s=i.anchorNode;(ln(s)||Rs(s))&&an(s0(r,i,e,t))}}Ve(e,If,t)}))}],["cut",Qs],["copy",Qs],["dragstart",Qs],["dragover",Qs],["dragend",Qs],["paste",Qs],["focus",Qs],["blur",Qs],["drop",Qs]];dg&&av.push(["beforeinput",(t,e)=>(function(n,i){const r=n.inputType,s=k3(n);r==="deleteCompositionText"||Za&&i9(i)||r!=="insertCompositionText"&&Hi(i,(()=>{const o=me();if(r==="deleteContentBackward"){if(o===null){const p=fo();if(!ce(p))return;an(p.clone())}if(ce(o)){const p=o.anchor.key===o.focus.key;if(a=n.timeStamp,y3==="MediaLast"&&a{Hi(i,(()=>{Fn(null)}))}),ov),ce(o)){const g=o.anchor.getNode();g.markDirty(),ye(g)||Oe(142),_3(o,g)}}else{Fn(null),n.preventDefault();const g=o.anchor.getNode(),m=g.getTextContent(),v=g.canInsertTextAfter(),S=o.anchor.offset===0&&o.focus.offset===m.length;let b=d2&&p&&!S&&v;if(b&&o.isCollapsed()&&(b=!Ct(Pg(o.anchor,!0))),!b){Ve(i,Bo,!0);const w=me();d2&&ce(w)&&w.isCollapsed()&&(Aa=w,setTimeout((()=>Aa=null)))}}return}}var a;if(!ce(o))return;const l=n.data;Zl!==null&&Vy(!1,i,Zl),o.dirty&&Zl===null||!o.isCollapsed()||vn(o.anchor.getNode())||s===null||o.applyDOMRange(s),Zl=null;const u=o.anchor,c=o.focus,h=u.getNode(),d=c.getNode();if(r!=="insertText"&&r!=="insertTranspose")switch(n.preventDefault(),r){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Ve(i,Da,n);break;case"insertFromComposition":Fn(null),Ve(i,Da,n);break;case"insertLineBreak":Fn(null),Ve(i,Qa,!1);break;case"insertParagraph":Fn(null),fh&&!_u?(fh=!1,Ve(i,Qa,!1)):Ve(i,Eu,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Ve(i,nc,n);break;case"deleteByComposition":(function(p,g){return p!==g||te(p)||te(g)||!jo(p)||!jo(g)})(h,d)&&Ve(i,yg,n);break;case"deleteByDrag":case"deleteByCut":Ve(i,yg,n);break;case"deleteContent":Ve(i,Bo,!1);break;case"deleteWordBackward":Ve(i,Tu,!0);break;case"deleteWordForward":Ve(i,Tu,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Ve(i,Au,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Ve(i,Au,!1);break;case"formatStrikeThrough":Ve(i,ys,"strikethrough");break;case"formatBold":Ve(i,ys,"bold");break;case"formatItalic":Ve(i,ys,"italic");break;case"formatUnderline":Ve(i,ys,"underline");break;case"historyUndo":Ve(i,$f,void 0);break;case"historyRedo":Ve(i,Rf,void 0)}else{if(l===` +`)n.preventDefault(),Ve(i,Qa,!1);else if(l===no)n.preventDefault(),Ve(i,Eu,void 0);else if(l==null&&n.dataTransfer){const p=n.dataTransfer.getData("text/plain");n.preventDefault(),o.insertRawText(p)}else l!=null&&C3(o,s,l,n.timeStamp,!0)?(n.preventDefault(),Ve(i,Da,l)):Zl=l;S3=n.timeStamp}}))})(t,e)]);let hh=0,y3=null,S3=0,Zl=null;const Cg=new WeakMap;let lv=!1,uv=!1,fh=!1,Qc=!1,qO=!1,HO="",Aa=null,w3=[0,"",0,"root",0];function C3(t,e,n,i,r){const s=t.anchor,o=t.focus,a=s.getNode(),l=gn(),u=wr(Sr(l)),c=u!==null?u.anchorNode:null,h=s.key,d=l.getElementByKey(h),p=n.length;return h!==o.key||!ye(a)||(!r&&(!dg||S31||(r||!dg)&&d!==null&&!a.isComposing()&&c!==qa(d)||u!==null&&e!==null&&(!e.collapsed||e.startContainer!==u.anchorNode||e.startOffset!==u.anchorOffset)||a.getFormat()!==t.format||a.getStyle()!==t.style||(function(g,m){if(m.isSegmented())return!0;if(!g.isCollapsed())return!1;const v=g.anchor.offset,S=m.getParentOrThrow(),b=jo(m);return v===0?!m.canInsertTextBefore()||!S.canInsertTextBefore()&&!m.isComposing()||b||(function(w){const k=w.getPreviousSibling();return(ye(k)||te(k)&&k.isInline())&&!k.canInsertTextAfter()})(m):v===m.getTextContentSize()&&(!m.canInsertTextAfter()||!S.canInsertTextAfter()&&!m.isComposing()||b)})(t,a)}function _2(t,e){return Rs(t)&&t.nodeValue!==null&&e!==0&&e!==t.nodeValue.length}function k2(t,e,n){const{anchorNode:i,anchorOffset:r,focusNode:s,focusOffset:o}=t;lv&&(lv=!1,_2(i,r)&&_2(s,o)&&!Aa)||Hi(e,(()=>{if(!n)return void an(null);if(!lc(e,i,s))return;let a=me();if(Aa&&ce(a)&&a.isCollapsed()){const l=a.anchor,u=Aa.anchor;(l.key===u.key&&l.offset===u.offset+1||l.offset===1&&u.getNode().is(l.getNode().getPreviousSibling()))&&(a=Aa.clone(),an(a))}if(Aa=null,ce(a)){const l=a.anchor,u=l.getNode();if(a.isCollapsed()){t.type==="Range"&&t.anchorNode===t.focusNode&&(a.dirty=!0);const c=Sr(e).event,h=c?c.timeStamp:performance.now(),[d,p,g,m,v]=w3,S=ht(),b=e.isComposing()===!1&&S.getTextContent()==="";if(h{const l=fo(),u=e.anchorNode;(ln(u)||Rs(u))&&an(s0(l,e,n,t))})));const i=Dy(n),r=i[i.length-1],s=r._key,o=tu.get(s),a=o||r;a!==n&&k2(e,a,!1),k2(e,n,!0),n!==r?tu.set(s,n):o&&tu.delete(s)}function E2(t){t._lexicalHandled=!0}function T2(t){return t._lexicalHandled===!0}function XV(t){const e=t.ownerDocument,n=Cg.get(e);if(n===void 0)return;const i=n-1;i>=0||Oe(164),Cg.set(e,i),i===0&&e.removeEventListener("selectionchange",T3);const r=zf(t);f0(r)?((function(o){if(o._parentEditor!==null){const a=Dy(o),l=a[a.length-1]._key;tu.get(l)===o&&tu.delete(l)}else tu.delete(o._key)})(r),t.__lexicalEditor=null):r&&Oe(198);const s=E3(t);for(let o=0;or.__key===this.__key));if(ye(this))return i;if(ce(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const r=this.getParent();if(Ct(this)&&this.isInline()&&r){const s=n.isBackward()?n.focus:n.anchor;if(r.is(s.getNode())&&s.offset===r.getChildrenSize()&&this.is(r.getLastChild()))return!1}}return i}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let n=e.getFirstChild(),i=0;for(;n!==null;){if(this.is(n))return i;i++,n=n.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:At(e)}getParentOrThrow(){const e=this.getParent();return e===null&&Oe(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const n=e.getParent();if(xn(n))return te(e)||e===this&&Ct(e)||Oe(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&Oe(67,this.__key),e}getParents(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:At(e)}getPreviousSiblings(){const e=[],n=this.getParent();if(n===null)return e;let i=n.getFirstChild();for(;i!==null&&!i.is(this);)e.push(i),i=i.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:At(e)}getNextSiblings(){const e=[];let n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){const n=te(this)?this:this.getParent(),i=te(e)?e:e.getParent(),r=n&&i?mh(n,i):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const n=mh(this,e);return n!==null&&(n.type==="descendant"||(n.type==="branch"?Ky(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&Oe(279),!1)))}isParentOf(e){const n=mh(this,e);return n!==null&&n.type==="ancestor"}getNodesBetween(e){const n=this.isBefore(e),i=[],r=new Set;let s=this;for(;s!==null;){const o=s.__key;if(r.has(o)||(r.add(o),i.push(s)),s===e)break;const a=te(s)?n?s.getFirstChild():s.getLastChild():null;if(a!==null){s=a;continue}const l=n?s.getNextSibling():s.getPreviousSibling();if(l!==null){s=l;continue}const u=s.getParentOrThrow();if(r.has(u.__key)||i.push(u),u===e)break;let c=null,h=u;do{if(h===null&&Oe(68),c=n?h.getNextSibling():h.getPreviousSibling(),h=h.getParent(),h===null)break;c!==null||r.has(h.__key)||i.push(h)}while(c===null);s=c}return n||i.reverse(),i}isDirty(){const e=gn()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){const e=At(this.__key);return e===null&&Oe(113),e}getWritable(){Vn();const e=po(),n=gn(),i=e._nodeMap,r=this.__key,s=this.getLatest(),o=n._cloneNotNeeded,a=me();if(a!==null&&a.setCachedNodes(null),o.has(r))return Ag(s),s;const l=qf(s);return o.add(r),Ag(l),i.set(r,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){Oe(70)}updateDOM(e,n,i){Oe(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){Oe(18,this.name)}updateFromJSON(e){return(function(n,i){const r=n.getWritable(),s=i.$;let o=s;for(const a of l3(r).flatKeys)a in i&&(o!==void 0&&o!==s||(o={...s}),o[a]=i[a]);return(r.__state||o)&&Ty(n).updateFromJSON(o),r})(this,e)}static transform(){return null}remove(e){cv(this,!0,e)}replace(e,n){Vn();let i=me();i!==null&&(i=i.clone()),t1(this,e);const r=this.getLatest(),s=this.__key,o=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size;Zo(a);const c=r.getPreviousSibling(),h=r.getNextSibling(),d=r.__prev,p=r.__next,g=r.__parent;if(cv(r,!1,!0),c===null?l.__first=o:c.getWritable().__next=o,a.__prev=d,h===null?l.__last=o:h.getWritable().__prev=o,a.__next=p,a.__parent=g,l.__size=u,n&&(te(this)&&te(a)||Oe(139),this.getChildren().forEach((m=>{a.append(m)}))),ce(i)){an(i);const m=i.anchor,v=i.focus;m.key===s&&$2(m,a),v.key===s&&$2(v,a)}return Lo()===s&&Fn(o),a}insertAfter(e,n=!0){Vn(),t1(this,e);const i=this.getWritable(),r=e.getWritable(),s=r.getParent(),o=me();let a=!1,l=!1;if(s!==null){const p=e.getIndexWithinParent();if(Zo(r),ce(o)){const g=s.__key,m=o.anchor,v=o.focus;a=m.type==="element"&&m.key===g&&m.offset===p+1,l=v.type==="element"&&v.key===g&&v.offset===p+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),h=r.__key,d=i.__next;if(u===null?c.__last=h:u.getWritable().__prev=h,c.__size++,i.__next=h,r.__next=d,r.__prev=i.__key,r.__parent=i.__parent,n&&ce(o)){const p=this.getIndexWithinParent();kg(o,c,p+1);const g=c.__key;a&&o.anchor.set(g,p+2,"element"),l&&o.focus.set(g,p+2,"element")}return e}insertBefore(e,n=!0){Vn(),t1(this,e);const i=this.getWritable(),r=e.getWritable(),s=r.__key;Zo(r);const o=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),l=i.__prev,u=this.getIndexWithinParent();o===null?a.__first=s:o.getWritable().__next=s,a.__size++,i.__prev=s,r.__prev=l,r.__next=i.__key,r.__parent=i.__parent;const c=me();return n&&ce(c)&&kg(c,this.getParentOrThrow(),u),e}isParentRequired(){return!1}createParentElementNode(){return yt()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,n){Vn();const i=this.getPreviousSibling(),r=this.getParentOrThrow();if(i===null)return r.select(0,0);if(te(i))return i.select();if(!ye(i)){const s=i.getIndexWithinParent()+1;return r.select(s,s)}return i.select(e,n)}selectNext(e,n){Vn();const i=this.getNextSibling(),r=this.getParentOrThrow();if(i===null)return r.select();if(te(i))return i.select(0,0);if(!ye(i)){const s=i.getIndexWithinParent();return r.select(s,s)}return i.select(e,n)}markDirty(){this.getWritable()}reconcileObservedMutation(e,n){this.markDirty()}}class sc extends rc{static getType(){return"linebreak"}static clone(e){return new sc(e.__key)}constructor(e){super(e)}getTextContent(){return` +`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(n){const i=n.parentElement;if(i!==null&&Fh(i)){const r=i.firstChild;if(r===n||r.nextSibling===n&&Bd(r)){const s=i.lastChild;if(s===n||s.previousSibling===n&&Bd(s))return!0}}return!1})(e)||(function(n){const i=n.parentElement;if(i!==null&&Fh(i)){const r=i.firstChild;if(r===n||r.nextSibling===n&&Bd(r))return!1;const s=i.lastChild;if(s===n||s.previousSibling===n&&Bd(s))return!0}return!1})(e)?null:{conversion:WV,priority:0}}}static importJSON(e){return Ni().updateFromJSON(e)}}function WV(t){return{node:Ni()}}function Ni(){return vi(new sc)}function vr(t){return t instanceof sc}function Bd(t){return Rs(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}function YO(t,e){return 16&e?"code":e&Wm?"mark":32&e?"sub":64&e?"sup":null}function GO(t,e){return 1&e?"strong":2&e?"em":"span"}function A3(t,e,n,i,r){const s=i.classList;let o=nu(r,"base");o!==void 0&&s.add(...o),o=nu(r,"underlineStrikethrough");let a=!1;const l=e&Rh&&e&$h;o!==void 0&&(n&Rh&&n&$h?(a=!0,l||s.add(...o)):l&&s.remove(...o));for(const u in ii){const c=ii[u];if(o=nu(r,u),o!==void 0)if(n&c){if(a&&(u==="underline"||u==="strikethrough")){e&c&&s.remove(...o);continue}e&c&&(!l||u!=="underline")&&u!=="strikethrough"||s.add(...o)}else e&c&&s.remove(...o)}}function P3(t,e,n){const i=e.firstChild,r=n.isComposing(),s=t+(r?Um:"");if(i==null)e.textContent=s;else{const o=i.nodeValue;if(o!==s)if(r||Za){const[a,l,u]=(function(c,h){const d=c.length,p=h.length;let g=0,m=0;for(;g({conversion:YV,priority:0}),b:()=>({conversion:qV,priority:0}),code:()=>({conversion:Ds,priority:0}),em:()=>({conversion:Ds,priority:0}),i:()=>({conversion:Ds,priority:0}),mark:()=>({conversion:Ds,priority:0}),s:()=>({conversion:Ds,priority:0}),span:()=>({conversion:UV,priority:0}),strong:()=>({conversion:Ds,priority:0}),sub:()=>({conversion:Ds,priority:0}),sup:()=>({conversion:Ds,priority:0}),u:()=>({conversion:Ds,priority:0})}}static importJSON(e){return It().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return ln(n)||Oe(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=jd(n,"b")),this.hasFormat("italic")&&(n=jd(n,"i")),this.hasFormat("strikethrough")&&(n=jd(n,"s")),this.hasFormat("underline")&&(n=jd(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,n){}setFormat(e){const n=this.getWritable();return n.__format=typeof e=="string"?ii[e]:e,n}setDetail(e){const n=this.getWritable();return n.__detail=typeof e=="string"?_V[e]:e,n}setStyle(e){const n=this.getWritable();return n.__style=e,n}toggleFormat(e){const n=Tg(this.getFormat(),e,null);return this.setFormat(n)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const n=EV[e];if(this.__mode===n)return this;const i=this.getWritable();return i.__mode=n,i}setTextContent(e){if(this.__text===e)return this;const n=this.getWritable();return n.__text=e,n}select(e,n){Vn();let i=e,r=n;const s=me(),o=this.getTextContent(),a=this.__key;if(typeof o=="string"){const l=o.length;i===void 0&&(i=l),r===void 0&&(r=l)}else i=0,r=0;if(!ce(s))return R3(a,i,a,r,"text","text");{const l=Lo();l!==s.anchor.key&&l!==s.focus.key||Fn(a),s.setTextNodeRange(this,i,this,r)}return s}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,i,r){const s=this.getWritable(),o=s.__text,a=i.length;let l=e;l<0&&(l=a+l,l<0&&(l=0));const u=me();if(r&&ce(u)){const h=e+a;u.setTextNodeRange(s,h,s,h)}const c=o.slice(0,l)+i+o.slice(l+n);return s.__text=c,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Vn();const n=this.getLatest(),i=n.getTextContent();if(i==="")return[];const r=n.__key,s=Lo(),o=i.length;e.sort(((A,I)=>A-I)),e.push(o);const a=[],l=e.length;for(let A=0,I=0;AA&&(a.push(i.slice(A,Z)),A=Z)}const u=a.length;if(u===1)return[n];const c=a[0],h=n.getParent();let d;const p=n.getFormat(),g=n.getStyle(),m=n.__detail;let v=!1,S=null,b=null;const w=me();if(ce(w)){const[A,I]=w.isBackward()?[w.focus,w.anchor]:[w.anchor,w.focus];A.type==="text"&&A.key===r&&(S=A),I.type==="text"&&I.key===r&&(b=I)}n.isSegmented()?(d=It(c),d.__format=p,d.__style=g,d.__detail=m,d.__state=v2(n,d),v=!0):d=n.setTextContent(c);const k=[d];for(let A=1;A=E&&(S.set(A.getKey(),C-E,"text"),C=E){b.set(A.getKey(),x-E,"text");break}E=I}if(h!==null){(function(Z){const U=Z.getPreviousSibling(),W=Z.getNextSibling();U!==null&&Ag(U),W!==null&&Ag(W)})(this);const A=h.getWritable(),I=this.getIndexWithinParent();v?(A.splice(I,0,k),this.remove()):A.splice(I,1,k),ce(w)&&kg(w,h,I,u-1)}return k}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||Oe(50);const i=this.__key,r=e.__key,s=this.__text,o=s.length;Lo()===r&&Fn(i);const a=me();if(ce(a)){const h=a.anchor,d=a.focus;h!==null&&h.key===r&&V2(h,n,i,e,o),d!==null&&d.key===r&&V2(d,n,i,e,o)}const l=e.__text,u=n?l+s:s+l;this.setTextContent(u);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function UV(t){return{forChild:Iy(t.style),node:null}}function qV(t){const e=t,n=e.style.fontWeight==="normal";return{forChild:Iy(e.style,n?void 0:"bold"),node:null}}const P2=new WeakMap;function HV(t){if(!ln(t))return!1;if(t.nodeName==="PRE")return!0;const e=t.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function YV(t){const e=t;t.parentElement===null&&Oe(129);let n=e.textContent||"";if((function(i){let r,s=i.parentNode;const o=[i];for(;s!==null&&(r=P2.get(s))===void 0&&!HV(s);)o.push(s),s=s.parentNode;const a=r===void 0?s:r;for(let l=0;l0){/[ \t\n]$/.test(s)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===" "){let i=e,r=!0;for(;i!==null&&(i=I2(i,!0))!==null;)if((i.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:It(n)}}function I2(t,e){let n=t;for(;;){let i;for(;(i=e?n.nextSibling:n.previousSibling)===null;){const s=n.parentElement;if(s===null)return null;n=s}if(n=i,ln(n)){const s=n.style.display;if(s===""&&!Rg(n)||s!==""&&!s.startsWith("inline"))return null}let r=n;for(;(r=e?n.firstChild:n.lastChild)!==null;)n=r;if(Rs(n))return n;if(n.nodeName==="BR")return null}}const GV={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ds(t){const e=GV[t.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:Iy(t.style,e),node:null}}function It(t=""){return vi(new Jr(t))}function ye(t){return t instanceof Jr}function Iy(t,e){const n=t.fontWeight,i=t.textDecoration.split(" "),r=n==="700"||n==="bold",s=i.includes("line-through"),o=t.fontStyle==="italic",a=i.includes("underline"),l=t.verticalAlign;return u=>(ye(u)&&(r&&!u.hasFormat("bold")&&u.toggleFormat("bold"),s&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),o&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),e&&!u.hasFormat(e)&&u.toggleFormat(e)),u)}class oc extends Jr{static getType(){return"tab"}static clone(e){return new oc(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const n=super.createDOM(e),i=nu(e.theme,"tab");return i!==void 0&&n.classList.add(...i),n}static importJSON(e){return dl().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&Oe(126),super.setTextContent(" ")}spliceText(e,n,i,r){return i===""&&n===0||i===" "&&n===1||Oe(286),this}setDetail(e){return e!==2&&Oe(127),this}setMode(e){return e!=="normal"&&Oe(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function dl(){return vi(new oc)}function Bf(t){return t instanceof oc}class KV{constructor(e,n,i){this._selection=null,this.key=e,this.offset=n,this.type=i}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offsets&&(i=s)}else if(!te(e)){const s=e.getNextSibling();if(ye(s))n=s.__key,i=0,r="text";else{const o=e.getParent();o&&(n=o.__key,i=e.getIndexWithinParent()+1)}}t.set(n,i,r)}function $2(t,e){if(te(e)){const n=e.getLastDescendant();te(n)||ye(n)?KO(t,n):KO(t,e)}else KO(t,e)}class i0{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!hn(e))return!1;const n=this._nodes,i=e._nodes;return n.size===i.size&&Array.from(n).every((r=>i.has(r)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new i0(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const n=this.getNodes(),i=n.length,r=n[i-1];let s;if(ye(r))s=r.select();else{const o=r.getIndexWithinParent()+1;s=r.getParentOrThrow().select(o,o)}s.insertNodes(e);for(let o=0;o1;){const u=r[r.length-1];if(!te(u)||l.has(u)||u.isEmpty()||a.has(u))break;r.pop()}if(r.length===0&&i.isCollapsed()){const u=Ii(i.anchor),c=Ii(i.anchor.getFlipped()),h=p=>Br(p)?p.origin:p.getNodeAtCaret(),d=h(u)||h(c)||(i.anchor.getNodeAtCaret()?u.origin:c.origin);r.push(d)}return r})(tS(gv(this),"next"));return ac()||(this._cachedNodes=n),n}setTextNodeRange(e,n,i,r){this.anchor.set(e.__key,n,"text"),this.focus.set(i.__key,r,"text")}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const n=e[0],i=e[e.length-1],r=this.anchor,s=this.focus,o=r.isBefore(s),[a,l]=_g(this);let u="",c=!0;for(let h=0;h=0;A--){const I=k[A];if(I.is(d)||te(I)&&I.isParentOf(d))break;I.isAttached()&&(!C.has(I)||I.is(w)?x||E.insertAfter(I,!1):I.remove())}if(!x){let A=b,I=null;for(;A!==null;){const Z=A.getChildren(),U=Z.length;(U===0||Z[U-1].is(I))&&(v.delete(A.__key),I=A),A=A.getParent()}}if(jo(d))if(l===p)d.select();else{const A=It(e);A.select(),d.replace(A)}else d=d.spliceText(l,p-l,e,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let A=1;A{i.forEach((C=>{if(te(C)){const x=C.getFormatFlags(e,k);C.setTextFormat(x)}}))},o=r.length;if(o===0)return this.toggleFormat(e),Fn(null),void s(n);const a=this.anchor,l=this.focus,u=this.isBackward(),c=u?l:a,h=u?a:l;let d=0,p=r[0],g=c.type==="element"?0:c.offset;if(c.type==="text"&&g===p.getTextContentSize()&&(d=1,p=r[1],g=0),p==null)return;const m=p.getFormatFlags(e,n);s(m);const v=o-1;let S=r[v];const b=h.type==="text"?h.offset:S.getTextContentSize();if(p.is(S)){if(g===b)return;if(ps(p)||g===0&&b===p.getTextContentSize())p.setFormat(m);else{const k=p.splitText(g,b),C=g===0?k[0]:k[1];C.setFormat(m),c.type==="text"&&c.set(C.__key,0,"text"),h.type==="text"&&h.set(C.__key,b-g,"text")}return void(this.format=m)}g===0||ps(p)||([,p]=p.splitText(g),g=0),p.setFormat(m);const w=S.getFormatFlags(e,m);b>0&&(b===S.getTextContentSize()||ps(S)||([S]=S.splitText(b)),S.setFormat(w));for(let k=d+1;k(te(g)||Ct(g))&&!g.isInline()))){te(i)||Oe(211,n.constructor.name,n.getType());const g=JO(this);return i.splice(g,0,e),void r.selectEnd()}const s=(function(g){const m=yt();let v=null;for(let S=0;Su?u:l,d=l>u?l:u,p=o.splitText(h,d),g=h===0?p[0]:p[1];return g!=null?[g]:[]}return[o]}const c=r.isBefore(s);if(ye(o)){const h=c?l:u;h===o.getTextContentSize()?e.shift():h!==0&&([,o]=o.splitText(h),e[0]=o)}if(ye(a)){const h=a.getTextContent().length,d=c?u:l;d===0?e.pop():d!==h&&([a]=a.splitText(d),e[i]=a)}return e}modify(e,n,i){if(F2(this,e,n,i))return;const r=e==="move",s=gn(),o=wr(Sr(s));if(!o)return;const a=s._blockCursorElement,l=s._rootElement,u=this.focus.getNode();if(l===null||a===null||!te(u)||u.isInline()||u.canBeEmpty()||fv(a,s,l),this.dirty){let c=Ha(s,this.anchor.key),h=Ha(s,this.focus.key);this.anchor.type==="text"&&(c=qa(c)),this.focus.type==="text"&&(h=qa(h)),c&&h&&L3(o,c,this.anchor.offset,h,this.focus.offset)}if((function(c,h,d,p){c.modify(h,d,p)})(o,e,n?"backward":"forward",i),o.rangeCount>0){const c=o.getRangeAt(0),h=this.anchor.getNode(),d=vn(h)?h:s9(h);if(this.applyDOMRange(c),this.dirty=!0,!r){const p=this.getNodes(),g=[];let m=!1;for(let v=0;v0)if(n){const v=g[0];te(v)?v.selectStart():v.getParentOrThrow().selectStart()}else{const v=g[g.length-1];te(v)?v.selectEnd():v.getParentOrThrow().selectEnd()}o.anchorNode===c.startContainer&&o.anchorOffset===c.startOffset||(function(v){const S=v.focus,b=v.anchor,w=b.key,k=b.offset,C=b.type;b.set(S.key,S.offset,S.type,!0),S.set(w,k,C,!0)})(this)}}i==="lineboundary"&&F2(this,e,n,i,"decorators")}forwardDeletion(e,n,i){if(!i&&(e.type==="element"&&te(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const r=n.getParent(),s=n.getNextSibling()||(r===null?null:r.getNextSibling());if(te(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const i=this.anchor;let r=i.getNode();if(this.forwardDeletion(i,r,e))return;const s=O0(Wr(i,e?"previous":"next"));if(s.getTextSlices().every((a=>a===null||a.distance===0))){let a={type:"initial"};for(const l of s.iterNodeCarets("shadowRoot"))if(tr(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(te(s.anchor.origin)&&s.anchor.origin.isEmpty()){const u=Ii(l);Oh(this,io(u,u)),s.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(Ka(l)){if(te(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(s.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(Ct(l.origin)){if(!l.origin.isIsolated())if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&te(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();const u=r0();u.add(l.origin.getKey()),an(u)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:u}=a;return Oh(this,io(!l.origin.isEmpty()&&u.isEmpty()?uc(kn(u,l.direction)):s.anchor,l)),this.removeText()}}const o=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&i.offset===0&&L2(this,i.getNode()))return}else{const a=o.type==="text"?o.getNode():null;if(r=i.type==="text"?i.getNode():null,a!==null&&a.isSegmented()){const l=o.offset,u=a.getTextContentSize();if(a.is(r)||e&&l!==u||!e&&l!==0)return void N2(a,e,l)}else if(r!==null&&r.isSegmented()){const l=i.offset,u=r.getTextContentSize();if(r.is(a)||e&&l!==0||!e&&l!==u)return void N2(r,e,l)}(function(l,u){const c=l.anchor,h=l.focus,d=c.getNode(),p=h.getNode();if(d===p&&c.type==="text"&&h.type==="text"){const g=c.offset,m=h.offset,v=g{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function N2(t,e,n){const i=t,r=i.getTextContent().split(/(?=\s)/g),s=r.length;let o=0,a=0;for(let u=0;un||c){r.splice(u,1),c&&(a=void 0);break}}const l=r.join("").trim();l===""?i.remove():(i.setTextContent(l),i.select(a,a))}function M2(t,e,n,i){let r,s=e;if(ln(t)){let o=!1;const a=t.childNodes,l=a.length,u=i._blockCursorElement;s===l&&(o=!0,s=l-1);let c=a[s],h=!1;if(c===u)c=a[s+1],h=!0;else if(u!==null){const d=u.parentNode;t===d&&e>Array.prototype.indexOf.call(d.children,u)&&s--}if(r=Hl(c),ye(r))s=jr(r,o?"next":"previous");else{let d=Hl(t);if(d===null)return null;if(te(d)){const p=i.getElementByKey(d.getKey());p===null&&Oe(214),[d,s]=d.getDOMSlot(p).resolveChildIndex(d,p,t,e),te(d)||Oe(215),o&&s>=d.getChildrenSize()&&(s=Math.max(0,d.getChildrenSize()-1));let m=d.getChildAtIndex(s);if(te(m)&&(function(v,S,b){const w=v.getParent();return b===null||w===null||!w.canBeEmpty()||w!==b.getNode()})(m,0,n)){const v=o?m.getLastDescendant():m.getFirstDescendant();v===null?d=m:(m=v,d=te(m)?m:m.getParentOrThrow()),s=0}ye(m)?(r=m,d=null,s=jr(m,o?"next":"previous")):m!==d&&o&&!h&&(te(d)||Oe(216),s=Math.min(d.getChildrenSize(),s+1))}else{const p=d.getIndexWithinParent();s=e===0&&Ct(d)&&Hl(t)===d?p:p+1,d=d.getParentOrThrow()}if(te(d))return zr(d.__key,s,"element")}}else r=Hl(t);return ye(r)?zr(r.__key,jr(r,s,"clamp"),"text"):null}function Q2(t,e,n){const i=t.offset,r=t.getNode();if(i===0){const s=r.getPreviousSibling(),o=r.getParent();if(e){if((n||!e)&&s===null&&te(o)&&o.isInline()){const a=o.getPreviousSibling();ye(a)&&t.set(a.__key,a.getTextContent().length,"text")}}else te(s)&&!n&&s.isInline()?t.set(s.__key,s.getChildrenSize(),"element"):ye(s)&&t.set(s.__key,s.getTextContent().length,"text")}else if(i===r.getTextContent().length){const s=r.getNextSibling(),o=r.getParent();if(e&&te(s)&&s.isInline())t.set(s.__key,0,"element");else if((n||e)&&s===null&&te(o)&&o.isInline()&&!o.canInsertTextAfter()){const a=o.getNextSibling();ye(a)&&t.set(a.__key,0,"text")}}}function I3(t,e,n){if(t.type==="text"&&e.type==="text"){const i=t.isBefore(e),r=t.is(e);Q2(t,i,r),Q2(e,!i,r),r&&e.set(t.key,t.offset,t.type);const s=gn();if(s.isComposing()&&s._compositionKey!==t.key&&ce(n)){const o=n.anchor,a=n.focus;t.set(o.key,o.offset,o.type,!0),e.set(a.key,a.offset,a.type,!0)}}}function $3(t,e,n,i,r,s){if(t===null||n===null||!lc(r,t,n))return null;const o=M2(t,e,ce(s)?s.anchor:null,r);if(o===null)return null;const a=M2(n,i,ce(s)?s.focus:null,r);if(a===null)return null;if(o.type==="element"&&a.type==="element"){const l=Hl(t),u=Hl(n);if(Ct(l)&&Ct(u))return null}return I3(o,a,s),[o,a]}function Qh(t){return te(t)&&!t.isInline()}function R3(t,e,n,i,r,s){const o=po(),a=new pl(zr(t,e,r),zr(n,i,s),0,"");return a.dirty=!0,o._selection=a,a}function fa(){const t=zr("root",0,"element"),e=zr("root",0,"element");return new pl(t,e,0,"")}function r0(){return new i0(new Set)}function eF(t,e){return s0(null,t,e,null)}function s0(t,e,n,i){const r=n._window;if(r===null)return null;const s=i||r.event,o=s?s.type:void 0,a=o==="selectionchange",l=!Kx&&(a||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&s&&s.detail===3||o==="drop"||o===void 0);let u,c,h,d;if(ce(t)&&!l)return t.clone();if(e===null)return null;if(u=e.anchorNode,c=e.focusNode,h=e.anchorOffset,d=e.focusOffset,a&&ce(t)&&!lc(n,u,c))return t.clone();const p=$3(u,h,c,d,n,t);if(p===null)return null;const[g,m]=p;return new pl(g,m,ce(t)?t.format:0,ce(t)?t.style:"")}function me(){return po()._selection}function fo(){return gn()._editorState._selection}function kg(t,e,n,i=1){const r=t.anchor,s=t.focus,o=r.getNode(),a=s.getNode();if(!e.is(o)&&!e.is(a))return;const l=e.__key;if(t.isCollapsed()){const u=r.offset;if(n<=u&&i>0||n0||n0||n=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(n);if(ye(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text"),i.set(u.__key,c,"text")}}else{if(te(s)){const a=s.getChildrenSize(),l=n>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(n);if(ye(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text")}}if(te(o)){const a=o.getChildrenSize(),l=r>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(r);if(ye(u)){let c=0;l&&(c=u.getTextContentSize()),i.set(u.__key,c,"text")}}}}function Eg(t,e,n,i,r){let s=null,o=0,a=null;i!==null?(s=i.__key,ye(i)?(o=i.getTextContentSize(),a="text"):te(i)&&(o=i.getChildrenSize(),a="element")):r!==null&&(s=r.__key,ye(r)?a="text":te(r)&&(a="element")),s!==null&&a!==null?t.set(s,o,a):(o=e.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),t.set(n.__key,o,"element"))}function V2(t,e,n,i,r){t.type==="text"?t.set(n,t.offset+(e?0:r),"text"):t.offset>i.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function L3(t,e,n,i,r){try{t.setBaseAndExtent(e,n,i,r)}catch{}}function tF(t,e,n,i,r,s,o){const a=i.anchorNode,l=i.focusNode,u=i.anchorOffset,c=i.focusOffset,h=document.activeElement;if(r.has(Ly)&&h!==s||h!==null&&h0(h))return;if(!ce(e))return void(t!==null&&lc(n,a,l)&&i.removeAllRanges());const d=e.anchor,p=e.focus,g=d.key,m=p.key,v=Ha(n,g),S=Ha(n,m),b=d.offset,w=p.offset,k=e.format,C=e.style,x=e.isCollapsed();let E=v,A=S,I=!1;if(d.type==="text"){E=qa(v);const j=d.getNode();I=j.getFormat()!==k||j.getStyle()!==C}else ce(t)&&t.anchor.type==="text"&&(I=!0);var Z,U,W,B,ne;if(p.type==="text"&&(A=qa(S)),E!==null&&A!==null&&(x&&(t===null||I||ce(t)&&(t.format!==k||t.style!==C))&&(Z=k,U=C,W=b,B=g,ne=performance.now(),w3=[Z,U,W,B,ne]),u!==b||c!==w||a!==E||l!==A||i.type==="Range"&&x||(h!==null&&s.contains(h)||s.focus({preventScroll:!0}),d.type==="element"))){if(L3(i,E,b,A,w),!r.has(Z3)&&e.isCollapsed()&&s!==null&&s===document.activeElement){const j=ce(e)&&e.anchor.type==="element"?E.childNodes[b]||null:i.rangeCount>0?i.getRangeAt(0):null;if(j!==null){let oe;if(j instanceof Text){const pe=document.createRange();pe.selectNode(j),oe=pe.getBoundingClientRect()}else oe=j.getBoundingClientRect();(function(pe,re,ke){const Ee=jy(ke),De=Xy(Ee);if(Ee===null||De===null)return;let{top:Ie,bottom:Ue}=re,qe=0,Ye=0,Ge=ke;for(;Ge!==null;){const he=Ge===Ee.body;if(he)qe=0,Ye=Sr(pe).innerHeight;else{const Ce=Ge.getBoundingClientRect();qe=Ce.top,Ye=Ce.bottom}let xe=0;if(IeYe&&(xe=Ue-Ye),xe!==0)if(he)De.scrollBy(0,xe);else{const Ce=Ge.scrollTop;Ge.scrollTop+=xe;const $e=Ge.scrollTop-Ce;Ie-=$e,Ue-=$e}if(he)break;Ge=Wf(Ge)}})(n,oe,s)}}lv=!0}}function gl(t){let e=me()||fo();e===null&&(e=ht().selectEnd()),e.insertNodes(t)}function nF(){const t=me();return t===null?"":t.getTextContent()}function JO(t){let e=t;t.isCollapsed()||e.removeText();const n=me();ce(n)&&(e=n),ce(e)||Oe(161);const i=e.anchor;let r=i.getNode(),s=i.offset;for(;!Gi(r);){const o=r;if([r,s]=iF(r,s),o.is(r))break}return s}function iF(t,e){const n=t.getParent();if(!n){const r=yt();return ht().append(r),r.select(),[ht(),0]}if(ye(t)){const r=t.splitText(e);if(r.length===0)return[n,t.getIndexWithinParent()];const s=e===0?0:1;return[n,r[0].getIndexWithinParent()+s]}if(!te(t)||e===0)return[n,t.getIndexWithinParent()];const i=t.getChildAtIndex(e);if(i){const r=new pl(zr(t.__key,e,"element"),zr(t.__key,e,"element"),0,""),s=t.insertNewAfter(r);s&&s.append(i,...i.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function F2(t,e,n,i,r="decorators-and-blocks"){if(e==="move"&&i==="character"&&!t.isCollapsed()){const[c,h]=n===t.isBackward()?[t.focus,t.anchor]:[t.anchor,t.focus];return h.set(c.key,c.offset,c.type),!0}const s=Wr(t.focus,n?"previous":"next"),o=i==="lineboundary",a=e==="move";let l=s,u=r==="decorators-and-blocks";if(!eS(l)){for(const c of l){u=!1;const{origin:h}=c;if(!Ct(h)||h.isIsolated()||(l=c,!o||!h.isInline()))break}if(u)for(const c of O0(s).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(tr(c))c.origin.isInline()||(l=c);else{if(te(c.origin))continue;Ct(c.origin)&&!c.origin.isInline()&&(l=c)}break}}if(l===s)return!1;if(a&&!o&&Ct(l.origin)&&l.origin.isKeyboardSelectable()){const c=r0();return c.add(l.origin.getKey()),an(c),!0}return l=Ii(l),a&&Ho(t.anchor,l),Ho(t.focus,l),u||!o}let jn=null,Zn=null,Li=!1,e1=!1,jp=0;const B2={characterData:!0,childList:!0,subtree:!0};function ac(){return Li||jn!==null&&jn._readOnly}function Vn(){Li&&Oe(13)}function N3(){jp>99&&Oe(14)}function po(){return jn===null&&Oe(195,M3()),jn}function gn(){return Zn===null&&Oe(196,M3()),Zn}function M3(){let t=0;const e=new Set,n=c0.version;if(typeof window<"u")for(const r of document.querySelectorAll("[contenteditable]")){const s=zf(r);if(f0(s))t++;else if(s){let o=String(s.constructor.version||"<0.17.1");o===n&&(o+=" (separately built, likely a bundler configuration issue)"),e.add(o)}}let i=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(i+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),i}function rF(){return Zn}function j2(t,e,n){const i=e.__type,r=My(t,i);let s=n.get(i);s===void 0&&(s=Array.from(r.transforms),n.set(i,s));const o=s.length;for(let a=0;a0||W>0;){if(Z>0){w._dirtyLeaves=new Set;for(const B of I){const ne=x.get(B);ye(ne)&&ne.isAttached()&&ne.isSimpleText()&&!ne.isUnmergeable()&&S2(ne),ne!==void 0&&Z2(ne,E)&&j2(w,ne,A),k.add(B)}if(I=w._dirtyLeaves,Z=I.size,Z>0){jp++;continue}}w._dirtyLeaves=new Set,w._dirtyElements=new Map,U.delete("root")&&U.set("root",!0);for(const B of U){const ne=B[0],j=B[1];if(C.set(ne,j),!j)continue;const oe=x.get(ne);oe!==void 0&&Z2(oe,E)&&j2(w,oe,A)}I=w._dirtyLeaves,Z=I.size,U=w._dirtyElements,W=U.size,jp++}w._dirtyLeaves=k,w._dirtyElements=C})(l,t),z2(t),(function(b,w,k,C){const x=b._nodeMap,E=w._nodeMap,A=[];for(const[I]of C){const Z=E.get(I);Z!==void 0&&(Z.isAttached()||(te(Z)&&i3(Z,I,x,E,A,C),x.has(I)||C.delete(I),A.push(I)))}for(const I of A)E.delete(I);for(const I of k){const Z=E.get(I);Z===void 0||Z.isAttached()||(x.has(I)||k.delete(I),E.delete(I))}})(a,l,t._dirtyLeaves,t._dirtyElements)),v!==t._compositionKey&&(l._flushSync=!0);const S=l._selection;if(ce(S)){const b=l._nodeMap,w=S.anchor.key,k=S.focus.key;b.get(w)!==void 0&&b.get(k)!==void 0||Oe(19)}else hn(S)&&S._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&t._onError(v),t._pendingEditorState=a,t._dirtyType=ku,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),void Ws(t)}finally{jn=c,Li=h,Zn=d,t._updating=p,jp=0}t._dirtyType!==Xa||t._deferred.length>0||(function(v,S){const b=S.getEditorState()._selection,w=v._selection;if(w!==null){if(w.dirty||!w.is(b))return!0}else if(b!==null)return!0;return!1})(l,t)?l._flushSync?(l._flushSync=!1,Ws(t)):u&&uF((()=>{Ws(t)})):(l._flushSync=!1,u&&(i.clear(),t._deferred=[],t._pendingEditorState=null))}function Hi(t,e,n){Zn===t&&n===void 0?e():o0(t,e,n)}class ph{constructor(e,n,i){this.element=e,this.before=n||null,this.after=i||null}withBefore(e){return new ph(this.element,e,this.after)}withAfter(e){return new ph(this.element,this.before,e)}withElement(e){return this.element===e?this:new ph(e,this.before,this.after)}insertChild(e){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&Oe(222),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&Oe(223),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&Oe(224),this.element.replaceChild(e,n),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const n=e==="decorator"&&(_u||Ih);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const n=this.element,i=e.nodeName==="IMG"?e.nextSibling:null;i&&n.removeChild(i),n.removeChild(e),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const n=this.getManagedLineBreak();if(n){if(e===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const i=this.element,r=this.before,s=document.createElement("br");if(i.insertBefore(s,r),e){const o=document.createElement("img");o.setAttribute("data-lexical-linebreak","true"),o.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",o.alt="",i.insertBefore(o,s),i.__lexicalLineBreak=o}else i.__lexicalLineBreak=s}getFirstChildOffset(){let e=0;for(let n=this.after;n!==null;n=n.previousSibling)e++;return e}resolveChildIndex(e,n,i,r){if(i===this.element){const l=this.getFirstChildOffset();return[e,Math.min(l+e.getChildrenSize(),Math.max(l,r))]}const s=W2(n,i);s.push(r);const o=W2(n,this.element);let a=e.getIndexWithinParent();for(let l=0;lc){a+=1;break}}return[e.getParentOrThrow(),a]}}function W2(t,e){const n=[];let i=e;for(;i!==t&&i!==null;i=i.parentNode){let r=0;for(let s=i.previousSibling;s!==null;s=s.previousSibling)r++;n.push(r)}return i!==t&&Oe(225),n.reverse()}class Oi extends rc{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return kV[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=gn()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){const e=[];let n=this.getFirstChild();for(;n!==null;){if(ye(n)&&e.push(n),te(n)){const i=n.getAllTextNodes();e.push(...i)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;te(e);){const n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;te(e);){const n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){const n=this.getChildren(),i=n.length;if(e>=i){const s=n[i-1];return te(s)&&s.getLastDescendant()||s||null}const r=n[e];return te(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:At(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&Oe(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:At(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&Oe(96,this.__key),e}getChildAtIndex(e){const n=this.getChildrenSize();let i,r;if(e=e;){if(r===e)return i;i=i.getPreviousSibling(),r--}return null}getTextContent(){let e="";const n=this.getChildren(),i=n.length;for(let r=0;rn.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""?p2[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const n=this.getWritable();return n.__textFormat=e,n}setTextStyle(e){const n=this.getWritable();return n.__textStyle=e,n}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,i){const r=i.length,s=this.getChildrenSize(),o=this.getWritable();e+n<=s||Oe(226,String(e),String(n),String(s));const a=o.__key,l=[],u=[],c=this.getChildAtIndex(e+n);let h=null,d=s-n+r;if(e!==0)if(e===s)h=this.getLastChild();else{const g=this.getChildAtIndex(e);g!==null&&(h=g.getPreviousSibling())}if(n>0){let g=h===null?this.getFirstChild():h.getNextSibling();for(let m=0;m0&&(n.style.paddingInlineStart=40*i+"px");const r=this.getDirection();r&&(n.dir=r)}return{element:n}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),i=this.getTextStyle();return n!==0&&(e.textFormat=n),i!==""&&(e.textStyle=i),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,n){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,n,i){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,n){const i=this.getDOMSlot(e);let r=i.getFirstChild();for(let s=this.getFirstChild();s;s=s.getNextSibling()){const o=n.getElementByKey(s.getKey());o!==null&&(r==null?(i.insertChild(o),r=o):r!==o&&i.replaceChild(o,r),r=r.nextSibling)}}}function te(t){return t instanceof Oi}function U2(t,e,n){let i=t.getNode();for(;i;){const r=i.__key;if(e.has(r)&&!n.has(r))return!0;i=i.getParent()}return!1}class Cr extends rc{decorate(e,n){Oe(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ct(t){return t instanceof Cr}class ml extends Oi{static getType(){return"root"}static clone(){return new ml}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Oe(51)}getTextContent(){const e=this.__cachedText;return!ac()&&gn()._dirtyType!==Xa||e===null?super.getTextContent():e}remove(){Oe(52)}replace(e){Oe(53)}insertBefore(e){Oe(54)}insertAfter(e){Oe(55)}updateDOM(e,n){return!1}splice(e,n,i){for(const r of i)te(r)||Ct(r)||Oe(282);return super.splice(e,n,i)}static importJSON(e){return ht().updateFromJSON(e)}collapseAtStart(){return!0}}function vn(t){return t instanceof ml}function V3(t){return new a0(new Map(t._nodeMap))}function Ry(){return new a0(new Map([["root",new ml]]))}function F3(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&Oe(130,n.name),te(t)){const i=e.children;Array.isArray(i)||Oe(59,n.name);const r=t.getChildren();for(let s=0;s({root:F3(ht())})))}}const Dh="historic",B3="history-push",gh="history-merge",j3="paste",Ly="collaboration",sF="skip-collab",Z3="skip-scroll-into-view",X3="skip-dom-selection";class l0 extends Oi{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Ol extends Oi{static getType(){return"paragraph"}static clone(e){return new Ol(e.__key)}createDOM(e){const n=document.createElement("p"),i=nu(e.theme,"paragraph");return i!==void 0&&n.classList.add(...i),n}updateDOM(e,n,i){return!1}static importDOM(){return{p:e=>({conversion:oF,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(ln(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();i&&(n.style.textAlign=i)}return{element:n}}static importJSON(e){return yt().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,n){const i=yt();i.setTextFormat(e.format),i.setTextStyle(e.style);const r=this.getDirection();return i.setDirection(r),i.setFormat(this.getFormatType()),i.setStyle(this.getStyle()),this.insertAfter(i,n),i}collapseAtStart(){const e=this.getChildren();if(e.length===0||ye(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function oF(t){const e=yt();return t.style&&(e.setFormat(t.style.textAlign),g0(t,e)),{node:e}}function yt(){return vi(new Ol)}function jf(t){return t instanceof Ol}const at=0,Zt=1,aF=2,Vh=3,Mi=4;function z3(t,e,n,i){const r=t._keyToDOMMap;r.clear(),t._editorState=Ry(),t._pendingEditorState=i,t._compositionKey=null,t._dirtyType=Xa,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,t._updateTags=new Set,t._updates=[],t._blockCursorElement=null;const s=t._observer;s!==null&&(s.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",r.set("root",n))}function u0(t){const e=t||{},n=rF(),i=e.theme||{},r=t===void 0?n:e.parentEditor||null,s=e.disableEvents||!1,o=Ry(),a=e.namespace||(r!==null?r._config.namespace:J3()),l=e.editorState,u=[ml,Jr,sc,oc,Ol,l0,...e.nodes||[]],{onError:c,html:h}=e,d=e.editable===void 0||e.editable;let p;if(t===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let m=0;m{Object.keys(k).forEach((C=>{let x=S.get(C);x===void 0&&(x=[],S.set(C,x)),x.push(k[C])}))};return m.forEach((k=>{const C=k.klass.importDOM;if(C==null||b.has(C))return;b.add(C);const x=C.call(k.klass);x!==null&&w(x)})),v&&w(v),S})(p,h?h.import:void 0),d,t);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=ku),g}class c0{constructor(e,n,i,r,s,o,a,l){this._createEditorArgs=l,this._parentEditor=n,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=i,this._decorators={},this._pendingDecorators=null,this._dirtyType=Xa,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=J3(),this._onError=s,this._htmlConversions=o,this._editable=a,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){const n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){const n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){const n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){const n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,i){i===void 0&&Oe(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const s=r.get(e);s===void 0&&Oe(36,String(e));const o=s[i];return o.add(n),()=>{o.delete(n),s.every((a=>a.size===0))&&r.delete(e)}}registerMutationListener(e,n,i){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,s=this._listeners.mutation;let o=s.get(n);o===void 0&&(o=new Set,s.set(n,o)),o.add(r);const a=i&&i.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(n,r),()=>{o.delete(r),o.size===0&&s.delete(n)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return n===void 0&&Oe(37,e.name),n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,n){const i=this._editorState,r=dv(i).get(n.getType());if(!r)return;const s=new Map;for(const o of r.keys())s.set(o,"created");s.size>0&&e(s,{dirtyLeaves:new Set,prevEditorState:i,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,n){const i=this.getRegisteredNode(e);return i.transforms.add(n),i}registerNodeTransform(e,n){const i=this.registerNodeTransformToKlass(e,n),r=[i],s=i.replaceWithKlass;if(s!=null){const o=this.registerNodeTransformToKlass(s,n);r.push(o)}return(function(o,a){const l=dv(o.getEditorState()),u=[];for(const c of a){const h=l.get(c);h&&u.push(h)}u.length!==0&&o.update((()=>{for(const c of u)for(const h of c.keys()){const d=At(h);d&&d.markDirty()}}),o._pendingEditorState===null?{tag:gh}:void 0)})(this,r.map((o=>o.klass.getType()))),()=>{r.forEach((o=>o.transforms.delete(n)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return Ve(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const i=nu(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,z3(this,n,e,r),n!==null&&(this._config.disableEvents||XV(n),i!=null&&n.classList.remove(...i)),e!==null){const s=Xy(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=ku,o3(this),this._updateTags.add(gh),Ws(this),this._config.disableEvents||(function(a,l){const u=a.ownerDocument,c=Cg.get(u);(c===void 0||c<1)&&u.addEventListener("selectionchange",T3),Cg.set(u,(c||0)+1),a.__lexicalEditor=l;const h=E3(a);for(let d=0;d{T2(v)||(E2(v),(l.isEditable()||p==="click")&&g(v,l))}:v=>{if(T2(v))return;E2(v);const S=l.isEditable();switch(p){case"cut":return S&&Ve(l,n0,v);case"copy":return Ve(l,Df,v);case"paste":return S&&Ve(l,nc,v);case"dragstart":return S&&Ve(l,Qf,v);case"dragover":return S&&Ve(l,t0,v);case"dragend":return S&&Ve(l,O3,v);case"focus":return S&&Ve(l,Vf,v);case"blur":return S&&Ve(l,Ff,v);case"drop":return S&&Ve(l,e0,v)}};a.addEventListener(p,m),h.push((()=>{a.removeEventListener(p,m)}))}})(e,this),i!=null&&e.classList.add(...i)}else this._window=null,this._updateTags.add(gh),Ws(this);dh("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&Oe(38);let i=e;i._readOnly&&(i=V3(e),i._selection=e._selection?e._selection.clone():null),s3(this);const r=this._pendingEditorState,s=this._updateTags,o=n!==void 0?n.tag:null;r===null||r.isEmpty()||(o!=null&&s.add(o),Ws(this)),this._pendingEditorState=i,this._dirtyType=ku,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&s.add(o),this._updating||Ws(this)}parseEditorState(e,n){return(function(i,r,s){const o=Ry(),a=jn,l=Li,u=Zn,c=r._dirtyElements,h=r._dirtyLeaves,d=r._cloneNotNeeded,p=r._dirtyType;r._dirtyElements=new Map,r._dirtyLeaves=new Set,r._cloneNotNeeded=new Set,r._dirtyType=0,jn=o,Li=!1,Zn=r,Ny(null);try{const g=r._nodes;$y(i.root,g),s&&s(),o._readOnly=!0}catch(g){g instanceof Error&&r._onError(g)}finally{r._dirtyElements=c,r._dirtyLeaves=h,r._cloneNotNeeded=d,r._dirtyType=p,jn=a,Li=l,Zn=u}return o})(typeof e=="string"?JSON.parse(e):e,this,n)}read(e){return Ws(this),this.getEditorState().read(e,{editor:this})}update(e,n){(function(i,r,s){i._updating?i._updates.push([r,s]):o0(i,r,s)})(this,e,n)}focus(e,n={}){const i=this._rootElement;i!==null&&(i.setAttribute("autocapitalize","off"),Hi(this,(()=>{const r=me(),s=ht();r!==null?r.dirty||an(r.clone()):s.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?s.selectStart():s.selectEnd()),Zy("focus"),r9((()=>{i.removeAttribute("autocapitalize"),e&&e()}))})),this._pendingEditorState===null&&i.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=wr(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,dh("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}c0.version="0.35.0+prod.esm";let hv=null;function Ny(t){hv=t}let W3=1;function lF(){W3=1}function My(t,e){const n=Zf(t,e);return n===void 0&&Oe(30,e),n}function Zf(t,e){return t._nodes.get(e)}const uF=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function q2(t){return Ct(nr(t))}function h0(t){const e=document.activeElement;if(!ln(e))return!1;const n=e.nodeName;return Ct(nr(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&zf(e)==null)}function lc(t,e,n){const i=t.getRootElement();try{return i!==null&&i.contains(e)&&i.contains(n)&&e!==null&&!h0(e)&&Xf(e)===t}catch{return!1}}function f0(t){return t instanceof c0}function Xf(t){let e=t;for(;e!=null;){const n=zf(e);if(f0(n))return n;e=Wf(e)}return null}function zf(t){return t?t.__lexicalEditor:null}function jo(t){return Bf(t)||t.isToken()}function ps(t){return jo(t)||t.isSegmented()}function Rs(t){return xl(t)&&t.nodeType===dV}function U3(t){return xl(t)&&t.nodeType===pV}function qa(t){let e=t;for(;e!=null;){if(Rs(e))return e;e=e.firstChild}return null}function Tg(t,e,n){const i=ii[e];if(n!==null&&(t&i)==(n&i))return t;let r=t^i;return e==="subscript"?r&=~ii.superscript:e==="superscript"?r&=~ii.subscript:e==="lowercase"?(r&=~ii.uppercase,r&=~ii.capitalize):e==="uppercase"?(r&=~ii.lowercase,r&=~ii.capitalize):e==="capitalize"&&(r&=~ii.lowercase,r&=~ii.uppercase),r}function Qy(t){return ye(t)||vr(t)||Ct(t)}function q3(t,e){const n=(function(){const o=hv;return hv=null,o})();if((e=e||n&&n.__key)!=null)return void(t.__key=e);Vn(),N3();const i=gn(),r=po(),s=""+W3++;r._nodeMap.set(s,t),te(t)?i._dirtyElements.set(s,!0):i._dirtyLeaves.add(s),i._cloneNotNeeded.add(s),i._dirtyType=t3,t.__key=s}function Zo(t){const e=t.getParent();if(e!==null){const n=t.getWritable(),i=e.getWritable(),r=t.getPreviousSibling(),s=t.getNextSibling(),o=s!==null?s.__key:null,a=r!==null?r.__key:null,l=r!==null?r.getWritable():null,u=s!==null?s.getWritable():null;r===null&&(i.__first=o),s===null&&(i.__last=a),l!==null&&(l.__next=o),u!==null&&(u.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,i.__size--}}function Ag(t){N3();const e=t.getLatest(),n=e.__parent,i=po(),r=gn(),s=i._nodeMap,o=r._dirtyElements;n!==null&&(function(l,u,c){let h=l;for(;h!==null;){if(c.has(h))return;const d=u.get(h);if(d===void 0)break;c.set(h,!1),h=d.__parent}})(n,s,o);const a=e.__key;r._dirtyType=t3,te(t)?o.set(a,!0):r._dirtyLeaves.add(a)}function Fn(t){Vn();const e=gn(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const i=At(n);i!==null&&i.getWritable()}if(t!==null){const i=At(t);i!==null&&i.getWritable()}}}function Lo(){return ac()?null:gn()._compositionKey}function At(t,e){const n=(e||po())._nodeMap.get(t);return n===void 0?null:n}function H3(t,e){const n=d0(t,gn());return n!==void 0?At(n,e):null}function d0(t,e){return t[`__lexicalKey_${e._key}`]}function nr(t,e){let n=t;for(;n!=null;){const i=H3(n,e);if(i!==null)return i;n=Wf(n)}return null}function Y3(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function H2(t){return t.read((()=>ht().getTextContent()))}function ht(){return G3(po())}function G3(t){return t._nodeMap.get("root")}function an(t){Vn();const e=po();t!==null&&(t.dirty=!0,t.setCachedNodes(null)),e._selection=t}function Hl(t){const e=gn(),n=(function(i,r){let s=i;for(;s!=null;){const o=d0(s,r);if(o!==void 0)return o;s=Wf(s)}return null})(t,e);return n===null?t===e.getRootElement()?At("root"):null:At(n)}function K3(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function Dy(t){const e=[];let n=t;for(;n!==null;)e.push(n),n=n._parentEditor;return e}function J3(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function e9(t){return Rs(t)?t.nodeValue:null}function Vy(t,e,n){const i=wr(Sr(e));if(i===null)return;const r=i.anchorNode;let{anchorOffset:s,focusOffset:o}=i;if(r!==null){let a=e9(r);const l=nr(r);if(a!==null&&ye(l)){if(a===Um&&n){const u=n.length;a=n,s=u,o=u}a!==null&&Fy(l,a,s,o,t)}}}function Fy(t,e,n,i,r){let s=t;if(s.isAttached()&&(r||!s.isDirty())){const o=s.isComposing();let a=e;(o||r)&&e[e.length-1]===Um&&(a=e.slice(0,-1));const l=s.getTextContent();if(r||a!==l){if(a===""){if(Fn(null),Ih||_u||pg)s.remove();else{const m=gn();setTimeout((()=>{m.update((()=>{s.isAttached()&&s.remove()}))}),20)}return}const u=s.getParent(),c=fo(),h=s.getTextContentSize(),d=Lo(),p=s.getKey();if(s.isToken()||d!==null&&p===d&&!o||ce(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===t.__key&&c.anchor.offset===0&&!s.canInsertTextBefore()&&!o||c.focus.key===t.__key&&c.focus.offset===h&&!s.canInsertTextAfter()&&!o))return void s.markDirty();const g=me();if(!ce(g)||n===null||i===null)return void Y2(s,a,g);if(g.setTextNodeRange(s,n,s,i),s.isSegmented()){const m=It(s.getTextContent());s.replace(m),s=m}Y2(s,a,g)}}}function Y2(t,e,n){if(t.setTextContent(e),ce(n)){const i=t.getKey();for(const r of["anchor","focus"]){const s=n[r];s.type==="text"&&s.key===i&&(s.offset=jr(t,s.offset,"clamp"))}}}function Zd(t,e,n){const i=e[n]||!1;return i==="any"||i===t[n]}function t9(t,e){return Zd(t,e,"altKey")&&Zd(t,e,"ctrlKey")&&Zd(t,e,"shiftKey")&&Zd(t,e,"metaKey")}function Lt(t,e,n){return t9(t,n)&&t.key.toLowerCase()===e.toLowerCase()}const js={ctrlKey:!gs,metaKey:gs},G2={altKey:gs,ctrlKey:!gs};function K2(t){return t.key==="Backspace"}function J2(t){return Lt(t,"a",js)}function n9(t){const e=ht();if(ce(t)){const n=t.anchor,i=t.focus,r=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(r.getKey(),0,"element"),i.set(r.getKey(),r.getChildrenSize(),"element"),Uo(t),t}{const n=e.select(0,e.getChildrenSize());return an(Uo(n)),n}}function nu(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,i=n[e];if(i!==void 0)return i;const r=t[e];if(typeof r=="string"){const s=e3(r);return n[e]=s,s}return r}function By(t,e,n,i,r){if(n.size===0)return;const s=i.__type,o=i.__key,a=e.get(s);a===void 0&&Oe(33,s);const l=a.klass;let u=t.get(l);u===void 0&&(u=new Map,t.set(l,u));const c=u.get(o),h=c==="destroyed"&&r==="created";(c===void 0||h)&&u.set(o,h?"updated":r)}function cF(t){const e=t.getType(),n=po();if(n._readOnly){const s=dv(n).get(e);return s?Array.from(s.values()):[]}const i=n._nodeMap,r=[];for(const[,s]of i)s instanceof t&&s.__type===e&&s.isAttached()&&r.push(s);return r}function ek(t,e,n){const i=t.getParent();let r=n,s=t;return i!==null&&(e&&n===0?(r=s.getIndexWithinParent(),s=i):e||n!==s.getChildrenSize()||(r=s.getIndexWithinParent()+1,s=i)),s.getChildAtIndex(e?r-1:r)}function Pg(t,e){const n=t.offset;if(t.type==="element")return ek(t.getNode(),e,n);{const i=t.getNode();if(e&&n===0||!e&&n===i.getTextContentSize()){const r=e?i.getPreviousSibling():i.getNextSibling();return r===null?ek(i.getParentOrThrow(),e,i.getIndexWithinParent()+(e?0:1)):r}}return null}function i9(t){const e=Sr(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function Ve(t,e,n){return(function(i,r,s){const o=Dy(i);for(let a=4;a>=0;a--)for(let l=0;l{for(let m=0;m{const a=o.getParentOrThrow(),l=xn(a),u=o!==n||l?zy(o):o;if(l)return te(o)&&te(u)||Oe(133),o.insertAfter(u),[o,u,u];{const[c,h,d]=i(a),p=o.getNextSiblings();return d.append(u,...p),[c,h,u]}},[r,s]=i(n);return[r,s]}function Wy(t){return ln(t)&&t.tagName==="A"}function ln(t){return xl(t)&&t.nodeType===fV}function xl(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"}function $g(t){return xl(t)&&t.nodeType===gV}function Rg(t){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return t.nodeName.match(e)!==null}function Fh(t){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return t.nodeName.match(e)!==null}function Gi(t){if(Ct(t)&&!t.isInline())return!0;if(!te(t)||xn(t))return!1;const e=t.getFirstChild(),n=e===null||vr(e)||ye(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function i1(t,e){let n=t;for(;n!==null&&n.getParent()!==null&&!e(n);)n=n.getParentOrThrow();return e(n)?n:null}function Uf(){return gn()}const tk=new WeakMap,pF=new Map;function dv(t){if(!t._readOnly&&t.isEmpty())return pF;t._readOnly||Oe(192);let e=tk.get(t);return e||(e=(function(n){const i=new Map;for(const[r,s]of n._nodeMap){const o=s.__type;let a=i.get(o);a||(a=new Map,i.set(o,a)),a.set(r,s)}return i})(t),tk.set(t,e)),e}function qf(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function g0(t,e){const n=parseInt(t.style.paddingInlineStart,10)||0,i=Math.round(n/40);e.setIndent(i)}function gF(t){t.__lexicalUnmanaged=!0}function l9(t){return t.__lexicalUnmanaged===!0}function Dc(t,e){return(function(n,i){return Object.prototype.hasOwnProperty.call(n,i)})(t,e)&&t[e]!==rc[e]}function Hf(t){const e=g2 in t.prototype?t.prototype[g2]():void 0,n=(function(o){return o===Cr||o===Oi||o===rc})(t),i=!n&&Dc(t,"getType")?t.getType():void 0;let r,s=i;if(e)if(i)r=e[i];else for(const[o,a]of Object.entries(e))s=o,r=a;if(!n&&s&&(Dc(t,"getType")||(t.getType=()=>s),Dc(t,"clone")||(t.clone=o=>(Ny(o),new t)),Dc(t,"importJSON")||(t.importJSON=r&&r.$importJSON||(o=>new t().updateFromJSON(o))),!Dc(t,"importDOM")&&r)){const{importDOM:o}=r;o&&(t.importDOM=()=>o)}return{ownNodeConfig:r,ownNodeType:s}}function u9(t){const e=Uf();return Vn(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t))).klass}const mF={next:"previous",previous:"next"};class m0{constructor(e){this.origin=e}[Symbol.iterator](){return Yy({hasNext:Ka,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return kn(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return kn(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,n){const i=this.getNodeAtCaret();return e.is(this.origin)||e.is(i)||(i===null?this.insert(e):i.replace(e,n)),this}splice(e,n,i="next"){const r=i===this.direction?n:Array.from(n).reverse();let s=this;const o=this.getParentAtCaret(),a=new Map;for(let l=s.getAdjacentCaret();l!==null&&a.size0){const u=s.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(l.getKey()),!(u.is(l)||s.origin.is(l))){const c=l.getParent();c&&c.is(o)&&l.remove(),u.replace(l)}}else u===null&&Oe(263,Array.from(a).join(" "))}else s.insert(l);s=kn(l,this.direction)}for(const l of a.values())l.remove();return this}}class Bh extends m0{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ir(e,this.direction)}getParentCaret(e="root"){return kn(Uy(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=da(this.direction);return kn(this.getNodeAtCaret(),e)||ir(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof Bh&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const OF={root:vn,shadowRoot:xn};function da(t){return mF[t]}function Uy(t,e="root"){return OF[e](t)?null:t}class Ya extends m0{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:kn(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return te(this.origin)?ir(this.origin,this.direction):null}getParentCaret(e="root"){return kn(Uy(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=da(this.direction);return kn(this.getNodeAtCaret(),e)||ir(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Ya&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Ya||e instanceof Ga)&&this.direction===e.direction&&this.origin.is(e.origin)}}class Ga extends m0{type="text";constructor(e,n){super(e),this.offset=n}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:qo(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return kn(Uy(this.getParentAtCaret(),e),this.direction)}getFlipped(){return qo(this.origin,da(this.direction),this.offset)}isSamePointCaret(e){return e instanceof Ga&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Ya||e instanceof Ga)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return kn(this.origin,this.direction)}}function Br(t){return t instanceof Ga}function xF(t){return t instanceof m0}function Ka(t){return t instanceof Ya}function tr(t){return t instanceof Bh}const vF={next:class extends Ga{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ga{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},bF={next:class extends Ya{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ya{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},yF={next:class extends Bh{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends Bh{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function kn(t,e){return t?new bF[e](t):null}function qo(t,e,n){return t?new vF[e](t,jr(t,n)):null}function jr(t,e,n="error"){const i=t.getTextContentSize();let r=e==="next"?i:e==="previous"?0:e;return(r<0||r>i)&&(n!=="clamp"&&(function(s,...o){const a=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;l.append("code",s);for(const u of o)l.append("v",u);a.search=l.toString(),console.warn(`Minified Lexical warning #${s}; visit ${a.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(284,String(e),String(i),t.getKey()),r=r<0?0:i),r}function pv(t,e){return new h9(t,e)}function ir(t,e){return te(t)?new yF[e](t):null}function c9(t){return t&&t.getChildCaret()||t}function Ja(t){return t&&c9(t.getAdjacentCaret())}class qy{type="node-caret-range";constructor(e,n,i){this.anchor=e,this.focus=n,this.direction=i}getLatest(){const e=this.anchor.getLatest(),n=this.focus.getLatest();return e===this.anchor&&n===this.focus?this:new qy(e,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=r=>{const s=this[r].getLatest();return Br(s)?(function(o,a){const{direction:l,origin:u}=o,c=jr(u,a==="focus"?da(l):l);return pv(o,c-o.offset)})(s,r):null},n=e("anchor"),i=e("focus");if(n&&i){const{caret:r}=n,{caret:s}=i;if(r.isSameNodeCaret(s))return[pv(r,s.offset-r.offset),null]}return[n,i]}iterNodeCarets(e="root"){const n=Br(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),i=this.focus.getLatest(),r=Br(i),s=o=>o.isSameNodeCaret(i)?null:Ja(o)||o.getParentCaret(e);return Yy({hasNext:o=>o!==null&&!(r&&i.isSameNodeCaret(o)),initial:n.isSameNodeCaret(i)?null:s(n),map:o=>o,step:s})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class h9{type="slice";constructor(e,n){this.caret=e,this.distance=n}getSliceIndices(){const{distance:e,caret:{offset:n}}=this,i=n+e;return i{let W;for(let B=x;Bv.has(Z.getKey())&&Gi(Z)));return A&&I?[A,I]:null})(c,h,l);if(d){const[g,m]=d;ir(g,"previous").splice(0,m.getChildren()),m.remove()}const p=[c,h,...o,...a].find(r1);if(p)return Hy(As(Ii(p),t.direction));Oe(269,JSON.stringify(o.map((g=>g.origin.__key))))}function Ii(t){const e=(function(r){let s=r;for(;tr(s);){const o=Ja(s);if(!tr(o))break;s=o}return s})(t.getLatest()),{direction:n}=e;if(ye(e.origin))return Br(e)?e:qo(e.origin,n,n);const i=e.getAdjacentCaret();return Ka(i)&&ye(i.origin)?qo(i.origin,n,da(n)):e}function eS(t){return Br(t)&&t.offset!==jr(t.origin,t.direction)}function As(t,e){return t.direction===e?t:t.getFlipped()}function tS(t,e){return t.direction===e?t:io(As(t.focus,e),As(t.anchor,e))}function d9(t,e,n){let i=ir(t,"next");for(let r=0;r0||o.canBeEmpty()&&r(o,"last"))&&s.insert(e(o).splice(0,0,a))}return s}const kF=Object.freeze(Object.defineProperty({__proto__:null,$addUpdateTag:Zy,$applyNodeReplacement:vi,$caretFromPoint:Wr,$caretRangeFromSelection:gv,$cloneWithProperties:qf,$comparePointCaretNext:Gy,$copyNode:zy,$create:u9,$createLineBreakNode:Ni,$createNodeSelection:r0,$createParagraphNode:yt,$createPoint:zr,$createRangeSelection:fa,$createRangeSelectionFromDom:eF,$createTabNode:dl,$createTextNode:It,$extendCaretToRange:O0,$getAdjacentChildCaret:Ja,$getAdjacentNode:Pg,$getAdjacentSiblingOrParentSiblingCaret:wF,$getCaretInDirection:As,$getCaretRange:io,$getCaretRangeInDirection:tS,$getCharacterOffsets:_g,$getChildCaret:ir,$getChildCaretAtIndex:d9,$getChildCaretOrSelf:c9,$getCollapsedCaretRange:Hy,$getCommonAncestor:mh,$getCommonAncestorResultBranchOrder:Ky,$getEditor:Uf,$getNearestNodeFromDOMNode:nr,$getNearestRootOrShadowRoot:s9,$getNodeByKey:At,$getNodeByKeyOrThrow:o9,$getPreviousSelection:fo,$getRoot:ht,$getSelection:me,$getSiblingCaret:kn,$getState:gg,$getStateChange:QV,$getTextContent:nF,$getTextNodeOffset:jr,$getTextPointCaret:qo,$getTextPointCaretSlice:pv,$getWritableNodeState:Ty,$hasAncestor:Ig,$hasUpdateTag:hF,$insertNodes:gl,$isBlockElementNode:Qh,$isChildCaret:tr,$isDecoratorNode:Ct,$isElementNode:te,$isExtendableTextPointCaret:eS,$isInlineElementOrDecoratorNode:fF,$isLeafNode:Qy,$isLineBreakNode:vr,$isNodeCaret:xF,$isNodeSelection:hn,$isParagraphNode:jf,$isRangeSelection:ce,$isRootNode:vn,$isRootOrShadowRoot:xn,$isSiblingCaret:Ka,$isTabNode:Bf,$isTextNode:ye,$isTextPointCaret:Br,$isTextPointCaretSlice:SF,$isTokenOrSegmented:ps,$isTokenOrTab:jo,$nodesOfType:cF,$normalizeCaret:Ii,$normalizeSelection__EXPERIMENTAL:Uo,$onUpdate:r9,$parseSerializedNode:D3,$removeTextFromCaretRange:f9,$rewindSiblingCaret:uc,$selectAll:n9,$setCompositionKey:Fn,$setPointFromCaret:Ho,$setSelection:an,$setSelectionFromCaretRange:Jy,$setState:DV,$splitAtPointCaretNext:p9,$splitNode:dF,$updateRangeSelectionFromCaretRange:Oh,ArtificialNode__DO_NOT_USE:l0,BLUR_COMMAND:Ff,CAN_REDO_COMMAND:Ul,CAN_UNDO_COMMAND:ql,CLEAR_EDITOR_COMMAND:x3,CLEAR_HISTORY_COMMAND:v3,CLICK_COMMAND:If,COLLABORATION_TAG:Ly,COMMAND_PRIORITY_CRITICAL:Mi,COMMAND_PRIORITY_EDITOR:at,COMMAND_PRIORITY_HIGH:Vh,COMMAND_PRIORITY_LOW:Zt,COMMAND_PRIORITY_NORMAL:aF,CONTROLLED_TEXT_INSERTION_COMMAND:Da,COPY_COMMAND:Df,CUT_COMMAND:n0,DELETE_CHARACTER_COMMAND:Bo,DELETE_LINE_COMMAND:Au,DELETE_WORD_COMMAND:Tu,DRAGEND_COMMAND:O3,DRAGOVER_COMMAND:t0,DRAGSTART_COMMAND:Qf,DROP_COMMAND:e0,DecoratorNode:Cr,ElementNode:Oi,FOCUS_COMMAND:Vf,FORMAT_ELEMENT_COMMAND:m3,FORMAT_TEXT_COMMAND:ys,HISTORIC_TAG:Dh,HISTORY_MERGE_TAG:gh,HISTORY_PUSH_TAG:B3,INDENT_CONTENT_COMMAND:Mh,INSERT_LINE_BREAK_COMMAND:Qa,INSERT_PARAGRAPH_COMMAND:Eu,INSERT_TAB_COMMAND:Py,INTERNAL_$isBlock:Gi,IS_ALL_FORMATTING:n3,IS_BOLD:vV,IS_CODE:yV,IS_HIGHLIGHT:Wm,IS_ITALIC:bV,IS_STRIKETHROUGH:$h,IS_SUBSCRIPT:SV,IS_SUPERSCRIPT:wV,IS_UNDERLINE:Rh,KEY_ARROW_DOWN_COMMAND:Gm,KEY_ARROW_LEFT_COMMAND:Hm,KEY_ARROW_RIGHT_COMMAND:Ay,KEY_ARROW_UP_COMMAND:Ym,KEY_BACKSPACE_COMMAND:Nf,KEY_DELETE_COMMAND:Jm,KEY_DOWN_COMMAND:Lf,KEY_ENTER_COMMAND:Ua,KEY_ESCAPE_COMMAND:ic,KEY_MODIFIER_COMMAND:b3,KEY_SPACE_COMMAND:Km,KEY_TAB_COMMAND:Mf,LineBreakNode:sc,MOVE_TO_END:p3,MOVE_TO_START:g3,NODE_STATE_KEY:AV,OUTDENT_CONTENT_COMMAND:Sg,PASTE_COMMAND:nc,PASTE_TAG:j3,ParagraphNode:Ol,REDO_COMMAND:Rf,REMOVE_TEXT_COMMAND:yg,RootNode:ml,SELECTION_CHANGE_COMMAND:tc,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:d3,SELECT_ALL_COMMAND:wg,SKIP_COLLAB_TAG:sF,SKIP_DOM_SELECTION_TAG:X3,SKIP_SCROLL_INTO_VIEW_TAG:Z3,TEXT_TYPE_TO_FORMAT:ii,TabNode:oc,TextNode:Jr,UNDO_COMMAND:$f,buildImportMap:zV,createCommand:We,createEditor:u0,createSharedNodeState:mg,createState:MV,flipDirection:da,getDOMOwnerDocument:jy,getDOMSelection:wr,getDOMSelectionFromTarget:a9,getDOMTextNode:qa,getEditorPropertyFromDOMNode:zf,getNearestEditorFromDOMNode:Xf,getRegisteredNode:Zf,getRegisteredNodeOrThrow:My,getStaticNodeConfig:Hf,isBlockDomNode:Fh,isCurrentlyReadOnlyMode:ac,isDOMDocumentNode:U3,isDOMNode:xl,isDOMTextNode:Rs,isDOMUnmanaged:l9,isDocumentFragment:$g,isExactShortcutMatch:Lt,isHTMLAnchorElement:Wy,isHTMLElement:ln,isInlineDomNode:Rg,isLexicalEditor:f0,isModifierMatch:t9,isSelectionCapturedInDecoratorInput:h0,isSelectionWithinEditor:lc,makeStepwiseIterator:Yy,removeFromParent:Zo,resetRandomKey:lF,setDOMUnmanaged:gF,setNodeIndentFromDOM:g0},Symbol.toStringTag,{value:"Module"}));function EF(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const mv=new Map;function g9(t){const e={};if(!t)return e;const n=t.split(";");for(const i of n)if(i!==""){const[r,s]=i.split(/:([^]+)/);r&&s&&(e[r.trim()]=s.trim())}return e}function rk(t){let e=mv.get(t);return e===void 0&&(e=g9(t),mv.set(t,e)),e}function m9(t){const e=Uf().getElementByKey(t.getKey());if(e===null)return null;const n=e.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(e)}function O9(t){return m9(vn(t)?t:t.getParentOrThrow())}function sk(t){const e=O9(t);return e!==null&&e.direction==="rtl"}function x9(t,e){const n=t.getStartEndPoints();if(e.isSelected(t)&&!ps(e)&&n!==null){const[i,r]=n,s=t.isBackward(),o=i.getNode(),a=r.getNode(),l=e.is(o),u=e.is(a);if(l||u){const[c,h]=_g(t),d=o.is(a),p=e.is(s?a:o),g=e.is(s?o:a);let m,v=0;d?(v=c>h?h:c,m=c>h?c:h):p?(v=s?h:c,m=void 0):g&&(v=0,m=s?c:h),e.__text=e.__text.slice(v,m)}}return e}function ok(t){if(t.type==="text")return t.offset===t.getNode().getTextContentSize();const e=t.getNode();return te(e)||EF(177),t.offset===e.getChildrenSize()}function TF(t,e,n){let i=e.getNode(),r=n;if(te(i)){const s=i.getDescendantByIndex(e.offset);s!==null&&(i=s)}for(;r>0&&i!==null;){if(te(i)){const u=i.getLastDescendant();u!==null&&(i=u)}let s=i.getPreviousSibling(),o=0;if(s===null){let u=i.getParentOrThrow(),c=u.getPreviousSibling();for(;c===null;){if(u=u.getParent(),u===null){s=null;break}c=u.getPreviousSibling()}u!==null&&(o=u.isInline()?0:2,s=c)}let a=i.getTextContent();a===""&&te(i)&&!i.isInline()&&(a=` + +`);const l=a.length;if(!ye(i)||r>=l){const u=i.getParent();i.remove(),u==null||u.getChildrenSize()!==0||vn(u)||u.remove(),r-=l+o,i=s}else{const u=i.getKey(),c=t.getEditorState().read((()=>{const p=At(u);return ye(p)&&p.isSimpleText()?p.getTextContent():null})),h=l-r,d=a.slice(0,h);if(c!==null&&c!==a){const p=fo();let g=i;if(i.isSimpleText())i.setTextContent(c);else{const m=It(c);i.replace(m),g=m}if(ce(p)&&p.isCollapsed()){const m=p.anchor.offset;g.select(m,m)}}else if(i.isSimpleText()){const p=e.key===u;let g=e.offset;g{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}const NF=x0,MF=LF;function Ur(t,...e){const n=w9(...e);n.length>0&&t.classList.add(...n)}function v0(t,...e){const n=w9(...e);n.length>0&&t.classList.remove(...n)}function QF(t){return t?t.getAdjacentCaret():null}function C9(t,e){let n=t;for(;n!=null;){if(n instanceof e)return n;n=n.getParent()}return null}function Ov(t){const e=Zr(t,(n=>te(n)&&!n.isInline()));return te(e)||S9(4,t.__key),e}const Zr=(t,e)=>{let n=t;for(;n!==ht()&&n!=null;){if(e(n))return n;n=n.getParent()}return null};function DF(t,e){const n=new Map,i=t._pendingEditorState;for(const[s,o]of e._nodeMap)n.set(s,qf(o));i&&(i._nodeMap=n),t._dirtyType=2;const r=e._selection;an(r===null?null:r.clone())}function _9(t){const e=me()||fo();let n;if(ce(e))n=Wr(e.focus,"next");else{if(e!=null){const o=e.getNodes(),a=o[o.length-1];a&&(n=kn(a,"next"))}n=n||ir(ht(),"previous").getFlipped().insert(yt())}const i=VF(t,n),r=Ja(i),s=tr(r)?Ii(r):i;return Jy(Hy(s)),t.getLatest()}function VF(t,e,n){let i=As(e,"next");for(let r=i;r;r=p9(r,n))i=r;return Br(i)&&S9(283),i.insert(t.isInline()?yt().append(t):t),As(kn(t.getLatest(),"next"),e.direction)}function nS(t,e){const n=e();return t.replace(n),n.append(t),n}function No(t,e){return t!==null&&Object.getPrototypeOf(t).constructor.name===e.name}function FF(t,e){const n=[];for(let i=0;i1){const S=e._nodeMap,b=S.get(s.anchor.key),w=S.get(o.anchor.key);return b&&w&&!t._nodeMap.has(b.__key)&&ye(b)&&b.__text.length===1&&s.anchor.offset===1?uk:Nr}const l=a[0],u=t._nodeMap.get(l.__key);if(!ye(u)||!ye(l)||u.__mode!==l.__mode)return Nr;const c=u.__text,h=l.__text;if(c===h)return Nr;const d=s.anchor,p=o.anchor;if(d.key!==p.key||d.type!=="text")return Nr;const g=d.offset,m=p.offset,v=h.length-c.length;return v===1&&m===g-1?uk:v===-1&&m===g+1?ZF:v===-1&&m===g?XF:Nr}function WF(t,e){let n=Date.now(),i=Nr;return(r,s,o,a,l,u)=>{const c=Date.now();if(u.has(Dh))return i=Nr,n=c,vv;const h=zF(r,s,a,l,t.isComposing()),d=(()=>{const p=o===null||o.editor===t,g=u.has(B3);if(!g&&p&&u.has(gh))return zd;if(r===null)return xv;const m=s._selection;return a.size>0||l.size>0?g===!1&&h!==Nr&&h===i&&cw.exportJSON())))===JSON.stringify(b.read((()=>k.exportJSON())))})(Array.from(a)[0],r,s)?zd:xv:m!==null?zd:vv})();return n=c,i=h,d}}function ck(t){t.undoStack=[],t.redoStack=[],t.current=null}function UF(t,e,n){const i=WF(t,n);return ci(t.registerCommand($f,(()=>((function(s,o){const a=o.redoStack,l=o.undoStack;if(l.length!==0){const u=o.current,c=l.pop();u!==null&&(a.push(u),s.dispatchCommand(Ul,!0)),l.length===0&&s.dispatchCommand(ql,!1),o.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:Dh})}})(t,e),!0)),at),t.registerCommand(Rf,(()=>((function(s,o){const a=o.redoStack,l=o.undoStack;if(a.length!==0){const u=o.current;u!==null&&(l.push(u),s.dispatchCommand(ql,!0));const c=a.pop();a.length===0&&s.dispatchCommand(Ul,!1),o.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:Dh})}})(t,e),!0)),at),t.registerCommand(x3,(()=>(ck(e),!1)),at),t.registerCommand(v3,(()=>(ck(e),t.dispatchCommand(Ul,!1),t.dispatchCommand(ql,!1),!0)),at),t.registerUpdateListener((({editorState:s,prevEditorState:o,dirtyLeaves:a,dirtyElements:l,tags:u})=>{const c=e.current,h=e.redoStack,d=e.undoStack,p=c===null?null:c.editorState;if(c!==null&&s===p)return;const g=i(o,s,c,a,l,u);if(g===xv)h.length!==0&&(e.redoStack=[],t.dispatchCommand(Ul,!1)),c!==null&&(d.push({...c}),t.dispatchCommand(ql,!0));else if(g===vv)return;e.current={editor:t,editorState:s}})))}function k9(){return{current:null,redoStack:[],undoStack:[]}}function E9({delay:t,externalHistoryState:e}){const[n]=ui();return(function(i,r,s=1e3){const o=R.useMemo((()=>r||k9()),[r]);R.useEffect((()=>UF(i,o,s)),[s,i,o])})(n,e,t),null}function qF(t,e){const n=e.body?e.body.childNodes:[];let i=[];const r=[];for(let s=0;s"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),i=ht().getChildren();for(let r=0;r{const g=new l0;return n.push(g),g}:yt)),a==null?d.length>0?o=o.concat(d):Fh(t)&&(function(g){return g.nextSibling==null||g.previousSibling==null?!1:Rg(g.nextSibling)&&Rg(g.previousSibling)})(t)&&(o=o.concat(Ni())):te(a)&&a.append(...d),o}function YF(t,e,n){const i=t.style.textAlign,r=[];let s=[];for(let o=0;ou}).createHTML(l):l})(r),"text/html");return fk(n,qF(n,a),e)}catch{}const o=s||t.getData("text/uri-list");if(o!=null)if(ce(e)){const a=o.split(/(\r?\n|\t)/);a[a.length-1]===""&&a.pop();for(let l=0;l0?l.text=u:r=!1}for(let u=0;u{t.update((()=>{u(pk(t,e,n))}))}));const i=t.getRootElement(),r=t._window||window,s=window.document,o=wr(r);if(i===null||o===null)return!1;const a=s.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(s.createTextNode("#")),i.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),o.removeAllRanges(),o.addRange(l),new Promise(((u,c)=>{const h=t.registerCommand(Df,(d=>(No(d,ClipboardEvent)&&(h(),Rl!==null&&(window.clearTimeout(Rl),Rl=null),u(pk(t,d,n))),!0)),Mi);Rl=window.setTimeout((()=>{h(),Rl=null,u(!1)}),50),s.execCommand("copy"),a.remove()}))}function pk(t,e,n){if(n===void 0){const r=wr(t._window);if(!r)return!1;const s=r.anchorNode,o=r.focusNode;if(s!==null&&o!==null&&!lc(t,s,o))return!1;const a=me();if(a===null)return!1;n=nB(a)}e.preventDefault();const i=e.clipboardData;return i!==null&&(iB(i,n),!0)}const tB=[["text/html",GF],["application/x-lexical-editor",KF]];function nB(t=me()){const e={"text/plain":t?t.getTextContent():""};if(t){const n=Uf();for(const[i,r]of tB){const s=r(n,t);s!==null&&(e[i]=s)}}return e}function iB(t,e){for(const n in e){const i=e[n];i!==void 0&&t.setData(n,i)}}function gk(t,e){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(t,e);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(t,e);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const cc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,rB=cc&&"documentMode"in document?document.documentMode:null,sB=!(!cc||!("InputEvent"in window)||rB)&&"getTargetRanges"in new window.InputEvent("input"),oB=cc&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),mk=cc&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,aB=cc&&/^(?=.*Chrome).*/i.test(navigator.userAgent),lB=cc&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!aB,Ok=We("DRAG_DROP_PASTE_FILE");let b0=class $9 extends Oi{static getType(){return"quote"}static clone(e){return new $9(e.__key)}createDOM(e){const n=document.createElement("blockquote");return Ur(n,e.theme.quote),n}updateDOM(e,n){return!1}static importDOM(){return{blockquote:e=>({conversion:uB,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(ln(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();i&&(n.style.textAlign=i);const r=this.getDirection();r&&(n.dir=r)}return{element:n}}static importJSON(e){return Yf().updateFromJSON(e)}insertNewAfter(e,n){const i=yt(),r=this.getDirection();return i.setDirection(r),this.insertAfter(i,n),i}collapseAtStart(){const e=yt();return this.getChildren().forEach((n=>e.append(n))),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function Yf(){return vi(new b0)}function bv(t){return t instanceof b0}let Gf=class R9 extends Oi{static getType(){return"heading"}static clone(e){return new R9(e.__tag,e.__key)}constructor(e,n){super(n),this.__tag=e}getTag(){return this.__tag}setTag(e){const n=this.getWritable();return this.__tag=e,n}createDOM(e){const n=this.__tag,i=document.createElement(n),r=e.theme.heading;if(r!==void 0){const s=r[n];Ur(i,s)}return i}updateDOM(e,n,i){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:Ll,priority:0}),h2:e=>({conversion:Ll,priority:0}),h3:e=>({conversion:Ll,priority:0}),h4:e=>({conversion:Ll,priority:0}),h5:e=>({conversion:Ll,priority:0}),h6:e=>({conversion:Ll,priority:0}),p:e=>{const n=e.firstChild;return n!==null&&xk(n)?{conversion:()=>({node:null}),priority:3}:null},span:e=>xk(e)?{conversion:n=>({node:Ss("h1")}),priority:3}:null}}exportDOM(e){const{element:n}=super.exportDOM(e);if(ln(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();i&&(n.style.textAlign=i);const r=this.getDirection();r&&(n.dir=r)}return{element:n}}static importJSON(e){return Ss(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,n=!0){const i=e?e.anchor.offset:0,r=this.getLastDescendant(),s=!r||e&&e.anchor.key===r.getKey()&&i===r.getTextContentSize()||!e?yt():Ss(this.getTag()),o=this.getDirection();if(s.setDirection(o),this.insertAfter(s,n),i===0&&!this.isEmpty()&&e){const a=yt();a.select(),this.replace(a,!0)}return s}collapseAtStart(){const e=this.isEmpty()?yt():Ss(this.getTag());return this.getChildren().forEach((n=>e.append(n))),this.replace(e),!0}extractWithChild(){return!0}};function xk(t){return t.nodeName.toLowerCase()==="span"&&t.style.fontSize==="26pt"}function Ll(t){const e=t.nodeName.toLowerCase();let n=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(n=Ss(e),t.style!==null&&(g0(t,n),n.setFormat(t.style.textAlign))),{node:n}}function uB(t){const e=Yf();return t.style!==null&&(e.setFormat(t.style.textAlign),g0(t,e)),{node:e}}function Ss(t="h1"){return vi(new Gf(t))}function Pu(t){return t instanceof Gf}function Wd(t){let e=null;if(No(t,DragEvent)?e=t.dataTransfer:No(t,ClipboardEvent)&&(e=t.clipboardData),e===null)return[!1,[],!1];const n=e.types,i=n.includes("Files"),r=n.includes("text/html")||n.includes("text/plain");return[i,Array.from(e.files),r]}function vk(t){const e=me();if(!ce(e))return!1;const n=new Set,i=e.getNodes();for(let r=0;rte(u)&&!u.isInline()));if(a===null)continue;const l=a.getKey();a.canIndent()&&!n.has(l)&&(n.add(l),t(a))}return n.size>0}function bk(t){const e=nr(t);return Ct(e)}function a1(t){for(const e of["lowercase","uppercase","capitalize"])t.hasFormat(e)&&t.toggleFormat(e)}function cB(t){return ci(t.registerCommand(If,(e=>{const n=me();return!!hn(n)&&(n.clear(),!0)}),at),t.registerCommand(Bo,(e=>{const n=me();return ce(n)?(n.deleteCharacter(e),!0):!!hn(n)&&(n.deleteNodes(),!0)}),at),t.registerCommand(Tu,(e=>{const n=me();return!!ce(n)&&(n.deleteWord(e),!0)}),at),t.registerCommand(Au,(e=>{const n=me();return!!ce(n)&&(n.deleteLine(e),!0)}),at),t.registerCommand(Da,(e=>{const n=me();if(typeof e=="string")n!==null&&n.insertText(e);else{if(n===null)return!1;const i=e.dataTransfer;if(i!=null)hk(i,n,t);else if(ce(n)){const r=e.data;return r&&n.insertText(r),!0}}return!0}),at),t.registerCommand(yg,(()=>{const e=me();return!!ce(e)&&(e.removeText(),!0)}),at),t.registerCommand(ys,(e=>{const n=me();return!!ce(n)&&(n.formatText(e),!0)}),at),t.registerCommand(m3,(e=>{const n=me();if(!ce(n)&&!hn(n))return!1;const i=n.getNodes();for(const r of i){const s=Zr(r,(o=>te(o)&&!o.isInline()));s!==null&&s.setFormat(e)}return!0}),at),t.registerCommand(Qa,(e=>{const n=me();return!!ce(n)&&(n.insertLineBreak(e),!0)}),at),t.registerCommand(Eu,(()=>{const e=me();return!!ce(e)&&(e.insertParagraph(),!0)}),at),t.registerCommand(Py,(()=>(gl([dl()]),!0)),at),t.registerCommand(Mh,(()=>vk((e=>{const n=e.getIndent();e.setIndent(n+1)}))),at),t.registerCommand(Sg,(()=>vk((e=>{const n=e.getIndent();n>0&&e.setIndent(Math.max(0,n-1))}))),at),t.registerCommand(Ym,(e=>{const n=me();if(hn(n)){const i=n.getNodes();if(i.length>0)return i[0].selectPrevious(),!0}else if(ce(n)){const i=Pg(n.focus,!0);if(!e.shiftKey&&Ct(i)&&!i.isIsolated()&&!i.isInline())return i.selectPrevious(),e.preventDefault(),!0}return!1}),at),t.registerCommand(Gm,(e=>{const n=me();if(hn(n)){const i=n.getNodes();if(i.length>0)return i[0].selectNext(0,0),!0}else if(ce(n)){if((function(r){const s=r.focus;return s.key==="root"&&s.offset===ht().getChildrenSize()})(n))return e.preventDefault(),!0;const i=Pg(n.focus,!1);if(!e.shiftKey&&Ct(i)&&!i.isIsolated()&&!i.isInline())return i.selectNext(),e.preventDefault(),!0}return!1}),at),t.registerCommand(Hm,(e=>{const n=me();if(hn(n)){const i=n.getNodes();if(i.length>0)return e.preventDefault(),sk(i[0])?i[0].selectNext(0,0):i[0].selectPrevious(),!0}if(!ce(n))return!1;if(ak(n,!0)){const i=e.shiftKey;return e.preventDefault(),lk(n,i,!0),!0}return!1}),at),t.registerCommand(Ay,(e=>{const n=me();if(hn(n)){const r=n.getNodes();if(r.length>0)return e.preventDefault(),sk(r[0])?r[0].selectPrevious():r[0].selectNext(0,0),!0}if(!ce(n))return!1;const i=e.shiftKey;return!!ak(n,!1)&&(e.preventDefault(),lk(n,i,!1),!0)}),at),t.registerCommand(Nf,(e=>{if(bk(e.target))return!1;const n=me();if(ce(n)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:r}=i;if(r.offset!==0)return!1;const s=r.getNode();if(vn(s))return!1;const o=Ov(s);return o.getIndent()>0&&(o.is(s)||s.is(o.getFirstDescendant()))})(n))return e.preventDefault(),t.dispatchCommand(Sg,void 0);if(mk&&navigator.language==="ko-KR")return!1}else if(!hn(n))return!1;return e.preventDefault(),t.dispatchCommand(Bo,!0)}),at),t.registerCommand(Jm,(e=>{if(bk(e.target))return!1;const n=me();return!(!ce(n)&&!hn(n))&&(e.preventDefault(),t.dispatchCommand(Bo,!1))}),at),t.registerCommand(Ua,(e=>{const n=me();if(!ce(n))return!1;if(a1(n),e!==null){if((mk||oB||lB)&&sB)return!1;if(e.preventDefault(),e.shiftKey)return t.dispatchCommand(Qa,!1)}return t.dispatchCommand(Eu,void 0)}),at),t.registerCommand(ic,(()=>{const e=me();return!!ce(e)&&(t.blur(),!0)}),at),t.registerCommand(e0,(e=>{const[,n]=Wd(e);if(n.length>0){const r=gk(e.clientX,e.clientY);if(r!==null){const{offset:s,node:o}=r,a=nr(o);if(a!==null){const l=fa();if(ye(a))l.anchor.set(a.getKey(),s,"text"),l.focus.set(a.getKey(),s,"text");else{const c=a.getParentOrThrow().getKey(),h=a.getIndexWithinParent()+1;l.anchor.set(c,h,"element"),l.focus.set(c,h,"element")}const u=Uo(l);an(u)}t.dispatchCommand(Ok,n)}return e.preventDefault(),!0}const i=me();return!!ce(i)}),at),t.registerCommand(Qf,(e=>{const[n]=Wd(e),i=me();return!(n&&!ce(i))}),at),t.registerCommand(t0,(e=>{const[n]=Wd(e),i=me();if(n&&!ce(i))return!1;const r=gk(e.clientX,e.clientY);if(r!==null){const s=nr(r.node);Ct(s)&&e.preventDefault()}return!0}),at),t.registerCommand(wg,(()=>(n9(),!0)),at),t.registerCommand(Df,(e=>(dk(t,No(e,ClipboardEvent)?e:null),!0)),at),t.registerCommand(n0,(e=>((async function(n,i){await dk(i,No(n,ClipboardEvent)?n:null),i.update((()=>{const r=me();ce(r)?r.removeText():hn(r)&&r.getNodes().forEach((s=>s.remove()))}))})(e,t),!0)),at),t.registerCommand(nc,(e=>{const[,n,i]=Wd(e);return n.length>0&&!i?(t.dispatchCommand(Ok,n),!0):xl(e.target)&&h0(e.target)?!1:me()!==null&&((function(r,s){r.preventDefault(),s.update((()=>{const o=me(),a=No(r,InputEvent)||No(r,KeyboardEvent)?null:r.clipboardData;a!=null&&o!==null&&hk(a,o,s)}),{tag:j3})})(e,t),!0)}),at),t.registerCommand(Km,(e=>{const n=me();return ce(n)&&a1(n),!1}),at),t.registerCommand(Mf,(e=>{const n=me();return ce(n)&&a1(n),!1}),at))}L9.peek=mB;var hB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],fB={canContainEols:["highlight"],enter:{highlight:dB},exit:{highlight:pB}};function dB(t){this.enter({type:"highlight",children:[]},t)}function pB(t){this.exit(t)}var gB={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:hB}],handlers:{highlight:L9}};function L9(t,e,n,i){const s=n.createTracker(i),o=n.enter("highlight");let a=s.move("==");return a+=s.move(n.containerPhrasing(t,{before:a,after:"=",...s.current()})),a+=s.move("=="),o(),a}function mB(){return"="}const yk={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function N9(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function OB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function xB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function Sk(t){return xB(t)||N9(t)}const vB=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function y0(t,e){const n=e||{},i=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,r=[];let s=0,o=-1,a="",l,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,l=n.position.start):l=n.position);let c=(l?l.line:0)||1,h=(l?l.column:0)||1,d=g(),p;for(s--;++s<=t.length;)if(p===10&&(h=(u?u[o]:0)||1),p=t.charCodeAt(s),p===38){const S=t.charCodeAt(s+1);if(S===9||S===10||S===12||S===32||S===38||S===60||Number.isNaN(S)||i&&S===i){a+=String.fromCharCode(p),h++;continue}const b=s+1;let w=b,k=b,C;if(S===35){k=++w;const B=t.charCodeAt(k);B===88||B===120?(C="hexadecimal",k=++w):C="decimal"}else C="named";let x="",E="",A="";const I=C==="named"?Sk:C==="decimal"?N9:OB;for(k--;++k<=t.length;){const B=t.charCodeAt(k);if(!I(B))break;A+=String.fromCharCode(B),C==="named"&&gD.includes(A)&&(x=A,E=a2(A))}let Z=t.charCodeAt(k)===59;if(Z){k++;const B=C==="named"?a2(A):!1;B&&(x=A,E=B)}let U=1+k-b,W="";if(!(!Z&&n.nonTerminated===!1))if(!A)C!=="named"&&m(4,U);else if(C==="named"){if(Z&&!E)m(5,1);else if(x!==A&&(k=w+x.length,U=1+k-w,Z=!1),!Z){const B=x?1:3;if(n.attribute){const ne=t.charCodeAt(k);ne===61?(m(B,U),E=""):Sk(ne)?E="":m(B,U)}else m(B,U)}W=E}else{Z||m(2,U);let B=Number.parseInt(A,C==="hexadecimal"?16:10);if(bB(B))m(7,U),W="�";else if(B in yk)m(6,U),W=yk[B];else{let ne="";yB(B)&&m(6,U),B>65535&&(B-=65536,ne+=String.fromCharCode(B>>>10|55296),B=56320|B&1023),W=ne+String.fromCharCode(B)}}if(W){v(),d=g(),s=k-1,h+=k-b+1,r.push(W);const B=g();B.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,W,{start:d,end:B},t.slice(b-1,k)),d=B}else A=t.slice(b-1,k),a+=A,h+=A.length,s=k-1}else p===10&&(c++,o++,h=0),Number.isNaN(p)?v():(a+=String.fromCharCode(p),h++);return r.join("");function g(){return{line:c,column:h,offset:s+((l?l.offset:0)||0)}}function m(S,b){let w;n.warning&&(w=g(),w.column+=b,w.offset+=b,n.warning.call(n.warningContext||void 0,vB[S],w,S))}function v(){a&&(r.push(a),n.text&&n.text.call(n.textContext||void 0,a,{start:d,end:g()}),a="")}}function bB(t){return t>=55296&&t<=57343||t>1114111}function yB(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const M9=" ";function Q9(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:i,mdxJsxFlowTagClosingMarker:r,mdxJsxFlowTagAttribute:h,mdxJsxFlowTagExpressionAttribute:d,mdxJsxFlowTagAttributeValueLiteral:t,mdxJsxFlowTagAttributeValueExpression:t,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:i,mdxJsxTextTagClosingMarker:r,mdxJsxTextTagAttribute:h,mdxJsxTextTagExpressionAttribute:d,mdxJsxTextTagAttributeValueLiteral:t,mdxJsxTextTagAttributeValueExpression:t,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:a,mdxJsxFlowTagNamePrimary:l,mdxJsxFlowTagNameMember:u,mdxJsxFlowTagNameLocal:c,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:g,mdxJsxFlowTagAttributeNameLocal:m,mdxJsxFlowTagAttributeValueLiteral:v,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:S,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:b,mdxJsxFlowTag:w,mdxJsxTextTagClosingMarker:a,mdxJsxTextTagNamePrimary:l,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:c,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:g,mdxJsxTextTagAttributeNameLocal:m,mdxJsxTextTagAttributeValueLiteral:v,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:S,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:b,mdxJsxTextTag:w}};function t(){this.buffer()}function e(E){return{line:E.line,column:E.column,offset:E.offset}}function n(E){this.config.enter.data.call(this,E),this.config.exit.data.call(this,E)}function i(E){const A={name:void 0,attributes:[],close:!1,selfClosing:!1,start:E.start,end:E.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=A,this.buffer()}function r(E){if(this.data.mdxJsxTagStack.length===0)throw new Hn("Unexpected closing slash `/` in tag, expected an open tag first",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function s(E){if(this.data.mdxJsxTag.close)throw new Hn("Unexpected attribute in closing tag, expected the end of the tag",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-attribute")}function o(E){if(this.data.mdxJsxTag.close)throw new Hn("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function a(){const E=this.data.mdxJsxTag;E.close=!0}function l(E){const A=this.data.mdxJsxTag;A.name=this.sliceSerialize(E)}function u(E){const A=this.data.mdxJsxTag;A.name+="."+this.sliceSerialize(E)}function c(E){const A=this.data.mdxJsxTag;A.name+=":"+this.sliceSerialize(E)}function h(E){const A=this.data.mdxJsxTag;s.call(this,E),A.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:e(E.start),end:void 0}})}function d(E){const A=this.data.mdxJsxTag;s.call(this,E),A.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:e(E.start),end:void 0}}),this.buffer()}function p(E){const A=this.data.mdxJsxTag,I=A.attributes[A.attributes.length-1];zi(I.type==="mdxJsxExpressionAttribute");const Z=E.estree;I.value=this.resume(),zi(I.position!==void 0),I.position.end=e(E.end),Z&&(I.data={estree:Z})}function g(E){const A=this.data.mdxJsxTag,I=A.attributes[A.attributes.length-1];zi(I.type==="mdxJsxAttribute"),I.name=this.sliceSerialize(E),zi(I.position!==void 0),I.position.end=e(E.end)}function m(E){const A=this.data.mdxJsxTag,I=A.attributes[A.attributes.length-1];zi(I.type==="mdxJsxAttribute"),I.name+=":"+this.sliceSerialize(E),zi(I.position!==void 0),I.position.end=e(E.end)}function v(E){const A=this.data.mdxJsxTag,I=A.attributes[A.attributes.length-1];I.value=y0(this.resume(),{nonTerminated:!1}),zi(I.position!==void 0),I.position.end=e(E.end)}function S(E){const A=this.data.mdxJsxTag,I=A.attributes[A.attributes.length-1];zi(I.type==="mdxJsxAttribute");const Z={type:"mdxJsxAttributeValueExpression",value:this.resume()},U=E.estree;U&&(Z.data={estree:U}),I.value=Z,zi(I.position!==void 0),I.position.end=e(E.end)}function b(){const E=this.data.mdxJsxTag;E.selfClosing=!0}function w(E){const A=this.data.mdxJsxTag,I=this.data.mdxJsxTagStack,Z=I[I.length-1];if(A.close&&Z.name!==A.name)throw new Hn("Unexpected closing tag `"+x(A)+"`, expected corresponding closing tag for `"+x(Z)+"` ("+Qd(Z)+")",{start:E.start,end:E.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),A.close?I.pop():this.enter({type:E.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:A.name||null,attributes:A.attributes,children:[]},E,k),A.selfClosing||A.close?this.exit(E,C):I.push(A)}function k(E,A){const I=this.data.mdxJsxTagStack,Z=I[I.length-1],U=E?" before the end of `"+E.type+"`":"",W=E?{start:E.start,end:E.end}:void 0;throw new Hn("Expected a closing tag for `"+x(Z)+"` ("+Qd({start:A.start,end:A.end})+")"+U,W,"mdast-util-mdx-jsx:end-tag-mismatch")}function C(E,A){const I=this.data.mdxJsxTag;throw new Hn("Expected the closing tag `"+x(I)+"` either after the end of `"+A.type+"` ("+Qd(A.end)+") or another opening tag after the start of `"+A.type+"` ("+Qd(A.start)+")",{start:E.start,end:E.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function x(E){return"<"+(E.close?"/":"")+(E.name||"")+">"}}function D9(t){const e={},n=e.quote||'"',i=e.quoteSmart||!1,r=e.tightSelfClosing||!1,s=e.printWidth||Number.POSITIVE_INFINITY,o=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return a.peek=wB,{handlers:{mdxJsxFlowElement:a,mdxJsxTextElement:a},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function a(l,u,c,h){const d=l.type==="mdxJsxFlowElement",p=l.name?!l.children||l.children.length===0:!1,g=V9(c),m=F9(g),v=c.createTracker(h),S=c.createTracker(h),b=[],w=(d?m:"")+"<"+(l.name||""),k=c.enter(l.type);if(v.move(w),S.move(w),l.attributes&&l.attributes.length>0){if(!l.name)throw new Error("Cannot serialize fragment w/ attributes");let I=-1;for(;++Ihg(W,o)?o:n;ne=j+zP(W,{subset:[j]})+j}U=B+(ne?"=":"")+ne}b.push(U)}}let C=!1;const x=b.join(" ");d&&(/\r?\n|\r/.test(x)||v.current().now.column+x.length+(p?r?2:3:1)>s)&&(C=!0);let E=v,A=w;if(C){E=S;let I=-1;for(;++I"),l.children&&l.children.length>0&&(l.type==="mdxJsxTextElement"?A+=E.move(c.containerPhrasing(l,{...E.current(),before:">",after:"<"})):(E.shift(2),A+=E.move(` +`),A+=E.move(SB(l,c,E.current())),A+=E.move(` +`))),p||(A+=E.move((d?m:"")+"")),k(),A}}function SB(t,e,n){const i=e.indexStack,r=t.children,s=e.createTracker(n),o=F9(V9(e)),a=[];let l=-1;for(i.push(-1);++l-1;){const i=t.stack[n];if(i==="blockquote"||i==="listItem")break;i==="mdxJsxFlowElement"&&e++}return e}function F9(t){return M9.repeat(t)}function wB(){return"<"}var wk=Object.prototype.hasOwnProperty;function Ck(t,e,n){for(n of t.keys())if(xh(n,e))return n}function xh(t,e){var n,i,r;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((i=t.length)===e.length)for(;i--&&xh(t[i],e[i]););return i===-1}if(n===Set){if(t.size!==e.size)return!1;for(i of t)if(r=i,r&&typeof r=="object"&&(r=Ck(e,r),!r)||!e.has(r))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(i of t)if(r=i[0],r&&typeof r=="object"&&(r=Ck(e,r),!r)||!xh(i[1],e.get(r)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((i=t.byteLength)===e.byteLength)for(;i--&&t.getInt8(i)===e.getInt8(i););return i===-1}if(ArrayBuffer.isView(t)){if((i=t.byteLength)===e.byteLength)for(;i--&&t[i]===e[i];);return i===-1}if(!n||typeof t=="object"){i=0;for(n in t)if(wk.call(t,n)&&++i&&!wk.call(e,n)||!(n in e)||!xh(t[n],e[n]))return!1;return Object.keys(e).length===i}}return t!==t&&e!==e}var CB={};let yv,B9,j9,Z9,X9=!0;typeof process<"u"&&({FORCE_COLOR:yv,NODE_DISABLE_COLORS:B9,NO_COLOR:j9,TERM:Z9}=CB||{},X9=process.stdout&&process.stdout.isTTY);const vt={enabled:!B9&&j9==null&&Z9!=="dumb"&&(yv!=null&&yv!=="0"||X9),reset:tn(0,0),bold:tn(1,22),dim:tn(2,22),italic:tn(3,23),underline:tn(4,24),inverse:tn(7,27),hidden:tn(8,28),strikethrough:tn(9,29),black:tn(30,39),red:tn(31,39),green:tn(32,39),yellow:tn(33,39),blue:tn(34,39),magenta:tn(35,39),cyan:tn(36,39),white:tn(37,39),gray:tn(90,39),grey:tn(90,39),bgBlack:tn(40,49),bgRed:tn(41,49),bgGreen:tn(42,49),bgYellow:tn(43,49),bgBlue:tn(44,49),bgMagenta:tn(45,49),bgCyan:tn(46,49),bgWhite:tn(47,49)};function _k(t,e){let n=0,i,r="",s="";for(;n2&&arguments[2]!==void 0?arguments[2]:{},s=r.callback;typeof r=="function"&&(s=r,r={}),this.options=r;var o=this;function a(k){return s?(setTimeout(function(){s(void 0,k)},0),!0):k}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e)),n=this.removeEmpty(this.tokenize(n));var l=n.length,u=e.length,c=1,h=l+u;r.maxEditLength&&(h=Math.min(h,r.maxEditLength));var d=(i=r.timeout)!==null&&i!==void 0?i:1/0,p=Date.now()+d,g=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(g[0],n,e,0);if(g[0].oldPos+1>=u&&m+1>=l)return a([{value:this.join(n),count:n.length}]);var v=-1/0,S=1/0;function b(){for(var k=Math.max(v,-c);k<=Math.min(S,c);k+=2){var C=void 0,x=g[k-1],E=g[k+1];x&&(g[k-1]=void 0);var A=!1;if(E){var I=E.oldPos-k;A=E&&0<=I&&I=u&&m+1>=l)return a(kB(o,C.lastComponent,n,e,o.useLongestToken));g[k]=C,C.oldPos+1>=u&&(S=Math.min(S,k-1)),m+1>=l&&(v=Math.max(v,k+1))}c++}if(s)(function k(){setTimeout(function(){if(c>h||Date.now()>p)return s();b()||k()},0)})();else for(;c<=h&&Date.now()<=p;){var w=b();if(w)return w}},addToPath:function(e,n,i,r){var s=e.lastComponent;return s&&s.added===n&&s.removed===i?{oldPos:e.oldPos+r,lastComponent:{count:s.count+1,added:n,removed:i,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:n,removed:i,previousComponent:s}}},extractCommon:function(e,n,i,r){for(var s=n.length,o=i.length,a=e.oldPos,l=a-r,u=0;l+1m.length?S:m}),h.value=t.join(d)}else h.value=t.join(n.slice(u,u+h.count));u+=h.count,h.added||(c+=h.count)}}var g=s[l-1];return l>1&&typeof g.value=="string"&&(g.added||g.removed)&&t.equals("",g.value)&&(s[l-2].value+=g.value,s.pop()),s}var kk=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Ek=/\S/,z9=new pa;z9.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!Ek.test(t)&&!Ek.test(e)};z9.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n"u"?n:o}:i;return typeof t=="string"?t:JSON.stringify(Sv(t,null,null,r),r," ")};jh.equals=function(t,e){return pa.prototype.equals.call(jh,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function Sv(t,e,n,i,r){e=e||[],n=n||[],i&&(t=i(r,t));var s;for(s=0;s1?s(h):(i.consume(h),l++,c);if(l<2)return s(h);const p=i.exit(Vc),g=l2(h);return p._open=!g||g===Tk.attentionSideAfter&&!!d,p._close=!d||d===Tk.attentionSideAfter&&!!g,r(h)}}}const NB={}.hasOwnProperty,MB=Symbol("continue"),l1=Symbol("exit"),QB=Symbol("skip");function DB(t,e){let n,i;typeof e=="function"?n=e:e&&typeof e=="object"&&(e.enter&&(n=e.enter),e.leave&&(i=e.leave)),r(t,void 0,void 0,[])();function r(s,o,a,l){return u1(s)&&(u.displayName="node ("+s.type+")"),u;function u(){const c=n?Pk(n(s,o,a,l)):[];if(c[0]===l1)return c;if(c[0]!==QB){let h;for(h in s)if(NB.call(s,h)&&s[h]&&typeof s[h]=="object"&&h!=="data"&&h!=="position"){const d=l.concat(s),p=s[h];if(Array.isArray(p)){const g=p;let m=0;for(;m>-1&&m0)}function U9(t,e){const n=e.prefix||"",i=e.suffix||"",r=Object.assign({},e.acornOptions),s=[],o=[],a=r.onComment,l=r.onToken;let u=!1,c,h;const d=Object.assign({},r,{onComment:s,preserveParens:!0});l&&(d.onToken=o);const p=VB(t,e.tokenTypes),g=p.value,m=n+g+i,v=e.expression&&Ik(g);if(v&&!e.allowEmpty)throw new Hn("Unexpected empty expression",{place:b(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{c=e.expression&&!v?e.acorn.parseExpressionAt(m,0,d):e.acorn.parse(m,d)}catch(w){const k=w,C=b(k.pos);k.message=String(k.message).replace(/ \(\d+:\d+\)$/,""),k.pos=C.offset,k.loc={line:C.line,column:C.column-1},h=k,u=k.raisedAt>=n.length+g.length||k.message==="Unterminated comment"}if(c&&e.expression&&!v)if(Ik(m.slice(c.end,m.length-i.length)))c={type:"Program",start:0,end:n.length+g.length,body:[{type:"ExpressionStatement",expression:c,start:0,end:n.length+g.length}],sourceType:"module",comments:[]};else{const w=b(c.end),k=new Error("Unexpected content after expression");k.pos=w.offset,k.loc={line:w.line,column:w.column-1},h=k,c=void 0}if(c){if(c.comments=s,DB(c,function(w,k,C,x){let E=x[x.length-1],A=k;w.type==="ParenthesizedExpression"&&E&&A&&(typeof C=="number"&&(E=E[A],A=C),E[A]=w.expression),S(w)}),Array.isArray(a))a.push(...s);else if(typeof a=="function")for(const w of s)a(w.type==="Block",w.value,w.start,w.end,w.loc.start,w.loc.end);for(const w of o)w.end<=n.length||w.start-n.length>=g.length||(S(w),Array.isArray(l)?l.push(w):l(w))}return{estree:c,error:h,swallow:u};function S(w){const k=b(w.start),C=b(w.end);w.start=k.offset,w.end=C.offset,w.loc={start:{line:k.line,column:k.column-1,offset:k.offset},end:{line:C.line,column:C.column-1,offset:C.offset}},w.range=[w.start,w.end]}function b(w){let k=w-n.length;k<0?k=0:k>g.length&&(k=g.length);let C=FB(p.stops,k);return C||(C={line:e.start.line,column:e.start.column,offset:e.start.offset}),C}}function Ik(t){return/^\s*$/.test(t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function VB(t,e){const n={value:"",stops:[]};let i=-1;for(;++i0&&o[0]===-1;)o.shift();const a=BB(o);n.stops.push([n.value.length,r[1].start]),n.value+=a,n.stops.push([n.value.length,r[1].end])}}}return n}function FB(t,e){let n=0;for(;n-1?t:void 0}const jB=2,Yl="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",ZB="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",XB="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",Rk="#unexpected-type-in-code-expected-an-object-spread-spread",zB="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",WB="#could-not-parse-expression-with-acorn";function Mg(t,e,n,i,r,s,o,a,l,u,c){const h=this,d=this.events.length+3;let p=0,g,m;return v;function v(k){return t.enter(n),t.enter(i),t.consume(k),t.exit(i),g=h.now(),S}function S(k){if(k===null){if(m)throw m;const C=new Hn("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:h.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw C.url=Yl+ZB,C}if(Yt(k))return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),w;if(k===125&&p===0){const C=s?UB.call(h,s,o,r,d,g,u||!1,l||!1):{type:"ok",estree:void 0};if(C.type==="ok"){t.enter(i),t.consume(k),t.exit(i);const x=t.exit(n);return a&&C.estree&&Object.assign(x,{estree:C.estree}),e}return m=C.message,t.enter(r),t.consume(k),b}return t.enter(r),b(k)}function b(k){return k===125&&p===0||k===null||Yt(k)?(t.exit(r),S(k)):(k===123&&!s?p+=1:k===125&&(p-=1),t.consume(k),b)}function w(k){const C=h.now();if(C.line!==g.line&&!c&&h.parser.lazy[C.line]){const x=new Hn("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:h.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw x.url=Yl+XB,x}return dr(k)?pr(t,S,"linePrefix",jB+1)(k):S(k)}}function UB(t,e,n,i,r,s,o){const a=U9(this.events.slice(i),{acorn:t,tokenTypes:[n],acornOptions:e,start:r,expression:!0,allowEmpty:s,prefix:o?"({":"",suffix:o?"})":""}),l=a.estree;if(o&&l){const u=l.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const c=Xp(u),h=new Hn("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=Yl+Rk,h}if(u.expression.properties[1]){const c=Xp(u.expression.properties[1]),h=new Hn("Unexpected extra content in spread: only a single spread is supported",{place:c.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw h.url=Yl+zB,h}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const c=Xp(u.expression.properties[0]),h=new Hn("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=Yl+Rk,h}}if(a.error){const u=new Hn("Could not parse expression with acorn",{cause:a.error,place:{line:a.error.loc.line,column:a.error.loc.column+1,offset:a.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=Yl+WB,{type:"nok",message:u}}return{type:"ok",estree:l}}const Lk="https://github.com/micromark/micromark-extension-mdx-jsx";function q9(t,e,n,i,r,s,o,a,l,u,c,h,d,p,g,m,v,S,b,w,k,C,x,E,A,I,Z,U,W,B,ne,j){const oe=this;let pe,re;return ke;function ke(D){return t.enter(a),t.enter(l),t.consume(D),t.exit(l),Ee}function Ee(D){return _i(D)?n(D):(pe=De,st(D))}function De(D){if(D===47)return t.enter(u),t.consume(D),t.exit(u),pe=Ie,st;if(D===62)return wn(D);if(D!==null&&D>=0&&Pr(D))return t.enter(h),t.enter(d),t.consume(D),Ue;_t(D,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(D===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function Ie(D){if(D===62)return wn(D);if(D!==null&&D>=0&&Pr(D))return t.enter(h),t.enter(d),t.consume(D),Ue;_t(D,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(D===42||D===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function Ue(D){if(D!==null&&D>=0&&Mc(D,{jsx:!0}))return t.consume(D),Ue;if(D===46||D===47||D===58||D===62||D===123||_i(D)||wo(D))return t.exit(d),pe=qe,st(D);_t(D,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(D===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function qe(D){if(D===46)return t.enter(p),t.consume(D),t.exit(p),pe=Ye,st;if(D===58)return t.enter(m),t.consume(D),t.exit(m),pe=xe,st;if(D===47||D===62||D===123||D!==null&&D>=0&&Pr(D))return t.exit(h),Le(D);_t(D,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Ye(D){if(D!==null&&D>=0&&Pr(D))return t.enter(g),t.consume(D),Ge;_t(D,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Ge(D){if(D!==null&&D>=0&&Mc(D,{jsx:!0}))return t.consume(D),Ge;if(D===46||D===47||D===62||D===123||_i(D)||wo(D))return t.exit(g),pe=he,st(D);_t(D,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(D===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function he(D){if(D===46)return t.enter(p),t.consume(D),t.exit(p),pe=Ye,st;if(D===47||D===62||D===123||D!==null&&D>=0&&Pr(D))return t.exit(h),Le(D);_t(D,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function xe(D){if(D!==null&&D>=0&&Pr(D))return t.enter(v),t.consume(D),Ce;_t(D,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(D===43||D!==null&&D>46&&D<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function Ce(D){if(D!==null&&D>=0&&Mc(D,{jsx:!0}))return t.consume(D),Ce;if(D===47||D===62||D===123||_i(D)||wo(D))return t.exit(v),pe=$e,st(D);_t(D,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function $e(D){if(D===47||D===62||D===123||D!==null&&D>=0&&Pr(D))return t.exit(h),Le(D);_t(D,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Le(D){if(D===47)return t.enter(c),t.consume(D),t.exit(c),pe=Wn,st;if(D===62)return wn(D);if(D===123)return Mg.call(oe,t,Ke,S,b,w,i,r,s,!0,!1,o)(D);if(D!==null&&D>=0&&Pr(D))return t.enter(k),t.enter(C),t.enter(x),t.consume(D),lt;_t(D,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Ke(D){return pe=Le,st(D)}function lt(D){if(D!==null&&D>=0&&Mc(D,{jsx:!0}))return t.consume(D),lt;if(D===47||D===58||D===61||D===62||D===123||_i(D)||wo(D))return t.exit(x),pe=St,st(D);_t(D,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function St(D){if(D===58)return t.enter(E),t.consume(D),t.exit(E),pe=zt,st;if(D===61)return t.exit(C),t.enter(I),t.consume(D),t.exit(I),pe=Sn,st;if(D===47||D===62||D===123||_i(D)||wo(D)||D!==null&&D>=0&&Pr(D))return t.exit(C),t.exit(k),pe=Le,st(D);_t(D,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function zt(D){if(D!==null&&D>=0&&Pr(D))return t.enter(A),t.consume(D),Ft;_t(D,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ft(D){if(D!==null&&D>=0&&Mc(D,{jsx:!0}))return t.consume(D),Ft;if(D===47||D===61||D===62||D===123||_i(D)||wo(D))return t.exit(A),t.exit(C),pe=Rt,st(D);_t(D,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Rt(D){if(D===61)return t.enter(I),t.consume(D),t.exit(I),pe=Sn,st;if(D===47||D===62||D===123||D!==null&&D>=0&&Pr(D))return t.exit(k),Le(D);_t(D,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Sn(D){if(D===34||D===39)return t.enter(Z),t.enter(U),t.consume(D),t.exit(U),re=D,Ln;if(D===123)return Mg.call(oe,t,Wt,B,ne,j,i,r,s,!1,!1,o)(D);_t(D,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(D===60?" (note: to use an element or fragment as a prop value in MDX, use `{}`)":""))}function Wt(D){return t.exit(k),pe=Le,st(D)}function Ln(D){return D===null&&_t(D,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(re)+"`"),D===re?(t.enter(U),t.consume(D),t.exit(U),t.exit(Z),t.exit(k),re=void 0,pe=Le,st):Yt(D)?(pe=Ln,st(D)):(t.enter(W),cn(D))}function cn(D){return D===null||D===re||Yt(D)?(t.exit(W),Ln(D)):(t.consume(D),cn)}function Wn(D){if(D===62)return wn(D);_t(D,"after self-closing slash","`>` to end the tag"+(D===42||D===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function wn(D){return t.enter(l),t.consume(D),t.exit(l),t.exit(a),e}function st(D){return Yt(D)?(t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),yi):dr(D)||wo(D)?(t.enter("esWhitespace"),en(D)):pe(D)}function en(D){return Yt(D)?(t.exit("esWhitespace"),st(D)):dr(D)||wo(D)?(t.consume(D),en):(t.exit("esWhitespace"),pe(D))}function yi(D){if(!o&&oe.parser.lazy[oe.now().line]){const Et=new Hn("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",oe.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw Et.url=Lk+"#unexpected-lazy-line-in-container-expected-line-to-be",Et}return st(D)}function _t(D,Et,O){const L=new Hn("Unexpected "+(D===null?"end of file":"character `"+(D===96?"` ` `":String.fromCodePoint(D))+"` ("+qB(D)+")")+" "+Et+", expected "+O,oe.now(),"micromark-extension-mdx-jsx:unexpected-"+(D===null?"eof":"character"));throw L.url=Lk+(D===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),L}}function qB(t){return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function HB(t,e){return{name:"mdxJsxTextTag",tokenize:n};function n(i,r,s){return q9.call(this,i,r,s,t,e.acornOptions,e.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function YB(t,e){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(i,r,s){const o=this;return a;function a(h){return l(h)}function l(h){return q9.call(o,i,u,s,t,e.acornOptions,e.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(h)}function u(h){return dr(h)?pr(i,c,"whitespace")(h):c(h)}function c(h){const d=o.parser.constructs.flow[123],p=Array.isArray(d)?d:d?[d]:[];let g;for(const m of p)if(m.name==="mdxFlowExpression"){g=m;break}return h===60?a(h):h===123&&g?i.attempt(g,c,s)(h):h===null||Yt(h)?r(h):s(h)}}}function H9(t){const e=t||{},n=e.acorn;let i;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");i=Object.assign({ecmaVersion:2024,sourceType:"module"},e.acornOptions,{locations:!0})}else if(e.acornOptions||e.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:YB(n||void 0,{acornOptions:i,addResult:e.addResult||void 0})},text:{60:HB(n||void 0,{acornOptions:i,addResult:e.addResult||void 0})}}}function Y9(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const GB=["mdxJsxTextElement","mdxJsxFlowElement"];function iS(t){return GB.includes(t.type)&&rS.includes(t.name)}const rS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function KB(t,e){const n=Nk(t),i=Nk(e),r={...n,...i};return JB(r)}function Nk(t){const e={};return t.split(";").filter(i=>i.trim()!=="").forEach(i=>{const[r,s]=i.split(":").map(o=>o.trim());e[r]=s}),e}function JB(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}function ej(t){return t.children instanceof Array}function S0({root:t,visitors:e,jsxComponentDescriptors:n,jsxIsAvailable:i,addImportStatements:r=!0}){let s=null;const o=new Set,a=new Map;e=e.sort((S,b)=>(b.priority??0)-(S.priority??0)),h(t,null);function l(S,b){o.add(S),b&&a.set(S,{...b})}function u(S,b){if(s===null)return s=b,s;if(!ej(S))throw new Error("Attempting to append children to a non-parent");const w=S.children,k=w.at(-1);if(k){const C=e.find(x=>{var E;return(E=x.shouldJoin)==null?void 0:E.call(x,k,b)});if(C){const x=C.join(k,b);return w.splice(w.length-1,1,x),x}}return w.push(b),b}function c(S,b){S.getChildren().forEach(w=>{h(w,b)})}function h(S,b,w=null){var k;const C=e.find((x,E)=>{var A;return w?.has(E)?!1:(A=x.testLexicalNode)==null?void 0:A.call(x,S)});if(!C)throw new Error(`no lexical visitor found for ${S.getType()}`,{cause:S});(k=C.visitLexicalNode)==null||k.call(C,{lexicalNode:S,mdastParent:b,actions:{addAndStepInto(x,E={},A=!0){const I={type:x,...E,...A?{children:[]}:{}};u(b,I),te(S)&&A&&c(S,I)},appendToParent:u,visitChildren:c,visit:h,registerReferredComponent:l,nextVisitor(){h(S,b,(w??new Set).add(e.indexOf(C)))}}})}if(s===null)throw new Error("traversal ended with no root element");const d=new Map,p=new Map;for(const S of o){const b=n.find(w=>w.name===S)??a.get(S)??n.find(w=>w.name==="*");if(!b)throw new Error(`Component ${S} is used but not imported`);if(b.source)if(b.defaultExport)p.set(S,b.source);else{const{source:w}=b,k=d.get(w);k?k.push(S):d.set(w,[S])}}if(!r){for(const[S,b]of d.entries()){const w=b.filter(k=>a.has(k));w.length>0?d.set(S,w):d.delete(S)}for(const S of p.keys())a.has(S)||p.delete(S)}const g=Array.from(d).map(([S,b])=>({type:"mdxjsEsm",value:`import { ${b.join(", ")} } from '${S}'`}));g.push(...Array.from(p).map(([S,b])=>({type:"mdxjsEsm",value:`import ${S} from '${b}'`})));const m=s,v=m.children.find(S=>S.type==="yaml");return v?m.children.splice(m.children.indexOf(v)+1,0,...g):m.children.unshift(...g),zp(m,[]),G9(m),i||K9(m),m}function G9(t){if("children"in t&&t.children.length>0){if(iS(t)&&t.children.length===1){const e=t.children[0];e.type==="mdxJsxTextElement"&&e.name==="span"&&(e.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const i=t.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===n.name);if(i)if(n.name==="className"){const r=new Set([...i.value.split(" "),...n.value.split(" ")]);i.value=Array.from(r).join(" ")}else n.name==="style"&&(i.value=KB(i.value,n.value));else t.attributes.push(n)}}),t.children=e.children)}t.children.forEach(e=>{G9(e)})}}function K9(t){if(Object.hasOwn(t,"children")){const e=t,n=[];e.children.forEach(i=>{i.type==="mdxJsxTextElement"&&i.name==="u"?n.push({type:"html",value:""},...i.children,{type:"html",value:""}):(n.push(i),K9(i))}),e.children=n}}const Mk=/\s+$/,Qk=/^\s+/;function zp(t,e){if(t.type==="strong"||t.type==="emphasis"){const n=t.children.at(-1);if(n?.type==="text"){const r=Mk.exec(n.value);if(r){n.value=n.value.replace(Mk,"");const s=e.at(-1);s&&(s.children.splice(s.children.indexOf(t)+1,0,{type:"text",value:r[0]}),zp(s,e.slice(0,-1)))}}const i=t.children.at(0);if(i?.type==="text"){const r=Qk.exec(i.value);if(r){i.value=i.value.replace(Qk,"");const s=e.at(-1);s&&(s.children.splice(s.children.indexOf(t),0,{type:"text",value:r[0]}),zp(s,e.slice(0,-1)))}}}if("children"in t&&t.children.length>0){const n=t;n.children.forEach(i=>{zp(i,[...e,n])})}}function sS({root:t,toMarkdownOptions:e,toMarkdownExtensions:n,visitors:i,jsxComponentDescriptors:r,jsxIsAvailable:s}){return UP(S0({root:t,visitors:i,jsxComponentDescriptors:r,jsxIsAvailable:s}),{extensions:n,...e})+` +`}function Fc(t){return t.children instanceof Array}class Qg extends Error{constructor(e,n){super(e),this.name="MarkdownParseError",this.cause=n}}class Dg extends Error{constructor(e){super(e),this.name="UnrecognizedMarkdownConstructError"}}function tj(t){const e=new Map;return t.type!=="root"?{importDeclarations:{}}:(t.children.filter(i=>i.type==="mdxjsEsm").filter(i=>i.value.startsWith("import ")).forEach(i=>{var r,s;(((s=(r=i.data)==null?void 0:r.estree)==null?void 0:s.body)??[]).forEach(o=>{o.type==="ImportDeclaration"&&o.specifiers.forEach(a=>{e.set(a.local.name,{source:`${o.source.value}`,defaultExport:a.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(e.entries())})}function J9({root:t,markdown:e,visitors:n,syntaxExtensions:i,mdastExtensions:r,...s}){var o;let a;try{a=eD(e,{extensions:i,mdastExtensions:r})}catch(l){throw l instanceof Error?new Qg(`Error parsing markdown: ${l.message}`,l):new Qg(`Error parsing markdown: ${l}`,l)}a.children.length===0&&a.children.push({type:"paragraph",children:[]}),((o=a.children.at(-1))==null?void 0:o.type)!=="paragraph"&&a.children.push({type:"paragraph",children:[]}),w0({root:t,mdastRoot:a,visitors:n,...s})}function w0({root:t,mdastRoot:e,visitors:n,...i}){const r=new WeakMap,s=new WeakMap,o=tj(e);n=n.sort((u,c)=>(c.priority??0)-(u.priority??0));function a(u,c){if(!Fc(u))throw new Error("Attempting to visit children of a non-parent");u.children.forEach(h=>{l(h,c,u)})}function l(u,c,h,d=null){const p=n.find((g,m)=>d?.has(m)?!1:typeof g.testNode=="string"?g.testNode===u.type:g.testNode(u,i));if(!p)try{throw new Dg(`Unsupported markdown syntax: ${UP(u)}`)}catch{throw new Dg(`Parsing of the following markdown structure failed: ${JSON.stringify({type:u.type,name:"name"in u?u.name:"N/A"})}`)}p.visitNode({mdastNode:u,lexicalParent:c,mdastParent:h,descriptors:i,metaData:o,actions:{visitChildren:a,nextVisitor(){l(u,c,h,(d??new Set).add(n.indexOf(p)))},addAndStepInto(g){c.append(g),Fc(u)&&a(u,g)},addFormatting(g,m){m||Fc(u)&&(m=u),m&&r.set(m,g|(r.get(h)??0))},removeFormatting(g,m){m||Fc(u)&&(m=u),m&&r.set(m,g^(r.get(h)??0))},getParentFormatting(){return r.get(h)??0},addStyle(g,m){m||Fc(u)&&(m=u),m&&s.set(m,g)},getParentStyle(){return s.get(h)??""}}})}l(e,t,null)}var nj=Object.defineProperty,ij=(t,e,n)=>e in t?nj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h1=(t,e,n)=>(ij(t,typeof e!="symbol"?e+"":e,n),n);const Cv="generic-html";class hc extends Oi{constructor(e,n,i,r){super(r),h1(this,"__tag"),h1(this,"__nodeType"),h1(this,"__attributes"),this.__tag=e,this.__nodeType=n,this.__attributes=i}static getType(){return Cv}static clone(e){return new hc(e.__tag,e.__nodeType,e.__attributes,e.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(e){const n=this.getWritable();n.__attributes=e}getStyle(){var e;return(e=this.__attributes.find(n=>n.name==="style"))==null?void 0:e.value}createDOM(){const e=this.__tag,n=document.createElement(e);return this.__attributes.forEach(i=>{n.setAttribute(i.name,i.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(e){const{element:n}=super.exportDOM(e);return{element:n}}static importJSON(e){const n=oS(e.tag,e.mdxType,e.attributes);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:Cv,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function oS(t,e,n){return vi(new hc(t,e,n))}function eI(t){return t instanceof hc}const rj={testLexicalNode:eI,visitLexicalNode({actions:t,lexicalNode:e}){t.addAndStepInto("mdxJsxTextElement",{name:e.getTag(),type:e.getNodeType(),attributes:e.getAttributes()})},priority:-100},sj={testLexicalNode:vr,visitLexicalNode:({mdastParent:t,actions:e})=>{e.appendToParent(t,{type:"text",value:` +`})}},oj={testLexicalNode:jf,visitLexicalNode:({actions:t})=>{t.addAndStepInto("paragraph")}},aj={testLexicalNode:vn,visitLexicalNode:({actions:t})=>{t.addAndStepInto("root")}},lj=0,iu=1,ru=2,su=4,ou=8,Kf=16,au=32,lu=64,uu=128;function Dk(t){return t.type==="text"}const uj=["u","span","sub","sup"],cj={shouldJoin:(t,e)=>{if(["text","emphasis","strong","highlight"].includes(t.type))return t.type===e.type;if(t.type==="mdxJsxTextElement"&&e.type==="mdxJsxTextElement"&&uj.includes(e.name)){const n=e;return t.name===n.name&&JSON.stringify(t.attributes)===JSON.stringify(n.attributes)}return!1},join(t,e){return Dk(t)&&Dk(e)?{type:"text",value:t.value+e.value}:{...t,children:[...t.children,...e.children]}},testLexicalNode:ye,visitLexicalNode:({lexicalNode:t,mdastParent:e,actions:n})=>{const i=t.getPreviousSibling(),r=ye(i)?i.getFormat():0,s=t.getTextContent(),o=t.getFormat(),a=t.getStyle();let l=e;if(a&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:a}]})),r&o&ou&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),r&o&lu&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),r&o&au&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),r&o&ru&&(l=n.appendToParent(l,{type:"emphasis",children:[]})),r&o&iu&&(l=n.appendToParent(l,{type:"strong",children:[]})),r&o&su&&(l=n.appendToParent(l,{type:"delete",children:[]})),r&o&uu&&(l=n.appendToParent(l,{type:"highlight",children:[]})),o&ou&&!(r&ou)&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),o&lu&&!(r&lu)&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),o&au&&!(r&au)&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),o&ru&&!(r&ru)&&(l=n.appendToParent(l,{type:"emphasis",children:[]})),o&iu&&!(r&iu)&&(l=n.appendToParent(l,{type:"strong",children:[]})),o&su&&!(r&su)&&(l=n.appendToParent(l,{type:"delete",children:[]})),o&uu&&!(r&uu)&&(l=n.appendToParent(l,{type:"highlight",children:[]})),o&Kf){n.appendToParent(l,{type:"inlineCode",value:s});return}n.appendToParent(l,{type:"text",value:s})}},hj={testNode:"break",visitNode:function({lexicalParent:t}){t.append(Ni())}};function Ud(t,e){return[{testNode:n=>n.type==="mdxJsxTextElement"&&n.name===t,visitNode({actions:n,mdastNode:i,lexicalParent:r}){n.addFormatting(e),n.visitChildren(i,r)}},{testNode:n=>n.type==="html"&&n.value===`<${t}>`,visitNode({actions:n,mdastParent:i}){n.addFormatting(e,i)}},{testNode:n=>n.type==="html"&&n.value===``,visitNode({actions:n,mdastParent:i}){n.removeFormatting(e,i)}}]}const fj={testNode:"delete",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(su),e.visitChildren(t,n)}},dj={testNode:"highlight",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(uu),e.visitChildren(t,n)}},pj={testNode:"inlineCode",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(It(t.value).setFormat(e.getParentFormatting()|Kf))}},gj={testNode:"emphasis",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(ru),e.visitChildren(t,n)}},mj={testNode:"strong",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(iu),e.visitChildren(t,n)}},Oj=[gj,mj,...Ud("u",ou),...Ud("code",Kf),pj,fj,dj,...Ud("sup",lu),...Ud("sub",au)],xj={testNode:iS,visitNode:function({mdastNode:t,actions:e,lexicalParent:n}){t.name==="span"&&t.attributes.length===1&&t.attributes[0].type==="mdxJsxAttribute"&&t.attributes[0].name==="style"?(e.addStyle(t.attributes[0].value,t),e.visitChildren(t,n)):e.addAndStepInto(oS(t.name,t.type,t.attributes))},priority:-100},vj=["listitem","admonition"],bj={testNode:"paragraph",visitNode:function({mdastNode:t,mdastParent:e,lexicalParent:n,actions:i}){const r=n.getType();if(vj.includes(r)){const s=e?.children.indexOf(t)??-1,o=s>0?e?.children.at(s-1):void 0;r==="listitem"&&o?.type==="paragraph"&&n.append(Ni(),Ni()),i.visitChildren(t,n)}else i.addAndStepInto(yt())}},yj={testNode:"root",visitNode({actions:t,mdastNode:e,lexicalParent:n}){t.visitChildren(e,n)}},Sj={testNode:"text",visitNode({mdastNode:t,actions:e}){const n=It(t.value);n.setFormat(e.getParentFormatting());const i=e.getParentStyle();i!==""&&n.setStyle(i),e.addAndStepInto(n)}},tI=()=>_.createElement(E9,{externalHistoryState:Pt(uI)});function wj(t){return{canContainEols:["comment"],enter:{comment(e){this.buffer()}},exit:{comment(e){this.resume()}}}}const Vk=(t,e,n)=>{return i;function i(g){return t.enter("comment"),t.consume(g),r}function r(g){return g===ni.exclamationMark?(t.consume(g),s):n(g)}function s(g){return g===ni.dash?(t.consume(g),o):n(g)}function o(g){return g===ni.dash?(t.consume(g),a):n(g)}function a(g){return g===ni.greaterThan?n(g):Yt(g)?c(g):(t.enter(Zs.data),g===ni.dash?(t.consume(g),l):u(g))}function l(g){return g===ni.greaterThan?n(g):u(g)}function u(g){return g===ni.eof?n(g):g===ni.dash?(t.consume(g),d):Yt(g)?(t.exit(Zs.data),c(g)):(t.consume(g),u)}function c(g){return t.enter(Zs.lineEnding),t.consume(g),t.exit(Zs.lineEnding),pr(t,h,Zs.linePrefix)}function h(g){return Yt(g)?c(g):(t.enter(Zs.data),u(g))}function d(g){return g===ni.dash?(t.consume(g),p):u(g)}function p(g){return g===ni.greaterThan?(t.exit(Zs.data),t.enter("commentEnd"),t.consume(g),t.exit("commentEnd"),t.exit("comment"),e(g)):g===ni.dash?(t.consume(g),p):u(g)}},Cj={flow:{60:{tokenize:Vk,concrete:!0}},text:{60:{tokenize:Vk}}},_j="_bold_6j9u9_10",kj="_italic_6j9u9_14",Ej="_underline_6j9u9_18",Tj="_strikethrough_6j9u9_34",Aj="_underlineStrikethrough_6j9u9_38",Pj="_subscript_6j9u9_42",Ij="_superscript_6j9u9_47",$j="_code_6j9u9_52",Rj="_quote_6j9u9_59",Lj="_nestedListItem_6j9u9_66",Nj="_listitem_6j9u9_76",Mj="_listItemChecked_6j9u9_80",Qj="_listItemUnchecked_6j9u9_81",Dj="_admonitionDanger_6j9u9_158",Vj="_admonitionInfo_6j9u9_159",Fj="_admonitionNote_6j9u9_160",Bj="_admonitionTip_6j9u9_161",jj="_admonitionCaution_6j9u9_162",Zj="_mdxExpression_6j9u9_195",Nn={bold:_j,italic:kj,underline:Ej,strikethrough:Tj,underlineStrikethrough:Aj,subscript:Pj,superscript:Ij,code:$j,quote:Rj,nestedListItem:Lj,listitem:Nj,listItemChecked:Mj,listItemUnchecked:Qj,admonitionDanger:Dj,admonitionInfo:Vj,admonitionNote:Fj,admonitionTip:Bj,admonitionCaution:jj,mdxExpression:Zj},Jf={quote:Nn.quote,text:{bold:Nn.bold,italic:Nn.italic,underline:Nn.underline,code:Nn.code,strikethrough:Nn.strikethrough,subscript:Nn.subscript,superscript:Nn.superscript,underlineStrikethrough:Nn.underlineStrikethrough},list:{listitem:Nn.listitem,listitemChecked:Nn.listItemChecked,listitemUnchecked:Nn.listItemUnchecked,nested:{listitem:Nn.nestedListItem}},admonition:{danger:Nn.admonitionDanger,info:Nn.admonitionInfo,note:Nn.admonitionNote,tip:Nn.admonitionTip,caution:Nn.admonitionCaution}},Yo=We("NESTED_EDITOR_UPDATED_COMMAND"),Bi=Pe(null),Gt=Pe(null),Vg=Pe(""),Fg=Pe(!0),In=Pe(!1,t=>{t.sub(t.pipe(In,rn(Bi)),([e,n])=>{n?.setEditable(!e)})}),Bg=Pe(""),_v=Pe(!1),Iu=Pe(!1),ed=Pe(0),$u=Pe(null),jg=mn(t=>{t.link(t.pipe($u,ec(e=>e!==null)),jg)}),td=mn(t=>{t.sub(t.pipe(td,rn(Gt)),([e,n])=>{n?.dispatchCommand(ys,e)})}),el=Pe(null,t=>{t.sub(t.pipe(el,rn(Gt)),([e,n])=>{if(!e||!n)return;const i=e.anchor.getNode();let r=i.getKey()==="root"?i:Zr(i,a=>{const l=a.getParent();return l!==null&&xn(l)});r??(r=i.getTopLevelElementOrThrow());const s=r.getKey();if(n.getElementByKey(s)!==null){const a=Pu(r)?r.getTag():r.getType();t.pub(yS,a)}})}),aS=Pe(""),qr=Pe(""),Zh=Pe(!1),C0=mn(t=>{t.link(qr,C0),t.sub(aS,e=>{t.pubIn({[Zh]:!0,[qr]:e})})}),kv=mn(t=>{t.link(t.pipe(C0,rn(Zg),ec(([,e])=>!e),Xr(([e])=>e)),kv)},!0),nd=Pe([]),id=Pe([]),lS=Pe([]),uS=Pe([]),fc=Pe([]),_0=Pe([]),Xh=Pe({}),dc=Pe(!1),so=Pe([]),tl=Pe([]),vl=Pe([]),Go=Pe(""),es=Pe(null),nI=Pe(null),k0=Pe(null),rr=ei(id),Qi=ei(nd),Ko=ei(lS),Jo=ei(uS),sr=ei(fc),bl=ei(_0),Zg=Pe(!1),E0=mn(t=>{t.sub(t.pipe(E0,rn(qr,Bi,Iu),ec(([e,n])=>e.trim()!==n.trim())),([e,,n,i])=>{t.pub(Zg,!0),n?.update(()=>{ht().clear(),dS(t,ht(),e),i?n.focus():an(null)},{onUpdate:()=>{t.pub(Zg,!1)}})})}),cS=mn(t=>{t.sub(t.pipe(cS,rn(Gt,Iu)),([e,n,i])=>{n?.update(()=>{const r=me();if(r!==null){const s={children:[],append(o){this.children.push(o)},getType(){return r.getNodes()[0].getType()}};dS(t,s,e),gl(s.children)}i?n.focus():an(null)})})});function iI(){return xy((t,[e,n])=>(t.forEach(i=>{if(!i)throw new Error("You have a subscription that does not return a teardown");i()}),n?e.map(i=>i(n)):[]),[])}const rI=Pe(null),hS=Pe([],t=>{t.pipe(t.combine(hS,Gt),iI())}),fS=Pe([],t=>{t.pipe(t.combine(fS,Bi),iI())}),yl=Pe(null,Ys,(t,e)=>!!(t&&e&&t.editorRef===e.editorRef)),Ru=mn(),Jt=Pe(t=>{throw new Error(`No icon component for ${t}`)});function ei(t,e){return mn((n,i)=>{n.changeWith(t,i,(r,s)=>{Array.isArray(s)||(s=[s]);let o=r;for(const a of s)r.includes(a)||(o=[...o,a]);return o}),e?.(n,i)})}function sI(t){const e=me();ce(e)&&t.pubIn({[el]:e,[ed]:e.format})}const Sl=ei(fS,(t,e)=>{t.pub(e,[n=>n.registerCommand(tc,(i,r)=>(t.pubIn({[Gt]:r,[Iu]:!0}),r._parentEditor===null&&r.getEditorState().read(()=>{t.pub(yl,{rootNode:ht(),editorType:"lexical",editorRef:r})}),sI(t),!1),Mi),n=>n.registerUpdateListener(({dirtyElements:i,dirtyLeaves:r,editorState:s})=>{if(t.getValue($u)!==null||i.size===0&&r.size===0)return;let a;s.read(()=>{ht().getLastChild()instanceof Cr&&n.update(()=>{ht().append(yt())},{discrete:!0}),a=sS({root:ht(),visitors:t.getValue(fc),jsxComponentDescriptors:t.getValue(so),toMarkdownExtensions:t.getValue(_0),toMarkdownOptions:t.getValue(Xh),jsxIsAvailable:t.getValue(dc)})}),t.pub(qr,a.trim()),t.pub(Zh,!1)}),n=>n.registerCommand(Vf,()=>(t.pub(Iu,!0),!1),Mi)])}),Lu=ei(hS,(t,e)=>{t.pub(e,[n=>n.registerUpdateListener(({editorState:i})=>{i.read(()=>{sI(t)})}),n=>n.registerCommand(Ff,i=>{var r;const s=t.getValue(Bi);return s&&!((r=s.getRootElement())!=null&&r.contains(i.relatedTarget))&&t.pubIn({[Iu]:!1,[Ru]:i}),!1},Mi)])});function dS(t,e,n){try{J9({root:e,visitors:t.getValue(nd),mdastExtensions:t.getValue(uS),markdown:n,syntaxExtensions:t.getValue(lS),jsxComponentDescriptors:t.getValue(so),directiveDescriptors:t.getValue(tl),codeBlockEditorDescriptors:t.getValue(vl),defaultCodeBlockLanguage:t.getValue(Go)}),t.pub($u,null)}catch(i){if(i instanceof Qg||i instanceof Dg)t.pubIn({[qr]:n,[$u]:{error:i.message,source:n}});else throw i}}const pS=Pe([]),go=ei(pS),gS=Pe([]),oI=ei(gS),mS=Pe([]),aI=ei(mS),OS=Pe([]),lI=ei(OS),xS=Pe([]),T0=ei(xS),vS=Pe([]),bS=ei(vS),A0=Pe(!1,t=>{t.link(t.pipe(Gt,Xr(e=>{var n,i;return["td","th"].includes(((i=(n=e?.getRootElement())==null?void 0:n.parentNode)==null?void 0:i.nodeName.toLowerCase())??"")})),A0)}),uI=Pe(k9()),yS=Pe(""),Xj=mn(),zh=mn(t=>{t.sub(t.pipe(zh,rn(Gt)),([e,n])=>{n?.update(()=>{const i=me();ce(i)&&(IF(i,e),setTimeout(()=>{n.focus()}))})})}),pc=mn(t=>{t.sub(t.pipe(pc,rn(Gt)),([e,n])=>{n?.focus(()=>{n.getEditorState().read(()=>{const i=me();ce(i)&&(n.update(()=>{const r=e();r.isInline()?(gl([r]),xn(r.getParentOrThrow())&&nS(r,yt).selectEnd()):_9(r),setTimeout(()=>{"select"in r&&typeof r.select=="function"&&r.select()})}),setTimeout(()=>{n.dispatchCommand(Yo,void 0)}))})},{defaultSelection:"rootEnd"})})}),Ps=Pe("rich-text",t=>{function e(){return xy((n,i)=>({current:n.next,next:i}),{current:"rich-text",next:"rich-text"})}t.sub(t.pipe(Ps,e(),rn(ea)),([{current:n},i])=>{(n==="source"||n==="diff")&&t.pub(E0,i)}),t.sub(t.pipe(Ps,e(),ec(n=>n.current==="rich-text"),rn(Gt)),([,n])=>{n?.dispatchCommand(Yo,void 0)})}),ea=Pe("",t=>{t.link(qr,ea),t.link(ea,C0)},!0),P0=Pe([]),wl=ei(P0),SS=Pe(()=>{throw new Error("No translation function provided")}),Wh=Pe(Jf),cI=En({init(t,e){const n=e?.initialMarkdown??"";t.register(Sl),t.register(Lu),t.register(C0),t.register(ea),t.pubIn({[aS]:e?.trim?n.trim():n,[Jt]:e?.iconComponentFor,[Qi]:[yj,bj,Sj,hj,...Oj],[rr]:[Ol,Jr,hc],[sr]:[aj,oj,cj,sj,rj],[Vg]:e?.contentEditableClassName,[Fg]:e?.spellCheck,[Xh]:e?.toMarkdownOptions,[_v]:e?.autoFocus,[Bg]:e?.placeholder,[In]:e?.readOnly,[SS]:e?.translation,[Jo]:[iD(),fB],[Ko]:[nD(),LB()],[bl]:[D9(),tD(),gB],[Wh]:e?.lexicalTheme??Jf}),t.singletonSub(jg,e?.onError),t.singletonSub(kv,i=>{e?.onChange(i,t.getValue(Zh))}),t.singletonSub(Ru,e?.onBlur),e?.suppressHtmlProcessing||t.pubIn({[Jo]:[Q9(),wj()],[Ko]:[H9(),Y9(),Cj],[Qi]:xj}),e?.suppressSharedHistory||t.pub(go,tI)},postInit(t,e){const n=u0({editable:e?.readOnly!==!0,namespace:e?.lexicalEditorNamespace??"MDXEditor",nodes:[...t.getValue(id),...e?.additionalLexicalNodes??[]],onError:i=>{throw i},theme:t.getValue(Wh)});e?.editorState!==null&&n.update(()=>{const i=e?.initialMarkdown.trim()??"";dS(t,ht(),i);const r=e?.autoFocus;if(r){if(r===!0){setTimeout(()=>{n.focus(Ys,{defaultSelection:"rootStart"})});return}setTimeout(()=>{n.focus(Ys,{defaultSelection:r.defaultSelection??"rootStart"})})}}),t.pub(Bi,n),t.pub(Gt,n)},update(t,e){t.pubIn({[Vg]:e?.contentEditableClassName,[Fg]:e?.spellCheck,[Xh]:e?.toMarkdownOptions,[_v]:e?.autoFocus,[Bg]:e?.placeholder,[In]:e?.readOnly}),t.singletonSub(kv,n=>{e?.onChange(n,t.getValue(Zh))}),t.singletonSub(Ru,e?.onBlur),t.singletonSub(jg,e?.onError)}});function Qt(){return Pt(SS)}function zj(){return ht().getTextContent()}function Wj(t,e=!0){if(t)return!1;let n=zj();return e&&(n=n.trim()),n===""}function Uj(t){if(!Wj(t,!1))return!1;const e=ht().getChildren(),n=e.length;if(n>1)return!1;for(let i=0;iUj(t)}const fI=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?R.useLayoutEffect:R.useEffect;function qj({editor:t,ariaActiveDescendant:e,ariaAutoComplete:n,ariaControls:i,ariaDescribedBy:r,ariaErrorMessage:s,ariaExpanded:o,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:h,ariaRequired:d,autoCapitalize:p,className:g,id:m,role:v="textbox",spellCheck:S=!0,style:b,tabIndex:w,"data-testid":k,...C},x){const[E,A]=R.useState(t.isEditable()),I=R.useCallback((U=>{U&&U.ownerDocument&&U.ownerDocument.defaultView?t.setRootElement(U):t.setRootElement(null)}),[t]),Z=R.useMemo((()=>(function(...U){return W=>{U.forEach((B=>{typeof B=="function"?B(W):B!=null&&(B.current=W)}))}})(x,I)),[I,x]);return fI((()=>(A(t.isEditable()),t.registerEditableListener((U=>{A(U)})))),[t]),q.jsx("div",{"aria-activedescendant":E?e:void 0,"aria-autocomplete":E?n:"none","aria-controls":E?i:void 0,"aria-describedby":r,...s!=null?{"aria-errormessage":s}:{},"aria-expanded":E&&v==="combobox"?!!o:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":u,"aria-multiline":c,"aria-owns":E?h:void 0,"aria-readonly":!E||void 0,"aria-required":d,autoCapitalize:p,className:g,contentEditable:E,"data-testid":k,id:m,ref:Z,role:v,spellCheck:S,style:b,tabIndex:w,...C})}const Hj=R.forwardRef(qj);function Fk(t){return t.getEditorState().read(hI(t.isComposing()))}const wS=R.forwardRef(Yj);function Yj(t,e){const{placeholder:n,...i}=t,[r]=ui();return q.jsxs(q.Fragment,{children:[q.jsx(Hj,{editor:r,...i,ref:e}),n!=null&&q.jsx(Gj,{editor:r,content:n})]})}function Gj({content:t,editor:e}){const n=(function(o){const[a,l]=R.useState((()=>Fk(o)));return fI((()=>{function u(){const c=Fk(o);l(c)}return u(),ci(o.registerUpdateListener((()=>{u()})),o.registerEditableListener((()=>{u()})))}),[o]),a})(e),[i,r]=R.useState(e.isEditable());if(R.useLayoutEffect((()=>(r(e.isEditable()),e.registerEditableListener((o=>{r(o)})))),[e]),!n)return null;let s=null;return typeof t=="function"?s=t(i):t!==null&&(s=t),s===null?null:q.jsx("div",{"aria-hidden":!0,children:s})}function Ev(t,e){return Ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ev(t,e)}var Bk={error:null},Kj=(function(t){var e,n;function i(){for(var s,o=arguments.length,a=new Array(o),l=0;lt.isEditable(),subscribe:e=>t.registerEditableListener(e)}}function tZ(){return(function(t){const[e]=ui(),n=R.useMemo((()=>t(e)),[e,t]),[i,r]=R.useState((()=>n.initialValueFn())),s=R.useRef(i);return Jj((()=>{const{initialValueFn:o,subscribe:a}=n,l=o();return s.current!==l&&(s.current=l,r(l)),a((u=>{s.current=u,r(u)}))}),[n,t]),i})(eZ)}function nZ(t){const e=window.location.origin,n=i=>{if(i.origin!==e)return;const r=t.getRootElement();if(document.activeElement!==r)return;const s=i.data;if(typeof s=="string"){let o;try{o=JSON.parse(s)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"){const a=o.payload;if(a&&a.functionId==="makeChanges"){const l=a.args;if(l){const[u,c,h,d,p,g]=l;t.update((()=>{const m=me();if(ce(m)){const v=m.anchor;let S=v.getNode(),b=0,w=0;if(ye(S)&&u>=0&&c>=0&&(b=u,w=u+c,m.setTextNodeRange(S,b,S,w)),b===w&&h===""||(m.insertRawText(h),S=v.getNode()),ye(S)){b=d,w=d+p;const k=S.getTextContentSize();b=b>k?k:b,w=w>k?k:w,m.setTextNodeRange(S,b,S,w)}i.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const Tv=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?R.useLayoutEffect:R.useEffect;function jk(t){return t.getEditorState().read(hI(t.isComposing()))}function _S({contentEditable:t,placeholder:e=null,ErrorBoundary:n}){const[i]=ui(),r=(function(s,o){const[a,l]=R.useState((()=>s.getDecorators()));return Tv((()=>s.registerDecoratorListener((u=>{wu.flushSync((()=>{l(u)}))}))),[s]),R.useEffect((()=>{l(s.getDecorators())}),[s]),R.useMemo((()=>{const u=[],c=Object.keys(a);for(let h=0;hs._onError(m),children:q.jsx(R.Suspense,{fallback:null,children:a[d]})}),g=s.getElementByKey(d);g!==null&&u.push(wu.createPortal(p,g,d))}return u}),[o,a,s])})(i,n);return(function(s){Tv((()=>ci(cB(s),nZ(s))),[s])})(i),q.jsxs(q.Fragment,{children:[t,q.jsx(iZ,{content:e}),r]})}function iZ({content:t}){const[e]=ui(),n=(function(r){const[s,o]=R.useState((()=>jk(r)));return Tv((()=>{function a(){const l=jk(r);o(l)}return a(),ci(r.registerUpdateListener((()=>{a()})),r.registerEditableListener((()=>{a()})))}),[r]),s})(e),i=tZ();return n?typeof t=="function"?t(i):t:null}var f1={exports:{}};var Zk;function rZ(){return Zk||(Zk=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o({conversion:UX,priority:1})}}static importJSON(e){return oo().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=Wk(e);try{const n=new URL(Wk(e));if(!WX.has(n.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const n=this.getWritable();return n.__url=e,n}getTarget(){return this.getLatest().__target}setTarget(e){const n=this.getWritable();return n.__target=e,n}getRel(){return this.getLatest().__rel}setRel(e){const n=this.getWritable();return n.__rel=e,n}getTitle(){return this.getLatest().__title}setTitle(e){const n=this.getWritable();return n.__title=e,n}insertNewAfter(e,n=!0){const i=oo(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,n),i}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n,i){if(!ce(n))return!1;const r=n.anchor.getNode(),s=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(s)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function UX(t){let e=null;if(Wy(t)){const n=t.textContent;(n!==null&&n!==""||t.children.length>0)&&(e=oo(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:e}}function oo(t="",e){return vi(new mo(t,e))}function ki(t){return t instanceof mo}let I0=class pI extends mo{constructor(e="",n={},i){super(e,n,i),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}static getType(){return"autolink"}static clone(e){return new pI(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const n=this.getWritable();return n.__isUnlinked=e,n}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,n,i){return super.updateDOM(e,n,i)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return Av().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,n=!0){const i=this.getParentOrThrow().insertNewAfter(e,n);if(te(i)){const r=Av(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return i.append(r),r}return null}};function Av(t="",e){return vi(new I0(t,e))}function Mr(t){return t instanceof I0}const Nu=We("TOGGLE_LINK_COMMAND");function Xk(t,e){if(t.type==="element"){const n=t.getNode();return te(n)||(function(i,...r){const s=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",i);for(const a of r)o.append("v",a);throw s.search=o.toString(),Error(`Minified Lexical error #${i}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[t.offset+e]||null}return null}function d1(t,e={}){const{target:n,title:i}=e,r=e.rel===void 0?"noreferrer":e.rel,s=me();if(s===null||!ce(s)&&!hn(s))return;if(hn(s)){const u=s.getNodes();return u.length===0?void 0:void u.forEach((c=>{if(t===null){const h=Zr(c,(d=>!Mr(d)&&ki(d)));h&&(h.insertBefore(c),h.getChildren().length===0&&h.remove())}else{const h=Zr(c,(d=>!Mr(d)&&ki(d)));if(h)h.setURL(t),n!==void 0&&h.setTarget(n),r!==void 0&&h.setRel(r);else{const d=oo(t,{rel:r,target:n});c.insertBefore(d),d.append(c)}}}))}const o=s.extract();if(t===null)return void o.forEach((u=>{const c=Zr(u,(h=>!Mr(h)&&ki(h)));if(c){const h=c.getChildren();for(let d=0;d{a.has(u.getKey())||(a.add(u.getKey()),u.setURL(t),n!==void 0&&u.setTarget(n),r!==void 0&&u.setRel(r),i!==void 0&&u.setTitle(i))};if(o.length===1){const u=zk(o[0],ki);if(u!==null)return l(u)}(function(u){const c=me();if(!ce(c))return u();const h=Uo(c),d=h.isBackward(),p=Xk(h.anchor,d?-1:0),g=Xk(h.focus,d?0:-1);if(u(),p||g){const m=me();if(ce(m)){const v=m.clone();if(p){const S=p.getParent();S&&v.anchor.set(S.getKey(),p.getIndexWithinParent()+(d?1:0),"element")}if(g){const S=g.getParent();S&&v.focus.set(S.getKey(),g.getIndexWithinParent()+(d?0:1),"element")}an(Uo(v))}}})((()=>{let u=null;for(const c of o){if(!c.isAttached())continue;const h=zk(c,ki);if(h){l(h);continue}if(te(c)){if(!c.isInline())continue;if(ki(c)){if(!(Mr(c)||u!==null&&u.getParentOrThrow().isParentOf(c))){l(c),u=c;continue}for(const p of c.getChildren())c.insertBefore(p);c.remove();continue}}const d=c.getPreviousSibling();ki(d)&&d.is(u)?d.append(c):(u=oo(t,{rel:r,target:n,title:i}),c.insertAfter(u),u.append(c))}}))}function zk(t,e){let n=t;for(;n!==null&&n.getParent()!==null&&!e(n);)n=n.getParentOrThrow();return e(n)?n:null}const qX=/^\+?[0-9\s()-]{5,}$/;function Wk(t){return t.match(/^[a-z][a-z0-9+.-]*:/i)||t.match(/^[/#.]/)?t:t.includes("@")?`mailto:${t}`:qX.test(t)?`tel:${t}`:`https://${t}`}function Mo(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Uh(t){let e=1,n=t.getParent();for(;n!=null;){if(rt(n)){const i=n.getParent();if(He(i)){e++,n=i.getParent();continue}Mo(40)}return e}return e}function Pv(t){let e=t.getParent();He(e)||Mo(40);let n=e;for(;n!==null;)n=n.getParent(),He(n)&&(e=n);return e}function gI(t){let e=[];const n=t.getChildren().filter(rt);for(let i=0;i0&&t.append(...r),e.remove()}function HX(){const t=me();if(ce(t)){const e=new Set,n=t.getNodes(),i=t.anchor.getNode();if(mI(i,n))e.add(Pv(i));else for(let r=0;ra.append(c)));const l=xi(),u=gi(s);l.append(u),nl(u,t.getNextSiblings()),n.insertBefore(o),n.insertAfter(l),n.replace(t)}}}function KX(){const t=me();if(!ce(t)||!t.isCollapsed())return!1;const e=t.anchor.getNode();if(!rt(e)||e.getChildrenSize()!==0)return!1;const n=Pv(e),i=e.getParent();He(i)||Mo(40);const r=i.getParent();let s;if(xn(r))s=yt(),n.insertAfter(s);else{if(!rt(r))return!1;s=xi(),r.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();const o=e.getNextSiblings();if(o.length>0){const a=gi(i.getListType());if(rt(s)){const l=xi();l.append(a),s.insertAfter(l)}else s.insertAfter(a);a.append(...o)}return(function(a){let l=a;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const u=l.getParent();if(u==null||!rt(u)&&!He(u))break;l=u}l.remove()})(e),!0}function Xg(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}let Oo=class extends Oi{$config(){return this.config("listitem",{$transform:e=>{if(e.__checked==null)return;const n=e.getParent();He(n)&&n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)},extends:Oi,importDOM:{li:()=>({conversion:JX,priority:0})}})}constructor(e=1,n=void 0,i){super(i),this.__value=e===void 0?1:e,this.__checked=n}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const n=document.createElement("li");return this.updateListItemDOM(null,n,e),n}updateListItemDOM(e,n,i){const r=this.getParent();He(r)&&r.getListType()==="check"&&(function(a,l,u,c){He(l.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),u&&l.__checked===u.__checked||a.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(n,this,e),n.value=this.__value,(function(a,l,u){const c=[],h=[],d=l.list,p=d?d.listitem:void 0;let g;if(d&&d.nested&&(g=d.nested.listitem),p!==void 0&&c.push(...Xg(p)),d){const m=u.getParent(),v=He(m)&&m.getListType()==="check",S=u.getChecked();v&&!S||h.push(d.listitemUnchecked),v&&S||h.push(d.listitemChecked),v&&c.push(S?d.listitemChecked:d.listitemUnchecked)}if(g!==void 0){const m=Xg(g);u.getChildren().some((v=>He(v)))?c.push(...m):h.push(...m)}h.length>0&&v0(a,...h),c.length>0&&Ur(a,...c)})(n,i.theme,this);const s=e?e.__style:"",o=this.__style;s!==o&&(o===""?n.removeAttribute("style"):n.style.cssText=o),(function(a,l,u){const c=rk(l.__textStyle);for(const h in c)a.style.setProperty(`--listitem-marker-${h}`,c[h]);if(u)for(const h in rk(u.__textStyle))h in c||a.style.removeProperty(`--listitem-marker-${h}`)})(n,this,e)}updateDOM(e,n,i){const r=n;return this.updateListItemDOM(e,r,i),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const n=this.createDOM(e._config),i=this.getFormatType();i&&(n.style.textAlign=i);const r=this.getDirection();return r&&(n.dir=r),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let n=0;n{e.append(r)}))),this.remove(),i.getChildrenSize()===0&&i.remove(),e}insertAfter(e,n=!0){const i=this.getParentOrThrow();if(He(i)||Mo(39),rt(e))return super.insertAfter(e,n);const r=this.getNextSiblings();if(i.insertAfter(e,n),r.length!==0){const s=gi(i.getListType());r.forEach((o=>s.append(o))),e.insertAfter(s,n)}return e}remove(e){const n=this.getPreviousSibling(),i=this.getNextSibling();super.remove(e),n&&i&&ms(n)&&ms(i)&&(kS(n.getFirstChild(),i.getFirstChild()),i.remove())}insertNewAfter(e,n=!0){const i=xi().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(i,n),i}collapseAtStart(e){const n=yt();this.getChildren().forEach((o=>n.append(o)));const i=this.getParentOrThrow(),r=i.getParentOrThrow(),s=rt(r);if(i.getChildrenSize()===1)if(s)i.remove(),r.select();else{i.insertBefore(n),i.remove();const o=e.anchor,a=e.focus,l=n.getKey();o.type==="element"&&o.getNode().is(this)&&o.set(l,o.offset,"element"),a.type==="element"&&a.getNode().is(this)&&a.set(l,a.offset,"element")}else i.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const n=this.getWritable();return n.__value=e,n}getChecked(){const e=this.getLatest();let n;const i=this.getParent();return He(i)&&(n=i.getListType()),n==="check"?!!e.__checked:void 0}setChecked(e){const n=this.getWritable();return n.__checked=e,n}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let n=e.getParentOrThrow(),i=0;for(;rt(n);)n=n.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(e){typeof e!="number"&&Mo(117),(e=Math.floor(e))>=0||Mo(199);let n=this.getIndent();for(;n!==e;)n{(function(n){const i=n.getNextSibling();He(i)&&n.getListType()===i.getListType()&&kS(n,i)})(e),OI(e)},extends:Oi,importDOM:{ol:()=>({conversion:Yk,priority:0}),ul:()=>({conversion:Yk,priority:0})}})}constructor(e="number",n=1,i){super(i);const r=nz[e]||e;this.__listType=r,this.__tag=r==="number"?"ol":"ul",this.__start=n}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const n=this.getWritable();return n.__listType=e,n.__tag=e==="number"?"ol":"ul",n}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const n=this.getWritable();return n.__start=e,n}createDOM(e,n){const i=this.__tag,r=document.createElement(i);return this.__start!==1&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,Hk(r,e.theme,this),r}updateDOM(e,n,i){return e.__tag!==this.__tag||(Hk(n,i.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const n=this.createDOM(e._config,e);return ln(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,n,i){let r=i;for(let s=0;s1?i.push(...g):r.push(...g)}}r.length>0&&v0(t,...r),i.length>0&&Ur(t,...i)}function tz(t){const e=[];for(let n=0;n1&&r.forEach((s=>{He(s)&&e.push(Uk(s))}))}else e.push(Uk(i))}return e}function Yk(t){const e=t.nodeName.toLowerCase();let n=null;return e==="ol"?n=gi("number",t.start):e==="ul"&&(n=(function(i){if(i.getAttribute("__lexicallisttype")==="check"||i.classList.contains("contains-task-list"))return!0;for(const r of i.childNodes)if(ln(r)&&r.hasAttribute("aria-checked"))return!0;return!1})(t)?gi("check"):gi("bullet")),{after:tz,node:n}}const nz={ol:"number",ul:"bullet"};function gi(t="number",e=1){return vi(new xo(t,e))}function He(t){return t instanceof xo}const xI=We("INSERT_CHECK_LIST_COMMAND");function iz(t){return ci(t.registerCommand(xI,(()=>(Iv("check"),!0)),Zt),t.registerCommand(Gm,(e=>Jk(e,t,!1)),Zt),t.registerCommand(Ym,(e=>Jk(e,t,!0)),Zt),t.registerCommand(ic,(()=>{if($v()!=null){const e=t.getRootElement();return e?.focus(),!0}return!1}),Zt),t.registerCommand(Km,(e=>{const n=$v();return!(n==null||!t.isEditable())&&(t.update((()=>{const i=nr(n);rt(i)&&(e.preventDefault(),i.toggleChecked())})),!0)}),Zt),t.registerCommand(Hm,(e=>t.getEditorState().read((()=>{const n=me();if(ce(n)&&n.isCollapsed()){const{anchor:i}=n,r=i.type==="element";if(r||i.offset===0){const s=i.getNode(),o=Zr(s,(a=>te(a)&&!a.isInline()));if(rt(o)){const a=o.getParent();if(He(a)&&a.getListType()==="check"&&(r||o.getFirstDescendant()===s)){const l=t.getElementByKey(o.__key);if(l!=null&&document.activeElement!==l)return l.focus(),e.preventDefault(),!0}}}}return!1}))),Zt),t.registerRootListener(((e,n)=>{e!==null&&(e.addEventListener("click",Gk),e.addEventListener("pointerdown",Kk)),n!==null&&(n.removeEventListener("click",Gk),n.removeEventListener("pointerdown",Kk))})))}function vI(t,e){const n=t.target;if(!ln(n))return;const i=n.firstChild;if(ln(i)&&(i.tagName==="UL"||i.tagName==="OL"))return;const r=n.parentNode;if(!r||r.__lexicalListType!=="check")return;const s=n.getBoundingClientRect(),o=BF(n),a=t.clientX/o,l=window.getComputedStyle?window.getComputedStyle(n,"::before"):{width:"0px"},u=parseFloat(l.width),c=t.pointerType==="touch"?32:0;(n.dir==="rtl"?as.right-u-c:a>s.left-c&&a{if(ln(t.target)){const e=t.target,n=Xf(e);n!=null&&n.isEditable()&&n.update((()=>{const i=nr(e);rt(i)&&(e.focus(),i.toggleChecked())}))}}))}function Kk(t){vI(t,(()=>{t.preventDefault()}))}function $v(){const t=document.activeElement;return ln(t)&&t.tagName==="LI"&&t.parentNode!=null&&t.parentNode.__lexicalListType==="check"?t:null}function Jk(t,e,n){const i=$v();return i!=null&&e.update((()=>{const r=nr(i);if(!rt(r))return;const s=(function(o,a){let l=a?o.getPreviousSibling():o.getNextSibling(),u=o;for(;l==null&&rt(u);)u=u.getParentOrThrow().getParent(),u!=null&&(l=a?u.getPreviousSibling():u.getNextSibling());for(;rt(l);){const c=a?l.getLastChild():l.getFirstChild();if(!He(c))return l;l=a?c.getLastChild():c.getFirstChild()}return null})(r,n);if(s!=null){s.selectStart();const o=e.getElementByKey(s.__key);o!=null&&(t.preventDefault(),setTimeout((()=>{o.focus()}),0))}})),!1}const rz=We("UPDATE_LIST_START_COMMAND"),bI=We("INSERT_UNORDERED_LIST_COMMAND"),yI=We("INSERT_ORDERED_LIST_COMMAND"),SI=We("REMOVE_LIST_COMMAND");function sz(t){return ci(t.registerCommand(yI,(()=>(Iv("number"),!0)),Zt),t.registerCommand(rz,(e=>{const{listNodeKey:n,newStart:i}=e,r=At(n);return!!He(r)&&(r.getListType()==="number"&&(r.setStart(i),OI(r)),!0)}),Zt),t.registerCommand(bI,(()=>(Iv("bullet"),!0)),Zt),t.registerCommand(SI,(()=>(HX(),!0)),Zt),t.registerCommand(Eu,(()=>KX()),Zt),t.registerNodeTransform(Oo,(e=>{const n=e.getFirstChild();if(n){if(ye(n)){const i=n.getStyle(),r=n.getFormat();e.getTextStyle()!==i&&e.setTextStyle(i),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{const i=me();ce(i)&&(i.style!==e.getTextStyle()||i.format!==e.getTextFormat())&&i.isCollapsed()&&e.is(i.anchor.getNode())&&e.setTextStyle(i.style).setTextFormat(i.format)}})),t.registerNodeTransform(Jr,(e=>{const n=e.getParent();if(rt(n)&&e.is(n.getFirstChild())){const i=e.getStyle(),r=e.getFormat();i===n.getTextStyle()&&r===n.getTextFormat()||n.setTextStyle(i).setTextFormat(r)}})))}function oz(t){const e=n=>{const i=n.getParent();if(He(n.getFirstChild())||!He(i))return;const r=Zr(n,(s=>rt(s)&&He(s.getParent())&&rt(s.getPreviousSibling())));if(r===null&&n.getIndent()>0)n.setIndent(0);else if(rt(r)){const s=r.getPreviousSibling();if(rt(s)){const o=(function(l){let u=l,c=u.getFirstChild();for(;He(c);){const h=c.getLastChild();if(!rt(h))break;u=h,c=u.getFirstChild()}return u})(s),a=o.getParent();if(He(a)){const l=Uh(a);l+1{const i=[n];for(;i.length>0;){const r=i.shift();if(He(r)){for(const s of r.getChildren())if(rt(s)){e(s);const o=s.getFirstChild();He(o)&&i.push(o)}}}}))}function az(t,e){let n=null;return t.getEditorState().read(()=>{n=e()}),n}function wI(t){try{const e=t.anchor,n=t.focus,i=t.anchor.getNode(),r=t.focus.getNode();return i===r?i:t.isBackward()?ok(n)?i:r:ok(e)?i:r}catch{return null}}const lz=["transform","perspective","filter","backdrop-filter","contain","container-type"],uz=["layout","paint","strict","content"];function cz(t){let e=t?.parentElement;for(;e;){const n=window.getComputedStyle(e),r=n.willChange.split(",").map(o=>o.trim()).some(o=>lz.includes(o));if(n.transform!=="none"||n.perspective!=="none"||n.filter!=="none"||n.backdropFilter!=="none"||uz.includes(n.contain)||n.containerType!=="normal"||n.contentVisibility==="auto"||r)return e;e=e.parentElement}return null}function ES(t){const e=me(),n=window.getSelection(),i=document.activeElement,r=t.getRootElement();if(e!==null&&n!==null&&r!==null&&r.contains(n.anchorNode)&&t.isEditable()){const s=n.getRangeAt(0);let o;if(n.isCollapsed){let l=n.anchorNode;l?.nodeType==3&&(l=l.parentNode),o=l.getBoundingClientRect(),o.width=0}else if(n.anchorNode===r){let l=r;for(;l.firstElementChild!=null;)l=l.firstElementChild;o=l.getBoundingClientRect()}else o=s.getBoundingClientRect();const a=cz(r);if(a){const l=a.getBoundingClientRect();return{top:Math.round(o.top-l.top),left:Math.round(o.left-l.left),width:Math.round(o.width),height:Math.round(o.height)}}return{top:Math.round(o.top),left:Math.round(o.left),width:Math.round(o.width),height:Math.round(o.height)}}else if(i?.className!=="link-input")return null;return null}function hz(t,e){return by({markdown:""},n=>{t.getEditorState().read(()=>{n.markdown=sS({root:ht(),...e})})}).markdown}function CI(t,e){let n="";return t.getEditorState().read(()=>{const i=me();if(!i||!ce(i)||i.isCollapsed())return;const r=i.getNodes();if(r.length===0)return;const s=new Set;r.forEach(l=>{let u=l;for(;u;){if(Pu(u)||rt(u)||u.getType()==="paragraph"||u.getType()==="quote"){te(u)&&s.add(u);break}u=u.getParent()}});const o=s.size>0?Array.from(s):r;function a(l){if(Pu(l)){const u=parseInt(l.getTag().replace("h","")),h=l.getChildren().map(d=>a(d)).join("");return"#".repeat(u)+" "+h+` + +`}else if(rt(l)){const u=l.getParent(),c=u&&He(u)&&u.getListType()==="number"?"1. ":"- ",d=l.getChildren().map(p=>a(p)).join("");return c+d+` +`}else{if(He(l))return l.getChildren().map(c=>a(c)).join("")+` +`;if(ye(l)){let u=l.getTextContent();const c=l.getFormat();return c&16?`\`${u}\``:(c&1&&(u=`**${u}**`),c&2&&(u=`*${u}*`),c&4&&(u=`~~${u}~~`),u)}else if(ki(l)){const u=l.getURL(),c=l.getTitle(),d=l.getChildren().map(p=>a(p)).join("");return c?`[${d}](${u} "${c}")`:`[${d}](${u})`}else if(te(l))return l.getChildren().map(c=>a(c)).join("")}return l.getTextContent()}n=o.map(l=>a(l)).join("")}),n.trim()}const fz=({children:t})=>{const e=Pt(Bi),n=_.useMemo(()=>[e,KP(null,Jf)],[e]);return _.createElement(fg.Provider,{value:n},t)},dz=()=>{const t=Qt(),e=bt(k0),n=bt(rI),i=h=>{n(h),e(h?{current:h}:null)},[r,s,o,a,l,u,c]=$t(Vg,Fg,pS,gS,OS,Bg,mS);return _.createElement(_.Fragment,null,a.map((h,d)=>_.createElement(h,{key:d})),_.createElement(_I,{wrappers:l},_.createElement("div",{className:ft(G.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},_.createElement(_S,{contentEditable:_.createElement("div",{ref:i},_.createElement(wS,{className:ft(G.contentEditable,r),ariaLabel:t("contentArea.editableMarkdown","editable markdown"),spellCheck:s})),placeholder:_.createElement("div",{className:ft(G.contentEditable,G.placeholder,r)},_.createElement("p",null,u)),ErrorBoundary:CS}))),o.map((h,d)=>_.createElement(h,{key:d})),c.map((h,d)=>_.createElement(h,{key:d})))},pz={listItemIndent:"one"},gz=t=>dI[t];function mz(t,e,n={}){let i=e;for(const[r,s]of Object.entries(n))i=i.replaceAll(`{{${r}}}`,String(s));return i}const _I=({wrappers:t,children:e})=>{if(t.length===0)return _.createElement(_.Fragment,null,e);const n=t[0];return _.createElement(n,null,_.createElement(_I,{wrappers:t.slice(1)},e))},Oz=({children:t,className:e,overlayContainer:n})=>{const i=_.useRef(null),r=_.useRef(null),s=bt(es),o=bt(nI);return _.useEffect(()=>{const a=document.createElement("div");return a.classList.add("mdxeditor-popup-container",G.editorRoot,G.popupContainer,...(e??"").trim().split(" ").filter(Boolean)),(n??document.body).appendChild(a),i.current=a,s(i),o(r),()=>{a.remove()}},[e,i,n,s,o]),_.createElement("div",{className:ft("mdxeditor",G.editorRoot,G.editorWrapper,e),ref:r},t)},xz=({mdxRef:t})=>{const e=ha();return _.useImperativeHandle(t,()=>({getMarkdown:()=>{const n=e.getValue(Ps);return n==="source"||n==="diff"?e.getValue(ea):e.getValue(qr)},setMarkdown:n=>{e.pub(E0,n)},insertMarkdown:n=>{e.pub(cS,n)},focus:(n,i)=>{var r;(r=e.getValue(Bi))==null||r.focus(n,i)},getContentEditableHTML:()=>{var n;return((n=e.getValue(k0))==null?void 0:n.current.innerHTML)??""},getSelectionMarkdown:()=>{const n=e.getValue(Ps);if(n==="source"||n==="diff")return"";const i=e.getValue(Gt);return i?(e.getValue(fc),e.getValue(_0),e.getValue(Xh),e.getValue(so),e.getValue(dc),CI(i)):""}}),[e]),null},vz=_.forwardRef((t,e)=>_.createElement(GP,{plugins:[cI({contentEditableClassName:t.contentEditableClassName??"",spellCheck:t.spellCheck??!0,initialMarkdown:t.markdown,onChange:t.onChange??Ys,onBlur:t.onBlur??Ys,toMarkdownOptions:t.toMarkdownOptions??pz,autoFocus:t.autoFocus??!1,placeholder:t.placeholder??"",readOnly:!!t.readOnly,iconComponentFor:t.iconComponentFor??gz,suppressHtmlProcessing:t.suppressHtmlProcessing??!1,onError:t.onError??Ys,translation:t.translation??mz,trim:t.trim??!0,lexicalTheme:t.lexicalTheme,..."editorState"in t?{editorState:t.editorState}:{},suppressSharedHistory:t.suppressSharedHistory??!1,additionalLexicalNodes:t.additionalLexicalNodes??[],lexicalEditorNamespace:t.lexicalEditorNamespace??"MDXEditor"}),...t.plugins??[]]},_.createElement(Oz,{className:t.className,overlayContainer:t.overlayContainer},_.createElement(fz,null,_.createElement(dz,null))),_.createElement(xz,{mdxRef:e}))),TS=typeof window<"u"&&typeof window.document.createElement<"u",qh=TS&&(()=>{var t;const e=(t=navigator.userAgentData)==null?void 0:t.platform;return e?/mac/i.test(e):/Mac|iPod|iPhone|iPad/.test(navigator.userAgent)})();function kI(t,e){return qh?t:e}const bz={testLexicalNode:Pu,visitLexicalNode:({lexicalNode:t,actions:e})=>{const n=parseInt(t.getTag()[1],10);e.addAndStepInto("heading",{depth:n})}},yz={testNode:"heading",visitNode:function({mdastNode:t,actions:e}){e.addAndStepInto(Ss(`h${t.depth}`))}},Sz=["Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6"],AS=[1,2,3,4,5,6],wz={Digit1:1,Digit2:2,Digit3:3,Digit4:4,Digit5:5,Digit6:6},rd=Pe(AS,t=>{t.pub(Sl,e=>e.registerCommand(Lf,n=>{const{code:i,ctrlKey:r,metaKey:s,altKey:o}=n;return Sz.includes(i)&&kI(s,r)&&o?(n.preventDefault(),e.update(()=>{if(i==="Digit0")t.pub(zh,()=>yt());else{const a=t.getValue(rd),l=wz[i];a.includes(l)&&t.pub(zh,()=>Ss(`h${l}`))}}),!0):!1},Zt))}),Cz=En({init(t){t.pubIn({[wl]:"headings",[Qi]:yz,[rr]:Gf,[sr]:bz})},update(t,e){t.pub(rd,e?.allowedHeadingLevels??AS)}});function e5(t,e){return t.getEditorState().read((()=>{const n=At(e);return n!==null&&n.isSelected()}))}function EI(t){const[e]=ui(),[n,i]=R.useState((()=>e5(e,t)));return R.useEffect((()=>{let r=!0;const s=e.registerUpdateListener((()=>{r&&i(e5(e,t))}));return()=>{r=!1,s()}}),[e,t]),[n,R.useCallback((r=>{e.update((()=>{let s=me();hn(s)||(s=r0(),an(s)),hn(s)&&(r?s.add(t):s.delete(t))}))}),[e,t]),R.useCallback((()=>{e.update((()=>{const r=me();hn(r)&&r.clear()}))}),[e])]}const TI=We("INSERT_HORIZONTAL_RULE_COMMAND");function _z({nodeKey:t}){const[e]=ui(),[n,i,r]=EI(t);return R.useEffect((()=>ci(e.registerCommand(If,(s=>{const o=e.getElementByKey(t);return s.target===o&&(s.shiftKey||r(),i(!n),!0)}),Zt))),[r,e,n,t,i]),R.useEffect((()=>{const s=e.getElementByKey(t),o=e._config.theme.hrSelected??"selected";s!==null&&(n?Ur(s,o):v0(s,o))}),[e,n,t]),null}let sd=class AI extends Cr{static getType(){return"horizontalrule"}static clone(e){return new AI(e.__key)}static importJSON(e){return gc().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:kz,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const n=document.createElement("hr");return Ur(n,e.theme.hr),n}getTextContent(){return` +`}isInline(){return!1}updateDOM(){return!1}decorate(){return q.jsx(_z,{nodeKey:this.__key})}};function kz(){return{node:gc()}}function gc(){return vi(new sd)}function PS(t){return t instanceof sd}function Ez(){const[t]=ui();return R.useEffect((()=>t.registerCommand(TI,(e=>{const n=me();if(!ce(n))return!1;if(n.focus.getNode()!==null){const i=gc();_9(i)}return!0}),at)),[t]),null}const Tz={testLexicalNode:PS,visitLexicalNode({actions:t}){t.addAndStepInto("thematicBreak")}},Az={testNode:"thematicBreak",visitNode({actions:t}){t.addAndStepInto(gc())}},IS=Gr(t=>{t.sub(t.pipe(IS,rn(Gt)),([,e])=>{e?.dispatchCommand(TI,void 0)})}),Pz=En({init(t){t.pubIn({[wl]:"thematicBreak",[Qi]:Az,[rr]:sd,[sr]:Tz,[go]:Ez})}}),Iz={testNode:"list",visitNode:function({mdastNode:t,lexicalParent:e,actions:n}){const i=t.children.some(s=>typeof s.checked=="boolean")?"check":t.ordered?"number":"bullet",r=gi(i);if(rt(e)){const s=xi();s.append(r),e.insertAfter(s)}else e.append(r);n.visitChildren(t,r)}},$z={testNode:"listItem",visitNode({mdastNode:t,actions:e,lexicalParent:n}){const i=n.getListType()==="check"?t.checked??!1:void 0;e.addAndStepInto(xi(i))}},Rz={testLexicalNode:He,visitLexicalNode:({lexicalNode:t,actions:e})=>{e.addAndStepInto("list",{ordered:t.getListType()==="number",spread:!1})}},Lz={testLexicalNode:rt,visitLexicalNode:({lexicalNode:t,mdastParent:e,actions:n})=>{const i=t.getChildren(),r=i[0];if(i.length===1&&He(r)){const s=e.children.at(-1);s?n.visitChildren(t,s):n.visitChildren(r,e)}else{const s=t.getParent(),o=n.appendToParent(e,{type:"listItem",checked:s.getListType()==="check"?!!t.getChecked():void 0,spread:!1,children:[]});let a=null;for(const l of t.getChildren())ye(l)||vr(l)||l.isInline()&&(te(l)||Ct(l))?(a??(a=n.appendToParent(o,{type:"paragraph",children:[]})),n.visit(l,a)):(a=null,n.visit(l,o))}}};function Nz(t,e){return ci(t.registerCommand(Mf,(n=>{const i=me();if(!ce(i))return!1;n.preventDefault();const r=(function(s){const o=s.getNodes();if(FF(o,(d=>Qh(d)&&d.canIndent()?d:null)).length>0)return!0;const a=s.anchor,l=s.focus,u=l.isBefore(a)?l:a,c=u.getNode(),h=Ov(c);if(h.canIndent()){const d=h.getKey();let p=fa();if(p.anchor.set(d,0,"element"),p.focus.set(d,0,"element"),p=Uo(p),p.anchor.is(u))return!0}return!1})(i)?n.shiftKey?Sg:Mh:Py;return t.dispatchCommand(r,void 0)}),at),t.registerCommand(Mh,(()=>{if(e==null)return!1;const n=me();if(!ce(n))return!1;const i=n.getNodes().map((r=>Ov(r).getIndent()));return Math.max(...i)+1>=e}),Mi))}function t5({maxIndent:t}){const[e]=ui();return R.useEffect((()=>Nz(e,t)),[e,t]),null}function n5(){const[t]=ui();return R.useEffect((()=>iz(t)),[t]),null}function i5({hasStrictIndent:t=!1}){const[e]=ui();return R.useEffect((()=>{if(!e.hasNodes([xo,Oo]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[e]),R.useEffect((()=>{if(t)return oz(e)}),[e,t]),(function(n){R.useEffect((()=>sz(n)),[n])})(e),null}const Mz=new Map([["number",yI],["bullet",bI],["check",xI],["",SI]]),zg=Pe("",t=>{t.sub(t.pipe(el,rn(Gt)),([e,n])=>{if(!e||!n)return;const i=e.anchor.getNode();let r=i.getKey()==="root"?i:Zr(i,a=>{const l=a.getParent();return l!==null&&xn(l)});r??(r=i.getTopLevelElementOrThrow());const s=r.getKey();if(n.getElementByKey(s)!==null)if(He(r)){const a=C9(i,xo),l=a?a.getListType():r.getListType();t.pub(zg,l)}else t.pub(zg,"")})}),$S=mn(t=>{t.sub(t.pipe($S,rn(Gt)),([e,n])=>{n?.dispatchCommand(Mz.get(e),void 0)})}),Qz=En({init(t){var e;(e=t.getValue(Bi))==null||e.registerCommand(Mh,()=>!Vz(7),Mi),t.pubIn({[wl]:"lists",[Jo]:oD(),[Ko]:sD(),[Qi]:[Iz,$z],[rr]:[Oo,xo],[sr]:[Rz,Lz],[bl]:rD(),[go]:[t5,i5,n5],[T0]:[t5,i5,n5]})}});function Dz(t){const e=t.getNodes();return e.length===0?new Set([t.anchor.getNode().getParentOrThrow(),t.focus.getNode().getParentOrThrow()]):new Set(e.map(n=>te(n)?n:n.getParentOrThrow()))}function Vz(t){const e=me();if(!ce(e))return!1;const n=Dz(e);let i=0;for(const r of n)if(He(r))i=Math.max(Uh(r)+1,i);else if(rt(r)){const s=r.getParent();if(s?.getChildren().length===1){const o=s.getParent();if(rt(o)&&o.getChildren().length===1)return!1}if(!He(s))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");i=Math.max(Uh(s)+1,i)}return i<=t}const r5=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],s5=r5[Math.floor(Math.random()*r5.length)],Fz=R.createContext({clientID:0,color:s5[1],isCollabActive:!1,name:s5[0],yjsDocMap:new Map});function Bz(t,e){return R.useContext(Fz)}function o5(t){const e=new Set,{ownNodeConfig:n}=Hf(t),i=t.transform();if(n){const r=n.$transform;r&&e.add(r)}return i&&e.add(i),e}function PI({initialEditor:t,children:e,initialNodes:n,initialTheme:i,skipCollabChecks:r,skipEditableListener:s}){const o=R.useRef(!1),a=R.useContext(fg);a==null&&(function(g,...m){const v=new URL("https://lexical.dev/docs/error"),S=new URLSearchParams;S.append("code",g);for(const b of m)S.append("v",b);throw v.search=S.toString(),Error(`Minified Lexical error #${g}; visit ${v.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(9);const[l,{getTheme:u}]=a,c=R.useMemo((()=>{const g=i||u()||void 0,m=KP(a,g);g!==void 0&&(t._config.theme=g),t._parentEditor=t._parentEditor||l;const v=t._createEditorArgs,S=v&&v.namespace;if(n){S||(t._config.namespace=l._config.namespace);for(let b of n){let w=null,k=null;if(typeof b!="function"){const x=b;b=x.replace,w=x.with,k=x.withKlass||null}const C=Zf(t,b.getType());t._nodes.set(b.getType(),{exportDOM:C?C.exportDOM:void 0,klass:b,replace:w,replaceWithKlass:k,sharedNodeState:mg(b),transforms:o5(b)})}}else if(v&&v.nodes)S||(t._config.namespace=l._config.namespace);else{const b=t._nodes=new Map(l._nodes);S||(t._config.namespace=l._config.namespace);for(const[w,k]of b)t._nodes.set(w,{exportDOM:k.exportDOM,klass:k.klass,replace:k.replace,replaceWithKlass:k.replaceWithKlass,sharedNodeState:mg(k.klass),transforms:o5(k.klass)})}return[t,m]}),[]),{isCollabActive:h,yjsDocMap:d}=Bz(),p=r||o.current||d.has(t.getKey());return R.useEffect((()=>{p&&(o.current=!0)}),[p]),R.useEffect((()=>{if(!s){const g=m=>t.setEditable(m);return g(l.isEditable()),l.registerEditableListener(g)}}),[t,l,s]),q.jsx(fg.Provider,{value:c,children:!h||p?e:null})}function it(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t?.(r),n===!1||!r.defaultPrevented)return e?.(r)}}function vo(t,e=[]){let n=[];function i(s,o){const a=R.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const u=h=>{const{scope:d,children:p,...g}=h,m=d?.[t]?.[l]||a,v=R.useMemo(()=>g,Object.values(g));return q.jsx(m.Provider,{value:v,children:p})};u.displayName=s+"Provider";function c(h,d){const p=d?.[t]?.[l]||a,g=R.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[u,c]}const r=()=>{const s=n.map(o=>R.createContext(o));return function(a){const l=a?.[t]||s;return R.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return r.scopeName=t,[i,jz(r,...e)]}function jz(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const i=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const o=i.reduce((a,{useScope:l,scopeName:u})=>{const h=l(s)[`__scope${u}`];return{...a,...h}},{});return R.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var Zz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],gt=Zz.reduce((t,e)=>{const n=Cu(`Primitive.${e}`),i=R.forwardRef((r,s)=>{const{asChild:o,...a}=r,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),q.jsx(l,{...a,ref:s})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function Xz(t,e){t&&wu.flushSync(()=>t.dispatchEvent(e))}function ta(t){const e=R.useRef(t);return R.useEffect(()=>{e.current=t}),R.useMemo(()=>((...n)=>e.current?.(...n)),[])}function zz(t,e=globalThis?.document){const n=ta(t);R.useEffect(()=>{const i=r=>{r.key==="Escape"&&n(r)};return e.addEventListener("keydown",i,{capture:!0}),()=>e.removeEventListener("keydown",i,{capture:!0})},[n,e])}var Wz="DismissableLayer",Rv="dismissableLayer.update",Uz="dismissableLayer.pointerDownOutside",qz="dismissableLayer.focusOutside",a5,RS=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),od=R.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...u}=t,c=R.useContext(RS),[h,d]=R.useState(null),p=h?.ownerDocument??globalThis?.document,[,g]=R.useState({}),m=on(e,I=>d(I)),v=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(S),w=h?v.indexOf(h):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,C=w>=b,x=R.useRef(!1),E=Kz(I=>{const Z=I.target;if(!(Z instanceof Node))return;const U=[...c.branches].some(W=>W.contains(Z));!C||U||(s?.(I),a?.(I),I.defaultPrevented||l?.())},{ownerDocument:p,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:x,dismissableSurfaces:c.dismissableSurfaces}),A=Jz(I=>{if(i&&x.current)return;const Z=I.target;[...c.branches].some(W=>W.contains(Z))||(o?.(I),a?.(I),I.defaultPrevented||l?.())},p);return zz(I=>{w===c.layers.size-1&&(r?.(I),!I.defaultPrevented&&l&&(I.preventDefault(),l()))},p),R.useEffect(()=>{if(h)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(a5=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),l5(),()=>{n&&(c.layersWithOutsidePointerEventsDisabled.delete(h),c.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=a5))}},[h,p,n,c]),R.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),l5())},[h,c]),R.useEffect(()=>{const I=()=>g({});return document.addEventListener(Rv,I),()=>document.removeEventListener(Rv,I)},[]),q.jsx(gt.div,{...u,ref:m,style:{pointerEvents:k?C?"auto":"none":void 0,...t.style},onFocusCapture:it(t.onFocusCapture,A.onFocusCapture),onBlurCapture:it(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:it(t.onPointerDownCapture,E.onPointerDownCapture)})});od.displayName=Wz;var Hz="DismissableLayerBranch",Yz=R.forwardRef((t,e)=>{const n=R.useContext(RS),i=R.useRef(null),r=on(e,i);return R.useEffect(()=>{const s=i.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),q.jsx(gt.div,{...t,ref:r})});Yz.displayName=Hz;function Gz(){const t=R.useContext(RS),[e,n]=R.useState(null);return R.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}function Kz(t,e){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:s}=e,o=ta(t),a=R.useRef(!1),l=R.useRef(!1),u=R.useRef(new Map),c=R.useRef(()=>{});return R.useEffect(()=>{function h(){l.current=!1,r.current=!1,u.current.clear()}function d(){return Array.from(u.current.values()).some(Boolean)}function p(b){if(!l.current)return;const w=b.target;w instanceof Node&&[...s].some(C=>C.contains(w))||u.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{l.current&&c.current()},0)}function g(b){l.current&&u.current.set(b.type,!1)}const m=b=>{if(b.target&&!a.current){let w=function(){n.removeEventListener("click",c.current);const C=d();h(),C||II(Uz,o,k,{discrete:!0})};const k={originalEvent:b};l.current=!0,r.current=i&&b.button===0,u.current.clear(),!i||b.button!==0?w():(n.removeEventListener("click",c.current),c.current=w,n.addEventListener("click",c.current,{once:!0}))}else n.removeEventListener("click",c.current),h();a.current=!1},v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of v)n.addEventListener(b,p,!0),n.addEventListener(b,g);const S=window.setTimeout(()=>{n.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(S),n.removeEventListener("pointerdown",m),n.removeEventListener("click",c.current);for(const b of v)n.removeEventListener(b,p,!0),n.removeEventListener(b,g)}},[n,o,i,r,s]),{onPointerDownCapture:()=>a.current=!0}}function Jz(t,e=globalThis?.document){const n=ta(t),i=R.useRef(!1);return R.useEffect(()=>{const r=s=>{s.target&&!i.current&&II(qz,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function l5(){const t=new CustomEvent(Rv);document.dispatchEvent(t)}function II(t,e,n,{discrete:i}){const r=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),i?Xz(r,s):r.dispatchEvent(s)}var qd=0,Nl=null;function LS(){R.useEffect(()=>{Nl||(Nl={start:u5(),end:u5()});const{start:t,end:e}=Nl;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),qd++,()=>{qd===1&&(Nl?.start.remove(),Nl?.end.remove(),Nl=null),qd=Math.max(0,qd-1)}},[])}function u5(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var p1="focusScope.autoFocusOnMount",g1="focusScope.autoFocusOnUnmount",c5={bubbles:!1,cancelable:!0},eW="FocusScope",$0=R.forwardRef((t,e)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...o}=t,[a,l]=R.useState(null),u=ta(r),c=ta(s),h=R.useRef(null),d=on(e,m=>l(m)),p=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(i){let m=function(w){if(p.paused||!a)return;const k=w.target;a.contains(k)?h.current=k:To(h.current,{select:!0})},v=function(w){if(p.paused||!a)return;const k=w.relatedTarget;k!==null&&(a.contains(k)||To(h.current,{select:!0}))},S=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&To(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const b=new MutationObserver(S);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),b.disconnect()}}},[i,a,p.paused]),R.useEffect(()=>{if(a){f5.add(p);const m=document.activeElement;if(!a.contains(m)){const S=new CustomEvent(p1,c5);a.addEventListener(p1,u),a.dispatchEvent(S),S.defaultPrevented||(tW(oW($I(a)),{select:!0}),document.activeElement===m&&To(a))}return()=>{a.removeEventListener(p1,u),setTimeout(()=>{const S=new CustomEvent(g1,c5);a.addEventListener(g1,c),a.dispatchEvent(S),S.defaultPrevented||To(m??document.body,{select:!0}),a.removeEventListener(g1,c),f5.remove(p)},0)}}},[a,u,c,p]);const g=R.useCallback(m=>{if(!n&&!i||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,S=document.activeElement;if(v&&S){const b=m.currentTarget,[w,k]=nW(b);w&&k?!m.shiftKey&&S===k?(m.preventDefault(),n&&To(w,{select:!0})):m.shiftKey&&S===w&&(m.preventDefault(),n&&To(k,{select:!0})):S===b&&m.preventDefault()}},[n,i,p.paused]);return q.jsx(gt.div,{tabIndex:-1,...o,ref:d,onKeyDown:g})});$0.displayName=eW;function tW(t,{select:e=!1}={}){const n=document.activeElement;for(const i of t)if(To(i,{select:e}),document.activeElement!==n)return}function nW(t){const e=$I(t),n=h5(e,t),i=h5(e.reverse(),t);return[n,i]}function $I(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function h5(t,e){for(const n of t)if(!iW(n,{upTo:e}))return n}function iW(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function rW(t){return t instanceof HTMLInputElement&&"select"in t}function To(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&rW(t)&&e&&t.select()}}var f5=sW();function sW(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=d5(t,e),t.unshift(e)},remove(e){t=d5(t,e),t[0]?.resume()}}}function d5(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function oW(t){return t.filter(e=>e.tagName!=="A")}var Kn=globalThis?.document?R.useLayoutEffect:()=>{},aW=ZP[" useId ".trim().toString()]||(()=>{}),lW=0;function Gs(t){const[e,n]=R.useState(aW());return Kn(()=>{n(i=>i??String(lW++))},[t]),t||(e?`radix-${e}`:"")}var uW="Arrow",RI=R.forwardRef((t,e)=>{const{children:n,width:i=10,height:r=5,...s}=t;return q.jsx(gt.svg,{...s,ref:e,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:q.jsx("polygon",{points:"0,0 30,0 15,10"})})});RI.displayName=uW;var cW=RI;function hW(t){const[e,n]=R.useState(void 0);return Kn(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else n(void 0)},[t]),e}var NS="Popper",[LI,mc]=vo(NS),[fW,NI]=LI(NS),MI=t=>{const{__scopePopper:e,children:n}=t,[i,r]=R.useState(null),[s,o]=R.useState(void 0);return q.jsx(fW,{scope:e,anchor:i,onAnchorChange:r,placementState:s,setPlacementState:o,children:n})};MI.displayName=NS;var QI="PopperAnchor",DI=R.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...r}=t,s=NI(QI,n),o=R.useRef(null),a=s.onAnchorChange,l=R.useCallback(g=>{o.current=g,g&&a(g)},[a]),u=on(e,l),c=R.useRef(null);R.useEffect(()=>{if(!i)return;const g=c.current;c.current=i.current,g!==c.current&&a(c.current)});const h=s.placementState&&QS(s.placementState),d=h?.[0],p=h?.[1];return i?null:q.jsx(gt.div,{"data-radix-popper-side":d,"data-radix-popper-align":p,...r,ref:u})});DI.displayName=QI;var MS="PopperContent",[dW,pW]=LI(MS),VI=R.forwardRef((t,e)=>{const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:h="partial",hideWhenDetached:d=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=t,v=NI(MS,n),[S,b]=R.useState(null),w=on(e,xe=>b(xe)),[k,C]=R.useState(null),x=hW(k),E=x?.width??0,A=x?.height??0,I=i+(s!=="center"?"-"+s:""),Z=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},U=Array.isArray(u)?u:[u],W=U.length>0,B={padding:Z,boundary:U.filter(mW),altBoundary:W},{refs:ne,floatingStyles:j,placement:oe,isPositioned:pe,middlewareData:re}=VQ({strategy:"fixed",placement:I,whileElementsMounted:(...xe)=>UQ(...xe,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[FQ({mainAxis:r+A,alignmentAxis:o}),l&&BQ({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?jQ():void 0,...B}),l&&ZQ({...B}),XQ({...B,apply:({elements:xe,rects:Ce,availableWidth:$e,availableHeight:Le})=>{const{width:Ke,height:lt}=Ce.reference,St=xe.floating.style;St.setProperty("--radix-popper-available-width",`${$e}px`),St.setProperty("--radix-popper-available-height",`${Le}px`),St.setProperty("--radix-popper-anchor-width",`${Ke}px`),St.setProperty("--radix-popper-anchor-height",`${lt}px`)}}),k&&zQ({element:k,padding:a}),OW({arrowWidth:E,arrowHeight:A}),d&&WQ({strategy:"referenceHidden",...B,boundary:W?B.boundary:void 0})]}),ke=v.setPlacementState;Kn(()=>(ke(oe),()=>{ke(void 0)}),[oe,ke]);const[Ee,De]=QS(oe),Ie=ta(g);Kn(()=>{pe&&Ie?.()},[pe,Ie]);const Ue=re.arrow?.x,qe=re.arrow?.y,Ye=re.arrow?.centerOffset!==0,[Ge,he]=R.useState();return Kn(()=>{S&&he(window.getComputedStyle(S).zIndex)},[S]),q.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:pe?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ge,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(" "),...re.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:q.jsx(dW,{scope:n,placedSide:Ee,placedAlign:De,onArrowChange:C,arrowX:Ue,arrowY:qe,shouldHideArrow:Ye,children:q.jsx(gt.div,{"data-side":Ee,"data-align":De,...m,ref:w,style:{...m.style,animation:pe?void 0:"none"}})})})});VI.displayName=MS;var FI="PopperArrow",gW={top:"bottom",right:"left",bottom:"top",left:"right"},BI=R.forwardRef(function(e,n){const{__scopePopper:i,...r}=e,s=pW(FI,i),o=gW[s.placedSide];return q.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:q.jsx(cW,{...r,ref:n,style:{...r.style,display:"block"}})})});BI.displayName=FI;function mW(t){return t!==null}var OW=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:i,middlewareData:r}=e,o=r.arrow?.centerOffset!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=QS(n),h={start:"0%",center:"50%",end:"100%"}[c],d=(r.arrow?.x??0)+a/2,p=(r.arrow?.y??0)+l/2;let g="",m="";return u==="bottom"?(g=o?h:`${d}px`,m=`${-l}px`):u==="top"?(g=o?h:`${d}px`,m=`${i.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=o?h:`${p}px`):u==="left"&&(g=`${i.floating.width+l}px`,m=o?h:`${p}px`),{data:{x:g,y:m}}}});function QS(t){const[e,n="center"]=t.split("-");return[e,n]}var DS=MI,R0=DI,VS=VI,FS=BI,xW="Portal",ad=R.forwardRef((t,e)=>{const{container:n,...i}=t,[r,s]=R.useState(!1);Kn(()=>s(!0),[]);const o=n||r&&globalThis?.document?.body;return o?wu.createPortal(q.jsx(gt.div,{...i,ref:e}),o):null});ad.displayName=xW;function vW(t,e){return R.useReducer((n,i)=>e[n][i]??n,t)}var bo=t=>{const{present:e,children:n}=t,i=bW(e),r=typeof n=="function"?n({present:i.isPresent}):R.Children.only(n),s=yW(i.ref,SW(r));return typeof n=="function"||i.isPresent?R.cloneElement(r,{ref:s}):null};bo.displayName="Presence";function bW(t){const[e,n]=R.useState(),i=R.useRef(null),r=R.useRef(t),s=R.useRef("none"),o=t?"mounted":"unmounted",[a,l]=vW(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const u=Hd(i.current);s.current=a==="mounted"?u:"none"},[a]),Kn(()=>{const u=i.current,c=r.current;if(c!==t){const d=s.current,p=Hd(u);t?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&d!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,l]),Kn(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,h=p=>{const m=Hd(i.current).includes(CSS.escape(p.animationName));if(p.target===e&&m&&(l("ANIMATION_END"),!r.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},d=p=>{p.target===e&&(s.current=Hd(i.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:R.useCallback(u=>{i.current=u?getComputedStyle(u):null,n(u)},[])}}function p5(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function yW(...t){const e=R.useRef(t);return e.current=t,R.useCallback(n=>{const i=e.current;let r=!1;const s=i.map(o=>{const a=p5(o,n);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o{},caller:i}){const[r,s,o]=CW({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:r;{const c=R.useRef(t!==void 0);R.useEffect(()=>{const h=c.current;h!==a&&console.warn(`${i} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,i])}const u=R.useCallback(c=>{if(a){const h=_W(c)?c(t):c;h!==t&&o.current?.(h)}else s(c)},[a,t,s,o]);return[l,u]}function CW({defaultProp:t,onChange:e}){const[n,i]=R.useState(t),r=R.useRef(n),s=R.useRef(e);return wW(()=>{s.current=e},[e]),R.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,i,s]}function _W(t){return typeof t=="function"}var kW=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ml=new WeakMap,Yd=new WeakMap,Gd={},m1=0,jI=function(t){return t&&(t.host||jI(t.parentNode))},EW=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=jI(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},TW=function(t,e,n,i){var r=EW(e,Array.isArray(t)?t:[t]);Gd[n]||(Gd[n]=new WeakMap);var s=Gd[n],o=[],a=new Set,l=new Set(r),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};r.forEach(u);var c=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(d){if(a.has(d))c(d);else try{var p=d.getAttribute(i),g=p!==null&&p!=="false",m=(Ml.get(d)||0)+1,v=(s.get(d)||0)+1;Ml.set(d,m),s.set(d,v),o.push(d),m===1&&g&&Yd.set(d,!0),v===1&&d.setAttribute(n,"true"),g||d.setAttribute(i,"true")}catch(S){console.error("aria-hidden: cannot operate on ",d,S)}})};return c(e),a.clear(),m1++,function(){o.forEach(function(h){var d=Ml.get(h)-1,p=s.get(h)-1;Ml.set(h,d),s.set(h,p),d||(Yd.has(h)||h.removeAttribute(i),Yd.delete(h)),p||h.removeAttribute(n)}),m1--,m1||(Ml=new WeakMap,Ml=new WeakMap,Yd=new WeakMap,Gd={})}},BS=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),r=kW(t);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),TW(i,r,n,"aria-hidden")):function(){return null}},cr=function(){return cr=Object.assign||function(e){for(var n,i=1,r=arguments.length;i"u")return zW;var e=WW(t),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,i-n+e[2]-e[0])}},qW=WI(),cu="data-scroll-locked",HW=function(t,e,n,i){var r=t.left,s=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),` + .`.concat(PW,` { + overflow: hidden `).concat(i,`; + padding-right: `).concat(a,"px ").concat(i,`; + } + body[`).concat(cu,`] { + overflow: hidden `).concat(i,`; + overscroll-behavior: contain; + `).concat([e&&"position: relative ".concat(i,";"),n==="margin"&&` + padding-left: `.concat(r,`px; + padding-top: `).concat(s,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(i,`; + `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(i,";")].filter(Boolean).join(""),` + } + + .`).concat(Wp,` { + right: `).concat(a,"px ").concat(i,`; + } + + .`).concat(Up,` { + margin-right: `).concat(a,"px ").concat(i,`; + } + + .`).concat(Wp," .").concat(Wp,` { + right: 0 `).concat(i,`; + } + + .`).concat(Up," .").concat(Up,` { + margin-right: 0 `).concat(i,`; + } + + body[`).concat(cu,`] { + `).concat(IW,": ").concat(a,`px; + } +`)},m5=function(){var t=parseInt(document.body.getAttribute(cu)||"0",10);return isFinite(t)?t:0},YW=function(){R.useEffect(function(){return document.body.setAttribute(cu,(m5()+1).toString()),function(){var t=m5()-1;t<=0?document.body.removeAttribute(cu):document.body.setAttribute(cu,t.toString())}},[])},GW=function(t){var e=t.noRelative,n=t.noImportant,i=t.gapMode,r=i===void 0?"margin":i;YW();var s=R.useMemo(function(){return UW(r)},[r]);return R.createElement(qW,{styles:HW(s,!e,r,n?"":"!important")})},Lv=!1;if(typeof window<"u")try{var Kd=Object.defineProperty({},"passive",{get:function(){return Lv=!0,!0}});window.addEventListener("test",Kd,Kd),window.removeEventListener("test",Kd,Kd)}catch{Lv=!1}var Ql=Lv?{passive:!1}:!1,KW=function(t){return t.tagName==="TEXTAREA"},UI=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!KW(t)&&n[e]==="visible")},JW=function(t){return UI(t,"overflowY")},eU=function(t){return UI(t,"overflowX")},O5=function(t,e){var n=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=qI(t,i);if(r){var s=HI(t,i),o=s[1],a=s[2];if(o>a)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},tU=function(t){var e=t.scrollTop,n=t.scrollHeight,i=t.clientHeight;return[e,n,i]},nU=function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth;return[e,n,i]},qI=function(t,e){return t==="v"?JW(e):eU(e)},HI=function(t,e){return t==="v"?tU(e):nU(e)},iU=function(t,e){return t==="h"&&e==="rtl"?-1:1},rU=function(t,e,n,i,r){var s=iU(t,window.getComputedStyle(e).direction),o=s*i,a=n.target,l=e.contains(a),u=!1,c=o>0,h=0,d=0;do{if(!a)break;var p=HI(t,a),g=p[0],m=p[1],v=p[2],S=m-v-s*g;(g||S)&&qI(t,a)&&(h+=S,d+=g);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(c&&Math.abs(h)<1||!c&&Math.abs(d)<1)&&(u=!0),u},Jd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},x5=function(t){return[t.deltaX,t.deltaY]},v5=function(t){return t&&"current"in t?t.current:t},sU=function(t,e){return t[0]===e[0]&&t[1]===e[1]},oU=function(t){return` + .block-interactivity-`.concat(t,` {pointer-events: none;} + .allow-interactivity-`).concat(t,` {pointer-events: all;} +`)},aU=0,Dl=[];function lU(t){var e=R.useRef([]),n=R.useRef([0,0]),i=R.useRef(),r=R.useState(aU++)[0],s=R.useState(WI)[0],o=R.useRef(t);R.useEffect(function(){o.current=t},[t]),R.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(r));var m=AW([t.lockRef.current],(t.shards||[]).map(v5),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[t.inert,t.lockRef.current,t.shards]);var a=R.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var S=Jd(m),b=n.current,w="deltaX"in m?m.deltaX:b[0]-S[0],k="deltaY"in m?m.deltaY:b[1]-S[1],C,x=m.target,E=Math.abs(w)>Math.abs(k)?"h":"v";if("touches"in m&&E==="h"&&x.type==="range")return!1;var A=window.getSelection(),I=A&&A.anchorNode,Z=I?I===x||I.contains(x):!1;if(Z)return!1;var U=O5(E,x);if(!U)return!0;if(U?C=E:(C=E==="v"?"h":"v",U=O5(E,x)),!U)return!1;if(!i.current&&"changedTouches"in m&&(w||k)&&(i.current=C),!C)return!0;var W=i.current||C;return rU(W,v,m,W==="h"?w:k)},[]),l=R.useCallback(function(m){var v=m;if(!(!Dl.length||Dl[Dl.length-1]!==s)){var S="deltaY"in v?x5(v):Jd(v),b=e.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&sU(C.delta,S)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(v5).filter(Boolean).filter(function(C){return C.contains(v.target)}),k=w.length>0?a(v,w[0]):!o.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),u=R.useCallback(function(m,v,S,b){var w={name:m,delta:v,target:S,should:b,shadowParent:uU(S)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(k){return k!==w})},1)},[]),c=R.useCallback(function(m){n.current=Jd(m),i.current=void 0},[]),h=R.useCallback(function(m){u(m.type,x5(m),m.target,a(m,t.lockRef.current))},[]),d=R.useCallback(function(m){u(m.type,Jd(m),m.target,a(m,t.lockRef.current))},[]);R.useEffect(function(){return Dl.push(s),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Ql),document.addEventListener("touchmove",l,Ql),document.addEventListener("touchstart",c,Ql),function(){Dl=Dl.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Ql),document.removeEventListener("touchmove",l,Ql),document.removeEventListener("touchstart",c,Ql)}},[]);var p=t.removeScrollBar,g=t.inert;return R.createElement(R.Fragment,null,g?R.createElement(s,{styles:oU(r)}):null,p?R.createElement(GW,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function uU(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const cU=DW(zI,lU);var N0=R.forwardRef(function(t,e){return R.createElement(L0,cr({},t,{ref:e,sideCar:cU}))});N0.classNames=L0.classNames;var M0="Popover",[YI]=vo(M0,[mc]),ld=mc(),[hU,ga]=YI(M0),GI=t=>{const{__scopePopover:e,children:n,open:i,defaultOpen:r,onOpenChange:s,modal:o=!1}=t,a=ld(e),l=R.useRef(null),[u,c]=R.useState(!1),[h,d]=ao({prop:i,defaultProp:r??!1,onChange:s,caller:M0});return q.jsx(DS,{...a,children:q.jsx(hU,{scope:e,contentId:Gs(),triggerRef:l,open:h,onOpenChange:d,onOpenToggle:R.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:u,onCustomAnchorAdd:R.useCallback(()=>c(!0),[]),onCustomAnchorRemove:R.useCallback(()=>c(!1),[]),modal:o,children:n})})};GI.displayName=M0;var KI="PopoverAnchor",JI=R.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,r=ga(KI,n),s=ld(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=r;return R.useEffect(()=>(o(),()=>a()),[o,a]),q.jsx(R0,{...s,...i,ref:e})});JI.displayName=KI;var e$="PopoverTrigger",Q0=R.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,r=ga(e$,n),s=ld(n),o=on(e,r.triggerRef),a=q.jsx(gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":s$(r.open),...i,ref:o,onClick:it(t.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:q.jsx(R0,{asChild:!0,...s,children:a})});Q0.displayName=e$;var jS="PopoverPortal",[fU,dU]=YI(jS,{forceMount:void 0}),t$=t=>{const{__scopePopover:e,forceMount:n,children:i,container:r}=t,s=ga(jS,e);return q.jsx(fU,{scope:e,forceMount:n,children:q.jsx(bo,{present:n||s.open,children:q.jsx(ad,{asChild:!0,container:r,children:i})})})};t$.displayName=jS;var Mu="PopoverContent",D0=R.forwardRef((t,e)=>{const n=dU(Mu,t.__scopePopover),{forceMount:i=n.forceMount,...r}=t,s=ga(Mu,t.__scopePopover);return q.jsx(bo,{present:i||s.open,children:s.modal?q.jsx(gU,{...r,ref:e}):q.jsx(mU,{...r,ref:e})})});D0.displayName=Mu;var pU=Cu("PopoverContent.RemoveScroll"),gU=R.forwardRef((t,e)=>{const n=ga(Mu,t.__scopePopover),i=R.useRef(null),r=on(e,i),s=R.useRef(!1);return R.useEffect(()=>{const o=i.current;if(o)return BS(o)},[]),q.jsx(N0,{as:pU,allowPinchZoom:!0,children:q.jsx(n$,{...t,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:it(t.onCloseAutoFocus,o=>{o.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:it(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,u=a.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:it(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),mU=R.forwardRef((t,e)=>{const n=ga(Mu,t.__scopePopover),i=R.useRef(!1),r=R.useRef(!1);return q.jsx(n$,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||n.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const o=s.target;n.triggerRef.current?.contains(o)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),n$=R.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...h}=t,d=ga(Mu,n),p=ld(n);return LS(),q.jsx($0,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:q.jsx(od,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:c,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),deferPointerDownOutside:!0,children:q.jsx(VS,{"data-state":s$(d.open),role:"dialog",id:d.contentId,...p,...h,ref:e,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),i$="PopoverClose",OU=R.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,r=ga(i$,n);return q.jsx(gt.button,{type:"button",...i,ref:e,onClick:it(t.onClick,()=>r.onOpenChange(!1))})});OU.displayName=i$;var xU="PopoverArrow",r$=R.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,r=ld(n);return q.jsx(FS,{...r,...i,ref:e})});r$.displayName=xU;function s$(t){return t?"open":"closed"}var V0=GI,vU=JI,bU=Q0,F0=t$,o$=D0,B0=r$;function a$(t){const e=t+"CollectionProvider",[n,i]=vo(e),[r,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:v,children:S}=m,b=R.useRef(null),w=R.useRef(new Map).current;return q.jsx(r,{scope:v,itemMap:w,collectionRef:b,children:S})};o.displayName=e;const a=t+"CollectionSlot",l=Cu(a),u=R.forwardRef((m,v)=>{const{scope:S,children:b}=m,w=s(a,S),k=on(v,w.collectionRef);return q.jsx(l,{ref:k,children:b})});u.displayName=a;const c=t+"CollectionItemSlot",h="data-radix-collection-item",d=Cu(c),p=R.forwardRef((m,v)=>{const{scope:S,children:b,...w}=m,k=R.useRef(null),C=on(v,k),x=s(c,S);return R.useEffect(()=>(x.itemMap.set(k,{ref:k,...w}),()=>{x.itemMap.delete(k)})),q.jsx(d,{[h]:"",ref:C,children:b})});p.displayName=c;function g(m){const v=s(t+"CollectionConsumer",m);return R.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((x,E)=>w.indexOf(x.ref.current)-w.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},g,i]}var yU=R.createContext(void 0);function j0(t){const e=R.useContext(yU);return t||e||"ltr"}var b1="rovingFocusGroup.onEntryFocus",SU={bubbles:!1,cancelable:!0},ud="RovingFocusGroup",[Nv,l$,wU]=a$(ud),[CU,Z0]=vo(ud,[wU]),[_U,kU]=CU(ud),u$=R.forwardRef((t,e)=>q.jsx(Nv.Provider,{scope:t.__scopeRovingFocusGroup,children:q.jsx(Nv.Slot,{scope:t.__scopeRovingFocusGroup,children:q.jsx(EU,{...t,ref:e})})}));u$.displayName=ud;var EU=R.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:r=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...h}=t,d=R.useRef(null),p=on(e,d),g=j0(s),[m,v]=ao({prop:o,defaultProp:a??null,onChange:l,caller:ud}),[S,b]=R.useState(!1),w=ta(u),k=l$(n),C=R.useRef(!1),[x,E]=R.useState(0);return R.useEffect(()=>{const A=d.current;if(A)return A.addEventListener(b1,w),()=>A.removeEventListener(b1,w)},[w]),q.jsx(_U,{scope:n,orientation:i,dir:g,loop:r,currentTabStopId:m,onItemFocus:R.useCallback(A=>v(A),[v]),onItemShiftTab:R.useCallback(()=>b(!0),[]),onFocusableItemAdd:R.useCallback(()=>E(A=>A+1),[]),onFocusableItemRemove:R.useCallback(()=>E(A=>A-1),[]),children:q.jsx(gt.div,{tabIndex:S||x===0?-1:0,"data-orientation":i,...h,ref:p,style:{outline:"none",...t.style},onMouseDown:it(t.onMouseDown,()=>{C.current=!0}),onFocus:it(t.onFocus,A=>{const I=!C.current;if(A.target===A.currentTarget&&I&&!S){const Z=new CustomEvent(b1,SU);if(A.currentTarget.dispatchEvent(Z),!Z.defaultPrevented){const U=k().filter(oe=>oe.focusable),W=U.find(oe=>oe.active),B=U.find(oe=>oe.id===m),j=[W,B,...U].filter(Boolean).map(oe=>oe.ref.current);f$(j,c)}}C.current=!1}),onBlur:it(t.onBlur,()=>b(!1))})})}),c$="RovingFocusGroupItem",h$=R.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:r=!1,tabStopId:s,children:o,...a}=t,l=Gs(),u=s||l,c=kU(c$,n),h=c.currentTabStopId===u,d=l$(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=c;return R.useEffect(()=>{if(i)return p(),()=>g()},[i,p,g]),q.jsx(Nv.ItemSlot,{scope:n,id:u,focusable:i,active:r,children:q.jsx(gt.span,{tabIndex:h?0:-1,"data-orientation":c.orientation,...a,ref:e,onMouseDown:it(t.onMouseDown,v=>{i?c.onItemFocus(u):v.preventDefault()}),onFocus:it(t.onFocus,()=>c.onItemFocus(u)),onKeyDown:it(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const S=PU(v,c.orientation,c.dir);if(S!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=d().filter(k=>k.focusable).map(k=>k.ref.current);if(S==="last")w.reverse();else if(S==="prev"||S==="next"){S==="prev"&&w.reverse();const k=w.indexOf(v.currentTarget);w=c.loop?IU(w,k+1):w.slice(k+1)}setTimeout(()=>f$(w))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:m!=null}):o})})});h$.displayName=c$;var TU={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function AU(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function PU(t,e,n){const i=AU(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return TU[i]}function f$(t,e=!1){const n=document.activeElement;for(const i of t)if(i===n||(i.focus({preventScroll:e}),document.activeElement!==n))return}function IU(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var d$=u$,ZS=h$,$U="Separator",b5="horizontal",RU=["horizontal","vertical"],p$=R.forwardRef((t,e)=>{const{decorative:n,orientation:i=b5,...r}=t,s=LU(i)?i:b5,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return q.jsx(gt.div,{"data-orientation":s,...a,...r,ref:e})});p$.displayName=$U;function LU(t){return RU.includes(t)}var NU=p$,g$="Toggle",m$=R.forwardRef((t,e)=>{const{pressed:n,defaultPressed:i,onPressedChange:r,...s}=t,[o,a]=ao({prop:n,onChange:r,defaultProp:i??!1,caller:g$});return q.jsx(gt.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:e,onClick:it(t.onClick,()=>{t.disabled||a(!o)})})});m$.displayName=g$;var ma="ToggleGroup",[O$,x$]=vo(ma,[Z0]),v$=Z0(),XS=R.forwardRef((t,e)=>{const{type:n,...i}=t;if(n==="single"){const r=i;return q.jsx(MU,{role:"radiogroup",...r,ref:e})}if(n==="multiple"){const r=i;return q.jsx(QU,{role:"toolbar",...r,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${ma}\``)});XS.displayName=ma;var[b$,y$]=O$(ma),MU=R.forwardRef((t,e)=>{const{value:n,defaultValue:i,onValueChange:r=()=>{},...s}=t,[o,a]=ao({prop:n,defaultProp:i??"",onChange:r,caller:ma});return q.jsx(b$,{scope:t.__scopeToggleGroup,type:"single",value:R.useMemo(()=>o?[o]:[],[o]),onItemActivate:a,onItemDeactivate:R.useCallback(()=>a(""),[a]),children:q.jsx(S$,{...s,ref:e})})}),QU=R.forwardRef((t,e)=>{const{value:n,defaultValue:i,onValueChange:r=()=>{},...s}=t,[o,a]=ao({prop:n,defaultProp:i??[],onChange:r,caller:ma}),l=R.useCallback(c=>a((h=[])=>[...h,c]),[a]),u=R.useCallback(c=>a((h=[])=>h.filter(d=>d!==c)),[a]);return q.jsx(b$,{scope:t.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:l,onItemDeactivate:u,children:q.jsx(S$,{...s,ref:e})})});XS.displayName=ma;var[DU,VU]=O$(ma),S$=R.forwardRef((t,e)=>{const{__scopeToggleGroup:n,disabled:i=!1,rovingFocus:r=!0,orientation:s,dir:o,loop:a=!0,...l}=t,u=v$(n),c=j0(o),h={dir:c,...l};return q.jsx(DU,{scope:n,rovingFocus:r,disabled:i,children:r?q.jsx(d$,{asChild:!0,...u,orientation:s,dir:c,loop:a,children:q.jsx(gt.div,{...h,ref:e})}):q.jsx(gt.div,{...h,ref:e})})}),Wg="ToggleGroupItem",w$=R.forwardRef((t,e)=>{const n=y$(Wg,t.__scopeToggleGroup),i=VU(Wg,t.__scopeToggleGroup),r=v$(t.__scopeToggleGroup),s=n.value.includes(t.value),o=i.disabled||t.disabled,a={...t,pressed:s,disabled:o},l=R.useRef(null);return i.rovingFocus?q.jsx(ZS,{asChild:!0,...r,focusable:!o,active:s,ref:l,children:q.jsx(y5,{...a,ref:e})}):q.jsx(y5,{...a,ref:e})});w$.displayName=Wg;var y5=R.forwardRef((t,e)=>{const{__scopeToggleGroup:n,value:i,...r}=t,s=y$(Wg,n),o={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},a=s.type==="single"?o:void 0;return q.jsx(m$,{...a,...r,ref:e,onPressedChange:l=>{l?s.onItemActivate(i):s.onItemDeactivate(i)}})}),zS="Toolbar",[FU]=vo(zS,[Z0,x$]),WS=Z0(),C$=x$(),[BU,_$]=FU(zS),k$=R.forwardRef((t,e)=>{const{__scopeToolbar:n,orientation:i="horizontal",dir:r,loop:s=!0,...o}=t,a=WS(n),l=j0(r);return q.jsx(BU,{scope:n,orientation:i,dir:l,children:q.jsx(d$,{asChild:!0,...a,orientation:i,dir:l,loop:s,children:q.jsx(gt.div,{role:"toolbar","aria-orientation":i,dir:l,...o,ref:e})})})});k$.displayName=zS;var E$="ToolbarSeparator",T$=R.forwardRef((t,e)=>{const{__scopeToolbar:n,...i}=t,r=_$(E$,n);return q.jsx(NU,{orientation:r.orientation==="horizontal"?"vertical":"horizontal",...i,ref:e})});T$.displayName=E$;var jU="ToolbarButton",US=R.forwardRef((t,e)=>{const{__scopeToolbar:n,...i}=t,r=WS(n);return q.jsx(ZS,{asChild:!0,...r,focusable:!t.disabled,children:q.jsx(gt.button,{type:"button",...i,ref:e})})});US.displayName=jU;var ZU="ToolbarLink",XU=R.forwardRef((t,e)=>{const{__scopeToolbar:n,...i}=t,r=WS(n);return q.jsx(ZS,{asChild:!0,...r,focusable:!0,children:q.jsx(gt.a,{...i,ref:e,onKeyDown:it(t.onKeyDown,s=>{s.key===" "&&s.currentTarget.click()})})})});XU.displayName=ZU;var A$="ToolbarToggleGroup",P$=R.forwardRef((t,e)=>{const{__scopeToolbar:n,...i}=t,r=_$(A$,n),s=C$(n);return q.jsx(XS,{"data-orientation":r.orientation,dir:r.dir,...s,...i,ref:e,rovingFocus:!1})});P$.displayName=A$;var zU="ToolbarToggleItem",I$=R.forwardRef((t,e)=>{const{__scopeToolbar:n,...i}=t,r=C$(n),s={__scopeToolbar:t.__scopeToolbar};return q.jsx(US,{asChild:!0,...s,children:q.jsx(w$,{...r,...i,ref:e})})});I$.displayName=zU;var qS=k$,$$=T$,Ks=US,X0=P$,qp=I$;function z0(t,e){return t===null||t===e?!1:t.dataset.editorDialog!==void 0||t.dataset.toolbarItem!==void 0||t.dataset.editorDropdown?!0:z0(t.parentElement,e)}function R$(){const t=[...Array(256).keys()].map(n=>n.toString(16).padStart(2,"0")),e=crypto.getRandomValues(new Uint8Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,[...e.entries()].map(([n,i])=>[4,6,8,10].includes(n)?`-${t[i]}`:t[i]).join("")}const L$=t=>t===0?"th":"td",N$={center:G.centeredCell,left:G.leftAlignedCell,right:G.rightAlignedCell},WU=({mdastNode:t,parentEditor:e,lexicalTable:n})=>{const[i,r]=_.useState(null),[s,o]=$t(Jt,In),a=_.useMemo(()=>m=>(m.__cacheKey??(m.__cacheKey=R$()),m.__cacheKey),[]),l=_.useCallback(m=>{const v=n.getColCount();if(m===null){r(null);return}let[S,b]=m;if(S>v-1&&(S=0,b++),S<0&&(S=v-1,b-=1),b>n.getRowCount()-1){r(null),e.update(()=>{if(n.getLatest().getNextSibling())n.getLatest().selectNext();else{const k=yt();n.insertAfter(k),k.select()}});return}if(b<0){r(null),e.update(()=>{n.getLatest().selectPrevious()});return}r([S,b])},[n,e]);_.useEffect(()=>{n.focusEmitter.subscribe(l)},[n,l]);const u=_.useCallback(m=>{m.preventDefault(),e.update(()=>{n.addRowToBottom(),r([0,n.getRowCount()])})},[e,n]),c=_.useCallback(m=>{m.preventDefault(),e.update(()=>{n.addColumnToRight(),r([n.getColCount(),0])})},[e,n]),[h,d]=_.useState([-1,-1]),p=_.useCallback(m=>{let v=m.target;for(;v&&!["TH","TD"].includes(v.tagName);){if(v===m.currentTarget)return;v=v.parentElement}if(v===null)return;const S=v.parentElement,w=S.parentElement.tagName==="TFOOT"?-1:Array.from(S.children).indexOf(v),k=v.tagName==="TH"?-1:Array.from(S.parentElement.children).indexOf(S);d([w,k])},[]),g=Qt();return _.createElement("table",{className:G.tableEditor,onMouseOver:p,onMouseLeave:()=>{d([-1,-1])}},_.createElement("colgroup",null,o?null:_.createElement("col",null),Array.from({length:t.children[0].children.length},(m,v)=>{const b=(t.align??[])[v]??"left",w=N$[b];return _.createElement("col",{key:v,className:w})}),o?null:_.createElement("col",null)),o||_.createElement("thead",null,_.createElement("tr",null,_.createElement("th",{className:G.tableToolsColumn}),Array.from({length:t.children[0].children.length},(m,v)=>_.createElement("th",{key:v,"data-tool-cell":!0},_.createElement(HU,{setActiveCellWithBoundaries:l,parentEditor:e,colIndex:v,highlightedCoordinates:h,lexicalTable:n,align:(t.align??[])[v]}))),_.createElement("th",{className:G.tableToolsColumn,"data-tool-cell":!0},_.createElement("button",{className:G.iconButton,type:"button",title:g("table.deleteTable","Delete table"),onClick:m=>{m.preventDefault(),e.update(()=>{n.selectNext(),n.remove()})}},s("delete_small"))))),_.createElement("tbody",null,t.children.map((m,v)=>{const S=L$(v);return _.createElement("tr",{key:v},o||_.createElement(S,{className:G.toolCell,"data-tool-cell":!0},_.createElement(YU,{setActiveCellWithBoundaries:l,parentEditor:e,rowIndex:v,highlightedCoordinates:h,lexicalTable:n})),m.children.map((b,w)=>{var k;return _.createElement(UU,{align:(k=t.align)==null?void 0:k[w],key:a(b),contents:b.children,setActiveCell:l,rowIndex:v,colIndex:w,lexicalTable:n,parentEditor:e,activeCell:o?[-1,-1]:i})}),o||v===0&&_.createElement("th",{rowSpan:n.getRowCount(),"data-tool-cell":!0},_.createElement("button",{type:"button",className:G.addColumnButton,onClick:c},s("add_column"))))})),o||_.createElement("tfoot",null,_.createElement("tr",null,_.createElement("th",null),_.createElement("th",{colSpan:n.getColCount(),"data-tool-cell":!0},_.createElement("button",{type:"button",className:G.addRowButton,onClick:u},s("add_row"))),_.createElement("th",null))))},UU=({align:t,...e})=>{const{activeCell:n,setActiveCell:i}=e,r=!!(n&&n[0]===e.colIndex&&n[1]===e.rowIndex),s=N$[t??"left"],o=L$(e.rowIndex);return _.createElement(o,{className:s,"data-active":r,onClick:()=>{i([e.colIndex,e.rowIndex])}},_.createElement(qU,{...e,focus:r}))},qU=({focus:t,setActiveCell:e,parentEditor:n,lexicalTable:i,contents:r,colIndex:s,rowIndex:o})=>{const[a,l,u,c,h,d,p,g,m,v]=$t(nd,fc,id,so,tl,vl,Go,dc,Bi,vS),[S]=_.useState(()=>{const w=u0({nodes:u,theme:Jf,namespace:"TableCellEditor"});return w.update(()=>{w0({root:ht(),mdastRoot:{type:"root",children:[{type:"paragraph",children:r}]},visitors:a,jsxComponentDescriptors:c,directiveDescriptors:h,codeBlockEditorDescriptors:d,defaultCodeBlockLanguage:p})}),w}),b=_.useCallback(w=>{S.getEditorState().read(()=>{const k=S0({root:ht(),jsxComponentDescriptors:c,visitors:l,jsxIsAvailable:g});n.update(()=>{i.updateCellContents(s,o,k.children[0].children)},{discrete:!0}),n.dispatchCommand(Yo,void 0)}),e(w)},[s,S,l,c,g,i,n,o,e]);return _.useEffect(()=>ci(S.registerCommand(Mf,w=>{w.preventDefault();const k=w.shiftKey?[s-1,o]:[s+1,o];return b(k),!0},Mi),S.registerCommand(Vf,()=>(e([s,o]),!1),Zt),S.registerCommand(Ua,w=>{w?.preventDefault();const k=w?.shiftKey?[s,o-1]:[s,o+1];return b(k),!0},Mi),S.registerCommand(Ff,w=>{const k=w.relatedTarget;return z0(k,m.getRootElement())?!1:(b(null),!0)},at),S.registerCommand(Yo,()=>(b(null),!0),at)),[s,S,m,o,b,e]),_.useEffect(()=>{t&&S.focus()},[t,S]),_.createElement(PI,{initialEditor:S},_.createElement(_S,{contentEditable:_.createElement(wS,null),placeholder:_.createElement("div",null),ErrorBoundary:CS}),v.map((w,k)=>_.createElement(w,{key:k})),_.createElement(E9,null))},HU=({parentEditor:t,highlightedCoordinates:e,align:n,lexicalTable:i,colIndex:r,setActiveCellWithBoundaries:s})=>{const[o,a]=$t(es,Jt),l=_.useCallback(d=>{t.update(()=>{i.insertColumnAt(d)}),s([d,0])},[t,i,s]),u=_.useCallback(d=>{t.update(()=>{i.deleteColumnAt(d)})},[t,i]),c=_.useCallback((d,p)=>{t.update(()=>{i.setColumnAlign(d,p)})},[t,i]),h=Qt();return _.createElement(V0,null,_.createElement(Q0,{className:G.tableColumnEditorTrigger,"data-active":e[0]===r+1,title:h("table.columnMenu","Column menu")},a("more_horiz")),_.createElement(F0,{container:o?.current},_.createElement(D0,{className:ft(G.tableColumnEditorPopoverContent),onOpenAutoFocus:d=>{d.preventDefault()},sideOffset:5,side:"top"},_.createElement(qS,{className:G.tableColumnEditorToolbar},_.createElement(X0,{className:G.toggleGroupRoot,onValueChange:d=>{c(r,d)},value:n??"left",type:"single","aria-label":h("table.textAlignment","Text alignment")},_.createElement(qp,{value:"left",title:h("table.alignLeft","Align left")},a("format_align_left")),_.createElement(qp,{value:"center",title:h("table.alignCenter","Align center")},a("format_align_center")),_.createElement(qp,{value:"right",title:h("table.alignRight","Align right")},a("format_align_right"))),_.createElement($$,null),_.createElement(Ks,{onClick:l.bind(null,r),title:h("table.insertColumnLeft","Insert a column to the left of this one")},a("insert_col_left")),_.createElement(Ks,{onClick:l.bind(null,r+1),title:h("table.insertColumnRight","Insert a column to the right of this one")},a("insert_col_right")),_.createElement(Ks,{onClick:u.bind(null,r),title:h("table.deleteColumn","Delete this column")},a("delete_small"))),_.createElement(B0,{className:G.popoverArrow}))))},YU=({parentEditor:t,highlightedCoordinates:e,lexicalTable:n,rowIndex:i,setActiveCellWithBoundaries:r})=>{const[s,o]=$t(es,Jt),a=_.useCallback(c=>{t.update(()=>{n.insertRowAt(c)}),r([0,c])},[t,n,r]),l=_.useCallback(c=>{t.update(()=>{n.deleteRowAt(c)})},[t,n]),u=Qt();return _.createElement(V0,null,_.createElement(Q0,{className:G.tableColumnEditorTrigger,"data-active":e[1]===i,title:u("table.rowMenu","Row menu")},o("more_horiz")),_.createElement(F0,{container:s?.current},_.createElement(D0,{className:ft(G.tableColumnEditorPopoverContent),onOpenAutoFocus:c=>{c.preventDefault()},sideOffset:5,side:"bottom"},_.createElement(qS,{className:G.tableColumnEditorToolbar},_.createElement(Ks,{onClick:a.bind(null,i),title:u("table.insertRowAbove","Insert a row above this one")},o("insert_row_above")),_.createElement(Ks,{onClick:a.bind(null,i+1),title:u("table.insertRowBelow","Insert a row below this one")},o("insert_row_below")),_.createElement(Ks,{onClick:l.bind(null,i),title:u("table.deleteRow","Delete this row")},o("delete_small"))),_.createElement(B0,{className:G.popoverArrow}))))};var GU=Object.defineProperty,KU=(t,e,n)=>e in t?GU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,S5=(t,e,n)=>(KU(t,typeof e!="symbol"?e+"":e,n),n);const w5={type:"tableCell",children:[]};function JU(){let t=Ys;return{publish:e=>{t(e)},subscribe:e=>{t=e}}}class Cl extends Cr{constructor(e,n){super(n),S5(this,"__mdastNode"),S5(this,"focusEmitter",JU()),this.__mdastNode=e??{type:"table",children:[]}}static getType(){return"table"}static clone(e){return new Cl(structuredClone(e.__mdastNode),e.__key)}static importJSON(e){return W0(e.mdastNode)}static importDOM(){return{table:()=>({conversion:Q$,priority:3})}}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"table",version:1}}getMdastNode(){return this.__mdastNode}getRowCount(){return this.__mdastNode.children.length}getColCount(){var e;return((e=this.__mdastNode.children[0])==null?void 0:e.children.length)||0}createDOM(){return document.createElement("div")}updateDOM(){return!1}updateCellContents(e,n,i){const s=this.getWritable().__mdastNode,o=s.children[n],a=o.children,l=a[e],u=Array.from(a),c={...l,children:i},h={...o,children:u};u[e]=c,s.children[n]=h}insertColumnAt(e){const i=this.getWritable().__mdastNode;for(let r=0;r0&&i.align.splice(e,0,"left")}deleteColumnAt(e){const i=this.getWritable().__mdastNode;for(let r=0;rstructuredClone(w5))};i.children.splice(e,0,r)}deleteRowAt(e){this.getRowCount()===1?(this.selectNext(),this.remove()):this.getWritable().__mdastNode.children.splice(e,1)}addRowToBottom(){this.insertRowAt(this.getRowCount())}addColumnToRight(){this.insertColumnAt(this.getColCount())}setColumnAlign(e,n){const r=this.getWritable().__mdastNode;r.align??(r.align=[]),r.align[e]=n}decorate(e){return _.createElement(WU,{lexicalTable:this,mdastNode:this.__mdastNode,parentEditor:e})}select(e){this.focusEmitter.publish(e??[0,0])}isInline(){return!1}}function M$(t){return t instanceof Cl}function W0(t){return new Cl(t)}function Q$(t){const e=t.querySelectorAll("tr"),n=Array.from(e).map(i=>({type:"tableRow",children:Array.from(i.querySelectorAll("td, th")).map(r=>({type:"tableCell",children:[{type:"text",value:r.textContent}]}))}));return{node:new Cl({type:"table",children:n})}}const eq={testLexicalNode:M$,visitLexicalNode({actions:t,mdastParent:e,lexicalNode:n}){t.appendToParent(e,n.getMdastNode())}},tq={testNode:"table",visitNode({mdastNode:t,lexicalParent:e}){e.append(W0(t))}};function nq(t=1,e=1){const n={type:"table",children:[]};for(let i=0;i{t.link(t.pipe(HS,Xr(({rows:e,columns:n})=>()=>W0(nq(e,n)))),pc)}),iq=En({init(t,e){t.pubIn({[Jo]:uD(),[Ko]:lD(),[Qi]:tq,[rr]:Cl,[sr]:eq,[bl]:aD({tableCellPadding:e?.tableCellPadding??!0,tablePipeAlign:e?.tablePipeAlign??!0})})}}),rq={testNode:"link",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(oo(t.url,{title:t.title}))}},sq={testLexicalNode:ki,visitLexicalNode:({lexicalNode:t,actions:e})=>{e.addAndStepInto("link",{url:t.getURL(),title:t.getTitle()})}};function oq({validateUrl:t,attributes:e}){const[n]=ui();return R.useEffect((()=>{if(!n.hasNodes([mo]))throw new Error("LinkPlugin: LinkNode not registered on editor");return ci(n.registerCommand(Nu,(i=>{if(i===null)return d1(i),!0;if(typeof i=="string")return!(t!==void 0&&!t(i))&&(d1(i,e),!0);{const{url:r,target:s,rel:o,title:a}=i;return d1(r,{...e,rel:o,target:s,title:a}),!0}}),Zt),t!==void 0?n.registerCommand(nc,(i=>{const r=me();if(!ce(r)||r.isCollapsed()||!No(i,ClipboardEvent)||i.clipboardData===null)return!1;const s=i.clipboardData.getData("text");return!!t(s)&&!r.getNodes().some((o=>te(o)))&&(n.dispatchCommand(Nu,{...e,url:s}),i.preventDefault(),!0)}),Zt):()=>{})}),[n,t,e]),null}function C5(t,e=(n=>n)){return n=>{const i=t.exec(n);return i===null?null:{index:i.index,length:i[0].length,text:i[0],url:e(i[0])}}}function D$(t,e){for(let n=0;n0?Ug(n[t-1]):F$(i[0]))?e0;){const u=l[0],c=u.getTextContent().length,h=a;a+c<=e?(i.push(u),o+=c):h>=n?s.push(u):r.push(u),a+=c,l.shift()}return[o,i,r,s]}function cq(t,e,n,i){const r=Av(i.url,i.attributes);if(t.length===1){let s,o=t[0];e===0?[s,o]=o.splitText(n):[,s,o]=o.splitText(e,n);const a=It(i.text);return a.setFormat(s.getFormat()),a.setDetail(s.getDetail()),a.setStyle(s.getStyle()),r.append(a),s.replace(r),o}if(t.length>1){const s=t[0];let o,a=s.getTextContent().length;e===0?o=s:[,o]=s.splitText(e);const l=[];let u;for(let p=1;p=0;n--)t.insertAfter(e[n]);return t.remove(),e.map((n=>n.getLatest()))}function hq(t,e,n){R.useEffect((()=>{t.hasNodes([I0])||(function(r,...s){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",r);for(const l of s)a.append("v",l);throw o.search=a.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(77);const i=(r,s)=>{n&&n(r,s)};return ci(t.registerNodeTransform(Jr,(r=>{const s=r.getParentOrThrow(),o=r.getPreviousSibling();if(Mr(s)&&!s.getIsUnlinked())y1(s,e,i);else if(!ki(s)){if(r.isSimpleText()&&(Mv(r.getTextContent())||!Mr(o))){const a=(function(l){const u=[l];let c=l.getNextSibling();for(;c!==null&&ye(c)&&c.isSimpleText()&&(u.push(c),!/[\s]/.test(c.getTextContent()));)c=c.getNextSibling();return u})(r);(function(l,u,c){let h=[...l];const d=h.map((v=>v.getTextContent())).join("");let p,g=d,m=0;for(;(p=D$(g,u))&&p!==null;){const v=p.index,S=v+p.length;if(lq(m+v,m+S,d,h)){const[b,,w,k]=uq(h,m+v,m+S),C=cq(w,m+v-b,m+S-b,p);h=C?[C,...k]:k,c(p.url,null),m=0}else m+=S;g=g.substring(S)}})(a,e,i)}(function(a,l,u){const c=a.getPreviousSibling(),h=a.getNextSibling(),d=a.getTextContent();var p;!Mr(c)||c.getIsUnlinked()||Mv(d)&&(p=d,!(c.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(p):/^\.[a-zA-Z0-9]{1,}/.test(p)))||(c.append(a),y1(c,l,u),u(null,c.getURL())),!Mr(h)||h.getIsUnlinked()||V$(d)||(Hp(h),y1(h,l,u),u(null,h.getURL()))})(r,e,i)}})),t.registerCommand(Nu,(r=>{const s=me();return r!==null||!ce(s)||s.extract().forEach((o=>{const a=o.getParent();Mr(a)&&(a.setIsUnlinked(!a.getIsUnlinked()),a.markDirty())})),!1}),Zt))}),[t,e,n])}function fq({matchers:t,onChange:e}){const[n]=ui();return hq(n,t,e),null}const dq=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,pq=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,gq=[C5(dq,t=>t.startsWith("http")?t:`https://${t}`),C5(pq,t=>`mailto:${t}`)],mq=()=>_.createElement(fq,{matchers:gq}),j$=Pe(!1),Oq=En({init(t,e){const n=!!e?.disableAutoLink,i=e?.validateUrl?{validateUrl:e.validateUrl}:{},r=()=>_.createElement(_.Fragment,null,_.createElement(oq,{...i}),n?null:_.createElement(mq,null));t.pubIn({[wl]:"link",[Qi]:rq,[rr]:[mo,I0],[sr]:sq,[j$]:n,[T0]:r,[bS]:r,[go]:r})}});function xq(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,s;for(s=0;s=0)&&(n[r]=t[r]);return n}var vq=["color"],bq=R.forwardRef(function(t,e){var n=t.color,i=n===void 0?"currentColor":n,r=xq(t,vq);return R.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:e}),R.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))});const _5=()=>_.createElement("div",{className:G.imagePlaceholder},_.createElement(bq,null));function Qv(t){const{nodeKey:e,imageSource:n,initialImagePath:i,title:r,alt:s,width:o,height:a}=t,[l,u,c]=$t(yw,Jt,In),[h]=ui(),d=bt(vw),p=Qt();return _.createElement("div",{className:G.editImageToolbar},_.createElement("button",{className:G.iconButton,type:"button",title:p("imageEditor.deleteImage","Delete image"),disabled:c,onClick:g=>{g.preventDefault(),h.update(()=>{var m;(m=At(e))==null||m.remove()})}},u("delete_small")),!l&&_.createElement("button",{type:"button",className:ft(G.iconButton,G.editImageButton),title:p("imageEditor.editImage","Edit image"),disabled:c,onClick:()=>{d({nodeKey:e,initialValues:{src:i??n,title:r,altText:s,width:il(o),height:il(a)}})}},u("settings")))}var U0="Dialog",[Z$]=vo(U0),[yq,ts]=Z$(U0),q0=t=>{const{__scopeDialog:e,children:n,open:i,defaultOpen:r,onOpenChange:s,modal:o=!0}=t,a=R.useRef(null),l=R.useRef(null),[u,c]=ao({prop:i,defaultProp:r??!1,onChange:s,caller:U0});return q.jsx(yq,{scope:e,triggerRef:a,contentRef:l,contentId:Gs(),titleId:Gs(),descriptionId:Gs(),open:u,onOpenChange:c,onOpenToggle:R.useCallback(()=>c(h=>!h),[c]),modal:o,children:n})};q0.displayName=U0;var X$="DialogTrigger",z$=R.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=ts(X$,n),s=on(e,r.triggerRef);return q.jsx(gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":KS(r.open),...i,ref:s,onClick:it(t.onClick,r.onOpenToggle)})});z$.displayName=X$;var YS="DialogPortal",[Sq,W$]=Z$(YS,{forceMount:void 0}),H0=t=>{const{__scopeDialog:e,forceMount:n,children:i,container:r}=t,s=ts(YS,e);return q.jsx(Sq,{scope:e,forceMount:n,children:R.Children.map(i,o=>q.jsx(bo,{present:n||s.open,children:q.jsx(ad,{asChild:!0,container:r,children:o})}))})};H0.displayName=YS;var qg="DialogOverlay",Y0=R.forwardRef((t,e)=>{const n=W$(qg,t.__scopeDialog),{forceMount:i=n.forceMount,...r}=t,s=ts(qg,t.__scopeDialog);return s.modal?q.jsx(bo,{present:i||s.open,children:q.jsx(Cq,{...r,ref:e})}):null});Y0.displayName=qg;var wq=Cu("DialogOverlay.RemoveScroll"),Cq=R.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=ts(qg,n),s=Gz(),o=on(e,s);return q.jsx(N0,{as:wq,allowPinchZoom:!0,shards:[r.contentRef],children:q.jsx(gt.div,{"data-state":KS(r.open),...i,ref:o,style:{pointerEvents:"auto",...i.style}})})}),Qu="DialogContent",G0=R.forwardRef((t,e)=>{const n=W$(Qu,t.__scopeDialog),{forceMount:i=n.forceMount,...r}=t,s=ts(Qu,t.__scopeDialog);return q.jsx(bo,{present:i||s.open,children:s.modal?q.jsx(_q,{...r,ref:e}):q.jsx(kq,{...r,ref:e})})});G0.displayName=Qu;var _q=R.forwardRef((t,e)=>{const n=ts(Qu,t.__scopeDialog),i=R.useRef(null),r=on(e,n.contentRef,i);return R.useEffect(()=>{const s=i.current;if(s)return BS(s)},[]),q.jsx(U$,{...t,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:it(t.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:it(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:it(t.onFocusOutside,s=>s.preventDefault())})}),kq=R.forwardRef((t,e)=>{const n=ts(Qu,t.__scopeDialog),i=R.useRef(!1),r=R.useRef(!1);return q.jsx(U$,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||n.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const o=s.target;n.triggerRef.current?.contains(o)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),U$=R.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,...o}=t,a=ts(Qu,n);return LS(),q.jsx(q.Fragment,{children:q.jsx($0,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:q.jsx(od,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":KS(a.open),...o,ref:e,deferPointerDownOutside:!0,onDismiss:()=>a.onOpenChange(!1)})})})}),q$="DialogTitle",GS=R.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=ts(q$,n);return q.jsx(gt.h2,{id:r.titleId,...i,ref:e})});GS.displayName=q$;var H$="DialogDescription",Eq=R.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=ts(H$,n);return q.jsx(gt.p,{id:r.descriptionId,...i,ref:e})});Eq.displayName=H$;var Y$="DialogClose",K0=R.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=ts(Y$,n);return q.jsx(gt.button,{type:"button",...i,ref:e,onClick:it(t.onClick,()=>r.onOpenChange(!1))})});K0.displayName=Y$;function KS(t){return t?"open":"closed"}var cd=t=>t.type==="checkbox",Ra=t=>t instanceof Date,qn=t=>t==null;const G$=t=>typeof t=="object";var On=t=>!qn(t)&&!Array.isArray(t)&&G$(t)&&!Ra(t),Dv=t=>On(t)&&t.target?cd(t.target)?t.target.checked:t.target.value:t,K$=(t,e)=>e.split(".").some((n,i,r)=>!isNaN(Number(n))&&t.has(r.slice(0,i).join("."))),J$=t=>{const e=t.constructor&&t.constructor.prototype;return On(e)&&e.hasOwnProperty("isPrototypeOf")},J0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Vt(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(J0&&(t instanceof Blob||e))return t;const n=Array.isArray(t);if(!n&&!(On(t)&&J$(t)))return t;const i=n?[]:Object.create(Object.getPrototypeOf(t));for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=Vt(t[r]));return i}const Ao={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},hr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Rr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},e6="root",t6=["__proto__","constructor","prototype"],Tq=/^\w*$/;var hd=t=>Tq.test(t),Nt=t=>t===void 0;const Aq=/[.[\]'"]/;var eO=t=>t.split(Aq).filter(Boolean),_e=(t,e,n)=>{if(!e||!On(t))return n;const i=hd(e)?[e]:eO(e);if(i.some(s=>t6.includes(s)))return n;const r=i.reduce((s,o)=>qn(s)?void 0:s[o],t);return Nt(r)||r===t?Nt(t[e])?n:t[e]:r},Ei=t=>typeof t=="boolean",si=t=>typeof t=="function",Dt=(t,e,n)=>{let i=-1;const r=hd(e)?[e]:eO(e),s=r.length,o=s-1;for(;++i_.useContext(n6);var i6=(t,e,n,i=!0)=>{const r={};for(const s in t)Object.defineProperty(r,s,{get:()=>{const o=s;return e._proxyFormState[o]!==hr.all&&(e._proxyFormState[o]=!i||hr.all),n&&(n[o]=!0),t[o]}});return r};const nO=J0?_.useLayoutEffect:_.useEffect;function Pq(t){const e=tO(),{control:n=e,disabled:i,name:r,exact:s}=t||{},[o,a]=_.useState(()=>({...n._formState,defaultValues:n._defaultValues})),l=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return nO(()=>n._subscribe({name:r,formState:l.current,exact:s,callback:u=>{!i&&a({...n._formState,...u,defaultValues:n._defaultValues})}}),[r,i,s]),_.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),_.useMemo(()=>i6(o,n,l.current,!1),[o,n])}var oi=t=>typeof t=="string",Vv=(t,e,n,i,r)=>oi(t)?(i&&e.watch.add(t),_e(n,t,r)):Array.isArray(t)?t.map(s=>(i&&e.watch.add(s),_e(n,s))):(i&&(e.watchAll=!0),n),Fv=t=>qn(t)||!G$(t);const k5=(t,e)=>e.length===0&&!Array.isArray(t)&&!J$(t);function qi(t,e,n=new WeakMap){if(t===e)return!0;if(Fv(t)||Fv(e))return Object.is(t,e);if(Ra(t)&&Ra(e))return Object.is(t.getTime(),e.getTime());const i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length)return!1;if(k5(t,i)||k5(e,r))return Object.is(t,e);if(!i.length&&Array.isArray(t)!==Array.isArray(e))return!1;const s=n.get(t);if(s&&s.has(e))return!0;if(s)s.add(e);else{const o=new WeakSet;o.add(e),n.set(t,o)}for(const o of i){const a=t[o];if(!(o in e))return!1;if(o!=="ref"){const l=e[o];if(Ra(a)&&Ra(l)||(On(a)||Array.isArray(a))&&(On(l)||Array.isArray(l))?!qi(a,l,n):!Object.is(a,l))return!1}}return!0}function Iq(t){const e=tO(),{control:n=e,name:i,defaultValue:r,disabled:s,exact:o,compute:a}=t||{},l=_.useRef(r),u=_.useRef(a),c=_.useRef(void 0),h=_.useRef(n),d=_.useRef(i);u.current=a;const[p,g]=_.useState(()=>{const k=n._getWatch(i,l.current);return u.current?u.current(k):k}),m=_.useCallback(k=>{const C=Vv(i,n._names,k||n._formValues,!1,l.current);return u.current?u.current(C):C},[n._formValues,n._names,i]),v=_.useCallback(k=>{if(!s){const C=Vv(i,n._names,k||n._formValues,!1,l.current);if(u.current){const x=u.current(C);qi(x,c.current)||(g(x),c.current=x)}else g(C)}},[n._formValues,n._names,s,i]);nO(()=>((h.current!==n||!qi(d.current,i))&&(h.current=n,d.current=i,v()),n._subscribe({name:i,formState:{values:!0},exact:o,callback:k=>{v(k.values)}})),[n,o,i,v]),_.useEffect(()=>n._removeUnmounted());const S=h.current!==n,b=d.current,w=_.useMemo(()=>{if(s)return null;const k=!S&&!qi(b,i);return S||k?m():null},[s,S,i,b,m]);return w!==null?w:p}function $q(t){const e=tO(),{name:n,disabled:i,control:r=e,shouldUnregister:s,defaultValue:o,exact:a=!0}=t,l=K$(r._names.array,n),u=_.useMemo(()=>_e(r._formValues,n,_e(r._defaultValues,n,o)),[r,n,o]),c=Iq({control:r,name:n,defaultValue:u,exact:a}),h=Pq({control:r,name:n,exact:a}),d=_.useRef(t),p=_.useRef(null),g=_.useRef(r.register(n,{...t.rules,value:c,...Ei(t.disabled)?{disabled:t.disabled}:{}}));d.current=t;const m=_.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!_e(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!_e(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!_e(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!_e(h.validatingFields,n)},error:{enumerable:!0,get:()=>_e(h.errors,n)}}),[h,n]),v=_.useCallback(k=>{const C=Dv(k);return _e(r._fields,n)||(g.current=r.register(n,{...d.current.rules,value:C})),g.current.onChange({target:{value:Dv(k),name:n},type:Ao.CHANGE})},[n,r]),S=_.useCallback(()=>g.current.onBlur({target:{value:_e(r._formValues,n),name:n},type:Ao.BLUR}),[n,r._formValues]),b=_.useCallback(k=>{k&&(p.current={focus:()=>si(k.focus)&&k.focus(),select:()=>si(k.select)&&k.select(),setCustomValidity:x=>si(k.setCustomValidity)&&k.setCustomValidity(x),reportValidity:()=>si(k.reportValidity)&&k.reportValidity()});const C=_e(r._fields,n);C&&C._f&&k&&(C._f.ref=p.current)},[r._fields,n]),w=_.useMemo(()=>({name:n,value:c,...Ei(i)||h.disabled?{disabled:h.disabled||i}:{},onChange:v,onBlur:S,ref:b}),[n,i,h.disabled,v,S,b,c]);return _.useEffect(()=>{const k=r._options.shouldUnregister||s;r.register(n,{...d.current.rules,...Ei(d.current.disabled)?{disabled:d.current.disabled}:{}});const C=(x,E)=>{const A=_e(r._fields,x);A&&A._f&&(A._f.mount=E)};if(C(n,!0),k){const x=Vt(_e(s?r._defaultValues:r._options.values||r._defaultValues,n,_e(r._options.defaultValues,n,d.current.defaultValue)));Dt(r._defaultValues,n,x),Nt(_e(r._formValues,n))&&Dt(r._formValues,n,x)}if(!l&&r.register(n),p.current){const x=_e(r._fields,n);x&&x._f&&(x._f.ref=p.current)}return()=>{(l?k&&!r._state.action:k)?r.unregister(n):C(n,!1)}},[n,r,l,s]),_.useEffect(()=>{r._setDisabledField({disabled:i,name:n})},[i,n,r]),_.useMemo(()=>({field:w,formState:h,fieldState:m}),[w,h,m])}const Rq=t=>t.render($q(t)),Lq=_.createContext(null);Lq.displayName="HookFormContext";var Nq=(t,e,n,i,r)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[i]:r||!0}}:{},JS=t=>Array.isArray(t)?t.filter(Boolean):[],Ki=t=>Array.isArray(t)?t:[t],E5=()=>{let t=[];return{get observers(){return t},next:r=>{for(const s of t)s.next&&s.next(r)},subscribe:r=>(t.push(r),{unsubscribe:()=>{t=t.filter(s=>s!==r)}}),unsubscribe:()=>{t=[]}}};function r6(t,e){const n={};for(const i in t)if(t.hasOwnProperty(i)){const r=t[i],s=e[i];if(r&&On(r)&&s){const o=r6(r,s);On(o)&&(n[i]=o)}else t[i]&&(n[i]=s)}return n}var Dn=t=>On(t)&&!Object.keys(t).length,ew=t=>t.type==="file",Hg=t=>{if(!J0)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},s6=t=>t.type==="select-multiple",tw=t=>t.type==="radio",Mq=t=>tw(t)||cd(t),S1=t=>Hg(t)&&t.isConnected;function Qq(t,e){const n=e.slice(0,-1).length;let i=0;for(;i{for(const e in t)if(si(t[e]))return!0;return!1};function o6(t){return Array.isArray(t)||On(t)&&!Vq(t)}function Bv(t,e={}){for(const n in t){const i=t[n];o6(i)?(e[n]=Array.isArray(i)?[]:{},Bv(i,e[n])):Nt(i)||(e[n]=!0)}return e}function jv(t){if(t!==!1){if(t===!0)return!0;if(Array.isArray(t)){const e=t.map(n=>jv(n));return e.some(n=>n!==void 0)?e:void 0}if(On(t)){const e={};for(const n in t){const i=jv(t[n]);Nt(i)||(e[n]=i)}return Object.keys(e).length?e:void 0}}}function Ea(t,e,n){n||(n=Bv(e));for(const i in t){const r=t[i];if(o6(r))Nt(e)||Fv(n[i])?n[i]=Bv(r,Array.isArray(r)?[]:{}):Ea(r,qn(e)?{}:e[i],n[i]);else{const s=e[i];n[i]=!qi(r,s)}}return jv(n)||{}}const T5={value:!1,isValid:!1},A5={value:!0,isValid:!0};var a6=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Nt(t[0].attributes.value)?Nt(t[0].value)||t[0].value===""?A5:{value:t[0].value,isValid:!0}:A5:T5}return T5},l6=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:i})=>Nt(t)?t:e?t===""?NaN:t&&+t:n&&oi(t)?new Date(t):i?i(t):t;const P5={isValid:!1,value:null};var u6=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,P5):P5;function I5(t){const e=t.ref;return ew(e)?e.files:tw(e)?u6(t.refs).value:s6(e)?[...e.selectedOptions].map(({value:n})=>n):cd(e)?a6(t.refs).value:l6(Nt(e.value)?t.ref.value:e.value,t)}var Fq=(t,e,n,i)=>{const r={};for(const s of t){const o=_e(e,s);o&&Dt(r,s,o._f)}return{criteriaMode:n,names:[...t],fields:r,shouldUseNativeValidation:i}},Yg=t=>t instanceof RegExp,Bc=t=>Nt(t)?t:Yg(t)?t.source:On(t)?Yg(t.value)?t.value.source:t.value:t,Qo=t=>({isOnSubmit:!t||t===hr.onSubmit,isOnBlur:t===hr.onBlur,isOnChange:t===hr.onChange,isOnAll:t===hr.all,isOnTouch:t===hr.onTouched});const $5="AsyncFunction";var Bq=t=>{if(!t||!t.validate)return!1;if(si(t.validate))return t.validate.constructor.name===$5;if(On(t.validate)){for(const e in t.validate)if(t.validate[e].constructor.name===$5)return!0}return!1},jq=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Yp=(t,e,n)=>{if(n)return!1;if(e.watchAll||e.watch.has(t))return!0;for(const i of e.watch)if(t.startsWith(i)&&t.charAt(i.length)===".")return!0;return!1};const hu=(t,e,n,i)=>{for(const r of n||Object.keys(t)){const s=_e(t,r);if(s){const{_f:o,...a}=s;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],r)&&!i)return!0;if(o.ref&&e(o.ref,o.name)&&!i)return!0;if(hu(a,e))break}else if(On(a)&&hu(a,e))break}}};function R5(t,e,n){const i=_e(t,n);if(i||hd(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const s=r.join("."),o=_e(e,s),a=_e(t,s);if(o&&!Array.isArray(o)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};r.pop()}return{name:n}}var Zq=(t,e,n,i)=>{n(t);const{name:r,...s}=t,o=Object.keys(s);return!o.length||i&&o.length>=Object.keys(e).length||o.find(a=>e[a]===(!i||hr.all))},Xq=(t,e,n)=>!t||!e||t===e||Ki(t).some(i=>i&&(n?i===e:i.startsWith(e)||e.startsWith(i))),zq=(t,e,n,i,r)=>r.isOnAll?!1:!n&&r.isOnTouch?!(e||t):(n?i.isOnBlur:r.isOnBlur)?!t:(n?i.isOnChange:r.isOnChange)?t:!0,Wq=(t,e)=>!JS(_e(t,e)).length&&Cn(t,e),Zv=(t,e,n)=>{const i=_e(t,n),r=Array.isArray(i)?i:[];return Dt(r,e6,e[n]),Dt(t,n,r),t};function L5(t,e,n="validate"){if(oi(t)||Array.isArray(t)&&t.every(oi)||Ei(t)&&!t)return{type:n,message:oi(t)?t:"",ref:e}}var Vl=t=>On(t)&&!Yg(t)?t:{value:t,message:""},Xv=async(t,e,n,i,r,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:p,validate:g,name:m,valueAsNumber:v,mount:S}=t._f,b=_e(n,m);if(!S||e.has(m))return{};const w=a?a[0]:o,k=W=>{if(r&&w.reportValidity){const B=Ei(W)?"":W||"";a?a.forEach(ne=>ne.setCustomValidity(B)):w.setCustomValidity(B),w.reportValidity()}},C={},x=tw(o),E=cd(o),A=x||E,I=(v||ew(o))&&Nt(o.value)&&Nt(b)||Hg(o)&&o.value===""||b===""||Array.isArray(b)&&!b.length,Z=Nq.bind(null,m,i,C),U=(W,B,ne,j=Rr.maxLength,oe=Rr.minLength)=>{const pe=W?B:ne;C[m]={type:W?j:oe,message:pe,ref:o,...Z(W?j:oe,pe)}};if(s?!Array.isArray(b)||!b.length:l&&(!A&&(I||qn(b))||Ei(b)&&!b||E&&!a6(a).isValid||x&&!u6(a).isValid)){const{value:W,message:B}=oi(l)?{value:!!l,message:l}:Vl(l);if(W&&(C[m]={type:Rr.required,message:B,ref:w,...Z(Rr.required,B)},!i))return k(B),C}if(!I&&(!qn(h)||!qn(d))){let W,B;const ne=Vl(d),j=Vl(h);if(!qn(b)&&!isNaN(b)){const oe=o.valueAsNumber||b&&+b;qn(ne.value)||(W=oe>ne.value),qn(j.value)||(B=oenew Date(new Date().toDateString()+" "+Ee),re=o.type=="time",ke=o.type=="week";oi(ne.value)&&b&&(W=re?pe(b)>pe(ne.value):ke?b>ne.value:oe>new Date(ne.value)),oi(j.value)&&b&&(B=re?pe(b)+W.value,j=!qn(B.value)&&b.length<+B.value;if((ne||j)&&(U(ne,W.message,B.message),!i))return k(C[m].message),C}if(p&&!I&&oi(b)){const{value:W,message:B}=Vl(p);if(Yg(W)&&!b.match(W)&&(C[m]={type:Rr.pattern,message:B,ref:o,...Z(Rr.pattern,B)},!i))return k(B),C}if(g){if(si(g)){const W=await g(b,n),B=L5(W,w);if(B&&(C[m]={...B,...Z(Rr.validate,B.message)},!i))return k(B.message),C}else if(On(g)){let W={};for(const B in g){if(!Dn(W)&&!i)break;const ne=L5(await g[B](b,n),w,B);ne&&(W={...ne,...Z(B,ne.message)},k(ne.message),i&&(C[m]=W))}if(!Dn(W)&&(C[m]={ref:w,...W},!i))return C}}return k(!0),C};const Uq={mode:hr.onSubmit,reValidateMode:hr.onChange,shouldFocusError:!0},w1="form",c6={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function qq(t={}){let e={...Uq,...t},n={...Vt(c6),isLoading:si(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1},i={},r=On(e.defaultValues)||On(e.values)?Vt(e.defaultValues||e.values)||{}:{},s=e.shouldUnregister?{}:Vt(r),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},l,u=0,c=0,h=Qo(e.mode),d=Qo(e.reValidateMode);const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={...p};let m={...g};const v={array:E5(),state:E5()},S=e.criteriaMode===hr.all,b=O=>L=>{clearTimeout(u),u=setTimeout(O,L)},w=async O=>{if(!o.keepIsValid&&!e.disabled&&(g.isValid||m.isValid||O)){let L;e.resolver?(L=Dn((await B()).errors),k()):L=await oe({fields:i,onlyCheckValid:!0,eventType:Ao.VALID}),L!==n.isValid&&v.state.next({isValid:L})}},k=(O,L)=>{!e.disabled&&(g.isValidating||g.validatingFields||m.isValidating||m.validatingFields)&&((O||Array.from(a.mount)).forEach(M=>{M&&(L?Dt(n.validatingFields,M,L):Cn(n.validatingFields,M))}),v.state.next({validatingFields:n.validatingFields,isValidating:!Dn(n.validatingFields)}))},C=()=>{n.dirtyFields=Ea(r,s)},x=(O,L=[],M,F,z=!0,H=!0)=>{if(F&&M&&!e.disabled){if(o.action=!0,H&&Array.isArray(_e(i,O))){const P=M(_e(i,O),F.argA,F.argB);z&&Dt(i,O,P)}if(H&&Array.isArray(_e(n.errors,O))){const P=M(_e(n.errors,O),F.argA,F.argB);z&&Dt(n.errors,O,P),Wq(n.errors,O)}if((g.touchedFields||m.touchedFields)&&H&&Array.isArray(_e(n.touchedFields,O))){const P=M(_e(n.touchedFields,O),F.argA,F.argB);z&&Dt(n.touchedFields,O,P)}(g.dirtyFields||m.dirtyFields)&&C(),v.state.next({name:O,isDirty:re(O,L),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Dt(s,O,L)},E=(O,L)=>{Dt(n.errors,O,L),n.errors={...n.errors},v.state.next({errors:n.errors})},A=O=>{n.errors=O,v.state.next({errors:n.errors,isValid:!1})},I=O=>{const L=hd(O)?[O]:eO(O);let M=s,F=r;for(let z=0;z{const z=_e(i,O);if(z){if(I(O))return;const H=Nt(_e(s,O)),P=_e(s,O,Nt(M)?_e(r,O):M);Nt(P)||F&&F.defaultChecked||L?Dt(s,O,L?P:I5(z._f)):De(O,P),o.mount&&!o.action&&(w(),H&&n.isDirty&&(g.isDirty||m.isDirty)&&(re()||(n.isDirty=!1,v.state.next({...n}))),t.shouldUnregister&&H&&!Nt(_e(s,O))&&Yp(O,a)&&(o.watch=!0))}},U=(O,L,M,F,z)=>{let H=!1,P=!1;const X={name:O};if(!e.disabled){if(!M||F){const J=qi(_e(r,O),L);(g.isDirty||m.isDirty)&&(P=n.isDirty,n.isDirty=X.isDirty=!J||re(),H=P!==X.isDirty),P=!!_e(n.dirtyFields,O),J!==n.isDirty?n.dirtyFields=Ea(r,s):J?Cn(n.dirtyFields,O):Dt(n.dirtyFields,O,!0),X.dirtyFields=n.dirtyFields,H=H||(g.dirtyFields||m.dirtyFields)&&P!==!J}if(M){const J=_e(n.touchedFields,O);J||(Dt(n.touchedFields,O,M),X.touchedFields=n.touchedFields,H=H||(g.touchedFields||m.touchedFields)&&J!==M)}H&&z&&v.state.next(X)}return H?X:{}},W=(O,L,M,F)=>{const z=_e(n.errors,O),H=(g.isValid||m.isValid)&&Ei(L)&&n.isValid!==L;if(e.delayError&&M?(l=b(()=>E(O,M)),l(e.delayError)):(clearTimeout(u),l=null,M?Dt(n.errors,O,M):Cn(n.errors,O),n.errors={...n.errors}),(M?!qi(z,M):z)||!Dn(F)||H){const P={...F,...H&&Ei(L)?{isValid:L}:{},errors:n.errors,name:O};n={...n,...P},v.state.next(P)}},B=async O=>(k(O,!0),await e.resolver(s,e.context,Fq(O||a.mount,i,e.criteriaMode,e.shouldUseNativeValidation))),ne=async O=>{const{errors:L}=await B(O);if(k(O),O){for(const M of O){const F=_e(L,M);F?a.array.has(M)&&On(F)&&!Object.keys(F).some(z=>!Number.isNaN(Number(z)))?Zv(n.errors,{[M]:F},M):Dt(n.errors,M,F):Cn(n.errors,M)}n.errors={...n.errors}}else n.errors=L;return L},j=async({name:O,eventType:L})=>{if(t.validate){const M=await t.validate({formValues:s,formState:n,name:O,eventType:L});if(On(M))for(const F in M){const z=M[F];z&&Ke(`${w1}.${F}`,{message:oi(z.message)?z.message:"",type:z.type||Rr.validate})}else oi(M)||!M?Ke(w1,{message:M||"",type:Rr.validate}):Le(w1);return M}return!0},oe=async({fields:O,onlyCheckValid:L,name:M,eventType:F,context:z={valid:!0,runRootValidation:!1}})=>{if(t.validate&&(z.runRootValidation=!0,!await j({name:M,eventType:F})&&(z.valid=!1,L)))return z.valid;for(const H in O){const P=O[H];if(P){const{_f:X,...J}=P;if(X){const ie=a.array.has(X.name),le=P._f&&Bq(P._f),fe=g.validatingFields||g.isValidating||m.validatingFields||m.isValidating;le&&fe&&k([X.name],!0);const ue=await Xv(P,a.disabled,s,S,e.shouldUseNativeValidation&&!L,ie);if(le&&fe&&k([X.name]),ue[X.name]&&(z.valid=!1,L)||(!L&&(_e(ue,X.name)?ie?Zv(n.errors,ue,X.name):Dt(n.errors,X.name,ue[X.name]):Cn(n.errors,X.name)),t.shouldUseNativeValidation&&ue[X.name]))break}!Dn(J)&&await oe({context:z,onlyCheckValid:L,fields:J,name:H,eventType:F})}}return z.valid},pe=()=>{for(const O of a.unMount){const L=_e(i,O);L&&(L._f.refs?L._f.refs.every(M=>!S1(M)):!S1(L._f.ref))&&Ft(O)}a.unMount=new Set},re=(O,L)=>!e.disabled&&(O&&L&&Dt(s,O,L),!qi(o.mount?s:r,r)),ke=(O,L,M)=>Vv(O,a,{...o.mount?s:Nt(L)?r:oi(O)?{[O]:L}:L},M,L),Ee=O=>JS(_e(o.mount?s:r,O,e.shouldUnregister?_e(r,O,[]):[])),De=(O,L,M={},F=!1,z=!1)=>{const H=_e(i,O);let P=L;if(H){const X=H._f;X&&(!X.disabled&&Dt(s,O,l6(L,X)),P=Hg(X.ref)&&qn(L)?"":L,s6(X.ref)?[...X.ref.options].forEach(J=>J.selected=P.includes(J.value)):X.refs?cd(X.ref)?X.refs.forEach(J=>{(!J.defaultChecked||!J.disabled)&&(Array.isArray(P)?J.checked=!!P.find(ie=>ie===J.value):J.checked=P===J.value||!!P)}):X.refs.forEach(J=>J.checked=J.value===P):ew(X.ref)?X.ref.value="":(X.ref.value=P,!X.ref.type&&!z&&v.state.next({name:O,values:F?s:Vt(s)})))}(M.shouldDirty||M.shouldTouch)&&U(O,P,M.shouldTouch,M.shouldDirty,!z),M.shouldValidate&&xe(O)},Ie=(O,L,M,F=!1,z=!1)=>{for(const H in L){if(!L.hasOwnProperty(H))return;const P=L[H],X=O+"."+H,J=_e(i,X);(a.array.has(O)||On(P)||J&&!J._f)&&!Ra(P)?Ie(X,P,M,F,z):De(X,P,M,F,z)}},Ue=(O,L,M,F,z=!1)=>{const H=_e(i,O),P=a.array.has(O),X=F?L:Vt(L),J=_e(s,O),ie=qi(J,X);if(ie||Dt(s,O,X),P)v.array.next({name:O,values:F?s:Vt(s)}),(g.isDirty||g.dirtyFields||m.isDirty||m.dirtyFields)&&M.shouldDirty&&(C(),z||v.state.next({name:O,dirtyFields:n.dirtyFields,isDirty:re(O,X)}));else{const le=Array.isArray(X)&&!X.length||Dn(X);!H||H._f||qn(X)||le?De(O,X,M,F,z):Ie(O,X,M,F,z)}if(!ie&&!z){const le=Yp(O,a),fe=F?s:Vt(s);v.state.next({...le&&n,name:o.mount||le?O:void 0,values:fe})}},qe=(O,L,M={})=>Ue(O,L,M,!1),Ye=(O,L={})=>{const M=si(O)?O(s):O;if(!qi(s,M)){s={...s,...M};for(const F of a.mount)Ue(F,_e(M,F),L,!0,!0);v.state.next({...n,name:void 0,type:void 0,...c?{values:s}:{}}),L.shouldValidate&&w()}},Ge=async O=>{o.mount=!0;const L=O.target;let M=L.name,F=!0;const z=_e(i,M),H=P=>{F=Number.isNaN(P)||Ra(P)&&isNaN(P.getTime())||qi(P,_e(s,M,P))};if(z){let P,X;const J=L.type?I5(z._f):Dv(O),ie=O.type===Ao.BLUR||O.type===Ao.FOCUS_OUT,le=!jq(z._f)&&!t.validate&&!e.resolver&&!_e(n.errors,M)&&!z._f.deps,fe=le||zq(ie,_e(n.touchedFields,M),n.isSubmitted,d,h),ue=Yp(M,a,ie);Dt(s,M,J),ie?(!L||!L.readOnly)&&(z._f.onBlur&&z._f.onBlur(O),l&&l(0)):z._f.onChange&&z._f.onChange(O);const Te=U(M,J,ie),ve=!Dn(Te)||ue;if(!ie&&v.state.next({name:M,type:O.type,...c?{values:Vt(s)}:{}}),fe)return(!le||!n.isValid)&&(g.isValid||m.isValid)&&(e.mode==="onBlur"?ie&&w():ie||w()),ve&&v.state.next({name:M,...ue?{}:Te});if(!e.resolver&&t.validate&&await j({name:M,eventType:O.type}),!ie&&ue&&v.state.next({...n}),e.resolver){const{errors:Fe}=await B([M]);if(k([M]),H(J),!F){!Dn(Te)&&v.state.next(Te);return}const ge=R5(n.errors,i,M),ut=R5(Fe,i,ge.name||M);P=ut.error,M=ut.name,X=Dn(Fe)}else k([M],!0),P=(await Xv(z,a.disabled,s,S,e.shouldUseNativeValidation))[M],k([M]),H(J),F&&(P?X=!1:(g.isValid||m.isValid)&&(X=await oe({fields:i,onlyCheckValid:!0,name:M,eventType:O.type})));F&&(z._f.deps&&(!Array.isArray(z._f.deps)||z._f.deps.length>0)&&xe(z._f.deps),W(M,X,P,Te))}},he=(O,L)=>{if(_e(n.errors,L)&&O.focus)return O.focus(),1},xe=async(O,L={})=>{let M,F;const z=Ki(O);if(e.resolver){const H=await ne(Nt(O)?O:z);M=Dn(H),F=O?!z.some(P=>_e(H,P)):M}else O?(F=(await Promise.all(z.map(async H=>{const P=_e(i,H);return await oe({fields:P&&P._f?{[H]:P}:P,eventType:Ao.TRIGGER})}))).every(Boolean),!(!F&&!n.isValid)&&w()):F=M=await oe({fields:i,name:O,eventType:Ao.TRIGGER});return v.state.next({...!oi(O)||(g.isValid||m.isValid)&&M!==n.isValid?{}:{name:O},...e.resolver||!O?{isValid:M}:{},errors:n.errors}),L.shouldFocus&&!F&&hu(i,he,O?z:a.mount),F},Ce=(O,L)=>{let M={...o.mount?s:r};return L&&(M=r6(L.dirtyFields?n.dirtyFields:n.touchedFields,M)),Nt(O)?M:oi(O)?_e(M,O):O.map(F=>_e(M,F))},$e=(O,L)=>({invalid:!!_e((L||n).errors,O),isDirty:!!_e((L||n).dirtyFields,O),error:_e((L||n).errors,O),isValidating:!!_e(n.validatingFields,O),isTouched:!!_e((L||n).touchedFields,O)}),Le=O=>{const L=O?Ki(O):void 0;L?.forEach(M=>Cn(n.errors,M)),L?L.forEach(M=>{v.state.next({name:M,errors:n.errors})}):v.state.next({errors:{}})},Ke=(O,L,M)=>{const F=(_e(i,O,{_f:{}})._f||{}).ref,z=_e(n.errors,O)||{},{ref:H,message:P,type:X,...J}=z;Dt(n.errors,O,{...J,...L,ref:F}),v.state.next({name:O,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&F&&F.focus&&F.focus()},lt=(O,L)=>{if(si(O)){c++;const{unsubscribe:M}=v.state.subscribe({next:z=>"values"in z&&O(z.values||ke(void 0,L),z)});let F=!1;return{unsubscribe:()=>{F||(F=!0,c--,M())}}}return ke(O,L,!0)},St=O=>{var L;const M=!!(!((L=O.formState)===null||L===void 0)&&L.values);M&&c++;const{unsubscribe:F}=v.state.subscribe({next:H=>{if(Xq(O.name,H.name,O.exact)&&Zq(H,O.formState||g,yi,O.reRenderRoot)){const P={...s};O.callback({values:P,...n,...H,defaultValues:r})}}});if(!M)return F;let z=!1;return()=>{z||(z=!0,c--,F())}},zt=O=>(o.mount=!0,m={...m,...O.formState},St({...O,formState:{...p,...O.formState}})),Ft=(O,L={})=>{for(const M of O?Ki(O):a.mount)a.mount.delete(M),a.array.delete(M),L.keepValue||(Cn(i,M),Cn(s,M)),!L.keepError&&Cn(n.errors,M),!L.keepDirty&&Cn(n.dirtyFields,M),!L.keepTouched&&Cn(n.touchedFields,M),!L.keepIsValidating&&Cn(n.validatingFields,M),!e.shouldUnregister&&!L.keepDefaultValue&&Cn(r,M);v.state.next({values:Vt(s)}),v.state.next({...n,...L.keepDirty?{isDirty:re()}:{}}),!L.keepIsValid&&w()},Rt=({disabled:O,name:L})=>{if(Ei(O)&&o.mount||O||a.disabled.has(L)){const z=a.disabled.has(L)!==!!O;O?a.disabled.add(L):a.disabled.delete(L),z&&o.mount&&!o.action&&w()}},Sn=(O,L={})=>{let M=_e(i,O);const F=Ei(L.disabled)||Ei(e.disabled),z=!a.registerName.has(O)&&M&&M._f&&!M._f.mount;return Dt(i,O,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:O}},name:O,mount:!0,...L}}),a.mount.add(O),M&&!z?Rt({disabled:Ei(L.disabled)?L.disabled:e.disabled,name:O}):Z(O,!0,L.value),{...F?{disabled:L.disabled||e.disabled}:{},...e.progressive?{required:!!L.required,min:Bc(L.min),max:Bc(L.max),minLength:Bc(L.minLength),maxLength:Bc(L.maxLength),pattern:Bc(L.pattern)}:{},name:O,onChange:Ge,onBlur:Ge,ref:H=>{if(H){a.registerName.add(O),Sn(O,L),a.registerName.delete(O),M=_e(i,O);const P=Nt(H.value)&&H.querySelectorAll&&H.querySelectorAll("input,select,textarea")[0]||H,X=Mq(P),J=M._f.refs||[];if(X?J.find(ie=>ie===P):P===M._f.ref)return;Dt(i,O,{_f:{...M._f,...X?{refs:[...J.filter(S1),P,...Array.isArray(_e(r,O))?[{}]:[]],ref:{type:P.type,name:O}}:{ref:P}}}),Z(O,!1,void 0,P)}else M=_e(i,O,{}),M._f&&(M._f.mount=!1),(e.shouldUnregister||L.shouldUnregister)&&!(K$(a.array,O)&&o.action)&&a.unMount.add(O)}}},Wt=()=>e.shouldFocusError&&!e.shouldUseNativeValidation&&hu(i,he,a.mount),Ln=O=>{Ei(O)&&(v.state.next({disabled:O}),hu(i,(L,M)=>{const F=_e(i,M);F&&(L.disabled=F._f.disabled||O,Array.isArray(F._f.refs)&&F._f.refs.forEach(z=>{z.disabled=F._f.disabled||O}))},0,!1))},cn=(O,L)=>async M=>{let F;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let z=Vt(s);if(v.state.next({isSubmitting:!0}),e.resolver){const{errors:H,values:P}=await B();k(),n.errors=H,z=Vt(P)}else await oe({fields:i,eventType:Ao.SUBMIT});if(a.disabled.size)for(const H of a.disabled)Cn(z,H);if(Cn(n.errors,e6),Dn(n.errors)){v.state.next({errors:{}});try{await O(z,M)}catch(H){F=H}}else L&&await L({...n.errors},M),Wt(),setTimeout(Wt);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Dn(n.errors)&&!F,submitCount:n.submitCount+1,errors:n.errors}),F)throw F},Wn=(O,L={})=>{_e(i,O)&&(Nt(L.defaultValue)?qe(O,Vt(_e(r,O))):(qe(O,L.defaultValue),Dt(r,O,Vt(L.defaultValue))),L.keepTouched||Cn(n.touchedFields,O),L.keepDirty||(Cn(n.dirtyFields,O),n.isDirty=L.defaultValue?re(O,Vt(_e(r,O))):re()),L.keepError||(Cn(n.errors,O),g.isValid&&w()),v.state.next({...n}))},wn=(O,L={})=>{const M=O?Vt(O):r,F=Vt(M),z=Dn(O),H=F;if(L.keepDefaultValues||(r=M),!L.keepValues){if(L.keepDirtyValues){const P=new Set([...a.mount,...Object.keys(Ea(r,s))]);for(const X of Array.from(P)){const J=_e(n.dirtyFields,X),ie=_e(s,X),le=_e(H,X);J&&!Nt(ie)?Dt(H,X,ie):!J&&!Nt(le)&&qe(X,le)}}else{if(J0&&Nt(O))for(const P of a.mount){const X=_e(i,P);if(X&&X._f){const J=Array.isArray(X._f.refs)?X._f.refs[0]:X._f.ref;if(Hg(J)){const ie=J.closest("form");if(ie){ie.reset();break}}}}if(L.keepFieldsRef)for(const P of a.mount)qe(P,_e(H,P));else i={}}if(e.shouldUnregister){if(s=L.keepDefaultValues?Vt(r):{},L.keepFieldsRef)for(const P of a.mount)Dt(s,P,_e(H,P))}else s=Vt(H);v.array.next({values:{...H}}),v.state.next({values:{...H}})}a={mount:L.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!g.isValid||!!L.keepIsValid||!!L.keepDirtyValues||!e.shouldUnregister&&!Dn(H),o.watch=!!e.shouldUnregister,o.keepIsValid=!!L.keepIsValid,o.action=!1,L.keepErrors||(n.errors={}),v.state.next({submitCount:L.keepSubmitCount?n.submitCount:0,isDirty:z?!1:L.keepDirty?n.isDirty:L.keepValues?re():!!(L.keepDefaultValues&&!qi(O,r)),isSubmitted:L.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:z?{}:L.keepDirtyValues?L.keepDefaultValues&&s?Ea(r,s):n.dirtyFields:L.keepDefaultValues&&O?Ea(r,O):L.keepDirty?n.dirtyFields:{},touchedFields:L.keepTouched?n.touchedFields:{},errors:L.keepErrors?n.errors:{},isSubmitSuccessful:L.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:r})},st=(O,L)=>wn(si(O)?O(s):O,{...e.resetOptions,...L}),en=(O,L={})=>{const M=_e(i,O),F=M&&M._f;if(F){const z=F.refs?F.refs[0]:F.ref;z.focus&&setTimeout(()=>{z.focus(),L.shouldSelect&&si(z.select)&&z.select()})}},yi=O=>{n={...n,...O}},Et={control:{register:Sn,unregister:Ft,getFieldState:$e,handleSubmit:cn,setError:Ke,_subscribe:St,_runSchema:B,_updateIsValidating:k,_focusError:Wt,_getWatch:ke,_getDirty:re,_setValid:w,_setFieldArray:x,_setDisabledField:Rt,_setErrors:A,_getFieldArray:Ee,_reset:wn,_resetDefaultValues:()=>si(e.defaultValues)&&e.defaultValues().then(O=>{st(O,e.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:pe,_disableForm:Ln,_subjects:v,_proxyFormState:g,get _fields(){return i},get _formValues(){return s},get _state(){return o},set _state(O){o=O},get _defaultValues(){return r},get _names(){return a},set _names(O){a=O},get _formState(){return n},get _options(){return e},set _options(O){e={...e,...O},h=Qo(e.mode),d=Qo(e.reValidateMode)}},subscribe:zt,trigger:xe,register:Sn,handleSubmit:cn,watch:lt,setValue:qe,setValues:Ye,getValues:Ce,reset:st,resetField:Wn,resetDefaultValues:(O,L={})=>{if(r=Vt(O),!L.keepDirty){const M=Ea(r,s);n.dirtyFields=M,n.isDirty=!Dn(M)}L.keepIsValid||w(),v.state.next({...n,defaultValues:r})},clearErrors:Le,unregister:Ft,setError:Ke,setFocus:en,getFieldState:$e};return{...Et,formControl:Et}}var Co=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const t=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(Math.random()*16+t)%16|0;return(e=="x"?n:n&3|8).toString(16)})},C1=(t,e,n={})=>n.shouldFocus||Nt(n.shouldFocus)?n.focusName||`${t}.${Nt(n.focusIndex)?e:n.focusIndex}.`:"",_1=(t,e)=>[...t,...Ki(e)],k1=t=>Array.isArray(t)?t.map(()=>{}):void 0;function E1(t,e,n){return[...t.slice(0,e),...Ki(n),...t.slice(e)]}var T1=(t,e,n)=>Array.isArray(t)?(Nt(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],A1=(t,e)=>[...Ki(e),...Ki(t)];function Hq(t,e){let n=0;const i=[...t];for(const r of e)i.splice(r-n,1),n++;return JS(i).length?i:[]}var P1=(t,e)=>Nt(e)?[]:Hq(t,Ki(e).sort((n,i)=>n-i)),I1=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]},N5=(t,e,n)=>(t[e]=n,t);function Yq(t){const e=tO(),{control:n=e,name:i,keyName:r="id",disabled:s,shouldUnregister:o,rules:a}=t,[l,u]=_.useState(n._getFieldArray(i)),c=_.useRef(n._getFieldArray(i).map(Co)),h=_.useRef(!1);s||n._names.array.add(i),_.useMemo(()=>!s&&a&&l.length>=0&&n.register(i,a),[n,i,l.length,a,s]),nO(()=>{if(!s)return n._subjects.array.subscribe({next:({values:C,name:x})=>{if(x===i||!x){const E=_e(C,i);Array.isArray(E)?(u(E),c.current=E.map(Co)):x||(u([]),c.current=[])}}}).unsubscribe},[n,i,s]);const d=_.useCallback(C=>{h.current=!0,n._setFieldArray(i,C)},[n,i]),p=(C,x)=>{if(s)return;const E=Ki(Vt(C)),A=_1(n._getFieldArray(i),E);n._names.focus=C1(i,A.length-1,x),c.current=_1(c.current,E.map(Co)),d(A),u(A),n._setFieldArray(i,A,_1,{argA:k1(C)})},g=(C,x)=>{if(s)return;const E=Ki(Vt(C)),A=A1(n._getFieldArray(i),E);n._names.focus=C1(i,0,x),c.current=A1(c.current,E.map(Co)),d(A),u(A),n._setFieldArray(i,A,A1,{argA:k1(C)})},m=C=>{if(s)return;const x=P1(n._getFieldArray(i),C);c.current=P1(c.current,C),d(x),u(x),!Array.isArray(_e(n._fields,i))&&Dt(n._fields,i,void 0),n._setFieldArray(i,x,P1,{argA:C})},v=(C,x,E)=>{if(s)return;const A=Ki(Vt(x)),I=E1(n._getFieldArray(i),C,A);n._names.focus=C1(i,C,E),c.current=E1(c.current,C,A.map(Co)),d(I),u(I),n._setFieldArray(i,I,E1,{argA:C,argB:k1(x)})},S=(C,x)=>{if(s)return;const E=n._getFieldArray(i);I1(E,C,x),I1(c.current,C,x),d(E),u(E),n._setFieldArray(i,E,I1,{argA:C,argB:x},!1)},b=(C,x)=>{if(s)return;const E=n._getFieldArray(i);T1(E,C,x),T1(c.current,C,x),d(E),u(E),n._setFieldArray(i,E,T1,{argA:C,argB:x},!1)},w=(C,x)=>{if(s)return;const E=Vt(x),A=N5(n._getFieldArray(i),C,E);c.current=[...A].map((I,Z)=>!I||Z===C?Co():c.current[Z]),d(A),u([...A]),n._setFieldArray(i,A,N5,{argA:C,argB:E},!0,!1)},k=C=>{if(s)return;const x=Ki(Vt(C));c.current=x.map(Co),d([...x]),u([...x]),n._setFieldArray(i,[...x],E=>E,{},!0,!1)};return _.useEffect(()=>{if(s)return;n._state.action=!1,Yp(i,n._names)&&n._subjects.state.next({...n._formState});const C=Qo(n._options.mode);if(h.current&&(!C.isOnSubmit||n._formState.isSubmitted)&&!Qo(n._options.reValidateMode).isOnSubmit&&!C.isOnBlur)if(n._options.resolver)n._runSchema([i]).then(x=>{n._updateIsValidating([i]);const E=_e(x.errors,i),A=_e(n._formState.errors,i);(A?!E&&A.type||E&&(A.type!==E.type||A.message!==E.message):E&&E.type)&&(E?Dt(n._formState.errors,i,E):Cn(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{const x=_e(n._fields,i);x&&x._f&&!(Qo(n._options.reValidateMode).isOnSubmit&&Qo(n._options.mode).isOnSubmit)&&Xv(x,n._names.disabled,n._formValues,n._options.criteriaMode===hr.all,n._options.shouldUseNativeValidation,!0).then(E=>!Dn(E)&&n._subjects.state.next({errors:Zv(n._formState.errors,E,i)}))}n._subjects.state.next({name:i,values:Vt(n._formValues)}),n._names.focus&&hu(n._fields,(x,E)=>{if(n._names.focus&&E.startsWith(n._names.focus)&&x.focus)return x.focus(),1}),n._names.focus="",n._setValid(),h.current=!1},[l,i,n,s]),_.useEffect(()=>(s||!_e(n._formValues,i)&&n._setFieldArray(i),()=>{if(s)return;const C=!(n._options.shouldUnregister||o),x=(E,A)=>{const I=_e(n._fields,E);I&&I._f&&(I._f.mount=A)};h.current&&C&&n._subjects.state.next({name:i,values:Vt(n._formValues)}),C?x(i,!1):n.unregister(i)}),[i,n,r,o,s]),{swap:_.useCallback(S,[d,i,n,s]),move:_.useCallback(b,[d,i,n,s]),prepend:_.useCallback(g,[d,i,n,s]),append:_.useCallback(p,[d,i,n,s]),remove:_.useCallback(m,[d,i,n,s]),insert:_.useCallback(v,[d,i,n,s]),update:_.useCallback(w,[d,i,n,s]),replace:_.useCallback(k,[d,i,n,s]),fields:_.useMemo(()=>l.map((C,x)=>({...C,...Ei(s)?{disabled:s}:{},[r]:c.current[x]||Co()})),[l,r,s])}}function iO(t={}){const e=_.useRef(void 0),n=_.useRef(void 0),i=_.useRef(t.formControl),[r,s]=_.useState(()=>({...Vt(c6),isLoading:si(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1,defaultValues:si(t.defaultValues)?void 0:t.defaultValues}));if(!e.current||t.formControl&&i.current!==t.formControl)if(i.current=t.formControl,t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!si(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:a,...l}=qq(t);e.current={...l,formState:r}}const o=e.current.control;return o._options=t,nO(()=>{const a=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),o._formState.isReady=!0,a},[o]),_.useEffect(()=>o._disableForm(t.disabled),[o,t.disabled]),_.useEffect(()=>{t.mode&&(o._options.mode=t.mode),t.reValidateMode&&(o._options.reValidateMode=t.reValidateMode)},[o,t.mode,t.reValidateMode]),_.useEffect(()=>{t.errors&&(o._setErrors(t.errors),o._focusError())},[o,t.errors]),_.useEffect(()=>{t.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,t.shouldUnregister]),_.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),_.useEffect(()=>{var a;t.values&&!qi(t.values,n.current)?(o._reset(t.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((a=o._options.resetOptions)===null||a===void 0)&&a.keepIsValid||o._setValid(),n.current=t.values,s(l=>({...l}))):o._resetDefaultValues()},[o,t.values]),_.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),e.current.formState=_.useMemo(()=>i6(r,o),[o,r]),e.current}function Jc(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;n[i]=t[i]}return n}function fn(){return fn=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="object"&&t!=null&&t.nodeType===1,Q5=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",$1=(t,e)=>{if(t.clientHeight{let r=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!r&&(r.clientHeightse||s>t&&o=e&&a>=n?s-t-i:o>e&&an?o-e+r:0,Gq=t=>{let e=t.parentElement;return e??(t.getRootNode().host||null)};var Kq=(t,e)=>{var n,i,r,s,o,a;if(typeof document>"u")return[];let{inline:l,boundary:u,skipOverflowHiddenElements:c}=e,h=typeof u=="function"?u:W=>W!==u;if(!M5(t))throw new TypeError("Invalid target");let d=document.scrollingElement||document.documentElement,p=[],g=t;for(;M5(g)&&h(g);){if(g=Gq(g),g===d){p.push(g);break}g!=null&&g===document.body&&$1(g)&&!$1(document.documentElement)||g!=null&&$1(g,c)&&p.push(g)}let m=(i=(n=window.visualViewport)==null?void 0:n.width)!=null?i:innerWidth,v=(s=(r=window.visualViewport)==null?void 0:r.height)!=null?s:innerHeight,S=(o=window.scrollX)!=null?o:pageXOffset,b=(a=window.scrollY)!=null?a:pageYOffset,{height:w,width:k,top:C,right:x,bottom:E,left:A}=t.getBoundingClientRect(),I=C,Z=l==="center"?A+k/2:l==="end"?x:A,U=[];for(let W=0;W=0&&A>=0&&E<=v&&x<=m&&C>=oe&&E<=re&&A>=ke&&x<=pe)return U;let Ee=getComputedStyle(B),De=parseInt(Ee.borderLeftWidth,10),Ie=parseInt(Ee.borderTopWidth,10),Ue=parseInt(Ee.borderRightWidth,10),qe=parseInt(Ee.borderBottomWidth,10),Ye=0,Ge=0,he="offsetWidth"in B?B.offsetWidth-B.clientWidth-De-Ue:0,xe="offsetHeight"in B?B.offsetHeight-B.clientHeight-Ie-qe:0,Ce="offsetWidth"in B?B.offsetWidth===0?0:j/B.offsetWidth:0,$e="offsetHeight"in B?B.offsetHeight===0?0:ne/B.offsetHeight:0;if(d===B)Ye=ep(b,b+v,v,Ie,qe,b+I,b+I+w,w),Ge=l==="start"?Z:l==="center"?Z-m/2:l==="end"?Z-m:ep(S,S+m,m,De,Ue,S+Z,S+Z+k,k),Ye=Math.max(0,Ye+b),Ge=Math.max(0,Ge+S);else{Ye=ep(oe,re,ne,Ie,qe+xe,I,I+w,w),Ge=l==="start"?Z-ke-De:l==="center"?Z-(ke+j/2)+he/2:l==="end"?Z-pe+Ue+he:ep(ke,pe,j,De,Ue+he,Z,Z+k,k);let{scrollLeft:Le,scrollTop:Ke}=B;Ye=Math.max(0,Math.min(Ke+Ye/$e,B.scrollHeight-ne/$e+xe)),Ge=Math.max(0,Math.min(Le+Ge/Ce,B.scrollWidth-j/Ce+he)),I+=Ke-Ye,Z+=Le-Ge}U.push({el:B,top:Ye,left:Ge})}return U},Jq=0;function h6(){}function eH(t,e){if(t){var n=Kq(t,{boundary:e});n.forEach(function(i){var r=i.el,s=i.top,o=i.left;r.scrollTop=s,r.scrollLeft=o})}}function D5(t,e,n){var i=t===e||e instanceof n.Node&&t.contains&&t.contains(e);return i}function f6(t,e){var n;function i(){n&&clearTimeout(n)}function r(){for(var s=arguments.length,o=new Array(s),a=0;a1?r-1:0),o=1;o=37&&n<=40&&e.indexOf("Arrow")!==0?"Arrow"+e:e}function np(t,e,n,i,r){if(r===void 0&&(r=!0),n===0)return-1;var s=n-1;(typeof e!="number"||e<0||e>=n)&&(e=t>0?-1:s+1);var o=e+t;o<0?o=r?s:0:o>s&&(o=r?0:s);var a=Hh(t,o,n,i,r);return a===-1?e>=n?-1:e:a}function Hh(t,e,n,i,r){var s=i(e);if(!s||!s.hasAttribute("disabled"))return e;if(t>0){for(var o=e+1;o=0;a--)if(!i(a).hasAttribute("disabled"))return a;return r?t>0?Hh(1,0,n,i,!1):Hh(-1,n-1,n,i,!1):-1}function V5(t,e,n,i){return i===void 0&&(i=!0),e.some(function(r){return r&&(D5(r,t,n)||i&&D5(r,n.document.activeElement,n))})}var rH=f6(function(t){p6(t).textContent=""},500);function sH(t,e){var n=p6(e);t&&(n.textContent=t,rH(e))}function p6(t){t===void 0&&(t=document);var e=t.getElementById("a11y-status-message");return e||(e=t.createElement("div"),e.setAttribute("id","a11y-status-message"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions text"),Object.assign(e.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),t.body.appendChild(e),e)}var oH=["isInitialMount","highlightedIndex","items","environment"],g6={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function aH(t,e,n){var i=t.props,r=t.type,s={};Object.keys(e).forEach(function(o){lH(o,t,e,n),n[o]!==e[o]&&(s[o]=n[o])}),i.onStateChange&&Object.keys(s).length&&i.onStateChange(fn({type:r},s))}function lH(t,e,n,i){var r=e.props,s=e.type,o="on"+nw(t)+"Change";r[o]&&i[t]!==void 0&&i[t]!==n[t]&&r[o](fn({type:s},i))}function uH(t,e){return e.changes}function cH(t){var e=t.selectedItem,n=t.itemToString;return e?n(e)+" has been selected.":""}var hH=f6(function(t,e){sH(t(),e)},200),fH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?R.useLayoutEffect:R.useEffect;function dH(t){var e=t.id,n=e===void 0?"downshift-"+tH():e,i=t.labelId,r=t.menuId,s=t.getItemId,o=t.toggleButtonId,a=t.inputId,l=R.useRef({labelId:i||n+"-label",menuId:r||n+"-menu",getItemId:s||function(u){return n+"-item-"+u},toggleButtonId:o||n+"-toggle-button",inputId:a||n+"-input"});return l.current}function pH(t,e,n,i){var r,s;if(t===void 0){if(e===void 0)throw new Error(i);r=n[e],s=e}else s=e===void 0?n.indexOf(t):e,r=t;return[r,s]}function gH(t){return t?String(t):""}function nw(t){return""+t.slice(0,1).toUpperCase()+t.slice(1)}function m6(t){var e=R.useRef(t);return e.current=t,e}function mH(t,e,n){var i=R.useRef(),r=R.useRef(),s=R.useCallback(function(d,p){r.current=p,d=zv(d,p.props);var g=t(d,p),m=p.props.stateReducer(d,fn({},p,{changes:g}));return m},[t]),o=R.useReducer(s,e),a=o[0],l=o[1],u=m6(n),c=R.useCallback(function(d){return l(fn({props:u.current},d))},[u]),h=r.current;return R.useEffect(function(){h&&i.current&&i.current!==a&&aH(h,zv(i.current,h.props),a),i.current=a},[a,n,h]),[a,c]}var vh={itemToString:gH,stateReducer:uH,getA11ySelectionMessage:cH,scrollIntoView:eH,environment:typeof window>"u"?{}:window};function ws(t,e,n){n===void 0&&(n=g6);var i=t["default"+nw(e)];return i!==void 0?i:n[e]}function ip(t,e,n){n===void 0&&(n=g6);var i=t[e];if(i!==void 0)return i;var r=t["initial"+nw(e)];return r!==void 0?r:ws(t,e,n)}function OH(t){var e=ip(t,"selectedItem"),n=ip(t,"isOpen"),i=ip(t,"highlightedIndex"),r=ip(t,"inputValue");return{highlightedIndex:i<0&&e&&n?t.items.indexOf(e):i,isOpen:n,selectedItem:e,inputValue:r}}function bh(t,e,n){var i=t.items,r=t.initialHighlightedIndex,s=t.defaultHighlightedIndex,o=e.selectedItem,a=e.highlightedIndex;return i.length===0?-1:r!==void 0&&a===r?r:s!==void 0?s:o?i.indexOf(o):n===0?-1:n<0?i.length-1:0}function xH(t,e,n,i){var r=R.useRef({isMouseDown:!1,isTouchMove:!1});return R.useEffect(function(){if(n?.addEventListener!=null){var s=function(){r.current.isMouseDown=!0},o=function(h){r.current.isMouseDown=!1,t&&!V5(h.target,e.map(function(d){return d.current}),n)&&i()},a=function(){r.current.isTouchMove=!1},l=function(){r.current.isTouchMove=!0},u=function(h){t&&!r.current.isTouchMove&&!V5(h.target,e.map(function(d){return d.current}),n,!1)&&i()};return n.addEventListener("mousedown",s),n.addEventListener("mouseup",o),n.addEventListener("touchstart",a),n.addEventListener("touchmove",l),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",s),n.removeEventListener("mouseup",o),n.removeEventListener("touchstart",a),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",u)}}},[t,n]),r}var vH=function(){return h6};function F5(t,e,n){var i=n.isInitialMount,r=n.highlightedIndex,s=n.items,o=n.environment,a=Jc(n,oH);R.useEffect(function(){i||hH(function(){return t(fn({highlightedIndex:r,highlightedItem:s[r],resultCount:s.length},a))},o.document)},e)}function bH(t){var e=t.highlightedIndex,n=t.isOpen,i=t.itemRefs,r=t.getItemNodeFromIndex,s=t.menuElement,o=t.scrollIntoView,a=R.useRef(!0);return fH(function(){e<0||!n||!Object.keys(i.current).length||(a.current===!1?a.current=!0:o(r(e),s))},[e]),a}var yH=h6;function B5(t,e,n){var i;n===void 0&&(n=!0);var r=((i=t.items)==null?void 0:i.length)&&e>=0;return fn({isOpen:!1,highlightedIndex:-1},r&&fn({selectedItem:t.items[e],isOpen:ws(t,"isOpen"),highlightedIndex:ws(t,"highlightedIndex")},n&&{inputValue:t.itemToString(t.items[e])}))}function SH(t,e,n){var i=e.type,r=e.props,s;switch(i){case n.ItemMouseMove:s={highlightedIndex:e.disabled?-1:e.index};break;case n.MenuMouseLeave:s={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:s={isOpen:!t.isOpen,highlightedIndex:t.isOpen?-1:bh(r,t,0)};break;case n.FunctionOpenMenu:s={isOpen:!0,highlightedIndex:bh(r,t,0)};break;case n.FunctionCloseMenu:s={isOpen:!1};break;case n.FunctionSetHighlightedIndex:s={highlightedIndex:e.highlightedIndex};break;case n.FunctionSetInputValue:s={inputValue:e.inputValue};break;case n.FunctionReset:s={highlightedIndex:ws(r,"highlightedIndex"),isOpen:ws(r,"isOpen"),selectedItem:ws(r,"selectedItem"),inputValue:ws(r,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return fn({},t,s)}Ae.array.isRequired,Ae.func,Ae.func,Ae.func,Ae.number,Ae.number,Ae.number,Ae.bool,Ae.bool,Ae.bool,Ae.any,Ae.any,Ae.any,Ae.string,Ae.string,Ae.string,Ae.func,Ae.string,Ae.func,Ae.func,Ae.func,Ae.func,Ae.func,Ae.shape({addEventListener:Ae.func,removeEventListener:Ae.func,document:Ae.shape({getElementById:Ae.func,activeElement:Ae.any,body:Ae.any})});function wH(t){var e=t.isOpen,n=t.resultCount,i=t.previousResultCount;return e?n?n!==i?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}cr(cr({},vh),{getA11yStatusMessage:wH});var iw=0,rw=1,sw=2,ow=3,aw=4,lw=5,uw=6,cw=7,hw=8,Gg=9,fw=10,O6=11,x6=12,dw=13,v6=14,b6=15,y6=16,S6=17,w6=18,pw=19,C6=20,_6=21,gw=22,k6=Object.freeze({__proto__:null,InputKeyDownArrowDown:iw,InputKeyDownArrowUp:rw,InputKeyDownEscape:sw,InputKeyDownHome:ow,InputKeyDownEnd:aw,InputKeyDownPageUp:lw,InputKeyDownPageDown:uw,InputKeyDownEnter:cw,InputChange:hw,InputBlur:Gg,InputFocus:fw,MenuMouseLeave:O6,ItemMouseMove:x6,ItemClick:dw,ToggleButtonClick:v6,FunctionToggleMenu:b6,FunctionOpenMenu:y6,FunctionCloseMenu:S6,FunctionSetHighlightedIndex:w6,FunctionSelectItem:pw,FunctionSetInputValue:C6,FunctionReset:_6,ControlledPropUpdatedSelectedItem:gw});function CH(t){var e=OH(t),n=e.selectedItem,i=e.inputValue;return i===""&&n&&t.defaultInputValue===void 0&&t.initialInputValue===void 0&&t.inputValue===void 0&&(i=t.itemToString(n)),fn({},e,{inputValue:i})}Ae.array.isRequired,Ae.func,Ae.func,Ae.func,Ae.func,Ae.number,Ae.number,Ae.number,Ae.bool,Ae.bool,Ae.bool,Ae.any,Ae.any,Ae.any,Ae.string,Ae.string,Ae.string,Ae.string,Ae.string,Ae.string,Ae.func,Ae.string,Ae.string,Ae.func,Ae.func,Ae.func,Ae.func,Ae.func,Ae.func,Ae.shape({addEventListener:Ae.func,removeEventListener:Ae.func,document:Ae.shape({getElementById:Ae.func,activeElement:Ae.any,body:Ae.any})});function _H(t,e,n){var i=R.useRef(),r=mH(t,e,n),s=r[0],o=r[1];return R.useEffect(function(){d6(n,"selectedItem")&&(n.selectedItemChanged(i.current,n.selectedItem)&&o({type:gw,inputValue:n.itemToString(n.selectedItem)}),i.current=s.selectedItem===i.current?n.selectedItem:s.selectedItem)},[s.selectedItem,n.selectedItem]),[zv(s,n),o]}var kH=fn({},vh,{selectedItemChanged:function(e,n){return e!==n},getA11yStatusMessage:nH});function EH(t,e){var n,i=e.type,r=e.props,s=e.altKey,o;switch(i){case dw:o={isOpen:ws(r,"isOpen"),highlightedIndex:ws(r,"highlightedIndex"),selectedItem:r.items[e.index],inputValue:r.itemToString(r.items[e.index])};break;case iw:t.isOpen?o={highlightedIndex:np(1,t.highlightedIndex,r.items.length,e.getItemNodeFromIndex,!0)}:o={highlightedIndex:s&&t.selectedItem==null?-1:bh(r,t,1,e.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case rw:t.isOpen?s?o=B5(r,t.highlightedIndex):o={highlightedIndex:np(-1,t.highlightedIndex,r.items.length,e.getItemNodeFromIndex,!0)}:o={highlightedIndex:bh(r,t,-1,e.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case cw:o=B5(r,t.highlightedIndex);break;case sw:o=fn({isOpen:!1,highlightedIndex:-1},!t.isOpen&&{selectedItem:null,inputValue:""});break;case lw:o={highlightedIndex:np(-10,t.highlightedIndex,r.items.length,e.getItemNodeFromIndex,!1)};break;case uw:o={highlightedIndex:np(10,t.highlightedIndex,r.items.length,e.getItemNodeFromIndex,!1)};break;case ow:o={highlightedIndex:Hh(1,0,r.items.length,e.getItemNodeFromIndex,!1)};break;case aw:o={highlightedIndex:Hh(-1,r.items.length-1,r.items.length,e.getItemNodeFromIndex,!1)};break;case Gg:o=fn({isOpen:!1,highlightedIndex:-1},t.highlightedIndex>=0&&((n=r.items)==null?void 0:n.length)&&e.selectItem&&{selectedItem:r.items[t.highlightedIndex],inputValue:r.itemToString(r.items[t.highlightedIndex])});break;case hw:o={isOpen:!0,highlightedIndex:ws(r,"highlightedIndex"),inputValue:e.inputValue};break;case fw:o={isOpen:!0,highlightedIndex:bh(r,t,0)};break;case pw:o={selectedItem:e.selectedItem,inputValue:r.itemToString(e.selectedItem)};break;case gw:o={inputValue:e.inputValue};break;default:return SH(t,e,k6)}return fn({},t,o)}var TH=["onMouseLeave","refKey","ref"],AH=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],PH=["onClick","onPress","refKey","ref"],IH=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];mw.stateChangeTypes=k6;function mw(t){t===void 0&&(t={});var e=fn({},kH,t),n=e.initialIsOpen,i=e.defaultIsOpen,r=e.items,s=e.scrollIntoView,o=e.environment,a=e.getA11yStatusMessage,l=e.getA11ySelectionMessage,u=e.itemToString,c=CH(e),h=_H(EH,c,e),d=h[0],p=h[1],g=d.isOpen,m=d.highlightedIndex,v=d.selectedItem,S=d.inputValue,b=R.useRef(null),w=R.useRef({}),k=R.useRef(null),C=R.useRef(null),x=R.useRef(!0),E=dH(e),A=R.useRef(),I=m6({state:d,props:e}),Z=R.useCallback(function(he){return w.current[E.getItemId(he)]},[E]);F5(a,[g,m,S,r],fn({isInitialMount:x.current,previousResultCount:A.current,items:r,environment:o,itemToString:u},d)),F5(l,[v],fn({isInitialMount:x.current,previousResultCount:A.current,items:r,environment:o,itemToString:u},d));var U=bH({menuElement:b.current,highlightedIndex:m,isOpen:g,itemRefs:w,scrollIntoView:s,getItemNodeFromIndex:Z});yH({isInitialMount:x.current}),R.useEffect(function(){var he=n||i||g;he&&k.current&&k.current.focus()},[]),R.useEffect(function(){x.current||(A.current=r.length)});var W=xH(g,[k,b,C],o,function(){p({type:Gg,selectItem:!1})}),B=vH();R.useEffect(function(){return x.current=!1,function(){x.current=!0}},[]),R.useEffect(function(){var he;if(!g)w.current={};else if(((he=o.document)==null?void 0:he.activeElement)!==k.current){var xe;k==null||(xe=k.current)==null||xe.focus()}},[g,o]);var ne=R.useMemo(function(){return{ArrowDown:function(xe){xe.preventDefault(),p({type:iw,altKey:xe.altKey,getItemNodeFromIndex:Z})},ArrowUp:function(xe){xe.preventDefault(),p({type:rw,altKey:xe.altKey,getItemNodeFromIndex:Z})},Home:function(xe){I.current.state.isOpen&&(xe.preventDefault(),p({type:ow,getItemNodeFromIndex:Z}))},End:function(xe){I.current.state.isOpen&&(xe.preventDefault(),p({type:aw,getItemNodeFromIndex:Z}))},Escape:function(xe){var Ce=I.current.state;(Ce.isOpen||Ce.inputValue||Ce.selectedItem||Ce.highlightedIndex>-1)&&(xe.preventDefault(),p({type:sw}))},Enter:function(xe){var Ce=I.current.state;!Ce.isOpen||xe.which===229||(xe.preventDefault(),p({type:cw,getItemNodeFromIndex:Z}))},PageUp:function(xe){I.current.state.isOpen&&(xe.preventDefault(),p({type:lw,getItemNodeFromIndex:Z}))},PageDown:function(xe){I.current.state.isOpen&&(xe.preventDefault(),p({type:uw,getItemNodeFromIndex:Z}))}}},[p,I,Z]),j=R.useCallback(function(he){return fn({id:E.labelId,htmlFor:E.inputId},he)},[E]),oe=R.useCallback(function(he,xe){var Ce,$e=he===void 0?{}:he,Le=$e.onMouseLeave,Ke=$e.refKey,lt=Ke===void 0?"ref":Ke,St=$e.ref,zt=Jc($e,TH),Ft=xe===void 0?{}:xe;return Ft.suppressRefError,fn((Ce={},Ce[lt]=tp(St,function(Rt){b.current=Rt}),Ce.id=E.menuId,Ce.role="listbox",Ce["aria-labelledby"]=zt&&zt["aria-label"]?void 0:""+E.labelId,Ce.onMouseLeave=Vs(Le,function(){p({type:O6})}),Ce),zt)},[p,B,E]),pe=R.useCallback(function(he){var xe,Ce,$e=he===void 0?{}:he,Le=$e.item,Ke=$e.index,lt=$e.refKey,St=lt===void 0?"ref":lt,zt=$e.ref,Ft=$e.onMouseMove,Rt=$e.onMouseDown,Sn=$e.onClick;$e.onPress;var Wt=$e.disabled,Ln=Jc($e,AH),cn=I.current,Wn=cn.props,wn=cn.state,st=pH(Le,Ke,Wn.items,"Pass either item or index to getItemProps!"),en=st[1],yi="onClick",_t=Sn,D=function(){en!==wn.highlightedIndex&&(U.current=!1,p({type:x6,index:en,disabled:Wt}))},Et=function(){p({type:dw,index:en})},O=function(M){return M.preventDefault()};return fn((xe={},xe[St]=tp(zt,function(L){L&&(w.current[E.getItemId(en)]=L)}),xe.disabled=Wt,xe.role="option",xe["aria-selected"]=""+(en===wn.highlightedIndex),xe.id=E.getItemId(en),xe),!Wt&&(Ce={},Ce[yi]=Vs(_t,Et),Ce),{onMouseMove:Vs(Ft,D),onMouseDown:Vs(Rt,O)},Ln)},[p,I,U,E]),re=R.useCallback(function(he){var xe,Ce=he===void 0?{}:he,$e=Ce.onClick;Ce.onPress;var Le=Ce.refKey,Ke=Le===void 0?"ref":Le,lt=Ce.ref,St=Jc(Ce,PH),zt=I.current.state,Ft=function(){p({type:v6})};return fn((xe={},xe[Ke]=tp(lt,function(Rt){C.current=Rt}),xe["aria-controls"]=E.menuId,xe["aria-expanded"]=zt.isOpen,xe.id=E.toggleButtonId,xe.tabIndex=-1,xe),!St.disabled&&fn({},{onClick:Vs($e,Ft)}),St)},[p,I,E]),ke=R.useCallback(function(he,xe){var Ce,$e=he===void 0?{}:he,Le=$e.onKeyDown,Ke=$e.onChange,lt=$e.onInput,St=$e.onFocus,zt=$e.onBlur;$e.onChangeText;var Ft=$e.refKey,Rt=Ft===void 0?"ref":Ft,Sn=$e.ref,Wt=Jc($e,IH),Ln=xe===void 0?{}:xe;Ln.suppressRefError;var cn=I.current.state,Wn=function(O){var L=iH(O);L&&ne[L]&&ne[L](O)},wn=function(O){p({type:hw,inputValue:O.target.value})},st=function(O){if(cn.isOpen&&!W.current.isMouseDown){var L=O.relatedTarget===null&&o.document.activeElement!==o.document.body;p({type:Gg,selectItem:!L})}},en=function(){cn.isOpen||p({type:fw})},yi="onChange",_t={};if(!Wt.disabled){var D;_t=(D={},D[yi]=Vs(Ke,lt,wn),D.onKeyDown=Vs(Le,Wn),D.onBlur=Vs(zt,st),D.onFocus=Vs(St,en),D)}return fn((Ce={},Ce[Rt]=tp(Sn,function(Et){k.current=Et}),Ce["aria-activedescendant"]=cn.isOpen&&cn.highlightedIndex>-1?E.getItemId(cn.highlightedIndex):"",Ce["aria-autocomplete"]="list",Ce["aria-controls"]=E.menuId,Ce["aria-expanded"]=cn.isOpen,Ce["aria-labelledby"]=Wt&&Wt["aria-label"]?void 0:""+E.labelId,Ce.autoComplete="off",Ce.id=E.inputId,Ce.role="combobox",Ce.value=cn.inputValue,Ce),_t,Wt)},[B,I,E,ne,p,W,o]),Ee=R.useCallback(function(){p({type:b6})},[p]),De=R.useCallback(function(){p({type:S6})},[p]),Ie=R.useCallback(function(){p({type:y6})},[p]),Ue=R.useCallback(function(he){p({type:w6,highlightedIndex:he})},[p]),qe=R.useCallback(function(he){p({type:pw,selectedItem:he})},[p]),Ye=R.useCallback(function(he){p({type:C6,inputValue:he})},[p]),Ge=R.useCallback(function(){p({type:_6})},[p]);return{getItemProps:pe,getLabelProps:j,getMenuProps:oe,getInputProps:ke,getToggleButtonProps:re,toggleMenu:Ee,openMenu:Ie,closeMenu:De,setHighlightedIndex:Ue,setInputValue:Ye,selectItem:qe,reset:Ge,highlightedIndex:m,isOpen:g,selectedItem:v,inputValue:S}}Ae.array,Ae.array,Ae.array,Ae.func,Ae.func,Ae.func,Ae.number,Ae.number,Ae.number,Ae.func,Ae.func,Ae.string,Ae.string,Ae.shape({addEventListener:Ae.func,removeEventListener:Ae.func,document:Ae.shape({getElementById:Ae.func,activeElement:Ae.any,body:Ae.any})});vh.itemToString,vh.stateReducer,vh.environment;const j5=20,E6=t=>t.suggestions.length>0?_.createElement($H,{...t}):_.createElement("input",{className:G.textInput,size:40,autoFocus:!0,...t.register(t.inputName)}),$H=({autofocus:t,suggestions:e,control:n,inputName:i,placeholder:r,initialInputValue:s,setValue:o})=>{const[a,l]=_.useState(e.slice(0,j5)),u=Pt(Jt),c=e.length>0,{isOpen:h,getToggleButtonProps:d,getMenuProps:p,getInputProps:g,highlightedIndex:m,getItemProps:v,selectedItem:S}=mw({initialInputValue:s,onInputValueChange({inputValue:w=""}){o(i,w),w=w.toLowerCase()||"";const k=[];for(const C of e)if(C.toLowerCase().includes(w)&&(k.push(C),k.length>=j5))break;l(k)},items:a,itemToString(w){return w??""}}),b=h&&a.length>0;return _.createElement("div",{className:G.downshiftAutocompleteContainer},_.createElement("div",{"data-visible-dropdown":b,className:G.downshiftInputWrapper},_.createElement(Rq,{name:i,control:n,render:({field:w})=>{const k=g();return _.createElement("input",{...k,name:w.name,placeholder:r,className:G.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:t})}}),c&&_.createElement("button",{"aria-label":"toggle menu",type:"button",...d()},u("arrow_drop_down"))),_.createElement("div",{className:G.downshiftAutocompleteContainer},_.createElement("ul",{...p(),"data-visible":b},a.map((w,k)=>_.createElement("li",{"data-selected":S===w,"data-highlighted":m===k,key:`${w}${k}`,...v({item:w,index:k})},w)))))},RH=()=>{const[t,e,n,i,r]=$t(Kg,Xo,es,qs,Du),s=bt(Sw),o=bt(bw),a=Qt(),{register:l,handleSubmit:u,control:c,setValue:h,reset:d}=iO({values:e.type==="editing"?e.initialValues:{}}),p=()=>{d({src:"",title:"",altText:"",width:void 0,height:void 0})};return e.type==="inactive"?null:_.createElement(q0,{open:!0,onOpenChange:g=>{g||(o(),p())}},_.createElement(H0,{container:n?.current},_.createElement(Y0,{className:G.dialogOverlay}),_.createElement(G0,{className:G.dialogContent,onOpenAutoFocus:g=>{g.preventDefault()}},_.createElement(GS,null,a("uploadImage.dialogTitle","Upload an image")),_.createElement("form",{onSubmit:async g=>{g.preventDefault(),g.stopPropagation(),await u(s)(g),p()},className:G.multiFieldForm},i===null?_.createElement("input",{type:"hidden",accept:"image/*",...l("file")}):_.createElement("div",{className:G.formField},_.createElement("label",{htmlFor:"file"},a("uploadImage.uploadInstructions","Upload an image from your device:")),_.createElement("input",{type:"file",accept:"image/*",...l("file")})),_.createElement("div",{className:G.formField},_.createElement("label",{htmlFor:"src"},i!==null?a("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):a("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),_.createElement(E6,{register:l,initialInputValue:e.type==="editing"?e.initialValues.src??"":"",inputName:"src",suggestions:t,setValue:h,control:c,placeholder:a("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),_.createElement("div",{className:G.formField},_.createElement("label",{htmlFor:"alt"},a("uploadImage.alt","Alt:")),_.createElement("input",{type:"text",...l("altText"),className:G.textInput})),_.createElement("div",{className:G.formField},_.createElement("label",{htmlFor:"title"},a("uploadImage.title","Title:")),_.createElement("input",{type:"text",...l("title"),className:G.textInput})),r&&_.createElement("div",{className:G.imageDimensionsContainer},_.createElement("div",{className:G.formField},_.createElement("label",{htmlFor:"width"},a("uploadImage.width","Width:")),_.createElement("input",{type:"number",min:0,...l("width"),className:G.textInput})),_.createElement("div",{className:G.formField},_.createElement("label",{htmlFor:"height"},a("uploadImage.height","Height:")),_.createElement("input",{type:"number",min:0,...l("height"),className:G.textInput}))),_.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},_.createElement("button",{type:"submit",title:a("dialogControls.save","Save"),"aria-label":a("dialogControls.save","Save"),className:ft(G.primaryButton)},a("dialogControls.save","Save")),_.createElement(K0,{asChild:!0},_.createElement("button",{type:"reset",title:a("dialogControls.cancel","Cancel"),"aria-label":a("dialogControls.cancel","Cancel"),className:ft(G.secondaryButton)},a("dialogControls.cancel","Cancel"))))))))};function R1(t,e,n){return Math.min(Math.max(t,e),n)}const qt={east:1,north:8,south:2,west:4};function LH({onResizeStart:t,onResizeEnd:e,imageRef:n,maxWidth:i,editor:r}){const s=R.useRef(null),o=R.useRef({priority:"",value:"default"}),a=R.useRef({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),l=r.getRootElement(),u=i??(l!==null?l.getBoundingClientRect().width-20:100),c=l!==null?l.getBoundingClientRect().height-20:100,h=100,d=100,p=b=>{const w=b===qt.east||b===qt.west,k=b===qt.north||b===qt.south,C=b&qt.north&&b&qt.west||b&qt.south&&b&qt.east,x=w?"ew":k?"ns":C?"nwse":"nesw";l!==null&&l.style.setProperty("cursor",`${x}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${x}-resize`,"important"),o.current.value=document.body.style.getPropertyValue("-webkit-user-select"),o.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},g=()=>{l!==null&&l.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",o.current.value,o.current.priority))},m=(b,w)=>{if(!r.isEditable())return;const k=n.current,C=s.current;if(k!==null&&C!==null){b.preventDefault();const{width:x,height:E}=k.getBoundingClientRect(),A=a.current;A.startWidth=x,A.startHeight=E,A.ratio=x/E,A.currentWidth=x,A.currentHeight=E,A.startX=b.clientX,A.startY=b.clientY,A.isResizing=!0,A.direction=w,p(w),t(),C.classList.add(G.imageControlWrapperResizing),k.style.height=`${E}px`,k.style.width=`${x}px`,document.addEventListener("pointermove",v),document.addEventListener("pointerup",S)}},v=b=>{const w=n.current,k=a.current,C=k.direction&(qt.east|qt.west),x=k.direction&(qt.south|qt.north);if(w!==null&&k.isResizing)if(C&&x){let E=Math.floor(k.startX-b.clientX);E=k.direction&qt.east?-E:E;const A=R1(k.startWidth+E,h,u),I=A/k.ratio;w.style.width=`${A}px`,w.style.height=`${I}px`,k.currentHeight=I,k.currentWidth=A}else if(x){let E=Math.floor(k.startY-b.clientY);E=k.direction&qt.south?-E:E;const A=R1(k.startHeight+E,d,c);w.style.height=`${A}px`,k.currentHeight=A}else{let E=Math.floor(k.startX-b.clientX);E=k.direction&qt.east?-E:E;const A=R1(k.startWidth+E,h,u);w.style.width=`${A}px`,k.currentWidth=A}},S=()=>{const b=n.current,w=a.current,k=s.current;if(b!==null&&k!==null&&w.isResizing){const C=w.currentWidth,x=w.currentHeight;w.startWidth=0,w.startHeight=0,w.ratio=0,w.startX=0,w.startY=0,w.currentWidth=0,w.currentHeight=0,w.isResizing=!1,k.classList.remove(G.imageControlWrapperResizing),g(),e(C,x),document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",S)}};return R.createElement("div",{ref:s},R.createElement("div",{className:ft(G.imageResizer,G.imageResizerN),onPointerDown:b=>{m(b,qt.north)}}),R.createElement("div",{className:ft(G.imageResizer,G.imageResizerNe),onPointerDown:b=>{m(b,qt.north|qt.east)}}),R.createElement("div",{className:ft(G.imageResizer,G.imageResizerE),onPointerDown:b=>{m(b,qt.east)}}),R.createElement("div",{className:ft(G.imageResizer,G.imageResizerSe),onPointerDown:b=>{m(b,qt.south|qt.east)}}),R.createElement("div",{className:ft(G.imageResizer,G.imageResizerS),onPointerDown:b=>{m(b,qt.south)}}),R.createElement("div",{className:ft(G.imageResizer,G.imageResizerSw),onPointerDown:b=>{m(b,qt.south|qt.west)}}),R.createElement("div",{className:ft(G.imageResizer,G.imageResizerW),onPointerDown:b=>{m(b,qt.west)}}),R.createElement("div",{className:ft(G.imageResizer,G.imageResizerNw),onPointerDown:b=>{m(b,qt.north|qt.west)}}))}const NH="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(` + + + ⚠️ + +`),MH={__cache:{},read(t){if(this.__cache[t]||(this.__cache[t]=new Promise(e=>{const n=new Image;n.onerror=()=>{this.__cache[t]=NH,e()},n.onload=()=>{this.__cache[t]=t,e()},n.src=t})),this.__cache[t]instanceof Promise)throw this.__cache[t];return this.__cache[t]}};function QH({title:t,alt:e,className:n,imageRef:i,src:r,width:s,height:o}){return _.createElement("img",{className:n??void 0,alt:e,src:MH.read(r),title:t,ref:i,draggable:"false",width:s,height:o})}function DH({src:t,title:e,alt:n,nodeKey:i,width:r,height:s,rest:o}){const[a,l,u,c,h,d]=$t(tm,Jg,Du,em,In,nm),p=_.useRef(null),g=_.useRef(null),[m,v,S]=EI(i),[b]=ui(),[w,k]=_.useState(null),C=_.useRef(null),[x,E]=_.useState(!1),[A,I]=_.useState(null),[Z,U]=_.useState(null),W=_.useCallback(Ee=>{if(m&&hn(me())){Ee.preventDefault();const Ie=At(i);Yh(Ie)&&Ie.remove()}return!1},[m,i]),B=_.useCallback(Ee=>{const De=me(),Ie=g.current;return m&&hn(De)&&De.getNodes().length===1&&Ie!==null&&Ie!==document.activeElement?(Ee.preventDefault(),Ie.focus(),!0):!1},[m]),ne=_.useCallback(Ee=>g.current===Ee.target?(an(null),b.update(()=>{v(!0);const De=b.getRootElement();De!==null&&De.focus()}),!0):!1,[b,v]);_.useEffect(()=>{c?(async()=>{Z||U(t);const De=await c(t);I(De)})().catch(De=>{console.error(De)}):I(t)},[t,c,Z]),_.useEffect(()=>{if(u&&p.current){const{current:Ee}=p;Z5(Ee,"width",r),Z5(Ee,"height",s)}},[u,r,s]),_.useEffect(()=>{let Ee=!0;const De=ci(b.registerUpdateListener(({editorState:Ie})=>{Ee&&k(Ie.read(()=>me()))}),b.registerCommand(tc,(Ie,Ue)=>(C.current=Ue,!1),Zt),b.registerCommand(If,Ie=>{const Ue=Ie;return x?!0:Ue.target===p.current?(Ue.shiftKey?v(!m):(S(),v(!0)),!0):!1},Zt),b.registerCommand(Qf,Ie=>Ie.target===p.current?(Ie.preventDefault(),!0):!1,Zt),b.registerCommand(Jm,W,Zt),b.registerCommand(Nf,W,Zt),b.registerCommand(Ua,B,Zt),b.registerCommand(ic,ne,Zt));return()=>{Ee=!1,De()}},[S,b,x,m,i,W,B,ne,v]);const j=(Ee,De)=>{setTimeout(()=>{E(!1)},200),b.update(()=>{const Ie=At(i);Yh(Ie)&&Ie.setWidthAndHeight(Ee,De)})},oe=()=>{E(!0)},pe=hn(w),re=m,ke=_.useMemo(()=>{if(o.length===0)return null;const Ee=o.find(De=>De.type==="mdxJsxAttribute"&&(De.name==="class"||De.name==="className"));return Ee?Ee.value:null},[o]);return A!==null?_.createElement(_.Suspense,{fallback:a?_.createElement(a,null):null},_.createElement("div",{className:G.imageWrapper,"data-editor-block-type":"image"},_.createElement("div",{draggable:pe},_.createElement(QH,{width:r,height:s,className:ft({[G.focusedImage]:re},ke),src:A,title:e??"",alt:n??"",imageRef:p})),pe&&re&&!l&&_.createElement(LH,{editor:b,imageRef:p,onResizeStart:oe,onResizeEnd:j}),h||_.createElement(d,{nodeKey:i,imageSource:A,initialImagePath:Z,title:e??"",alt:n??"",width:r,height:s}))):null}const Z5=(t,e,n)=>{typeof n=="number"?t.style[e]=`${n}px`:t.style.removeProperty(e)};var VH=Object.defineProperty,FH=(t,e,n)=>e in t?VH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fl=(t,e,n)=>(FH(t,typeof e!="symbol"?e+"":e,n),n);function BH(t){if(t instanceof HTMLImageElement){const{alt:e,src:n,title:i,width:r,height:s}=t;return{node:Oa({altText:e,src:n,title:i,width:r||void 0,height:s||void 0})}}return null}class Oc extends Cr{constructor(e,n,i,r,s,o,a){super(a),Fl(this,"__src"),Fl(this,"__altText"),Fl(this,"__title"),Fl(this,"__width"),Fl(this,"__height"),Fl(this,"__rest"),this.__src=e,this.__title=i,this.__altText=n,this.__width=r??"inherit",this.__height=s??"inherit",this.__rest=o??[]}static getType(){return"image"}static clone(e){return new Oc(e.__src,e.__altText,e.__title,e.__width,e.__height,e.__rest,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__src=e.__src,this.__altText=e.__altText,this.__title=e.__title,this.__width=e.__width,this.__height=e.__height,this.__rest=e.__rest}static importJSON(e){const{altText:n,title:i,src:r,width:s,rest:o,height:a}=e;return Oa({altText:n,title:i,src:r,height:a,width:s,rest:o})}exportDOM(){const e=document.createElement("img");return e.setAttribute("src",this.__src),e.setAttribute("alt",this.__altText),this.__title&&e.setAttribute("title",this.__title),this.__width!=="inherit"&&this.__width&&e.setAttribute("width",this.__width.toString()),this.__height!=="inherit"&&this.__height&&e.setAttribute("height",this.__height.toString()),{element:e}}static importDOM(){return{img:()=>({conversion:BH,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?void 0:this.__height,width:this.__width==="inherit"?void 0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(e,n){const i=this.getWritable();i.__width=e,i.__height=n}createDOM(e,n){const i=document.createElement("span"),s=e.theme.image;return s!==void 0&&(i.className=s),i}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(e){this.getWritable().__title=e}setSrc(e){this.getWritable().__src=e}setAltText(e){this.getWritable().__altText=e??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(e){return _.createElement(DH,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function Oa(t){const{altText:e,title:n,src:i,key:r,width:s,height:o,rest:a}=t;return new Oc(i,e,n,s,o,a,r)}function Yh(t){return t instanceof Oc}const jH={testLexicalNode:Yh,visitLexicalNode({mdastParent:t,lexicalNode:e,actions:n}){if(e.shouldBeSerializedAsElement()){const i=new Image;e.getHeight()!=="inherit"&&(i.height=e.getHeight()),e.getWidth()!=="inherit"&&(i.width=e.getWidth()),e.getAltText()&&(i.alt=e.getAltText()),e.getTitle()&&(i.title=e.getTitle());for(const r of e.getRest())r.type==="mdxJsxAttribute"&&typeof r.value=="string"&&i.setAttribute(r.name,r.value);n.appendToParent(t,{type:"html",value:i.outerHTML.replace(/>$/,` src="${e.getSrc()}" />`)})}else n.appendToParent(t,{type:"image",url:e.getSrc(),alt:e.getAltText(),title:e.getTitle()})}},ZH={testNode:"image",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(Oa({src:t.url,altText:t.alt??"",title:t.title??""}))}},XH={testNode:t=>t.type==="html"&&t.value.trim().startsWith("i.type==="mdxJsxAttribute"&&i.name===e);if(n)return n.value}const zH={testNode:t=>(t.type==="mdxJsxTextElement"||t.type==="mdxJsxFlowElement")&&t.name==="img",visitNode({mdastNode:t,lexicalParent:e}){const n=jc(t,"src");if(!n)return;const i=jc(t,"alt")??"",r=jc(t,"title"),s=jc(t,"height"),o=jc(t,"width"),a=t.attributes.filter(u=>u.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(u.name)),l=Oa({src:n,altText:i,title:r,width:o?parseInt(o,10):void 0,height:s?parseInt(s,10):void 0,rest:a});if(e.getType()==="root"){const u=yt();u.append(l),e.append(u)}else e.append(l)}},Ow=mn(t=>{t.sub(t.pipe(Ow,rn(Gt)),([e,n])=>{n?.update(()=>{const i=Oa({altText:e.altText??"",src:e.src,title:e.title??"",width:il(e.width),height:il(e.height)});gl([i]),xn(i.getParentOrThrow())&&nS(i,yt).selectEnd()})})}),T6=mn(t=>{t.sub(t.pipe(T6,rn(qs)),([e,n])=>{const i=r=>{t.pub(Ow,{...e,src:r})};"file"in e?n?.(e.file).then(i).catch(r=>{throw r}):i(e.src)})}),Kg=Pe([]),Jg=Pe(!1),qs=Pe(null),em=Pe(null),tm=Pe(null),Xo=Pe({type:"inactive"},t=>{t.sub(t.pipe(Sw,rn(Gt,qs,Xo,Du)),([e,n,i,r,s])=>{const o=r.type==="editing"?a=>{n?.update(()=>{const{nodeKey:l}=r,u=At(l);if(u.setTitle(e.title),u.setAltText(e.altText),u.setSrc(a),s){const c=il(e.width),h=il(e.height);u.setWidthAndHeight(c??"inherit",h??"inherit")}}),t.pub(Xo,{type:"inactive"})}:a=>{t.pub(Ow,{...e,src:a}),t.pub(Xo,{type:"inactive"})};e.file&&e.file.length>0?i?.(e.file.item(0)).then(o).catch(a=>{throw a}):e.src&&o(e.src)}),t.pub(Lu,e=>{const n=t.getValue(qs);return ci(e.registerCommand(Gh,i=>{const r=Oa(i);return gl([r]),xn(r.getParentOrThrow())&&nS(r,yt).selectEnd(),!0},at),e.registerCommand(Qf,i=>HH(i),Vh),e.registerCommand(t0,i=>YH(i,!!n),Zt),e.registerCommand(e0,i=>GH(i,e,t.getValue(qs)),Vh),e.registerCommand(nc,i=>{var r,s;if(!n){let u=Array.from(((r=i.clipboardData)==null?void 0:r.items)??[]);return u=u.filter(c=>c.type.includes("text")),!u.length||u.length===0}const o=Array.from(((s=i.clipboardData)==null?void 0:s.items)??[]);if(o.some(u=>!u.type.includes("image"))||!o.length||o.length===0)return!1;const l=t.getValue(qs);return Promise.all(o.map(u=>l(u.getAsFile()))).then(u=>{u.forEach(c=>{e.dispatchCommand(Gh,{src:c,altText:""})})}).catch(u=>{throw u}),!0},Mi))})}),xw=Gr(t=>{t.link(t.pipe(xw,Oy({type:"new"})),Xo)}),vw=mn(t=>{t.link(t.pipe(vw,Xr(e=>({type:"editing",...e}))),Xo)}),bw=Gr(t=>{t.link(t.pipe(bw,Oy({type:"inactive"})),Xo)}),yw=Pe(!1),Du=Pe(!1),Sw=mn(),nm=Pe(Qv),il=t=>{if(typeof t>"u")return;const e=parseInt(String(t),10);return Number.isNaN(e)?void 0:e},WH=En({init(t,e){t.pubIn({[Qi]:[ZH,XH,zH],[rr]:Oc,[sr]:jH,[go]:e?.ImageDialog??RH,[qs]:e?.imageUploadHandler??null,[Kg]:e?.imageAutocompleteSuggestions??[],[Jg]:!!e?.disableImageResize,[yw]:!!e?.disableImageSettingsButton,[Du]:!!e?.allowSetImageDimensions,[em]:e?.imagePreviewHandler??null,[nm]:e?.EditImageToolbar??Qv,[tm]:e?.imagePlaceholder??_5})},update(t,e){t.pubIn({[qs]:e?.imageUploadHandler??null,[Kg]:e?.imageAutocompleteSuggestions??[],[Jg]:!!e?.disableImageResize,[em]:e?.imagePreviewHandler??null,[Du]:!!e?.allowSetImageDimensions,[nm]:e?.EditImageToolbar??Qv,[tm]:e?.imagePlaceholder??_5})}}),UH=t=>TS?(t??window).getSelection():null,Gh=We("INSERT_IMAGE_COMMAND"),qH="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function HH(t){const e=ww();if(!e)return!1;const n=t.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const i=document.createElement("img");return i.src=qH,n.setDragImage(i,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:e.__altText,title:e.__title,key:e.getKey(),src:e.__src},type:"image"})),!0}function YH(t,e){var n;if(e){let r=Array.from(((n=t.dataTransfer)==null?void 0:n.items)??[]);if(r=r.filter(s=>s.type.includes("image")),r.length>0)return t.preventDefault(),!0}return ww()?(A6(t)||t.preventDefault(),!0):!1}function GH(t,e,n){var i;let r=Array.from(((i=t.dataTransfer)==null?void 0:i.items)??[]);if(r=r.filter(a=>a.type.includes("image")),r.length>0&&n!==null)return t.preventDefault(),Promise.all(r.map(a=>a.kind==="string"?new Promise(l=>{a.getAsString(l)}):n(a.getAsFile()))).then(a=>{a.forEach(l=>{e.dispatchCommand(Gh,{src:l,altText:""})})}).catch(a=>{throw a}),!0;const s=ww();if(!s)return!1;const o=KH(t);if(!o)return!1;if(t.preventDefault(),A6(t)){const a=JH(t);s.remove();const l=fa();a!=null&&l.applyDOMRange(a),an(l),e.dispatchCommand(Gh,o)}return!0}function ww(){const t=me();if(!hn(t))return null;const n=t.getNodes()[0];return Yh(n)?n:null}function KH(t){var e;const n=(e=t.dataTransfer)==null?void 0:e.getData("application/x-lexical-drag");if(!n)return null;const{type:i,data:r}=JSON.parse(n);return i!=="image"?null:r}function A6(t){const e=t.target;return!!(e&&e instanceof HTMLElement&&e.parentElement)}function JH(t){let e;const n=t.target,i=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,r=UH(i);if(document.caretRangeFromPoint)e=document.caretRangeFromPoint(t.clientX,t.clientY);else if(t.rangeParent&&r!==null)r.collapse(t.rangeParent,t.rangeOffset??0),e=r.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return e}var L1={exports:{}},X5;function eY(){return X5||(X5=1,(function(t){(function(){var e;e=t.exports=r,e.format=r,e.vsprintf=i,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function i(s,o){return r.apply(null,[s].concat(o))}function r(s){for(var o=1,a=[].slice.call(arguments),l=0,u=s.length,c="",h,d=!1,p,g,m=!1,v,S=function(){return a[o++]},b=function(){for(var w="";/\d/.test(s[l]);)w+=s[l++],h=s[l];return w.length>0?parseInt(w):null};l()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),OY=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var r=pY(e),s=0,o=r.length,a;se[l]).bind(null,a),enumerable:!(i=dY(e,a))||i.enumerable});return t},xY=(t,e,n)=>(n=t!=null?fY(gY(t)):{},OY(P6(n,"default",{value:t,enumerable:!0}),t)),fd=un(((t,e)=>{function n(l){return typeof l>"u"||l===null}function i(l){return typeof l=="object"&&l!==null}function r(l){return Array.isArray(l)?l:n(l)?[]:[l]}function s(l,u){if(u){const c=Object.keys(u);for(let h=0,d=c.length;h{function n(r,s){let o="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(o+='in "'+r.mark.name+'" '),o+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!s&&r.mark.snippet&&(o+=` + +`+r.mark.snippet),a+" "+o):a}function i(r,s){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=s,this.message=n(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.toString=function(s){return this.name+": "+n(this,s)},e.exports=i})),vY=un(((t,e)=>{var n=fd();function i(o,a,l,u,c){let h="",d="";const p=Math.floor(c/2)-1;return u-a>p&&(h=" ... ",a=u-p+h.length),l-u>p&&(d=" ...",l=u+p-d.length),{str:h+o.slice(a,l).replace(/\t/g,"→")+d,pos:u-a+h.length}}function r(o,a){return n.repeat(" ",a-o.length)+o}function s(o,a){if(a=Object.create(a||null),!o.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const l=/\r?\n|\r|\0/g,u=[0],c=[];let h,d=-1;for(;h=l.exec(o.buffer);)c.push(h.index),u.push(h.index+h[0].length),o.position<=h.index&&d<0&&(d=u.length-2);d<0&&(d=u.length-1);let p="";const g=Math.min(o.line+a.linesAfter,c.length).toString().length,m=a.maxLength-(a.indent+g+3);for(let S=1;S<=a.linesBefore&&!(d-S<0);S++){const b=i(o.buffer,u[d-S],c[d-S],o.position-(u[d]-u[d-S]),m);p=n.repeat(" ",a.indent)+r((o.line-S+1).toString(),g)+" | "+b.str+` +`+p}const v=i(o.buffer,u[d],c[d],o.position,m);p+=n.repeat(" ",a.indent)+r((o.line+1).toString(),g)+" | "+v.str+` +`,p+=n.repeat("-",a.indent+g+3+v.pos)+`^ +`;for(let S=1;S<=a.linesAfter&&!(d+S>=c.length);S++){const b=i(o.buffer,u[d+S],c[d+S],o.position-(u[d]-u[d+S]),m);p+=n.repeat(" ",a.indent)+r((o.line+S+1).toString(),g)+" | "+b.str+` +`}return p.replace(/\n$/,"")}e.exports=s})),bi=un(((t,e)=>{var n=dd(),i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function s(a){const l={};return a!==null&&Object.keys(a).forEach(function(u){a[u].forEach(function(c){l[String(c)]=u})}),l}function o(a,l){if(l=l||{},Object.keys(l).forEach(function(u){if(i.indexOf(u)===-1)throw new n('Unknown option "'+u+'" is met in definition of "'+a+'" YAML type.')}),this.options=l,this.tag=a,this.kind=l.kind||null,this.resolve=l.resolve||function(){return!0},this.construct=l.construct||function(u){return u},this.instanceOf=l.instanceOf||null,this.predicate=l.predicate||null,this.represent=l.represent||null,this.representName=l.representName||null,this.defaultStyle=l.defaultStyle||null,this.multi=l.multi||!1,this.styleAliases=s(l.styleAliases||null),r.indexOf(this.kind)===-1)throw new n('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}e.exports=o})),I6=un(((t,e)=>{var n=dd(),i=bi();function r(a,l){const u=[];return a[l].forEach(function(c){let h=u.length;u.forEach(function(d,p){d.tag===c.tag&&d.kind===c.kind&&d.multi===c.multi&&(h=p)}),u[h]=c}),u}function s(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function l(u){u.multi?(a.multi[u.kind].push(u),a.multi.fallback.push(u)):a[u.kind][u.tag]=a.fallback[u.tag]=u}for(let u=0,c=arguments.length;u{e.exports=new(bi())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(n){return n!==null?n:""}})})),R6=un(((t,e)=>{e.exports=new(bi())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(n){return n!==null?n:[]}})})),L6=un(((t,e)=>{e.exports=new(bi())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(n){return n!==null?n:{}}})})),N6=un(((t,e)=>{e.exports=new(I6())({explicit:[$6(),R6(),L6()]})})),M6=un(((t,e)=>{var n=bi();function i(o){if(o===null)return!0;const a=o.length;return a===1&&o==="~"||a===4&&(o==="null"||o==="Null"||o==="NULL")}function r(){return null}function s(o){return o===null}e.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:s,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),Q6=un(((t,e)=>{var n=bi();function i(o){if(o===null)return!1;const a=o.length;return a===4&&(o==="true"||o==="True"||o==="TRUE")||a===5&&(o==="false"||o==="False"||o==="FALSE")}function r(o){return o==="true"||o==="True"||o==="TRUE"}function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}e.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:s,represent:{lowercase:function(o){return o?"true":"false"},uppercase:function(o){return o?"TRUE":"FALSE"},camelcase:function(o){return o?"True":"False"}},defaultStyle:"lowercase"})})),D6=un(((t,e)=>{var n=fd(),i=bi();function r(h){return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}function s(h){return h>=48&&h<=55}function o(h){return h>=48&&h<=57}function a(h){if(h===null)return!1;const d=h.length;let p=0,g=!1;if(!d)return!1;let m=h[p];if((m==="-"||m==="+")&&(m=h[++p]),m==="0"){if(p+1===d)return!0;if(m=h[++p],m==="b"){for(p++;p=0?"0b"+h.toString(2):"-0b"+h.toString(2).slice(1)},octal:function(h){return h>=0?"0o"+h.toString(8):"-0o"+h.toString(8).slice(1)},decimal:function(h){return h.toString(10)},hexadecimal:function(h){return h>=0?"0x"+h.toString(16).toUpperCase():"-0x"+h.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),V6=un(((t,e)=>{var n=fd(),i=bi(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(h){return h===null||!r.test(h)?!1:Number.isFinite(parseFloat(h,10))?!0:s.test(h)}function a(h){let d=h.toLowerCase();const p=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?p===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:p*parseFloat(d,10)}var l=/^[-+]?[0-9]+e/;function u(h,d){if(isNaN(h))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===h)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===h)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(h))return"-0.0";const p=h.toString(10);return l.test(p)?p.replace("e",".e"):p}function c(h){return Object.prototype.toString.call(h)==="[object Number]"&&(h%1!==0||n.isNegativeZero(h))}e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:c,represent:u,defaultStyle:"lowercase"})})),F6=un(((t,e)=>{e.exports=N6().extend({implicit:[M6(),Q6(),D6(),V6()]})})),B6=un(((t,e)=>{e.exports=F6()})),j6=un(((t,e)=>{var n=bi(),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function s(l){return l===null?!1:i.exec(l)!==null||r.exec(l)!==null}function o(l){let u=0,c=null,h=i.exec(l);if(h===null&&(h=r.exec(l)),h===null)throw new Error("Date resolve error");const d=+h[1],p=+h[2]-1,g=+h[3];if(!h[4])return new Date(Date.UTC(d,p,g));const m=+h[4],v=+h[5],S=+h[6];if(h[7]){for(u=h[7].slice(0,3);u.length<3;)u+="0";u=+u}if(h[9]){const w=+h[10],k=+(h[11]||0);c=(w*60+k)*6e4,h[9]==="-"&&(c=-c)}const b=new Date(Date.UTC(d,p,g,m,v,S,u));return c&&b.setTime(b.getTime()-c),b}function a(l){return l.toISOString()}e.exports=new n("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a})})),Z6=un(((t,e)=>{var n=bi();function i(r){return r==="<<"||r===null}e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})})),X6=un(((t,e)=>{var n=bi(),i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function r(l){if(l===null)return!1;let u=0;const c=l.length,h=i;for(let d=0;d64)){if(p<0)return!1;u+=6}}return u%8===0}function s(l){const u=l.replace(/[\r\n=]/g,""),c=u.length,h=i;let d=0;const p=[];for(let m=0;m>16&255),p.push(d>>8&255),p.push(d&255)),d=d<<6|h.indexOf(u.charAt(m));const g=c%4*6;return g===0?(p.push(d>>16&255),p.push(d>>8&255),p.push(d&255)):g===18?(p.push(d>>10&255),p.push(d>>2&255)):g===12&&p.push(d>>4&255),new Uint8Array(p)}function o(l){let u="",c=0;const h=l.length,d=i;for(let g=0;g>18&63],u+=d[c>>12&63],u+=d[c>>6&63],u+=d[c&63]),c=(c<<8)+l[g];const p=h%3;return p===0?(u+=d[c>>18&63],u+=d[c>>12&63],u+=d[c>>6&63],u+=d[c&63]):p===2?(u+=d[c>>10&63],u+=d[c>>4&63],u+=d[c<<2&63],u+=d[64]):p===1&&(u+=d[c>>2&63],u+=d[c<<4&63],u+=d[64],u+=d[64]),u}function a(l){return Object.prototype.toString.call(l)==="[object Uint8Array]"}e.exports=new n("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:s,predicate:a,represent:o})})),z6=un(((t,e)=>{var n=bi(),i=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function s(a){if(a===null)return!0;const l=[],u=a;for(let c=0,h=u.length;c{var n=bi(),i=Object.prototype.toString;function r(o){if(o===null)return!0;const a=o,l=new Array(a.length);for(let u=0,c=a.length;u{var n=bi(),i=Object.prototype.hasOwnProperty;function r(o){if(o===null)return!0;const a=o;for(const l in a)if(i.call(a,l)&&a[l]!==null)return!1;return!0}function s(o){return o!==null?o:{}}e.exports=new n("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:s})})),_w=un(((t,e)=>{e.exports=B6().extend({implicit:[j6(),Z6()],explicit:[X6(),z6(),W6(),U6()]})})),bY=un(((t,e)=>{var n=fd(),i=dd(),r=vY(),s=_w(),o=Object.prototype.hasOwnProperty,a=1,l=2,u=3,c=4,h=1,d=2,p=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,v=/[,\[\]{}]/,S=/^(?:!|!!|![0-9A-Za-z-]+!)$/,b=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function w(O){return Object.prototype.toString.call(O)}function k(O){return O===10||O===13}function C(O){return O===9||O===32}function x(O){return O===9||O===32||O===10||O===13}function E(O){return O===44||O===91||O===93||O===123||O===125}function A(O){if(O>=48&&O<=57)return O-48;const L=O|32;return L>=97&&L<=102?L-97+10:-1}function I(O){return O===120?2:O===117?4:O===85?8:0}function Z(O){return O>=48&&O<=57?O-48:-1}function U(O){switch(O){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return` +`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function W(O){return O<=65535?String.fromCharCode(O):String.fromCharCode((O-65536>>10)+55296,(O-65536&1023)+56320)}function B(O,L,M){L==="__proto__"?Object.defineProperty(O,L,{configurable:!0,enumerable:!0,writable:!0,value:M}):O[L]=M}var ne=new Array(256),j=new Array(256);for(let O=0;O<256;O++)ne[O]=U(O)?1:0,j[O]=U(O);function oe(O,L){this.input=O,this.filename=L.filename||null,this.schema=L.schema||s,this.onWarning=L.onWarning||null,this.legacy=L.legacy||!1,this.json=L.json||!1,this.listener=L.listener||null,this.maxDepth=typeof L.maxDepth=="number"?L.maxDepth:100,this.maxMergeSeqLength=typeof L.maxMergeSeqLength=="number"?L.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=O.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function pe(O,L){const M={name:O.filename,buffer:O.input.slice(0,-1),position:O.position,line:O.line,column:O.position-O.lineStart};return M.snippet=r(M),new i(L,M)}function re(O,L){throw pe(O,L)}function ke(O,L){O.onWarning&&O.onWarning.call(null,pe(O,L))}function Ee(O,L,M){const F=O.anchorMapTransactions;if(F.length!==0){const z=F[F.length-1];o.call(z,L)||(z[L]={existed:o.call(O.anchorMap,L),value:O.anchorMap[L]})}O.anchorMap[L]=M}function De(O){O.anchorMapTransactions.push(Object.create(null))}function Ie(O){const L=O.anchorMapTransactions.pop(),M=O.anchorMapTransactions;if(M.length===0)return;const F=M[M.length-1],z=Object.keys(L);for(let H=0,P=z.length;H=0;F-=1){const z=L[M[F]];z.existed?O.anchorMap[M[F]]=z.value:delete O.anchorMap[M[F]]}}function qe(O){return{position:O.position,line:O.line,lineStart:O.lineStart,lineIndent:O.lineIndent,firstTabInLine:O.firstTabInLine,tag:O.tag,anchor:O.anchor,kind:O.kind,result:O.result}}function Ye(O,L){O.position=L.position,O.line=L.line,O.lineStart=L.lineStart,O.lineIndent=L.lineIndent,O.firstTabInLine=L.firstTabInLine,O.tag=L.tag,O.anchor=L.anchor,O.kind=L.kind,O.result=L.result}var Ge={YAML:function(L,M,F){L.version!==null&&re(L,"duplication of %YAML directive"),F.length!==1&&re(L,"YAML directive accepts exactly one argument");const z=/^([0-9]+)\.([0-9]+)$/.exec(F[0]);z===null&&re(L,"ill-formed argument of the YAML directive");const H=parseInt(z[1],10),P=parseInt(z[2],10);H!==1&&re(L,"unacceptable YAML version of the document"),L.version=F[0],L.checkLineBreaks=P<2,P!==1&&P!==2&&ke(L,"unsupported YAML version of the document")},TAG:function(L,M,F){let z;F.length!==2&&re(L,"TAG directive accepts exactly two arguments");const H=F[0];z=F[1],S.test(H)||re(L,"ill-formed tag handle (first argument) of the TAG directive"),o.call(L.tagMap,H)&&re(L,'there is a previously declared suffix for "'+H+'" tag handle'),b.test(z)||re(L,"ill-formed tag prefix (second argument) of the TAG directive");try{z=decodeURIComponent(z)}catch{re(L,"tag prefix is malformed: "+z)}L.tagMap[H]=z}};function he(O,L,M,F){if(L=32&&X<=1114111||re(O,"expected valid JSON character")}else g.test(z)&&re(O,"the stream contains non-printable characters");O.result+=z}}function xe(O,L,M,F){n.isObject(M)||re(O,"cannot merge mappings; the provided source object is unacceptable");const z=Object.keys(M);for(let H=0,P=z.length;HO.maxMergeSeqLength&&re(O,"merge sequence length exceeded maxMergeSeqLength ("+O.maxMergeSeqLength+")");const ie=new Set;for(let le=0,fe=H.length;le1&&(O.result+=n.repeat(` +`,L-1))}function St(O,L,M){let F,z,H,P,X,J;const ie=O.kind,le=O.result;let fe=O.input.charCodeAt(O.position);if(x(fe)||E(fe)||fe===35||fe===38||fe===42||fe===33||fe===124||fe===62||fe===39||fe===34||fe===37||fe===64||fe===96)return!1;if(fe===63||fe===45){const ue=O.input.charCodeAt(O.position+1);if(x(ue)||M&&E(ue))return!1}for(O.kind="scalar",O.result="",F=z=O.position,H=!1;fe!==0;){if(fe===58){const ue=O.input.charCodeAt(O.position+1);if(x(ue)||M&&E(ue))break}else if(fe===35){if(x(O.input.charCodeAt(O.position-1)))break}else{if(O.position===O.lineStart&&Ke(O)||M&&E(fe))break;if(k(fe))if(P=O.line,X=O.lineStart,J=O.lineIndent,Le(O,!1,-1),O.lineIndent>=L){H=!0,fe=O.input.charCodeAt(O.position);continue}else{O.position=z,O.line=P,O.lineStart=X,O.lineIndent=J;break}}H&&(he(O,F,z,!1),lt(O,O.line-P),F=z=O.position,H=!1),C(fe)||(z=O.position+1),fe=O.input.charCodeAt(++O.position)}return he(O,F,z,!1),O.result?!0:(O.kind=ie,O.result=le,!1)}function zt(O,L){let M,F,z=O.input.charCodeAt(O.position);if(z!==39)return!1;for(O.kind="scalar",O.result="",O.position++,M=F=O.position;(z=O.input.charCodeAt(O.position))!==0;)if(z===39)if(he(O,M,O.position,!0),z=O.input.charCodeAt(++O.position),z===39)M=O.position,O.position++,F=O.position;else return!0;else k(z)?(he(O,M,F,!0),lt(O,Le(O,!1,L)),M=F=O.position):O.position===O.lineStart&&Ke(O)?re(O,"unexpected end of the document within a single quoted scalar"):(O.position++,C(z)||(F=O.position));re(O,"unexpected end of the stream within a single quoted scalar")}function Ft(O,L){let M,F,z,H=O.input.charCodeAt(O.position);if(H!==34)return!1;for(O.kind="scalar",O.result="",O.position++,M=F=O.position;(H=O.input.charCodeAt(O.position))!==0;){if(H===34)return he(O,M,O.position,!0),O.position++,!0;if(H===92){if(he(O,M,O.position,!0),H=O.input.charCodeAt(++O.position),k(H))Le(O,!1,L);else if(H<256&&ne[H])O.result+=j[H],O.position++;else if((z=I(H))>0){let P=z,X=0;for(;P>0;P--)H=O.input.charCodeAt(++O.position),(z=A(H))>=0?X=(X<<4)+z:re(O,"expected hexadecimal character");O.result+=W(X),O.position++}else re(O,"unknown escape sequence");M=F=O.position}else k(H)?(he(O,M,F,!0),lt(O,Le(O,!1,L)),M=F=O.position):O.position===O.lineStart&&Ke(O)?re(O,"unexpected end of the document within a double quoted scalar"):(O.position++,C(H)||(F=O.position))}re(O,"unexpected end of the stream within a double quoted scalar")}function Rt(O,L){let M=!0,F,z,H;const P=O.tag;let X;const J=O.anchor;let ie,le,fe,ue;const Te=Object.create(null);let ve,Fe,ge,ut=O.input.charCodeAt(O.position);if(ut===91)ie=93,ue=!1,X=[];else if(ut===123)ie=125,ue=!0,X={};else return!1;for(O.anchor!==null&&Ee(O,O.anchor,X),ut=O.input.charCodeAt(++O.position);ut!==0;){if(Le(O,!0,L),ut=O.input.charCodeAt(O.position),ut===ie)return O.position++,O.tag=P,O.anchor=J,O.kind=ue?"mapping":"sequence",O.result=X,!0;M?ut===44&&re(O,"expected the node content, but found ','"):re(O,"missed comma between flow collection entries"),Fe=ve=ge=null,le=fe=!1,ut===63&&x(O.input.charCodeAt(O.position+1))&&(le=fe=!0,O.position++,Le(O,!0,L)),F=O.line,z=O.lineStart,H=O.position,en(O,L,a,!1,!0),Fe=O.tag,ve=O.result,Le(O,!0,L),ut=O.input.charCodeAt(O.position),(fe||O.line===F)&&ut===58&&(le=!0,ut=O.input.charCodeAt(++O.position),Le(O,!0,L),en(O,L,a,!1,!0),ge=O.result),ue?Ce(O,X,Te,Fe,ve,ge,F,z,H):le?X.push(Ce(O,null,Te,Fe,ve,ge,F,z,H)):X.push(ve),Le(O,!0,L),ut=O.input.charCodeAt(O.position),ut===44?(M=!0,ut=O.input.charCodeAt(++O.position)):M=!1}re(O,"unexpected end of the stream within a flow collection")}function Sn(O,L){let M,F=h,z=!1,H=!1,P=L,X=0,J=!1,ie,le=O.input.charCodeAt(O.position);if(le===124)M=!1;else if(le===62)M=!0;else return!1;for(O.kind="scalar",O.result="";le!==0;)if(le=O.input.charCodeAt(++O.position),le===43||le===45)h===F?F=le===43?p:d:re(O,"repeat of a chomping mode identifier");else if((ie=Z(le))>=0)ie===0?re(O,"bad explicit indentation width of a block scalar; it cannot be less than one"):H?re(O,"repeat of an indentation width identifier"):(P=L+ie-1,H=!0);else break;if(C(le)){do le=O.input.charCodeAt(++O.position);while(C(le));if(le===35)do le=O.input.charCodeAt(++O.position);while(!k(le)&&le!==0)}for(;le!==0;){for($e(O),O.lineIndent=0,le=O.input.charCodeAt(O.position);(!H||O.lineIndentP&&(P=O.lineIndent),k(le)){X++;continue}if(!H&&P===0&&re(O,"missing indentation for block scalar"),O.lineIndentL)&&P!==0)re(O,"bad indentation of a sequence entry");else if(O.lineIndentL)&&(ve&&(z=O.line,H=O.lineStart,P=O.position),en(O,L,c,!0,F)&&(ve?ue=O.result:Te=O.result),ve||(Ce(O,ie,le,fe,ue,Te,z,H,P),fe=ue=Te=null),Le(O,!0,-1),ge=O.input.charCodeAt(O.position)),(O.line===Ut||O.lineIndent>L)&&ge!==0)re(O,"bad indentation of a mapping entry");else if(O.lineIndent=O.maxDepth&&re(O,"nesting exceeded maxDepth ("+O.maxDepth+")"),O.depth+=1,O.listener!==null&&O.listener("open",O),O.tag=null,O.anchor=null,O.kind=null,O.result=null;const ve=H=P=c===M||u===M;if(F&&Le(O,!0,-1)&&(J=!0,O.lineIndent>L?X=1:O.lineIndent===L?X=0:O.lineIndentL?X=1:O.lineIndent===L?X=0:O.lineIndent tag; it should be "scalar", not "'+O.kind+'"');for(let Fe=0,ge=O.implicitTypes.length;Fe"),O.result!==null&&fe.kind!==O.kind&&re(O,"unacceptable node kind for !<"+O.tag+'> tag; it should be "'+fe.kind+'", not "'+O.kind+'"'),fe.resolve(O.result,O.tag)?(O.result=fe.construct(O.result,O.tag),O.anchor!==null&&Ee(O,O.anchor,O.result)):re(O,"cannot resolve a node with !<"+O.tag+"> explicit tag")}return O.listener!==null&&O.listener("close",O),O.depth-=1,O.tag!==null||O.anchor!==null||ie}function yi(O){const L=O.position;let M=!1,F;for(O.version=null,O.checkLineBreaks=O.legacy,O.tagMap=Object.create(null),O.anchorMap=Object.create(null);(F=O.input.charCodeAt(O.position))!==0&&(Le(O,!0,-1),F=O.input.charCodeAt(O.position),!(O.lineIndent>0||F!==37));){M=!0,F=O.input.charCodeAt(++O.position);let z=O.position;for(;F!==0&&!x(F);)F=O.input.charCodeAt(++O.position);const H=O.input.slice(z,O.position),P=[];for(H.length<1&&re(O,"directive name must not be less than one character in length");F!==0;){for(;C(F);)F=O.input.charCodeAt(++O.position);if(F===35){do F=O.input.charCodeAt(++O.position);while(F!==0&&!k(F));break}if(k(F))break;for(z=O.position;F!==0&&!x(F);)F=O.input.charCodeAt(++O.position);P.push(O.input.slice(z,O.position))}F!==0&&$e(O),o.call(Ge,H)?Ge[H](O,H,P):ke(O,'unknown document directive "'+H+'"')}if(Le(O,!0,-1),O.lineIndent===0&&O.input.charCodeAt(O.position)===45&&O.input.charCodeAt(O.position+1)===45&&O.input.charCodeAt(O.position+2)===45?(O.position+=3,Le(O,!0,-1)):M&&re(O,"directives end mark is expected"),en(O,O.lineIndent-1,c,!1,!0),Le(O,!0,-1),O.checkLineBreaks&&m.test(O.input.slice(L,O.position))&&ke(O,"non-ASCII line breaks are interpreted as content"),O.documents.push(O.result),O.position===O.lineStart&&Ke(O)){O.input.charCodeAt(O.position)===46&&(O.position+=3,Le(O,!0,-1));return}O.position"u"&&(M=L,L=null);const F=_t(O,M);if(typeof L!="function")return F;for(let z=0,H=F.length;z{var n=fd(),i=dd(),r=_w(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,l=9,u=10,c=13,h=32,d=33,p=34,g=35,m=37,v=38,S=39,b=42,w=44,k=45,C=58,x=61,E=62,A=63,I=64,Z=91,U=93,W=96,B=123,ne=124,j=125,oe={};oe[0]="\\0",oe[7]="\\a",oe[8]="\\b",oe[9]="\\t",oe[10]="\\n",oe[11]="\\v",oe[12]="\\f",oe[13]="\\r",oe[27]="\\e",oe[34]='\\"',oe[92]="\\\\",oe[133]="\\N",oe[160]="\\_",oe[8232]="\\L",oe[8233]="\\P";var pe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],re=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ke(P,X){if(X===null)return{};const J={},ie=Object.keys(X);for(let le=0,fe=ie.length;le=32&&P<=126||P>=161&&P<=55295&&P!==8232&&P!==8233||P>=57344&&P<=65533&&P!==a||P>=65536&&P<=1114111}function Ce(P){return xe(P)&&P!==a&&P!==c&&P!==u}function $e(P,X,J){const ie=Ce(P),le=ie&&!he(P);return(J?ie:ie&&P!==w&&P!==Z&&P!==U&&P!==B&&P!==j)&&P!==g&&!(X===C&&!le)||Ce(X)&&!he(X)&&P===g||X===C&&le}function Le(P){return xe(P)&&P!==a&&!he(P)&&P!==k&&P!==A&&P!==C&&P!==w&&P!==Z&&P!==U&&P!==B&&P!==j&&P!==g&&P!==v&&P!==b&&P!==d&&P!==ne&&P!==x&&P!==E&&P!==S&&P!==p&&P!==m&&P!==I&&P!==W}function Ke(P){return!he(P)&&P!==C}function lt(P,X){const J=P.charCodeAt(X);let ie;return J>=55296&&J<=56319&&X+1=56320&&ie<=57343)?(J-55296)*1024+ie-56320+65536:J}function St(P){return/^\n* /.test(P)}var zt=1,Ft=2,Rt=3,Sn=4,Wt=5;function Ln(P,X,J,ie,le,fe,ue,Te){let ve,Fe=0,ge=null,ut=!1,Ut=!1;const $d=ie!==-1;let ss=-1,Si=Le(lt(P,0))&&Ke(lt(P,P.length-1));if(X||ue)for(ve=0;ve=65536?ve+=2:ve++){if(Fe=lt(P,ve),!xe(Fe))return Wt;Si=Si&&$e(Fe,ge,Te),ge=Fe}else{for(ve=0;ve=65536?ve+=2:ve++){if(Fe=lt(P,ve),Fe===u)ut=!0,$d&&(Ut=Ut||ve-ss-1>ie&&P[ss+1]!==" ",ss=ve);else if(!xe(Fe))return Wt;Si=Si&&$e(Fe,ge,Te),ge=Fe}Ut=Ut||$d&&ve-ss-1>ie&&P[ss+1]!==" "}return!ut&&!Ut?Si&&!ue&&!le(P)?zt:fe===Ie?Wt:Ft:J>9&&St(P)?Wt:ue?fe===Ie?Wt:Ft:Ut?Sn:Rt}function cn(P,X,J,ie,le){P.dump=(function(){if(X.length===0)return P.quotingType===Ie?'""':"''";if(!P.noCompatMode&&(pe.indexOf(X)!==-1||re.test(X)))return P.quotingType===Ie?'"'+X+'"':"'"+X+"'";const fe=P.indent*Math.max(1,J),ue=P.lineWidth===-1?-1:Math.max(Math.min(P.lineWidth,40),P.lineWidth-fe),Te=ie||P.flowLevel>-1&&J>=P.flowLevel;function ve(Fe){return Ge(P,Fe)}switch(Ln(X,Te,P.indent,ue,ve,P.quotingType,P.forceQuotes&&!ie,le)){case zt:return X;case Ft:return"'"+X.replace(/'/g,"''")+"'";case Rt:return"|"+Wn(X,P.indent)+wn(qe(X,fe));case Sn:return">"+Wn(X,P.indent)+wn(qe(st(X,ue),fe));case Wt:return'"'+yi(X)+'"';default:throw new i("impossible error: invalid scalar style")}})()}function Wn(P,X){const J=St(P)?String(X):"",ie=P[P.length-1]===` +`;return J+(ie&&(P[P.length-2]===` +`||P===` +`)?"+":ie?"":"-")+` +`}function wn(P){return P[P.length-1]===` +`?P.slice(0,-1):P}function st(P,X){const J=/(\n+)([^\n]*)/g;let ie=(function(){let Te=P.indexOf(` +`);return Te=Te!==-1?Te:P.length,J.lastIndex=Te,en(P.slice(0,Te),X)})(),le=P[0]===` +`||P[0]===" ",fe,ue;for(;ue=J.exec(P);){const Te=ue[1],ve=ue[2];fe=ve[0]===" ",ie+=Te+(!le&&!fe&&ve!==""?` +`:"")+en(ve,X),le=fe}return ie}function en(P,X){if(P===""||P[0]===" ")return P;const J=/ [^ ]/g;let ie,le=0,fe,ue=0,Te=0,ve="";for(;ie=J.exec(P);)Te=ie.index,Te-le>X&&(fe=ue>le?ue:Te,ve+=` +`+P.slice(le,fe),le=fe+1),ue=Te;return ve+=` +`,P.length-le>X&&ue>le?ve+=P.slice(le,ue)+` +`+P.slice(ue+1):ve+=P.slice(le),ve.slice(1)}function yi(P){let X="",J=0;for(let ie=0;ie=65536?ie+=2:ie++){J=lt(P,ie);const le=oe[J];!le&&xe(J)?(X+=P[ie],J>=65536&&(X+=P[ie+1])):X+=le||Ee(J)}return X}function _t(P,X,J){let ie="";const le=P.tag;for(let fe=0,ue=J.length;fe"u"&&M(P,X,null,!1,!1))&&(ie!==""&&(ie+=","+(P.condenseFlow?"":" ")),ie+=P.dump)}P.tag=le,P.dump="["+ie+"]"}function D(P,X,J,ie){let le="";const fe=P.tag;for(let ue=0,Te=J.length;ue"u"&&M(P,X+1,null,!0,!0,!1,!0))&&((!ie||le!=="")&&(le+=Ye(P,X)),P.dump&&u===P.dump.charCodeAt(0)?le+="-":le+="- ",le+=P.dump)}P.tag=fe,P.dump=le||"[]"}function Et(P,X,J){let ie="";const le=P.tag,fe=Object.keys(J);for(let ue=0,Te=fe.length;ue1024&&(ve+="? "),ve+=P.dump+(P.condenseFlow?'"':"")+":"+(P.condenseFlow?"":" "),M(P,X,ge,!1,!1)&&(ve+=P.dump,ie+=ve))}P.tag=le,P.dump="{"+ie+"}"}function O(P,X,J,ie){let le="";const fe=P.tag,ue=Object.keys(J);if(P.sortKeys===!0)ue.sort();else if(typeof P.sortKeys=="function")ue.sort(P.sortKeys);else if(P.sortKeys)throw new i("sortKeys must be a boolean or a function");for(let Te=0,ve=ue.length;Te1024;Ut&&(P.dump&&u===P.dump.charCodeAt(0)?Fe+="?":Fe+="? "),Fe+=P.dump,Ut&&(Fe+=Ye(P,X)),M(P,X+1,ut,!0,Ut)&&(P.dump&&u===P.dump.charCodeAt(0)?Fe+=":":Fe+=": ",Fe+=P.dump,le+=Fe)}P.tag=fe,P.dump=le||"{}"}function L(P,X,J){const ie=J?P.explicitTypes:P.implicitTypes;for(let le=0,fe=ie.length;le tag resolver accepts not "'+Te+'" style');P.dump=ve}return!0}}return!1}function M(P,X,J,ie,le,fe,ue){P.tag=null,P.dump=J,L(P,J,!1)||L(P,J,!0);const Te=s.call(P.dump),ve=ie;ie&&(ie=P.flowLevel<0||P.flowLevel>X);const Fe=Te==="[object Object]"||Te==="[object Array]";let ge,ut;if(Fe&&(ge=P.duplicates.indexOf(J),ut=ge!==-1),(P.tag!==null&&P.tag!=="?"||ut||P.indent!==2&&X>0)&&(le=!1),ut&&P.usedDuplicates[ge])P.dump="*ref_"+ge;else{if(Fe&&ut&&!P.usedDuplicates[ge]&&(P.usedDuplicates[ge]=!0),Te==="[object Object]")ie&&Object.keys(P.dump).length!==0?(O(P,X,P.dump,le),ut&&(P.dump="&ref_"+ge+P.dump)):(Et(P,X,P.dump),ut&&(P.dump="&ref_"+ge+" "+P.dump));else if(Te==="[object Array]")ie&&P.dump.length!==0?(P.noArrayIndent&&!ue&&X>0?D(P,X-1,P.dump,le):D(P,X,P.dump,le),ut&&(P.dump="&ref_"+ge+P.dump)):(_t(P,X,P.dump),ut&&(P.dump="&ref_"+ge+" "+P.dump));else if(Te==="[object String]")P.tag!=="?"&&cn(P,P.dump,X,fe,ve);else{if(Te==="[object Undefined]")return!1;if(P.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+Te)}if(P.tag!==null&&P.tag!=="?"){let Ut=encodeURI(P.tag[0]==="!"?P.tag.slice(1):P.tag).replace(/!/g,"%21");P.tag[0]==="!"?Ut="!"+Ut:Ut.slice(0,18)==="tag:yaml.org,2002:"?Ut="!!"+Ut.slice(18):Ut="!<"+Ut+">",P.dump=Ut+" "+P.dump}}return!0}function F(P,X){const J=[],ie=[];z(P,J,ie);const le=ie.length;for(let fe=0;fe{var n=bY(),i=yY();function r(s,o){return function(){throw new Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}e.exports.Type=bi(),e.exports.Schema=I6(),e.exports.FAILSAFE_SCHEMA=N6(),e.exports.JSON_SCHEMA=F6(),e.exports.CORE_SCHEMA=B6(),e.exports.DEFAULT_SCHEMA=_w(),e.exports.load=n.load,e.exports.loadAll=n.loadAll,e.exports.dump=i.dump,e.exports.YAMLException=dd(),e.exports.types={binary:X6(),float:V6(),map:L6(),null:M6(),pairs:W6(),set:U6(),timestamp:j6(),bool:Q6(),int:D6(),merge:Z6(),omap:z6(),seq:R6(),str:$6()},e.exports.safeLoad=r("safeLoad","load"),e.exports.safeLoadAll=r("safeLoadAll","loadAll"),e.exports.safeDump=r("safeDump","dump")}))()),{Type:cfe,Schema:hfe,FAILSAFE_SCHEMA:ffe,JSON_SCHEMA:dfe,CORE_SCHEMA:pfe,DEFAULT_SCHEMA:gfe,load:mfe,loadAll:Ofe,dump:xfe,YAMLException:vfe,types:bfe,safeLoad:yfe,safeLoadAll:Sfe,safeDump:wfe}=q6.default,q5=q6.default;const SY=({yaml:t,onChange:e})=>{const[n,i,r,s]=$t(In,es,Jt,Kh),o=Qt(),a=bt(Kh),l=bt(Ew),u=_.useMemo(()=>t?Object.entries(q5.load(t)).map(([S,b])=>({key:S,value:b})):[],[t]),{register:c,control:h,handleSubmit:d}=iO({defaultValues:{yamlConfig:u}}),{fields:p,append:g,remove:m}=Yq({control:h,name:"yamlConfig"}),v=_.useCallback(({yamlConfig:S})=>{if(S.length===0){l(),a(!1);return}const b=S.reduce((w,{key:k,value:C})=>(k&&C&&(w[k]=C),w),{});e(q5.dump(b).trim()),a(!1)},[e,a,l]);return _.createElement(_.Fragment,null,_.createElement(q0,{open:s,onOpenChange:S=>{a(S)}},_.createElement(H0,{container:i?.current},_.createElement(Y0,{className:G.dialogOverlay}),_.createElement(G0,{className:G.largeDialogContent,"data-editor-type":"frontmatter"},_.createElement(GS,{className:G.dialogTitle},o("frontmatterEditor.title","Edit document frontmatter")),_.createElement("form",{onSubmit:S=>{d(v)(S),S.stopPropagation()},onReset:S=>{S.stopPropagation(),a(!1)}},_.createElement("table",{className:G.propertyEditorTable},_.createElement("colgroup",null,_.createElement("col",null),_.createElement("col",null),_.createElement("col",null)),_.createElement("thead",null,_.createElement("tr",null,_.createElement("th",null,o("frontmatterEditor.key","Key")),_.createElement("th",null,o("frontmatterEditor.value","Value")),_.createElement("th",null))),_.createElement("tbody",null,p.map((S,b)=>_.createElement("tr",{key:S.id},_.createElement("td",null,_.createElement(H5,{...c(`yamlConfig.${b}.key`,{required:!0}),autofocusIfEmpty:!0,readOnly:n})),_.createElement("td",null,_.createElement(H5,{...c(`yamlConfig.${b}.value`,{required:!0}),readOnly:n})),_.createElement("td",null,_.createElement("button",{type:"button",onClick:()=>{m(b)},className:G.iconButton,disabled:n},r("delete_big")))))),_.createElement("tfoot",null,_.createElement("tr",null,_.createElement("td",null,_.createElement("button",{disabled:n,className:ft(G.primaryButton,G.smallButton),type:"button",onClick:()=>{g({key:"",value:""})}},o("frontmatterEditor.addEntry","Add entry")))))),_.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},_.createElement("button",{type:"submit",className:G.primaryButton},o("dialogControls.save","Save")),_.createElement("button",{type:"reset",className:G.secondaryButton},o("dialogControls.cancel","Cancel")))),_.createElement(K0,{asChild:!0},_.createElement("button",{className:G.dialogCloseButton,"aria-label":o("dialogControls.cancel","Cancel")},r("close")))))))},H5=_.forwardRef(({className:t,autofocusIfEmpty:e,...n},i)=>_.createElement("input",{className:ft(G.propertyEditorInput,t),...n,ref:i}));var wY=Object.defineProperty,CY=(t,e,n)=>e in t?wY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_Y=(t,e,n)=>(CY(t,e+"",n),n);class xc extends Cr{constructor(e,n){super(n),_Y(this,"__yaml"),this.__yaml=e}static getType(){return"frontmatter"}static clone(e){return new xc(e.__yaml,e.__key)}static importJSON(e){const{yaml:n}=e;return pd(n)}exportJSON(){return{yaml:this.getYaml(),type:"frontmatter",version:1}}createDOM(e){return document.createElement("div")}updateDOM(){return!1}getYaml(){return this.getLatest().__yaml}setYaml(e){e!==this.__yaml&&(this.getWritable().__yaml=e)}decorate(e){return _.createElement(SY,{yaml:this.getYaml(),onChange:n=>{e.update(()=>{this.setYaml(n)})}})}isKeyboardSelectable(){return!1}}function pd(t){return new xc(t)}function zo(t){return t instanceof xc}const kY={testLexicalNode:zo,visitLexicalNode:({actions:t,lexicalNode:e})=>{t.addAndStepInto("yaml",{value:e.getYaml()})}},EY={testNode:"yaml",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(pd(t.value))}},Kh=Pe(!1),kw=Gr(t=>{t.sub(t.pipe(kw,rn(Bi)),([,e])=>{e?.update(()=>{const n=ht().getFirstChild();if(!zo(n)){const i=pd('"": ""');n?n.insertBefore(i):ht().append(i)}}),t.pub(Kh,!0)})}),Ew=Gr(t=>{t.sub(t.pipe(Ew,rn(Bi)),([,e])=>{e?.update(()=>{const n=ht().getFirstChild();zo(n)&&n.remove()}),t.pub(Kh,!1)})}),Tw=Pe(!1,t=>{t.pub(Sl,e=>e.registerUpdateListener(({editorState:n})=>{n.read(()=>{t.pub(Tw,zo(ht().getFirstChild()))})}))}),TY=En({init:t=>{t.pubIn({[Jo]:oY("yaml"),[Ko]:rY(),[rr]:xc,[Qi]:EY,[sr]:kY,[bl]:cY("yaml"),[Sl]:e=>e.registerCommand(Lf,n=>{let i=!1;return e.read(()=>{const r=me();if(ce(r))if(r.isCollapsed()&&r.anchor.offset===0&&r.focus.offset===0&&n.key==="Backspace"){let s=r.getNodes()[0];ye(s)&&(s=s.getParent());const o=s?.getPreviousSibling();zo(o)&&(i=!0,n.preventDefault())}else{const s=r.getNodes()[0];if(zo(s)){const o=s.getYaml();setTimeout(()=>{e.update(()=>{const a=ht().getFirstChild();zo(a)||ht().splice(0,0,[pd(o)])},{discrete:!0})})}}}),!!i},Mi)})}}),AY={testNode:"blockquote",visitNode({actions:t}){t.addAndStepInto(Yf())}},PY={testLexicalNode:bv,visitLexicalNode:({actions:t})=>{t.addAndStepInto("blockquote")}},IY=En({init(t){t.pubIn({[wl]:"quote",[Qi]:AY,[rr]:b0,[sr]:PY})}}),$Y=En({init:(t,e=1/0)=>{t.pub(Sl,n=>{let i=null;return n.registerNodeTransform(ml,r=>{const s=me();if(!ce(s)||!s.isCollapsed())return;const o=n.getEditorState(),a=o.read(()=>r.getTextContentSize()),l=r.getTextContentSize();if(a!==l){const u=l-e,c=s.anchor;u>0&&(a===e&&i!==o?(i=o,DF(n,o)):TF(n,c,u))}})})}});function RY(){return{enter:{mdxFlowExpression:NY,mdxTextExpression:MY},exit:{mdxFlowExpression:Y5,mdxFlowExpressionChunk:G5,mdxTextExpression:Y5,mdxTextExpressionChunk:G5}}}function LY(){return{handlers:{mdxFlowExpression:K5,mdxTextExpression:K5},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]}}function NY(t){this.enter({type:"mdxFlowExpression",value:""},t),this.buffer()}function MY(t){this.enter({type:"mdxTextExpression",value:""},t),this.buffer()}function Y5(t){const e=this.resume(),n=t.estree,i=this.stack[this.stack.length-1];zi(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression"),this.exit(t),i.value=e,n&&(i.data={estree:n})}function G5(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}function K5(t,e,n){const i=t.value||"";return"{"+n.indentLines(i,function(s,o,a){return(o===0||a?"":" ")+s})+"}"}function QY(){return{enter:{mdxjsEsm:VY},exit:{mdxjsEsm:FY,mdxjsEsmData:BY}}}function DY(){return{handlers:{mdxjsEsm:jY}}}function VY(t){this.enter({type:"mdxjsEsm",value:""},t),this.buffer()}function FY(t){const e=this.resume(),n=this.stack[this.stack.length-1];zi(n.type==="mdxjsEsm"),this.exit(t);const i=t.estree;n.value=e,i&&(n.data={estree:i})}function BY(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}function jY(t){return t.value||""}function ZY(){return[RY(),Q9(),QY()]}function XY(t){return{extensions:[LY(),D9(),DY()]}}var zY=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],H6=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],WY="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Y6="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",N1={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},M1="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",UY={5:M1,"5module":M1+" export import",6:M1+" const class extends export import super"},G6=/^in(stanceof)?$/,qY=new RegExp("["+Y6+"]"),HY=new RegExp("["+Y6+WY+"]");function qv(t,e){for(var n=65536,i=0;it)return!1;if(n+=e[i+1],n>=t)return!0}return!1}function Is(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&qY.test(String.fromCharCode(t)):e===!1?!1:qv(t,H6)}function na(t,e){return t<48?t===36:t<58?!0:t<65?!1:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&HY.test(String.fromCharCode(t)):e===!1?!1:qv(t,H6)||qv(t,zY)}var kt=function(e,n){n===void 0&&(n={}),this.label=e,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function lr(t,e){return new kt(t,{beforeExpr:!0,binop:e})}var ur={beforeExpr:!0},wi={startsExpr:!0},Aw={};function xt(t,e){return e===void 0&&(e={}),e.keyword=t,Aw[t]=new kt(t,e)}var N={num:new kt("num",wi),regexp:new kt("regexp",wi),string:new kt("string",wi),name:new kt("name",wi),privateId:new kt("privateId",wi),eof:new kt("eof"),bracketL:new kt("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new kt("]"),braceL:new kt("{",{beforeExpr:!0,startsExpr:!0}),braceR:new kt("}"),parenL:new kt("(",{beforeExpr:!0,startsExpr:!0}),parenR:new kt(")"),comma:new kt(",",ur),semi:new kt(";",ur),colon:new kt(":",ur),dot:new kt("."),question:new kt("?",ur),questionDot:new kt("?."),arrow:new kt("=>",ur),template:new kt("template"),invalidTemplate:new kt("invalidTemplate"),ellipsis:new kt("...",ur),backQuote:new kt("`",wi),dollarBraceL:new kt("${",{beforeExpr:!0,startsExpr:!0}),eq:new kt("=",{beforeExpr:!0,isAssign:!0}),assign:new kt("_=",{beforeExpr:!0,isAssign:!0}),incDec:new kt("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new kt("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:lr("||",1),logicalAND:lr("&&",2),bitwiseOR:lr("|",3),bitwiseXOR:lr("^",4),bitwiseAND:lr("&",5),equality:lr("==/!=/===/!==",6),relational:lr("/<=/>=",7),bitShift:lr("<>/>>>",8),plusMin:new kt("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:lr("%",10),star:lr("*",10),slash:lr("/",10),starstar:new kt("**",{beforeExpr:!0}),coalesce:lr("??",1),_break:xt("break"),_case:xt("case",ur),_catch:xt("catch"),_continue:xt("continue"),_debugger:xt("debugger"),_default:xt("default",ur),_do:xt("do",{isLoop:!0,beforeExpr:!0}),_else:xt("else",ur),_finally:xt("finally"),_for:xt("for",{isLoop:!0}),_function:xt("function",wi),_if:xt("if"),_return:xt("return",ur),_switch:xt("switch"),_throw:xt("throw",ur),_try:xt("try"),_var:xt("var"),_const:xt("const"),_while:xt("while",{isLoop:!0}),_with:xt("with"),_new:xt("new",{beforeExpr:!0,startsExpr:!0}),_this:xt("this",wi),_super:xt("super",wi),_class:xt("class",wi),_extends:xt("extends",ur),_export:xt("export"),_import:xt("import",wi),_null:xt("null",wi),_true:xt("true",wi),_false:xt("false",wi),_in:xt("in",{beforeExpr:!0,binop:7}),_instanceof:xt("instanceof",{beforeExpr:!0,binop:7}),_typeof:xt("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:xt("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:xt("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Di=/\r\n?|\n|\u2028|\u2029/,YY=new RegExp(Di.source,"g");function vc(t){return t===10||t===13||t===8232||t===8233}function K6(t,e,n){n===void 0&&(n=t.length);for(var i=e;i>10)+55296,(t&1023)+56320))}var JY=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Jh=function(e,n){this.line=e,this.column=n};Jh.prototype.offset=function(e){return new Jh(this.line,this.column+e)};var rO=function(e,n,i){this.start=n,this.end=i,e.sourceFile!==null&&(this.source=e.sourceFile)};function t4(t,e){for(var n=1,i=0;;){var r=K6(t,i,e);if(r<0)return new Jh(n,e-i);++n,i=r}}var Hv={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},tE=!1;function eG(t){var e={};for(var n in Hv)e[n]=t&&bc(t,n)?t[n]:Hv[n];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!tE&&typeof console=="object"&&console.warn&&(tE=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),(!t||t.allowHashBang==null)&&(e.allowHashBang=e.ecmaVersion>=14),J5(e.onToken)){var i=e.onToken;e.onToken=function(r){return i.push(r)}}if(J5(e.onComment)&&(e.onComment=tG(e,e.onComment)),e.sourceType==="commonjs"&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}function tG(t,e){return function(n,i,r,s,o,a){var l={type:n?"Block":"Line",value:i,start:r,end:s};t.locations&&(l.loc=new rO(this,o,a)),t.ranges&&(l.range=[r,s]),e.push(l)}}var rl=1,_l=2,Pw=4,n4=8,Iw=16,i4=32,sO=64,r4=128,kl=256,gd=512,s4=1024,oO=rl|_l|kl;function $w(t,e){return _l|(t?Pw:0)|(e?n4:0)}var im=0,Rw=1,yo=2,o4=3,a4=4,l4=5,Qn=function(e,n,i){this.options=e=eG(e),this.sourceFile=e.sourceFile,this.keywords=Do(UY[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var r="";e.allowReserved!==!0&&(r=N1[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module"&&(r+=" await")),this.reservedWords=Do(r);var s=(r?r+" ":"")+N1.strict;this.reservedWordsStrict=Do(s),this.reservedWordsStrictBind=Do(s+" "+N1.strictBind),this.input=String(n),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf(` +`,i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Di).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=N.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType==="module",this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?_l:rl),this.regexpState=null,this.privateNameStack=[]},_r={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Qn.prototype.parse=function(){var e=this,n=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(n)})};_r.inFunction.get=function(){return(this.currentVarScope().flags&_l)>0};_r.inGenerator.get=function(){return(this.currentVarScope().flags&n4)>0};_r.inAsync.get=function(){return(this.currentVarScope().flags&Pw)>0};_r.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],n=e.flags;if(n&(kl|gd))return!1;if(n&_l)return(n&Pw)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};_r.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&rl)};_r.allowSuper.get=function(){var t=this.currentThisScope(),e=t.flags;return(e&sO)>0||this.options.allowSuperOutsideMethod};_r.allowDirectSuper.get=function(){return(this.currentThisScope().flags&r4)>0};_r.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};_r.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],n=e.flags;if(n&(kl|gd)||n&_l&&!(n&Iw))return!0}return!1};_r.allowUsing.get=function(){var t=this.currentScope(),e=t.flags;return!(e&s4||!this.inModule&&e&rl)};_r.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&kl)>0};Qn.extend=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];for(var i=this,r=0;r=,?^&]/.test(r)||r==="!"&&this.input.charAt(i+1)==="=")}t+=e[0].length,Bn.lastIndex=t,t+=Bn.exec(this.input)[0].length,this.input[t]===";"&&t++}};hi.eat=function(t){return this.type===t?(this.next(),!0):!1};hi.isContextual=function(t){return this.type===N.name&&this.value===t&&!this.containsEsc};hi.eatContextual=function(t){return this.isContextual(t)?(this.next(),!0):!1};hi.catchStackOverflow=function(t){try{return t()}catch(e){if(e instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message)||/\btoo much recursion\b/i.test(e.message)))this.raise(this.start,"Not enough stack space to parse input");else throw e}};hi.expectContextual=function(t){this.eatContextual(t)||this.unexpected()};hi.canInsertSemicolon=function(){return this.type===N.eof||this.type===N.braceR||Di.test(this.input.slice(this.lastTokEnd,this.start))};hi.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};hi.semicolon=function(){!this.eat(N.semi)&&!this.insertSemicolon()&&this.unexpected()};hi.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0};hi.expect=function(t){this.eat(t)||this.unexpected()};hi.unexpected=function(t){this.raise(t??this.start,"Unexpected token")};var aO=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};hi.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var n=e?t.parenthesizedAssign:t.parenthesizedBind;n>-1&&this.raiseRecoverable(n,e?"Assigning to rvalue":"Parenthesized pattern")}};hi.checkExpressionErrors=function(t,e){if(!t)return!1;var n=t.shorthandAssign,i=t.doubleProto;if(!e)return n>=0||i>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")};hi.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!t);case N._class:return t&&this.unexpected(),this.parseClass(r,!0);case N._if:return this.parseIfStatement(r);case N._return:return this.parseReturnStatement(r);case N._switch:return this.parseSwitchStatement(r);case N._throw:return this.parseThrowStatement(r);case N._try:return this.parseTryStatement(r);case N._const:case N._var:return s=s||this.value,t&&s!=="var"&&this.unexpected(),this.parseVarStatement(r,s);case N._while:return this.parseWhileStatement(r);case N._with:return this.parseWithStatement(r);case N.braceL:return this.parseBlock(!0,r);case N.semi:return this.parseEmptyStatement(r);case N._export:case N._import:if(this.options.ecmaVersion>10&&i===N._import){Bn.lastIndex=this.pos;var o=Bn.exec(this.input),a=this.pos+o[0].length,l=this.input.charCodeAt(a);if(l===40||l===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===N._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!t);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),t&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(r,!1,u),this.semicolon(),this.finishNode(r,"VariableDeclaration");var c=this.value,h=this.parseExpression();return i===N.name&&h.type==="Identifier"&&this.eat(N.colon)?this.parseLabeledStatement(r,c,h,t):this.parseExpressionStatement(r,h)}};Xe.parseBreakContinueStatement=function(t,e){var n=e==="break";this.next(),this.eat(N.semi)||this.insertSemicolon()?t.label=null:this.type!==N.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(N.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")};Xe.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Lw),this.enterScope(0),this.expect(N.parenL),this.type===N.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var n=this.isLet();if(this.type===N._var||this.type===N._const||n){var i=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),this.parseForAfterInit(t,i,e)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var l=this.startNode();return this.next(),a==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(l,!0,a),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(t,l,e)}var u=this.containsEsc,c=new aO,h=this.start,d=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===N._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===N._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(d.start===h&&!u&&d.type==="Identifier"&&d.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(t.await=!1)),s&&o&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,c),this.checkLValPattern(d),this.parseForIn(t,d)):(this.checkExpressionErrors(c,!0),e>-1&&this.unexpected(e),this.parseFor(t,d))};Xe.parseForAfterInit=function(t,e,n){return(this.type===N._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&e.declarations.length===1?(this.type===N._in?((e.kind==="using"||e.kind==="await using")&&!e.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&n>-1&&this.unexpected(n)):this.options.ecmaVersion>=9&&(t.await=n>-1),this.parseForIn(t,e)):(n>-1&&this.unexpected(n),this.parseFor(t,e))};Xe.parseFunctionStatement=function(t,e,n){return this.next(),this.parseFunction(t,yh|(n?0:Yv),!1,e)};Xe.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(N._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")};Xe.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(N.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")};Xe.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(N.braceL),this.labels.push(iG),this.enterScope(s4);for(var e,n=!1;this.type!==N.braceR;)if(this.type===N._case||this.type===N._default){var i=this.type===N._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),i?e.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,e.test=null),this.expect(N.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")};Xe.parseThrowStatement=function(t){return this.next(),Di.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var rG=[];Xe.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e=t.type==="Identifier";return this.enterScope(e?i4:0),this.checkLValPattern(t,e?a4:yo),this.expect(N.parenR),t};Xe.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===N._catch){var e=this.startNode();this.next(),this.eat(N.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(N._finally)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")};Xe.parseVarStatement=function(t,e,n){return this.next(),this.parseVar(t,!1,e,n),this.semicolon(),this.finishNode(t,"VariableDeclaration")};Xe.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(Lw),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")};Xe.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")};Xe.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")};Xe.parseLabeledStatement=function(t,e,n,i){for(var r=0,s=this.labels;r=0;l--){var u=this.labels[l];if(u.statementStart===t.start)u.statementStart=this.start,u.kind=a;else break}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),t.label=n,this.finishNode(t,"LabeledStatement")};Xe.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")};Xe.parseBlock=function(t,e,n){for(t===void 0&&(t=!0),e===void 0&&(e=this.startNode()),e.body=[],this.expect(N.braceL),t&&this.enterScope(0);this.type!==N.braceR;){var i=this.parseStatement(null);e.body.push(i)}return n&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")};Xe.parseFor=function(t,e){return t.init=e,this.expect(N.semi),t.test=this.type===N.semi?null:this.parseExpression(),this.expect(N.semi),t.update=this.type===N.parenR?null:this.parseExpression(),this.expect(N.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")};Xe.parseForIn=function(t,e){var n=this.type===N._in;return this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(e.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(N.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,n?"ForInStatement":"ForOfStatement")};Xe.parseVar=function(t,e,n,i){for(t.declarations=[],t.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(N.eq)?r.init=this.parseMaybeAssign(e):!i&&n==="const"&&!(this.type===N._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!i&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==N._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):!i&&r.id.type!=="Identifier"&&!(e&&(this.type===N._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):r.init=null,t.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(N.comma))break}return t};Xe.parseVarId=function(t,e){t.id=e==="using"||e==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?Rw:yo,!1)};var yh=1,Yv=2,u4=4;Xe.parseFunction=function(t,e,n,i,r){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===N.star&&e&Yv&&this.unexpected(),t.generator=this.eat(N.star)),this.options.ecmaVersion>=8&&(t.async=!!i),e&yh&&(t.id=e&u4&&this.type!==N.name?null:this.parseIdent(),t.id&&!(e&Yv)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?Rw:yo:o4));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope($w(t.async,t.generator)),e&yh||(t.id=this.type===N.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,n,!1,r),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(t,e&yh?"FunctionDeclaration":"FunctionExpression")};Xe.parseFunctionParams=function(t){this.expect(N.parenL),t.params=this.parseBindingList(N.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};Xe.parseClass=function(t,e){this.next();var n=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var i=this.enterClassBody(),r=this.startNode(),s=!1;for(r.body=[],this.expect(N.braceL);this.type!==N.braceR;){var o=this.parseClassElement(t.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&o.key.type==="PrivateIdentifier"&&sG(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=n,this.next(),t.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")};Xe.parseClassElement=function(t){if(this.eat(N.semi))return null;var e=this.options.ecmaVersion,n=this.startNode(),i="",r=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(N.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===N.star?a=!0:i="static"}if(n.static=a,!i&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===N.star)&&!this.canInsertSemicolon()?s=!0:i="async"),!i&&(e>=9||!s)&&this.eat(N.star)&&(r=!0),!i&&!s&&!r){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:i=l)}if(i?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=i,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),e<13||this.type===N.parenL||o!=="method"||r||s){var u=!n.static&&rm(n,"constructor"),c=u&&t;u&&o!=="method"&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=u?"constructor":o,this.parseClassMethod(n,r,s,c)}else this.parseClassField(n);return n};Xe.isClassElementNameStart=function(){return this.type===N.name||this.type===N.privateId||this.type===N.num||this.type===N.string||this.type===N.bracketL||this.type.keyword};Xe.parseClassElementName=function(t){this.type===N.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)};Xe.parseClassMethod=function(t,e,n,i){var r=t.key;t.kind==="constructor"?(e&&this.raise(r.start,"Constructor can't be a generator"),n&&this.raise(r.start,"Constructor can't be an async method")):t.static&&rm(t,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var s=t.value=this.parseMethod(e,n,i);return t.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),t.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),t.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")};Xe.parseClassField=function(t){return rm(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&rm(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(N.eq)?(this.enterScope(gd|sO),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")};Xe.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(kl|sO);this.type!==N.braceR;){var n=this.parseStatement(null);t.body.push(n)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")};Xe.parseClassId=function(t,e){this.type===N.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,yo,!1)):(e===!0&&this.unexpected(),t.id=null)};Xe.parseClassSuper=function(t){t.superClass=this.eat(N._extends)?this.parseExprSubscripts(null,!1):null};Xe.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared};Xe.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,n=t.used;if(this.options.checkPrivateFields)for(var i=this.privateNameStack.length,r=i===0?null:this.privateNameStack[i-1],s=0;s=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==N.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")};Xe.parseExport=function(t,e){if(this.next(),this.eat(N.star))return this.parseExportAllDeclaration(t,e);if(this.eat(N._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==N.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var n=0,i=t.specifiers;n=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")};Xe.parseExportDeclaration=function(t){return this.parseStatement(null)};Xe.parseExportDefaultDeclaration=function(){var t;if(this.type===N._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,yh|u4,!1,t)}else if(this.type===N._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var i=this.parseMaybeAssign();return this.semicolon(),i}};Xe.checkExport=function(t,e,n){t&&(typeof e!="string"&&(e=e.type==="Identifier"?e.name:e.value),bc(t,e)&&this.raiseRecoverable(n,"Duplicate export '"+e+"'"),t[e]=!0)};Xe.checkPatternExport=function(t,e){var n=e.type;if(n==="Identifier")this.checkExport(t,e,e.start);else if(n==="ObjectPattern")for(var i=0,r=e.properties;i=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")};Xe.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,yo),this.finishNode(t,"ImportSpecifier")};Xe.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,yo),this.finishNode(t,"ImportDefaultSpecifier")};Xe.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,yo),this.finishNode(t,"ImportNamespaceSpecifier")};Xe.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===N.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(N.comma)))return t;if(this.type===N.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(N.braceL);!this.eat(N.braceR);){if(e)e=!1;else if(this.expect(N.comma),this.afterTrailingComma(N.braceR))break;t.push(this.parseImportSpecifier())}return t};Xe.parseWithClause=function(){var t=[];if(!this.eat(N._with))return t;this.expect(N.braceL);for(var e={},n=!0;!this.eat(N.braceR);){if(n)n=!1;else if(this.expect(N.comma),this.afterTrailingComma(N.braceR))break;var i=this.parseImportAttribute(),r=i.key.type==="Identifier"?i.key.name:i.key.value;bc(e,r)&&this.raiseRecoverable(i.key.start,"Duplicate attribute key '"+r+"'"),e[r]=!0,t.push(i)}return t};Xe.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===N.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(N.colon),this.type!==N.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")};Xe.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===N.string){var t=this.parseLiteral(this.value);return JY.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)};Xe.adaptDirectivePrologue=function(t){for(var e=0;e=5&&t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var kr=Qn.prototype;kr.toAssignable=function(t,e,n){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var i=0,r=t.properties;i=8&&!a&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(N._function))return this.overrideContext(dn.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,e);if(r&&!this.canInsertSemicolon()){if(this.eat(N.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[l],!1,e);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===N.name&&!a&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(N.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[l],!0,e)}return l;case N.regexp:var u=this.value;return i=this.parseLiteral(u.value),i.regex={pattern:u.pattern,flags:u.flags},i;case N.num:case N.string:return this.parseLiteral(this.value);case N._null:case N._true:case N._false:return i=this.startNode(),i.value=this.type===N._null?null:this.type===N._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case N.parenL:var c=this.start,h=this.parseParenAndDistinguishExpression(r,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),h;case N.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(N.bracketR,!0,!0,t),this.finishNode(i,"ArrayExpression");case N.braceL:return this.overrideContext(dn.b_expr),this.parseObj(!1,t);case N._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case N._class:return this.parseClass(this.startNode(),!1);case N._new:return this.parseNew();case N.backQuote:return this.parseTemplate();case N._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}};nt.parseExprAtomDefault=function(){this.unexpected()};nt.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===N.parenL&&!t)return this.parseDynamicImport(e);if(this.type===N.dot){var n=this.startNodeAt(e.start,e.loc&&e.loc.start);return n.name="import",e.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(e)}else this.unexpected()};nt.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(N.parenR)?t.options=null:(this.expect(N.comma),this.afterTrailingComma(N.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(N.parenR)||(this.expect(N.comma),this.afterTrailingComma(N.parenR)||this.unexpected())));else if(!this.eat(N.parenR)){var e=this.start;this.eat(N.comma)&&this.eat(N.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")};nt.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")};nt.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110&&(e.bigint=e.value!=null?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")};nt.parseParenExpression=function(){this.expect(N.parenL);var t=this.parseExpression();return this.expect(N.parenR),t};nt.shouldParseArrow=function(t){return!this.canInsertSemicolon()};nt.parseParenAndDistinguishExpression=function(t,e){var n=this.start,i=this.startLoc,r,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,a=this.startLoc,l=[],u=!0,c=!1,h=new aO,d=this.yieldPos,p=this.awaitPos,g;for(this.yieldPos=0,this.awaitPos=0;this.type!==N.parenR;)if(u?u=!1:this.expect(N.comma),s&&this.afterTrailingComma(N.parenR,!0)){c=!0;break}else if(this.type===N.ellipsis){g=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===N.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,h,this.parseParenItem));var m=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(N.parenR),t&&this.shouldParseArrow(l)&&this.eat(N.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=p,this.parseParenArrowList(n,i,l,e);(!l.length||c)&&this.unexpected(this.lastTokStart),g&&this.unexpected(g),this.checkExpressionErrors(h,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,l.length>1?(r=this.startNodeAt(o,a),r.expressions=l,this.finishNodeAt(r,"SequenceExpression",m,v)):r=l[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var S=this.startNodeAt(n,i);return S.expression=r,this.finishNode(S,"ParenthesizedExpression")}else return r};nt.parseParenItem=function(t){return t};nt.parseParenArrowList=function(t,e,n,i){return this.parseArrowExpression(this.startNodeAt(t,e),n,!1,i)};var oG=[];nt.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===N.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var n=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var i=this.start,r=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,r,!0,!1),t.callee.type==="Super"&&this.raiseRecoverable(i,"Invalid use of 'super'"),this.eat(N.parenL)?t.arguments=this.parseExprList(N.parenR,this.options.ecmaVersion>=8,!1):t.arguments=oG,this.finishNode(t,"NewExpression")};nt.parseTemplateElement=function(t){var e=t.isTagged,n=this.startNode();return this.type===N.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),n.tail=this.type===N.backQuote,this.finishNode(n,"TemplateElement")};nt.parseTemplate=function(t){t===void 0&&(t={});var e=t.isTagged;e===void 0&&(e=!1);var n=this.startNode();this.next(),n.expressions=[];var i=this.parseTemplateElement({isTagged:e});for(n.quasis=[i];!i.tail;)this.type===N.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(N.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(N.braceR),n.quasis.push(i=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(n,"TemplateLiteral")};nt.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===N.name||this.type===N.num||this.type===N.string||this.type===N.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===N.star)&&!Di.test(this.input.slice(this.lastTokEnd,this.start))};nt.parseObj=function(t,e){var n=this.startNode(),i=!0,r={};for(n.properties=[],this.next();!this.eat(N.braceR);){if(i)i=!1;else if(this.expect(N.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(N.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,r,e),n.properties.push(s)}return this.finishNode(n,t?"ObjectPattern":"ObjectExpression")};nt.parseProperty=function(t,e){var n=this.startNode(),i,r,s,o;if(this.options.ecmaVersion>=9&&this.eat(N.ellipsis))return t?(n.argument=this.parseIdent(!1),this.type===N.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(n.argument=this.parseMaybeAssign(!1,e),this.type===N.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(t||e)&&(s=this.start,o=this.startLoc),t||(i=this.eat(N.star)));var a=this.containsEsc;return this.parsePropertyName(n),!t&&!a&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n)?(r=!0,i=this.options.ecmaVersion>=9&&this.eat(N.star),this.parsePropertyName(n)):r=!1,this.parsePropertyValue(n,t,i,r,s,o,e,a),this.finishNode(n,"Property")};nt.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var n=t.kind==="get"?0:1;if(t.value.params.length!==n){var i=t.value.start;t.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")};nt.parsePropertyValue=function(t,e,n,i,r,s,o,a){(n||i)&&this.type===N.colon&&this.unexpected(),this.eat(N.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===N.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(n,i),t.kind="init"):!e&&!a&&this.options.ecmaVersion>=5&&!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.type!==N.comma&&this.type!==N.braceR&&this.type!==N.eq?((n||i)&&this.unexpected(),this.parseGetterSetter(t)):this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((n||i)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),e?t.value=this.parseMaybeDefault(r,s,this.copyNode(t.key)):this.type===N.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected()};nt.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(N.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(N.bracketR),t.key;t.computed=!1}return t.key=this.type===N.num||this.type===N.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};nt.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};nt.parseMethod=function(t,e,n){var i=this.startNode(),r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=t),this.options.ecmaVersion>=8&&(i.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope($w(e,i.generator)|sO|(n?r4:0)),this.expect(N.parenL),i.params=this.parseBindingList(N.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")};nt.parseArrowExpression=function(t,e,n,i){var r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope($w(n,!1)|Iw),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,i),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")};nt.parseFunctionBody=function(t,e,n,i){var r=e&&this.type!==N.braceL,s=this.strict,o=!1;if(r)t.body=this.parseMaybeAssign(i),t.expression=!0,this.checkParams(t,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!s||a)&&(o=this.strictDirective(this.end),o&&a&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var l=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(t,!s&&!o&&!e&&!n&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,l4),t.body=this.parseBlock(!1,void 0,o&&!s),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=l}this.exitScope()};nt.isSimpleParamList=function(t){for(var e=0,n=t;e-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&r.flags&rl&&delete this.undefinedExports[t]}else if(e===a4){var s=this.currentScope();s.lexical.push(t)}else if(e===o4){var o=this.currentScope();this.treatFunctionsAsVar?i=o.lexical.indexOf(t)>-1:i=o.lexical.indexOf(t)>-1||o.var.indexOf(t)>-1,o.functions.push(t)}else for(var a=this.scopeStack.length-1;a>=0;--a){var l=this.scopeStack[a];if(l.lexical.indexOf(t)>-1&&!(l.flags&i4&&l.lexical[0]===t)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(t)>-1){i=!0;break}if(l.var.push(t),this.inModule&&l.flags&rl&&delete this.undefinedExports[t],l.flags&oO)break}i&&this.raiseRecoverable(n,"Identifier '"+t+"' has already been declared")};xa.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)};xa.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};xa.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(oO|gd|kl))return e}};xa.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(oO|gd|kl)&&!(e.flags&Iw))return e}};var lO=function(e,n,i){this.type="",this.start=n,this.end=0,e.options.locations&&(this.loc=new rO(e,i)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[n,0])},md=Qn.prototype;md.startNode=function(){return new lO(this,this.start,this.startLoc)};md.startNodeAt=function(t,e){return new lO(this,t,e)};function h4(t,e,n,i){return t.type=e,t.end=n,this.options.locations&&(t.loc.end=i),this.options.ranges&&(t.range[1]=n),t}md.finishNode=function(t,e){return h4.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)};md.finishNodeAt=function(t,e,n,i){return h4.call(this,t,e,n,i)};md.copyNode=function(t){var e=new lO(this,t.start,this.startLoc);for(var n in t)e[n]=t[n];return e};var lG="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",f4="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",d4=f4+" Extended_Pictographic",p4=d4,g4=p4+" EBase EComp EMod EPres ExtPict",m4=g4,uG=m4,cG={9:f4,10:d4,11:p4,12:g4,13:m4,14:uG},hG="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",fG={9:"",10:"",11:"",12:"",13:"",14:hG},nE="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",O4="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",x4=O4+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",v4=x4+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",b4=v4+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",y4=b4+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",dG=y4+" "+lG,pG={9:O4,10:x4,11:v4,12:b4,13:y4,14:dG},S4={};function gG(t){var e=S4[t]={binary:Do(cG[t]+" "+nE),binaryOfStrings:Do(fG[t]),nonBinary:{General_Category:Do(nE),Script:Do(pG[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(var Q1=0,iE=[9,10,11,12,13,14];Q1=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=S4[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Ls.prototype.reset=function(e,n,i){var r=i.indexOf("v")!==-1,s=i.indexOf("u")!==-1;this.start=e|0,this.source=n+"",this.flags=i,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=s&&this.parser.options.ecmaVersion>=9)};Ls.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};Ls.prototype.at=function(e,n){n===void 0&&(n=!1);var i=this.source,r=i.length;if(e>=r)return-1;var s=i.charCodeAt(e);if(!(n||this.switchU)||s<=55295||s>=57344||e+1>=r)return s;var o=i.charCodeAt(e+1);return o>=56320&&o<=57343?(s<<10)+o-56613888:s};Ls.prototype.nextIndex=function(e,n){n===void 0&&(n=!1);var i=this.source,r=i.length;if(e>=r)return r;var s=i.charCodeAt(e),o;return!(n||this.switchU)||s<=55295||s>=57344||e+1>=r||(o=i.charCodeAt(e+1))<56320||o>57343?e+1:e+2};Ls.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)};Ls.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)};Ls.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)};Ls.prototype.eat=function(e,n){return n===void 0&&(n=!1),this.current(n)===e?(this.advance(n),!0):!1};Ls.prototype.eatChars=function(e,n){n===void 0&&(n=!1);for(var i=this.pos,r=0,s=e;r-1&&this.raise(t.start,"Duplicate regular expression flag"),o==="u"&&(i=!0),o==="v"&&(r=!0)}this.options.ecmaVersion>=15&&i&&r&&this.raise(t.start,"Invalid regular expression flag")};function OG(t){for(var e in t)return!0;return!1}Ze.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&OG(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))};Ze.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,n=t.backReferenceNames;e=16;for(e&&(t.branchID=new om(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")};Ze.regexp_alternative=function(t){for(;t.pos=9&&(n=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!n,!0}return t.pos=e,!1};Ze.regexp_eatQuantifier=function(t,e){return e===void 0&&(e=!1),this.regexp_eatQuantifierPrefix(t,e)?(t.eat(63),!0):!1};Ze.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)};Ze.regexp_eatBracedQuantifier=function(t,e){var n=t.pos;if(t.eat(123)){var i=0,r=-1;if(this.regexp_eatDecimalDigits(t)&&(i=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue),t.eat(125)))return r!==-1&&r=16){var n=this.regexp_eatModifiers(t),i=t.eat(45);if(n||i){for(var r=0;r-1&&t.raise("Duplicate regular expression modifiers")}if(i){var o=this.regexp_eatModifiers(t);!n&&!o&&t.current()===58&&t.raise("Invalid regular expression modifiers");for(var a=0;a-1||n.indexOf(l)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1};Ze.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):t.current()===63&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1};Ze.regexp_eatModifiers=function(t){for(var e="",n=0;(n=t.current())!==-1&&xG(n);)e+=lo(n),t.advance();return e};function xG(t){return t===105||t===109||t===115}Ze.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)};Ze.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1};Ze.regexp_eatSyntaxCharacter=function(t){var e=t.current();return w4(e)?(t.lastIntValue=e,t.advance(),!0):!1};function w4(t){return t===36||t>=40&&t<=43||t===46||t===63||t>=91&&t<=94||t>=123&&t<=125}Ze.regexp_eatPatternCharacters=function(t){for(var e=t.pos,n=0;(n=t.current())!==-1&&!w4(n);)t.advance();return t.pos!==e};Ze.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return e!==-1&&e!==36&&!(e>=40&&e<=43)&&e!==46&&e!==63&&e!==91&&e!==94&&e!==124?(t.advance(),!0):!1};Ze.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,n=t.groupNames[t.lastStringValue];if(n)if(e)for(var i=0,r=n;i=11,i=t.current(n);return t.advance(n),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,n)&&(i=t.lastIntValue),vG(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function vG(t){return Is(t,!0)||t===36||t===95}Ze.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,n=this.options.ecmaVersion>=11,i=t.current(n);return t.advance(n),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,n)&&(i=t.lastIntValue),bG(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function bG(t){return na(t,!0)||t===36||t===95||t===8204||t===8205}Ze.regexp_eatAtomEscape=function(t){return this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t)?!0:(t.switchU&&(t.current()===99&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)};Ze.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var n=t.lastIntValue;if(t.switchU)return n>t.maxBackReference&&(t.maxBackReference=n),!0;if(n<=t.numCapturingParens)return!0;t.pos=e}return!1};Ze.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1};Ze.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)};Ze.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1};Ze.regexp_eatZero=function(t){return t.current()===48&&!uO(t.lookahead())?(t.lastIntValue=0,t.advance(),!0):!1};Ze.regexp_eatControlEscape=function(t){var e=t.current();return e===116?(t.lastIntValue=9,t.advance(),!0):e===110?(t.lastIntValue=10,t.advance(),!0):e===118?(t.lastIntValue=11,t.advance(),!0):e===102?(t.lastIntValue=12,t.advance(),!0):e===114?(t.lastIntValue=13,t.advance(),!0):!1};Ze.regexp_eatControlLetter=function(t){var e=t.current();return C4(e)?(t.lastIntValue=e%32,t.advance(),!0):!1};function C4(t){return t>=65&&t<=90||t>=97&&t<=122}Ze.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){e===void 0&&(e=!1);var n=t.pos,i=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var r=t.lastIntValue;if(i&&r>=55296&&r<=56319){var s=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var o=t.lastIntValue;if(o>=56320&&o<=57343)return t.lastIntValue=(r-55296)*1024+(o-56320)+65536,!0}t.pos=s,t.lastIntValue=r}return!0}if(i&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&yG(t.lastIntValue))return!0;i&&t.raise("Invalid unicode escape"),t.pos=n}return!1};function yG(t){return t>=0&&t<=1114111}Ze.regexp_eatIdentityEscape=function(t){if(t.switchU)return this.regexp_eatSyntaxCharacter(t)?!0:t.eat(47)?(t.lastIntValue=47,!0):!1;var e=t.current();return e!==99&&(!t.switchN||e!==107)?(t.lastIntValue=e,t.advance(),!0):!1};Ze.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do t.lastIntValue=10*t.lastIntValue+(e-48),t.advance();while((e=t.current())>=48&&e<=57);return!0}return!1};var _4=0,uo=1,fr=2;Ze.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(SG(e))return t.lastIntValue=-1,t.advance(),uo;var n=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((n=e===80)||e===112)){t.lastIntValue=-1,t.advance();var i;if(t.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return n&&i===fr&&t.raise("Invalid property name"),i;t.raise("Invalid property name")}return _4};function SG(t){return t===100||t===68||t===115||t===83||t===119||t===87}Ze.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var n=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var i=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,n,i),uo}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,r)}return _4};Ze.regexp_validateUnicodePropertyNameAndValue=function(t,e,n){bc(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(n)||t.raise("Invalid property value")};Ze.regexp_validateUnicodePropertyNameOrValue=function(t,e){if(t.unicodeProperties.binary.test(e))return uo;if(t.switchV&&t.unicodeProperties.binaryOfStrings.test(e))return fr;t.raise("Invalid property name")};Ze.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";k4(e=t.current());)t.lastStringValue+=lo(e),t.advance();return t.lastStringValue!==""};function k4(t){return C4(t)||t===95}Ze.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";wG(e=t.current());)t.lastStringValue+=lo(e),t.advance();return t.lastStringValue!==""};function wG(t){return k4(t)||uO(t)}Ze.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)};Ze.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),n=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&n===fr&&t.raise("Negated character class may contain strings"),!0}return!1};Ze.regexp_classContents=function(t){return t.current()===93?uo:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),uo)};Ze.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var n=t.lastIntValue;t.switchU&&(e===-1||n===-1)&&t.raise("Invalid character class"),e!==-1&&n!==-1&&e>n&&t.raise("Range out of order in character class")}}};Ze.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var n=t.current();(n===99||A4(n))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var i=t.current();return i!==93?(t.lastIntValue=i,t.advance(),!0):!1};Ze.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)};Ze.regexp_classSetExpression=function(t){var e=uo,n;if(!this.regexp_eatClassSetRange(t))if(n=this.regexp_eatClassSetOperand(t)){n===fr&&(e=fr);for(var i=t.pos;t.eatChars([38,38]);){if(t.current()!==38&&(n=this.regexp_eatClassSetOperand(t))){n!==fr&&(e=uo);continue}t.raise("Invalid character in character class")}if(i!==t.pos)return e;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(i!==t.pos)return e}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(n=this.regexp_eatClassSetOperand(t),!n)return e;n===fr&&(e=fr)}};Ze.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var n=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;return n!==-1&&i!==-1&&n>i&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1};Ze.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?uo:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)};Ze.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var n=t.eat(94),i=this.regexp_classContents(t);if(t.eat(93))return n&&i===fr&&t.raise("Negated character class may contain strings"),i;t.pos=e}if(t.eat(92)){var r=this.regexp_eatCharacterClassEscape(t);if(r)return r;t.pos=e}return null};Ze.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var n=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return n}else t.raise("Invalid escape");t.pos=e}return null};Ze.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)this.regexp_classString(t)===fr&&(e=fr);return e};Ze.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return e===1?uo:fr};Ze.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return this.regexp_eatCharacterEscape(t)||this.regexp_eatClassSetReservedPunctuator(t)?!0:t.eat(98)?(t.lastIntValue=8,!0):(t.pos=e,!1);var n=t.current();return n<0||n===t.lookahead()&&CG(n)||_G(n)?!1:(t.advance(),t.lastIntValue=n,!0)};function CG(t){return t===33||t>=35&&t<=38||t>=42&&t<=44||t===46||t>=58&&t<=64||t===94||t===96||t===126}function _G(t){return t===40||t===41||t===45||t===47||t>=91&&t<=93||t>=123&&t<=125}Ze.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return kG(e)?(t.lastIntValue=e,t.advance(),!0):!1};function kG(t){return t===33||t===35||t===37||t===38||t===44||t===45||t>=58&&t<=62||t===64||t===96||t===126}Ze.regexp_eatClassControlLetter=function(t){var e=t.current();return uO(e)||e===95?(t.lastIntValue=e%32,t.advance(),!0):!1};Ze.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1};Ze.regexp_eatDecimalDigits=function(t){var e=t.pos,n=0;for(t.lastIntValue=0;uO(n=t.current());)t.lastIntValue=10*t.lastIntValue+(n-48),t.advance();return t.pos!==e};function uO(t){return t>=48&&t<=57}Ze.regexp_eatHexDigits=function(t){var e=t.pos,n=0;for(t.lastIntValue=0;E4(n=t.current());)t.lastIntValue=16*t.lastIntValue+T4(n),t.advance();return t.pos!==e};function E4(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function T4(t){return t>=65&&t<=70?10+(t-65):t>=97&&t<=102?10+(t-97):t-48}Ze.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var n=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=e*64+n*8+t.lastIntValue:t.lastIntValue=e*8+n}else t.lastIntValue=e;return!0}return!1};Ze.regexp_eatOctalDigit=function(t){var e=t.current();return A4(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)};function A4(t){return t>=48&&t<=55}Ze.regexp_eatFixedHexDigits=function(t,e){var n=t.pos;t.lastIntValue=0;for(var i=0;i=this.input.length)return this.finishToken(N.eof);if(t.override)return t.override(this);this.readToken(this.fullCharCodeAtPos())};Ot.readToken=function(t){return Is(t,this.options.ecmaVersion>=6)||t===92?this.readWord():this.getTokenFromCode(t)};Ot.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var n=this.input.charCodeAt(t+1);return n<=56319||n>=57344?e:(e<<10)+n-56613888};Ot.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};Ot.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var i=void 0,r=e;(i=K6(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,n),e,this.pos,t,this.curPosition())};Ot.skipLineComment=function(t){for(var e=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=t);this.pos8&&t<14||t>=5760&&J6.test(String.fromCharCode(t)))++this.pos;else break e}}};Ot.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=t,this.value=e,this.updateContext(n)};Ot.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&t===46&&e===46?(this.pos+=3,this.finishToken(N.ellipsis)):(++this.pos,this.finishToken(N.dot))};Ot.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):t===61?this.finishOp(N.assign,2):this.finishOp(N.slash,1)};Ot.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),n=1,i=t===42?N.star:N.modulo;return this.options.ecmaVersion>=7&&t===42&&e===42&&(++n,i=N.starstar,e=this.input.charCodeAt(this.pos+2)),e===61?this.finishOp(N.assign,n+1):this.finishOp(i,n)};Ot.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(N.assign,3)}return this.finishOp(t===124?N.logicalOR:N.logicalAND,2)}return e===61?this.finishOp(N.assign,2):this.finishOp(t===124?N.bitwiseOR:N.bitwiseAND,1)};Ot.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(N.assign,2):this.finishOp(N.bitwiseXOR,1)};Ot.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?e===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Di.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(N.incDec,2):e===61?this.finishOp(N.assign,2):this.finishOp(N.plusMin,1)};Ot.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),n=1;return e===t?(n=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(N.assign,n+1):this.finishOp(N.bitShift,n)):e===33&&t===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(e===61&&(n=2),this.finishOp(N.relational,n))};Ot.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(N.equality,this.input.charCodeAt(this.pos+2)===61?3:2):t===61&&e===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(N.arrow)):this.finishOp(t===61?N.eq:N.prefix,1)};Ot.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(e===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(N.questionDot,2)}if(e===63){if(t>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(N.assign,3)}return this.finishOp(N.coalesce,2)}}return this.finishOp(N.question,1)};Ot.readToken_numberSign=function(){var t=this.options.ecmaVersion,e=35;if(t>=13&&(++this.pos,e=this.fullCharCodeAtPos(),Is(e,!0)||e===92))return this.finishToken(N.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+lo(e)+"'")};Ot.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(N.parenL);case 41:return++this.pos,this.finishToken(N.parenR);case 59:return++this.pos,this.finishToken(N.semi);case 44:return++this.pos,this.finishToken(N.comma);case 91:return++this.pos,this.finishToken(N.bracketL);case 93:return++this.pos,this.finishToken(N.bracketR);case 123:return++this.pos,this.finishToken(N.braceL);case 125:return++this.pos,this.finishToken(N.braceR);case 58:return++this.pos,this.finishToken(N.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(N.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(e===120||e===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(e===111||e===79)return this.readRadixNumber(8);if(e===98||e===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(N.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+lo(t)+"'")};Ot.finishOp=function(t,e){var n=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,n)};Ot.readRegexp=function(){for(var t,e,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(Di.test(i)&&this.raise(n,"Unterminated regular expression"),t)t=!1;else{if(i==="[")e=!0;else if(i==="]"&&e)e=!1;else if(i==="/"&&!e)break;t=i==="\\"}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Ls(this));a.reset(n,r,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(r,o)}catch{}return this.finishToken(N.regexp,{pattern:r,flags:o,value:l})};Ot.readInt=function(t,e,n){for(var i=this.options.ecmaVersion>=12&&e===void 0,r=n&&this.input.charCodeAt(this.pos)===48,s=this.pos,o=0,a=0,l=0,u=e??1/0;l=97?h=c-97+10:c>=65?h=c-65+10:c>=48&&c<=57?h=c-48:h=1/0,h>=t)break;a=c,o=o*t+h}return i&&a===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||e!=null&&this.pos-s!==e?null:o};function EG(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function P4(t){return typeof BigInt!="function"?null:BigInt(t.replace(/_/g,""))}Ot.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var n=this.readInt(t);return n==null&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=P4(this.input.slice(e,this.pos)),++this.pos):Is(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(N.num,n)};Ot.readNumber=function(t){var e=this.pos;!t&&this.readInt(10,void 0,!0)===null&&this.raise(e,"Invalid number");var n=this.pos-e>=2&&this.input.charCodeAt(e)===48;n&&this.strict&&this.raise(e,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!n&&!t&&this.options.ecmaVersion>=11&&i===110){var r=P4(this.input.slice(e,this.pos));return++this.pos,Is(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(N.num,r)}n&&/[89]/.test(this.input.slice(e,this.pos))&&(n=!1),i===46&&!n&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(i===69||i===101)&&!n&&(i=this.input.charCodeAt(++this.pos),(i===43||i===45)&&++this.pos,this.readInt(10)===null&&this.raise(e,"Invalid number")),Is(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=EG(this.input.slice(e,this.pos),n);return this.finishToken(N.num,s)};Ot.readCodePoint=function(){var t=this.input.charCodeAt(this.pos),e;if(t===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else e=this.readHexChar(4);return e};Ot.readString=function(t){for(var e="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===t)break;i===92?(e+=this.input.slice(n,this.pos),e+=this.readEscapedChar(!1),n=this.pos):i===8232||i===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(vc(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(n,this.pos++),this.finishToken(N.string,e)};var I4={};Ot.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t===I4)this.readInvalidTemplateToken();else throw t}this.inTemplateElement=!1};Ot.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw I4;this.raise(t,e)};Ot.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===N.template||this.type===N.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(N.dollarBraceL)):(++this.pos,this.finishToken(N.backQuote)):(t+=this.input.slice(e,this.pos),this.finishToken(N.template,t));if(n===92)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(vc(n)){switch(t+=this.input.slice(e,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:t+=` +`;break;default:t+=String.fromCharCode(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}};Ot.readInvalidTemplateToken=function(){for(;this.pos=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);return r>255&&(i=i.slice(0,-1),r=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),(i!=="0"||e===56||e===57)&&(this.strict||t)&&this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return vc(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}};Ot.readHexChar=function(t){var e=this.pos,n=this.readInt(16,t);return n===null&&this.invalidStringToken(e,"Bad character escape sequence"),n};Ot.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,n=this.pos,i=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),V1}var eh={exports:{}},PG=eh.exports,sE;function oE(){return sE||(sE=1,(function(t,e){(function(n,i){i(e)})(PG,(function(n){var i=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],r=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],s="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",o="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",a={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},l="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",u={5:l,"5module":l+" export import",6:l+" const class extends export import super"},c=/^in(stanceof)?$/,h=new RegExp("["+o+"]"),d=new RegExp("["+o+s+"]");function p(f,y){for(var T=65536,$=0;$f)return!1;if(T+=y[$+1],T>=f)return!0}return!1}function g(f,y){return f<65?f===36:f<91?!0:f<97?f===95:f<123?!0:f<=65535?f>=170&&h.test(String.fromCharCode(f)):y===!1?!1:p(f,r)}function m(f,y){return f<48?f===36:f<58?!0:f<65?!1:f<91?!0:f<97?f===95:f<123?!0:f<=65535?f>=170&&d.test(String.fromCharCode(f)):y===!1?!1:p(f,r)||p(f,i)}var v=function(y,T){T===void 0&&(T={}),this.label=y,this.keyword=T.keyword,this.beforeExpr=!!T.beforeExpr,this.startsExpr=!!T.startsExpr,this.isLoop=!!T.isLoop,this.isAssign=!!T.isAssign,this.prefix=!!T.prefix,this.postfix=!!T.postfix,this.binop=T.binop||null,this.updateContext=null};function S(f,y){return new v(f,{beforeExpr:!0,binop:y})}var b={beforeExpr:!0},w={startsExpr:!0},k={};function C(f,y){return y===void 0&&(y={}),y.keyword=f,k[f]=new v(f,y)}var x={num:new v("num",w),regexp:new v("regexp",w),string:new v("string",w),name:new v("name",w),privateId:new v("privateId",w),eof:new v("eof"),bracketL:new v("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new v("]"),braceL:new v("{",{beforeExpr:!0,startsExpr:!0}),braceR:new v("}"),parenL:new v("(",{beforeExpr:!0,startsExpr:!0}),parenR:new v(")"),comma:new v(",",b),semi:new v(";",b),colon:new v(":",b),dot:new v("."),question:new v("?",b),questionDot:new v("?."),arrow:new v("=>",b),template:new v("template"),invalidTemplate:new v("invalidTemplate"),ellipsis:new v("...",b),backQuote:new v("`",w),dollarBraceL:new v("${",{beforeExpr:!0,startsExpr:!0}),eq:new v("=",{beforeExpr:!0,isAssign:!0}),assign:new v("_=",{beforeExpr:!0,isAssign:!0}),incDec:new v("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new v("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:S("||",1),logicalAND:S("&&",2),bitwiseOR:S("|",3),bitwiseXOR:S("^",4),bitwiseAND:S("&",5),equality:S("==/!=/===/!==",6),relational:S("/<=/>=",7),bitShift:S("<>/>>>",8),plusMin:new v("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:S("%",10),star:S("*",10),slash:S("/",10),starstar:new v("**",{beforeExpr:!0}),coalesce:S("??",1),_break:C("break"),_case:C("case",b),_catch:C("catch"),_continue:C("continue"),_debugger:C("debugger"),_default:C("default",b),_do:C("do",{isLoop:!0,beforeExpr:!0}),_else:C("else",b),_finally:C("finally"),_for:C("for",{isLoop:!0}),_function:C("function",w),_if:C("if"),_return:C("return",b),_switch:C("switch"),_throw:C("throw",b),_try:C("try"),_var:C("var"),_const:C("const"),_while:C("while",{isLoop:!0}),_with:C("with"),_new:C("new",{beforeExpr:!0,startsExpr:!0}),_this:C("this",w),_super:C("super",w),_class:C("class",w),_extends:C("extends",b),_export:C("export"),_import:C("import",w),_null:C("null",w),_true:C("true",w),_false:C("false",w),_in:C("in",{beforeExpr:!0,binop:7}),_instanceof:C("instanceof",{beforeExpr:!0,binop:7}),_typeof:C("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:C("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:C("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},E=/\r\n?|\n|\u2028|\u2029/,A=new RegExp(E.source,"g");function I(f){return f===10||f===13||f===8232||f===8233}function Z(f,y,T){T===void 0&&(T=f.length);for(var $=y;$>10)+55296,(f&1023)+56320))}var De=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ie=function(y,T){this.line=y,this.column=T};Ie.prototype.offset=function(y){return new Ie(this.line,this.column+y)};var Ue=function(y,T,$){this.start=T,this.end=$,y.sourceFile!==null&&(this.source=y.sourceFile)};function qe(f,y){for(var T=1,$=0;;){var V=Z(f,$,y);if(V<0)return new Ie(T,y-$);++T,$=V}}var Ye={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Ge=!1;function he(f){var y={};for(var T in Ye)y[T]=f&&oe(f,T)?f[T]:Ye[T];if(y.ecmaVersion==="latest"?y.ecmaVersion=1e8:y.ecmaVersion==null?(!Ge&&typeof console=="object"&&console.warn&&(Ge=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),y.ecmaVersion=11):y.ecmaVersion>=2015&&(y.ecmaVersion-=2009),y.allowReserved==null&&(y.allowReserved=y.ecmaVersion<5),(!f||f.allowHashBang==null)&&(y.allowHashBang=y.ecmaVersion>=14),pe(y.onToken)){var $=y.onToken;y.onToken=function(V){return $.push(V)}}if(pe(y.onComment)&&(y.onComment=xe(y,y.onComment)),y.sourceType==="commonjs"&&y.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return y}function xe(f,y){return function(T,$,V,Y,K,be){var Re={type:T?"Block":"Line",value:$,start:V,end:Y};f.locations&&(Re.loc=new Ue(this,K,be)),f.ranges&&(Re.range=[V,Y]),y.push(Re)}}var Ce=1,$e=2,Le=4,Ke=8,lt=16,St=32,zt=64,Ft=128,Rt=256,Sn=512,Wt=1024,Ln=Ce|$e|Rt;function cn(f,y){return $e|(f?Le:0)|(y?Ke:0)}var Wn=0,wn=1,st=2,en=3,yi=4,_t=5,D=function(y,T,$){this.options=y=he(y),this.sourceFile=y.sourceFile,this.keywords=ke(u[y.ecmaVersion>=6?6:y.sourceType==="module"?"5module":5]);var V="";y.allowReserved!==!0&&(V=a[y.ecmaVersion>=6?6:y.ecmaVersion===5?5:3],y.sourceType==="module"&&(V+=" await")),this.reservedWords=ke(V);var Y=(V?V+" ":"")+a.strict;this.reservedWordsStrict=ke(Y),this.reservedWordsStrictBind=ke(Y+" "+a.strictBind),this.input=String(T),this.containsEsc=!1,$?(this.pos=$,this.lineStart=this.input.lastIndexOf(` +`,$-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(E).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=x.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=y.sourceType==="module",this.strict=this.inModule||y.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&y.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?$e:Ce),this.regexpState=null,this.privateNameStack=[]},Et={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};D.prototype.parse=function(){var y=this,T=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return y.parseTopLevel(T)})},Et.inFunction.get=function(){return(this.currentVarScope().flags&$e)>0},Et.inGenerator.get=function(){return(this.currentVarScope().flags&Ke)>0},Et.inAsync.get=function(){return(this.currentVarScope().flags&Le)>0},Et.canAwait.get=function(){for(var f=this.scopeStack.length-1;f>=0;f--){var y=this.scopeStack[f],T=y.flags;if(T&(Rt|Sn))return!1;if(T&$e)return(T&Le)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Et.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Ce)},Et.allowSuper.get=function(){var f=this.currentThisScope(),y=f.flags;return(y&zt)>0||this.options.allowSuperOutsideMethod},Et.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ft)>0},Et.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Et.allowNewDotTarget.get=function(){for(var f=this.scopeStack.length-1;f>=0;f--){var y=this.scopeStack[f],T=y.flags;if(T&(Rt|Sn)||T&$e&&!(T<))return!0}return!1},Et.allowUsing.get=function(){var f=this.currentScope(),y=f.flags;return!(y&Wt||!this.inModule&&y&Ce)},Et.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Rt)>0},D.extend=function(){for(var y=[],T=arguments.length;T--;)y[T]=arguments[T];for(var $=this,V=0;V=,?^&]/.test(V)||V==="!"&&this.input.charAt($+1)==="=")}f+=y[0].length,W.lastIndex=f,f+=W.exec(this.input)[0].length,this.input[f]===";"&&f++}},O.eat=function(f){return this.type===f?(this.next(),!0):!1},O.isContextual=function(f){return this.type===x.name&&this.value===f&&!this.containsEsc},O.eatContextual=function(f){return this.isContextual(f)?(this.next(),!0):!1},O.catchStackOverflow=function(f){try{return f()}catch(y){if(y instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(y.message)||/\btoo much recursion\b/i.test(y.message)))this.raise(this.start,"Not enough stack space to parse input");else throw y}},O.expectContextual=function(f){this.eatContextual(f)||this.unexpected()},O.canInsertSemicolon=function(){return this.type===x.eof||this.type===x.braceR||E.test(this.input.slice(this.lastTokEnd,this.start))},O.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},O.semicolon=function(){!this.eat(x.semi)&&!this.insertSemicolon()&&this.unexpected()},O.afterTrailingComma=function(f,y){if(this.type===f)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),y||this.next(),!0},O.expect=function(f){this.eat(f)||this.unexpected()},O.unexpected=function(f){this.raise(f??this.start,"Unexpected token")};var M=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};O.checkPatternErrors=function(f,y){if(f){f.trailingComma>-1&&this.raiseRecoverable(f.trailingComma,"Comma is not permitted after the rest element");var T=y?f.parenthesizedAssign:f.parenthesizedBind;T>-1&&this.raiseRecoverable(T,y?"Assigning to rvalue":"Parenthesized pattern")}},O.checkExpressionErrors=function(f,y){if(!f)return!1;var T=f.shorthandAssign,$=f.doubleProto;if(!y)return T>=0||$>=0;T>=0&&this.raise(T,"Shorthand property assignments are valid only in destructuring patterns"),$>=0&&this.raiseRecoverable($,"Redefinition of __proto__ property")},O.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(V,!1,!f);case x._class:return f&&this.unexpected(),this.parseClass(V,!0);case x._if:return this.parseIfStatement(V);case x._return:return this.parseReturnStatement(V);case x._switch:return this.parseSwitchStatement(V);case x._throw:return this.parseThrowStatement(V);case x._try:return this.parseTryStatement(V);case x._const:case x._var:return Y=Y||this.value,f&&Y!=="var"&&this.unexpected(),this.parseVarStatement(V,Y);case x._while:return this.parseWhileStatement(V);case x._with:return this.parseWithStatement(V);case x.braceL:return this.parseBlock(!0,V);case x.semi:return this.parseEmptyStatement(V);case x._export:case x._import:if(this.options.ecmaVersion>10&&$===x._import){W.lastIndex=this.pos;var K=W.exec(this.input),be=this.pos+K[0].length,Re=this.input.charCodeAt(be);if(Re===40||Re===46)return this.parseExpressionStatement(V,this.parseExpression())}return this.options.allowImportExportEverywhere||(y||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),$===x._import?this.parseImport(V):this.parseExport(V,T);default:if(this.isAsyncFunction())return f&&this.unexpected(),this.next(),this.parseFunctionStatement(V,!0,!f);var et=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(et)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),f&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),et==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(V,!1,et),this.semicolon(),this.finishNode(V,"VariableDeclaration");var ot=this.value,sn=this.parseExpression();return $===x.name&&sn.type==="Identifier"&&this.eat(x.colon)?this.parseLabeledStatement(V,ot,sn,f):this.parseExpressionStatement(V,sn)}},F.parseBreakContinueStatement=function(f,y){var T=y==="break";this.next(),this.eat(x.semi)||this.insertSemicolon()?f.label=null:this.type!==x.name?this.unexpected():(f.label=this.parseIdent(),this.semicolon());for(var $=0;$=6?this.eat(x.semi):this.semicolon(),this.finishNode(f,"DoWhileStatement")},F.parseForStatement=function(f){this.next();var y=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(z),this.enterScope(0),this.expect(x.parenL),this.type===x.semi)return y>-1&&this.unexpected(y),this.parseFor(f,null);var T=this.isLet();if(this.type===x._var||this.type===x._const||T){var $=this.startNode(),V=T?"let":this.value;return this.next(),this.parseVar($,!0,V),this.finishNode($,"VariableDeclaration"),this.parseForAfterInit(f,$,y)}var Y=this.isContextual("let"),K=!1,be=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(be){var Re=this.startNode();return this.next(),be==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(Re,!0,be),this.finishNode(Re,"VariableDeclaration"),this.parseForAfterInit(f,Re,y)}var et=this.containsEsc,ot=new M,sn=this.start,ti=y>-1?this.parseExprSubscripts(ot,"await"):this.parseExpression(!0,ot);return this.type===x._in||(K=this.options.ecmaVersion>=6&&this.isContextual("of"))?(y>-1?(this.type===x._in&&this.unexpected(y),f.await=!0):K&&this.options.ecmaVersion>=8&&(ti.start===sn&&!et&&ti.type==="Identifier"&&ti.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(f.await=!1)),Y&&K&&this.raise(ti.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(ti,!1,ot),this.checkLValPattern(ti),this.parseForIn(f,ti)):(this.checkExpressionErrors(ot,!0),y>-1&&this.unexpected(y),this.parseFor(f,ti))},F.parseForAfterInit=function(f,y,T){return(this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&y.declarations.length===1?(this.type===x._in?((y.kind==="using"||y.kind==="await using")&&!y.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&T>-1&&this.unexpected(T)):this.options.ecmaVersion>=9&&(f.await=T>-1),this.parseForIn(f,y)):(T>-1&&this.unexpected(T),this.parseFor(f,y))},F.parseFunctionStatement=function(f,y,T){return this.next(),this.parseFunction(f,X|(T?0:J),!1,y)},F.parseIfStatement=function(f){return this.next(),f.test=this.parseParenExpression(),f.consequent=this.parseStatement("if"),f.alternate=this.eat(x._else)?this.parseStatement("if"):null,this.finishNode(f,"IfStatement")},F.parseReturnStatement=function(f){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(x.semi)||this.insertSemicolon()?f.argument=null:(f.argument=this.parseExpression(),this.semicolon()),this.finishNode(f,"ReturnStatement")},F.parseSwitchStatement=function(f){this.next(),f.discriminant=this.parseParenExpression(),f.cases=[],this.expect(x.braceL),this.labels.push(H),this.enterScope(Wt);for(var y,T=!1;this.type!==x.braceR;)if(this.type===x._case||this.type===x._default){var $=this.type===x._case;y&&this.finishNode(y,"SwitchCase"),f.cases.push(y=this.startNode()),y.consequent=[],this.next(),$?y.test=this.parseExpression():(T&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),T=!0,y.test=null),this.expect(x.colon)}else y||this.unexpected(),y.consequent.push(this.parseStatement(null));return this.exitScope(),y&&this.finishNode(y,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(f,"SwitchStatement")},F.parseThrowStatement=function(f){return this.next(),E.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),f.argument=this.parseExpression(),this.semicolon(),this.finishNode(f,"ThrowStatement")};var P=[];F.parseCatchClauseParam=function(){var f=this.parseBindingAtom(),y=f.type==="Identifier";return this.enterScope(y?St:0),this.checkLValPattern(f,y?yi:st),this.expect(x.parenR),f},F.parseTryStatement=function(f){if(this.next(),f.block=this.parseBlock(),f.handler=null,this.type===x._catch){var y=this.startNode();this.next(),this.eat(x.parenL)?y.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),y.param=null,this.enterScope(0)),y.body=this.parseBlock(!1),this.exitScope(),f.handler=this.finishNode(y,"CatchClause")}return f.finalizer=this.eat(x._finally)?this.parseBlock():null,!f.handler&&!f.finalizer&&this.raise(f.start,"Missing catch or finally clause"),this.finishNode(f,"TryStatement")},F.parseVarStatement=function(f,y,T){return this.next(),this.parseVar(f,!1,y,T),this.semicolon(),this.finishNode(f,"VariableDeclaration")},F.parseWhileStatement=function(f){return this.next(),f.test=this.parseParenExpression(),this.labels.push(z),f.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(f,"WhileStatement")},F.parseWithStatement=function(f){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),f.object=this.parseParenExpression(),f.body=this.parseStatement("with"),this.finishNode(f,"WithStatement")},F.parseEmptyStatement=function(f){return this.next(),this.finishNode(f,"EmptyStatement")},F.parseLabeledStatement=function(f,y,T,$){for(var V=0,Y=this.labels;V=0;Re--){var et=this.labels[Re];if(et.statementStart===f.start)et.statementStart=this.start,et.kind=be;else break}return this.labels.push({name:y,kind:be,statementStart:this.start}),f.body=this.parseStatement($?$.indexOf("label")===-1?$+"label":$:"label"),this.labels.pop(),f.label=T,this.finishNode(f,"LabeledStatement")},F.parseExpressionStatement=function(f,y){return f.expression=y,this.semicolon(),this.finishNode(f,"ExpressionStatement")},F.parseBlock=function(f,y,T){for(f===void 0&&(f=!0),y===void 0&&(y=this.startNode()),y.body=[],this.expect(x.braceL),f&&this.enterScope(0);this.type!==x.braceR;){var $=this.parseStatement(null);y.body.push($)}return T&&(this.strict=!1),this.next(),f&&this.exitScope(),this.finishNode(y,"BlockStatement")},F.parseFor=function(f,y){return f.init=y,this.expect(x.semi),f.test=this.type===x.semi?null:this.parseExpression(),this.expect(x.semi),f.update=this.type===x.parenR?null:this.parseExpression(),this.expect(x.parenR),f.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(f,"ForStatement")},F.parseForIn=function(f,y){var T=this.type===x._in;return this.next(),y.type==="VariableDeclaration"&&y.declarations[0].init!=null&&(!T||this.options.ecmaVersion<8||this.strict||y.kind!=="var"||y.declarations[0].id.type!=="Identifier")&&this.raise(y.start,(T?"for-in":"for-of")+" loop variable declaration may not have an initializer"),f.left=y,f.right=T?this.parseExpression():this.parseMaybeAssign(),this.expect(x.parenR),f.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(f,T?"ForInStatement":"ForOfStatement")},F.parseVar=function(f,y,T,$){for(f.declarations=[],f.kind=T;;){var V=this.startNode();if(this.parseVarId(V,T),this.eat(x.eq)?V.init=this.parseMaybeAssign(y):!$&&T==="const"&&!(this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!$&&(T==="using"||T==="await using")&&this.options.ecmaVersion>=17&&this.type!==x._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+T+" declaration"):!$&&V.id.type!=="Identifier"&&!(y&&(this.type===x._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):V.init=null,f.declarations.push(this.finishNode(V,"VariableDeclarator")),!this.eat(x.comma))break}return f},F.parseVarId=function(f,y){f.id=y==="using"||y==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(f.id,y==="var"?wn:st,!1)};var X=1,J=2,ie=4;F.parseFunction=function(f,y,T,$,V){this.initFunction(f),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!$)&&(this.type===x.star&&y&J&&this.unexpected(),f.generator=this.eat(x.star)),this.options.ecmaVersion>=8&&(f.async=!!$),y&X&&(f.id=y&ie&&this.type!==x.name?null:this.parseIdent(),f.id&&!(y&J)&&this.checkLValSimple(f.id,this.strict||f.generator||f.async?this.treatFunctionsAsVar?wn:st:en));var Y=this.yieldPos,K=this.awaitPos,be=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(cn(f.async,f.generator)),y&X||(f.id=this.type===x.name?this.parseIdent():null),this.parseFunctionParams(f),this.parseFunctionBody(f,T,!1,V),this.yieldPos=Y,this.awaitPos=K,this.awaitIdentPos=be,this.finishNode(f,y&X?"FunctionDeclaration":"FunctionExpression")},F.parseFunctionParams=function(f){this.expect(x.parenL),f.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},F.parseClass=function(f,y){this.next();var T=this.strict;this.strict=!0,this.parseClassId(f,y),this.parseClassSuper(f);var $=this.enterClassBody(),V=this.startNode(),Y=!1;for(V.body=[],this.expect(x.braceL);this.type!==x.braceR;){var K=this.parseClassElement(f.superClass!==null);K&&(V.body.push(K),K.type==="MethodDefinition"&&K.kind==="constructor"?(Y&&this.raiseRecoverable(K.start,"Duplicate constructor in the same class"),Y=!0):K.key&&K.key.type==="PrivateIdentifier"&&le($,K)&&this.raiseRecoverable(K.key.start,"Identifier '#"+K.key.name+"' has already been declared"))}return this.strict=T,this.next(),f.body=this.finishNode(V,"ClassBody"),this.exitClassBody(),this.finishNode(f,y?"ClassDeclaration":"ClassExpression")},F.parseClassElement=function(f){if(this.eat(x.semi))return null;var y=this.options.ecmaVersion,T=this.startNode(),$="",V=!1,Y=!1,K="method",be=!1;if(this.eatContextual("static")){if(y>=13&&this.eat(x.braceL))return this.parseClassStaticBlock(T),T;this.isClassElementNameStart()||this.type===x.star?be=!0:$="static"}if(T.static=be,!$&&y>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===x.star)&&!this.canInsertSemicolon()?Y=!0:$="async"),!$&&(y>=9||!Y)&&this.eat(x.star)&&(V=!0),!$&&!Y&&!V){var Re=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?K=Re:$=Re)}if($?(T.computed=!1,T.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),T.key.name=$,this.finishNode(T.key,"Identifier")):this.parseClassElementName(T),y<13||this.type===x.parenL||K!=="method"||V||Y){var et=!T.static&&fe(T,"constructor"),ot=et&&f;et&&K!=="method"&&this.raise(T.key.start,"Constructor can't have get/set modifier"),T.kind=et?"constructor":K,this.parseClassMethod(T,V,Y,ot)}else this.parseClassField(T);return T},F.isClassElementNameStart=function(){return this.type===x.name||this.type===x.privateId||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword},F.parseClassElementName=function(f){this.type===x.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),f.computed=!1,f.key=this.parsePrivateIdent()):this.parsePropertyName(f)},F.parseClassMethod=function(f,y,T,$){var V=f.key;f.kind==="constructor"?(y&&this.raise(V.start,"Constructor can't be a generator"),T&&this.raise(V.start,"Constructor can't be an async method")):f.static&&fe(f,"prototype")&&this.raise(V.start,"Classes may not have a static property named prototype");var Y=f.value=this.parseMethod(y,T,$);return f.kind==="get"&&Y.params.length!==0&&this.raiseRecoverable(Y.start,"getter should have no params"),f.kind==="set"&&Y.params.length!==1&&this.raiseRecoverable(Y.start,"setter should have exactly one param"),f.kind==="set"&&Y.params[0].type==="RestElement"&&this.raiseRecoverable(Y.params[0].start,"Setter cannot use rest params"),this.finishNode(f,"MethodDefinition")},F.parseClassField=function(f){return fe(f,"constructor")?this.raise(f.key.start,"Classes can't have a field named 'constructor'"):f.static&&fe(f,"prototype")&&this.raise(f.key.start,"Classes can't have a static field named 'prototype'"),this.eat(x.eq)?(this.enterScope(Sn|zt),f.value=this.parseMaybeAssign(),this.exitScope()):f.value=null,this.semicolon(),this.finishNode(f,"PropertyDefinition")},F.parseClassStaticBlock=function(f){f.body=[];var y=this.labels;for(this.labels=[],this.enterScope(Rt|zt);this.type!==x.braceR;){var T=this.parseStatement(null);f.body.push(T)}return this.next(),this.exitScope(),this.labels=y,this.finishNode(f,"StaticBlock")},F.parseClassId=function(f,y){this.type===x.name?(f.id=this.parseIdent(),y&&this.checkLValSimple(f.id,st,!1)):(y===!0&&this.unexpected(),f.id=null)},F.parseClassSuper=function(f){f.superClass=this.eat(x._extends)?this.parseExprSubscripts(null,!1):null},F.enterClassBody=function(){var f={declared:Object.create(null),used:[]};return this.privateNameStack.push(f),f.declared},F.exitClassBody=function(){var f=this.privateNameStack.pop(),y=f.declared,T=f.used;if(this.options.checkPrivateFields)for(var $=this.privateNameStack.length,V=$===0?null:this.privateNameStack[$-1],Y=0;Y=11&&(this.eatContextual("as")?(f.exported=this.parseModuleExportName(),this.checkExport(y,f.exported,this.lastTokStart)):f.exported=null),this.expectContextual("from"),this.type!==x.string&&this.unexpected(),f.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(f.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(f,"ExportAllDeclaration")},F.parseExport=function(f,y){if(this.next(),this.eat(x.star))return this.parseExportAllDeclaration(f,y);if(this.eat(x._default))return this.checkExport(y,"default",this.lastTokStart),f.declaration=this.parseExportDefaultDeclaration(),this.finishNode(f,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())f.declaration=this.parseExportDeclaration(f),f.declaration.type==="VariableDeclaration"?this.checkVariableExport(y,f.declaration.declarations):this.checkExport(y,f.declaration.id,f.declaration.id.start),f.specifiers=[],f.source=null,this.options.ecmaVersion>=16&&(f.attributes=[]);else{if(f.declaration=null,f.specifiers=this.parseExportSpecifiers(y),this.eatContextual("from"))this.type!==x.string&&this.unexpected(),f.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(f.attributes=this.parseWithClause());else{for(var T=0,$=f.specifiers;T<$.length;T+=1){var V=$[T];this.checkUnreserved(V.local),this.checkLocalExport(V.local),V.local.type==="Literal"&&this.raise(V.local.start,"A string literal cannot be used as an exported binding without `from`.")}f.source=null,this.options.ecmaVersion>=16&&(f.attributes=[])}this.semicolon()}return this.finishNode(f,"ExportNamedDeclaration")},F.parseExportDeclaration=function(f){return this.parseStatement(null)},F.parseExportDefaultDeclaration=function(){var f;if(this.type===x._function||(f=this.isAsyncFunction())){var y=this.startNode();return this.next(),f&&this.next(),this.parseFunction(y,X|ie,!1,f)}else if(this.type===x._class){var T=this.startNode();return this.parseClass(T,"nullableID")}else{var $=this.parseMaybeAssign();return this.semicolon(),$}},F.checkExport=function(f,y,T){f&&(typeof y!="string"&&(y=y.type==="Identifier"?y.name:y.value),oe(f,y)&&this.raiseRecoverable(T,"Duplicate export '"+y+"'"),f[y]=!0)},F.checkPatternExport=function(f,y){var T=y.type;if(T==="Identifier")this.checkExport(f,y,y.start);else if(T==="ObjectPattern")for(var $=0,V=y.properties;$=16&&(f.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(f,"ImportDeclaration")},F.parseImportSpecifier=function(){var f=this.startNode();return f.imported=this.parseModuleExportName(),this.eatContextual("as")?f.local=this.parseIdent():(this.checkUnreserved(f.imported),f.local=f.imported),this.checkLValSimple(f.local,st),this.finishNode(f,"ImportSpecifier")},F.parseImportDefaultSpecifier=function(){var f=this.startNode();return f.local=this.parseIdent(),this.checkLValSimple(f.local,st),this.finishNode(f,"ImportDefaultSpecifier")},F.parseImportNamespaceSpecifier=function(){var f=this.startNode();return this.next(),this.expectContextual("as"),f.local=this.parseIdent(),this.checkLValSimple(f.local,st),this.finishNode(f,"ImportNamespaceSpecifier")},F.parseImportSpecifiers=function(){var f=[],y=!0;if(this.type===x.name&&(f.push(this.parseImportDefaultSpecifier()),!this.eat(x.comma)))return f;if(this.type===x.star)return f.push(this.parseImportNamespaceSpecifier()),f;for(this.expect(x.braceL);!this.eat(x.braceR);){if(y)y=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;f.push(this.parseImportSpecifier())}return f},F.parseWithClause=function(){var f=[];if(!this.eat(x._with))return f;this.expect(x.braceL);for(var y={},T=!0;!this.eat(x.braceR);){if(T)T=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;var $=this.parseImportAttribute(),V=$.key.type==="Identifier"?$.key.name:$.key.value;oe(y,V)&&this.raiseRecoverable($.key.start,"Duplicate attribute key '"+V+"'"),y[V]=!0,f.push($)}return f},F.parseImportAttribute=function(){var f=this.startNode();return f.key=this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(x.colon),this.type!==x.string&&this.unexpected(),f.value=this.parseExprAtom(),this.finishNode(f,"ImportAttribute")},F.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===x.string){var f=this.parseLiteral(this.value);return De.test(f.value)&&this.raise(f.start,"An export name cannot include a lone surrogate."),f}return this.parseIdent(!0)},F.adaptDirectivePrologue=function(f){for(var y=0;y=5&&f.type==="ExpressionStatement"&&f.expression.type==="Literal"&&typeof f.expression.value=="string"&&(this.input[f.start]==='"'||this.input[f.start]==="'")};var ue=D.prototype;ue.toAssignable=function(f,y,T){if(this.options.ecmaVersion>=6&&f)switch(f.type){case"Identifier":this.inAsync&&f.name==="await"&&this.raise(f.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":f.type="ObjectPattern",T&&this.checkPatternErrors(T,!0);for(var $=0,V=f.properties;$=8&&!be&&Re.name==="async"&&!this.canInsertSemicolon()&&this.eat(x._function))return this.overrideContext(ve.f_expr),this.parseFunction(this.startNodeAt(Y,K),0,!1,!0,y);if(V&&!this.canInsertSemicolon()){if(this.eat(x.arrow))return this.parseArrowExpression(this.startNodeAt(Y,K),[Re],!1,y);if(this.options.ecmaVersion>=8&&Re.name==="async"&&this.type===x.name&&!be&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Re=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(x.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(Y,K),[Re],!0,y)}return Re;case x.regexp:var et=this.value;return $=this.parseLiteral(et.value),$.regex={pattern:et.pattern,flags:et.flags},$;case x.num:case x.string:return this.parseLiteral(this.value);case x._null:case x._true:case x._false:return $=this.startNode(),$.value=this.type===x._null?null:this.type===x._true,$.raw=this.type.keyword,this.next(),this.finishNode($,"Literal");case x.parenL:var ot=this.start,sn=this.parseParenAndDistinguishExpression(V,y);return f&&(f.parenthesizedAssign<0&&!this.isSimpleAssignTarget(sn)&&(f.parenthesizedAssign=ot),f.parenthesizedBind<0&&(f.parenthesizedBind=ot)),sn;case x.bracketL:return $=this.startNode(),this.next(),$.elements=this.parseExprList(x.bracketR,!0,!0,f),this.finishNode($,"ArrayExpression");case x.braceL:return this.overrideContext(ve.b_expr),this.parseObj(!1,f);case x._function:return $=this.startNode(),this.next(),this.parseFunction($,0);case x._class:return this.parseClass(this.startNode(),!1);case x._new:return this.parseNew();case x.backQuote:return this.parseTemplate();case x._import:return this.options.ecmaVersion>=11?this.parseExprImport(T):this.unexpected();default:return this.parseExprAtomDefault()}},ge.parseExprAtomDefault=function(){this.unexpected()},ge.parseExprImport=function(f){var y=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===x.parenL&&!f)return this.parseDynamicImport(y);if(this.type===x.dot){var T=this.startNodeAt(y.start,y.loc&&y.loc.start);return T.name="import",y.meta=this.finishNode(T,"Identifier"),this.parseImportMeta(y)}else this.unexpected()},ge.parseDynamicImport=function(f){if(this.next(),f.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(x.parenR)?f.options=null:(this.expect(x.comma),this.afterTrailingComma(x.parenR)?f.options=null:(f.options=this.parseMaybeAssign(),this.eat(x.parenR)||(this.expect(x.comma),this.afterTrailingComma(x.parenR)||this.unexpected())));else if(!this.eat(x.parenR)){var y=this.start;this.eat(x.comma)&&this.eat(x.parenR)?this.raiseRecoverable(y,"Trailing comma is not allowed in import()"):this.unexpected(y)}return this.finishNode(f,"ImportExpression")},ge.parseImportMeta=function(f){this.next();var y=this.containsEsc;return f.property=this.parseIdent(!0),f.property.name!=="meta"&&this.raiseRecoverable(f.property.start,"The only valid meta property for import is 'import.meta'"),y&&this.raiseRecoverable(f.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(f.start,"Cannot use 'import.meta' outside a module"),this.finishNode(f,"MetaProperty")},ge.parseLiteral=function(f){var y=this.startNode();return y.value=f,y.raw=this.input.slice(this.start,this.end),y.raw.charCodeAt(y.raw.length-1)===110&&(y.bigint=y.value!=null?y.value.toString():y.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(y,"Literal")},ge.parseParenExpression=function(){this.expect(x.parenL);var f=this.parseExpression();return this.expect(x.parenR),f},ge.shouldParseArrow=function(f){return!this.canInsertSemicolon()},ge.parseParenAndDistinguishExpression=function(f,y){var T=this.start,$=this.startLoc,V,Y=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var K=this.start,be=this.startLoc,Re=[],et=!0,ot=!1,sn=new M,ti=this.yieldPos,Nc=this.awaitPos,Pl;for(this.yieldPos=0,this.awaitPos=0;this.type!==x.parenR;)if(et?et=!1:this.expect(x.comma),Y&&this.afterTrailingComma(x.parenR,!0)){ot=!0;break}else if(this.type===x.ellipsis){Pl=this.start,Re.push(this.parseParenItem(this.parseRestBinding())),this.type===x.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Re.push(this.parseMaybeAssign(!1,sn,this.parseParenItem));var Md=this.lastTokEnd,Il=this.lastTokEndLoc;if(this.expect(x.parenR),f&&this.shouldParseArrow(Re)&&this.eat(x.arrow))return this.checkPatternErrors(sn,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=ti,this.awaitPos=Nc,this.parseParenArrowList(T,$,Re,y);(!Re.length||ot)&&this.unexpected(this.lastTokStart),Pl&&this.unexpected(Pl),this.checkExpressionErrors(sn,!0),this.yieldPos=ti||this.yieldPos,this.awaitPos=Nc||this.awaitPos,Re.length>1?(V=this.startNodeAt(K,be),V.expressions=Re,this.finishNodeAt(V,"SequenceExpression",Md,Il)):V=Re[0]}else V=this.parseParenExpression();if(this.options.preserveParens){var $l=this.startNodeAt(T,$);return $l.expression=V,this.finishNode($l,"ParenthesizedExpression")}else return V},ge.parseParenItem=function(f){return f},ge.parseParenArrowList=function(f,y,T,$){return this.parseArrowExpression(this.startNodeAt(f,y),T,!1,$)};var $d=[];ge.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var f=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===x.dot){var y=this.startNodeAt(f.start,f.loc&&f.loc.start);y.name="new",f.meta=this.finishNode(y,"Identifier"),this.next();var T=this.containsEsc;return f.property=this.parseIdent(!0),f.property.name!=="target"&&this.raiseRecoverable(f.property.start,"The only valid meta property for new is 'new.target'"),T&&this.raiseRecoverable(f.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(f.start,"'new.target' can only be used in functions and class static block"),this.finishNode(f,"MetaProperty")}var $=this.start,V=this.startLoc;return f.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),$,V,!0,!1),f.callee.type==="Super"&&this.raiseRecoverable($,"Invalid use of 'super'"),this.eat(x.parenL)?f.arguments=this.parseExprList(x.parenR,this.options.ecmaVersion>=8,!1):f.arguments=$d,this.finishNode(f,"NewExpression")},ge.parseTemplateElement=function(f){var y=f.isTagged,T=this.startNode();return this.type===x.invalidTemplate?(y||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),T.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):T.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),T.tail=this.type===x.backQuote,this.finishNode(T,"TemplateElement")},ge.parseTemplate=function(f){f===void 0&&(f={});var y=f.isTagged;y===void 0&&(y=!1);var T=this.startNode();this.next(),T.expressions=[];var $=this.parseTemplateElement({isTagged:y});for(T.quasis=[$];!$.tail;)this.type===x.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(x.dollarBraceL),T.expressions.push(this.parseExpression()),this.expect(x.braceR),T.quasis.push($=this.parseTemplateElement({isTagged:y}));return this.next(),this.finishNode(T,"TemplateLiteral")},ge.isAsyncProp=function(f){return!f.computed&&f.key.type==="Identifier"&&f.key.name==="async"&&(this.type===x.name||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===x.star)&&!E.test(this.input.slice(this.lastTokEnd,this.start))},ge.parseObj=function(f,y){var T=this.startNode(),$=!0,V={};for(T.properties=[],this.next();!this.eat(x.braceR);){if($)$=!1;else if(this.expect(x.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(x.braceR))break;var Y=this.parseProperty(f,y);f||this.checkPropClash(Y,V,y),T.properties.push(Y)}return this.finishNode(T,f?"ObjectPattern":"ObjectExpression")},ge.parseProperty=function(f,y){var T=this.startNode(),$,V,Y,K;if(this.options.ecmaVersion>=9&&this.eat(x.ellipsis))return f?(T.argument=this.parseIdent(!1),this.type===x.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(T,"RestElement")):(T.argument=this.parseMaybeAssign(!1,y),this.type===x.comma&&y&&y.trailingComma<0&&(y.trailingComma=this.start),this.finishNode(T,"SpreadElement"));this.options.ecmaVersion>=6&&(T.method=!1,T.shorthand=!1,(f||y)&&(Y=this.start,K=this.startLoc),f||($=this.eat(x.star)));var be=this.containsEsc;return this.parsePropertyName(T),!f&&!be&&this.options.ecmaVersion>=8&&!$&&this.isAsyncProp(T)?(V=!0,$=this.options.ecmaVersion>=9&&this.eat(x.star),this.parsePropertyName(T)):V=!1,this.parsePropertyValue(T,f,$,V,Y,K,y,be),this.finishNode(T,"Property")},ge.parseGetterSetter=function(f){var y=f.key.name;this.parsePropertyName(f),f.value=this.parseMethod(!1),f.kind=y;var T=f.kind==="get"?0:1;if(f.value.params.length!==T){var $=f.value.start;f.kind==="get"?this.raiseRecoverable($,"getter should have no params"):this.raiseRecoverable($,"setter should have exactly one param")}else f.kind==="set"&&f.value.params[0].type==="RestElement"&&this.raiseRecoverable(f.value.params[0].start,"Setter cannot use rest params")},ge.parsePropertyValue=function(f,y,T,$,V,Y,K,be){(T||$)&&this.type===x.colon&&this.unexpected(),this.eat(x.colon)?(f.value=y?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,K),f.kind="init"):this.options.ecmaVersion>=6&&this.type===x.parenL?(y&&this.unexpected(),f.method=!0,f.value=this.parseMethod(T,$),f.kind="init"):!y&&!be&&this.options.ecmaVersion>=5&&!f.computed&&f.key.type==="Identifier"&&(f.key.name==="get"||f.key.name==="set")&&this.type!==x.comma&&this.type!==x.braceR&&this.type!==x.eq?((T||$)&&this.unexpected(),this.parseGetterSetter(f)):this.options.ecmaVersion>=6&&!f.computed&&f.key.type==="Identifier"?((T||$)&&this.unexpected(),this.checkUnreserved(f.key),f.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=V),y?f.value=this.parseMaybeDefault(V,Y,this.copyNode(f.key)):this.type===x.eq&&K?(K.shorthandAssign<0&&(K.shorthandAssign=this.start),f.value=this.parseMaybeDefault(V,Y,this.copyNode(f.key))):f.value=this.copyNode(f.key),f.kind="init",f.shorthand=!0):this.unexpected()},ge.parsePropertyName=function(f){if(this.options.ecmaVersion>=6){if(this.eat(x.bracketL))return f.computed=!0,f.key=this.parseMaybeAssign(),this.expect(x.bracketR),f.key;f.computed=!1}return f.key=this.type===x.num||this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},ge.initFunction=function(f){f.id=null,this.options.ecmaVersion>=6&&(f.generator=f.expression=!1),this.options.ecmaVersion>=8&&(f.async=!1)},ge.parseMethod=function(f,y,T){var $=this.startNode(),V=this.yieldPos,Y=this.awaitPos,K=this.awaitIdentPos;return this.initFunction($),this.options.ecmaVersion>=6&&($.generator=f),this.options.ecmaVersion>=8&&($.async=!!y),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(cn(y,$.generator)|zt|(T?Ft:0)),this.expect(x.parenL),$.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody($,!1,!0,!1),this.yieldPos=V,this.awaitPos=Y,this.awaitIdentPos=K,this.finishNode($,"FunctionExpression")},ge.parseArrowExpression=function(f,y,T,$){var V=this.yieldPos,Y=this.awaitPos,K=this.awaitIdentPos;return this.enterScope(cn(T,!1)|lt),this.initFunction(f),this.options.ecmaVersion>=8&&(f.async=!!T),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,f.params=this.toAssignableList(y,!0),this.parseFunctionBody(f,!0,!1,$),this.yieldPos=V,this.awaitPos=Y,this.awaitIdentPos=K,this.finishNode(f,"ArrowFunctionExpression")},ge.parseFunctionBody=function(f,y,T,$){var V=y&&this.type!==x.braceL,Y=this.strict,K=!1;if(V)f.body=this.parseMaybeAssign($),f.expression=!0,this.checkParams(f,!1);else{var be=this.options.ecmaVersion>=7&&!this.isSimpleParamList(f.params);(!Y||be)&&(K=this.strictDirective(this.end),K&&be&&this.raiseRecoverable(f.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Re=this.labels;this.labels=[],K&&(this.strict=!0),this.checkParams(f,!Y&&!K&&!y&&!T&&this.isSimpleParamList(f.params)),this.strict&&f.id&&this.checkLValSimple(f.id,_t),f.body=this.parseBlock(!1,void 0,K&&!Y),f.expression=!1,this.adaptDirectivePrologue(f.body.body),this.labels=Re}this.exitScope()},ge.isSimpleParamList=function(f){for(var y=0,T=f;y-1||V.functions.indexOf(f)>-1||V.var.indexOf(f)>-1,V.lexical.push(f),this.inModule&&V.flags&Ce&&delete this.undefinedExports[f]}else if(y===yi){var Y=this.currentScope();Y.lexical.push(f)}else if(y===en){var K=this.currentScope();this.treatFunctionsAsVar?$=K.lexical.indexOf(f)>-1:$=K.lexical.indexOf(f)>-1||K.var.indexOf(f)>-1,K.functions.push(f)}else for(var be=this.scopeStack.length-1;be>=0;--be){var Re=this.scopeStack[be];if(Re.lexical.indexOf(f)>-1&&!(Re.flags&St&&Re.lexical[0]===f)||!this.treatFunctionsAsVarInScope(Re)&&Re.functions.indexOf(f)>-1){$=!0;break}if(Re.var.push(f),this.inModule&&Re.flags&Ce&&delete this.undefinedExports[f],Re.flags&Ln)break}$&&this.raiseRecoverable(T,"Identifier '"+f+"' has already been declared")},Si.checkLocalExport=function(f){this.scopeStack[0].lexical.indexOf(f.name)===-1&&this.scopeStack[0].var.indexOf(f.name)===-1&&(this.undefinedExports[f.name]=f)},Si.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Si.currentVarScope=function(){for(var f=this.scopeStack.length-1;;f--){var y=this.scopeStack[f];if(y.flags&(Ln|Sn|Rt))return y}},Si.currentThisScope=function(){for(var f=this.scopeStack.length-1;;f--){var y=this.scopeStack[f];if(y.flags&(Ln|Sn|Rt)&&!(y.flags<))return y}};var Rc=function(y,T,$){this.type="",this.start=T,this.end=0,y.options.locations&&(this.loc=new Ue(y,$)),y.options.directSourceFile&&(this.sourceFile=y.options.directSourceFile),y.options.ranges&&(this.range=[T,0])},Lc=D.prototype;Lc.startNode=function(){return new Rc(this,this.start,this.startLoc)},Lc.startNodeAt=function(f,y){return new Rc(this,f,y)};function N_(f,y,T,$){return f.type=y,f.end=T,this.options.locations&&(f.loc.end=$),this.options.ranges&&(f.range[1]=T),f}Lc.finishNode=function(f,y){return N_.call(this,f,y,this.lastTokEnd,this.lastTokEndLoc)},Lc.finishNodeAt=function(f,y,T,$){return N_.call(this,f,y,T,$)},Lc.copyNode=function(f){var y=new Rc(this,f.start,this.startLoc);for(var T in f)y[T]=f[T];return y};var mQ="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",M_="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Q_=M_+" Extended_Pictographic",D_=Q_,V_=D_+" EBase EComp EMod EPres ExtPict",F_=V_,OQ=F_,xQ={9:M_,10:Q_,11:D_,12:V_,13:F_,14:OQ},vQ="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bQ={9:"",10:"",11:"",12:"",13:"",14:vQ},B_="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",j_="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Z_=j_+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",X_=Z_+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",z_=X_+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",W_=z_+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",yQ=W_+" "+mQ,SQ={9:j_,10:Z_,11:X_,12:z_,13:W_,14:yQ},U_={};function wQ(f){var y=U_[f]={binary:ke(xQ[f]+" "+B_),binaryOfStrings:ke(bQ[f]),nonBinary:{General_Category:ke(B_),Script:ke(SQ[f])}};y.nonBinary.Script_Extensions=y.nonBinary.Script,y.nonBinary.gc=y.nonBinary.General_Category,y.nonBinary.sc=y.nonBinary.Script,y.nonBinary.scx=y.nonBinary.Script_Extensions}for(var ZO=0,q_=[9,10,11,12,13,14];ZO=6?"uy":"")+(y.options.ecmaVersion>=9?"s":"")+(y.options.ecmaVersion>=13?"d":"")+(y.options.ecmaVersion>=15?"v":""),this.unicodeProperties=U_[y.options.ecmaVersion>=14?14:y.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};os.prototype.reset=function(y,T,$){var V=$.indexOf("v")!==-1,Y=$.indexOf("u")!==-1;this.start=y|0,this.source=T+"",this.flags=$,V&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=Y&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=Y&&this.parser.options.ecmaVersion>=9)},os.prototype.raise=function(y){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+y)},os.prototype.at=function(y,T){T===void 0&&(T=!1);var $=this.source,V=$.length;if(y>=V)return-1;var Y=$.charCodeAt(y);if(!(T||this.switchU)||Y<=55295||Y>=57344||y+1>=V)return Y;var K=$.charCodeAt(y+1);return K>=56320&&K<=57343?(Y<<10)+K-56613888:Y},os.prototype.nextIndex=function(y,T){T===void 0&&(T=!1);var $=this.source,V=$.length;if(y>=V)return V;var Y=$.charCodeAt(y),K;return!(T||this.switchU)||Y<=55295||Y>=57344||y+1>=V||(K=$.charCodeAt(y+1))<56320||K>57343?y+1:y+2},os.prototype.current=function(y){return y===void 0&&(y=!1),this.at(this.pos,y)},os.prototype.lookahead=function(y){return y===void 0&&(y=!1),this.at(this.nextIndex(this.pos,y),y)},os.prototype.advance=function(y){y===void 0&&(y=!1),this.pos=this.nextIndex(this.pos,y)},os.prototype.eat=function(y,T){return T===void 0&&(T=!1),this.current(T)===y?(this.advance(T),!0):!1},os.prototype.eatChars=function(y,T){T===void 0&&(T=!1);for(var $=this.pos,V=0,Y=y;V-1&&this.raise(f.start,"Duplicate regular expression flag"),K==="u"&&($=!0),K==="v"&&(V=!0)}this.options.ecmaVersion>=15&&$&&V&&this.raise(f.start,"Invalid regular expression flag")};function _Q(f){for(var y in f)return!0;return!1}Be.validateRegExpPattern=function(f){this.regexp_pattern(f),!f.switchN&&this.options.ecmaVersion>=9&&_Q(f.groupNames)&&(f.switchN=!0,this.regexp_pattern(f))},Be.regexp_pattern=function(f){f.pos=0,f.lastIntValue=0,f.lastStringValue="",f.lastAssertionIsQuantifiable=!1,f.numCapturingParens=0,f.maxBackReference=0,f.groupNames=Object.create(null),f.backReferenceNames.length=0,f.branchID=null,this.regexp_disjunction(f),f.pos!==f.source.length&&(f.eat(41)&&f.raise("Unmatched ')'"),(f.eat(93)||f.eat(125))&&f.raise("Lone quantifier brackets")),f.maxBackReference>f.numCapturingParens&&f.raise("Invalid escape");for(var y=0,T=f.backReferenceNames;y=16;for(y&&(f.branchID=new Rd(f.branchID,null)),this.regexp_alternative(f);f.eat(124);)y&&(f.branchID=f.branchID.sibling()),this.regexp_alternative(f);y&&(f.branchID=f.branchID.parent),this.regexp_eatQuantifier(f,!0)&&f.raise("Nothing to repeat"),f.eat(123)&&f.raise("Lone quantifier brackets")},Be.regexp_alternative=function(f){for(;f.pos=9&&(T=f.eat(60)),f.eat(61)||f.eat(33))return this.regexp_disjunction(f),f.eat(41)||f.raise("Unterminated group"),f.lastAssertionIsQuantifiable=!T,!0}return f.pos=y,!1},Be.regexp_eatQuantifier=function(f,y){return y===void 0&&(y=!1),this.regexp_eatQuantifierPrefix(f,y)?(f.eat(63),!0):!1},Be.regexp_eatQuantifierPrefix=function(f,y){return f.eat(42)||f.eat(43)||f.eat(63)||this.regexp_eatBracedQuantifier(f,y)},Be.regexp_eatBracedQuantifier=function(f,y){var T=f.pos;if(f.eat(123)){var $=0,V=-1;if(this.regexp_eatDecimalDigits(f)&&($=f.lastIntValue,f.eat(44)&&this.regexp_eatDecimalDigits(f)&&(V=f.lastIntValue),f.eat(125)))return V!==-1&&V<$&&!y&&f.raise("numbers out of order in {} quantifier"),!0;f.switchU&&!y&&f.raise("Incomplete quantifier"),f.pos=T}return!1},Be.regexp_eatAtom=function(f){return this.regexp_eatPatternCharacters(f)||f.eat(46)||this.regexp_eatReverseSolidusAtomEscape(f)||this.regexp_eatCharacterClass(f)||this.regexp_eatUncapturingGroup(f)||this.regexp_eatCapturingGroup(f)},Be.regexp_eatReverseSolidusAtomEscape=function(f){var y=f.pos;if(f.eat(92)){if(this.regexp_eatAtomEscape(f))return!0;f.pos=y}return!1},Be.regexp_eatUncapturingGroup=function(f){var y=f.pos;if(f.eat(40)){if(f.eat(63)){if(this.options.ecmaVersion>=16){var T=this.regexp_eatModifiers(f),$=f.eat(45);if(T||$){for(var V=0;V-1&&f.raise("Duplicate regular expression modifiers")}if($){var K=this.regexp_eatModifiers(f);!T&&!K&&f.current()===58&&f.raise("Invalid regular expression modifiers");for(var be=0;be-1||T.indexOf(Re)>-1)&&f.raise("Duplicate regular expression modifiers")}}}}if(f.eat(58)){if(this.regexp_disjunction(f),f.eat(41))return!0;f.raise("Unterminated group")}}f.pos=y}return!1},Be.regexp_eatCapturingGroup=function(f){if(f.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(f):f.current()===63&&f.raise("Invalid group"),this.regexp_disjunction(f),f.eat(41))return f.numCapturingParens+=1,!0;f.raise("Unterminated group")}return!1},Be.regexp_eatModifiers=function(f){for(var y="",T=0;(T=f.current())!==-1&&kQ(T);)y+=Ee(T),f.advance();return y};function kQ(f){return f===105||f===109||f===115}Be.regexp_eatExtendedAtom=function(f){return f.eat(46)||this.regexp_eatReverseSolidusAtomEscape(f)||this.regexp_eatCharacterClass(f)||this.regexp_eatUncapturingGroup(f)||this.regexp_eatCapturingGroup(f)||this.regexp_eatInvalidBracedQuantifier(f)||this.regexp_eatExtendedPatternCharacter(f)},Be.regexp_eatInvalidBracedQuantifier=function(f){return this.regexp_eatBracedQuantifier(f,!0)&&f.raise("Nothing to repeat"),!1},Be.regexp_eatSyntaxCharacter=function(f){var y=f.current();return H_(y)?(f.lastIntValue=y,f.advance(),!0):!1};function H_(f){return f===36||f>=40&&f<=43||f===46||f===63||f>=91&&f<=94||f>=123&&f<=125}Be.regexp_eatPatternCharacters=function(f){for(var y=f.pos,T=0;(T=f.current())!==-1&&!H_(T);)f.advance();return f.pos!==y},Be.regexp_eatExtendedPatternCharacter=function(f){var y=f.current();return y!==-1&&y!==36&&!(y>=40&&y<=43)&&y!==46&&y!==63&&y!==91&&y!==94&&y!==124?(f.advance(),!0):!1},Be.regexp_groupSpecifier=function(f){if(f.eat(63)){this.regexp_eatGroupName(f)||f.raise("Invalid group");var y=this.options.ecmaVersion>=16,T=f.groupNames[f.lastStringValue];if(T)if(y)for(var $=0,V=T;$=11,$=f.current(T);return f.advance(T),$===92&&this.regexp_eatRegExpUnicodeEscapeSequence(f,T)&&($=f.lastIntValue),EQ($)?(f.lastIntValue=$,!0):(f.pos=y,!1)};function EQ(f){return g(f,!0)||f===36||f===95}Be.regexp_eatRegExpIdentifierPart=function(f){var y=f.pos,T=this.options.ecmaVersion>=11,$=f.current(T);return f.advance(T),$===92&&this.regexp_eatRegExpUnicodeEscapeSequence(f,T)&&($=f.lastIntValue),TQ($)?(f.lastIntValue=$,!0):(f.pos=y,!1)};function TQ(f){return m(f,!0)||f===36||f===95||f===8204||f===8205}Be.regexp_eatAtomEscape=function(f){return this.regexp_eatBackReference(f)||this.regexp_eatCharacterClassEscape(f)||this.regexp_eatCharacterEscape(f)||f.switchN&&this.regexp_eatKGroupName(f)?!0:(f.switchU&&(f.current()===99&&f.raise("Invalid unicode escape"),f.raise("Invalid escape")),!1)},Be.regexp_eatBackReference=function(f){var y=f.pos;if(this.regexp_eatDecimalEscape(f)){var T=f.lastIntValue;if(f.switchU)return T>f.maxBackReference&&(f.maxBackReference=T),!0;if(T<=f.numCapturingParens)return!0;f.pos=y}return!1},Be.regexp_eatKGroupName=function(f){if(f.eat(107)){if(this.regexp_eatGroupName(f))return f.backReferenceNames.push(f.lastStringValue),!0;f.raise("Invalid named reference")}return!1},Be.regexp_eatCharacterEscape=function(f){return this.regexp_eatControlEscape(f)||this.regexp_eatCControlLetter(f)||this.regexp_eatZero(f)||this.regexp_eatHexEscapeSequence(f)||this.regexp_eatRegExpUnicodeEscapeSequence(f,!1)||!f.switchU&&this.regexp_eatLegacyOctalEscapeSequence(f)||this.regexp_eatIdentityEscape(f)},Be.regexp_eatCControlLetter=function(f){var y=f.pos;if(f.eat(99)){if(this.regexp_eatControlLetter(f))return!0;f.pos=y}return!1},Be.regexp_eatZero=function(f){return f.current()===48&&!Ld(f.lookahead())?(f.lastIntValue=0,f.advance(),!0):!1},Be.regexp_eatControlEscape=function(f){var y=f.current();return y===116?(f.lastIntValue=9,f.advance(),!0):y===110?(f.lastIntValue=10,f.advance(),!0):y===118?(f.lastIntValue=11,f.advance(),!0):y===102?(f.lastIntValue=12,f.advance(),!0):y===114?(f.lastIntValue=13,f.advance(),!0):!1},Be.regexp_eatControlLetter=function(f){var y=f.current();return Y_(y)?(f.lastIntValue=y%32,f.advance(),!0):!1};function Y_(f){return f>=65&&f<=90||f>=97&&f<=122}Be.regexp_eatRegExpUnicodeEscapeSequence=function(f,y){y===void 0&&(y=!1);var T=f.pos,$=y||f.switchU;if(f.eat(117)){if(this.regexp_eatFixedHexDigits(f,4)){var V=f.lastIntValue;if($&&V>=55296&&V<=56319){var Y=f.pos;if(f.eat(92)&&f.eat(117)&&this.regexp_eatFixedHexDigits(f,4)){var K=f.lastIntValue;if(K>=56320&&K<=57343)return f.lastIntValue=(V-55296)*1024+(K-56320)+65536,!0}f.pos=Y,f.lastIntValue=V}return!0}if($&&f.eat(123)&&this.regexp_eatHexDigits(f)&&f.eat(125)&&AQ(f.lastIntValue))return!0;$&&f.raise("Invalid unicode escape"),f.pos=T}return!1};function AQ(f){return f>=0&&f<=1114111}Be.regexp_eatIdentityEscape=function(f){if(f.switchU)return this.regexp_eatSyntaxCharacter(f)?!0:f.eat(47)?(f.lastIntValue=47,!0):!1;var y=f.current();return y!==99&&(!f.switchN||y!==107)?(f.lastIntValue=y,f.advance(),!0):!1},Be.regexp_eatDecimalEscape=function(f){f.lastIntValue=0;var y=f.current();if(y>=49&&y<=57){do f.lastIntValue=10*f.lastIntValue+(y-48),f.advance();while((y=f.current())>=48&&y<=57);return!0}return!1};var G_=0,Ms=1,ar=2;Be.regexp_eatCharacterClassEscape=function(f){var y=f.current();if(PQ(y))return f.lastIntValue=-1,f.advance(),Ms;var T=!1;if(f.switchU&&this.options.ecmaVersion>=9&&((T=y===80)||y===112)){f.lastIntValue=-1,f.advance();var $;if(f.eat(123)&&($=this.regexp_eatUnicodePropertyValueExpression(f))&&f.eat(125))return T&&$===ar&&f.raise("Invalid property name"),$;f.raise("Invalid property name")}return G_};function PQ(f){return f===100||f===68||f===115||f===83||f===119||f===87}Be.regexp_eatUnicodePropertyValueExpression=function(f){var y=f.pos;if(this.regexp_eatUnicodePropertyName(f)&&f.eat(61)){var T=f.lastStringValue;if(this.regexp_eatUnicodePropertyValue(f)){var $=f.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(f,T,$),Ms}}if(f.pos=y,this.regexp_eatLoneUnicodePropertyNameOrValue(f)){var V=f.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(f,V)}return G_},Be.regexp_validateUnicodePropertyNameAndValue=function(f,y,T){oe(f.unicodeProperties.nonBinary,y)||f.raise("Invalid property name"),f.unicodeProperties.nonBinary[y].test(T)||f.raise("Invalid property value")},Be.regexp_validateUnicodePropertyNameOrValue=function(f,y){if(f.unicodeProperties.binary.test(y))return Ms;if(f.switchV&&f.unicodeProperties.binaryOfStrings.test(y))return ar;f.raise("Invalid property name")},Be.regexp_eatUnicodePropertyName=function(f){var y=0;for(f.lastStringValue="";K_(y=f.current());)f.lastStringValue+=Ee(y),f.advance();return f.lastStringValue!==""};function K_(f){return Y_(f)||f===95}Be.regexp_eatUnicodePropertyValue=function(f){var y=0;for(f.lastStringValue="";IQ(y=f.current());)f.lastStringValue+=Ee(y),f.advance();return f.lastStringValue!==""};function IQ(f){return K_(f)||Ld(f)}Be.regexp_eatLoneUnicodePropertyNameOrValue=function(f){return this.regexp_eatUnicodePropertyValue(f)},Be.regexp_eatCharacterClass=function(f){if(f.eat(91)){var y=f.eat(94),T=this.regexp_classContents(f);return f.eat(93)||f.raise("Unterminated character class"),y&&T===ar&&f.raise("Negated character class may contain strings"),!0}return!1},Be.regexp_classContents=function(f){return f.current()===93?Ms:f.switchV?this.regexp_classSetExpression(f):(this.regexp_nonEmptyClassRanges(f),Ms)},Be.regexp_nonEmptyClassRanges=function(f){for(;this.regexp_eatClassAtom(f);){var y=f.lastIntValue;if(f.eat(45)&&this.regexp_eatClassAtom(f)){var T=f.lastIntValue;f.switchU&&(y===-1||T===-1)&&f.raise("Invalid character class"),y!==-1&&T!==-1&&y>T&&f.raise("Range out of order in character class")}}},Be.regexp_eatClassAtom=function(f){var y=f.pos;if(f.eat(92)){if(this.regexp_eatClassEscape(f))return!0;if(f.switchU){var T=f.current();(T===99||t2(T))&&f.raise("Invalid class escape"),f.raise("Invalid escape")}f.pos=y}var $=f.current();return $!==93?(f.lastIntValue=$,f.advance(),!0):!1},Be.regexp_eatClassEscape=function(f){var y=f.pos;if(f.eat(98))return f.lastIntValue=8,!0;if(f.switchU&&f.eat(45))return f.lastIntValue=45,!0;if(!f.switchU&&f.eat(99)){if(this.regexp_eatClassControlLetter(f))return!0;f.pos=y}return this.regexp_eatCharacterClassEscape(f)||this.regexp_eatCharacterEscape(f)},Be.regexp_classSetExpression=function(f){var y=Ms,T;if(!this.regexp_eatClassSetRange(f))if(T=this.regexp_eatClassSetOperand(f)){T===ar&&(y=ar);for(var $=f.pos;f.eatChars([38,38]);){if(f.current()!==38&&(T=this.regexp_eatClassSetOperand(f))){T!==ar&&(y=Ms);continue}f.raise("Invalid character in character class")}if($!==f.pos)return y;for(;f.eatChars([45,45]);)this.regexp_eatClassSetOperand(f)||f.raise("Invalid character in character class");if($!==f.pos)return y}else f.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(f)){if(T=this.regexp_eatClassSetOperand(f),!T)return y;T===ar&&(y=ar)}},Be.regexp_eatClassSetRange=function(f){var y=f.pos;if(this.regexp_eatClassSetCharacter(f)){var T=f.lastIntValue;if(f.eat(45)&&this.regexp_eatClassSetCharacter(f)){var $=f.lastIntValue;return T!==-1&&$!==-1&&T>$&&f.raise("Range out of order in character class"),!0}f.pos=y}return!1},Be.regexp_eatClassSetOperand=function(f){return this.regexp_eatClassSetCharacter(f)?Ms:this.regexp_eatClassStringDisjunction(f)||this.regexp_eatNestedClass(f)},Be.regexp_eatNestedClass=function(f){var y=f.pos;if(f.eat(91)){var T=f.eat(94),$=this.regexp_classContents(f);if(f.eat(93))return T&&$===ar&&f.raise("Negated character class may contain strings"),$;f.pos=y}if(f.eat(92)){var V=this.regexp_eatCharacterClassEscape(f);if(V)return V;f.pos=y}return null},Be.regexp_eatClassStringDisjunction=function(f){var y=f.pos;if(f.eatChars([92,113])){if(f.eat(123)){var T=this.regexp_classStringDisjunctionContents(f);if(f.eat(125))return T}else f.raise("Invalid escape");f.pos=y}return null},Be.regexp_classStringDisjunctionContents=function(f){for(var y=this.regexp_classString(f);f.eat(124);)this.regexp_classString(f)===ar&&(y=ar);return y},Be.regexp_classString=function(f){for(var y=0;this.regexp_eatClassSetCharacter(f);)y++;return y===1?Ms:ar},Be.regexp_eatClassSetCharacter=function(f){var y=f.pos;if(f.eat(92))return this.regexp_eatCharacterEscape(f)||this.regexp_eatClassSetReservedPunctuator(f)?!0:f.eat(98)?(f.lastIntValue=8,!0):(f.pos=y,!1);var T=f.current();return T<0||T===f.lookahead()&&$Q(T)||RQ(T)?!1:(f.advance(),f.lastIntValue=T,!0)};function $Q(f){return f===33||f>=35&&f<=38||f>=42&&f<=44||f===46||f>=58&&f<=64||f===94||f===96||f===126}function RQ(f){return f===40||f===41||f===45||f===47||f>=91&&f<=93||f>=123&&f<=125}Be.regexp_eatClassSetReservedPunctuator=function(f){var y=f.current();return LQ(y)?(f.lastIntValue=y,f.advance(),!0):!1};function LQ(f){return f===33||f===35||f===37||f===38||f===44||f===45||f>=58&&f<=62||f===64||f===96||f===126}Be.regexp_eatClassControlLetter=function(f){var y=f.current();return Ld(y)||y===95?(f.lastIntValue=y%32,f.advance(),!0):!1},Be.regexp_eatHexEscapeSequence=function(f){var y=f.pos;if(f.eat(120)){if(this.regexp_eatFixedHexDigits(f,2))return!0;f.switchU&&f.raise("Invalid escape"),f.pos=y}return!1},Be.regexp_eatDecimalDigits=function(f){var y=f.pos,T=0;for(f.lastIntValue=0;Ld(T=f.current());)f.lastIntValue=10*f.lastIntValue+(T-48),f.advance();return f.pos!==y};function Ld(f){return f>=48&&f<=57}Be.regexp_eatHexDigits=function(f){var y=f.pos,T=0;for(f.lastIntValue=0;J_(T=f.current());)f.lastIntValue=16*f.lastIntValue+e2(T),f.advance();return f.pos!==y};function J_(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}function e2(f){return f>=65&&f<=70?10+(f-65):f>=97&&f<=102?10+(f-97):f-48}Be.regexp_eatLegacyOctalEscapeSequence=function(f){if(this.regexp_eatOctalDigit(f)){var y=f.lastIntValue;if(this.regexp_eatOctalDigit(f)){var T=f.lastIntValue;y<=3&&this.regexp_eatOctalDigit(f)?f.lastIntValue=y*64+T*8+f.lastIntValue:f.lastIntValue=y*8+T}else f.lastIntValue=y;return!0}return!1},Be.regexp_eatOctalDigit=function(f){var y=f.current();return t2(y)?(f.lastIntValue=y-48,f.advance(),!0):(f.lastIntValue=0,!1)};function t2(f){return f>=48&&f<=55}Be.regexp_eatFixedHexDigits=function(f,y){var T=f.pos;f.lastIntValue=0;for(var $=0;$=this.input.length)return this.finishToken(x.eof);if(f.override)return f.override(this);this.readToken(this.fullCharCodeAtPos())},mt.readToken=function(f){return g(f,this.options.ecmaVersion>=6)||f===92?this.readWord():this.getTokenFromCode(f)},mt.fullCharCodeAt=function(f){var y=this.input.charCodeAt(f);if(y<=55295||y>=56320)return y;var T=this.input.charCodeAt(f+1);return T<=56319||T>=57344?y:(y<<10)+T-56613888},mt.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},mt.skipBlockComment=function(){var f=this.options.onComment&&this.curPosition(),y=this.pos,T=this.input.indexOf("*/",this.pos+=2);if(T===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=T+2,this.options.locations)for(var $=void 0,V=y;($=Z(this.input,V,this.pos))>-1;)++this.curLine,V=this.lineStart=$;this.options.onComment&&this.options.onComment(!0,this.input.slice(y+2,T),y,this.pos,f,this.curPosition())},mt.skipLineComment=function(f){for(var y=this.pos,T=this.options.onComment&&this.curPosition(),$=this.input.charCodeAt(this.pos+=f);this.pos8&&f<14||f>=5760&&U.test(String.fromCharCode(f)))++this.pos;else break e}}},mt.finishToken=function(f,y){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var T=this.type;this.type=f,this.value=y,this.updateContext(T)},mt.readToken_dot=function(){var f=this.input.charCodeAt(this.pos+1);if(f>=48&&f<=57)return this.readNumber(!0);var y=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&f===46&&y===46?(this.pos+=3,this.finishToken(x.ellipsis)):(++this.pos,this.finishToken(x.dot))},mt.readToken_slash=function(){var f=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):f===61?this.finishOp(x.assign,2):this.finishOp(x.slash,1)},mt.readToken_mult_modulo_exp=function(f){var y=this.input.charCodeAt(this.pos+1),T=1,$=f===42?x.star:x.modulo;return this.options.ecmaVersion>=7&&f===42&&y===42&&(++T,$=x.starstar,y=this.input.charCodeAt(this.pos+2)),y===61?this.finishOp(x.assign,T+1):this.finishOp($,T)},mt.readToken_pipe_amp=function(f){var y=this.input.charCodeAt(this.pos+1);if(y===f){if(this.options.ecmaVersion>=12){var T=this.input.charCodeAt(this.pos+2);if(T===61)return this.finishOp(x.assign,3)}return this.finishOp(f===124?x.logicalOR:x.logicalAND,2)}return y===61?this.finishOp(x.assign,2):this.finishOp(f===124?x.bitwiseOR:x.bitwiseAND,1)},mt.readToken_caret=function(){var f=this.input.charCodeAt(this.pos+1);return f===61?this.finishOp(x.assign,2):this.finishOp(x.bitwiseXOR,1)},mt.readToken_plus_min=function(f){var y=this.input.charCodeAt(this.pos+1);return y===f?y===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||E.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(x.incDec,2):y===61?this.finishOp(x.assign,2):this.finishOp(x.plusMin,1)},mt.readToken_lt_gt=function(f){var y=this.input.charCodeAt(this.pos+1),T=1;return y===f?(T=f===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+T)===61?this.finishOp(x.assign,T+1):this.finishOp(x.bitShift,T)):y===33&&f===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(y===61&&(T=2),this.finishOp(x.relational,T))},mt.readToken_eq_excl=function(f){var y=this.input.charCodeAt(this.pos+1);return y===61?this.finishOp(x.equality,this.input.charCodeAt(this.pos+2)===61?3:2):f===61&&y===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(x.arrow)):this.finishOp(f===61?x.eq:x.prefix,1)},mt.readToken_question=function(){var f=this.options.ecmaVersion;if(f>=11){var y=this.input.charCodeAt(this.pos+1);if(y===46){var T=this.input.charCodeAt(this.pos+2);if(T<48||T>57)return this.finishOp(x.questionDot,2)}if(y===63){if(f>=12){var $=this.input.charCodeAt(this.pos+2);if($===61)return this.finishOp(x.assign,3)}return this.finishOp(x.coalesce,2)}}return this.finishOp(x.question,1)},mt.readToken_numberSign=function(){var f=this.options.ecmaVersion,y=35;if(f>=13&&(++this.pos,y=this.fullCharCodeAtPos(),g(y,!0)||y===92))return this.finishToken(x.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Ee(y)+"'")},mt.getTokenFromCode=function(f){switch(f){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(x.parenL);case 41:return++this.pos,this.finishToken(x.parenR);case 59:return++this.pos,this.finishToken(x.semi);case 44:return++this.pos,this.finishToken(x.comma);case 91:return++this.pos,this.finishToken(x.bracketL);case 93:return++this.pos,this.finishToken(x.bracketR);case 123:return++this.pos,this.finishToken(x.braceL);case 125:return++this.pos,this.finishToken(x.braceR);case 58:return++this.pos,this.finishToken(x.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(x.backQuote);case 48:var y=this.input.charCodeAt(this.pos+1);if(y===120||y===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(y===111||y===79)return this.readRadixNumber(8);if(y===98||y===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(f);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(f);case 124:case 38:return this.readToken_pipe_amp(f);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(f);case 60:case 62:return this.readToken_lt_gt(f);case 61:case 33:return this.readToken_eq_excl(f);case 63:return this.readToken_question();case 126:return this.finishOp(x.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Ee(f)+"'")},mt.finishOp=function(f,y){var T=this.input.slice(this.pos,this.pos+y);return this.pos+=y,this.finishToken(f,T)},mt.readRegexp=function(){for(var f,y,T=this.pos;;){this.pos>=this.input.length&&this.raise(T,"Unterminated regular expression");var $=this.input.charAt(this.pos);if(E.test($)&&this.raise(T,"Unterminated regular expression"),f)f=!1;else{if($==="[")y=!0;else if($==="]"&&y)y=!1;else if($==="/"&&!y)break;f=$==="\\"}++this.pos}var V=this.input.slice(T,this.pos);++this.pos;var Y=this.pos,K=this.readWord1();this.containsEsc&&this.unexpected(Y);var be=this.regexpState||(this.regexpState=new os(this));be.reset(T,V,K),this.validateRegExpFlags(be),this.validateRegExpPattern(be);var Re=null;try{Re=new RegExp(V,K)}catch{}return this.finishToken(x.regexp,{pattern:V,flags:K,value:Re})},mt.readInt=function(f,y,T){for(var $=this.options.ecmaVersion>=12&&y===void 0,V=T&&this.input.charCodeAt(this.pos)===48,Y=this.pos,K=0,be=0,Re=0,et=y??1/0;Re=97?sn=ot-97+10:ot>=65?sn=ot-65+10:ot>=48&&ot<=57?sn=ot-48:sn=1/0,sn>=f)break;be=ot,K=K*f+sn}return $&&be===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===Y||y!=null&&this.pos-Y!==y?null:K};function NQ(f,y){return y?parseInt(f,8):parseFloat(f.replace(/_/g,""))}function n2(f){return typeof BigInt!="function"?null:BigInt(f.replace(/_/g,""))}mt.readRadixNumber=function(f){var y=this.pos;this.pos+=2;var T=this.readInt(f);return T==null&&this.raise(this.start+2,"Expected number in radix "+f),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(T=n2(this.input.slice(y,this.pos)),++this.pos):g(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(x.num,T)},mt.readNumber=function(f){var y=this.pos;!f&&this.readInt(10,void 0,!0)===null&&this.raise(y,"Invalid number");var T=this.pos-y>=2&&this.input.charCodeAt(y)===48;T&&this.strict&&this.raise(y,"Invalid number");var $=this.input.charCodeAt(this.pos);if(!T&&!f&&this.options.ecmaVersion>=11&&$===110){var V=n2(this.input.slice(y,this.pos));return++this.pos,g(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(x.num,V)}T&&/[89]/.test(this.input.slice(y,this.pos))&&(T=!1),$===46&&!T&&(++this.pos,this.readInt(10),$=this.input.charCodeAt(this.pos)),($===69||$===101)&&!T&&($=this.input.charCodeAt(++this.pos),($===43||$===45)&&++this.pos,this.readInt(10)===null&&this.raise(y,"Invalid number")),g(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var Y=NQ(this.input.slice(y,this.pos),T);return this.finishToken(x.num,Y)},mt.readCodePoint=function(){var f=this.input.charCodeAt(this.pos),y;if(f===123){this.options.ecmaVersion<6&&this.unexpected();var T=++this.pos;y=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,y>1114111&&this.invalidStringToken(T,"Code point out of bounds")}else y=this.readHexChar(4);return y},mt.readString=function(f){for(var y="",T=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var $=this.input.charCodeAt(this.pos);if($===f)break;$===92?(y+=this.input.slice(T,this.pos),y+=this.readEscapedChar(!1),T=this.pos):$===8232||$===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(I($)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return y+=this.input.slice(T,this.pos++),this.finishToken(x.string,y)};var i2={};mt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(f){if(f===i2)this.readInvalidTemplateToken();else throw f}this.inTemplateElement=!1},mt.invalidStringToken=function(f,y){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw i2;this.raise(f,y)},mt.readTmplToken=function(){for(var f="",y=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var T=this.input.charCodeAt(this.pos);if(T===96||T===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===x.template||this.type===x.invalidTemplate)?T===36?(this.pos+=2,this.finishToken(x.dollarBraceL)):(++this.pos,this.finishToken(x.backQuote)):(f+=this.input.slice(y,this.pos),this.finishToken(x.template,f));if(T===92)f+=this.input.slice(y,this.pos),f+=this.readEscapedChar(!0),y=this.pos;else if(I(T)){switch(f+=this.input.slice(y,this.pos),++this.pos,T){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:f+=` +`;break;default:f+=String.fromCharCode(T);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),y=this.pos}else++this.pos}},mt.readInvalidTemplateToken=function(){for(;this.pos=48&&y<=55){var $=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],V=parseInt($,8);return V>255&&($=$.slice(0,-1),V=parseInt($,8)),this.pos+=$.length-1,y=this.input.charCodeAt(this.pos),($!=="0"||y===56||y===57)&&(this.strict||f)&&this.invalidStringToken(this.pos-1-$.length,f?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(V)}return I(y)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(y)}},mt.readHexChar=function(f){var y=this.pos,T=this.readInt(16,f);return T===null&&this.invalidStringToken(y,"Bad character escape sequence"),T},mt.readWord1=function(){this.containsEsc=!1;for(var f="",y=!0,T=this.pos,$=this.options.ecmaVersion>=6;this.pos...",!0,!0),v={tc_oTag:p,tc_cTag:g,tc_expr:m},S={jsxName:new d("jsxName"),jsxText:new d("jsxText",{beforeExpr:!0}),jsxTagStart:new d("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new d("jsxTagEnd")};S.jsxTagStart.updateContext=function(){this.context.push(m),this.context.push(p),this.exprAllowed=!1},S.jsxTagEnd.updateContext=function(b){let w=this.context.pop();w===p&&b===c.slash||w===g?(this.context.pop(),this.exprAllowed=this.curContext()===m):this.exprAllowed=!0},u={tokContexts:v,tokTypes:S},r.set(l,u)}return u}function o(l){if(!l)return l;if(l.type==="JSXIdentifier")return l.name;if(l.type==="JSXNamespacedName")return l.namespace.name+":"+l.name.name;if(l.type==="JSXMemberExpression")return o(l.object)+"."+o(l.property)}t.exports=function(l){return l=l||{},function(u){return a({allowNamespaces:l.allowNamespaces!==!1,allowNamespacedObjects:!!l.allowNamespacedObjects},u)}},Object.defineProperty(t.exports,"tokTypes",{get:function(){return s(oE()).tokTypes},configurable:!0,enumerable:!0});function a(l,u){const c=u.acorn||oE(),h=s(c),d=c.tokTypes,p=h.tokTypes,g=c.tokContexts,m=h.tokContexts.tc_oTag,v=h.tokContexts.tc_cTag,S=h.tokContexts.tc_expr,b=c.isNewLine,w=c.isIdentifierStart,k=c.isIdentifierChar;return class extends u{static get acornJsx(){return h}jsx_readToken(){let C="",x=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let E=this.input.charCodeAt(this.pos);switch(E){case 60:case 123:return this.pos===this.start?E===60&&this.exprAllowed?(++this.pos,this.finishToken(p.jsxTagStart)):this.getTokenFromCode(E):(C+=this.input.slice(x,this.pos),this.finishToken(p.jsxText,C));case 38:C+=this.input.slice(x,this.pos),C+=this.jsx_readEntity(),x=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(E===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:b(E)?(C+=this.input.slice(x,this.pos),C+=this.jsx_readNewLine(!0),x=this.pos):++this.pos}}}jsx_readNewLine(C){let x=this.input.charCodeAt(this.pos),E;return++this.pos,x===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,E=C?` +`:`\r +`):E=String.fromCharCode(x),this.options.locations&&(++this.curLine,this.lineStart=this.pos),E}jsx_readString(C){let x="",E=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let A=this.input.charCodeAt(this.pos);if(A===C)break;A===38?(x+=this.input.slice(E,this.pos),x+=this.jsx_readEntity(),E=this.pos):b(A)?(x+=this.input.slice(E,this.pos),x+=this.jsx_readNewLine(!1),E=this.pos):++this.pos}return x+=this.input.slice(E,this.pos++),this.finishToken(d.string,x)}jsx_readEntity(){let C="",x=0,E,A=this.input[this.pos];A!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let I=++this.pos;for(;this.pos")}let U=I.name?"Element":"Fragment";return E["opening"+U]=I,E["closing"+U]=Z,E.children=A,this.type===d.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(E,"JSX"+U)}jsx_parseText(){let C=this.parseLiteral(this.value);return C.type="JSXText",C}jsx_parseElement(){let C=this.start,x=this.startLoc;return this.next(),this.jsx_parseElementAt(C,x)}parseExprAtom(C){return this.type===p.jsxText?this.jsx_parseText():this.type===p.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(C)}readToken(C){let x=this.curContext();if(x===S)return this.jsx_readToken();if(x===m||x===v){if(w(C))return this.jsx_readWord();if(C==62)return++this.pos,this.finishToken(p.jsxTagEnd);if((C===34||C===39)&&x==m)return this.jsx_readString(C)}return C===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(p.jsxTagStart)):super.readToken(C)}updateContext(C){if(this.type==d.braceL){var x=this.curContext();x==m?this.context.push(g.b_expr):x==S?this.context.push(g.b_tmpl):super.updateContext(C),this.exprAllowed=!0}else if(this.type===d.slash&&C===p.jsxTagStart)this.context.length-=2,this.context.push(v),this.exprAllowed=!1;else return super.updateContext(C)}}}})(D1)),D1.exports}var $G=IG();const RG=fy($G);function LG(t){const e=t||{},n=e.addResult,i=e.acorn,r=e.spread;let s=e.allowEmpty,o;if(s==null&&(s=!0),i){if(!i.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:"module"},e.acornOptions)}else if(e.acornOptions||e.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:"mdxFlowExpression",tokenize:a,concrete:!0}},text:{123:{name:"mdxTextExpression",tokenize:l}}};function a(u,c,h){const d=this;return p;function p(S){return g(S)}function g(S){return Mg.call(d,u,m,"mdxFlowExpression","mdxFlowExpressionMarker","mdxFlowExpressionChunk",i,o,n,r,s)(S)}function m(S){return dr(S)?pr(u,v,"whitespace")(S):v(S)}function v(S){const b=d.parser.constructs.flow[60],k=(Array.isArray(b)?b:b?[b]:[]).find(function(C){return C.name==="mdxJsxFlowTag"});return S===60&&k?u.attempt(k,v,h)(S):S===null||Yt(S)?c(S):h(S)}}function l(u,c){const h=this;return d;function d(p){return Mg.call(h,u,c,"mdxTextExpression","mdxTextExpressionMarker","mdxTextExpressionChunk",i,o,n,r,s,!0)(p)}}}const NG={tokenize:DG,partial:!0},lE="https://github.com/micromark/micromark-extension-mdxjs-esm",MG=new Set(["ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ImportDeclaration"]);function QG(t){const e={tokenize:r,concrete:!0};if(!t||!t.acorn||!t.acorn.parse)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");const n=t.acorn,i=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0});return{flow:{101:e,105:e}};function r(s,o,a){const l=this,u=l.parser.definedModuleSpecifiers||(l.parser.definedModuleSpecifiers=[]),c=this.events.length+1;let h="";return l.interrupt?a:d;function d(b){return l.now().column>1?a(b):(s.enter("mdxjsEsm"),s.enter("mdxjsEsmData"),s.consume(b),h+=String.fromCharCode(b),p)}function p(b){return dy(b)?(s.consume(b),h+=String.fromCharCode(b),p):(h==="import"||h==="export")&&b===32?(s.consume(b),g):a(b)}function g(b){return b===null||Yt(b)?(s.exit("mdxjsEsmData"),m(b)):(s.consume(b),g)}function m(b){return b===null?S(b):Yt(b)?s.check(NG,S,v)(b):(s.enter("mdxjsEsmData"),g(b))}function v(b){return s.enter("lineEnding"),s.consume(b),s.exit("lineEnding"),m}function S(b){const w=U9(l.events.slice(c),{acorn:n,acornOptions:i,tokenTypes:["mdxjsEsmData"],prefix:u.length>0?"var "+u.join(",")+` +`:""});if(w.error){if(b!==null&&w.swallow)return v(b);const C=new Hn("Could not parse import/exports with acorn",{cause:w.error,place:{line:w.error.loc.line,column:w.error.loc.column+1,offset:w.error.pos},ruleId:"acorn",source:"micromark-extension-mdxjs-esm"});throw C.url=lE+"#could-not-parse-importexports-with-acorn",C}u.length>0&&w.estree.body.shift();let k=-1;for(;++k{Zy("history-push");const s=At(n.getKey());s&&s.setMdastNode({...e,...r})},{discrete:!0}),t.dispatchCommand(Yo,void 0)}}function $4(){const{parentEditor:t,lexicalNode:e}=Od();return()=>{t.update(()=>{const n=At(e.getKey());n.selectNext(),n.remove()})}}const fO=function(t){const{getContent:e,getUpdatedMdastNode:n,contentEditableProps:i,block:r=!1}=t,{mdastNode:s,lexicalNode:o,focusEmitter:a}=Od(),l=hO(),u=$4(),c=e(s),h=ha(),[d,p,g,m,v,S,b,w,k,C,x]=$t(Bi,nd,fc,id,so,tl,vl,Go,dc,xS,Wh),E=bt(yl),[A]=_.useState(()=>u0({nodes:m,theme:h.getValue(Wh),namespace:"NestedEditor"}));return _.useEffect(()=>{a.subscribe(()=>{A.focus()})},[A,a]),_.useEffect(()=>{A.update(()=>{ht().clear();let I=c;r?I.length===0&&(I=[{type:"paragraph",children:[]}]):I=[{type:"paragraph",children:c}],w0({root:ht(),mdastRoot:{type:"root",children:I},visitors:p,directiveDescriptors:S,codeBlockEditorDescriptors:b,defaultCodeBlockLanguage:w,jsxComponentDescriptors:v})})},[A,r,p]),_.useEffect(()=>{function I(){A.getEditorState().read(()=>{const Z=S0({root:ht(),visitors:g,jsxComponentDescriptors:v,jsxIsAvailable:k,addImportStatements:!1}),U=r?Z.children:Z.children[0].children;l(n(structuredClone(s),U))})}return ci(A.registerCommand(Vf,()=>(E({editorType:"lexical",rootNode:o,editorRef:A}),!1),Zt),A.registerCommand(Ff,Z=>{const U=Z.relatedTarget;return z0(U,d.getRootElement())?!1:(I(),E(null),!0)},at),A.registerCommand(Yo,()=>(I(),!0),at),A.registerCommand(tc,()=>(E({editorType:"lexical",rootNode:o,editorRef:A}),!1),Vh),A.registerCommand(Nf,(Z,U)=>{const W=U.getRootElement();return W?.innerText===` +`?(u(),!0):!1},Mi))},[r,A,g,n,v,k,o,s,u,E,l,d]),_.createElement(PI,{initialEditor:A,initialTheme:x},_.createElement(_S,{contentEditable:_.createElement(wS,{...i,className:ft(G.nestedEditor,i?.className)}),placeholder:null,ErrorBoundary:CS}),_.createElement(tI,null),C.map((I,Z)=>_.createElement(I,{key:Z})))};function ef(){let t=Ys;return{publish:()=>{t()},subscribe:e=>{t=e}}}var FG=Object.defineProperty,BG=(t,e,n)=>e in t?FG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,op=(t,e,n)=>(BG(t,typeof e!="symbol"?e+"":e,n),n);class xd extends Cr{constructor(e,n,i){super(i),op(this,"__mdastNode"),op(this,"__focusEmitter",ef()),op(this,"__importStatement"),op(this,"select",()=>{this.__focusEmitter.publish()}),this.__mdastNode=e,this.__importStatement=n}static getType(){return"jsx"}static clone(e){return new xd(structuredClone(e.__mdastNode),structuredClone(e.__importStatement),e.__key)}static importJSON(e){return tf(e.mdastNode,e.importStatement)}getMdastNode(){return this.__mdastNode}getImportStatement(){return this.__importStatement}exportJSON(){return{mdastNode:this.getMdastNode(),importStatement:this.getImportStatement(),type:"jsx",version:1}}createDOM(){return document.createElement(this.__mdastNode.type==="mdxJsxTextElement"?"span":"div")}updateDOM(){return!1}setMdastNode(e){this.getWritable().__mdastNode=e}decorate(e,n){return _.createElement(jG,{lexicalJsxNode:this,config:n,mdastNode:this.getMdastNode(),parentEditor:e,focusEmitter:this.__focusEmitter})}isInline(){return this.__mdastNode.type==="mdxJsxTextElement"}isKeyboardSelectable(){return!0}}function jG(t){const{mdastNode:e}=t,n=Pt(so),i=n.find(s=>s.name===e.name)??n.find(s=>s.name==="*");if(!i)throw new Error(`No JSX descriptor found for ${e.name}`);const r=i.Editor;return _.createElement(cO.Provider,{value:{config:t.config,focusEmitter:t.focusEmitter,mdastNode:e,parentEditor:t.parentEditor,lexicalNode:t.lexicalJsxNode}},_.createElement(r,{descriptor:i,mdastNode:e}))}function tf(t,e){return new xd(t,e)}function ZG(t){return t instanceof xd}function XG(t){return rS.includes(t)}const zG={testLexicalNode:ZG,visitLexicalNode({actions:t,mdastParent:e,lexicalNode:n}){function i(o){"children"in o&&o.children instanceof Array&&o.children.forEach(a=>{N4(a)&&!XG(a.name)&&t.registerReferredComponent(a.name),i(a)})}const r=n.getMdastNode(),s=n.getImportStatement();t.registerReferredComponent(r.name,s),i(r),t.appendToParent(e,r)},priority:-200},WG={testNode:"mdxjsEsm",visitNode(){}},UG={testNode:(t,{jsxComponentDescriptors:e})=>t.type==="mdxJsxTextElement"||t.type==="mdxJsxFlowElement"?(e.find(i=>i.name===t.name)??e.find(i=>i.name==="*"))!==void 0:!1,visitNode({lexicalParent:t,mdastNode:e,descriptors:{jsxComponentDescriptors:n},metaData:i}){const r=n.find(s=>s.name===e.name)??n.find(s=>s.name==="*");if(r?.kind==="text"&&e.type==="mdxJsxFlowElement"){const s={...e,type:"mdxJsxTextElement"},o=yt();o.append(tf(s,e.name?i.importDeclarations[e.name]:void 0)),t.append(o)}else t.append(tf(e,e.name?i.importDeclarations[e.name]:void 0))},priority:-200};var qG=Object.defineProperty,HG=(t,e,n)=>e in t?qG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uE=(t,e,n)=>(HG(t,typeof e!="symbol"?e+"":e,n),n);class vd extends Cr{constructor(e,n,i){super(i),uE(this,"__value"),uE(this,"__mdastType"),this.__value=e,this.__mdastType=n}static getType(){return"mdx-expression"}static clone(e){return new vd(e.__value,e.__mdastType,e.__key)}getValue(){return this.__value}getMdastType(){return this.__mdastType}createDOM(){const e=document.createElement("span");return e.classList.add(Nn.mdxExpression),e}updateDOM(){return!1}static importDOM(){return{}}exportDOM(e){const{element:n}=super.exportDOM(e);return{element:n}}static importJSON(e){return R4(e.value,e.mdastType)}exportJSON(){return{...super.exportJSON(),value:this.getValue(),mdastType:this.getMdastType(),type:"mdx-expression",version:1}}extractWithChild(){return!0}isInline(){return this.__mdastType==="mdxTextExpression"}decorate(e){return _.createElement(_.Fragment,null,"{",_.createElement("span",{className:G.inputSizer,"data-value":this.getValue()},_.createElement("input",{size:1,onKeyDown:n=>{(n.target.value===""&&n.key==="Backspace"||n.key==="Delete")&&(n.stopPropagation(),n.nativeEvent.stopImmediatePropagation(),n.preventDefault(),e.update(()=>{this.selectPrevious(),this.remove()}))},onChange:n=>{n.target.parentElement.dataset.value=n.target.value,e.update(()=>{this.getWritable().__value=n.target.value})},type:"text",value:this.getValue()})),"}")}}function R4(t,e){return vi(new vd(t,e))}function YG(t){return t instanceof vd}const GG={testNode:t=>t.type==="mdxTextExpression"||t.type==="mdxFlowExpression",visitNode({lexicalParent:t,mdastNode:e}){t.append(R4(e.value,e.type))},priority:-200},KG={testLexicalNode:YG,visitLexicalNode({actions:t,mdastParent:e,lexicalNode:n}){const i={type:n.getMdastType(),value:n.getValue()};t.appendToParent(e,i)}},JG=t=>{const e=Pt(es);return _.createElement(F0,{...t,container:e?.current})},eK=_.forwardRef((t,e)=>_.createElement(o$,{...t,className:G.popoverContent,sideOffset:5,side:"top",ref:e},_.createElement("span",{className:G.popoverArrow},_.createElement(B0,null)),t.children)),Mw=({title:t,properties:e,onChange:n})=>{const[i,r]=_.useState(!1),s=Pt(Jt),{register:o,handleSubmit:a,reset:l}=iO({defaultValues:e});return _.createElement(V0,{open:i,onOpenChange:u=>{r(u)}},_.createElement(bU,{className:G.iconButton},_.createElement("div",null,s("settings"))),_.createElement(JG,null,_.createElement(eK,null,_.createElement("form",{onSubmit:u=>{a(n)(u),r(!1),u.preventDefault(),u.stopPropagation()}},_.createElement("h3",{className:G.propertyPanelTitle},t," Attributes"),_.createElement("table",{className:G.propertyEditorTable},_.createElement("thead",null,_.createElement("tr",null,_.createElement("th",{className:G.readOnlyColumnCell},"Attribute"),_.createElement("th",null,"Value"))),_.createElement("tbody",null,Object.keys(e).map(u=>_.createElement("tr",{key:u},_.createElement("th",{className:G.readOnlyColumnCell}," ",u," "),_.createElement("td",null,_.createElement("input",{...o(u),className:G.propertyEditorInput}))))),_.createElement("tfoot",null,_.createElement("tr",null,_.createElement("td",{colSpan:2},_.createElement("div",{className:G.buttonsFooter},_.createElement("button",{type:"submit",className:G.primaryButton},"Save"),_.createElement("button",{type:"reset",className:G.secondaryButton,onClick:u=>{u.preventDefault(),l(e),r(!1)}},"Cancel"))))))))))},tK=t=>t!==null&&typeof t=="object"&&"type"in t&&"value"in t&&typeof t.value=="string",nK=t=>typeof t=="string",iK=t=>t.type==="mdxJsxAttribute"&&typeof t.name=="string",L4=({mdastNode:t,descriptor:e,PropertyEditor:n})=>{const i=hO(),r=_.useMemo(()=>e.props.reduce((l,{name:u})=>{const c=t.attributes.find(h=>iK(h)?h.name===u:!1);if(c){if(tK(c.value))return l[u]=c.value.value,l;if(nK(c.value))return l[u]=c.value,l}return l[u]="",l},{}),[t,e]),s=_.useCallback(l=>{const u=Object.entries(l).reduce((c,[h,d])=>{if(d==="")return c;const p=e.props.find(g=>g.name===h);return p?.type==="expression"?(c.push({type:"mdxJsxAttribute",name:h,value:{type:"mdxJsxAttributeValueExpression",value:d}}),c):(c.push({type:"mdxJsxAttribute",name:h,value:d}),c)},[]);i({attributes:u})},[t,i,e]),o=n??Mw,a=e.props.length==0&&e.hasChildren&&e.kind==="flow";return _.createElement("div",{className:e.kind==="text"?G.inlineEditor:G.blockEditor},a?_.createElement("span",{className:G.genericComponentName},t.name??"Fragment"):null,e.props.length>0?_.createElement(o,{properties:r,title:t.name??"",onChange:s}):null,e.hasChildren?_.createElement(fO,{block:e.kind==="flow",getContent:l=>l.children,getUpdatedMdastNode:(l,u)=>({...l,children:u})}):_.createElement("span",{className:G.genericComponentName},t.name))};function N4(t){return t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"}const rK=t=>t!==null&&typeof t=="object"&&"type"in t&&"value"in t&&typeof t.value=="string",sK=t=>Object.entries(t).map(([e,n])=>({type:"mdxJsxAttribute",name:e,value:rK(n)?{type:"mdxJsxAttributeValueExpression",value:n.value}:n})),M4=mn(t=>{t.link(t.pipe(M4,Xr(({kind:e,name:n,children:i,props:r})=>()=>{const s=sK(r);return tf(e==="flow"?{type:"mdxJsxFlowElement",name:n,children:i??[],attributes:s}:{type:"mdxJsxTextElement",name:n,children:i??[],attributes:s})})),pc)}),cE={name:null,kind:"flow",props:[],hasChildren:!0,Editor:L4},hE=t=>t?t.allowFragment??!0?[cE,...t.jsxComponentDescriptors]:t.jsxComponentDescriptors:[cE],oK=En({init:(t,e)=>{t.pubIn({[dc]:!0,[Jo]:ZY(),[Ko]:VG(),[Qi]:[UG,WG,GG],[rr]:[xd,vd],[sr]:[zG,KG],[bl]:XY(),[so]:hE(e)})},update(t,e){t.pub(so,hE(e))}});function Q4(t,e,n,i){const r=[...t].sort((o,a)=>a.priority-o.priority),s=n??"";return r.find(o=>o.match(e??"",s))??r.find(o=>o.match(i??"",s))}var aK=Object.defineProperty,lK=(t,e,n)=>e in t?aK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_o=(t,e,n)=>(lK(t,typeof e!="symbol"?e+"":e,n),n);class El extends Cr{constructor(e,n,i,r){super(r),_o(this,"__code"),_o(this,"__meta"),_o(this,"__language"),_o(this,"__focusEmitter",ef()),_o(this,"setCode",s=>{s!==this.__code&&(this.getWritable().__code=s)}),_o(this,"setMeta",s=>{s!==this.__meta&&(this.getWritable().__meta=s)}),_o(this,"setLanguage",s=>{s!==this.__language&&(this.getWritable().__language=s)}),_o(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=e,this.__meta=i,this.__language=n}static getType(){return"codeblock"}static clone(e){return new El(e.__code,e.__language,e.__meta,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__code=e.__code,this.__meta=e.__meta,this.__language=e.__language,this.__focusEmitter=ef()}static importJSON(e){const{code:n,meta:i,language:r}=e;return Sc({code:n,language:r,meta:i})}static importDOM(){return{pre:()=>({conversion:V4,priority:3})}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(e,n){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(e){return _.createElement(cK,{parentEditor:e,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const D4=_.createContext(null),uK=({parentEditor:t,lexicalNode:e,children:n})=>{const i=_.useMemo(()=>({lexicalNode:e,parentEditor:t,setCode:r=>{t.update(()=>{e.setCode(r),setTimeout(()=>{t.dispatchCommand(Yo,void 0)},0)})},setLanguage:r=>{t.update(()=>{e.setLanguage(r)})},setMeta:r=>{t.update(()=>{e.setMeta(r)})}}),[e,t]);return _.createElement(D4.Provider,{value:i},n)};function am(){const t=_.useContext(D4);if(!t)throw new Error("useCodeBlockEditor must be used within a CodeBlockEditor");return t}const cK=t=>{const e=Pt(vl),n=Pt(Go),i=Q4(e,t.language,t.meta,n);if(!i)throw new Error(`No CodeBlockEditor registered for language=${t.language} meta=${t.meta}`);const r=i.Editor,{codeBlockNode:s,parentEditor:o,...a}=t;return _.createElement(uK,{parentEditor:t.parentEditor,lexicalNode:t.codeBlockNode},_.createElement(r,{...a}))};function Sc(t){const{code:e="",language:n="",meta:i=""}=t;return new El(e,n,i)}function Qw(t){return t instanceof El}function V4(t){const e=t,n=e.textContent,i=t.getAttribute("class")??"",r=t.getAttribute("data-language")??"",s=/language-(\w+)/.exec(i),o=s?s[1]:r,a=e.getAttribute("data-meta")??"";return{node:Sc({code:n,language:o,meta:a})}}const hK={testLexicalNode:Qw,visitLexicalNode:({lexicalNode:t,actions:e})=>{e.addAndStepInto("code",{value:t.getCode(),lang:t.getLanguage(),meta:t.getMeta()})}},fK={testNode:(t,{codeBlockEditorDescriptors:e,defaultCodeBlockLanguage:n})=>t.type==="code"?Q4(e,t.lang,t.meta,n)!==void 0:!1,visitNode({mdastNode:t,actions:e}){e.addAndStepInto(Sc({code:t.value,language:t.lang??"",meta:t.meta??""}))}},dO=mn(t=>{t.link(t.pipe(dO,rn(Go),Xr(([e,n])=>()=>Sc({language:n,...e}))),pc)}),F4=ei(vl),dK=En({update(t,e){t.pub(Go,e?.defaultCodeBlockLanguage??"")},init(t,e){t.pubIn({[wl]:"codeblock",[Go]:e?.defaultCodeBlockLanguage??"",[vl]:e?.codeBlockEditorDescriptors??[],[Qi]:fK,[rr]:El,[sr]:hK})}}),B4=1024;let pK=0,gr=class{constructor(e,n){this.from=e,this.to=n}};class tt{constructor(e={}){this.id=pK++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=$n.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}tt.closedBy=new tt({deserialize:t=>t.split(" ")});tt.openedBy=new tt({deserialize:t=>t.split(" ")});tt.group=new tt({deserialize:t=>t.split(" ")});tt.isolate=new tt({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});tt.contextHash=new tt({perNode:!0});tt.lookAhead=new tt({perNode:!0});tt.mounted=new tt({perNode:!0});class fu{constructor(e,n,i,r=!1){this.tree=e,this.overlay=n,this.parser=i,this.bracketed=r}static get(e){return e&&e.props&&e.props[tt.mounted.id]}}const gK=Object.create(null);class $n{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):gK,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new $n(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(tt.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(tt.group),s=-1;s<(r?r.length:0);s++){let o=n[s<0?i.name:r[s]];if(o)return o}}}}$n.none=new $n("",Object.create(null),0,8);class wc{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(o|Mt.IncludeAnonymous);;){let u=!1;if(l.from<=s&&l.to>=r&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&i&&(a||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Fw($n.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new pt(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new pt($n.none,n,i,r)))}static build(e){return vK(e)}}pt.empty=new pt($n.none,[],[],0);class Dw{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Dw(this.buffer,this.index)}}class ia{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return $n.none}toString(){let e=[];for(let n=0;n0));l=o[l+3]);return a}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function nf(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?a.length:-1;e!=u;e+=n){let c=a[e],h=l[e]+o.from,d;if(!(!(s&Mt.EnterBracketed&&c instanceof pt&&(d=fu.get(c))&&!d.overlay&&d.bracketed&&i>=h&&i<=h+c.length)&&!j4(r,i,h,h+c.length))){if(c instanceof ia){if(s&Mt.ExcludeBuffers)continue;let p=c.findChild(0,c.buffer.length,n,i-h,r);if(p>-1)return new Cs(new mK(o,c,e,h),null,p)}else if(s&Mt.IncludeAnonymous||!c.type.isAnonymous||Vw(c)){let p;if(!(s&Mt.IgnoreMounts)&&(p=fu.get(c))&&!p.overlay)return new li(p.tree,h,e,o);let g=new li(c,h,e,o);return s&Mt.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(n<0?c.children.length-1:0,n,i,r,s)}}}if(s&Mt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,i=0){let r;if(!(i&Mt.IgnoreOverlays)&&(r=fu.get(this._tree))&&r.overlay){let s=e-this.from,o=i&Mt.EnterBracketed&&r.bracketed;for(let{from:a,to:l}of r.overlay)if((n>0||o?a<=s:a=s:l>s))return new li(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function dE(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function Kv(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class mK{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Cs extends Z4{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new Cs(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,i=0){if(i&Mt.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Cs(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Cs(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Cs(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),n.push(0)}return new pt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function X4(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;sn.from||o.to=e){let a=new li(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(nf(a,e,n,!1))}}return r?X4(r):i}class lm{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~Mt.EnterBracketed,e instanceof li)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof li?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&Mt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Mt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Mt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let s=n+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let a=i._tree.children[s];if(this.mode&Mt.IncludeAnonymous||a instanceof ia||!a.type.isAnonymous||Vw(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;n=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return Kv(this._tree,e,r);let o=i[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Vw(t){return t.children.some(e=>e instanceof ia||!e.type.isAnonymous||Vw(e))}function vK(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=B4,reused:s=[],minRepeatType:o=i.types.length}=t,a=Array.isArray(n)?new Dw(n,n.length):n,l=i.types,u=0,c=0;function h(C,x,E,A,I,Z){let{id:U,start:W,end:B,size:ne}=a,j=c,oe=u;if(ne<0)if(a.next(),ne==-1){let De=s[U];E.push(De),A.push(W-C);return}else if(ne==-3){u=U;return}else if(ne==-4){c=U;return}else throw new RangeError(`Unrecognized record size: ${ne}`);let pe=l[U],re,ke,Ee=W-C;if(B-W<=r&&(ke=v(a.pos-x,I))){let De=new Uint16Array(ke.size-ke.skip),Ie=a.pos-ke.size,Ue=De.length;for(;a.pos>Ie;)Ue=S(ke.start,De,Ue);re=new ia(De,B-ke.start,i),Ee=ke.start-C}else{let De=a.pos-ne;a.next();let Ie=[],Ue=[],qe=U>=o?U:-1,Ye=0,Ge=B;for(;a.pos>De;)qe>=0&&a.id==qe&&a.size>=0?(a.end<=Ge-r&&(g(Ie,Ue,W,Ye,a.end,Ge,qe,j,oe),Ye=Ie.length,Ge=a.end),a.next()):Z>2500?d(W,De,Ie,Ue):h(W,De,Ie,Ue,qe,Z+1);if(qe>=0&&Ye>0&&Ye-1&&Ye>0){let he=p(pe,oe);re=Fw(pe,Ie,Ue,0,Ie.length,0,B-W,he,he)}else re=m(pe,Ie,Ue,B-W,j-B,oe)}E.push(re),A.push(Ee)}function d(C,x,E,A){let I=[],Z=0,U=-1;for(;a.pos>x;){let{id:W,start:B,end:ne,size:j}=a;if(j>4)a.next();else{if(U>-1&&B=0;ne-=3)W[j++]=I[ne],W[j++]=I[ne+1]-B,W[j++]=I[ne+2]-B,W[j++]=j;E.push(new ia(W,I[2]-B,i)),A.push(B-C)}}function p(C,x){return(E,A,I)=>{let Z=0,U=E.length-1,W,B;if(U>=0&&(W=E[U])instanceof pt){if(!U&&W.type==C&&W.length==I)return W;(B=W.prop(tt.lookAhead))&&(Z=A[U]+W.length+B)}return m(C,E,A,I,Z,x)}}function g(C,x,E,A,I,Z,U,W,B){let ne=[],j=[];for(;C.length>A;)ne.push(C.pop()),j.push(x.pop()+E-I);C.push(m(i.types[U],ne,j,Z-I,W-Z,B)),x.push(I-E)}function m(C,x,E,A,I,Z,U){if(Z){let W=[tt.contextHash,Z];U=U?[W].concat(U):[W]}if(I>25){let W=[tt.lookAhead,I];U=U?[W].concat(U):[W]}return new pt(C,x,E,A,U)}function v(C,x){let E=a.fork(),A=0,I=0,Z=0,U=E.end-r,W={size:0,start:0,skip:0};e:for(let B=E.pos-C;E.pos>B;){let ne=E.size;if(E.id==x&&ne>=0){W.size=A,W.start=I,W.skip=Z,Z+=4,A+=4,E.next();continue}let j=E.pos-ne;if(ne<0||j=o?4:0,pe=E.start;for(E.next();E.pos>j;){if(E.size<0)if(E.size==-3||E.size==-4)oe+=4;else break e;else E.id>=o&&(oe+=4);E.next()}I=pe,A+=ne,Z+=oe}return(x<0||A==C)&&(W.size=A,W.start=I,W.skip=Z),W.size>4?W:void 0}function S(C,x,E){let{id:A,start:I,end:Z,size:U}=a;if(a.next(),U>=0&&A4){let B=a.pos-(U-4);for(;a.pos>B;)E=S(C,x,E)}x[--E]=W,x[--E]=Z-C,x[--E]=I-C,x[--E]=A}else U==-3?u=A:U==-4&&(c=A);return E}let b=[],w=[];for(;a.pos>0;)h(t.start||0,t.bufferStart||0,b,w,-1,0);let k=(e=t.length)!==null&&e!==void 0?e:b.length?w[0]+b[0].length:0;return new pt(l[t.topID],b.reverse(),w.reverse(),k)}const pE=new WeakMap;function Gp(t,e){if(!t.isAnonymous||e instanceof ia||e.type!=t)return 1;let n=pE.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof pt)){n=1;break}n+=Gp(t,i)}pE.set(e,n)}return n}function Fw(t,e,n,i,r,s,o,a,l){let u=0;for(let g=i;g=c)break;x+=E}if(w==k+1){if(x>c){let E=g[k];p(E.children,E.positions,0,E.children.length,m[k]+b);continue}h.push(g[k])}else{let E=m[w-1]+g[w-1].length-C;h.push(Fw(t,g,m,k,w,C,E,null,l))}d.push(C+b-s)}}return p(e,n,i,r,0),(a||l)(h,d,o)}class z4{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof Cs?this.setBuffer(e.context.buffer,e.index,n):e instanceof li&&this.map.set(e.tree,n)}get(e){return e instanceof Cs?this.getBuffer(e.context.buffer,e.index):e instanceof li?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Js{constructor(e,n,i,r,s=!1,o=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new Js(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,u=0;;a++){let c=a=i)for(;o&&o.from=d.from||h<=d.to||u){let p=Math.max(d.from,l)-u,g=Math.min(d.to,h)-u;d=p>=g?null:new Js(p,g,d.tree,d.offset+u,a>0,!!c)}if(d&&r.push(d),o.to>h)break;o=snew gr(r.from,r.to)):[new gr(0,0)]:[new gr(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}}class bK{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function W4(t){return(e,n,i,r)=>new SK(e,t,n,i,r)}class gE{constructor(e,n,i,r,s,o){this.parser=e,this.parse=n,this.overlay=i,this.bracketed=r,this.target=s,this.from=o}}function mE(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class yK{constructor(e,n,i,r,s,o,a,l){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.bracketed=o,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const Jv=new tt({perNode:!0});class SK{constructor(e,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new pt(i.type,i.children,i.positions,i.length,i.propValues.concat([[Jv,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[tt.mounted.id]=new fu(n,e.overlay,e.parser,e.bracketed),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)a=!1;else if(e.hasNode(r)){if(n){let u=n.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(u)for(let c of u.mount.overlay){let h=c.from+u.pos,d=c.to+u.pos;h>=r.from&&d<=r.to&&!n.ranges.some(p=>p.fromh)&&n.ranges.push({from:h,to:d})}}a=!1}else if(i&&(o=wK(i.ranges,r.from,r.to)))a=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.fromnew gr(h.from-r.from,h.to-r.from)):null,!!s.bracketed,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):a=!1}}else if(n&&(l=n.predicate(r))&&(l===!0&&(l=new gr(r.from,r.to)),l.from=0&&n.ranges[u].to==l.from?n.ranges[u]={from:n.ranges[u].from,to:l.to}:n.ranges.push(l)}if(a&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let u=vE(this.ranges,n.ranges);u.length&&(mE(u),this.inner.splice(n.index,0,new gE(n.parser,n.parser.startParse(this.input,bE(n.mounts,u),u),n.ranges.map(c=>new gr(c.from-n.start,c.to-n.start)),n.bracketed,n.target,u[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function wK(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function OE(t,e,n,i,r,s){if(e=e&&n.enter(i,1,Mt.IgnoreOverlays|Mt.ExcludeBuffers)))if(n.to<=e)n.next(!1)||(this.done=!0);else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof pt)n=n.children[0];else break}return!1}}let _K=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(Jv))!==null&&n!==void 0?n:i.to,this.inner=new xE(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(Jv))!==null&&e!==void 0?e:n.to,this.inner=new xE(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(tt.mounted);if(o&&o.parser==n)for(let a=this.fragI;a=s.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:s.from-l.offset,mount:o})}}}return r}};function vE(t,e){let n=null,i=e;for(let r=1,s=0;r=a)break;l.to<=o||(n||(i=n=e.slice()),l.froma&&n.splice(s+1,0,new gr(a,l.to))):l.to>a?n[s--]=new gr(a,l.to):n.splice(s--,1))}}return i}function kK(t,e,n,i){let r=0,s=0,o=!1,a=!1,l=-1e9,u=[];for(;;){let c=r==t.length?1e9:o?t[r].to:t[r].from,h=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(l,n),p=Math.min(c,h,i);dnew gr(d.from+i,d.to+i)),h=kK(e,c,l,u);for(let d=0,p=l;;d++){let g=d==h.length,m=g?u:h[d].from;if(m>p&&n.push(new Js(p,m,r.tree,-o,s.from>=p||s.openStart,s.to<=m||s.openEnd)),g)break;p=h[d].to}}else n.push(new Js(l,u,r.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}let eb=[],U4=[];(()=>{let t="lc,34,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3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=U4[i])e=i+1;else return!0;if(e==n)return!1}}function yE(t){return t>=127462&&t<=127487}const SE=8205;function TK(t,e,n=!0,i=!0){return(n?q4:AK)(t,e,i)}function q4(t,e,n){if(e==t.length)return e;e&&H4(t.charCodeAt(e))&&Y4(t.charCodeAt(e-1))&&e--;let i=F1(t,e);for(e+=wE(i);e=0&&yE(F1(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function AK(t,e,n){for(;e>1;){let i=q4(t,e-2,n);if(i=56320&&t<57344}function Y4(t){return t>=55296&&t<56320}function wE(t){return t<65536?1:2}let Tt=class G4{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=Vu(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Os.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Vu(this,e,n);let i=[];return this.decompose(e,n,i,0),Os.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Sh(this),s=new Sh(e);for(let o=n,a=n;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new Sh(this,e)}iterRange(e,n=this.length){return new K4(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new J4(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?G4.empty:e.length<=32?new _n(e):Os.from(_n.split(e,[]))}};class _n extends Tt{constructor(e,n=PK(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.text[s],a=r+o.length;if((n?i:a)>=e)return new IK(r,a,i,o);r=a+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new _n(CE(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),a=Kp(s.text,o.text.slice(),0,s.length);if(a.length<=32)i.push(new _n(a,o.length+s.length));else{let l=a.length>>1;i.push(new _n(a.slice(0,l)),new _n(a.slice(l)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof _n))return super.replace(e,n,i);[e,n]=Vu(this,e,n);let r=Kp(this.text,Kp(i.text,CE(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new _n(r,s):Os.from(_n.split(r,[]),s)}sliceString(e,n=this.length,i=` +`){[e,n]=Vu(this,e,n);let r="";for(let s=0,o=0;s<=n&&oe&&o&&(r+=i),es&&(r+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new _n(i,r)),i=[],r=-1);return r>-1&&n.push(new _n(i,r)),n}}class Os extends Tt{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.children[s],a=r+o.length,l=i+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,i,r);r=a+1,i=l+1}}decompose(e,n,i,r){for(let s=0,o=0;o<=n&&s=o){let u=r&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!u?i.push(a):a.decompose(e-o,n-o,i,u)}o=l+1}}replace(e,n,i){if([e,n]=Vu(this,e,n),i.lines=s&&n<=a){let l=o.replace(e-s,n-s,i),u=this.lines-o.lines+l.lines;if(l.lines>4&&l.lines>u>>6){let c=this.children.slice();return c[r]=l,new Os(c,this.length-(n-e)+i.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` +`){[e,n]=Vu(this,e,n);let r="";for(let s=0,o=0;se&&s&&(r+=i),eo&&(r+=a.sliceString(e-o,n-o,i)),o=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Os))return 0;let i=0,[r,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==o||s==a)return i;let l=this.children[r],u=e.children[s];if(l!=u)return i+l.scanIdentical(u,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let g of e)g.flatten(p);return new _n(p,n)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,a=[],l=0,u=-1,c=[];function h(p){let g;if(p.lines>s&&p instanceof Os)for(let m of p.children)h(m);else p.lines>o&&(l>o||!l)?(d(),a.push(p)):p instanceof _n&&l&&(g=c[c.length-1])instanceof _n&&p.lines+g.lines<=32?(l+=p.lines,u+=p.length+1,c[c.length-1]=new _n(g.text.concat(p.text),g.length+1+p.length)):(l+p.lines>r&&d(),l+=p.lines,u+=p.length+1,c.push(p))}function d(){l!=0&&(a.push(c.length==1?c[0]:Os.from(c,u)),u=-1,l=c.length=0)}for(let p of e)h(p);return d(),a.length==1?a[0]:new Os(a,n)}}Tt.empty=new _n([""],0);function PK(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Kp(t,e,n=0,i=1e9){for(let r=0,s=0,o=!0;s=n&&(l>i&&(a=a.slice(0,i-r)),r0?1:(e instanceof _n?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,a=r instanceof _n?r.text.length:r.children.length;if(o==(n>0?a:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(r instanceof _n){let l=r.text[o+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof _n?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class K4{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new Sh(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class J4{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Tt.prototype[Symbol.iterator]=function(){return this.iter()},Sh.prototype[Symbol.iterator]=K4.prototype[Symbol.iterator]=J4.prototype[Symbol.iterator]=function(){return this});let IK=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function Vu(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function zn(t,e,n=!0,i=!0){return TK(t,e,n,i)}function $K(t){return t>=56320&&t<57344}function RK(t){return t>=55296&&t<56320}function Ti(t,e){let n=t.charCodeAt(e);if(!RK(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return $K(i)?(n-55296<<10)+(i-56320)+65536:n}function Bw(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function xs(t){return t<65536?1:2}const tb=/\r\n?|\n/;var Gn=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(Gn||(Gn={}));class Ts{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return s+(e-r);s+=a}else{if(i!=Gn.Simple&&u>=e&&(i==Gn.TrackDel&&re||i==Gn.TrackBefore&&re))return null;if(u>e||u==e&&n<0&&!a)return e==r||n<0?s:s+l;s+=l}r=u}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&a>=e)return rn?"cover":!0;r=a}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ts(e)}static create(e){return new Ts(e)}}class Tn extends Ts{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return nb(this,(n,i,r,s,o)=>e=e.replace(r,r+(i-n),o),!1),e}mapDesc(e,n=!1){return ib(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r=0){n[r]=a,n[r+1]=o;let l=r>>1;for(;i.length0&&Vo(i,n,s.text),s.forward(c),a+=c}let u=e[o++];for(;a>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],o=0,a=null;function l(c=!1){if(!c&&!r.length)return;od||h<0||d>n)throw new RangeError(`Invalid change range ${h} to ${d} (in doc of length ${n})`);let g=p?typeof p=="string"?Tt.of(p.split(i||tb)):p:Tt.empty,m=g.length;if(h==d&&m==0)return;ho&&ri(r,h-o,-1),ri(r,d-h,m),Vo(s,r,g),o=d}}return u(e),l(!a),a}static empty(e){return new Tn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;ra&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Vo(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(r,u,s,c,h),r=u,s=c}}}function ib(t,e,n,i=!1){let r=[],s=i?[]:null,o=new rf(t),a=new rf(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let u=Math.min(o.len,a.len);ri(r,u,-1),o.forward(u),a.forward(u)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len=0&&l=0){let u=0,c=o.len;for(;c;)if(a.ins==-1){let h=Math.min(c,a.len);u+=h,c-=h,a.forward(h)}else if(a.ins==0&&a.lenl||o.ins>=0&&o.len>l)&&(a||i.length>u),s.forward2(l),o.forward(l)}}}}class rf{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Tt.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Tt.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class $o{constructor(e,n,i,r){this.from=e,this.to=n,this.flags=i,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new $o(i,r,this.flags,this.goalColumn)}extend(e,n=e,i=0){if(e<=this.anchor&&n>=this.anchor)return ae.range(e,n,void 0,void 0,i);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ae.range(this.anchor,r,void 0,void 0,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ae.range(e.anchor,e.head)}static create(e,n,i,r){return new $o(e,n,i,r)}}class ae{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ae.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ae(e.ranges.map(n=>$o.fromJSON(n)),e.main)}static single(e,n=e){return new ae([ae.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;rr.from-s.from),n=e.indexOf(i);for(let r=1;rs.head?ae.range(l,a):ae.range(a,l))}}return new ae(e,n)}}function tR(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let jw=0;class Me{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=jw++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Me(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:Zw),!!e.static,e.enables)}of(e){return new Jp([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Jp(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Jp(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function Zw(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class Jp{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=jw++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,u=!1,c=[];for(let h of this.dependencies)h=="doc"?l=!0:h=="selection"?u=!0:(((n=e[h.id])!==null&&n!==void 0?n:1)&1)==0&&c.push(e[h.id]);return{create(h){return h.values[o]=i(h),1},update(h,d){if(l&&d.docChanged||u&&(d.docChanged||d.selection)||rb(h,c)){let p=i(h);if(a?!_E(p,h.values[o],r):!r(p,h.values[o]))return h.values[o]=p,1}return 0},reconfigure:(h,d)=>{let p,g=d.config.address[s];if(g!=null){let m=cm(d,g);if(this.dependencies.every(v=>v instanceof Me?d.facet(v)===h.facet(v):v instanceof Rn?d.field(v,!1)==h.field(v,!1):!0)||(a?_E(p=i(h),m,r):r(p=i(h),m)))return h.values[o]=m,0}else p=i(h);return h.values[o]=p,1}}}}function _E(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[l.id]),r=n.map(l=>l.type),s=i.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let u=[];for(let c=0;ci===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(lp).find(i=>i.field==this);return(n?.create||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[n]=o,1)},reconfigure:(i,r)=>{let s=i.facet(lp),o=r.facet(lp),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(i.values[n]=a.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,lp.of({field:this,create:e})]}get extension(){return this}}const Pa={lowest:4,low:3,default:2,high:1,highest:0};function Zc(t){return e=>new nR(e,t)}const ns={highest:Zc(Pa.highest),high:Zc(Pa.high),default:Zc(Pa.default),low:Zc(Pa.low),lowest:Zc(Pa.lowest)};class nR{constructor(e,n){this.inner=e,this.prec=n}}class Cc{of(e){return new sb(this,e)}reconfigure(e){return Cc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class sb{constructor(e,n){this.compartment=e,this.inner=n}}class um{constructor(e,n,i,r,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],s=Object.create(null),o=new Map;for(let d of NK(e,n,o))d instanceof Rn?r.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],u=[];for(let d of r)a[d.id]=u.length<<1,u.push(p=>d.slot(p));let c=i?.config.facets;for(let d in s){let p=s[d],g=p[0].facet,m=c&&c[d]||[];if(p.every(v=>v.type==0))if(a[g.id]=l.length<<1|1,Zw(m,p))l.push(i.facet(g));else{let v=g.combine(p.map(S=>S.value));l.push(i&&g.compare(v,i.facet(g))?i.facet(g):v)}else{for(let v of p)v.type==0?(a[v.id]=l.length<<1|1,l.push(v.value)):(a[v.id]=u.length<<1,u.push(S=>v.dynamicSlot(S)));a[g.id]=u.length<<1,u.push(v=>LK(v,g,p))}}let h=u.map(d=>d(a));return new um(e,o,h,a,l,s)}}function NK(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(o,a){let l=r.get(o);if(l!=null){if(l<=a)return;let u=i[l].indexOf(o);u>-1&&i[l].splice(u,1),o instanceof sb&&n.delete(o.compartment)}if(r.set(o,a),Array.isArray(o))for(let u of o)s(u,a);else if(o instanceof sb){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;n.set(o.compartment,u),s(u,a)}else if(o instanceof nR)s(o.inner,o.prec);else if(o instanceof Rn)i[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof Jp)i[a].push(o),o.facet.extensions&&s(o.facet.extensions,Pa.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,a)}}return s(t,Pa.default),i.reduce((o,a)=>o.concat(a))}function wh(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function cm(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const iR=Me.define(),ob=Me.define({combine:t=>t.some(e=>e),static:!0}),rR=Me.define({combine:t=>t.length?t[0]:void 0,static:!0}),sR=Me.define(),oR=Me.define(),aR=Me.define(),lR=Me.define({combine:t=>t.length?t[0]:!1});class So{constructor(e,n){this.type=e,this.value=n}static define(){return new MK}}class MK{of(e){return new So(this,e)}}class QK{constructor(e){this.map=e}of(e){return new Je(this,e)}}class Je{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Je(this.type,n)}is(e){return this.type==e}static define(e={}){return new QK(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}Je.reconfigure=Je.define();Je.appendConfig=Je.define();class Pn{constructor(e,n,i,r,s,o){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&tR(i,n.newLength),s.some(a=>a.type==Pn.time)||(this.annotations=s.concat(Pn.time.of(Date.now())))}static create(e,n,i,r,s,o){return new Pn(e,n,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Pn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Pn.time=So.define();Pn.userEvent=So.define();Pn.addToHistory=So.define();Pn.remote=So.define();function DK(t,e){let n=[];for(let i=0,r=0;;){let s,o;if(i=t[i]))s=t[i++],o=t[i++];else if(r=0;r--){let s=i[r](t);s instanceof Pn?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Pn?t=s[0]:t=cR(e,du(s),!1)}return t}function FK(t){let e=t.startState,n=e.facet(aR),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=uR(i,ab(e,s,t.changes.newLength),!0))}return i==t?t:Pn.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const BK=[];function du(t){return t==null?BK:Array.isArray(t)?t:[t]}var pn=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(pn||(pn={}));const jK=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let lb;try{lb=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function ZK(t){if(lb)return lb.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||jK.test(n)))return!0}return!1}function XK(t){return e=>{if(!/\S/.test(e))return pn.Space;if(ZK(e))return pn.Word;for(let n=0;n-1)return pn.Word;return pn.Other}}class ct{constructor(e,n,i,r,s,o){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;ar.set(u,l)),n=null),r.set(a.value.compartment,a.value.extension)):a.is(Je.reconfigure)?(n=null,i=a.value):a.is(Je.appendConfig)&&(n=null,i=du(i).concat(a.value));let s;n?s=e.startState.values.slice():(n=um.resolve(i,r,this),s=new ct(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let o=e.startState.facet(ob)?e.newSelection:e.newSelection.asSingle();new ct(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:ae.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],o=du(i.effects);for(let a=1;ao.spec.fromJSON(a,l)))}}return ct.create({doc:e.doc,selection:ae.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=um.resolve(e.extensions||[],new Map),i=e.doc instanceof Tt?e.doc:Tt.of((e.doc||"").split(n.staticFacet(ct.lineSeparator)||tb)),r=e.selection?e.selection instanceof ae?e.selection:ae.single(e.selection.anchor,e.selection.head):ae.single(0);return tR(r,i.length),n.staticFacet(ob)||(r=r.asSingle()),new ct(n,i,r,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(ct.tabSize)}get lineBreak(){return this.facet(ct.lineSeparator)||` +`}get readOnly(){return this.facet(lR)}phrase(e,...n){for(let i of this.facet(ct.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(iR))for(let o of s(this,n,i))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return XK(n.length?n[0]:"")}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-i,a=e-i;for(;o>0;){let l=zn(n,o,!1);if(s(n.slice(l,o))!=pn.Word)break;o=l}for(;at.length?t[0]:4});ct.lineSeparator=rR;ct.readOnly=lR;ct.phrases=Me.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});ct.languageData=iR;ct.changeFilter=sR;ct.transactionFilter=oR;ct.transactionExtender=aR;Cc.reconfigure=Je.define();function Ns(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let o=r[s],a=i[s];if(a===void 0)i[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class ra{eq(e){return this==e}range(e,n=e){return ub.create(e,n,this)}}ra.prototype.startSide=ra.prototype.endSide=0;ra.prototype.point=!1;ra.prototype.mapMode=Gn.TrackDel;function Xw(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let ub=class hR{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new hR(e,n,i)}};function cb(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}let zK=class fR{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let o=r,a=s.length;;){if(o==a)return o;let l=o+a>>1,u=s[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return u>=0?o:a;u>=0?a=l:o=l+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(i,1e9,!1,s);sp||d==p&&u.startSide>0&&u.endSide<=0)continue;(p-d||u.endSide-u.startSide)<0||(o<0&&(o=d),u.point&&(a=Math.max(a,p-d)),i.push(u),r.push(d-o),s.push(p-o))}return{mapped:i.length?new fR(r,s,i,a):null,pos:o}}};class dt{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new dt(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(i&&(n=n.slice().sort(cb)),this.isEmpty)return n.length?dt.of(n):this;let a=new dR(this,null,-1).goto(0),l=0,u=[],c=new Vi;for(;a.value||l=0){let h=n[l++];c.addInner(h.from,h.to,h.value)||u.push(h)}else a.rangeIndex==1&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||sa.to||s=s&&e<=s+o.length&&o.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return sf.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return sf.from(e).goto(n)}static compare(e,n,i,r,s=-1){let o=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),a=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),l=kE(o,a,i),u=new Xc(o,l,s),c=new Xc(a,l,s);i.iterGaps((h,d,p)=>EE(u,h,c,d,p,r)),i.empty&&i.length==0&&EE(u,0,c,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),o=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=kE(s,o),l=new Xc(s,a,0).goto(i),u=new Xc(o,a,0).goto(i);for(;;){if(l.to!=u.to||!hb(l.active,u.active)||l.point&&(!u.point||!Xw(l.point,u.point)))return!1;if(l.to>r)return!0;l.next(),u.next()}}static spans(e,n,i,r,s=-1){let o=new Xc(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let u=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),h=o.pointFroma&&(r.span(a,u,o.active,l),l=o.openEnd(u));if(o.to>i)return l+(o.point&&o.to>i?1:0);a=o.to,o.next()}}static of(e,n=!1){let i=new Vi;for(let r of e instanceof ub?[e]:n?WK(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return dt.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=dt.empty;r=r.nextLayer)n=new dt(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}dt.empty=new dt([],[],null,-1);function WK(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(cb);e=i}return t}dt.empty.nextLayer=dt.empty;class Vi{finishChunk(e){this.chunks.push(new zK(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new Vi)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(dt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=dt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function kE(t,e,n){let i=new Map;for(let s of t)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new dR(o,n,i,s));return r.length==1?r[0]:new sf(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)B1(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)B1(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),B1(this.heap,0)}}}function B1(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Xc{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=sf.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){up(this.active,e),up(this.activeTo,e),up(this.activeRank,e),this.minActive=TE(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n0;)n++;cp(this.active,n,i),cp(this.activeTo,n,r),cp(this.activeRank,n,s),e&&cp(e,n,this.cursor.from),this.minActive=TE(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&up(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function EE(t,e,n,i,r,s){t.goto(e),n.goto(i);let o=i+r,a=i,l=i-e,u=!!s.boundChange;for(let c=!1;;){let h=t.to+l-n.to,d=h||t.endSide-n.endSide,p=d<0?t.to+l:n.to,g=Math.min(p,o);if(t.point||n.point?(t.point&&n.point&&Xw(t.point,n.point)&&hb(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,g,t.point,n.point),c=!1):(c&&s.boundChange(a),g>a&&!hb(t.active,n.active)&&s.compareRange(a,g,t.active,n.active),u&&go)break;a=p,d<=0&&t.next(),d>=0&&n.next()}}function hb(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function TE(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=zn(t,r)}return i===!0?-1:t.length}const db="ͼ",AE=typeof Symbol>"u"?"__"+db:Symbol.for(db),pb=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),PE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class co{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,u){let c=[],h=/^@(\w+)\b/.exec(o[0]),d=h&&h[1]=="keyframes";if(h&&a==null)return l.push(o[0]+";");for(let p in a){let g=a[p];if(/&/.test(p))s(p.split(/,\s*/).map(m=>o.map(v=>m.replace(/&/,v))).reduce((m,v)=>m.concat(v)),g,l);else if(g&&typeof g=="object"){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(r(p),g,c,d)}else g!=null&&c.push(p.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+g+";")}(c.length||d)&&l.push((i&&!h&&!u?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)s(r(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=PE[AE]||1;return PE[AE]=e+1,db+e.toString(36)}static mount(e,n,i){let r=e[pb],s=i&&i.nonce;r?s&&r.setNonce(s):r=new UK(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let IE=new Map;class UK{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=IE.get(i);if(s)return e[pb]=s;this.sheet=new r.CSSStyleSheet,IE.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[pb]=this}mount(e,n){let i=this.sheet,r=0,s=0;for(let o=0;o-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),i)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},qK=typeof navigator<"u"&&/Mac/.test(navigator.platform),HK=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Yn=0;Yn<10;Yn++)sa[48+Yn]=sa[96+Yn]=String(Yn);for(var Yn=1;Yn<=24;Yn++)sa[Yn+111]="F"+Yn;for(var Yn=65;Yn<=90;Yn++)sa[Yn]=String.fromCharCode(Yn+32),of[Yn]=String.fromCharCode(Yn);for(var j1 in sa)of.hasOwnProperty(j1)||(of[j1]=sa[j1]);function YK(t){var e=qK&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||HK&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?of:sa)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function jt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;e2);var Qe={mac:LE||/Mac/.test(pi.platform),windows:/Win/.test(pi.platform),linux:/Linux|X11/.test(pi.platform),ie:gO,ie_version:gR?gb.documentMode||6:Ob?+Ob[1]:mb?+mb[1]:0,gecko:$E,gecko_version:$E?+(/Firefox\/(\d+)/.exec(pi.userAgent)||[0,0])[1]:0,chrome:!!Z1,chrome_version:Z1?+Z1[1]:0,ios:LE,android:/Android\b/.test(pi.userAgent),webkit:RE,webkit_version:RE?+(/\bAppleWebKit\/(\d+)/.exec(pi.userAgent)||[0,0])[1]:0,safari:xb,safari_version:xb?+(/\bVersion\/(\d+(\.\d+)?)/.exec(pi.userAgent)||[0,0])[1]:0,tabSize:gb.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function zw(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const hm=Object.create(null);function Ww(t,e,n){if(t==e)return!0;t||(t=hm),e||(e=hm);let i=Object.keys(t),r=Object.keys(e);if(i.length-0!=r.length-0)return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function GK(t,e){for(let n=t.attributes.length-1;n>=0;n--){let i=t.attributes[n].name;e[i]==null&&t.removeAttribute(i)}for(let n in e){let i=e[n];n=="style"?t.style.cssText=i:t.getAttribute(n)!=i&&t.setAttribute(n,i)}}function NE(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function KK(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new sl(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:o}=mR(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(o?n?2e8:1:-6e8)+1}return new sl(e,i,r,n,e.widget||null,!0)}static line(e){return new yd(e)}static set(e,n=!1){return dt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}je.none=dt.empty;class bd extends je{constructor(e){let{start:n,end:i}=mR(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?zw(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||hm}eq(e){return this==e||e instanceof bd&&this.tagName==e.tagName&&Ww(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}bd.prototype.point=!1;class yd extends je{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof yd&&this.spec.class==e.spec.class&&Ww(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}yd.prototype.mapMode=Gn.TrackBefore;yd.prototype.point=!0;class sl extends je{constructor(e,n,i,r,s,o){super(n,i,s,e),this.block=r,this.isReplace=o,this.mapMode=r?n<=0?Gn.TrackBefore:Gn.TrackAfter:Gn.TrackDel}get type(){return this.startSide!=this.endSide?Jn.WidgetRange:this.startSide<=0?Jn.WidgetBefore:Jn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof sl&&JK(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}sl.prototype.point=!0;function mR(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function JK(t,e){return t==e||!!(t&&e&&t.compare(e))}function pu(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class af extends ra{constructor(e,n,i){super(),this.tagName=e,this.attributes=n,this.rank=i}eq(e){return e==this||e instanceof af&&this.tagName==e.tagName&&Ww(this.attributes,e.attributes)}static create(e){return new af(e.tagName,e.attributes||hm,e.rank==null?50:Math.max(0,Math.min(e.rank,100)))}static set(e,n=!1){return dt.of(e,n)}}af.prototype.startSide=af.prototype.endSide=-1;function lf(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function vb(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function Ch(t,e){if(!e.anchorNode)return!1;try{return vb(t,e.anchorNode)}catch{return!1}}function eg(t){return t.nodeType==3?uf(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function _h(t,e,n,i){return n?ME(t,e,n,i,-1)||ME(t,e,n,i,1):!1}function oa(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function fm(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function ME(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:ho(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=oa(t)+(r<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?ho(t):0}else return!1}}function ho(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function dm(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function eJ(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function OR(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function tJ(t,e,n,i,r,s,o,a){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,h=!1;c&&!h;)if(c.nodeType==1){let d,p=c==l.body,g=1,m=1;if(p)d=eJ(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let b=c.getBoundingClientRect();({scaleX:g,scaleY:m}=OR(c,b)),d={left:b.left,right:b.left+c.clientWidth*g,top:b.top,bottom:b.top+c.clientHeight*m}}let v=0,S=0;if(r=="nearest")e.top0&&e.bottom>d.bottom+S&&(S=e.bottom-d.bottom+o)):e.bottom>d.bottom-o&&(S=e.bottom-d.bottom+o,n<0&&e.top-S0&&e.right>d.right+v&&(v=e.right-d.right+s)):e.right>d.right-s&&(v=e.right-d.right+s,n<0&&e.leftd.bottom||e.leftd.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function xR(t,e=!0){let n=t.ownerDocument,i=null,r=null;for(let s=t.parentNode;s&&!(s==n.body||(!e||i)&&r);)if(s.nodeType==1)!r&&s.scrollHeight>s.clientHeight&&(r=s),e&&!i&&s.scrollWidth>s.clientWidth&&(i=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:i,y:r}}class nJ{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?ho(n):0),i,Math.min(e.focusOffset,i?ho(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let Ta=null;Qe.safari&&Qe.safari_version>=26&&(Ta=!1);function vR(t){if(t.setActive)return t.setActive();if(Ta)return t.focus(Ta);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Ta==null?{get preventScroll(){return Ta={preventScroll:!0},!0}}:void 0),!Ta){Ta=!1;for(let n=0;nMath.max(0,t.document.documentElement.scrollHeight-t.innerHeight-4):t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function yR(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=ho(n)}else if(n.parentNode&&!fm(n))i=oa(n),n=n.parentNode;else return null}}function SR(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i=n){if(a.level==i)return o;(s<0||(r!=0?r<0?a.fromn:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function _R(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;m-=3)if(as[m+1]==-p){let v=as[m+2],S=v&2?r:v&4?v&1?s:r:0;S&&(Ht[h]=Ht[as[m]]=S),a=m;break}}else{if(as.length==189)break;as[a++]=h,as[a++]=d,as[a++]=l}else if((g=Ht[h])==2||g==1){let m=g==r;l=m?0:1;for(let v=a-3;v>=0;v-=3){let S=as[v+2];if(S&2)break;if(m)as[v+2]|=2;else{if(S&4)break;as[v+2]|=4}}}}}function cJ(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let o=r?n[r-1].to:t,a=rl;)g==v&&(g=n[--m].from,v=m?n[m-1].to:t),Ht[--g]=p;l=c}else s=u,l++}}}function yb(t,e,n,i,r,s,o){let a=i%2?2:1;if(i%2==r%2)for(let l=e,u=0;ll&&o.push(new _s(l,m.from,p));let v=m.direction==ol!=!(p%2);Sb(t,v?i+1:i,r,m.inner,m.from,m.to,o),l=m.to}g=m.to}else{if(g==n||(c?Ht[g]!=a:Ht[g]==a))break;g++}d?yb(t,l,g,i+1,r,d,o):le;){let c=!0,h=!1;if(!u||l>s[u-1].to){let m=Ht[l-1];m!=a&&(c=!1,h=m==16)}let d=!c&&a==1?[]:null,p=c?i:i+1,g=l;e:for(;;)if(u&&g==s[u-1].to){if(h)break e;let m=s[--u];if(!c)for(let v=m.from,S=u;;){if(v==e)break e;if(S&&s[S-1].to==v)v=s[--S].from;else{if(Ht[v-1]==a)break e;break}}if(d)d.push(m);else{m.toHt.length;)Ht[Ht.length]=256;let i=[],r=e==ol?0:1;return Sb(t,r,r,n,0,t.length,i),i}function kR(t){return[new _s(0,t,0)]}let ER="";function fJ(t,e,n,i,r){var s;let o=i.head-t.from,a=_s.find(e,o,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),l=e[a],u=l.side(r,n);if(o==u){let d=a+=r?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],o=l.side(!r,n),u=l.side(r,n)}let c=zn(t.text,o,l.forward(r,n));(cl.to)&&(c=u),ER=t.text.slice(Math.min(o,c),Math.max(o,c));let h=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return h&&c==u&&h.level+(r?0:1)t.some(e=>e)}),NR=Me.define({combine:t=>t.some(e=>e)}),MR=Me.define();class mu{constructor(e,n,i,r,s,o=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new mu(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new mu(ae.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const hp=Je.define({map:(t,e)=>t.map(e)}),QR=Je.define();function $i(t,e,n){let i=t.facet(IR);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Us=Me.define({combine:t=>t.length?t[0]:!0});let pJ=0;const Gl=Me.define({combine(t){return t.filter((e,n)=>{for(let i=0;i{let l=[];return o&&l.push(mO.of(u=>{let c=u.plugin(a);return c?o(c):je.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return yn.define((i,r)=>new e(i,r),n)}}class X1{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if($i(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){$i(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){$i(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const DR=Me.define(),Yw=Me.define(),mO=Me.define(),VR=Me.define(),Gw=Me.define(),Sd=Me.define(),FR=Me.define();function DE(t,e){let n=t.state.facet(FR);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return dt.spans(i,e.from,e.to,{point(){},span(s,o,a,l){let u=s-e.from,c=o-e.from,h=r;for(let d=a.length-1;d>=0;d--,l--){let p=a[d].spec.bidiIsolate,g;if(p==null&&(p=dJ(e.text,u,c)),l>0&&h.length&&(g=h[h.length-1]).to==u&&g.direction==p)g.to=c,h=g.inner;else{let m={from:u,to:c,direction:p,inner:[]};h.push(m),h=m.inner}}}}),r}const BR=Me.define();function Kw(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet(BR)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(r=Math.max(r,o.bottom)))}return{left:e,right:n,top:i,bottom:r}}const th=Me.define();class mr{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new mr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAr.push(new mr(s,o,a,l))),this.changedRanges=r}static create(e,n,i){return new pm(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const gJ=[];class bn{constructor(e,n,i=0){this.dom=e,this.length=n,this.flags=i,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return gJ}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&GK(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let i=n;for(let r of this.children){if(r==e)return i;i+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let i=oa(this.dom),r=this.length?e>0:n>0;return new Vr(this.parent.dom,i+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof xO)return e;return null}static get(e){return e.cmTile}}class OO extends bn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,i=null,r,s=e?.node==n?e:null,o=0;for(let a of this.children){if(a.sync(e),o+=a.length+a.breakAfter,r=i?i.nextSibling:n.firstChild,s&&r!=a.dom&&(s.written=!0),a.dom.parentNode==n)for(;r&&r!=a.dom;)r=VE(r);else n.insertBefore(a.dom,r);i=a.dom}for(r=i?i.nextSibling:n.firstChild,s&&r&&(s.written=!0);r;)r=VE(r);this.length=o}}function VE(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class xO extends OO{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=bn.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],i=this,r=0,s=0;;)if(r==i.children.length){if(!n.length)return;i=i.parent,i.breakAfter&&s++,r=n.pop()}else{let o=i.children[r++];if(o instanceof eo)n.push(r),i=o,r=0;else{let a=s+o.length,l=e(o,s);if(l!==void 0)return l;s=a+o.breakAfter}}}resolveBlock(e,n){let i,r=-1,s,o=-1;if(this.blockTiles((a,l)=>{let u=l+a.length;if(e>=l&&e<=u){if(a.isWidget()&&n>=-1&&n<=1){if(a.flags&32)return!0;a.flags&16&&(i=void 0)}(le||e==l&&(n>1?a.length:a.covers(-1)))&&(!s||!a.isWidget()&&s.isWidget())&&(s=a,o=e-l)}}),!i&&!s)throw new Error("No tile at position "+e);return i&&n<0||!s?{tile:i,offset:r}:{tile:s,offset:o}}}class eo extends OO{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let i=new eo(n||document.createElement(e.tagName),e);return n||(i.flags|=4),i}}class Fu extends OO{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,i){let r=new Fu(n||document.createElement("div"),e);return(!n||!i)&&(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,n,i){let r=null,s=-1,o=null,a=-1;function l(c,h){for(let d=0,p=0;d=h&&(g.isComposite()?l(g,h-p):(!o||o.isHidden&&(n>0||i&&OJ(o,g)))&&(m>h||g.flags&32)?(o=g,a=h-p):(pi&&(e=i);let r=e,s=e,o=0;e==0&&n<0||e==i&&n>=0?Qe.chrome||Qe.gecko||(e?(r--,o=1):s=0)?0:a.length-1];return Qe.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,u=>u.width)||l),o?dm(l,o<0):l||null}static of(e,n){let i=new La(n||document.createTextNode(e),e);return n||(i.flags|=2),i}}class al extends bn{constructor(e,n,i,r){super(e,n,r),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,i){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;if(i)return dm(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let a=this.flags&16?!0:this.flags&32?!1:e>0;for(let l=a?s.length-1:0;o=s[l],!(e>0?l==0:l==s.length-1||o.top0;)if(r.isComposite())if(o){if(!e)break;i&&i.break(),e--,o=!1}else if(s==r.children.length){if(!e&&!a.length)break;i&&i.leave(r),o=!!r.breakAfter,{tile:r,index:s}=a.pop(),s++}else{let l=r.children[s],u=l.breakAfter;(n>0?l.length<=e:l.length=0;a--){let l=n.marks[a],u=r.lastChild;if(u instanceof Pi&&u.mark.eq(l.mark))u.dom!=l.dom&&u.setDOM(z1(l.dom)),r=u;else{if(this.cache.reused.get(l)){let h=bn.get(l.dom);h&&h.setDOM(z1(l.dom))}let c=Pi.of(l.mark,l.dom);r.append(c),r=c}this.cache.reused.set(l,2)}let s=bn.get(e.text);s&&this.cache.reused.set(s,2);let o=new La(e.text,e.text.nodeValue);o.flags|=8,this.pos=e.range.toB,r.append(o)}addInlineWidget(e,n,i){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let s=this.ensureMarks(n,i);!r&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,i){this.flushBuffer(),this.ensureMarks(n,i).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var i;e||(e=jR);let r=Fu.start(e,n||((i=this.cache.find(Fu))===null||i===void 0?void 0:i.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var i;let r=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],a;if(n>0&&(a=r.lastChild)&&a instanceof Pi&&a.mark.eq(o))r=a,n--;else{let l=Pi.of(o,(i=this.cache.find(Pi,u=>u.mark.eq(o)))===null||i===void 0?void 0:i.dom);r.append(l),r=l,n=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!FE(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(Qe.ios&&FE(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(W1,0,32)||new al(W1.toDOM(),0,W1,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to=this.pos){let n=e.rank*102+e.value.rank,i=new vJ(e.from,e.to,e.value,n),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-i.rank||this.wrappers[r-1].to-i.to)<0;)r--;this.wrappers.splice(r,0,i)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let i of this.wrappers){let r=n.lastChild;if(i.fromo.wrapper.eq(i.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),i=this.cache.find(gm,void 0,1);return i&&(i.flags=n),i||new gm(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class yJ{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=r;let a=this.textOff=Math.min(e,r.length);return s?null:r.slice(0,a)}let n=Math.min(this.text.length,this.textOff+e),i=this.text.slice(this.textOff,n);return this.textOff=n,i}}const mm=[al,Fu,La,Pi,gm,eo,xO];for(let t=0;t[]),this.index=mm.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,i=this.buckets[n];i.length<6?i.push(e):i[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,i=2){let r=e.bucket,s=this.buckets[r],o=this.index[r];for(let a=s.length-1;a>=0;a--){let l=(a+o)%s.length,u=s[l];if((!n||n(u))&&!this.reused.has(u))return s.splice(l,1),l{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,n){let i=n&&this.getCompositionContext(n.text);for(let r=0,s=0,o=0;;){let a=or){let u=l-r;this.preserve(u,!o,!a),r=l,s+=u}if(!a)break;n&&a.fromA<=n.range.fromA&&a.toA>=n.range.toA?(this.forward(a.fromA,n.range.fromA,n.range.fromA{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(l-a);else{let u=l>0||a{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof Pi&&r.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?r.length&&(r.length=s=0):o instanceof Pi&&(r.shift(),s=Math.min(s,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let i=null,r=this.builder,s=0,o=dt.spans(this.decorations,e,n,{point:(a,l,u,c,h,d)=>{if(u instanceof sl){if(this.disallowBlockEffectsFor[d]){if(u.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(a).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=c.length,h>c.length)r.continueWidget(l-a);else{let p=u.widget||(u.block?Bu.block:Bu.inline),g=CJ(u),m=this.cache.findWidget(p,l-a,g)||al.of(p,this.view,l-a,g);u.block?(u.startSide>0&&r.addLineStartIfNotCovered(i),r.addBlockWidget(m)):(r.ensureLine(i),r.addInlineWidget(m,c,h))}i=null}else i=_J(i,u);l>a&&this.text.skip(l-a)},span:(a,l,u,c)=>{for(let h=a;hs,this.openWidget||r.addLineStartIfNotCovered(i),this.openMarks=o}forward(e,n,i=1){n-e<=10?this.old.advance(n-e,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(e){let n=[],i=null;for(let r=e.parentNode;;r=r.parentNode){let s=bn.get(r);if(r==this.view.contentDOM)break;s instanceof Pi?n.push(s):s?.isLine()?i=s:s instanceof eo||(r.nodeName=="DIV"&&!i&&r!=this.view.contentDOM?i=new Fu(r,jR):i||n.push(Pi.of(new bd({tagName:r.nodeName.toLowerCase(),attributes:KK(r)}),r)))}return{line:i,marks:n}}}function FE(t,e){let n=i=>{for(let r of i.children)if((e?r.isText():r.length)||n(r))return!0;return!1};return n(t)}function CJ(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const jR={class:"cm-line"};function _J(t,e){let n=e.spec.attributes,i=e.spec.class;return!n&&!i||(t||(t={class:"cm-line"}),n&&zw(n,t),i&&(t.class+=" "+i)),t}function kJ(t){let e=[];for(let n=t.parents.length;n>1;n--){let i=n==t.parents.length?t.tile:t.parents[n].tile;i instanceof Pi&&e.push(i.mark)}return e}function z1(t){let e=bn.get(t);return e&&e.setDOM(t.cloneNode()),t}class Bu extends Er{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Bu.inline=new Bu("span");Bu.block=new Bu("div");const W1=new class extends Er{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class BE{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=je.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new xO(e,e.contentDOM),this.updateInner([new mr(0,0,0,e.state.doc.length)],null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:h})=>hthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!NJ(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?TJ(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:c,to:h}=this.hasComposition;i=new mr(c,h,e.changes.mapPos(c,-1),e.changes.mapPos(h,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Qe.ie||Qe.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.blockWrappers;this.updateDeco();let l=IJ(o,this.decorations,e.changes);l.length&&(i=mr.extendWithRanges(i,l));let u=RJ(a,this.blockWrappers,e.changes);return u.length&&(i=mr.extendWithRanges(i,u)),s&&!i.some(c=>c.fromA<=s.range.fromA&&c.toA>=s.range.toA)&&(i=s.range.addToSet(i.slice())),this.tile.flags&2&&i.length==0?!1:(this.updateInner(i,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(n||e.length){let o=this.tile,a=new wJ(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);n&&bn.get(n.text)&&a.cache.reused.set(bn.get(n.text),2),this.tile=a.run(e,n),Cb(o,a.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Qe.chrome||Qe.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||i.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to-1)&&Ch(i,this.view.observer.selectionRange)&&!(r&&i.contains(r));if(!(s||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,u,c;if(l.empty?c=u=this.inlineDOMNearPos(l.anchor,l.assoc||1):(c=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),u=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),Qe.gecko&&l.empty&&!this.hasComposition&&EJ(u)){let d=document.createTextNode("");this.view.observer.ignore(()=>u.node.insertBefore(d,u.node.childNodes[u.offset]||null)),u=c=new Vr(d,0),a=!0}let h=this.view.observer.selectionRange;(a||!h.focusNode||(!_h(u.node,u.offset,h.anchorNode,h.anchorOffset)||!_h(c.node,c.offset,h.focusNode,h.focusOffset))&&!this.suppressWidgetCursorChange(h,l))&&(this.view.observer.ignore(()=>{Qe.android&&Qe.chrome&&i.contains(h.focusNode)&&LJ(h.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let d=lf(this.view.root);if(d)if(l.empty){if(Qe.gecko){let p=AJ(u.node,u.offset);if(p&&p!=3){let g=(p==1?yR:SR)(u.node,u.offset);g&&(u=new Vr(g.node,g.offset))}}d.collapse(u.node,u.offset),l.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=l.bidiLevel)}else if(d.extend){d.collapse(u.node,u.offset);try{d.extend(c.node,c.offset)}catch{}}else{let p=document.createRange();l.anchor>l.head&&([u,c]=[c,u]),p.setEnd(c.node,c.offset),p.setStart(u.node,u.offset),d.removeAllRanges(),d.addRange(p)}o&&this.view.root.activeElement==i&&(i.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(u,c)),this.impreciseAnchor=u.precise?null:new Vr(h.anchorNode,h.anchorOffset),this.impreciseHead=c.precise?null:new Vr(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&_h(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=lf(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let o=this.lineAt(n.head,n.assoc);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc,n.assoc);i.collapse(c.node,c.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&i.collapse(r,s)}posFromDOM(e,n){let i=this.tile.nearest(e);if(!i)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=i.posAtStart;if(i.isComposite()){let s;if(e==i.dom)s=i.dom.childNodes[n];else{let o=ho(e)==0?0:n==0?-1:1;for(;;){let a=e.parentNode;if(a==i.dom)break;o==0&&a.firstChild!=a.lastChild&&(e==a.firstChild?o=-1:o=1),e=a}o<0?s=e:s=e.nextSibling}if(s==i.dom.firstChild)return r;for(;s&&!bn.get(s);)s=s.nextSibling;if(!s)return r+i.length;for(let o=0,a=r;;o++){let l=i.children[o];if(l.dom==s)return a;a+=l.length+l.breakAfter}}else return i.isText()?e==i.dom?r+n:r+(n?i.length:0):r}domAtPos(e,n){let{tile:i,offset:r}=this.tile.resolveBlock(e,n);return i.isWidget()?i.domPosFor(e,n):i.domIn(r,n)}inlineDOMNearPos(e,n){let i,r=-1,s=!1,o,a=-1,l=!1;return this.tile.blockTiles((u,c)=>{if(u.isWidget()){if(u.flags&32&&c>=e)return!0;u.flags&16&&(s=!0)}else{let h=c+u.length;if(c<=e&&(i=u,r=e-c,s=h=e&&!o&&(o=u,a=e-c,l=c>e),c>e&&o)return!0}}),!i&&!o?this.domAtPos(e,n):(s&&o?i=null:l&&i&&(o=null),i&&n<0||!o?i.domIn(r,n):o.domIn(a,n))}coordsAt(e,n){let{tile:i,offset:r}=this.tile.resolveBlock(e,n);return i.isWidget()?i.widget instanceof U1?null:i.coordsInWidget(r,n,!0):i.coordsIn(r,n)}lineAt(e,n){let{tile:i}=this.tile.resolveBlock(e,n);return i.isLine()?i:null}coordsForChar(e){let{tile:n,offset:i}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function r(s,o){if(s.isComposite())for(let a of s.children){if(a.length>=o){let l=r(a,o);if(l)return l}if(o-=a.length,o<0)break}else if(s.isText()&&oMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Kt.LTR,u=0,c=(h,d,p)=>{for(let g=0;gr);g++){let m=h.children[g],v=d+m.length,S=m.dom.getBoundingClientRect(),{height:b}=S;if(p&&!g&&(u+=S.top-p.top),m instanceof eo)v>i&&c(m,d,S);else if(d>=i&&(u>0&&n.push(-u),n.push(b+u),u=0,o)){let w=m.dom.lastChild,k=w?eg(w):[];if(k.length){let C=k[k.length-1],x=l?C.right-S.left:S.right-C.left;x>a&&(a=x,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=v)}}p&&g==h.children.length-1&&(u+=p.bottom-S.bottom),d=v+m.breakAfter}};return c(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?Kt.RTL:Kt.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let a=0,l;for(let u of o.children){if(!u.isText()||/[^ -~]/.test(u.text))return;let c=eg(u.dom);if(c.length!=1)return;a+=c[0].width,l=c[0].height}if(a)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:a/o.length,textHeight:l}}});if(e)return e;let n=document.createElement("div"),i,r,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let o=eg(n.firstChild)[0];i=n.getBoundingClientRect().height,r=o&&o.width?o.width/27:7,s=o&&o.height?o.height:i,n.remove()}),{lineHeight:i,charWidth:r,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],o=s?s.from-1:this.view.state.doc.length;if(o>i){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(je.replace({widget:new U1(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return je.set(e)}updateDeco(){let e=1,n=this.view.state.facet(mO).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(Gw).map((s,o)=>{let a=typeof s=="function";return a&&(i=!0),a?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(dt.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];etypeof s=="function"?s(this.view):s)}scrollIntoView(e){var n;if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(MR))try{if(c(this.view,e.range,e))return!0}catch(h){$i(this.view.state,h,"scroll handler")}let{range:i}=e,r=this.coordsAt(i.head,(n=i.assoc)!==null&&n!==void 0?n:i.empty?0:i.head>i.anchor?-1:1),s;if(!r)return;!i.empty&&(s=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(r={left:Math.min(r.left,s.left),top:Math.min(r.top,s.top),right:Math.max(r.right,s.right),bottom:Math.max(r.bottom,s.bottom)});let o=Kw(this.view),a={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:l,offsetHeight:u}=this.view.scrollDOM;if(tJ(this.view.scrollDOM,a,i.head1&&(r.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||r.bottomi.isWidget()||i.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){Cb(this.tile)}}function Cb(t,e){let n=e?.get(t);if(n!=1){n==null&&t.destroy();for(let i of t.children)Cb(i,e)}}function EJ(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function ZR(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let i=yR(n.focusNode,n.focusOffset),r=SR(n.focusNode,n.focusOffset),s=i||r;if(r&&i&&r.node!=i.node){let a=bn.get(r.node);if(!a||a.isText()&&a.text!=r.node.nodeValue)s=r;else if(t.docView.lastCompositionAfterCursor){let l=bn.get(i.node);!l||l.isText()&&l.text!=i.node.nodeValue||(s=r)}}if(t.docView.lastCompositionAfterCursor=s!=i,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function TJ(t,e,n){let i=ZR(t,n);if(!i)return null;let{node:r,from:s,to:o}=i,a=r.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(i.from,i.to)!=a)return null;let l=e.invertedDesc;return{range:new mr(l.mapPos(s),l.mapPos(o),s,o),text:r}}function AJ(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e{ie.from&&(n=!0)}),n}class U1 extends Er{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function MJ(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return ae.cursor(e);s==0?n=1:s==r.length&&(n=-1);let o=s,a=s;n<0?o=zn(r.text,s,!1):a=zn(r.text,s);let l=i(r.text.slice(o,a));for(;o>0;){let u=zn(r.text,o,!1);if(i(r.text.slice(u,o))!=l)break;o=u}for(;at.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+fb(o,s,t.state.tabSize)}function _b(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>e)break;if(!(s.toe)return s;(!r||s.type==Jn.Text&&(r.type!=s.type||(n<0?s.frome)))&&(r=s)}}return r||i}return i}function DJ(t,e,n,i){let r=_b(t,e.head,e.assoc||-1),s=!i||r.type!=Jn.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(a==Kt.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return ae.cursor(l,n?-1:1)}return ae.cursor(n?r.to:r.from,n?-1:1)}function jE(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),o=t.textDirectionAt(r.from);for(let a=e,l=null;;){let u=fJ(r,s,o,a,n),c=ER;if(!u){if(r.number==(n?t.state.doc.lines:1))return a;c=` +`,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),u=t.visualLineSide(r,!n)}if(l){if(!l(c))return a}else{if(!i)return u;l=i(c)}a=u}}function VJ(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let o=i(s);return r==pn.Space&&(r=o),r==o}}function FJ(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return ae.cursor(r,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(r,e.assoc||((e.empty?n:e.head==e.from)?1:-1)),c=t.documentTop;if(u)o==null&&(o=u.left-l.left),a=s<0?u.top:u.bottom;else{let g=t.viewState.lineBlockAt(r);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-g.from))),a=(s<0?g.top:g.bottom)+c}let h=l.left+o,d=t.viewState.heightOracle.textHeight>>1,p=i??d;for(let g=0;;g+=d){let m=a+(p+g)*s,v=kb(t,{x:h,y:m},!1,s);if(n?m>l.bottom:ma:b{if(e>s&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:ae.cursor(i,it.viewState.docHeight)return new vs(t.state.doc.length,-1);if(u=t.elementAtHeight(l),i==null)break;if(u.type==Jn.Text){if(i<0?u.tot.viewport.to)break;let d=t.docView.coordsAt(i<0?u.from:u.to,i>0?-1:1);if(d&&(i<0?d.top<=l+s:d.bottom>=l+s))break}let h=t.viewState.heightOracle.textHeight/2;l=i>0?u.bottom+h:u.top-h}if(t.viewport.from>=u.to||t.viewport.to<=u.from){if(n)return null;if(u.type==Jn.Text){let h=QJ(t,r,u,o,a);return new vs(h,h==u.from?1:-1)}}if(u.type!=Jn.Text)return l<(u.top+u.bottom)/2?new vs(u.from,1):new vs(u.to,-1);let c=t.docView.lineAt(u.from,2);return(!c||c.length!=u.length)&&(c=t.docView.lineAt(u.from,-2)),new BJ(t,o,a,t.textDirectionAt(u.from)).scanTile(c,u.from)}class BJ{constructor(e,n,i,r){this.view=e,this.x=n,this.y=i,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to1||i.length&&(i[0].level!=this.baseDir||i[0].to+r.from>1;t:if(o.has(m)){let S=r+Math.floor(Math.random()*g);for(let b=0;b1)){if(b.bottomthis.y)(!u||u.top>b.top)&&(u=b),w=-1;else{let k=b.left>this.x?this.x-b.left:b.right(g+g+m)/3)return this.y=l.bottom-1,this.scan(e,n,!0);if(u&&u.top<(g+m+m)/3)return this.y=u.top+1,this.scan(e,n,!0)}let p=(a?this.dirAt(e[c],1):this.baseDir)==Kt.LTR;return{i:c,after:this.x>(d.left+d.right)/2==p}}scanText(e,n){let i=[];for(let s=0;s{let o=i[s]-n,a=i[s+1]-n;return uf(e.dom,o,a).getClientRects()});return r.after?new vs(i[r.i+1],-1):new vs(i[r.i],1)}scanTile(e,n){if(!e.length)return new vs(n,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,n);if(a.isComposite())return this.scanTile(a,n)}let i=[n];for(let a=0,l=n;a{let l=e.children[a];return l.flags&48?null:(l.dom.nodeType==1?l.dom:uf(l.dom,0,l.length)).getClientRects()}),s=e.children[r.i],o=i[r.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):r.after?new vs(i[r.i+1],-1):new vs(o,1)}}const Xl="￿";class jJ{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(ct.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Xl}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let o=bn.get(r),a=r.nextSibling;if(a==n){o?.breakAfter&&!a&&i!=this.view.contentDOM&&this.lineBreak();break}let l=bn.get(a);(o&&l?o.breakAfter:(o?o.breakAfter:fm(r))||fm(a)&&(r.nodeName!="BR"||o?.isWidget())&&this.text.length>s)&&!XJ(a,n)&&this.lineBreak(),r=a}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(a=r.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);i=s+o}}readNode(e){let n=bn.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(ZJ(e,i.node,i.offset)?n:0))}}function ZJ(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView,a=e.state.selection;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=zR(e.docView.tile,n,i,0))){let l=s||o?[]:UJ(e),u=new jJ(l,e);u.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=u.text,this.newSel=qJ(l,this.bounds.from)}else{let l=e.observer.selectionRange,u=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!vb(e.contentDOM,l.focusNode)?a.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),c=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!vb(e.contentDOM,l.anchorNode)?a.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),h=e.viewport;if((Qe.ios||Qe.chrome)&&u!=c&&Math.min(u,c)<=a.main.from&&Math.max(u,c)>=a.main.to&&(h.from>0||h.to-1&&a.ranges.length>1)this.newSel=a.replaceRange(ae.range(c,u));else if(e.lineWrapping&&c==u&&!(a.main.empty&&a.main.head==u)&&e.inputState.lastTouchTime>Date.now()-100){let d=e.coordsAtPos(u,-1),p=0;d&&(p=e.inputState.lastTouchY<=d.bottom?-1:1),this.newSel=ae.create([ae.cursor(u,p)])}else this.newSel=ae.single(c,u)}}}function zR(t,e,n,i){if(t.isComposite()){let r=-1,s=-1,o=-1,a=-1;for(let l=0,u=i,c=i;ln)return zR(h,e,n,u);if(d>=e&&r==-1&&(r=l,s=u),u>n&&h.dom.parentNode==t.dom){o=l,a=c;break}c=d,u=d+h.breakAfter}return{from:s,to:a<0?i+t.length:a,startDOM:(r?t.children[r-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o=0?t.children[o].dom:null}}else return t.isText()?{from:i,to:i+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function WR(t,e){let n,{newSel:i}=e,{state:r}=t,s=r.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:l}=e.bounds,u=s.from,c=null;(o===8||Qe.android&&e.text.length=a&&s.to<=l&&(e.typeOver||h!=e.text)&&h.slice(0,s.from-a)==e.text.slice(0,s.from-a)&&h.slice(s.to-a)==e.text.slice(d=e.text.length-(h.length-(s.to-a)))?n={from:s.from,to:s.to,insert:Tt.of(e.text.slice(s.from-a,d).split(Xl))}:(p=UR(h,e.text,u-a,c))&&(Qe.chrome&&o==13&&p.toB==p.from+2&&e.text.slice(p.from,p.toB)==Xl+Xl&&p.toB--,n={from:a+p.from,to:a+p.toA,insert:Tt.of(e.text.slice(p.from,p.toB).split(Xl))})}else i&&(!t.hasFocus&&r.facet(Us)||Om(i,s))&&(i=null);if(!n&&!i)return!1;if((Qe.mac||Qe.android)&&n&&n.from==n.to&&n.from==s.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=ae.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:Tt.of([n.insert.toString().replace("."," ")])}):r.doc.lineAt(s.from).toDate.now()-50?n={from:s.from,to:s.to,insert:r.toText(t.inputState.insertingText)}:Qe.chrome&&n&&n.from==n.to&&n.from==s.head&&n.insert.toString()==` + `&&t.lineWrapping&&(i&&(i=ae.single(i.main.anchor-1,i.main.head-1)),n={from:s.from,to:s.to,insert:Tt.of([" "])}),n)return Jw(t,n,i,o);if(i&&!Om(i,s)){let a=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),l=t.inputState.lastSelectionOrigin,l=="select.pointer"&&(i=XR(r.facet(Sd).map(u=>u(t)),i))),t.dispatch({selection:i,scrollIntoView:a,userEvent:l}),!0}else return!1}function Jw(t,e,n,i=-1){if(Qe.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if(Qe.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&gu(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.lengthr.head)&&gu(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&gu(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=WJ(t,e,n));return t.state.facet($R).some(l=>l(t,e.from,e.to,s,a))||t.dispatch(a()),!0}function WJ(t,e,n){let i,r=t.state,s=r.selection.main,o=-1;if(e.from==e.to&&e.froms.to){let l=e.fromh(t)),u,l);e.from==c&&(o=c)}if(o>-1)i={changes:e,selection:ae.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=s.frome.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+u))}else{let l=r.changes(e),u=n&&n.main.to<=l.newLength?n.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let c=t.state.sliceDoc(e.from,e.to),h,d=n&&ZR(t,n.main.head);if(d){let g=e.insert.length-(e.to-e.from);h={from:d.from,to:d.to-g}}else h=t.state.doc.lineAt(s.head);let p=s.to-e.to;i=r.changeByRange(g=>{if(g.from==s.from&&g.to==s.to)return{changes:l,range:u||g.map(l)};let m=g.to-p,v=m-c.length;if(t.state.sliceDoc(v,m)!=c||m>=h.from&&v<=h.to)return{range:g};let S=r.changes({from:v,to:m,insert:e.insert}),b=g.to-s.to;return{changes:S,range:u?ae.range(Math.max(0,u.anchor+b),Math.max(0,u.head+b)):g.map(S)}})}else i={changes:l,selection:u&&r.selection.replaceRange(u)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:a,scrollIntoView:!0})}function UR(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function UJ(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new ZE(n,i)),(r!=n||s!=i)&&e.push(new ZE(r,s))),e}function qJ(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?ae.single(n+e,i+e):null}function Om(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class HJ{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Qe.safari&&e.contentDOM.addEventListener("input",()=>null),Qe.gecko&&hee(e.contentDOM.ownerDocument)}handleEvent(e){!ree(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=GJ(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,a=i[s];a&&o!=!a.handlers.length&&(r.removeEventListener(s,this.handleEvent),a=null),a||r.addEventListener(s,this.handleEvent,{passive:o})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&HR.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qe.android&&Qe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(Qe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(qR.some(n=>n.keyCode==e.keyCode)&&!e.ctrlKey||KJ.indexOf(e.key)>-1&&e.ctrlKey)){let n={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};return n.shiftKey&&Qe.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&YJ(this.view.win)&&(n.shiftKey=!1),this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:n},setTimeout(()=>this.flushIOSKey(),250),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:Qe.safari&&!Qe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function YJ(t){return t.visualViewport?t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<.85:!1}function XE(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){$i(n.state,r)}}}function GJ(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec,s=r&&r.plugin.domEventHandlers,o=r&&r.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&n(a).handlers.push(XE(i.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(XE(i.value,l))}}for(let i in Yr)n(i).handlers.push(Yr[i]);for(let i in Fi)n(i).observers.push(Fi[i]);return e}const qR=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],KJ="dthko",HR=[16,17,18,20,91,92,224,225],fp=6;function dp(t){return Math.max(0,t)*.7+8}function JJ(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class eee{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=xR(e.contentDOM),this.atoms=e.state.facet(Sd).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(ct.allowMultipleSelections)&&tee(e,n),this.dragging=iee(e,n)&&KR(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&JJ(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,r=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=Kw(this.view);e.clientX-l.left<=r+fp?n=-dp(r-e.clientX):e.clientX+l.right>=o-fp&&(n=dp(e.clientX-o)),e.clientY-l.top<=s+fp?i=-dp(s-e.clientY):e.clientY+l.bottom>=a-fp&&(i=dp(e.clientY-a)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,i=XR(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function tee(t,e){let n=t.state.facet(TR);return n.length?n[0](e):Qe.mac?e.metaKey:e.ctrlKey}function nee(t,e){let n=t.state.facet(AR);return n.length?n[0](e):Qe.mac?!e.altKey:!e.ctrlKey}function iee(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=lf(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function ree(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=bn.get(n))&&i.isWidget()&&!i.isHidden&&i.widget.ignoreEvent(e))return!1;return!0}const Yr=Object.create(null),Fi=Object.create(null),YR=Qe.ie&&Qe.ie_version<15||Qe.ios&&Qe.webkit_version<604;function see(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),GR(t,n.value)},50)}function vO(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function GR(t,e){e=vO(t.state,qw,e);let{state:n}=t,i,r=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(Eb!=null&&n.selection.ranges.every(l=>l.empty)&&Eb==s.toString()){let l=-1;i=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let h=n.toText((o?s.line(r++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:h},range:ae.cursor(u.from+h.length)}})}else o?i=n.changeByRange(l=>{let u=s.line(r++);return{changes:{from:l.from,to:l.to,insert:u.text},range:ae.cursor(l.from+u.length)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Fi.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Fi.wheel=Fi.mousewheel=t=>{t.inputState.lastWheelEvent=Date.now()};Yr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Fi.touchstart=(t,e)=>{let n=t.inputState,i=e.targetTouches[0];n.lastTouchTime=Date.now(),i&&(n.lastTouchX=i.clientX,n.lastTouchY=i.clientY),n.setSelectionOrigin("select.pointer")};Fi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Yr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(PR))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=aee(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new eee(t,e,n,i)),i&&t.observer.ignore(()=>{vR(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function zE(t,e,n,i){if(i==1)return ae.cursor(e,n);if(i==2)return MJ(t.state,e,n);{let r=t.docView.lineAt(e,n),s=t.state.doc.lineAt(r?r.posAtEnd:e),o=r?r.posAtStart:s.from,a=r?r.posAtEnd:s.to;return aDate.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(UE+1)%3:1}function aee(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),i=KR(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,o,a){let l=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),u,c=zE(t,l.pos,l.assoc,i);if(n.pos!=l.pos&&!o){let h=zE(t,n.pos,n.assoc,i),d=Math.min(h.from,c.from),p=Math.max(h.to,c.to);c=d1&&(u=lee(r,l.pos))?u:a?r.addRange(c):ae.create([c])}}}function lee(t,e){for(let n=0;n=e)return ae.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Yr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.tile.nearest(e.target);if(r&&r.isWidget()){let s=r.posAtStart,o=s+r.length;(s>=n.to||o<=n.from)&&(n=ae.undirectionalRange(s,o))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",vO(t.state,Hw,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Yr.dragend=t=>(t.inputState.draggedContent=null,!1);function HE(t,e,n,i){if(n=vO(t.state,qw,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=i&&s&&nee(t,e)?{from:s.from,to:s.to}:null,a={from:r,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Yr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&HE(t,e,i.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[o]=a.result),s()},a.readAsText(n[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return HE(t,e,i,!0),!0}return!1};Yr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=YR?null:e.clipboardData;return n?(GR(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(see(t),!1)};function uee(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function cee(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>r&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),r=o.number}i=!0}return{text:vO(t,Hw,e.join(t.lineBreak)),ranges:n,linewise:i}}let Eb=null;Yr.copy=Yr.cut=(t,e)=>{if(!Ch(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:i,linewise:r}=cee(t.state);if(!n&&!r)return!1;Eb=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=YR?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(uee(t,n),!1)};const JR=So.define();function e8(t,e){let n=[];for(let i of t.facet(RR)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:JR.of(!0)}):null}function t8(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=e8(t.state,e);n?t.dispatch(n):t.update([])}},10)}Fi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),t8(t)};Fi.blur=t=>{t.observer.clearSelectionRange(),t8(t)};Fi.compositionstart=Fi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Fi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Qe.chrome&&Qe.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Fi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Yr.beforeinput=(t,e)=>{var n,i;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),u=t.posAtDOM(a.endContainer,a.endOffset);return Jw(t,{from:l,to:u,insert:t.state.toText(s)},null),!0}}let r;if(Qe.chrome&&Qe.android&&(r=qR.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Qe.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Qe.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Fi.compositionend(t,e),20),!1};const YE=new Set;function hee(t){YE.has(t)||(YE.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const GE=["pre-wrap","normal","pre-line","break-spaces"];let ju=!1;function KE(){ju=!1}class fee{constructor(e){this.lineWrapping=e,this.doc=Tt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return GE.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,l=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>tg&&(ju=!0),this.height=e)}replace(e,n,i){return mi.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,o=i.doc;for(let a=r.length-1;a>=0;a--){let{fromA:l,toA:u,fromB:c,toB:h}=r[a],d=s.lineAt(l,nn.ByPosNoHeight,i.setDoc(n),0,0),p=d.to>=u?d:s.lineAt(u,nn.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&d.from<=r[a-1].toA;)l=r[a-1].fromA,c=r[a-1].fromB,a--,ls*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),i+=1+a.break,r-=a.size}else if(s>r*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,s-=a.size}else break;else if(r=s&&o(this.lineAt(0,nn.ByPos,i,r,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Wi extends n8{constructor(e,n,i){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(e,n){return new Qr(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Wi||r instanceof Un&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Un?r=new Wi(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):mi.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setMeasuredHeight(r):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Un extends mi{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:i,lastLine:r,perLine:o,perChar:a}}blockAt(e,n,i,r){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let u=r+(e0){let s=i[i.length-1];s instanceof Un?i[i.length-1]=new Un(s.length+r):i.push(null,new Un(r-1))}if(e>0){let s=i[0];s instanceof Un?i[0]=new Un(e+s.length):i.unshift(new Un(e-1),null)}return mi.of(i)}decomposeLeft(e,n){n.push(new Un(e-1),null)}decomposeRight(e,n){n.push(null,new Un(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let o=[],a=Math.max(n,r.from),l=-1;for(r.from>n&&o.push(new Un(r.from-n-1).updateHeight(e,n));a<=s&&r.more;){let c=e.doc.lineAt(a).length;o.length&&o.push(null);let h=r.heights[r.index++],d=0;h<0&&(d=-h,h=r.heights[r.index++]),l==-1?l=h:Math.abs(h-l)>=tg&&(l=-2);let p=new Wi(c,h,d);p.outdated=!1,o.push(p),a+=c+1}a<=s&&o.push(null,new Un(s-a).updateHeight(e,a));let u=mi.of(o);return(l<0||Math.abs(u.height-this.height)>=tg||Math.abs(l-this.heightMetrics(e,n).perLine)>=tg)&&(ju=!0),xm(this,u)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class gee extends mi{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return ea))return u;let c=n==nn.ByPosNoHeight?nn.ByPosNoHeight:nn.ByPos;return l?u.join(this.right.lineAt(a,c,i,o,a)):this.left.lineAt(a,c,i,r,s).join(u)}forEachLine(e,n,i,r,s,o){let a=r+this.left.height,l=s+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,i,a,l,o);else{let u=this.lineAt(l,nn.ByPos,i,r,s);e=e&&u.from<=n&&o(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,a,l,o)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of i)s.push(a);if(e>0&&JE(s,o-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?mi.of(this.break?[e,null,n]:[e,n]):(this.left=xm(this.left,e),this.right=xm(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return r&&r.from<=n+s.length&&r.more?l=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=a+o.length&&r.more?l=o=o.updateHeight(e,a,i,r):o.updateHeight(e,a,i),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function JE(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof Un&&(i=t[e+1])instanceof Un&&t.splice(e-1,3,new Un(n.length+1+i.length))}const mee=5;class eC{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Wi?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Wi(i-this.pos,-1,0)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=mee)&&this.addLineDeco(r,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Wi(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let i=new Un(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Wi)return e;let n=new Wi(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Wi)&&!this.isCovered?this.nodes.push(new Wi(0,-1,0)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&h.overflow!="visible"){let d=c.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),l=Math.min(u==t.parentNode?r.innerHeight:l,d.bottom)}u=h.position=="absolute"||h.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function bee(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left0&&e.top0}function yee(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class H1{constructor(e,n,i,r){this.from=e,this.to=n,this.size=i,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new fee(i),this.stateDeco=nT(n),this.heightMap=mi.empty().applyChanges(this.stateDeco,Tt.empty,this.heightOracle.setDoc(n.doc),[new mr(0,0,0,n.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=je.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:o})=>r>=s&&r<=o)){let{from:s,to:o}=this.lineBlockAt(r);e.push(new pp(s,o))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?tT:new tC(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(nh(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=nT(this.state);let r=e.changedRanges,s=mr.extendWithRanges(r,Oee(i,this.stateDeco,e?e.changes:Tn.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);KE(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||ju)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(NR)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Kt.RTL:Kt.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,c=0;if(a.width&&a.height){let{scaleX:C,scaleY:x}=OR(n,a);(C>.005&&Math.abs(this.scaleX-C)>.005||x>.005&&Math.abs(this.scaleY-x)>.005)&&(this.scaleX=C,this.scaleY=x,u|=16,o=l=!0)}let h=(parseInt(i.paddingTop)||0)*this.scaleY,d=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=d)&&(this.paddingTop=h,this.paddingBottom=d,u|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=16);let p=xR(this.view.contentDOM,!1).y;p!=this.scrollParent&&(this.scrollParent=p,this.scrollAnchorHeight=-1,this.scrollOffset=0);let g=this.getScrollOffset();this.scrollOffset!=g&&(this.scrollAnchorHeight=-1,this.scrollOffset=g),this.scrolledToBottom=bR(this.scrollParent||e.win);let m=(this.printing?yee:vee)(n,this.paddingTop),v=m.top-this.pixelViewport.top,S=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget&&!bee(e.dom))return 0;let w=a.width;if((this.contentDOMWidth!=w||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=16),l){let C=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(C)&&(o=!0),o||r.lineWrapping&&Math.abs(w-this.contentDOMWidth)>r.charWidth){let{lineHeight:x,charWidth:E,textHeight:A}=e.docView.measureTextSize();o=x>0&&r.refresh(s,x,E,A,Math.max(5,w/E),C),o&&(e.docView.minWidth=0,u|=16)}v>0&&S>0?c=Math.max(v,S):v<0&&S<0&&(c=Math.min(v,S)),KE();for(let x of this.viewports){let E=x.from==this.viewport.from?C:e.docView.measureVisibleLineHeights(x);this.heightMap=(o?mi.empty().applyChanges(this.stateDeco,Tt.empty,this.heightOracle,[new mr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new dee(x.from,E))}ju&&(u|=2)}let k=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return k&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),u|=this.updateForViewport()),(u&2||k)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new pp(r.lineAt(o-i*1e3,nn.ByHeight,s,0,0).from,r.lineAt(a+(1-i)*1e3,nn.ByHeight,s,0,0).to);if(n){let{head:u}=n.range;if(ul.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(u,nn.ByPos,s,0,0),d;n.y=="center"?d=(h.top+h.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u=a+Math.max(10,Math.min(i,250)))&&r>o-2*1e3&&s>1,o=r<<1;if(this.defaultTextDirection!=Kt.LTR&&!i)return[];let a=[],l=(c,h,d,p)=>{if(h-cc&&SS.from>=d.from&&S.to<=d.to&&Math.abs(S.from-c)S.fromb));if(!v){if(hw.from<=h&&w.to>=h)){let w=n.moveToLineBoundary(ae.cursor(h),!1,!0).head;w>c&&(h=w)}let S=this.gapSize(d,c,h,p),b=i||S<2e6?S:2e6;v=new H1(c,h,S,b)}a.push(v)},u=c=>{if(c.length2e6)for(let x of e)x.from>=c.from&&x.fromc.from&&l(c.from,p,c,h),gn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];dt.spans(n,this.viewport.from,this.viewport.to,{span(s,o){i.push({from:s,to:o})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||nh(this.heightMap.lineAt(e,nn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||nh(this.heightMap.lineAt(this.scaler.fromDOM(e),nn.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return nh(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class pp{constructor(e,n){this.from=e,this.to=n}}function wee(t,e,n){let i=[],r=t,s=0;return dt.spans(n,t,e,{span(){},point(o,a){o>r&&(i.push({from:r,to:o}),s+=o-r),r=a}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:o}=e[r],a=o-s;if(i<=a)return s+i;i-=a}}function mp(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function Cee(t,e){for(let n of t)if(e(n))return n}const tT={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function nT(t){let e=t.facet(mO).filter(i=>typeof i!="function"),n=t.facet(Gw).filter(i=>typeof i!="function");return n.length&&e.push(dt.join(n)),e}class tC{constructor(e,n,i){let r=0,s=0,o=0;this.viewports=i.map(({from:a,to:l})=>{let u=n.lineAt(a,nn.ByPos,e,0,0).top,c=n.lineAt(l,nn.ByPos,e,0,0).bottom;return r+=c-u,{from:a,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=nn.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function nh(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Qr(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>nh(r,e)):t._content)}const Op=Me.define({combine:t=>t.join(" ")}),Tb=Me.define({combine:t=>t.indexOf(!0)>-1}),Ab=co.newName(),i8=co.newName(),r8=co.newName(),s8={"&light":"."+i8,"&dark":"."+r8};function Pb(t,e,n){return new co(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const _ee=Pb("."+Ab,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},s8),kee={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Y1=Qe.ie&&Qe.ie_version<=11;class Eee{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new nJ,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(Qe.ie&&Qe.ie_version<=11||Qe.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Qe.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Qe.chrome&&Qe.chrome_version<126)&&(this.editContext=new Aee(e),e.state.facet(Us)&&(e.contentDOM.editContext=this.editContext.editContext)),Y1&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(Us)?i.root.activeElement!=this.dom:!Ch(this.dom,r))return;let s=r.anchorNode&&i.docView.tile.nearest(r.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Qe.ie&&Qe.ie_version<=11||Qe.android&&Qe.chrome)&&!i.state.selection.main.empty&&r.focusNode&&_h(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=lf(e.root);if(!n)return!1;let i=Qe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Tee(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=Ch(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&gu(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(r=!0),n==-1?{from:n,to:i}=o:(n=Math.min(o.from,n),i=Math.max(o.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Ch(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new zJ(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=WR(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!Om(this.view.state.selection,n.newSel.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let i=iT(n,e.previousSibling||e.target.previousSibling,-1),r=iT(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Us)!=e.state.facet(Us)&&(e.view.contentDOM.editContext=e.state.facet(Us)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function iT(t,e,n){for(;e;){let i=bn.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function rT(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return _h(o.node,o.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function Tee(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return rT(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?rT(t,n):null}class Aee{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:s,head:o}=r,a=this.toEditorPos(i.updateRangeStart),l=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:a,drifted:!1});let u=l-a>i.text.length;a==this.from&&sthis.to&&(l=s);let c=UR(e.state.sliceDoc(a,l),i.text,(u?r.from:r.to)-a,u?"end":null);if(!c){let d=ae.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));Om(d,r)||e.dispatch({selection:d,userEvent:"select"});return}let h={from:c.from+a,to:c.toA+a,insert:Tt.of(i.text.slice(c.from,c.toB).split(` +`))};if((Qe.mac||Qe.android)&&h.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:l,insert:Tt.of([i.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let d=this.to-this.from+(h.to-h.from+h.insert.length);Jw(e,h,ae.single(this.toEditorPos(i.selectionStart,d),this.toEditorPos(i.selectionEnd,d)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),h.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(n.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let o=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);o{let r=[];for(let s of i.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let l=this.toEditorPos(s.rangeStart),u=this.toEditorPos(s.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{let r=lf(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,u)=>{if(i)return;let c=u.length-(o-s);if(r&&o>=r.to)if(r.from==s&&r.to==o&&r.insert.eq(u)){r=this.pendingContextChange=null,n+=c,this.to+=c;return}else r=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=c,this.to+=c;else if(sthis.to||this.to-this.from+u.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),u.toString()),this.to+=c}n+=c}),r&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Se{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||iJ(e.parent)||document,this.viewState=new eT(this,e.state||ct.create(e)),e.scrollTo&&e.scrollTo.is(hp)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Gl).map(r=>new X1(r));for(let r of this.plugins)r.update(this);this.observer=new Eee(this),this.inputState=new HJ(this),this.inputState.ensureHandlers(this.plugins),this.docView=new BE(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof Pn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(JR))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=e8(s,o),l||(a=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(c=null)):this.observer.clear(),s.facet(ct.phrases)!=this.state.facet(ct.phrases))return this.setState(s);r=pm.create(this,s,e),r.flags|=a;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(h&&(h=h.map(d.changes)),d.scrollIntoView){let{main:p}=d.state.selection,{x:g,y:m}=this.state.facet(Se.cursorScrollMargin);h=new mu(p.empty?p:ae.cursor(p.head,p.head>p.anchor?-1:1),"nearest","nearest",m,g)}for(let p of d.effects)p.is(hp)&&(h=p.value.clip(this.state))}this.viewState.update(r,h),this.bidiCache=vm.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(th)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Op)!=r.state.facet(Op)&&(this.viewState.mustMeasureContent=!0),(n||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let d of this.state.facet(wb))try{d(r)}catch(p){$i(this.state,p,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!WR(this,c)&&u.force&&gu(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new eT(this,e),this.plugins=e.facet(Gl).map(i=>new X1(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new BE(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Gl),i=e.state.facet(Gl);if(n!=i){let r=[];for(let s of i){let o=n.indexOf(s);if(o<0)r.push(new X1(s));else{let a=this.plugins[o];a.mustUpdate=e,r.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(bR(i||this.win))s=-1,o=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(r);s=p.from,o=p.top}this.updateState=1;let l=this.viewState.measure();if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(p=>{try{return p.read(this)}catch(g){return $i(this.state,g),sT}}),h=pm.create(this,this.state,[]),d=!1;h.flags|=l,n?n.flags|=l:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),d=this.docView.update(h),d&&this.docViewUpdate());for(let p=0;p1||g<-1)&&(i==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r=r+g,i?i.scrollTop+=g:this.win.scrollBy(0,g),o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(wb))a(n)}get themeClasses(){return Ab+" "+(this.state.facet(Tb)?r8:i8)+" "+this.state.facet(Op)}updateAttrs(){let e=oT(this,DR,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Us)?"true":"false",class:"cm-content",style:`${Qe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),oT(this,Yw,n);let i=this.observer.ignore(()=>{let r=NE(this.contentDOM,this.contentAttrs,n),s=NE(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(Se.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(th);let e=this.state.facet(Se.cspNonce);co.mount(this.root,this.styleModules.concat(_ee).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return q1(this,e,jE(this,e,n,i))}moveByGroup(e,n){return q1(this,e,jE(this,e,n,i=>VJ(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=i[n?i.length-1:0];return ae.cursor(s.side(n,r)+e.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return DJ(this,e,n,i)}moveVertically(e,n,i){return q1(this,e,FJ(this,e,n,i))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let i=kb(this,e,n);return i&&i.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),kb(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),o=s[_s.find(s,e-r.from,-1,n)];return dm(i,o.dir==Kt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(LR)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Pee)return kR(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||_R(s.isolates,i=DE(this,e))))return s.order;i||(i=DE(this,e));let r=hJ(e.text,n,i);return this.bidiCache.push(new vm(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{vR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){var i,r,s,o;return hp.of(new mu(typeof e=="number"?ae.cursor(e):e,(i=n.y)!==null&&i!==void 0?i:"nearest",(r=n.x)!==null&&r!==void 0?r:"nearest",(s=n.yMargin)!==null&&s!==void 0?s:5,(o=n.xMargin)!==null&&o!==void 0?o:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return hp.of(new mu(ae.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return yn.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return yn.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=co.newName(),r=[Op.of(i),th.of(Pb(`.${i}`,e))];return n&&n.dark&&r.push(Tb.of(!0)),r}static baseTheme(e){return ns.lowest(th.of(Pb("."+Ab,e,s8)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&bn.get(i)||bn.get(e);return((n=r?.root)===null||n===void 0?void 0:n.view)||null}}Se.styleModule=th;Se.inputHandler=$R;Se.clipboardInputFilter=qw;Se.clipboardOutputFilter=Hw;Se.scrollHandler=MR;Se.focusChangeEffect=RR;Se.perLineTextDirection=LR;Se.exceptionSink=IR;Se.updateListener=wb;Se.editable=Us;Se.mouseSelectionStyle=PR;Se.dragMovesSelection=AR;Se.clickAddsSelectionRange=TR;Se.decorations=mO;Se.blockWrappers=VR;Se.outerDecorations=Gw;Se.atomicRanges=Sd;Se.bidiIsolatedRanges=FR;Se.cursorScrollMargin=Me.define({combine:t=>{let e=5,n=5;for(let i of t)typeof i=="number"?e=n=i:{x:e,y:n}=i;return{x:e,y:n}}});Se.scrollMargins=BR;Se.darkTheme=Tb;Se.cspNonce=Me.define({combine:t=>t.length?t[0]:""});Se.contentAttributes=Yw;Se.editorAttributes=DR;Se.lineWrapping=Se.contentAttributes.of({class:"cm-lineWrapping"});Se.announce=Je.define();const Pee=4096,sT={};class vm{constructor(e,n,i,r,s,o){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:Kt.LTR;for(let s=Math.max(0,e.length-10);s=0;r--){let s=i[r],o=typeof s=="function"?s(t):s;o&&zw(o,n)}return n}const Iee=Qe.mac?"mac":Qe.windows?"win":Qe.linux?"linux":"key";function $ee(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,o,a;for(let l=0;li.concat(r),[]))),n}function Lee(t,e,n){return a8(o8(t.state),e,t,n)}let Ro=null;const Nee=4e3;function Mee(t,e=Iee){let n=Object.create(null),i=Object.create(null),r=(o,a)=>{let l=i[o];if(l==null)i[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,u,c)=>{var h,d;let p=n[o]||(n[o]=Object.create(null)),g=a.split(/ (?!$)/).map(S=>$ee(S,e));for(let S=1;S{let k=Ro={view:w,prefix:b,scope:o};return setTimeout(()=>{Ro==k&&(Ro=null)},Nee),!0}]})}let m=g.join(" ");r(m,!1);let v=p[m]||(p[m]={preventDefault:!1,stopPropagation:!1,run:((d=(h=p._any)===null||h===void 0?void 0:h.run)===null||d===void 0?void 0:d.slice())||[]});l&&v.run.push(l),u&&(v.preventDefault=!0),c&&(v.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let u of a){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:h}=o;for(let d in c)c[d].run.push(p=>h(p,Ib))}let l=o[e]||o.key;if(l)for(let u of a)s(u,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(u,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let Ib=null;function a8(t,e,n,i){Ib=e;let r=YK(e),s=Ti(r,0),o=xs(s)==r.length&&r!=" ",a="",l=!1,u=!1,c=!1;Ro&&Ro.view==n&&Ro.scope==i&&(a=Ro.prefix+" ",HR.indexOf(e.keyCode)<0&&(u=!0,Ro=null));let h=new Set,d=v=>{if(v){for(let S of v.run)if(!h.has(S)&&(h.add(S),S(n)))return v.stopPropagation&&(c=!0),!0;v.preventDefault&&(v.stopPropagation&&(c=!0),u=!0)}return!1},p=t[i],g,m;return p&&(d(p[a+xp(r,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qe.windows&&e.ctrlKey&&e.altKey)&&!(Qe.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(g=sa[e.keyCode])&&g!=r?(d(p[a+xp(g,e,!0)])||e.shiftKey&&(m=of[e.keyCode])!=r&&m!=g&&d(p[a+xp(m,e,!1)]))&&(l=!0):o&&e.shiftKey&&d(p[a+xp(r,e,!0)])&&(l=!0),!l&&d(p._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),Ib=null,l}class Va{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=l8(e);return[new Va(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return Qee(e,n,i)}}function l8(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Kt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function lT(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let s=t.dom.getBoundingClientRect(),o=(r.top+r.bottom)/2,a=t.posAtCoords({x:s.left+1,y:o}),l=t.posAtCoords({x:s.right-1,y:o});return a==null||l==null?i:{from:Math.max(i.from,Math.min(a,l)),to:Math.min(i.to,Math.max(a,l))}}function Qee(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==Kt.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=l8(t),u=o.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),h=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),d=a.right-(c?parseInt(c.paddingRight):0),p=_b(t,i,1),g=_b(t,r,-1),m=p.type==Jn.Text?p:null,v=g.type==Jn.Text?g:null;if(m&&(t.lineWrapping||p.widgetLineBreaks)&&(m=lT(t,i,1,m)),v&&(t.lineWrapping||g.widgetLineBreaks)&&(v=lT(t,r,-1,v)),m&&v&&m.from==v.from&&m.to==v.to)return b(w(n.from,n.to,m));{let C=m?w(n.from,null,m):k(p,!1),x=v?w(null,n.to,v):k(g,!0),E=[];return(m||p).to<(v||g).from-(m&&v?1:0)||p.widgetLineBreaks>1&&C.bottom+t.defaultLineHeight/2W&&ne.from=oe)break;Ee>j&&U(Math.max(ke,j),C==null&&ke<=W,Math.min(Ee,oe),x==null&&Ee>=B,re.dir)}if(j=pe.to+1,j>=oe)break}return Z.length==0&&U(W,C==null,B,x==null,t.textDirection),{top:A,bottom:I,horizontal:Z}}function k(C,x){let E=a.top+(x?C.top:C.bottom);return{top:E,bottom:E,horizontal:[]}}}function Dee(t,e){return t.constructor==e.constructor&&t.eq(e)}class Vee{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(ng)!=e.state.facet(ng)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(ng);for(;n!Dee(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e,Qe.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ng=Me.define();function u8(t){return[yn.define(e=>new Vee(e,t)),ng.of(t)]}const Zu=Me.define({combine(t){return Ns(t,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function Fee(t={}){return[Zu.of(t),Bee,jee,Zee,NR.of(!0)]}function c8(t){return t.startState.facet(Zu)!=t.state.facet(Zu)}const Bee=u8({above:!0,markers(t){let{state:e}=t,n=e.facet(Zu),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||n.drawRangeCursor&&!(s&&Qe.ios&&n.iosSelectionHandles)){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=r.empty?r:ae.cursor(r.head,r.assoc);for(let l of Va.forRange(t,o,a))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=c8(t);return n&&uT(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){uT(e.state,t)},class:"cm-cursorLayer"});function uT(t,e){e.style.animationDuration=t.facet(Zu).cursorBlinkRate+"ms"}const jee=u8({above:!1,markers(t){let e=[],{main:n,ranges:i}=t.state.selection;for(let r of i)if(!r.empty)for(let s of Va.forRange(t,"cm-selectionBackground",r))e.push(s);if(Qe.ios&&!n.empty&&t.state.facet(Zu).iosSelectionHandles){for(let r of Va.forRange(t,"cm-selectionHandle cm-selectionHandle-start",ae.cursor(n.from,1)))e.push(r);for(let r of Va.forRange(t,"cm-selectionHandle cm-selectionHandle-end",ae.cursor(n.to,1)))e.push(r)}return e},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||c8(t)},class:"cm-selectionLayer"}),Zee=ns.highest(Se.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),h8=Je.define({map(t,e){return t==null?null:e.mapPos(t)}}),ih=Rn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(h8)?i.value:n,t)}}),Xee=yn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(ih);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(ih)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(ih),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(ih)!=t&&this.view.dispatch({effects:h8.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function zee(){return[ih,Xee]}function cT(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),o=n,a;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;a=e.exec(s.value);)r(o+a.index,a)}function Wee(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class Uee{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(a,l,u,c)=>r(c,u,u+a[0].length,a,l);else if(typeof i=="function")this.addMatch=(a,l,u,c)=>{let h=i(a,l,u);h&&c(u,u+a[0].length,h)};else if(i)this.addMatch=(a,l,u,c)=>c(u,u+a[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new Vi,i=n.add.bind(n);for(let{from:r,to:s}of Wee(e,this.maxLength))cT(e.state.doc,this.regexp,r,s,(o,a)=>this.addMatch(a,e,o,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,o,a,l)=>{l>=e.view.viewport.from&&a<=e.view.viewport.to&&(i=Math.min(a,i),r=Math.max(l,r))}),e.viewportMoved||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let o=Math.max(s.from,i),a=Math.min(s.to,r);if(a>=o){let l=e.state.doc.lineAt(o),u=l.tol.from;o--)if(this.boundary.test(l.text[o-1-l.from])){c=o;break}for(;ad.push(S.range(m,v));if(l==u)for(this.regexp.lastIndex=c-l.from;(p=this.regexp.exec(l.text))&&p.indexthis.addMatch(v,e,m,g));n=n.update({filterFrom:c,filterTo:h,filter:(m,v)=>mh,add:d})}}return n}}const $b=/x/.unicode!=null?"gu":"g",qee=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,$b),Hee={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let G1=null;function Yee(){var t;if(G1==null&&typeof document<"u"&&document.body){let e=document.body.style;G1=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return G1||!1}const ig=Me.define({combine(t){let e=Ns(t,{render:null,specialChars:qee,addSpecialChars:null});return(e.replaceTabs=!Yee())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,$b)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,$b)),e}});function Gee(t={}){return[ig.of(t),Kee()]}let hT=null;function Kee(){return hT||(hT=yn.fromClass(class{constructor(t){this.view=t,this.decorations=je.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(ig)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Uee({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=Ti(e[0],0);if(s==9){let o=r.lineAt(i),a=n.state.tabSize,l=Hr(o.text,a,i-o.from);return je.replace({widget:new nte((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=je.replace({widget:new tte(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(ig);t.startState.facet(ig)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Jee="•";function ete(t){return t>=32?Jee:t==10?"␤":String.fromCharCode(9216+t)}class tte extends Er{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=ete(this.code),i=e.state.phrase("Control character")+" "+(Hee[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class nte extends Er{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function ite(){return ste}const rte=je.line({class:"cm-activeLine"}),ste=yn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(rte.range(r.from)),e=r.from)}return je.set(n)}},{decorations:t=>t.decorations}),Rb=2e3;function ote(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>Rb||n.off>Rb||e.col<0||n.col<0){let o=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=i;l<=r;l++){let u=t.doc.line(l);u.length<=a&&s.push(ae.range(u.from+o,u.to+a))}}else{let o=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=i;l<=r;l++){let u=t.doc.line(l),c=fb(u.text,o,t.tabSize,!0);if(c<0)s.push(ae.cursor(u.to));else{let h=fb(u.text,a,t.tabSize);s.push(ae.range(u.from+c,u.from+h))}}}return s}function ate(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function fT(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>Rb?-1:r==i.length?ate(t,e.clientX):Hr(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function lte(t,e){let n=fT(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),o=r.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},i=i.map(r.changes)}},get(r,s,o){let a=fT(t,r);if(!a)return i;let l=ote(t.state,n,a);return l.length?o?ae.create(l.concat(i.ranges)):ae.create(l):i}}:null}function ute(t){let e=(n=>n.altKey&&n.button==0);return Se.mouseSelectionStyle.of((n,i)=>e(i)?lte(n,i):null)}const cte={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},hte={style:"cursor: crosshair"};function fte(t={}){let[e,n]=cte[t.key||"Alt"],i=yn.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Se.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?hte:null})]}const vp="-10000px";class f8{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=i(o,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=n?[]:null;for(let l=0;ln[u]=l),n.length=a.length),this.input=r,this.tooltips=s,this.tooltipViews=o,!0}}function dte(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const K1=Me.define({combine:t=>{var e,n,i;return{position:Qe.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||dte}}}),dT=new WeakMap,nC=yn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(K1);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new f8(t,iC,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(K1);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=vp,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(Qe.safari){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=Kw(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(K1).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=t,o=[];for(let a=0;a=Math.min(n.bottom,i.bottom)||h.rightMath.min(n.right,i.right)+.1)){c.style.top=vp;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,g=p?7:0,m=d.right-d.left,v=(e=dT.get(u))!==null&&e!==void 0?e:d.bottom-d.top,S=u.offset||gte,b=this.view.textDirection==Kt.LTR,w=d.width>i.right-i.left?b?i.left:i.right-d.width:b?Math.max(i.left,Math.min(h.left-(p?14:0)+S.x,i.right-m)):Math.min(Math.max(i.left,h.left-m+(p?14:0)-S.x),i.right-m),k=this.above[a];!l.strictSide&&(k?h.top-v-g-S.yi.bottom)&&k==i.bottom-h.bottom>h.top-i.top&&(k=this.above[a]=!k);let C=(k?h.top-i.top:i.bottom-h.bottom)-g;if(Cw&&A.topx&&(x=k?A.top-v-2-g:A.bottom+g+2);if(this.position=="absolute"?(c.style.top=(x-t.parent.top)/s+"px",pT(c,(w-t.parent.left)/r)):(c.style.top=x/s+"px",pT(c,w/r)),p){let A=h.left+(b?S.x:-S.x)-(w+14-7);p.style.left=A/r+"px"}u.overlap!==!0&&o.push({left:w,top:x,right:E,bottom:x+v}),c.classList.toggle("cm-tooltip-above",k),c.classList.toggle("cm-tooltip-below",!k),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=vp}},{eventObservers:{scroll(){this.maybeMeasure()}}});function pT(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const pte=Se.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),gte={x:0,y:0},iC=Me.define({enables:[nC,pte]}),bm=Me.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class bO{static create(e){return new bO(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new f8(e,bm,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const mte=iC.compute([bm],t=>{let e=t.facet(bm);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:bO.create,above:e[0].above,arrow:e.some(n=>n.arrow)}}),d8=Me.define();class Ote{constructor(e,n,i,r,s,o){this.view=e,this.source=n,this.field=i,this.locked=r,this.setHover=s,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(e){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eo.bottom||n.xo.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(r)).find(u=>u.from<=r&&u.to>=r),l=a&&a.dir==Kt.RTL?-1:1;s=n.x{if(a&&!(Array.isArray(a)&&!a.length)){let l=Array.isArray(a)?a:[a];r&&this.locked.set(l,r),e.dispatch({effects:this.setHover.of(l)})}};if(s&&"then"in s){let a=this.pending={pos:n};s.then(l=>{this.pending==a&&(this.pending=null,o(l))},l=>$i(e.state,l,"hover tooltip"))}else o(s)}get tooltip(){let e=this.view.plugin(nC),n=e?e.manager.tooltips.findIndex(i=>i.create==bO.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&!this.locked.has(r)&&s&&!xte(s.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,a=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!vte(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length&&!this.locked.has(n)){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n);let{active:r}=this;r.length&&!this.locked.has(r)&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const bp=4;function xte(t,e){let{left:n,right:i,top:r,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();r=Math.min(a.top,r),s=Math.max(a.bottom,s)}return e.clientX>=n-bp&&e.clientX<=i+bp&&e.clientY>=r-bp&&e.clientY<=s+bp}function vte(t,e,n,i,r,s){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.rightr||Math.min(o.bottom,a)=e&&l<=n}function bte(t,e={}){let n=Je.define(),i=new WeakMap,r=Rn.define({create(){return[]},update(o,a){let l=i.get(o);if(o.length&&(e.hideOnChange&&(a.docChanged||a.selection)?o=[]:l&&l(a)?o=[]:e.hideOn&&(o=o.filter(u=>!e.hideOn(a,u)))),a.docChanged&&o.length){let u=[];for(let c of o){let h=a.changes.mapPos(c.pos,-1,Gn.TrackDel);if(h!=null){let d=Object.assign(Object.create(null),c);d.pos=h,d.end!=null&&(d.end=a.changes.mapPos(d.end)),u.push(d)}}o=u}for(let u of a.effects)u.is(n)&&(o=u.value,l=void 0),(u.is(Ste)&&!u.value||u.value==r)&&(o=[]);return o.length&&l&&i.set(o,l),o},provide:o=>bm.from(o)});const s=yn.define(o=>new Ote(o,t,r,i,n,e.hoverTime||300));return{active:r,extension:[r,s,d8.of(s),mte]}}function yte(t,e,n,i={}){var r;let s=t.state.facet(d8).map(o=>t.plugin(o)).filter(o=>!!o);if(i.tooltip&&i.tooltip.active){let o=s.find(a=>a.field==i.tooltip.active);o&&(s=[o])}for(let o of s)o.activateHover(t,e,n,(r=i.until)!==null&&r!==void 0?r:(()=>!1))}function p8(t,e){let n=t.plugin(nC);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const Ste=Je.define(),gT=Me.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function rC(t,e){let n=t.plugin(g8),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const g8=yn.fromClass(class{constructor(t){this.input=t.state.facet(cf),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(gT);this.top=new yp(t,!0,e.topContainer),this.bottom=new yp(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(gT);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new yp(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new yp(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(cf);if(n!=this.input){let i=n.filter(l=>l),r=[],s=[],o=[],a=[];for(let l of i){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),a.push(c)):(c=this.panels[u],c.update&&c.update(t)),r.push(c),(c.top?s:o).push(c)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Se.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class yp{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=mT(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=mT(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function mT(t){let e=t.nextSibling;return t.remove(),e}const cf=Me.define({enables:g8});function wte(t,e){let n,i=new Promise(o=>n=o),r=o=>Cte(o,e,n);t.state.field(J1,!1)?t.dispatch({effects:m8.of(r)}):t.dispatch({effects:Je.appendConfig.of(J1.init(()=>[r]))});let s=O8.of(r);return{close:s,result:i.then(o=>((t.win.queueMicrotask||(l=>t.win.setTimeout(l,10)))(()=>{t.state.field(J1).indexOf(r)>-1&&t.dispatch({effects:s})}),o))}}const J1=Rn.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(m8)?t=[n.value].concat(t):n.is(O8)&&(t=t.filter(i=>i!=n.value));return t},provide:t=>cf.computeN([t],e=>e.field(t))}),m8=Je.define(),O8=Je.define();function Cte(t,e,n){let i=e.content?e.content(t,()=>o(null)):null;if(!i){if(i=jt("form"),e.input){let a=jt("input",e.input);/^(text|password|number|email|tel|url)$/.test(a.type)&&a.classList.add("cm-textfield"),a.name||(a.name="input"),i.appendChild(jt("label",(e.label||"")+": ",a))}else i.appendChild(document.createTextNode(e.label||""));i.appendChild(document.createTextNode(" ")),i.appendChild(jt("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let r=i.nodeName=="FORM"?[i]:i.querySelectorAll("form");for(let a=0;a{u.keyCode==27?(u.preventDefault(),o(null)):u.keyCode==13&&(u.preventDefault(),o(l))}),l.addEventListener("submit",u=>{u.preventDefault(),o(l)})}let s=jt("div",i,jt("button",{onclick:()=>o(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function o(a){s.contains(s.ownerDocument.activeElement)&&t.focus(),n(a)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let a;typeof e.focus=="string"?a=i.querySelector(e.focus):a=i.querySelector("input")||i.querySelector("button"),a&&"select"in a?a.select():a&&"focus"in a&&a.focus()}}}}class $s extends ra{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}$s.prototype.elementClass="";$s.prototype.toDOM=void 0;$s.prototype.mapMode=Gn.TrackBefore;$s.prototype.startSide=$s.prototype.endSide=-1;$s.prototype.point=!0;const rg=Me.define(),_te=Me.define(),kte={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>dt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Eh=Me.define();function x8(t){return[v8(),Eh.of({...kte,...t})]}const OT=Me.define({combine:t=>t.some(e=>e)});function v8(t){return[Ete]}const Ete=yn.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Eh).map(e=>new vT(t,e)),this.fixed=!t.state.facet(OT);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(OT)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=dt.iter(this.view.state.facet(rg),this.view.viewport.from),i=[],r=this.gutters.map(s=>new Tte(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Jn.Text&&o){Lb(n,i,a.from);for(let l of r)l.line(this.view,a,i);o=!1}else if(a.widget)for(let l of r)l.widget(this.view,a)}else if(s.type==Jn.Text){Lb(n,i,s.from);for(let o of r)o.line(this.view,s,i)}else if(s.widget)for(let o of r)o.widget(this.view,s);for(let s of r)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Eh),n=t.state.facet(Eh),i=t.docChanged||t.heightChanged||t.viewportChanged||!dt.eq(t.startState.facet(rg),t.state.facet(rg),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let o=e.indexOf(s);o<0?r.push(new vT(this.view,s)):(this.gutters[o].update(t),r.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Se.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Kt.LTR?{left:i,right:r}:{right:i,left:r}})});function xT(t){return Array.isArray(t)?t:[t]}function Lb(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class Tte{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=dt.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==r.elements.length){let a=new b8(e,o,s,i);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,o,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];Lb(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let o=this.gutter;r.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),r=i?[i]:null;for(let s of e.state.facet(_te)){let o=s(e,n.widget,n);o&&(r||(r=[])).push(o)}r&&this.addElement(e,n,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class vT{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[i](e,a,r)&&r.preventDefault()});this.markers=xT(n.markers(e)),n.initialSpacer&&(this.spacer=new b8(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=xT(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!dt.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class b8{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),Ate(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=ss(a,l,u)||o(a,l,u):o}return i}})}});class ex extends $s{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function tx(t,e){return t.state.facet(Kl).formatNumber(e,t.state)}const $te=Eh.compute([Kl],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Pte)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new ex(tx(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let r of e.state.facet(Ite)){let s=r(e,n,i);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Kl)!=e.state.facet(Kl),initialSpacer(e){return new ex(tx(e,bT(e.state.doc.lines)))},updateSpacer(e,n){let i=tx(n.view,bT(n.view.state.doc.lines));return i==e.number?e:new ex(i)},domEventHandlers:t.facet(Kl).domEventHandlers,side:"before"}));function sC(t={}){return[Kl.of(t),v8(),$te]}function bT(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(Rte.range(r)))}return dt.of(e)});function Nte(){return Lte}let Mte=0;class Yi{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=Mte++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof Yi&&(n=e),n?.base)throw new Error("Can not derive from a modified tag");let r=new Yi(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(e){let n=new ym(e);return i=>i.modified.indexOf(n)>-1?i:ym.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}}let Qte=0;class ym{constructor(e){this.name=e,this.instances=[],this.id=Qte++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(a=>a.base==e&&Dte(n,a.modified));if(i)return i;let r=[],s=new Yi(e.name,r,e,n);for(let a of n)a.instances.push(s);let o=Vte(n);for(let a of e.set)if(!a.modified.length)for(let l of o)r.push(ym.get(a,l));return s}}function Dte(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function Vte(t){let e=[[]];for(let n=0;ni.length-n.length)}function kc(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],o=2,a=r;for(let h=0;;){if(a=="..."&&h>0&&h+3==r.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+r);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),h+=d[0].length,h==r.length)break;let p=r[h++];if(h==r.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+r);a=r.slice(h)}let l=s.length-1,u=s[l];if(!u)throw new RangeError("Invalid path: "+r);let c=new hf(i,o,l>0?s.slice(0,l):null);e[u]=c.sort(e[u])}}return y8.add(e)}const y8=new tt({combine(t,e){let n,i,r;for(;t||e;){if(!t||e&&t.depth>=e.depth?(r=e,e=e.next):(r=t,t=t.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let s=new hf(r.tags,r.mode,r.context);n?n.next=s:i=s,n=s}return i}});class hf{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=r;for(let a of s)for(let l of a.set){let u=n[l.id];if(u){o=o?o+" "+u:u;break}}return o},scope:i}}function Fte(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function Bte(t,e,n,i=0,r=t.length){let s=new jte(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class jte{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:o,from:a,to:l}=e;if(a>=i||l<=n)return;o.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(o)));let u=r,c=Zte(e)||hf.empty,h=Fte(s,c.tags);if(h&&(u&&(u+=" "),u+=h,c.mode==1&&(r+=(r?" ":"")+h)),this.startSpan(Math.max(n,a),u),c.opaque)return;let d=e.tree&&e.tree.prop(tt.mounted);if(d&&d.overlay){let p=e.node.enter(d.overlay[0].from+a,1),g=this.highlighters.filter(v=>!v.scope||v.scope(d.tree.type)),m=e.firstChild();for(let v=0,S=a;;v++){let b=v=w||!e.nextSibling())););if(!b||w>i)break;S=b.to+a,S>n&&(this.highlightRange(p.cursor(),Math.max(n,b.from+a),Math.min(i,S),"",g),this.startSpan(Math.min(i,S),u))}m&&e.parent()}else if(e.firstChild()){d&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function Zte(t){let e=t.type.prop(y8);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Ne=Yi.define,Sp=Ne(),Po=Ne(),yT=Ne(Po),ST=Ne(Po),Io=Ne(),wp=Ne(Io),nx=Ne(Io),cs=Ne(),ka=Ne(cs),ls=Ne(),us=Ne(),Nb=Ne(),zc=Ne(Nb),Cp=Ne(),Q={comment:Sp,lineComment:Ne(Sp),blockComment:Ne(Sp),docComment:Ne(Sp),name:Po,variableName:Ne(Po),typeName:yT,tagName:Ne(yT),propertyName:ST,attributeName:Ne(ST),className:Ne(Po),labelName:Ne(Po),namespace:Ne(Po),macroName:Ne(Po),literal:Io,string:wp,docString:Ne(wp),character:Ne(wp),attributeValue:Ne(wp),number:nx,integer:Ne(nx),float:Ne(nx),bool:Ne(Io),regexp:Ne(Io),escape:Ne(Io),color:Ne(Io),url:Ne(Io),keyword:ls,self:Ne(ls),null:Ne(ls),atom:Ne(ls),unit:Ne(ls),modifier:Ne(ls),operatorKeyword:Ne(ls),controlKeyword:Ne(ls),definitionKeyword:Ne(ls),moduleKeyword:Ne(ls),operator:us,derefOperator:Ne(us),arithmeticOperator:Ne(us),logicOperator:Ne(us),bitwiseOperator:Ne(us),compareOperator:Ne(us),updateOperator:Ne(us),definitionOperator:Ne(us),typeOperator:Ne(us),controlOperator:Ne(us),punctuation:Nb,separator:Ne(Nb),bracket:zc,angleBracket:Ne(zc),squareBracket:Ne(zc),paren:Ne(zc),brace:Ne(zc),content:cs,heading:ka,heading1:Ne(ka),heading2:Ne(ka),heading3:Ne(ka),heading4:Ne(ka),heading5:Ne(ka),heading6:Ne(ka),contentSeparator:Ne(cs),list:Ne(cs),quote:Ne(cs),emphasis:Ne(cs),strong:Ne(cs),link:Ne(cs),monospace:Ne(cs),strikethrough:Ne(cs),inserted:Ne(),deleted:Ne(),changed:Ne(),invalid:Ne(),meta:Cp,documentMeta:Ne(Cp),annotation:Ne(Cp),processingInstruction:Ne(Cp),definition:Yi.defineModifier("definition"),constant:Yi.defineModifier("constant"),function:Yi.defineModifier("function"),standard:Yi.defineModifier("standard"),local:Yi.defineModifier("local"),special:Yi.defineModifier("special")};for(let t in Q){let e=Q[t];e instanceof Yi&&(e.name=t)}S8([{tag:Q.link,class:"tok-link"},{tag:Q.heading,class:"tok-heading"},{tag:Q.emphasis,class:"tok-emphasis"},{tag:Q.strong,class:"tok-strong"},{tag:Q.keyword,class:"tok-keyword"},{tag:Q.atom,class:"tok-atom"},{tag:Q.bool,class:"tok-bool"},{tag:Q.url,class:"tok-url"},{tag:Q.labelName,class:"tok-labelName"},{tag:Q.inserted,class:"tok-inserted"},{tag:Q.deleted,class:"tok-deleted"},{tag:Q.literal,class:"tok-literal"},{tag:Q.string,class:"tok-string"},{tag:Q.number,class:"tok-number"},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],class:"tok-string2"},{tag:Q.variableName,class:"tok-variableName"},{tag:Q.local(Q.variableName),class:"tok-variableName tok-local"},{tag:Q.definition(Q.variableName),class:"tok-variableName tok-definition"},{tag:Q.special(Q.variableName),class:"tok-variableName2"},{tag:Q.definition(Q.propertyName),class:"tok-propertyName tok-definition"},{tag:Q.typeName,class:"tok-typeName"},{tag:Q.namespace,class:"tok-namespace"},{tag:Q.className,class:"tok-className"},{tag:Q.macroName,class:"tok-macroName"},{tag:Q.propertyName,class:"tok-propertyName"},{tag:Q.operator,class:"tok-operator"},{tag:Q.comment,class:"tok-comment"},{tag:Q.meta,class:"tok-meta"},{tag:Q.invalid,class:"tok-invalid"},{tag:Q.punctuation,class:"tok-punctuation"}]);var ix;const Fo=new tt;function yO(t){return Me.define({combine:t?e=>e.concat(t):void 0})}const oC=new tt;class Ji{constructor(e,n,i=[],r=""){this.data=e,this.name=r,ct.prototype.hasOwnProperty("tree")||Object.defineProperty(ct.prototype,"tree",{get(){return Xt(this)}}),this.parser=n,this.extension=[aa.of(this),ct.languageData.of((s,o,a)=>{let l=wT(s,o,a),u=l.type.prop(Fo);if(!u)return[];let c=s.facet(u),h=l.type.prop(oC);if(h){let d=l.resolve(o-l.from,a);for(let p of h)if(p.test(d,s)){let g=s.facet(p.facet);return p.type=="replace"?g:g.concat(c)}}return c})].concat(i)}isActiveAt(e,n,i=-1){return wT(e,n,i).type.prop(Fo)==this.data}findRegions(e){let n=e.facet(aa);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,o)=>{if(s.prop(Fo)==this.data){i.push({from:o,to:o+s.length});return}let a=s.prop(tt.mounted);if(a){if(a.tree.prop(Fo)==this.data){if(a.overlay)for(let l of a.overlay)i.push({from:l.from+o,to:l.to+o});else i.push({from:o,to:o+s.length});return}else if(a.overlay){let l=i.length;if(r(a.tree,a.overlay[0].from+o),i.length>l)return}}for(let l=0;li.isTop?n:void 0)]}),e.name)}configure(e,n){return new Xu(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Xt(t){let e=t.field(Ji.state,!1);return e?e.tree:pt.empty}class Xte{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Wc=null;class ll{constructor(e,n,i=[],r,s,o,a,l){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new ll(e,n,[],pt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Xte(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=pt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Js.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Wc;Wc=this;try{return e()}finally{Wc=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=CT(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,h,d)=>l.push({fromA:u,toA:c,fromB:h,toB:d})),i=Js.applyChanges(i,l),r=pt.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),h=e.mapPos(u.to,-1);ce.from&&(this.fragments=CT(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends pO{createParse(n,i,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let l=Wc;if(l){for(let u of r)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new pt($n.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Wc}}function CT(t,e,n){return Js.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class zu{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new zu(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=ll.create(e.facet(aa).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new zu(i)}}Ji.state=Rn.define({create:zu.init,update(t,e){for(let n of e.effects)if(n.is(Ji.setState))return n.value;return e.startState.facet(aa)!=e.state.facet(aa)?zu.init(e.state):t.apply(e)}});let w8=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(w8=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const rx=typeof navigator<"u"&&(!((ix=navigator.scheduling)===null||ix===void 0)&&ix.isInputPending)?()=>navigator.scheduling.isInputPending():null,zte=yn.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Ji.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Ji.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=w8(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,l=s.context.work(()=>rx&&rx()||Date.now()>o,r+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Ji.setState.of(new zu(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>$i(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),aa=Me.define({combine(t){return t.length?t[0]:null},enables:t=>[Ji.state,zte,Se.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Wu{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class ee{constructor(e,n,i,r,s,o=void 0){this.name=e,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:i}=e;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new ee(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,i)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,n,i=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(s=>s==n))return r;if(i)for(let r of e)for(let s of r.alias){let o=n.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+s.length])))return r}return null}}const Wte=Me.define(),wd=Me.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function ul(t){let e=t.facet(wd);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function ff(t,e){let n="",i=t.tabSize,r=t.facet(wd)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s=e?Ute(t,n,e):null}class SO{constructor(e,n={}){this.state=e,this.options=n,this.unit=ul(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r-1&&(s+=o-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return Hr(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(r);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ec=new tt;function Ute(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let o=r;o&&!(o.fromi.node.to||o.from==i.node.from&&o.type==i.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)i={node:s[o],next:i}}return C8(i,t,n)}function C8(t,e,n){for(let i=t;i;i=i.next){let r=Hte(i.node);if(r)return r(lC.create(e,n,i))}return 0}function qte(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function Hte(t){let e=t.type.prop(Ec);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(tt.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return o=>_8(o,!0,1,void 0,s&&!qte(o)?r.from:void 0)}return t.parent==null?Yte:null}function Yte(){return 0}class lC extends SO{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new lC(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(Gte(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return C8(this.context.next,this.base,this.pos)}}function Gte(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function Kte(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==i)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let u=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+u}}a=l.to}}function Jte({closing:t,align:e=!0,units:n=1}){return i=>_8(i,e,n,t)}function _8(t,e,n,i,r){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=i&&s.slice(o,o+i.length)==i||r==t.pos+o,l=e?Kte(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const ene=t=>t.baseIndent;function sg({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const tne=200;function nne(){return ct.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+tne)return t;let s=n.sliceString(r.from,i);if(!e.some(u=>u.test(s)))return t;let{state:o}=t,a=-1,l=[];for(let{head:u}of o.selection.ranges){let c=o.doc.lineAt(u);if(c.from==a)continue;a=c.from;let h=aC(o,c.from);if(h==null)continue;let d=/^\s*/.exec(c.text)[0],p=ff(o,h);d!=p&&l.push({from:c.from,to:c.from+d.length,insert:p})}return l.length?[t,{changes:l,sequential:!0}]:t})}const k8=Me.define(),Tc=new tt;function E8(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(s&&a.from=e&&u.to>n&&(s=u)}}return s}function rne(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Sm(t,e,n){for(let i of t.facet(k8)){let r=i(t,e,n);if(r)return r}return ine(t,e,n)}function T8(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const wO=Je.define({map:T8}),Cd=Je.define({map:T8});function A8(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const cl=Rn.define({create(){return je.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((i,r)=>t=_T(t,i,r)),t=t.map(e.changes);let n=[];for(let i of e.effects)i.is(wO)&&!sne(t,i.value.from,i.value.to)?n.push(i.value):i.is(Cd)&&(t=t.update({filter:(r,s)=>i.value.from!=r||i.value.to!=s,filterFrom:i.value.from,filterTo:i.value.to}));if(n.length){let{preparePlaceholder:i}=e.state.facet($8),r=n.map(s=>(i?je.replace({widget:new fne(i(e.state,s))}):kT).range(s.from,s.to));t=t.update({add:r})}return e.selection&&(t=_T(t,e.selection.main.head)),t},provide:t=>Se.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{re&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(r,s)=>r>=n||s<=e}):t}function wm(t,e,n){var i;let r=null;return(i=t.field(cl,!1))===null||i===void 0||i.between(e,n,(s,o)=>{(!r||r.from>s)&&(r={from:s,to:o})}),r}function sne(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function P8(t,e){return t.field(cl,!1)?e:e.concat(Je.appendConfig.of(R8()))}const one=t=>{for(let e of A8(t)){let n=Sm(t.state,e.from,e.to);if(n)return t.dispatch({effects:P8(t.state,[wO.of(n),I8(t,n)])}),!0}return!1},ane=t=>{if(!t.state.field(cl,!1))return!1;let e=[];for(let n of A8(t)){let i=wm(t.state,n.from,n.to);i&&e.push(Cd.of(i),I8(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function I8(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return Se.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const lne=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(cl,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(Cd.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},cne=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:one},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:ane},{key:"Ctrl-Alt-[",run:lne},{key:"Ctrl-Alt-]",run:une}],hne={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},$8=Me.define({combine(t){return Ns(t,hne)}});function R8(t){return[cl,gne]}function L8(t,e){let{state:n}=t,i=n.facet($8),r=o=>{let a=t.lineBlockAt(t.posAtDOM(o.target)),l=wm(t.state,a.from,a.to);l&&t.dispatch({effects:Cd.of(l)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const kT=je.replace({widget:new class extends Er{toDOM(t){return L8(t,null)}}});class fne extends Er{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return L8(e,this.value)}}const dne={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class sx extends $s{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function pne(t={}){let e={...dne,...t},n=new sx(e,!0),i=new sx(e,!1),r=yn.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(aa)!=o.state.facet(aa)||o.startState.field(cl,!1)!=o.state.field(cl,!1)||Xt(o.startState)!=Xt(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new Vi;for(let l of o.viewportLineBlocks){let u=wm(o.state,l.from,l.to)?i:Sm(o.state,l.from,l.to)?n:null;u&&a.add(l.from,l.from,u)}return a.finish()}}),{domEventHandlers:s}=e;return[r,x8({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(r))===null||a===void 0?void 0:a.markers)||dt.empty},initialSpacer(){return new sx(e,!1)},domEventHandlers:{...s,click:(o,a,l)=>{if(s.click&&s.click(o,a,l))return!0;let u=wm(o.state,a.from,a.to);if(u)return o.dispatch({effects:Cd.of(u)}),!0;let c=Sm(o.state,a.from,a.to);return c?(o.dispatch({effects:wO.of(c)}),!0):!1}}}),R8()]}const gne=Se.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class _d{constructor(e,n){this.specs=e;let i;function r(a){let l=co.newName();return(i||(i=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,o=n.scope;this.scope=o instanceof Ji?a=>a.prop(Fo)==o.data:o?a=>a==o:void 0,this.style=S8(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=i?new co(i):null,this.themeType=n.themeType}static define(e,n){return new _d(e,n||{})}}const Mb=Me.define(),N8=Me.define({combine(t){return t.length?[t[0]]:null}});function ox(t){let e=t.facet(Mb);return e.length?e:t.facet(N8)}function M8(t,e){let n=[One],i;return t instanceof _d&&(t.module&&n.push(Se.styleModule.of(t.module)),i=t.themeType),e?.fallback?n.push(N8.of(t)):i?n.push(Mb.computeN([Se.darkTheme],r=>r.facet(Se.darkTheme)==(i=="dark")?[t]:[])):n.push(Mb.of(t)),n}class mne{constructor(e){this.markCache=Object.create(null),this.tree=Xt(e.state),this.decorations=this.buildDeco(e,ox(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Xt(e.state),i=ox(e.state),r=i!=ox(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return je.none;let i=new Vi;for(let{from:r,to:s}of e.visibleRanges)Bte(this.tree,n,(o,a,l)=>{i.add(o,a,this.markCache[l]||(this.markCache[l]=je.mark({class:l})))},r,s);return i.finish()}}const One=ns.high(yn.fromClass(mne,{decorations:t=>t.decorations})),xne=_d.define([{tag:Q.meta,color:"#404740"},{tag:Q.link,textDecoration:"underline"},{tag:Q.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Q.emphasis,fontStyle:"italic"},{tag:Q.strong,fontWeight:"bold"},{tag:Q.strikethrough,textDecoration:"line-through"},{tag:Q.keyword,color:"#708"},{tag:[Q.atom,Q.bool,Q.url,Q.contentSeparator,Q.labelName],color:"#219"},{tag:[Q.literal,Q.inserted],color:"#164"},{tag:[Q.string,Q.deleted],color:"#a11"},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],color:"#e40"},{tag:Q.definition(Q.variableName),color:"#00f"},{tag:Q.local(Q.variableName),color:"#30a"},{tag:[Q.typeName,Q.namespace],color:"#085"},{tag:Q.className,color:"#167"},{tag:[Q.special(Q.variableName),Q.macroName],color:"#256"},{tag:Q.definition(Q.propertyName),color:"#00c"},{tag:Q.comment,color:"#940"},{tag:Q.invalid,color:"#f00"}]),vne=Se.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Q8=1e4,D8="()[]{}",V8=Me.define({combine(t){return Ns(t,{afterCursor:!0,brackets:D8,maxScanDistance:Q8,renderMatch:Sne})}}),bne=je.mark({class:"cm-matchingBracket"}),yne=je.mark({class:"cm-nonmatchingBracket"});function Sne(t){let e=[],n=t.matched?bne:yne;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}function ET(t){let e=[],n=t.facet(V8);for(let i of t.selection.ranges){if(!i.empty)continue;let r=ks(t,i.head,-1,n)||i.head>0&&ks(t,i.head-1,1,n)||n.afterCursor&&(ks(t,i.head,1,n)||i.headt.decorations}),Cne=[wne,vne];function _ne(t={}){return[V8.of(t),Cne]}const F8=new tt;function Qb(t,e,n){let i=t.prop(e<0?tt.openedBy:tt.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function Db(t){let e=t.type.prop(F8);return e?e(t.node):t}function ks(t,e,n,i={}){let r=i.maxScanDistance||Q8,s=i.brackets||D8,o=Xt(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let u=Qb(l.type,n,s);if(u&&l.from0?e>=c.from&&ec.from&&e<=c.to))return kne(t,e,n,l,c,u,s)}}return Ene(t,e,n,o,a.type,r,s)}function kne(t,e,n,i,r,s,o){let a=i.parent,l={from:r.from,to:r.to},u=0,c=a?.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(u==0&&s.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let d=0;!c.next().done&&d<=s;){let p=c.value;n<0&&(d+=p.length);let g=e+d*n;for(let m=n>0?0:p.length-1,v=n>0?p.length:-1;m!=v;m+=n){let S=o.indexOf(p[m]);if(!(S<0||i.resolveInner(g+m,1).type!=r))if(S%2==0==n>0)h++;else{if(h==1)return{start:u,end:{from:g+m,to:g+m+1},matched:S>>1==l>>1};h--}}n>0&&(d+=p.length)}return c.done?{start:u,matched:!1}:null}function TT(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=r;for(let o=i;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posn}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return r(s)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function Tne(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||Ane,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||hC,mergeTokens:t.mergeTokens!==!1}}function Ane(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const AT=new WeakMap;class uC extends Ji{constructor(e){let n=yO(e.languageData),i=Tne(e),r,s=new class extends pO{createParse(o,a,l){return new Ine(r,o,a,l)}};super(n,s,[],e.name),this.topNode=Lne(n,this),r=this,this.streamParser=i,this.stateAfter=new tt({perNode:!0}),this.tokenTable=e.tokenTable?new z8(i.tokenTable):Rne}static define(e){return new uC(e)}getIndent(e){let n,{overrideIndentation:i}=e.options;i&&(n=AT.get(e.state),n!=null&&n1e4)return null;for(;s=i&&n+e.length<=r&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=n+e.positions[o],u=a instanceof pt&&l=e.length)return e;!r&&n==0&&e.type==t.topNode&&(r=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],a=e.children[s],l;if(on&&cC(t,s.tree,0-s.offset,n,a),u;if(l&&l.pos<=i&&(u=j8(t,s.tree,n+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:u}}return{state:t.streamParser.startState(r?ul(r):4),tree:pt.empty}}let Ine=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=ll.get(),o=r[0].from,{state:a,tree:l}=Pne(e,i,o,this.to,s?.state);this.state=a,this.parsedPos=this.chunkStart=o+l.length;for(let u=0;uu.from<=s.viewport.from&&u.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(ul(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=ll.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),i=Math.min(n,this.chunkStart+512);for(e&&(i=Math.min(i,e.viewport.to));this.parsedPos=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==` +`&&(n="");else{let i=n.indexOf(` +`);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let o=this.ranges[r].from,a=this.lineAfter(o);n+=a,i=o+a.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+n;if(i>0?r>s:r>=s)break;let o=this.ranges[++this.rangeIndex].from;n+=o-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(n,r,1),n+=r;let a=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-a}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==n?this.chunk[o+2]=i:this.chunk.push(e,n,i,s),r}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,o=new B8(n,e?e.state.tabSize:4,e?ul(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let a=Z8(s.token,o,this.state);if(a&&(r=this.emitToken(this.lang.tokenTable.resolve(a),this.parsedPos+o.start,this.parsedPos+o.pos,r)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return r}throw new Error("Stream parser failed to advance stream.")}const hC=Object.create(null),df=[$n.none],$ne=new wc(df),PT=[],IT=Object.create(null),X8=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])X8[t]=W8(hC,e);class z8{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),X8)}resolve(e){return e?this.table[e]||(this.table[e]=W8(this.extra,e)):0}}const Rne=new z8(hC);function ax(t,e){PT.indexOf(t)>-1||(PT.push(t),console.warn(e))}function W8(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let u of a.split(".")){let c=t[u]||Q[u];c?typeof c=="function"?l.length?l=l.map(c):ax(u,`Modifier ${u} used at start of tag`):l.length?ax(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:ax(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(a=>a.id),s=IT[r];if(s)return s.id;let o=IT[r]=$n.define({id:df.length,name:i,props:[kc({[i]:n})]});return df.push(o),o.id}function Lne(t,e){let n=$n.define({id:df.length,name:"Document",props:[Fo.add(()=>t),Ec.add(()=>i=>e.getIndent(i))],top:!0});return df.push(n),n}Kt.RTL,Kt.LTR;function de(t){return new Wu(uC.define(t))}function ko(t){return se(()=>import("./index-DTeo6LWm.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>e.sql({dialect:e[t]}))}const Nne=[ee.of({name:"C",extensions:["c","h","ino"],load(){return se(()=>import("./index-BjM0cxzn.js"),__vite__mapDeps([7,1,2,3,4,5,6])).then(t=>t.cpp())}}),ee.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return se(()=>import("./index-BjM0cxzn.js"),__vite__mapDeps([7,1,2,3,4,5,6])).then(t=>t.cpp())}}),ee.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return ko("Cassandra")}}),ee.of({name:"CSS",extensions:["css"],load(){return se(()=>Promise.resolve().then(()=>Gue),void 0).then(t=>t.css())}}),ee.of({name:"Go",extensions:["go"],load(){return se(()=>import("./index-Dsl_dfcV.js"),__vite__mapDeps([8,1,2,3,4,5,6])).then(t=>t.go())}}),ee.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return se(()=>Promise.resolve().then(()=>Zce),void 0).then(t=>t.html())}}),ee.of({name:"Java",extensions:["java"],load(){return se(()=>import("./index-BCw4Px7Q.js"),__vite__mapDeps([9,1,2,3,4,5,6])).then(t=>t.java())}}),ee.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return se(()=>Promise.resolve().then(()=>Vp),void 0).then(t=>t.javascript())}}),ee.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return se(()=>import("./index-DfwARoT2.js"),__vite__mapDeps([10,1,2,3,4,5,6])).then(t=>t.jinja())}}),ee.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return se(()=>import("./index-yQy7CrM5.js"),__vite__mapDeps([11,1,2,3,4,5,6])).then(t=>t.json())}}),ee.of({name:"JSX",extensions:["jsx"],load(){return se(()=>Promise.resolve().then(()=>Vp),void 0).then(t=>t.javascript({jsx:!0}))}}),ee.of({name:"LESS",extensions:["less"],load(){return se(()=>import("./index-BDKKYr4r.js"),__vite__mapDeps([12,1,2,3,4,5,6])).then(t=>t.less())}}),ee.of({name:"Liquid",extensions:["liquid"],load(){return se(()=>import("./index-DWuQGstW.js"),__vite__mapDeps([13,1,2,3,4,5,6])).then(t=>t.liquid())}}),ee.of({name:"MariaDB SQL",load(){return ko("MariaSQL")}}),ee.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return se(()=>Promise.resolve().then(()=>ehe),void 0).then(t=>t.markdown())}}),ee.of({name:"MS SQL",load(){return ko("MSSQL")}}),ee.of({name:"MySQL",load(){return ko("MySQL")}}),ee.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return se(()=>import("./index-BuM87VDr.js"),__vite__mapDeps([14,1,2,3,4,5,6])).then(t=>t.php())}}),ee.of({name:"PLSQL",extensions:["pls"],load(){return ko("PLSQL")}}),ee.of({name:"PostgreSQL",load(){return ko("PostgreSQL")}}),ee.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return se(()=>import("./index-DQ2N0BLh.js"),__vite__mapDeps([15,1,2,3,4,5,6])).then(t=>t.python())}}),ee.of({name:"Rust",extensions:["rs"],load(){return se(()=>import("./index-BGAlGVCv.js"),__vite__mapDeps([16,1,2,3,4,5,6])).then(t=>t.rust())}}),ee.of({name:"Sass",extensions:["sass"],load(){return se(()=>import("./index-C_yhrtq7.js"),__vite__mapDeps([17,1,2,3,4,5,6])).then(t=>t.sass({indented:!0}))}}),ee.of({name:"SCSS",extensions:["scss"],load(){return se(()=>import("./index-C_yhrtq7.js"),__vite__mapDeps([17,1,2,3,4,5,6])).then(t=>t.sass())}}),ee.of({name:"SQL",extensions:["sql"],load(){return ko("StandardSQL")}}),ee.of({name:"SQLite",load(){return ko("SQLite")}}),ee.of({name:"TSX",extensions:["tsx"],load(){return se(()=>Promise.resolve().then(()=>Vp),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),ee.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return se(()=>Promise.resolve().then(()=>Vp),void 0).then(t=>t.javascript({typescript:!0}))}}),ee.of({name:"WebAssembly",extensions:["wat","wast"],load(){return se(()=>import("./index-hFKTmk28.js"),__vite__mapDeps([18,1,2,3,4,5,6])).then(t=>t.wast())}}),ee.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return se(()=>import("./index-CkOjEmto.js"),__vite__mapDeps([19,1,2,3,4,5,6])).then(t=>t.xml())}}),ee.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return se(()=>import("./index-BYIhaTqE.js"),__vite__mapDeps([20,1,2,3,4,5,6])).then(t=>t.yaml())}}),ee.of({name:"APL",extensions:["dyalog","apl"],load(){return se(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>de(t.apl))}}),ee.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return se(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>de(t.asciiArmor))}}),ee.of({name:"ASN.1",extensions:["asn","asn1"],load(){return se(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>de(t.asn1({})))}}),ee.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return se(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>de(t.asterisk))}}),ee.of({name:"Brainfuck",extensions:["b","bf"],load(){return se(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>de(t.brainfuck))}}),ee.of({name:"Cobol",extensions:["cob","cpy"],load(){return se(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>de(t.cobol))}}),ee.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return se(()=>import("./clike-B9uivgTg.js"),[]).then(t=>de(t.csharp))}}),ee.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return se(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>de(t.clojure))}}),ee.of({name:"ClojureScript",extensions:["cljs"],load(){return se(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>de(t.clojure))}}),ee.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return se(()=>import("./css-BnMrqG3P.js"),[]).then(t=>de(t.gss))}}),ee.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return se(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>de(t.cmake))}}),ee.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return se(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>de(t.coffeeScript))}}),ee.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return se(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>de(t.commonLisp))}}),ee.of({name:"Cypher",extensions:["cyp","cypher"],load(){return se(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>de(t.cypher))}}),ee.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return se(()=>import("./python-BuPzkPfP.js"),[]).then(t=>de(t.cython))}}),ee.of({name:"Crystal",extensions:["cr"],load(){return se(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>de(t.crystal))}}),ee.of({name:"D",extensions:["d"],load(){return se(()=>import("./d-pRatUO7H.js"),[]).then(t=>de(t.d))}}),ee.of({name:"Dart",extensions:["dart"],load(){return se(()=>import("./clike-B9uivgTg.js"),[]).then(t=>de(t.dart))}}),ee.of({name:"diff",extensions:["diff","patch"],load(){return se(()=>import("./diff-DbItnlRl.js"),[]).then(t=>de(t.diff))}}),ee.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return se(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([21,22])).then(t=>de(t.dockerFile))}}),ee.of({name:"DTD",extensions:["dtd"],load(){return se(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>de(t.dtd))}}),ee.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return se(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>de(t.dylan))}}),ee.of({name:"EBNF",load(){return se(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>de(t.ebnf))}}),ee.of({name:"ECL",extensions:["ecl"],load(){return se(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>de(t.ecl))}}),ee.of({name:"edn",extensions:["edn"],load(){return se(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>de(t.clojure))}}),ee.of({name:"Eiffel",extensions:["e"],load(){return se(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>de(t.eiffel))}}),ee.of({name:"Elm",extensions:["elm"],load(){return se(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>de(t.elm))}}),ee.of({name:"Erlang",extensions:["erl"],load(){return se(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>de(t.erlang))}}),ee.of({name:"Esper",load(){return se(()=>import("./sql-D0XecflT.js"),[]).then(t=>de(t.esper))}}),ee.of({name:"Factor",extensions:["factor"],load(){return se(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([23,22])).then(t=>de(t.factor))}}),ee.of({name:"FCL",load(){return se(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>de(t.fcl))}}),ee.of({name:"Forth",extensions:["forth","fth","4th"],load(){return se(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>de(t.forth))}}),ee.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return se(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>de(t.fortran))}}),ee.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return se(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>de(t.fSharp))}}),ee.of({name:"Gas",extensions:["s"],load(){return se(()=>import("./gas-Bneqetm1.js"),[]).then(t=>de(t.gas))}}),ee.of({name:"Gherkin",extensions:["feature"],load(){return se(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>de(t.gherkin))}}),ee.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return se(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>de(t.groovy))}}),ee.of({name:"Haskell",extensions:["hs"],load(){return se(()=>import("./haskell-Cw1EW3IL.js"),[]).then(t=>de(t.haskell))}}),ee.of({name:"Haxe",extensions:["hx"],load(){return se(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>de(t.haxe))}}),ee.of({name:"HXML",extensions:["hxml"],load(){return se(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>de(t.hxml))}}),ee.of({name:"HTTP",load(){return se(()=>import("./http-DBlCnlav.js"),[]).then(t=>de(t.http))}}),ee.of({name:"IDL",extensions:["pro"],load(){return se(()=>import("./idl-BEugSyMb.js"),[]).then(t=>de(t.idl))}}),ee.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return se(()=>import("./javascript-iXu5QeM3.js"),[]).then(t=>de(t.jsonld))}}),ee.of({name:"Julia",extensions:["jl"],load(){return se(()=>import("./julia-DuME0IfC.js"),[]).then(t=>de(t.julia))}}),ee.of({name:"Kotlin",extensions:["kt","kts"],load(){return se(()=>import("./clike-B9uivgTg.js"),[]).then(t=>de(t.kotlin))}}),ee.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return se(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>de(t.liveScript))}}),ee.of({name:"Lua",extensions:["lua"],load(){return se(()=>import("./lua-VAEuO923.js"),[]).then(t=>de(t.lua))}}),ee.of({name:"mIRC",extensions:["mrc"],load(){return se(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>de(t.mirc))}}),ee.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return se(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>de(t.mathematica))}}),ee.of({name:"Modelica",extensions:["mo"],load(){return se(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>de(t.modelica))}}),ee.of({name:"MUMPS",extensions:["mps"],load(){return se(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>de(t.mumps))}}),ee.of({name:"Mbox",extensions:["mbox"],load(){return se(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>de(t.mbox))}}),ee.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return se(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>de(t.nginx))}}),ee.of({name:"NSIS",extensions:["nsh","nsi"],load(){return se(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([24,22])).then(t=>de(t.nsis))}}),ee.of({name:"NTriples",extensions:["nt","nq"],load(){return se(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>de(t.ntriples))}}),ee.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return se(()=>import("./clike-B9uivgTg.js"),[]).then(t=>de(t.objectiveC))}}),ee.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return se(()=>import("./clike-B9uivgTg.js"),[]).then(t=>de(t.objectiveCpp))}}),ee.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return se(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>de(t.oCaml))}}),ee.of({name:"Octave",extensions:["m"],load(){return se(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>de(t.octave))}}),ee.of({name:"Oz",extensions:["oz"],load(){return se(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>de(t.oz))}}),ee.of({name:"Pascal",extensions:["p","pas"],load(){return se(()=>import("./pascal--L3eBynH.js"),[]).then(t=>de(t.pascal))}}),ee.of({name:"Perl",extensions:["pl","pm"],load(){return se(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>de(t.perl))}}),ee.of({name:"Pig",extensions:["pig"],load(){return se(()=>import("./pig-CevX1Tat.js"),[]).then(t=>de(t.pig))}}),ee.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return se(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>de(t.powerShell))}}),ee.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return se(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>de(t.properties))}}),ee.of({name:"ProtoBuf",extensions:["proto"],load(){return se(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>de(t.protobuf))}}),ee.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return se(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([25,26])).then(t=>de(t.pug))}}),ee.of({name:"Puppet",extensions:["pp"],load(){return se(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>de(t.puppet))}}),ee.of({name:"Q",extensions:["q"],load(){return se(()=>import("./q-pXgVlZs6.js"),[]).then(t=>de(t.q))}}),ee.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return se(()=>import("./r-B6wPVr8A.js"),[]).then(t=>de(t.r))}}),ee.of({name:"RPM Changes",load(){return se(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>de(t.rpmChanges))}}),ee.of({name:"RPM Spec",extensions:["spec"],load(){return se(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>de(t.rpmSpec))}}),ee.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return se(()=>import("./ruby-B2Rjki9n.js"),[]).then(t=>de(t.ruby))}}),ee.of({name:"SAS",extensions:["sas"],load(){return se(()=>import("./sas-B4kiWyti.js"),[]).then(t=>de(t.sas))}}),ee.of({name:"Scala",extensions:["scala"],load(){return se(()=>import("./clike-B9uivgTg.js"),[]).then(t=>de(t.scala))}}),ee.of({name:"Scheme",extensions:["scm","ss"],load(){return se(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>de(t.scheme))}}),ee.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return se(()=>import("./shell-CjFT_Tl9.js"),[]).then(t=>de(t.shell))}}),ee.of({name:"Sieve",extensions:["siv","sieve"],load(){return se(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>de(t.sieve))}}),ee.of({name:"Smalltalk",extensions:["st"],load(){return se(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>de(t.smalltalk))}}),ee.of({name:"Solr",load(){return se(()=>import("./solr-DehyRSwq.js"),[]).then(t=>de(t.solr))}}),ee.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return se(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>de(t.sml))}}),ee.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return se(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>de(t.sparql))}}),ee.of({name:"Spreadsheet",alias:["excel","formula"],load(){return se(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>de(t.spreadsheet))}}),ee.of({name:"Squirrel",extensions:["nut"],load(){return se(()=>import("./clike-B9uivgTg.js"),[]).then(t=>de(t.squirrel))}}),ee.of({name:"Stylus",extensions:["styl"],load(){return se(()=>import("./stylus-B533Al4x.js"),[]).then(t=>de(t.stylus))}}),ee.of({name:"Swift",extensions:["swift"],load(){return se(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>de(t.swift))}}),ee.of({name:"sTeX",load(){return se(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>de(t.stex))}}),ee.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return se(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>de(t.stex))}}),ee.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return se(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>de(t.verilog))}}),ee.of({name:"Tcl",extensions:["tcl"],load(){return se(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>de(t.tcl))}}),ee.of({name:"Textile",extensions:["textile"],load(){return se(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>de(t.textile))}}),ee.of({name:"TiddlyWiki",load(){return se(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>de(t.tiddlyWiki))}}),ee.of({name:"Tiki wiki",load(){return se(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>de(t.tiki))}}),ee.of({name:"TOML",extensions:["toml"],load(){return se(()=>import("./toml-Bm5Em-hy.js"),[]).then(t=>de(t.toml))}}),ee.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return se(()=>import("./troff-wAsdV37c.js"),[]).then(t=>de(t.troff))}}),ee.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return se(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>de(t.ttcn))}}),ee.of({name:"TTCN_CFG",extensions:["cfg"],load(){return se(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>de(t.ttcnCfg))}}),ee.of({name:"Turtle",extensions:["ttl"],load(){return se(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>de(t.turtle))}}),ee.of({name:"Web IDL",extensions:["webidl"],load(){return se(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>de(t.webIDL))}}),ee.of({name:"VB.NET",extensions:["vb"],load(){return se(()=>import("./vb-CmGdzxic.js"),[]).then(t=>de(t.vb))}}),ee.of({name:"VBScript",extensions:["vbs"],load(){return se(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>de(t.vbScript))}}),ee.of({name:"Velocity",extensions:["vtl"],load(){return se(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>de(t.velocity))}}),ee.of({name:"Verilog",extensions:["v"],load(){return se(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>de(t.verilog))}}),ee.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return se(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>de(t.vhdl))}}),ee.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return se(()=>import("./xquery-DzFWVndE.js"),[]).then(t=>de(t.xQuery))}}),ee.of({name:"Yacas",extensions:["ys"],load(){return se(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>de(t.yacas))}}),ee.of({name:"Z80",extensions:["z80"],load(){return se(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>de(t.z80))}}),ee.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return se(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>de(t.mscgen))}}),ee.of({name:"Xù",extensions:["xu"],load(){return se(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>de(t.xu))}}),ee.of({name:"MsGenny",extensions:["msgenny"],load(){return se(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>de(t.msgenny))}}),ee.of({name:"Vue",extensions:["vue"],load(){return se(()=>import("./index-B9freypQ.js"),__vite__mapDeps([27,1,2,3,4,5,6])).then(t=>t.vue())}}),ee.of({name:"Angular Template",load(){return se(()=>import("./index-gAk31IFT.js"),__vite__mapDeps([28,1,2,3,4,5,6])).then(t=>t.angular())}})],Mne=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=dC(t.state,n.from);return i.line?Qne(t):i.block?Vne(t):!1};function fC(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const Qne=fC(jne,0),Dne=fC(U8,0),Vne=fC((t,e)=>U8(t,e,Bne(e)),0);function dC(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Uc=50;function Fne(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-Uc,i),o=t.sliceDoc(r,r+Uc),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,u=s.length-a;if(s.slice(u-e.length,u)==e&&o.slice(l,l+n.length)==n)return{open:{pos:i-a,margin:a&&1},close:{pos:r+l,margin:l&&1}};let c,h;r-i<=2*Uc?c=h=t.sliceDoc(i,r):(c=t.sliceDoc(i,i+Uc),h=t.sliceDoc(r-Uc,r));let d=/^\s*/.exec(c)[0].length,p=/\s*$/.exec(h)[0].length,g=h.length-p-n.length;return c.slice(d,d+e.length)==e&&h.slice(g,g+n.length)==n?{open:{pos:i+d+e.length,margin:/\s/.test(c.charAt(d+e.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(h.charAt(g-1))?1:0}}:null}function Bne(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function U8(t,e,n=e.selection.ranges){let i=n.map(s=>dC(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,o)=>Fne(e,i[o],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,o)=>r[o]?[]:[{from:s.from,insert:i[o].open+" "},{from:s.to,insert:" "+i[o].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let o=0,a;or&&(s==o||o>h.from)){r=h.from;let d=/^\s*/.exec(h.text)[0].length,p=d==h.length,g=h.text.slice(d,d+u.length)==u?d:-1;ds.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:u,empty:c,single:h}of i)(h||!c)&&s.push({from:a.from+u,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of i)if(a>=0){let u=o.from+a,c=u+l.length;o.text[c-o.from]==" "&&c++,s.push({from:u,to:c})}return{changes:s}}return null}const Vb=So.define(),Zne=So.define(),Xne=Me.define(),q8=Me.define({combine(t){return Ns(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),H8=Rn.define({create(){return Es.empty},update(t,e){let n=e.state.facet(q8),i=e.annotation(Vb);if(i){let l=Ri.fromTransaction(e,i.selection),u=i.side,c=u==0?t.undone:t.done;return l?c=Cm(c,c.length,n.minDepth,l):c=K8(c,e.startState.selection),new Es(u==0?i.rest:c,u==0?c:i.rest)}let r=e.annotation(Zne);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(Pn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=Ri.fromTransaction(e),o=e.annotation(Pn.time),a=e.annotation(Pn.userEvent);return s?t=t.addChanges(s,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Es(t.done.map(Ri.fromJSON),t.undone.map(Ri.fromJSON))}});function zne(t={}){return[H8,q8.of(t),Se.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?Y8:e.inputType=="historyRedo"?Fb:null;return i?(e.preventDefault(),i(n)):!1}})]}function CO(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(H8,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const Y8=CO(0,!1),Fb=CO(1,!1),Wne=CO(0,!0),Une=CO(1,!0);class Ri{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new Ri(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new Ri(e.changes&&Tn.fromJSON(e.changes),[],e.mapped&&Ts.fromJSON(e.mapped),e.startSelection&&ae.fromJSON(e.startSelection),e.selectionsAfter.map(ae.fromJSON))}static fromTransaction(e,n){let i=Or;for(let r of e.startState.facet(Xne)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new Ri(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,Or)}static selection(e){return new Ri(void 0,Or,void 0,void 0,e)}}function Cm(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function qne(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,o,a)=>{for(let l=0;l=u&&o<=c&&(i=!0)}}),i}function Hne(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function G8(t,e){return t.length?e.length?t.concat(e):t:e}const Or=[],Yne=200;function K8(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Yne));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),Cm(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Ri.selection([e])]}function Gne(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function lx(t,e){if(!t.length)return t;let n=t.length,i=Or;for(;n;){let r=Kne(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[Ri.selection(i)]:Or}function Kne(t,e,n){let i=G8(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Or,n);if(!t.changes)return Ri.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new Ri(r,Je.mapEffects(t.effects,e),o,t.startSelection.map(s),i)}const Jne=/^(input\.type|delete)($|\.)/;class Es{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Es(this.done,this.undone):this}addChanges(e,n,i,r,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!i||Jne.test(i))&&(!a.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):_O(n,e))}function fi(t){return t.textDirectionAt(t.state.selection.main.head)==Kt.LTR}const e7=t=>J8(t,!fi(t)),t7=t=>J8(t,fi(t));function n7(t,e){return rs(t,n=>n.empty?t.moveByGroup(n,e):_O(n,e))}const tie=t=>n7(t,!fi(t)),nie=t=>n7(t,fi(t));function iie(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function kO(t,e,n){let i=Xt(t).resolveInner(e.head),r=n?tt.closedBy:tt.openedBy;for(let l=e.head;;){let u=n?i.childAfter(l):i.childBefore(l);if(!u)break;iie(t,u,r)?i=u:l=n?u.to:u.from}let s=i.type.prop(r),o,a;return s&&(o=n?ks(t,i.from,1):ks(t,i.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?i.to:i.from,ae.cursor(a,n?-1:1)}const rie=t=>rs(t,e=>kO(t.state,e,!fi(t))),sie=t=>rs(t,e=>kO(t.state,e,fi(t)));function i7(t,e){return rs(t,n=>{if(!n.empty)return _O(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const r7=t=>i7(t,!1),s7=t=>i7(t,!0);function o7(t){let e=t.scrollDOM.clientHeighto.empty?t.moveVertically(o,e,n.height):_O(o,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,u=a.bottom-n.marginBottom;o&&o.top>l&&o.bottoma7(t,!1),Bb=t=>a7(t,!0);function va(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=ae.cursor(i.from+s))}return r}const oie=t=>rs(t,e=>va(t,e,!0)),aie=t=>rs(t,e=>va(t,e,!1)),lie=t=>rs(t,e=>va(t,e,!fi(t))),uie=t=>rs(t,e=>va(t,e,fi(t))),cie=t=>rs(t,e=>ae.cursor(t.lineBlockAt(e.head).from,1)),hie=t=>rs(t,e=>ae.cursor(t.lineBlockAt(e.head).to,-1));function fie(t,e,n){let i=!1,r=Ac(t.selection,s=>{let o=ks(t,s.head,-1)||ks(t,s.head,1)||s.head>0&&ks(t,s.head-1,1)||s.headfie(t,e);function Tr(t,e,n){let i=Ac(t.state.selection,r=>{r.undirectional&&r.head>=r.anchor!=e&&(r=ae.range(r.head,r.anchor));let s=n(r);return ae.range(r.anchor,s.head,s.goalColumn,s.bidiLevel||void 0,s.assoc)});return i.eq(t.state.selection)?!1:(t.dispatch(is(t.state,i)),!0)}function l7(t,e){return Tr(t,e,n=>t.moveByChar(n,e))}const u7=t=>l7(t,!fi(t)),c7=t=>l7(t,fi(t));function h7(t,e){return Tr(t,e,n=>t.moveByGroup(n,e))}const pie=t=>h7(t,!fi(t)),gie=t=>h7(t,fi(t)),mie=t=>{let e=!fi(t);return Tr(t,e,n=>kO(t.state,n,e))},Oie=t=>{let e=fi(t);return Tr(t,e,n=>kO(t.state,n,e))};function f7(t,e){return Tr(t,e,n=>t.moveVertically(n,e))}const d7=t=>f7(t,!1),p7=t=>f7(t,!0);function g7(t,e){return Tr(t,e,n=>t.moveVertically(n,e,o7(t).height))}const RT=t=>g7(t,!1),LT=t=>g7(t,!0),xie=t=>Tr(t,!0,e=>va(t,e,!0)),vie=t=>Tr(t,!1,e=>va(t,e,!1)),bie=t=>{let e=!fi(t);return Tr(t,e,n=>va(t,n,e))},yie=t=>{let e=fi(t);return Tr(t,e,n=>va(t,n,e))},Sie=t=>Tr(t,!1,e=>ae.cursor(t.lineBlockAt(e.head).from)),wie=t=>Tr(t,!0,e=>ae.cursor(t.lineBlockAt(e.head).to)),NT=({state:t,dispatch:e})=>(e(is(t,{anchor:0})),!0),MT=({state:t,dispatch:e})=>(e(is(t,{anchor:t.doc.length})),!0),QT=({state:t,dispatch:e})=>(e(is(t,{anchor:t.selection.main.anchor,head:0})),!0),DT=({state:t,dispatch:e})=>(e(is(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Cie=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),_ie=({state:t,dispatch:e})=>{let n=EO(t).map(({from:i,to:r})=>ae.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:ae.create(n),userEvent:"select"})),!0},kie=({state:t,dispatch:e})=>{let n=Ac(t.selection,i=>{let r=Xt(t),s=r.resolveStack(i.from,1);if(i.empty){let o=r.resolveStack(i.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:a}=o;if((a.from=i.to||a.to>i.to&&a.from<=i.from)&&o.next)return ae.range(a.to,a.from)}return i});return n.eq(t.selection)?!1:(e(is(t,n)),!0)};function m7(t,e){let{state:n}=t,i=n.selection,r=n.selection.ranges.slice();for(let s of n.selection.ranges){let o=n.doc.lineAt(s.head);if(e?o.to0)for(let a=s;;){let l=t.moveVertically(a,e);if(l.heado.to){r.some(u=>u.head==l.head)||r.push(l);break}else{if(l.head==a.head)break;a=l}}}return r.length==i.ranges.length?!1:(t.dispatch(is(n,ae.create(r,r.length-1))),!0)}const Eie=t=>m7(t,!1),Tie=t=>m7(t,!0),Aie=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=ae.create([n.main]):n.main.empty||(i=ae.create([ae.cursor(n.main.head)])),i?(e(is(t,i)),!0):!1};function kd(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);lo&&(n="delete.forward",l=_p(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=_p(t,o,!1),a=_p(t,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:ae.cursor(o,or(t)))i.between(e,e,(r,s)=>{re&&(e=n?s:r)});return e}const O7=(t,e,n)=>kd(t,i=>{let r=i.from,{state:s}=t,o=s.doc.lineAt(r),a,l;if(n&&!e&&r>o.from&&rO7(t,!1,!0),x7=t=>O7(t,!0,!1),v7=(t,e)=>kd(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),o=r.charCategorizer(i);for(let a=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=zn(s.text,i-s.from,e)+s.from,u=s.text.slice(Math.min(i,l)-s.from,Math.max(i,l)-s.from),c=o(u);if(a!=null&&c!=a)break;(u!=" "||i!=n.head)&&(a=c),i=l}return i}),b7=t=>v7(t,!1),Pie=t=>v7(t,!0),Iie=t=>kd(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headkd(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Rie=t=>kd(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Tt.of(["",""])},range:ae.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Nie=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),o=r==s.from?r-1:zn(s.text,r-s.from,!1)+s.from,a=r==s.to?r+1:zn(s.text,r-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:t.doc.slice(r,a).append(t.doc.slice(o,r))},range:ae.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function EO(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function y7(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of EO(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),a=o.length+1;if(n){i.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let l of s.ranges)r.push(ae.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{i.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let l of s.ranges)r.push(ae.range(l.anchor-a,l.head-a))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:ae.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Mie=({state:t,dispatch:e})=>y7(t,e,!1),Qie=({state:t,dispatch:e})=>y7(t,e,!0);function S7(t,e,n){if(t.readOnly)return!1;let i=[];for(let s of EO(t))n?i.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):i.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});let r=t.changes(i);return e(t.update({changes:r,selection:t.selection.map(r,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Die=({state:t,dispatch:e})=>S7(t,e,!1),Vie=({state:t,dispatch:e})=>S7(t,e,!0),Fie=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(EO(e).map(({from:r,to:s})=>(r>0?r--:s{let s;if(t.lineWrapping){let o=t.lineBlockAt(r.head),a=t.coordsAtPos(r.head,r.assoc||1);a&&(s=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Bie(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Xt(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(tt.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const VT=w7(!1),jie=w7(!0);function w7(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:o}=r,a=e.doc.lineAt(s),l=!t&&s==o&&Bie(e,s);t&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let u=new SO(e,{simulateBreak:s,simulateDoubleBreak:!!l}),c=aC(u,s);for(c==null&&(c=Hr(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));oa.from&&s{let r=[];for(let o=i.from;o<=i.to;){let a=t.doc.lineAt(o);a.number>n&&(i.empty||i.to>a.from)&&(e(a,r,i),n=a.number),o=a.to+1}let s=t.changes(r);return{changes:r,range:ae.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const Zie=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new SO(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),r=pC(t,(s,o,a)=>{let l=aC(i,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let u=/^\s*/.exec(s.text)[0],c=ff(t,l);(u!=c||a.fromt.readOnly?!1:(e(t.update(pC(t,(n,i)=>{i.push({from:n.from,insert:t.facet(wd)})}),{userEvent:"input.indent"})),!0),_7=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(pC(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=Hr(r,t.tabSize),o=0,a=ff(t,Math.max(0,s-ul(t)));for(;o(t.setTabFocusMode(),!0),zie=[{key:"Ctrl-b",run:e7,shift:u7,preventDefault:!0},{key:"Ctrl-f",run:t7,shift:c7},{key:"Ctrl-p",run:r7,shift:d7},{key:"Ctrl-n",run:s7,shift:p7},{key:"Ctrl-a",run:cie,shift:Sie},{key:"Ctrl-e",run:hie,shift:wie},{key:"Ctrl-d",run:x7},{key:"Ctrl-h",run:jb},{key:"Ctrl-k",run:Iie},{key:"Ctrl-Alt-h",run:b7},{key:"Ctrl-o",run:Lie},{key:"Ctrl-t",run:Nie},{key:"Ctrl-v",run:Bb}],Wie=[{key:"ArrowLeft",run:e7,shift:u7,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:tie,shift:pie,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:lie,shift:bie,preventDefault:!0},{key:"ArrowRight",run:t7,shift:c7,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:nie,shift:gie,preventDefault:!0},{mac:"Cmd-ArrowRight",run:uie,shift:yie,preventDefault:!0},{key:"ArrowUp",run:r7,shift:d7,preventDefault:!0},{mac:"Cmd-ArrowUp",run:NT,shift:QT},{mac:"Ctrl-ArrowUp",run:$T,shift:RT},{key:"ArrowDown",run:s7,shift:p7,preventDefault:!0},{mac:"Cmd-ArrowDown",run:MT,shift:DT},{mac:"Ctrl-ArrowDown",run:Bb,shift:LT},{key:"PageUp",run:$T,shift:RT},{key:"PageDown",run:Bb,shift:LT},{key:"Home",run:aie,shift:vie,preventDefault:!0},{key:"Mod-Home",run:NT,shift:QT},{key:"End",run:oie,shift:xie,preventDefault:!0},{key:"Mod-End",run:MT,shift:DT},{key:"Enter",run:VT,shift:VT},{key:"Mod-a",run:Cie},{key:"Backspace",run:jb,shift:jb,preventDefault:!0},{key:"Delete",run:x7,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:b7,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:Pie,preventDefault:!0},{mac:"Mod-Backspace",run:$ie,preventDefault:!0},{mac:"Mod-Delete",run:Rie,preventDefault:!0}].concat(zie.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),Uie=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:rie,shift:mie},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:sie,shift:Oie},{key:"Alt-ArrowUp",run:Mie},{key:"Shift-Alt-ArrowUp",run:Die},{key:"Alt-ArrowDown",run:Qie},{key:"Shift-Alt-ArrowDown",run:Vie},{key:"Mod-Alt-ArrowUp",run:Eie},{key:"Mod-Alt-ArrowDown",run:Tie},{key:"Escape",run:Aie},{key:"Mod-Enter",run:jie},{key:"Alt-l",mac:"Ctrl-l",run:_ie},{key:"Mod-i",run:kie,preventDefault:!0},{key:"Mod-[",run:_7},{key:"Mod-]",run:C7},{key:"Mod-Alt-\\",run:Zie},{key:"Shift-Mod-k",run:Fie},{key:"Shift-Mod-\\",run:die},{key:"Mod-/",run:Mne},{key:"Alt-A",run:Dne},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Xie}].concat(Wie),qie={key:"Tab",run:C7,shift:_7},FT="#2e3440",gC="#3b4252",BT="#434c5e",kp="#4c566a",jT="#e5e9f0",Zb="#eceff4",ux="#8fbcbb",ZT="#88c0d0",Hie="#81a1c1",Ir="#5e81ac",Yie="#bf616a",Bl="#d08770",cx="#ebcb8b",XT="#a3be8c",Gie="#b48ead",zT="#d30102",mC=Zb,hx=mC,Kie="#ffffff",fx=gC,Jie=mC,WT=gC,ere=Se.theme({"&":{color:FT,backgroundColor:Kie},".cm-content":{caretColor:WT},".cm-cursor, .cm-dropCursor":{borderLeftColor:WT},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Jie},".cm-panels":{backgroundColor:mC,color:kp},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:`1px solid ${kp}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:jT},".cm-activeLine":{backgroundColor:hx},".cm-selectionMatch":{backgroundColor:jT},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${kp}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:Zb},".cm-gutters":{backgroundColor:Zb,color:FT,border:"none"},".cm-activeLineGutter":{backgroundColor:hx},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:fx},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:fx,borderBottomColor:fx},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:hx,color:kp}}},{dark:!1}),tre=_d.define([{tag:Q.keyword,color:Ir},{tag:[Q.name,Q.deleted,Q.character,Q.propertyName,Q.macroName],color:Bl},{tag:[Q.variableName],color:Bl},{tag:[Q.function(Q.variableName)],color:Ir},{tag:[Q.labelName],color:Hie},{tag:[Q.color,Q.constant(Q.name),Q.standard(Q.name)],color:Ir},{tag:[Q.definition(Q.name),Q.separator],color:XT},{tag:[Q.brace],color:ux},{tag:[Q.annotation],color:zT},{tag:[Q.number,Q.changed,Q.annotation,Q.modifier,Q.self,Q.namespace],color:ZT},{tag:[Q.typeName,Q.className],color:cx},{tag:[Q.operator,Q.operatorKeyword],color:XT},{tag:[Q.tagName],color:Gie},{tag:[Q.squareBracket],color:Yie},{tag:[Q.angleBracket],color:Bl},{tag:[Q.attributeName],color:cx},{tag:[Q.regexp],color:Ir},{tag:[Q.quote],color:gC},{tag:[Q.string],color:Bl},{tag:Q.link,color:ux,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[Q.url,Q.escape,Q.special(Q.string)],color:Bl},{tag:[Q.meta],color:ZT},{tag:[Q.comment],color:BT,fontStyle:"italic"},{tag:Q.strong,fontWeight:"bold",color:Ir},{tag:Q.emphasis,fontStyle:"italic",color:Ir},{tag:Q.strikethrough,textDecoration:"line-through"},{tag:Q.heading,fontWeight:"bold",color:Ir},{tag:Q.special(Q.heading1),fontWeight:"bold",color:Ir},{tag:Q.heading1,fontWeight:"bold",color:Ir},{tag:[Q.heading2,Q.heading3,Q.heading4],fontWeight:"bold",color:Ir},{tag:[Q.heading5,Q.heading6],color:Ir},{tag:[Q.atom,Q.bool,Q.special(Q.variableName)],color:Bl},{tag:[Q.processingInstruction,Q.inserted],color:ux},{tag:[Q.contentSeparator],color:cx},{tag:Q.invalid,color:BT,borderBottom:`1px dotted ${zT}`}]),k7=[ere,M8(tre)],UT=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Uu{constructor(e,n,i=0,r=e.length,s,o){this.test=o,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?a=>s(UT(a)):UT,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ti(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Bw(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=xs(e);let r=this.normalize(n);if(r.length)for(let s=0,o=i,a=!0;;s++){let l=r.charCodeAt(s),u=this.match(l,o,a,this.bufferPos+this.bufferStart,s==r.length-1);if(u)return this.value=u,this;if(s==r.length-1)break;a&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=_m(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let a=new Ou(n,e.sliceString(n,i));return dx.set(e,a),a}if(r.from==n&&r.to==i)return r;let{text:s,from:o}=r;return o>n&&(s=e.sliceString(n,o)+s,o=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this.matchPos=_m(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Ou.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(T7.prototype[Symbol.iterator]=A7.prototype[Symbol.iterator]=function(){return this});function nre(t){try{return new RegExp(t,OC),!0}catch{return!1}}function _m(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}const ire=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:i,result:r}=wte(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return r.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){t.dispatch({effects:i});return}let a=e.doc.lineAt(e.selection.main.head),[,l,u,c,h]=o,d=c?+c.slice(1):0,p=u?+u:a.number;if(u&&h){let v=p/100;l&&(v=v*(l=="-"?-1:1)+a.number/e.doc.lines),p=Math.round(e.doc.lines*v)}else u&&l&&(p=p*(l=="-"?-1:1)+a.number);let g=e.doc.line(Math.max(1,Math.min(e.doc.lines,p))),m=ae.cursor(g.from+Math.max(0,Math.min(d,g.length)));t.dispatch({effects:[i,Se.scrollIntoView(m.from,{y:"center"})],selection:m})}),!0},rre={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},sre=Me.define({combine(t){return Ns(t,rre,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function ore(t){return[hre,cre]}const are=je.mark({class:"cm-selectionMatch"}),lre=je.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function qT(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=pn.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=pn.Word)}function ure(t,e,n,i){return t(e.sliceDoc(n,n+1))==pn.Word&&t(e.sliceDoc(i-1,i))==pn.Word}const cre=yn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(sre),{state:n}=t,i=n.selection;if(i.ranges.length>1)return je.none;let r=i.main,s,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return je.none;let l=n.wordAt(r.head);if(!l)return je.none;o=n.charCategorizer(r.head),s=n.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l200)return je.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),o=n.charCategorizer(r.head),!(qT(o,n,r.from,r.to)&&ure(o,n,r.from,r.to)))return je.none}else if(s=n.sliceDoc(r.from,r.to),!s)return je.none}let a=[];for(let l of t.visibleRanges){let u=new Uu(n.doc,s,l.from,l.to);for(;!u.next().done;){let{from:c,to:h}=u.value;if((!o||qT(o,n,c,h))&&(r.empty&&c<=r.from&&h>=r.to?a.push(lre.range(c,h)):(c>=r.to||h<=r.from)&&a.push(are.range(c,h)),a.length>e.maxMatches))return je.none}}return je.set(a)}},{decorations:t=>t.decorations}),hre=Se.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),fre=({state:t,dispatch:e})=>{let{selection:n}=t,i=ae.create(n.ranges.map(r=>t.wordAt(r.head)||ae.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function dre(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let o=!1,a=new Uu(t.doc,e,i[i.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new Uu(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(l=>l.from==a.value.from))continue;if(s){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const pre=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return fre({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=dre(t,i);return r?(e(t.update({selection:t.selection.addRange(ae.range(r.from,r.to),!1),effects:Se.scrollIntoView(r.to)})),!0):!1},Pc=Me.define({combine(t){return Ns(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Tre(e),scrollToMatch:e=>Se.scrollIntoView(e)})}});class P7{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||nre(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new bre(this):new Ore(this)}getCursor(e,n=0,i){let r=e.doc?e:ct.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?Wl(this,r,n,i):zl(this,r,n,i)}}class I7{constructor(e){this.spec=e}}function gre(t,e,n){return(i,r,s,o)=>{if(n&&!n(i,r,s,o))return!1;let a=i>=o&&r<=o+s.length?s.slice(i-o,r-o):e.doc.sliceString(i,r);return t(a,e,i,r)}}function zl(t,e,n,i){let r;return t.wholeWord&&(r=mre(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(r=gre(t.test,e,r)),new Uu(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:s=>s.toLowerCase(),r)}function mre(t,e){return(n,i,r,s)=>((s>n||s+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=zl(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function xre(t,e,n){return(i,r,s)=>(!n||n(i,r,s))&&t(s[0],e,i,r)}function Wl(t,e,n,i){let r;return t.wholeWord&&(r=vre(e.charCategorizer(e.selection.main.head))),t.test&&(r=xre(t.test,e,r)),new T7(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:r},n,i)}function km(t,e){return t.slice(zn(t,e,!1),e)}function Em(t,e){return t.slice(e,zn(t,e))}function vre(t){return(e,n,i)=>!i[0].length||(t(km(i.input,i.index))!=pn.Word||t(Em(i.input,i.index))!=pn.Word)&&(t(Em(i.input,i.index+i[0].length))!=pn.Word||t(km(i.input,i.index+i[0].length))!=pn.Word)}class bre extends I7{nextMatch(e,n,i){let r=Wl(this.spec,e,i,e.doc.length).next();return r.done&&(r=Wl(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),o=Wl(this.spec,e,s,i),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==n||a.from>s+10))return a;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=Wl(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const pf=Je.define(),xC=Je.define(),Wo=Rn.define({create(t){return new px(Xb(t).create(),null)},update(t,e){for(let n of e.effects)n.is(pf)?t=new px(n.value.create(),t.panel):n.is(xC)&&(t=new px(t.query,n.value?vC:null));return t},provide:t=>cf.from(t,e=>e.panel)});class px{constructor(e,n){this.query=e,this.panel=n}}const yre=je.mark({class:"cm-searchMatch"}),Sre=je.mark({class:"cm-searchMatch cm-searchMatch-selected"}),wre=yn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Wo))}update(t){let e=t.state.field(Wo);(e!=t.startState.field(Wo)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return je.none;let{view:n}=this,i=new Vi;for(let r=0,s=n.visibleRanges,o=s.length;rs[r+1].from-500;)l=s[++r].to;t.highlight(n.state,a,l,(u,c)=>{let h=n.state.selection.ranges.some(d=>d.from==u&&d.to==c);i.add(u,c,h?Sre:yre)})}return i.finish()}},{decorations:t=>t.decorations});function Ed(t){return e=>{let n=e.state.field(Wo,!1);return n&&n.query.spec.valid?t(e,n):L7(e)}}const Tm=Ed((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=ae.single(i.from,i.to),s=t.state.facet(Pc);return t.dispatch({selection:r,effects:[bC(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),R7(t),!0}),Am=Ed((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=ae.single(r.from,r.to),o=t.state.facet(Pc);return t.dispatch({selection:s,effects:[bC(t,r),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),R7(t),!0}),Cre=Ed((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:ae.create(n.map(i=>ae.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),_re=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],o=0;for(let a=new Uu(t.doc,t.sliceDoc(i,r));!a.next().done;){if(s.length>1e3)return!1;a.value.from==i&&(o=s.length),s.push(ae.range(a.value.from,a.value.to))}return e(t.update({selection:ae.create(s,o),userEvent:"select.search.matches"})),!0},HT=Ed((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let o=s,a=[],l,u,c=[];o.precise?o.from==i&&o.to==r&&(u=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:u}),o=e.nextMatch(n,o.from,o.to),c.push(Se.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))):o=e.nextMatch(n,o.from,o.to);let h=t.state.changes(a);return o&&(l=ae.single(o.from,o.to).map(h),c.push(bC(t,o)),c.push(n.facet(Pc).scrollToMatch(l.main,t))),t.dispatch({changes:h,selection:l,effects:c,userEvent:"input.replace"}),!0}),kre=Ed((t,{query:e})=>{if(t.state.readOnly)return!1;let n=[];for(let r of e.matchAll(t.state,1e9)){let{from:s,to:o,precise:a}=r;a&&n.push({from:s,to:o,insert:e.getReplacement(r)})}if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Se.announce.of(i),userEvent:"input.replace.all"}),!0});function vC(t){return t.state.facet(Pc).createPanel(t)}function Xb(t,e){var n,i,r,s,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let u=t.facet(Pc);return new P7({search:((n=e?.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e?.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(r=e?.literal)!==null&&r!==void 0?r:u.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:u.regexp,wholeWord:(o=e?.wholeWord)!==null&&o!==void 0?o:u.wholeWord})}function $7(t){let e=rC(t,vC);return e&&e.dom.querySelector("[main-field]")}function R7(t){let e=$7(t);e&&e==t.root.activeElement&&e.select()}const L7=t=>{let e=t.state.field(Wo,!1);if(e&&e.panel){let n=$7(t);if(n&&n!=t.root.activeElement){let i=Xb(t.state,e.query.spec);i.valid&&t.dispatch({effects:pf.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[xC.of(!0),e?pf.of(Xb(t.state,e.query.spec)):Je.appendConfig.of(Pre)]});return!0},N7=t=>{let e=t.state.field(Wo,!1);if(!e||!e.panel)return!1;let n=rC(t,vC);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:xC.of(!1)}),!0},Ere=[{key:"Mod-f",run:L7,scope:"editor search-panel"},{key:"F3",run:Tm,shift:Am,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Tm,shift:Am,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:N7,scope:"editor search-panel"},{key:"Mod-Shift-l",run:_re},{key:"Mod-Alt-g",run:ire},{key:"Mod-d",run:pre,preventDefault:!0}];class Tre{constructor(e){this.view=e;let n=this.query=e.state.field(Wo).query.spec;this.commit=this.commit.bind(this),this.searchField=jt("input",{value:n.search,placeholder:ji(e,"Find"),"aria-label":ji(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=jt("input",{value:n.replace,placeholder:ji(e,"Replace"),"aria-label":ji(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=jt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=jt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=jt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,o){return jt("button",{class:"cm-button",name:r,onclick:s,type:"button"},o)}this.dom=jt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>Tm(e),[ji(e,"next")]),i("prev",()=>Am(e),[ji(e,"previous")]),i("select",()=>Cre(e),[ji(e,"all")]),jt("label",null,[this.caseField,ji(e,"match case")]),jt("label",null,[this.reField,ji(e,"regexp")]),jt("label",null,[this.wordField,ji(e,"by word")]),...e.state.readOnly?[]:[jt("br"),this.replaceField,i("replace",()=>HT(e),[ji(e,"replace")]),i("replaceAll",()=>kre(e),[ji(e,"replace all")])],jt("button",{name:"close",onclick:()=>N7(e),"aria-label":ji(e,"close"),type:"button"},["×"])])}commit(){let e=new P7({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:pf.of(e)}))}keydown(e){Lee(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Am:Tm)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),HT(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(pf)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Pc).top}}function ji(t,e){return t.state.phrase(e)}const Ep=30,Tp=/[\s\.,:;?!]/;function bC(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-Ep),o=Math.min(r,n+Ep),a=t.state.sliceDoc(s,o);if(s!=i.from){for(let l=0;la.length-Ep;l--)if(!Tp.test(a[l-1])&&Tp.test(a[l])){a=a.slice(0,l);break}}return Se.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}const Are=Se.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Pre=[Wo,ns.low(wre),Are];class yC{constructor(e,n,i,r){this.state=e,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Xt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(Q7(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function YT(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Ire(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:Ire(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function $re(t,e){return n=>{for(let i=Xt(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class GT{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function Fa(t){return t.selection.main.from}function Q7(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const SC=So.define();function Rre(t,e,n,i){let{main:r}=t.selection,s=n-r.from,o=i-r.from;return{...t.changeByRange(a=>{if(a!=r&&n!=i&&t.sliceDoc(a.from+s,a.from+o)!=t.sliceDoc(n,i))return{range:a};let l=t.toText(e);return{changes:{from:a.from+s,to:i==r.from?a.to:a.from+o,insert:l},range:ae.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const KT=new WeakMap;function Lre(t){if(!Array.isArray(t))return t;let e=KT.get(t);return e||KT.set(t,e=M7(t)),e}const Pm=Je.define(),gf=Je.define();class Nre{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&C<=57||C>=97&&C<=122?2:C>=65&&C<=90?1:0:(x=Bw(C))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!b||E==1&&v||k==0&&E!=0)&&(n[h]==C||i[h]==C&&(d=!0)?o[h++]=b:o.length&&(S=!1)),k=E,b+=xs(C)}return h==l&&o[0]==0&&S?this.result(-100+(d?-200:0),o,e):p==l&&g==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):p==l?this.ret(-900-e.length,[g,m]):h==l?this.result(-100+(d?-200:0)+-700+(S?0:-1100),o,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let o of n){let a=o+(this.astral?xs(Ti(i,o)):1);s&&r[s-1]==o?r[s-1]=a:(r[s++]=o,r[s++]=a)}return this.ret(e-i.length,r)}}class Mre{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Qre,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>JT(e(i),n(i)),optionClass:(e,n)=>i=>JT(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function JT(t,e){return t?e?t+" "+e:t:e}function Qre(t,e,n,i,r,s){let o=t.textDirection==Kt.RTL,a=o,l=!1,u="top",c,h,d=e.left-r.left,p=r.right-e.right,g=i.right-i.left,m=i.bottom-i.top;if(a&&d=m||b>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let v=(e.bottom-e.top)/s.offsetHeight,S=(e.right-e.left)/s.offsetWidth;return{style:`${u}: ${c/v}px; max-width: ${h/S}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}const wC=Je.define();function Dre(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let u=0;ul&&o.appendChild(document.createTextNode(a.slice(l,c)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(c,h))),d.className="cm-completionMatchedText",l=h}return ln.position-i.position).map(n=>n.render)}function gx(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.ceil((t-e)/n);return{from:t-i*n,to:t-(i-1)*n}}class Vre{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:o}=r.open,a=e.state.facet(Xn);this.optionContent=Dre(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=gx(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,h;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(h=/-(\d+)$/.exec(c.id))&&+h[1]this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;c!=null&&(e.dispatch({effects:wC.of(c)}),l.preventDefault())}}),this.dom.addEventListener("focusout",l=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(Xn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:gf.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:o,disabled:a}=i.open;(!r.open||r.open.options!=s)&&(this.range=gx(s.length,o,e.state.facet(Xn).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),a!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected=this.range.to)&&(this.range=gx(n.options.length,n.selected,this.view.state.facet(Xn).maxRenderedOptions),this.showOptions(n.options,e.id));let i=this.updateSelectedOption(n.selected);if(i){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:s}=r;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>$i(this.view.state,a,"completion info")):(this.addInfoPane(o,r),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&(i.removeAttribute("aria-selected"),i.removeAttribute("aria-describedby"));return n&&Bre(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom{o.target==r&&o.preventDefault()});let s=null;for(let o=i.from;oi.from||i.from==0))if(s=d,typeof u!="string"&&u.header)r.appendChild(u.header(u));else{let p=r.appendChild(document.createElement("completion-section"));p.textContent=d}}const c=r.appendChild(document.createElement("li"));c.id=n+"-"+o,c.setAttribute("role","option");let h=this.optionClass(a);h&&(c.className=h);for(let d of this.optionContent){let p=d(a,this.view.state,this.view,l);p&&c.appendChild(p)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew Vre(n,t,e)}function Bre(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function eA(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function jre(t,e){let n=[],i=null,r=null,s=c=>{n.push(c);let{section:h}=c.completion;if(h){i||(i=[]);let d=typeof h=="string"?h:h.name;i.some(p=>p.name==d)||i.push(typeof h=="string"?{name:d}:h)}},o=e.facet(Xn);for(let c of t)if(c.hasResult()){let h=c.result.getMatch;if(c.result.filter===!1)for(let d of c.result.options)s(new GT(d,c.source,h?h(d):[],1e9-n.length));else{let d=e.sliceDoc(c.from,c.to),p,g=o.filterStrict?new Mre(d):new Nre(d);for(let m of c.result.options)if(p=g.match(m.label)){let v=m.displayLabel?h?h(m,p.matched):[]:p.matched,S=p.score+(m.boost||0);if(s(new GT(m,c.source,v,S)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:b}=m.section;r||(r=Object.create(null)),r[b]=Math.max(S,r[b]||-1e9)}}}}if(i){let c=Object.create(null),h=0,d=(p,g)=>(p.rank==="dynamic"&&g.rank==="dynamic"?r[g.name]-r[p.name]:0)||(typeof p.rank=="number"?p.rank:1e9)-(typeof g.rank=="number"?g.rank:1e9)||(p.named.score-h.score||u(h.completion,d.completion))){let h=c.completion;!l||l.label!=h.label||l.detail!=h.detail||l.type!=null&&h.type!=null&&l.type!=h.type||l.apply!=h.apply||l.boost!=h.boost?a.push(c):eA(c.completion)>eA(l)&&(a[a.length-1]=c),l=c.completion}return a}class Jl{constructor(e,n,i,r,s,o){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Jl(this.options,tA(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s,o){if(r&&!o&&e.some(u=>u.isPending))return r.setDisabled();let a=jre(e,n);if(!a.length)return r&&e.some(u=>u.isPending)?r.setDisabled():null;let l=n.facet(Xn).selectOnOpen?0:-1;if(r&&r.selected!=l&&r.selected!=-1){let u=r.options[r.selected].completion;for(let c=0;cc.hasResult()?Math.min(u,c.from):u,1e8),create:qre,above:s.aboveCursor},r?r.timestamp:Date.now(),l,!1)}map(e){return new Jl(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Jl(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Im{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new Im(Wre,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Xn),s=(i.override||n.languageDataAt("autocomplete",Fa(n)).map(Lre)).map(l=>(this.active.find(c=>c.source==l)||new xr(l,this.active.some(c=>c.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((l,u)=>l==this.active[u])&&(s=this.active);let o=this.open,a=e.effects.some(l=>l.is(CC));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Zre(s,this.active)||a?o=Jl.build(s,n,this.id,o,i,a):o&&o.disabled&&!s.some(l=>l.isPending)&&(o=null),!o&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new xr(l.source,0):l));for(let l of e.effects)l.is(wC)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new Im(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Xre:zre}}function Zre(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Wre=[];function D7(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(SC);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class xr{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=D7(e,n),r=this;(i&8||i&16&&this.touches(e))&&(r=new xr(r.source,0)),i&4&&r.state==0&&(r=new xr(this.source,1)),r=r.updateFor(e,i);for(let s of e.effects)if(s.is(Pm))r=new xr(r.source,1,s.value);else if(s.is(gf))r=new xr(r.source,0);else if(s.is(CC))for(let o of s.value)o.source==r.source&&(r=o);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Fa(e.state))}}class xu extends xr{constructor(e,n,i,r,s,o){super(e,3,n),this.limit=i,this.result=r,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=Fa(e.state);if(a>o||!r||n&2&&(Fa(e.startState)==this.from||an.map(e))}}),Ai=Rn.define({create(){return Im.start()},update(t,e){return t.update(e)},provide:t=>[iC.from(t,e=>e.tooltip),Se.contentAttributes.from(t,e=>e.attrs)]});function _C(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Ai).active.find(r=>r.source==e.source);return i instanceof xu?(typeof n=="string"?t.dispatch({...Rre(t.state,n,i.from,i.to),annotations:SC.of(e.completion)}):n(t,e.completion,i.from,i.to),!0):!1}const qre=Fre(Ai,_C);function Ap(t,e="option"){return n=>{let i=n.state.field(Ai,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:wC.of(a)}),!0}}const Hre=t=>{let e=t.state.field(Ai,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Ai,!1)?(t.dispatch({effects:Pm.of(!0)}),!0):!1,Yre=t=>{let e=t.state.field(Ai,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:gf.of(null)}),!0)};class Gre{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Kre=50,Jre=1e3,ese=yn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Ai).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Ai),n=t.state.facet(Xn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Ai)==e)return;let i=t.transactions.some(s=>{let o=D7(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;sKre&&Date.now()-o.time>Jre){for(let a of o.context.abortListeners)try{a()}catch(l){$i(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(Pm)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Ai);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Xn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Fa(e),i=new yC(e,n,t.explicit,this.view),r=new Gre(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:gf.of(null)}),$i(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Xn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Xn),i=this.view.state.field(Ai);for(let r=0;ra.source==s.active.source);if(o&&o.isPending)if(s.done==null){let a=new xr(s.active.source,0);for(let l of s.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:CC.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Ai,!1);if(e&&e.tooltip&&this.view.state.facet(Xn).closeOnBlur){let n=e.open&&p8(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:gf.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Pm.of(!1)}),20),this.composing=0}}}),tse=typeof navigator=="object"&&/Win/.test(navigator.platform),nse=ns.highest(Se.domEventHandlers({keydown(t,e){let n=e.state.field(Ai,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(tse&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(o=>o.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&_C(e,i),!1}})),V7=Se.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class ise{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class kC{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,Gn.TrackDel),i=e.mapPos(this.to,1,Gn.TrackDel);return n==null||i==null?null:new kC(this.field,n,i)}}class EC{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(i.length){let u=o,c=/^\t*/.exec(l)[0].length;for(let h=0;hnew kC(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:i,ranges:a}}static parse(e){let n=[],i=[],r=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",u=-1;a===0&&(a=1e9);let c=l.replace(/\\[{}]/g,h=>h[1]);for(let h=0;h=u&&d.field++}for(let h of r)if(h.line==i.length&&h.from>s.index){let d=s[2]?3+(s[1]||"").length:2;h.from-=d,h.to-=d}r.push(new ise(u,i.length,s.index,s.index+c.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,u)=>{for(let c of r)c.line==i.length&&c.from>u&&(c.from--,c.to--);return l}),i.push(o)}return new EC(i,r)}}let rse=je.widget({widget:new class extends Er{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),sse=je.mark({class:"cm-snippetField"});class Ic{constructor(e,n){this.ranges=e,this.active=n,this.deco=je.set(e.map(i=>(i.from==i.to?rse:sse).range(i.from,i.to)),!0)}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new Ic(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const Td=Je.define({map(t,e){return t&&t.map(e)}}),ose=Je.define(),mf=Rn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Td))return n.value;if(n.is(ose)&&t)return new Ic(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Se.decorations.from(t,e=>e?e.deco:je.none)});function TC(t,e){return ae.create(t.filter(n=>n.field==e).map(n=>ae.range(n.from,n.to)))}function ase(t){let e=EC.parse(t);return(n,i,r,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,r),{main:l}=n.state.selection,u={changes:{from:r,to:s==l.from?l.to:s,insert:Tt.of(o)},scrollIntoView:!0,annotations:i?[SC.of(i),Pn.userEvent.of("input.complete")]:void 0};if(a.length&&(u.selection=TC(a,0)),a.some(c=>c.field>0)){let c=new Ic(a,0),h=u.effects=[Td.of(c)];n.state.field(mf,!1)===void 0&&h.push(Je.appendConfig.of([mf,fse,dse,V7]))}n.dispatch(n.state.update(u))}}function F7(t){return({state:e,dispatch:n})=>{let i=e.field(mf,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(o=>o.field==r+t);return n(e.update({selection:TC(i.ranges,r),effects:Td.of(s?null:new Ic(i.ranges,r)),scrollIntoView:!0})),!0}}const lse=({state:t,dispatch:e})=>t.field(mf,!1)?(e(t.update({effects:Td.of(null)})),!0):!1,use=F7(1),cse=F7(-1),hse=[{key:"Tab",run:use,shift:cse},{key:"Escape",run:lse}],nA=Me.define({combine(t){return t.length?t[0]:hse}}),fse=ns.highest(_c.compute([nA],t=>t.facet(nA)));function Ci(t,e){return{...e,apply:ase(t)}}const dse=Se.domEventHandlers({mousedown(t,e){let n=e.state.field(mf,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:TC(n.ranges,r.field),effects:Td.of(n.ranges.some(s=>s.field>r.field)?new Ic(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),Of={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Na=Je.define({map(t,e){let n=e.mapPos(t,-1,Gn.TrackAfter);return n??void 0}}),AC=new class extends ra{};AC.startSide=1;AC.endSide=-1;const B7=Rn.define({create(){return dt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(Na)&&(t=t.update({add:[AC.range(n.value,n.value+1)]}));return t}});function pse(){return[mse,B7]}const Ox="()[]{}<>«»»«[]{}";function j7(t){for(let e=0;e{if((gse?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&xs(Ti(i,0))==1||e!=r.from||n!=r.to)return!1;let s=vse(t.state,i);return s?(t.dispatch(s),!0):!1}),Ose=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Z7(t,t.selection.main.head).brackets||Of.brackets,r=null,s=t.changeByRange(o=>{if(o.empty){let a=bse(t.doc,o.head);for(let l of i)if(l==a&&TO(t.doc,o.head)==j7(Ti(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:ae.cursor(o.head-l.length)}}return{range:r=o}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},xse=[{key:"Backspace",run:Ose}];function vse(t,e){let n=Z7(t,t.selection.main.head),i=n.brackets||Of.brackets;for(let r of i){let s=j7(Ti(r,0));if(e==r)return s==r?wse(t,r,i.indexOf(r+r+r)>-1,n):yse(t,r,s,n.before||Of.before);if(e==s&&X7(t,t.selection.main.from))return Sse(t,r,s)}return null}function X7(t,e){let n=!1;return t.field(B7).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function TO(t,e){let n=t.sliceString(e,e+2);return n.slice(0,xs(Ti(n,0)))}function bse(t,e){let n=t.sliceString(e-2,e);return xs(Ti(n,0))==n.length?n:n.slice(1)}function yse(t,e,n,i){let r=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:Na.of(o.to+e.length),range:ae.range(o.anchor+e.length,o.head+e.length)};let a=TO(t.doc,o.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:Na.of(o.head+e.length),range:ae.cursor(o.head+e.length)}:{range:r=o}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Sse(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&TO(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:ae.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function wse(t,e,n,i){let r=i.stringPrefixes||Of.stringPrefixes,s=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:Na.of(a.to+e.length),range:ae.range(a.anchor+e.length,a.head+e.length)};let l=a.head,u=TO(t.doc,l),c;if(u==e){if(iA(t,l))return{changes:{insert:e+e,from:l},effects:Na.of(l+e.length),range:ae.cursor(l+e.length)};if(X7(t,l)){let d=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+d.length,insert:d},range:ae.cursor(l+d.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=rA(t,l-2*e.length,r))>-1&&iA(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Na.of(l+e.length),range:ae.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=pn.Word&&rA(t,l,r)>-1&&!Cse(t,l,e,r))return{changes:{insert:e+e,from:l},effects:Na.of(l+e.length),range:ae.cursor(l+e.length)}}return{range:s=a}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function iA(t,e){let n=Xt(t).resolveInner(e+1);return n.parent&&n.from==e}function Cse(t,e,n,i){let r=Xt(t).resolveInner(e,-1),s=i.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),l=a.indexOf(n);if(!l||l>-1&&i.indexOf(a.slice(0,l))>-1){let c=r.firstChild;for(;c&&c.from==r.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}function rA(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=pn.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=pn.Word)return s}return-1}function _se(t={}){return[nse,Ai,Xn.of(t),ese,kse,V7]}const z7=[{key:"Ctrl-Space",run:mx},{mac:"Alt-`",run:mx},{mac:"Alt-i",run:mx},{key:"Escape",run:Yre},{key:"ArrowDown",run:Ap(!0)},{key:"ArrowUp",run:Ap(!1)},{key:"PageDown",run:Ap(!0,"page")},{key:"PageUp",run:Ap(!1,"page")},{key:"Enter",run:Hre}],kse=ns.highest(_c.computeN([Xn],t=>t.facet(Xn).defaultKeymap?[z7]:[]));class sA{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Ia{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=i.facet(xf).markerFilter;r&&(e=r(e,i));let s=e.slice().sort((p,g)=>p.from-g.from||p.to-g.to),o=new Vi,a=[],l=0,u=i.doc.iter(),c=0,h=i.doc.length;for(let p=0;;){let g=p==s.length?null:s[p];if(!g&&!a.length)break;let m,v;if(a.length)m=l,v=a.reduce((w,k)=>Math.min(w,k.to),g&&g.from>m?g.from:1e8);else{if(m=g.from,m>h)break;v=g.to,a.push(g),p++}for(;pw.from||w.to==m))a.push(w),p++,v=Math.min(w.to,v);else{v=Math.min(w.from,v);break}}v=Math.min(v,h);let S=!1;if(a.some(w=>w.from==m&&(w.to==v||v==h))&&(S=m==v,!S&&v-m<10)){let w=m-(c+u.value.length);w>0&&(u.next(w),c=m);for(let k=m;;){if(k>=v){S=!0;break}if(!u.lineBreak&&c+u.value.length>k)break;k=c+u.value.length,c+=u.value.length,u.next()}}let b=Vse(a);if(S)o.add(m,m,je.widget({widget:new Nse(b),diagnostics:a.slice()}));else{let w=a.reduce((k,C)=>C.markClass?k+" "+C.markClass:k,"");o.add(m,v,je.mark({class:"cm-lintRange cm-lintRange-"+b+w,diagnostics:a.slice(),inclusiveEnd:a.some(k=>k.to>v)}))}if(l=v,l==h)break;for(let w=0;w{if(!(e&&o.diagnostics.indexOf(e)<0))if(!i)i=new sA(r,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new sA(i.from,s,i.diagnostic)}}),i}function Ese(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(xf).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(W7))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function Tse(t,e){return t.field(er,!1)?e:e.concat(Je.appendConfig.of(Fse))}const W7=Je.define(),PC=Je.define(),U7=Je.define(),er=Rn.define({create(){return new Ia(je.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=la(n,t.selected.diagnostic,s)||la(n,null,s)}!n.size&&r&&e.state.facet(xf).autoPanel&&(r=null),t=new Ia(n,r,i)}for(let n of e.effects)if(n.is(W7)){let i=e.state.facet(xf).autoPanel?n.value.length?vf.open:null:t.panel;t=Ia.init(n.value,i,e.state)}else n.is(PC)?t=new Ia(t.diagnostics,n.value?vf.open:null,t.selected):n.is(U7)&&(t=new Ia(t.diagnostics,t.panel,n.value));return t},provide:t=>[cf.from(t,e=>e.panel),Se.decorations.from(t,e=>e.diagnostics)]}),Ase=je.mark({class:"cm-lintRange cm-lintRange-active"});function Pse(t,e,n){let{diagnostics:i}=t.state.field(er),r,s=-1,o=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{if(e>=l&&e<=u&&(l==u||(e>l||n>0)&&(eH7(t,n,!1)))}const $se=t=>{let e=t.state.field(er,!1);(!e||!e.panel)&&t.dispatch({effects:Tse(t.state,[PC.of(!0)])});let n=rC(t,vf.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},oA=t=>{let e=t.state.field(er,!1);return!e||!e.panel?!1:(t.dispatch({effects:PC.of(!1)}),!0)},Rse=t=>{let e=t.state.field(er,!1);if(!e)return!1;let n=t.state.selection.main,i=la(e.diagnostics,null,n.to+1);return!i&&(i=la(e.diagnostics,null,0),!i||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),yte(t,i.from,1,{tooltip:Y7,until:r=>r.docChanged||r.newSelection.main.headi.to}),!0)},Lse=[{key:"Mod-Shift-m",run:$se,preventDefault:!0},{key:"F8",run:Rse}],xf=Me.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...Ns(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:aA,tooltipFilter:aA,needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n,hideOn:(e,n)=>e?n?(i,r,s)=>e(i,r,s)||n(i,r,s):e:n,autoPanel:(e,n)=>e||n})}}});function aA(t,e){return t?e?(n,i)=>e(t(n,i),i):t:e}function q7(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;is.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function H7(t,e,n){var i;let r=n?q7(e.actions):[];return jt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},jt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,o)=>{let a=!1,l=p=>{if(p.preventDefault(),a)return;a=!0;let g=la(t.state.field(er).diagnostics,e);g&&s.apply(t,g.from,g.to)},{name:u}=s,c=r[o]?u.indexOf(r[o]):-1,h=c<0?u:[u.slice(0,c),jt("u",u.slice(c,c+1)),u.slice(c+1)],d=s.markClass?" "+s.markClass:"";return jt("button",{type:"button",class:"cm-diagnosticAction"+d,onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${r[o]})"`}.`},h)}),e.source&&jt("div",{class:"cm-diagnosticSource"},e.source))}class Nse extends Er{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return jt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class lA{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=H7(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class vf{constructor(e){this.view=e,this.items=[];let n=r=>{if(!(r.ctrlKey||r.altKey||r.metaKey)){if(r.keyCode==27)oA(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=q7(s.actions);for(let a=0;a{for(let s=0;soA(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(er).selected;if(!e)return-1;for(let n=0;n{for(let c of u.diagnostics){if(o.has(c))continue;o.add(c);let h=-1,d;for(let p=i;pi&&(this.items.splice(i,h-i),r=!0)),n&&d.diagnostic==n.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),s=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),i++}});i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let u=l.height/this.list.offsetHeight;a.topl.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/u)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(er),i=la(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:U7.of(i)})}static open(e){return new vf(e)}}function Mse(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Pp(t){return Mse(``,'width="6" height="3"')}const Qse=Se.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Pp("#f11")},".cm-lintRange-warning":{backgroundImage:Pp("orange")},".cm-lintRange-info":{backgroundImage:Pp("#999")},".cm-lintRange-hint":{backgroundImage:Pp("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function Dse(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function Vse(t){let e="hint",n=1;for(let i of t){let r=Dse(i.severity);r>n&&(n=r,e=i.severity)}return e}const Y7=bte(Pse,{hideOn:Ese}),Fse=[er,Se.decorations.compute([er],t=>{let{selected:e,panel:n}=t.field(er);return!e||!n||e.from==e.to?je.none:je.set([Ase.range(e.from,e.to)])}),Y7,Qse],G7=[sC(),Nte(),Gee(),zne(),pne(),Fee(),zee(),ct.allowMultipleSelections.of(!0),nne(),M8(xne,{fallback:!0}),_ne(),pse(),_se(),ute(),fte(),ite(),ore(),_c.of([...xse,...Uie,...Ere,...eie,...cne,...z7,...Lse])];function Bse(t,e,n){const i=Pt(Gt),r=bt(yl),s=_.useRef(null),{lexicalNode:o}=am(),a=_.useRef(!1),l=_.useRef(!1),u=_.useCallback(()=>{r({editorType:"codeblock",rootNode:o,editorRef:s.current})},[o,r]),c=_.useCallback(h=>{var d,p,g,m,v,S;if(h.key==="ArrowDown"){const b=(p=(d=s.current)==null?void 0:d.getCodemirror())==null?void 0:p.state;if(b){const w=b.doc.length,k=b.selection.ranges[0].to;w===k&&(a.current?(i?.update(()=>{var C,x;const E=At(t);E.getNextSibling()?((x=(C=s.current)==null?void 0:C.getCodemirror())==null||x.contentDOM.blur(),E.selectNext()):E.insertAfter(yt())}),a.current=!1):a.current=!0)}}else if(h.key==="ArrowUp"){const b=(m=(g=s.current)==null?void 0:g.getCodemirror())==null?void 0:m.state;b&&b.selection.ranges[0].from===0&&(l.current?(i?.update(()=>{var k,C;const x=At(t);x.getPreviousSibling()&&((C=(k=s.current)==null?void 0:k.getCodemirror())==null||C.contentDOM.blur(),x.selectPrevious())}),l.current=!1):l.current=!0)}else if(h.key==="Enter")h.stopPropagation();else if(h.key==="Backspace"||h.key==="Delete"){const b=(S=(v=s.current)==null?void 0:v.getCodemirror())==null?void 0:S.state;b?.doc.length===0&&i?.update(()=>{At(t).remove()})}},[i,t]);return _.useEffect(()=>{const h=s.current;return setTimeout(()=>{var d,p;(d=h?.getCodemirror())==null||d.contentDOM.addEventListener("focus",u),(p=h?.getCodemirror())==null||p.contentDOM.addEventListener("keydown",c)},300),()=>{var d,p;(d=h?.getCodemirror())==null||d.contentDOM.removeEventListener("focus",u),(p=h?.getCodemirror())==null||p.contentDOM.removeEventListener("keydown",c)}},[s,u,c,e]),_.useEffect(()=>{n.subscribe(()=>{var h,d;(d=(h=s.current)==null?void 0:h.getCodemirror())==null||d.focus(),u()})},[n,s,t,u]),s}function uA(t,[e,n]){return Math.min(n,Math.max(e,t))}function jse(t){const e=R.useRef({value:t,previous:t});return R.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var K7=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zse="VisuallyHidden",J7=R.forwardRef((t,e)=>q.jsx(gt.span,{...t,ref:e,style:{...K7,...t.style}}));J7.displayName=Zse;var Xse=J7,zse=[" ","Enter","ArrowUp","ArrowDown"],Wse=[" ","Enter"],hl="Select",[AO,PO,Use]=a$(hl),[Tl]=vo(hl,[Use,mc]),IO=mc(),[qse,ba]=Tl(hl),[Hse,Yse]=Tl(hl),Gse="SelectProvider";function eL(t){const{__scopeSelect:e,children:n,open:i,defaultOpen:r,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:h,disabled:d,required:p,form:g,internal_do_not_use_render:m}=t,v=IO(e),[S,b]=R.useState(null),[w,k]=R.useState(null),[C,x]=R.useState(!1),E=j0(u),[A,I]=ao({prop:i,defaultProp:r??!1,onChange:s,caller:hl}),[Z,U]=ao({prop:o,defaultProp:a,onChange:l,caller:hl}),W=R.useRef(null),B=S?!!g||!!S.closest("form"):!0,[ne,j]=R.useState(new Set),oe=Gs(),pe=Array.from(ne).map(De=>De.props.value).join(";"),re=R.useCallback(De=>{j(Ie=>new Set(Ie).add(De))},[]),ke=R.useCallback(De=>{j(Ie=>{const Ue=new Set(Ie);return Ue.delete(De),Ue})},[]),Ee={required:p,trigger:S,onTriggerChange:b,valueNode:w,onValueNodeChange:k,valueNodeHasChildren:C,onValueNodeHasChildrenChange:x,contentId:oe,value:Z,onValueChange:U,open:A,onOpenChange:I,dir:E,triggerPointerDownPosRef:W,disabled:d,name:c,autoComplete:h,form:g,nativeOptions:ne,nativeSelectKey:pe,isFormControl:B};return q.jsx(DS,{...v,children:q.jsx(qse,{scope:e,...Ee,children:q.jsx(AO.Provider,{scope:e,children:q.jsx(Hse,{scope:e,onNativeOptionAdd:re,onNativeOptionRemove:ke,children:moe(m)?m(Ee):n})})})})}eL.displayName=Gse;var IC=t=>{const{__scopeSelect:e,children:n,...i}=t;return q.jsx(eL,{__scopeSelect:e,...i,internal_do_not_use_render:({isFormControl:r})=>q.jsxs(q.Fragment,{children:[n,r?q.jsx(SL,{__scopeSelect:e}):null]})})};IC.displayName=hl;var tL="SelectTrigger",$C=R.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:i=!1,...r}=t,s=IO(n),o=ba(tL,n),a=o.disabled||i,l=on(e,o.onTriggerChange),u=PO(n),c=R.useRef("touch"),[h,d,p]=wL(m=>{const v=u().filter(w=>!w.disabled),S=v.find(w=>w.value===o.value),b=CL(v,m,S);b!==void 0&&o.onValueChange(b.value)}),g=m=>{a||(o.onOpenChange(!0),p()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return q.jsx(R0,{asChild:!0,...s,children:q.jsx(gt.button,{type:"button",role:"combobox","aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":$O(o.value)?"":void 0,...r,ref:l,onClick:it(r.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:it(r.onPointerDown,m=>{c.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:it(r.onKeyDown,m=>{const v=h.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(v&&m.key===" ")&&zse.includes(m.key)&&(g(),m.preventDefault())})})})});$C.displayName=tL;var nL="SelectValue",iL=R.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:r,children:s,placeholder:o="",...a}=t,l=ba(nL,n),{onValueNodeHasChildrenChange:u}=l,c=s!==void 0,h=on(e,l.onValueNodeChange);Kn(()=>{u(c)},[u,c]);const d=$O(l.value);return q.jsx(gt.span,{...a,asChild:d?!1:a.asChild,ref:h,style:{pointerEvents:"none"},children:q.jsx(R.Fragment,{children:d?o:s},d?"placeholder":"value")})});iL.displayName=nL;var Kse="SelectIcon",RC=R.forwardRef((t,e)=>{const{__scopeSelect:n,children:i,...r}=t;return q.jsx(gt.span,{"aria-hidden":!0,...r,ref:e,children:i||"▼"})});RC.displayName=Kse;var rL="SelectPortal",[Jse,eoe]=Tl(rL,{forceMount:void 0}),sL=t=>{const{__scopeSelect:e,forceMount:n,...i}=t;return q.jsx(Jse,{scope:t.__scopeSelect,forceMount:n,children:q.jsx(ad,{asChild:!0,...i})})};sL.displayName=rL;var ua="SelectContent",oL=R.forwardRef((t,e)=>{const n=eoe(ua,t.__scopeSelect),{forceMount:i=n.forceMount,...r}=t,s=ba(ua,t.__scopeSelect),[o,a]=R.useState();return Kn(()=>{a(new DocumentFragment)},[]),q.jsx(bo,{present:i||s.open,children:({present:l})=>l?q.jsx(uL,{...r,ref:e}):q.jsx(aL,{...r,fragment:o})})});oL.displayName=ua;var aL=R.forwardRef((t,e)=>{const{__scopeSelect:n,children:i,fragment:r}=t;return r?wu.createPortal(q.jsx(lL,{scope:n,children:q.jsx(AO.Slot,{scope:n,children:q.jsx("div",{ref:e,children:i})})}),r):null});aL.displayName="SelectContentFragment";var Lr=10,[lL,ya]=Tl(ua),toe="SelectContentImpl",noe=Cu("SelectContent.RemoveScroll"),uL=R.forwardRef((t,e)=>{const{__scopeSelect:n}=t,{position:i="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:h,collisionBoundary:d,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:v,...S}=t,b=ba(ua,n),[w,k]=R.useState(null),[C,x]=R.useState(null),E=on(e,he=>k(he)),[A,I]=R.useState(null),[Z,U]=R.useState(null),W=PO(n),[B,ne]=R.useState(!1),j=R.useRef(!1);R.useEffect(()=>{if(w)return BS(w)},[w]),LS();const oe=R.useCallback(he=>{const[xe,...Ce]=W().map(Ke=>Ke.ref.current),[$e]=Ce.slice(-1),Le=document.activeElement;for(const Ke of he)if(Ke===Le||(Ke?.scrollIntoView({block:"nearest"}),Ke===xe&&C&&(C.scrollTop=0),Ke===$e&&C&&(C.scrollTop=C.scrollHeight),Ke?.focus(),document.activeElement!==Le))return},[W,C]),pe=R.useCallback(()=>oe([A,w]),[oe,A,w]);R.useEffect(()=>{B&&pe()},[B,pe]);const{onOpenChange:re,triggerPointerDownPosRef:ke}=b;R.useEffect(()=>{if(w){let he={x:0,y:0};const xe=$e=>{he={x:Math.abs(Math.round($e.pageX)-(ke.current?.x??0)),y:Math.abs(Math.round($e.pageY)-(ke.current?.y??0))}},Ce=$e=>{he.x<=10&&he.y<=10?$e.preventDefault():$e.composedPath().includes(w)||re(!1),document.removeEventListener("pointermove",xe),ke.current=null};return ke.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[w,re,ke]),R.useEffect(()=>{const he=()=>re(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[re]);const[Ee,De]=wL(he=>{const xe=W().filter(Le=>!Le.disabled),Ce=xe.find(Le=>Le.ref.current===document.activeElement),$e=CL(xe,he,Ce);$e&&setTimeout(()=>$e.ref.current?.focus())}),Ie=R.useCallback((he,xe,Ce)=>{const $e=!j.current&&!Ce;(b.value!==void 0&&b.value===xe||$e)&&(I(he),$e&&(j.current=!0))},[b.value]),Ue=R.useCallback(()=>w?.focus(),[w]),qe=R.useCallback((he,xe,Ce)=>{const $e=!j.current&&!Ce;(b.value!==void 0&&b.value===xe||$e)&&U(he)},[b.value]),Ye=i==="popper"?zb:cL,Ge=Ye===zb?{side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:h,collisionBoundary:d,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:v}:{};return q.jsx(lL,{scope:n,content:w,viewport:C,onViewportChange:x,itemRefCallback:Ie,selectedItem:A,onItemLeave:Ue,itemTextRefCallback:qe,focusSelectedItem:pe,selectedItemText:Z,position:i,isPositioned:B,searchRef:Ee,children:q.jsx(N0,{as:noe,allowPinchZoom:!0,children:q.jsx($0,{asChild:!0,trapped:b.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:it(r,he=>{b.trigger?.focus({preventScroll:!0}),he.preventDefault()}),children:q.jsx(od,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:q.jsx(Ye,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:he=>he.preventDefault(),...S,...Ge,onPlaced:()=>ne(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:it(S.onKeyDown,he=>{const xe=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!xe&&he.key.length===1&&De(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let $e=W().filter(Le=>!Le.disabled).map(Le=>Le.ref.current);if(["ArrowUp","End"].includes(he.key)&&($e=$e.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const Le=he.target,Ke=$e.indexOf(Le);$e=$e.slice(Ke+1)}setTimeout(()=>oe($e)),he.preventDefault()}})})})})})})});uL.displayName=toe;var ioe="SelectItemAlignedPosition",cL=R.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:i,...r}=t,s=ba(ua,n),o=ya(ua,n),[a,l]=R.useState(null),[u,c]=R.useState(null),h=on(e,E=>c(E)),d=PO(n),p=R.useRef(!1),g=R.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:S,focusSelectedItem:b}=o,w=R.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&m&&v&&S){const E=s.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),Z=S.getBoundingClientRect();if(s.dir!=="rtl"){const Le=Z.left-A.left,Ke=I.left-Le,lt=E.left-Ke,St=E.width+lt,zt=Math.max(St,A.width),Ft=window.innerWidth-Lr,Rt=uA(Ke,[Lr,Math.max(Lr,Ft-zt)]);a.style.minWidth=St+"px",a.style.left=Rt+"px"}else{const Le=A.right-Z.right,Ke=window.innerWidth-I.right-Le,lt=window.innerWidth-E.right-Ke,St=E.width+lt,zt=Math.max(St,A.width),Ft=window.innerWidth-Lr,Rt=uA(Ke,[Lr,Math.max(Lr,Ft-zt)]);a.style.minWidth=St+"px",a.style.right=Rt+"px"}const U=d(),W=window.innerHeight-Lr*2,B=m.scrollHeight,ne=window.getComputedStyle(u),j=parseInt(ne.borderTopWidth,10),oe=parseInt(ne.paddingTop,10),pe=parseInt(ne.borderBottomWidth,10),re=parseInt(ne.paddingBottom,10),ke=j+oe+B+re+pe,Ee=Math.min(v.offsetHeight*5,ke),De=window.getComputedStyle(m),Ie=parseInt(De.paddingTop,10),Ue=parseInt(De.paddingBottom,10),qe=E.top+E.height/2-Lr,Ye=W-qe,Ge=v.offsetHeight/2,he=v.offsetTop+Ge,xe=j+oe+he,Ce=ke-xe;if(xe<=qe){const Le=U.length>0&&v===U[U.length-1].ref.current;a.style.bottom="0px";const Ke=u.clientHeight-m.offsetTop-m.offsetHeight,lt=Math.max(Ye,Ge+(Le?Ue:0)+Ke+pe),St=xe+lt;a.style.height=St+"px"}else{const Le=U.length>0&&v===U[0].ref.current;a.style.top="0px";const lt=Math.max(qe,j+m.offsetTop+(Le?Ie:0)+Ge)+Ce;a.style.height=lt+"px",m.scrollTop=xe-qe+m.offsetTop}a.style.margin=`${Lr}px 0`,a.style.minHeight=Ee+"px",a.style.maxHeight=W+"px",i?.(),requestAnimationFrame(()=>p.current=!0)}},[d,s.trigger,s.valueNode,a,u,m,v,S,s.dir,i]);Kn(()=>w(),[w]);const[k,C]=R.useState();Kn(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const x=R.useCallback(E=>{E&&g.current===!0&&(w(),b?.(),g.current=!1)},[w,b]);return q.jsx(soe,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:x,children:q.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:q.jsx(gt.div,{...r,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});cL.displayName=ioe;var roe="SelectPopperPosition",zb=R.forwardRef((t,e)=>{const{__scopeSelect:n,align:i="start",collisionPadding:r=Lr,...s}=t,o=IO(n);return q.jsx(VS,{...o,...s,ref:e,align:i,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});zb.displayName=roe;var[soe,LC]=Tl(ua,{}),Wb="SelectViewport",hL=R.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:i,...r}=t,s=ya(Wb,n),o=LC(Wb,n),a=on(e,s.onViewportChange),l=R.useRef(0);return q.jsxs(q.Fragment,{children:[q.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),q.jsx(AO.Slot,{scope:n,children:q.jsx(gt.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:it(r.onScroll,u=>{const c=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:d}=o;if(d?.current&&h){const p=Math.abs(l.current-c.scrollTop);if(p>0){const g=window.innerHeight-Lr*2,m=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),S=Math.max(m,v);if(S0?k:0,h.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});hL.displayName=Wb;var fL="SelectGroup",[ooe,aoe]=Tl(fL),loe=R.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,r=Gs();return q.jsx(ooe,{scope:n,id:r,children:q.jsx(gt.div,{role:"group","aria-labelledby":r,...i,ref:e})})});loe.displayName=fL;var dL="SelectLabel",uoe=R.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,r=aoe(dL,n);return q.jsx(gt.div,{id:r.id,...i,ref:e})});uoe.displayName=dL;var $m="SelectItem",[coe,pL]=Tl($m),gL=R.forwardRef((t,e)=>{const{__scopeSelect:n,value:i,disabled:r=!1,textValue:s,...o}=t,a=ba($m,n),l=ya($m,n),u=a.value===i,[c,h]=R.useState(s??""),[d,p]=R.useState(!1),g=on(e,b=>l.itemRefCallback?.(b,i,r)),m=Gs(),v=R.useRef("touch"),S=()=>{r||(a.onValueChange(i),a.onOpenChange(!1))};return q.jsx(coe,{scope:n,value:i,disabled:r,textId:m,isSelected:u,onItemTextChange:R.useCallback(b=>{h(w=>w||(b?.textContent??"").trim())},[]),children:q.jsx(AO.ItemSlot,{scope:n,value:i,disabled:r,textValue:c,children:q.jsx(gt.div,{role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...o,ref:g,onFocus:it(o.onFocus,()=>p(!0)),onBlur:it(o.onBlur,()=>p(!1)),onClick:it(o.onClick,()=>{v.current!=="mouse"&&S()}),onPointerUp:it(o.onPointerUp,()=>{v.current==="mouse"&&S()}),onPointerDown:it(o.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:it(o.onPointerMove,b=>{v.current=b.pointerType,r?l.onItemLeave?.():v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:it(o.onPointerLeave,b=>{b.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:it(o.onKeyDown,b=>{l.searchRef?.current!==""&&b.key===" "||(Wse.includes(b.key)&&S(),b.key===" "&&b.preventDefault())})})})})});gL.displayName=$m;var rh="SelectItemText",mL=R.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:r,...s}=t,o=ba(rh,n),a=ya(rh,n),l=pL(rh,n),u=Yse(rh,n),[c,h]=R.useState(null),d=on(e,S=>h(S),l.onItemTextChange,S=>a.itemTextRefCallback?.(S,l.value,l.disabled)),p=c?.textContent,g=R.useMemo(()=>q.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return Kn(()=>(m(g),()=>v(g)),[m,v,g]),q.jsxs(q.Fragment,{children:[q.jsx(gt.span,{id:l.textId,...s,ref:d}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!$O(o.value)?wu.createPortal(s.children,o.valueNode):null]})});mL.displayName=rh;var OL="SelectItemIndicator",hoe=R.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return pL(OL,n).isSelected?q.jsx(gt.span,{"aria-hidden":!0,...i,ref:e}):null});hoe.displayName=OL;var Ub="SelectScrollUpButton",foe=R.forwardRef((t,e)=>{const n=ya(Ub,t.__scopeSelect),i=LC(Ub,t.__scopeSelect),[r,s]=R.useState(!1),o=on(e,i.onScrollButtonChange);return Kn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?q.jsx(xL,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});foe.displayName=Ub;var qb="SelectScrollDownButton",doe=R.forwardRef((t,e)=>{const n=ya(qb,t.__scopeSelect),i=LC(qb,t.__scopeSelect),[r,s]=R.useState(!1),o=on(e,i.onScrollButtonChange);return Kn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?q.jsx(xL,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});doe.displayName=qb;var xL=R.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:i,...r}=t,s=ya("SelectScrollButton",n),o=R.useRef(null),a=PO(n),l=R.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return R.useEffect(()=>()=>l(),[l]),Kn(()=>{a().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),q.jsx(gt.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:it(r.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(i,50))}),onPointerMove:it(r.onPointerMove,()=>{s.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(i,50))}),onPointerLeave:it(r.onPointerLeave,()=>{l()})})}),poe="SelectSeparator",vL=R.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return q.jsx(gt.div,{"aria-hidden":!0,...i,ref:e})});vL.displayName=poe;var bL="SelectArrow",goe=R.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,r=IO(n);return ya(bL,n).position==="popper"?q.jsx(FS,{...r,...i,ref:e}):null});goe.displayName=bL;var yL="SelectBubbleInput",SL=R.forwardRef(({__scopeSelect:t,...e},n)=>{const i=ba(yL,t),{value:r,onValueChange:s,required:o,disabled:a,name:l,autoComplete:u,form:c}=i,{nativeOptions:h,nativeSelectKey:d}=i,p=R.useRef(null),g=on(n,p),m=r??"",v=jse(m),S=Array.from(h).some(b=>(b.props.value??"")==="");return R.useEffect(()=>{const b=p.current;if(!b)return;const w=window.HTMLSelectElement.prototype,C=Object.getOwnPropertyDescriptor(w,"value").set;if(v!==m&&C){const x=new Event("change",{bubbles:!0});C.call(b,m),b.dispatchEvent(x)}},[v,m]),q.jsxs(gt.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:l,autoComplete:u,disabled:a,form:c,onChange:b=>s(b.target.value),...e,style:{...K7,...e.style},ref:g,defaultValue:m,children:[$O(r)&&!S?q.jsx("option",{value:""}):null,Array.from(h)]},d)});SL.displayName=yL;function moe(t){return typeof t=="function"}function $O(t){return t===""||t===void 0}function wL(t){const e=ta(t),n=R.useRef(""),i=R.useRef(0),r=R.useCallback(o=>{const a=n.current+o;e(a),(function l(u){n.current=u,window.clearTimeout(i.current),u!==""&&(i.current=window.setTimeout(()=>l(""),1e3))})(a)},[e]),s=R.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return R.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,r,s]}function CL(t,e,n){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=Ooe(t,Math.max(s,0));r.length===1&&(o=o.filter(u=>u!==n));const l=o.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Ooe(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var[RO]=vo("Tooltip",[mc]),LO=mc(),_L="TooltipProvider",xoe=700,Hb="tooltip.open",[voe,NC]=RO(_L),kL=t=>{const{__scopeTooltip:e,delayDuration:n=xoe,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:s}=t,o=R.useRef(!0),a=R.useRef(!1),l=R.useRef(0);return R.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),q.jsx(voe,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:R.useCallback(()=>{i<=0||(window.clearTimeout(l.current),o.current=!1)},[i]),onClose:R.useCallback(()=>{i<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,i))},[i]),isPointerInTransitRef:a,onPointerInTransitChange:R.useCallback(u=>{a.current=u},[]),disableHoverableContent:r,children:s})};kL.displayName=_L;var bf="Tooltip",[boe,Ad]=RO(bf),EL=t=>{const{__scopeTooltip:e,children:n,open:i,defaultOpen:r,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=t,l=NC(bf,t.__scopeTooltip),u=LO(e),[c,h]=R.useState(null),d=Gs(),p=R.useRef(0),g=o??l.disableHoverableContent,m=a??l.delayDuration,v=R.useRef(!1),[S,b]=ao({prop:i,defaultProp:r??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Hb))):l.onClose(),s?.(E)},caller:bf}),w=R.useMemo(()=>S?v.current?"delayed-open":"instant-open":"closed",[S]),k=R.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,b(!0)},[b]),C=R.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),x=R.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,b(!0),p.current=0},m)},[m,b]);return R.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),q.jsx(DS,{...u,children:q.jsx(boe,{scope:e,contentId:d,open:S,stateAttribute:w,trigger:c,onTriggerChange:h,onTriggerEnter:R.useCallback(()=>{l.isOpenDelayedRef.current?x():k()},[l.isOpenDelayedRef,x,k]),onTriggerLeave:R.useCallback(()=>{g?C():(window.clearTimeout(p.current),p.current=0)},[C,g]),onOpen:k,onClose:C,disableHoverableContent:g,children:n})})};EL.displayName=bf;var Yb="TooltipTrigger",TL=R.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,r=Ad(Yb,n),s=NC(Yb,n),o=LO(n),a=R.useRef(null),l=on(e,a,r.onTriggerChange),u=R.useRef(!1),c=R.useRef(!1),h=R.useCallback(()=>u.current=!1,[]);return R.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),q.jsx(R0,{asChild:!0,...o,children:q.jsx(gt.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:l,onPointerMove:it(t.onPointerMove,d=>{d.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),c.current=!0)}),onPointerLeave:it(t.onPointerLeave,()=>{r.onTriggerLeave(),c.current=!1}),onPointerDown:it(t.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:it(t.onFocus,()=>{u.current||r.onOpen()}),onBlur:it(t.onBlur,r.onClose),onClick:it(t.onClick,r.onClose)})})});TL.displayName=Yb;var MC="TooltipPortal",[yoe,Soe]=RO(MC,{forceMount:void 0}),AL=t=>{const{__scopeTooltip:e,forceMount:n,children:i,container:r}=t,s=Ad(MC,e);return q.jsx(yoe,{scope:e,forceMount:n,children:q.jsx(bo,{present:n||s.open,children:q.jsx(ad,{asChild:!0,container:r,children:i})})})};AL.displayName=MC;var qu="TooltipContent",PL=R.forwardRef((t,e)=>{const n=Soe(qu,t.__scopeTooltip),{forceMount:i=n.forceMount,side:r="top",...s}=t,o=Ad(qu,t.__scopeTooltip);return q.jsx(bo,{present:i||o.open,children:o.disableHoverableContent?q.jsx(IL,{side:r,...s,ref:e}):q.jsx(woe,{side:r,...s,ref:e})})}),woe=R.forwardRef((t,e)=>{const n=Ad(qu,t.__scopeTooltip),i=NC(qu,t.__scopeTooltip),r=R.useRef(null),s=on(e,r),[o,a]=R.useState(null),{trigger:l,onClose:u}=n,c=r.current,{onPointerInTransitChange:h}=i,d=R.useCallback(()=>{a(null),h(!1)},[h]),p=R.useCallback((g,m)=>{const v=g.currentTarget,S={x:g.clientX,y:g.clientY},b=Eoe(S,v.getBoundingClientRect()),w=Toe(S,b),k=Aoe(m.getBoundingClientRect()),C=Ioe([...w,...k]);a(C),h(!0)},[h]);return R.useEffect(()=>()=>d(),[d]),R.useEffect(()=>{if(l&&c){const g=v=>p(v,c),m=v=>p(v,l);return l.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[l,c,p,d]),R.useEffect(()=>{if(o){const g=m=>{const v=m.target,S={x:m.clientX,y:m.clientY},b=l?.contains(v)||c?.contains(v),w=!Poe(S,o);b?d():w&&(d(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,o,u,d]),q.jsx(IL,{...t,ref:s})}),[Coe,_oe]=RO(bf,{isInside:!1}),koe=qQ("TooltipContent"),IL=R.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=t,l=Ad(qu,n),u=LO(n),{onClose:c}=l;return R.useEffect(()=>(document.addEventListener(Hb,c),()=>document.removeEventListener(Hb,c)),[c]),R.useEffect(()=>{if(l.trigger){const h=d=>{d.target instanceof Node&&d.target.contains(l.trigger)&&c()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,c]),q.jsx(od,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:c,children:q.jsxs(VS,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[q.jsx(koe,{children:i}),q.jsx(Coe,{scope:n,isInside:!0,children:q.jsx(Xse,{id:l.contentId,role:"tooltip",children:r||i})})]})})});PL.displayName=qu;var $L="TooltipArrow",RL=R.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,r=LO(n);return _oe($L,n).isInside?null:q.jsx(FS,{...r,...i,ref:e})});RL.displayName=$L;function Eoe(t,e){const n=Math.abs(e.top-t.y),i=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function Toe(t,e,n=5){const i=[];switch(e){case"top":i.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":i.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":i.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":i.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return i}function Aoe(t){const{top:e,right:n,bottom:i,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:i},{x:r,y:i}]}function Poe(t,e){const{x:n,y:i}=t;let r=!1;for(let s=0,o=e.length-1;si!=d>i&&n<(h-u)*(i-c)/(d-c)+u&&(r=!r)}return r}function Ioe(t){const e=t.slice();return e.sort((n,i)=>n.xi.x?1:n.yi.y?1:0),$oe(e)}function $oe(t){if(t.length<=1)return t.slice();const e=[];for(let i=0;i=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let i=t.length-1;i>=0;i--){const r=t[i];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var LL=kL,NL=EL,ML=TL,QL=AL,DL=PL,Roe=RL;const Sa=_.forwardRef(({title:t,children:e},n)=>{const i=Pt(es);return _.createElement(LL,{delayDuration:100},_.createElement(NL,null,_.createElement(ML,{ref:n,asChild:!0},_.createElement("span",{className:G.tooltipTrigger},e)),_.createElement(QL,{container:i?.current},_.createElement(DL,{className:ft(G.tooltipContent),sideOffset:10},t))))}),QC=_.forwardRef(({children:t,className:e,...n},i)=>_.createElement(gL,{...n,ref:i,className:ft(e,G.selectItem)},_.createElement(mL,null,t))),VL=({title:t,placeholder:e,className:n})=>{const[i,r]=$t(In,Jt);return _.createElement(Sa,{title:t},_.createElement($C,{"aria-label":e,className:ft(G.selectTrigger,n),"data-toolbar-item":!0,disabled:i},_.createElement(iL,{placeholder:e}),_.createElement(RC,{className:G.selectDropdownArrow},r("arrow_drop_down"))))},DC=({children:t,className:e=G.selectContainer})=>{const n=Pt(es);return _.createElement(sL,{container:n?.current},_.createElement(oL,{className:ft(e,"mdxeditor-select-content"),onCloseAutoFocus:i=>{i.preventDefault()},position:"popper"},_.createElement(hL,{"data-editor-dropdown":!0,style:{maxHeight:"var(--radix-select-content-available-height)"}},t)))},FL=({children:t,title:e,className:n})=>{const[i,r]=$t(In,Jt);return _.createElement(Sa,{title:e},_.createElement($C,{"aria-label":e,className:ft(G.toolbarButtonSelectTrigger,n),disabled:i},t,_.createElement(RC,{className:G.selectDropdownArrow},r("arrow_drop_down"))))},Pd=t=>_.createElement(IC,{value:t.value||"",onValueChange:t.onChange,disabled:t.disabled},_.createElement(VL,{title:t.triggerTitle,placeholder:t.placeholder}),_.createElement(DC,null,t.items.map((e,n)=>e==="separator"?_.createElement(vL,{key:n}):_.createElement(QC,{key:n,value:e.value},e.label)))),Loe=[],BL=({language:t,nodeKey:e,code:n,focusEmitter:i})=>{const r=Qt(),{parentEditor:s,lexicalNode:o}=am(),[a,l,u,c,h]=$t(In,Lm,Nm,Jt,yf),d=Bse(e,t,i),{setCode:p}=am(),g=_.useRef(null),m=_.useRef(null),{value:v,items:S}=_.useMemo(()=>VC(h,t),[h,t]),b=_.useRef(p);return b.current=p,d.current={getCodemirror:()=>g.current},_.useEffect(()=>{const w=m.current;return(async()=>{const k=[...l,G7,k7,sC(),_c.of([qie]),Se.lineWrapping,Se.updateListener.of(({state:C})=>{b.current(C.doc.toString())}),Se.domEventHandlers({focus:()=>{s.update(()=>{an(null)})}})];if(a&&k.push(ct.readOnly.of(!0)),t!==""){const C=h.keyMap[t]??t,x=h.supportMap[C];if(x)k.push(x.extension);else if(u){const E=Nne.find(A=>A.name===t||A.alias.includes(t)||A.extensions.includes(t));if(E)try{const A=await E.load();k.push(A.extension)}catch{console.warn("failed to load language support for",t)}}}w.innerHTML="",g.current=new Se({parent:w,state:ct.create({doc:n,extensions:k})}),w.addEventListener("keydown",cA)})(),()=>{var k;(k=g.current)==null||k.destroy(),g.current=null,w.removeEventListener("keydown",cA)}},[a,t,...l]),_.createElement("div",{className:G.codeMirrorWrapper},_.createElement("div",{className:G.codeMirrorToolbar},_.createElement(Pd,{disabled:a,value:v,onChange:w=>{s.update(()=>{o.setLanguage(w===Ba?"":w),setTimeout(()=>{s.update(()=>{o.getLatest().select()})})})},triggerTitle:r("codeBlock.selectLanguage","Select code block language"),placeholder:r("codeBlock.inlineLanguage","Language"),items:S}),_.createElement("button",{className:G.iconButton,type:"button",disabled:a,title:r("codeblock.delete","Delete code block"),onClick:w=>{w.preventDefault(),s.update(()=>{o.remove()})}},c("delete_small"))),_.createElement("div",{ref:m}))};function cA(t){t.stopPropagation()}const Ba="__EMPTY_VALUE__";function Rm(t){var e;const n=[],i={},r={};if(Array.isArray(t))for(const s of t){const o=((e=s.alias)==null?void 0:e[0])??s.name.toLowerCase(),a=o||Ba;if(n.push({value:a,label:s.name}),i[o]=a,s.alias)for(const l of s.alias)i[l]=a;if(s.extensions)for(const l of s.extensions)i[l]=a;i[s.name.toLowerCase()]=a,s.support&&(r[a]=s.support)}else{const s={};for(const[o,a]of Object.entries(t))a in s||(s[a]=o,n.push({value:o||Ba,label:a})),i[o]=s[a]||Ba}return{items:n,keyMap:i,supportMap:r}}function VC(t,e){const n=t.keyMap[e]??e;return!n||t.items.some(i=>i.value===n)?{value:n,items:t.items}:{value:n,items:[...t.items,{value:n,label:e}]}}const yf=Pe(Rm({js:"JavaScript",ts:"TypeScript",tsx:"TypeScript (React)",jsx:"JavaScript (React)",css:"CSS"})),jL=mn(t=>{t.link(t.pipe(jL,Xr(({language:e,code:n})=>({code:n,language:e,meta:""}))),dO)}),Lm=Pe([]),Nm=Pe(!0),Noe=En({update(t,e){t.pubIn({[yf]:Rm(e?.codeBlockLanguages??{}),[Lm]:e?.codeMirrorExtensions??[],[Nm]:e?.autoLoadLanguageSupport??!0})},init(t,e){const n=Rm(e?.codeBlockLanguages??{});t.pubIn({[yf]:n,[Lm]:e?.codeMirrorExtensions??[],[F4]:Moe(n),[Nm]:e?.autoLoadLanguageSupport??!0})}});function Moe(t){return{match(e,n){return!n||Object.hasOwn(t.keyMap,e??"")},priority:1,Editor:BL}}const Qoe={}.hasOwnProperty,Doe={},hA=/^[^\t\n\r "#'.<=>`}]+$/,Voe=/^[^\t\n\r "'<=>`}]+$/;function Foe(){return{canContainEols:["textDirective"],enter:{directiveContainer:joe,directiveContainerAttributes:vx,directiveContainerLabel:zoe,directiveLeaf:Zoe,directiveLeafAttributes:vx,directiveText:Xoe,directiveTextAttributes:vx},exit:{directiveContainer:_x,directiveContainerAttributeClassValue:yx,directiveContainerAttributeIdValue:bx,directiveContainerAttributeName:wx,directiveContainerAttributeValue:Sx,directiveContainerAttributes:Cx,directiveContainerLabel:Woe,directiveContainerName:xx,directiveLeaf:_x,directiveLeafAttributeClassValue:yx,directiveLeafAttributeIdValue:bx,directiveLeafAttributeName:wx,directiveLeafAttributeValue:Sx,directiveLeafAttributes:Cx,directiveLeafName:xx,directiveText:_x,directiveTextAttributeClassValue:yx,directiveTextAttributeIdValue:bx,directiveTextAttributeName:wx,directiveTextAttributeValue:Sx,directiveTextAttributes:Cx,directiveTextName:xx}}}function Boe(t){const e=Doe;if(e.quote!=='"'&&e.quote!=="'"&&e.quote!==null&&e.quote!==void 0)throw new Error("Invalid quote `"+e.quote+"`, expected `'` or `\"`");return n.peek=Uoe,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:` +`,inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}]};function n(s,o,a,l){const u=a.createTracker(l),c=qoe(s),h=a.enter(s.type);let d=u.move(c+(s.name||"")),p;if(s.type==="containerDirective"){const g=(s.children||[])[0];p=fA(g)?g:void 0}else p=s;if(p&&p.children&&p.children.length>0){const g=a.enter("label"),m=`${s.type}Label`,v=a.enter(m);d+=u.move("["),d+=u.move(a.containerPhrasing(p,{...u.current(),before:d,after:"]"})),d+=u.move("]"),v(),g()}if(d+=u.move(i(s,a)),s.type==="containerDirective"){const g=(s.children||[])[0];let m=s;fA(g)&&(m=Object.assign({},s,{children:s.children.slice(1)})),m&&m.children&&m.children.length>0&&(d+=u.move(` +`),d+=u.move(a.containerFlow(m,u.current()))),d+=u.move(` +`+c)}return h(),d}function i(s,o){const a=s.attributes||{},l=[];let u,c,h,d;for(d in a)if(Qoe.call(a,d)&&a[d]!==void 0&&a[d]!==null){const p=String(a[d]);if(d==="id")h=e.preferShortcut!==!1&&hA.test(p)?"#"+p:r("id",p,s,o);else if(d==="class"){const g=p.split(/[\t\n\r ]+/g),m=[],v=[];let S=-1;for(;++S0?r("class",m.join(" "),s,o):"",c=v.length>0?"."+v.join("."):""}else l.push(r(d,p,s,o))}return u&&l.unshift(u),c&&l.unshift(c),h&&l.unshift(h),l.length>0?"{"+l.join(" ")+"}":""}function r(s,o,a,l){if(e.collapseEmptyAttributes!==!1&&!o)return s;if(e.preferUnquoted&&Voe.test(o))return s+"="+o;const u=e.quote||l.options.quote||'"',c=u==='"'?"'":'"',h=e.quoteSmart&&hg(o,u)>hg(o,c)?c:u,d=a.type==="textDirective"?[h]:[h,` +`,"\r"];return s+"="+h+zP(o,{subset:d})+h}}function joe(t){FC.call(this,"containerDirective",t)}function Zoe(t){FC.call(this,"leafDirective",t)}function Xoe(t){FC.call(this,"textDirective",t)}function FC(t,e){this.enter({type:t,name:"",attributes:{},children:[]},e)}function xx(t){const e=this.stack[this.stack.length-1];zi(e.type==="containerDirective"||e.type==="leafDirective"||e.type==="textDirective"),e.name=this.sliceSerialize(t)}function zoe(t){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},t)}function Woe(t){this.exit(t)}function vx(){this.data.directiveAttributes=[],this.buffer()}function bx(t){this.data.directiveAttributes.push(["id",y0(this.sliceSerialize(t),{attribute:!0})])}function yx(t){this.data.directiveAttributes.push(["class",y0(this.sliceSerialize(t),{attribute:!0})])}function Sx(t){const e=this.data.directiveAttributes;e[e.length-1][1]=y0(this.sliceSerialize(t),{attribute:!0})}function wx(t){this.data.directiveAttributes.push([this.sliceSerialize(t),""])}function Cx(){const t=this.data.directiveAttributes,e={};let n=-1;for(;++ne&&(e=s)}}),e+=3):t.type==="leafDirective"?e=2:e=1,":".repeat(e)}function BC(t,e,n,i,r,s,o,a,l,u,c,h,d,p,g){let m,v;return S;function S(j){return t.enter(i),t.enter(r),t.consume(j),t.exit(r),b}function b(j){return j===35?(m=o,w(j)):j===46?(m=a,w(j)):j===58||j===95||dy(j)?(t.enter(s),t.enter(l),t.consume(j),x):g&&dr(j)?pr(t,b,"whitespace")(j):!g&&_i(j)?Dd(t,b)(j):ne(j)}function w(j){const oe=m+"Marker";return t.enter(s),t.enter(m),t.enter(oe),t.consume(j),t.exit(oe),k}function k(j){if(j===null||j===34||j===35||j===39||j===46||j===60||j===61||j===62||j===96||j===125||_i(j))return n(j);const oe=m+"Value";return t.enter(oe),t.consume(j),C}function C(j){if(j===null||j===34||j===39||j===60||j===61||j===62||j===96)return n(j);if(j===35||j===46||j===125||_i(j)){const oe=m+"Value";return t.exit(oe),t.exit(m),t.exit(s),b(j)}return t.consume(j),C}function x(j){return j===45||j===46||j===58||j===95||XP(j)?(t.consume(j),x):(t.exit(l),g&&dr(j)?pr(t,E,"whitespace")(j):!g&&_i(j)?Dd(t,E)(j):E(j))}function E(j){return j===61?(t.enter(u),t.consume(j),t.exit(u),A):(t.exit(s),b(j))}function A(j){return j===null||j===60||j===61||j===62||j===96||j===125||g&&Yt(j)?n(j):j===34||j===39?(t.enter(c),t.enter(d),t.consume(j),t.exit(d),v=j,Z):g&&dr(j)?pr(t,A,"whitespace")(j):!g&&_i(j)?Dd(t,A)(j):(t.enter(h),t.enter(p),t.consume(j),v=void 0,I)}function I(j){return j===null||j===34||j===39||j===60||j===61||j===62||j===96?n(j):j===125||_i(j)?(t.exit(p),t.exit(h),t.exit(s),b(j)):(t.consume(j),I)}function Z(j){return j===v?(t.enter(d),t.consume(j),t.exit(d),t.exit(c),t.exit(s),B):(t.enter(h),U(j))}function U(j){return j===v?(t.exit(h),Z(j)):j===null?n(j):Yt(j)?g?n(j):Dd(t,U)(j):(t.enter(p),t.consume(j),W)}function W(j){return j===v||j===null||Yt(j)?(t.exit(p),U(j)):(t.consume(j),W)}function B(j){return j===125||_i(j)?b(j):ne(j)}function ne(j){return j===125?(t.enter(r),t.consume(j),t.exit(r),t.exit(i),e):n(j)}}function jC(t,e,n,i,r,s,o){let a=0,l=0,u;return c;function c(v){return t.enter(i),t.enter(r),t.consume(v),t.exit(r),h}function h(v){return v===93?(t.enter(r),t.consume(v),t.exit(r),t.exit(i),e):(t.enter(s),d(v))}function d(v){if(v===93&&!l)return m(v);const S=t.enter("chunkText",{contentType:"text",previous:u});return u&&(u.next=S),u=S,p(v)}function p(v){return v===null||a>999||v===91&&++l>32?n(v):v===93&&!l--?(t.exit("chunkText"),m(v)):Yt(v)?o?n(v):(t.consume(v),t.exit("chunkText"),d):(t.consume(v),v===92?g:p)}function g(v){return v===91||v===92||v===93?(t.consume(v),a++,p):p(v)}function m(v){return t.exit(s),t.enter(r),t.consume(v),t.exit(r),t.exit(i),e}}function ZC(t,e,n,i){const r=this;return s;function s(a){return dy(a)?(t.enter(i),t.consume(a),o):n(a)}function o(a){return a===45||a===95||XP(a)?(t.consume(a),o):(t.exit(i),r.previous===45||r.previous===95?n(a):e(a))}}const Hoe={tokenize:Koe,concrete:!0},Yoe={tokenize:Joe,partial:!0},Goe={tokenize:eae,partial:!0},Ip={tokenize:tae,partial:!0};function Koe(t,e,n){const i=this,r=i.events[i.events.length-1],s=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0;let o=0,a;return l;function l(I){return t.enter("directiveContainer"),t.enter("directiveContainerFence"),t.enter("directiveContainerSequence"),u(I)}function u(I){return I===58?(t.consume(I),o++,u):o<3?n(I):(t.exit("directiveContainerSequence"),ZC.call(i,t,c,n,"directiveContainerName")(I))}function c(I){return I===91?t.attempt(Yoe,h,h)(I):h(I)}function h(I){return I===123?t.attempt(Goe,d,d)(I):d(I)}function d(I){return pr(t,p,"whitespace")(I)}function p(I){return t.exit("directiveContainerFence"),I===null?E(I):Yt(I)?i.interrupt?e(I):t.attempt(Ip,g,E)(I):n(I)}function g(I){return I===null?E(I):Yt(I)?t.check(Ip,w,E)(I):(t.enter("directiveContainerContent"),m(I))}function m(I){return t.attempt({tokenize:A,partial:!0},x,s?pr(t,v,"linePrefix",s+1):v)(I)}function v(I){return I===null?x(I):Yt(I)?t.check(Ip,b,x)(I):b(I)}function S(I){if(I===null){const Z=t.exit("chunkDocument");return i.parser.lazy[Z.start.line]=!1,x(I)}return Yt(I)?t.check(Ip,k,C)(I):(t.consume(I),S)}function b(I){const Z=t.enter("chunkDocument",{contentType:"document",previous:a});return a&&(a.next=Z),a=Z,S(I)}function w(I){return t.enter("directiveContainerContent"),m(I)}function k(I){t.consume(I);const Z=t.exit("chunkDocument");return i.parser.lazy[Z.start.line]=!1,m}function C(I){const Z=t.exit("chunkDocument");return i.parser.lazy[Z.start.line]=!1,x(I)}function x(I){return t.exit("directiveContainerContent"),E(I)}function E(I){return t.exit("directiveContainer"),e(I)}function A(I,Z,U){let W=0;return pr(I,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function B(oe){return I.enter("directiveContainerFence"),I.enter("directiveContainerSequence"),ne(oe)}function ne(oe){return oe===58?(I.consume(oe),W++,ne):We in t?mae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kx=(t,e,n)=>(Oae(t,typeof e!="symbol"?e+"":e,n),n);class $c extends Cr{constructor(e,n){super(n),kx(this,"__mdastNode"),kx(this,"__focusEmitter",ef()),kx(this,"select",()=>{this.__focusEmitter.publish()}),this.__mdastNode=e}static getType(){return"directive"}static clone(e){return new $c(structuredClone(e.__mdastNode),e.__key)}static importJSON(e){return NO(e.mdastNode)}getMdastNode(){return this.__mdastNode}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"directive",version:1}}createDOM(){return document.createElement(this.__mdastNode.type==="textDirective"?"span":"div")}updateDOM(){return!1}setMdastNode(e){this.getWritable().__mdastNode=e}decorate(e,n){return _.createElement(xae,{lexicalNode:this,mdastNode:this.getMdastNode(),parentEditor:e,config:n,focusEmitter:this.__focusEmitter})}isInline(){return this.__mdastNode.type==="textDirective"}isKeyboardSelectable(){return!0}}const xae=t=>{const{mdastNode:e}=t,[n]=$t(tl),i=n.find(s=>s.testNode(e));if(!i)throw new Error(`No descriptor found for directive ${e.name}`);const r=i.Editor;return _.createElement(cO.Provider,{value:t},_.createElement(r,{descriptor:i,mdastNode:e,lexicalNode:t.lexicalNode,parentEditor:t.parentEditor}))};function NO(t,e){return new $c(t,e)}function ZL(t){return t instanceof $c}const vae={testLexicalNode:ZL,visitLexicalNode({actions:t,mdastParent:e,lexicalNode:n}){t.appendToParent(e,n.getMdastNode())}},bae=["leafDirective","containerDirective","textDirective"];function yae(t){return bae.includes(t.type)}const Sae=t=>({testNode:(e,{directiveDescriptors:n})=>{if(yae(e)){const i=n.find(r=>r.testNode(e));return t&&!i&&e.type==="textDirective"?!0:i!==void 0}return!1},visitNode({lexicalParent:e,mdastNode:n,descriptors:i}){!t||i.directiveDescriptors.some(s=>s.testNode(n))?e.append(NO(n)):e.append(It(`:${n.name}`))}}),XC=mn(t=>{t.link(t.pipe(XC,Xr(e=>()=>NO({children:[],...e}))),pc)}),wae=En({update:(t,e)=>{t.pub(tl,e?.directiveDescriptors??[])},init:(t,e)=>{t.pubIn({[tl]:e?.directiveDescriptors??[],[Jo]:Foe(),[Ko]:gae(),[Qi]:Sae(e?.escapeUnknownTextDirectives),[rr]:$c,[sr]:vae,[bl]:Boe()})}}),MO=["note","tip","danger","info","caution"],Cae={name:"admonition",attributes:[],hasChildren:!0,testNode(t){return MO.includes(t.name)},Editor({mdastNode:t}){var e;const{config:{theme:n}}=Od();return _.createElement("div",{className:(e=n.admonition)==null?void 0:e[t.name]},_.createElement(fO,{block:!0,getContent:i=>i.children,getUpdatedMdastNode:(i,r)=>({...i,children:r})}))}},_ae=({mdastNode:t,descriptor:e})=>{const n=hO(),i=_.useMemo(()=>e.attributes.reduce((s,o)=>{var a;return s[o]=((a=t.attributes)==null?void 0:a[o])??"",s},{}),[t,e]),r=_.useCallback(s=>{n({attributes:Object.fromEntries(Object.entries(s).filter(([,o])=>o!==""))})},[n]);return _.createElement("div",{className:t.type==="textDirective"?G.inlineEditor:G.blockEditor},e.attributes.length==0&&e.hasChildren&&t.type!=="textDirective"?_.createElement("span",{className:G.genericComponentName},t.name):null,e.attributes.length>0?_.createElement(Mw,{properties:i,title:t.name||"",onChange:r}):null,e.hasChildren?_.createElement(fO,{block:t.type==="containerDirective",getContent:s=>s.children,getUpdatedMdastNode:(s,o)=>({...s,children:o})}):_.createElement("span",{className:G.genericComponentName},t.name))};function kae({url:t,title:e,text:n,onSubmit:i,onCancel:r,linkAutocompleteSuggestions:s,showLinkTitleField:o,showAnchorTextField:a}){const{register:l,handleSubmit:u,control:c,setValue:h,reset:d}=iO({values:{url:t,title:e,text:n}}),p=Qt();return _.createElement("form",{onSubmit:g=>{u(i)(g),g.stopPropagation(),g.preventDefault()},onReset:g=>{g.stopPropagation(),r()},onKeyDown:g=>{g.key==="Escape"&&(g.stopPropagation(),r())},className:ft(G.multiFieldForm,G.linkDialogEditForm)},_.createElement("div",{className:G.formField},_.createElement("label",{htmlFor:"link-url"},p("createLink.url","URL")),_.createElement(E6,{register:l,initialInputValue:t,inputName:"url",suggestions:s,setValue:h,control:c,placeholder:p("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),a?_.createElement("div",{className:G.formField},_.createElement("label",{htmlFor:"link-text",title:p("createLink.textTooltip","The text to be displayed for the link")},p("createLink.text","Anchor text")),_.createElement("input",{id:"link-text",className:G.textInput,size:40,...l("text")})):null,o?_.createElement("div",{className:G.formField},_.createElement("label",{htmlFor:"link-title",title:p("createLink.titleTooltip","The link's title attribute, shown on hover")},p("createLink.title","Link title")),_.createElement("input",{id:"link-title",className:G.textInput,size:40,...l("title")})):null,_.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},_.createElement("button",{type:"submit",title:p("createLink.saveTooltip","Set URL"),"aria-label":p("createLink.saveTooltip","Set URL"),className:ft(G.primaryButton)},p("dialogControls.save","Save")),_.createElement("button",{type:"reset",title:p("createLink.cancelTooltip","Cancel change"),"aria-label":p("createLink.cancelTooltip","Cancel change"),className:ft(G.secondaryButton)},p("dialogControls.cancel","Cancel"))))}const Eae=()=>{const[t,e,n,i,r,s,o]=$t(es,Gt,Jt,di,YC,GC,JC),a=bt(zC),l=bt(WC),u=bt(UC),c=bt(qC),h=bt(HC);_.useEffect(()=>{const S=()=>{e?.getEditorState().read(()=>{a(!0)})};return window.addEventListener("resize",S),window.addEventListener("scroll",S),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",S)}},[e,a]);const[d,p]=_.useState(!1),g=Qt();if(i.type==="inactive")return null;const m=i.rectangle,v=i.type==="preview"&&i.url.startsWith("http");return _.createElement(V0,{open:!0},_.createElement(vU,{"data-visible":i.type==="edit",className:G.linkDialogAnchor,style:{top:`${m.top}px`,left:`${m.left}px`,width:`${m.width}px`,height:`${m.height}px`}}),_.createElement(F0,{container:t?.current},_.createElement(o$,{className:ft(G.linkDialogPopoverContent),sideOffset:5,onOpenAutoFocus:S=>{S.preventDefault()},key:i.linkNodeKey},i.type==="edit"&&_.createElement(kae,{url:i.url,title:i.title,text:i.text,onSubmit:l,onCancel:u.bind(null),linkAutocompleteSuggestions:r,showLinkTitleField:o,showAnchorTextField:i.withAnchorText}),i.type==="preview"&&_.createElement(_.Fragment,null,_.createElement("a",{className:G.linkDialogPreviewAnchor,href:i.url,...v?{target:"_blank",rel:"noreferrer"}:{},onClick:S=>{s!==null&&(S.preventDefault(),s(i.url))},title:v?g("linkPreview.open","Open {{url}} in new window",{url:i.url}):i.url},_.createElement("span",null,i.url),v&&n("open_in_new")),_.createElement(Ex,{onClick:()=>{c()},title:g("linkPreview.edit","Edit link URL"),"aria-label":g("linkPreview.edit","Edit link URL")},n("edit")),_.createElement(LL,null,_.createElement(NL,{open:d},_.createElement(ML,{asChild:!0},_.createElement(Ex,{title:g("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":g("linkPreview.copyToClipboard","Copy to clipboard"),onClick:()=>{window.navigator.clipboard.writeText(i.url).then(()=>{p(!0),setTimeout(()=>{p(!1)},1e3)})}},n(d?"check":"content_copy"))),_.createElement(QL,{container:t?.current},_.createElement(DL,{className:ft(G.tooltipContent),sideOffset:5},g("linkPreview.copied","Copied!"),_.createElement(Roe,null))))),_.createElement(Ex,{title:g("linkPreview.remove","Remove link"),"aria-label":g("linkPreview.remove","Remove link"),onClick:()=>{h()}},n("link_off"))),_.createElement(B0,{className:G.popoverArrow}))))},Ex=_.forwardRef(({className:t,...e},n)=>_.createElement("button",{className:ft(G.actionButton,t),ref:n,...e}));function Gb(t){if(!t)return null;const e=wI(t);if(e===null)return null;const n=e.getParent();return ki(n)?n:ki(e)?e:null}const zC=mn(),di=Pe({type:"inactive"},t=>{t.pub(Lu,e=>e.registerCommand(ic,()=>t.getValue(di).type==="preview"?(t.pub(di,{type:"inactive"}),!0):!1,Zt)),t.sub(t.pipe(Ps),e=>{e!=="rich-text"&&t.pub(di,{type:"inactive"})}),t.pub(Lu,e=>e.registerCommand(Lf,n=>{if(n.key==="k"&&(qh?n.metaKey:n.ctrlKey)&&!t.getValue(In)){const i=me();return ce(i)?(t.pub(QO),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},Vh)),t.sub(t.pipe(qC,rn(di,Gt)),([,e,n])=>{if(e.type==="preview")setTimeout(()=>{n?.getEditorState().read(()=>{const i=At(e.linkNodeKey),r=ki(i)?i.getTextContent().length>0&&i.getChildrenSize()<=1:!1,s=r&&i?i.getTextContent():"";t.pub(di,{type:"edit",initialUrl:e.url,url:e.url,title:e.title,text:s,withAnchorText:r,linkNodeKey:e.linkNodeKey,rectangle:e.rectangle})})});else throw new Error("Cannot switch to edit mode when not in preview mode")}),t.sub(t.pipe(WC,rn(Gt,di,el)),([e,n,i,r])=>{var s,o,a;const l=((s=e.text)==null?void 0:s.trim())??"",u=((o=e.url)==null?void 0:o.trim())??"",c=((a=e.title)==null?void 0:a.trim())??"";if(u!==""){if(r?.isCollapsed()){const h=l||c||u;n?.update(()=>{const d=Gb(r);if(d)if(Mr(d)){const p=oo(u,{title:c});p.append(It(l)),d.replace(p),p.select()}else d.setURL(u),d.setTitle(c),dA(d.getFirstChild(),l);else{const p=oo(u,{title:c});p.append(It(h)),gl([p]),p.select()}},{discrete:!0})}else n?.update(()=>{dA(r?.anchor.getNode(),l)}),n?.dispatchCommand(Nu,{url:u,title:c});t.pub(di,{type:"preview",linkNodeKey:i.linkNodeKey,rectangle:i.rectangle,title:c,url:u})}else i.type==="edit"&&i.initialUrl!==""&&n?.dispatchCommand(Nu,null),t.pub(di,{type:"inactive"})}),t.link(t.pipe(UC,rn(di,Gt),Xr(([,e,n])=>{if(e.type==="edit")return n?.focus(),e.initialUrl===""?{type:"inactive"}:{type:"preview",url:e.initialUrl,linkNodeKey:e.linkNodeKey,rectangle:e.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),di),t.link(t.pipe(t.combine(el,zC),rn(Gt,di,In),Xr(([[e],n,i,r])=>{if(ce(e)&&n&&!r){const s=Gb(e);if(!e.isCollapsed())return{type:"inactive"};if(s){const o=ES(n);return o?{type:"preview",url:s.getURL(),linkNodeKey:s.getKey(),title:s.getTitle(),rectangle:o}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),di)}),WC=mn(),UC=Gr(),Tae=Gr(),qC=Gr(),HC=Gr(t=>{t.sub(t.pipe(HC,rn(Gt)),([,e])=>{e?.dispatchCommand(Nu,null)})}),QO=Gr(t=>{t.sub(t.pipe(QO,rn(el,Gt),ec(([,e])=>ce(e))),([,e,n])=>{n?.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const i=Gb(e),r=ES(n),s=i?.getURL()??"",o=i?.getURL()??"",a=i?.getTitle()??"",l=i?.getKey()??"",u=i?i.getTextContent().length>0&&i.getChildrenSize()<=1:!!e?.isCollapsed(),c=u&&i?i.getTextContent():"";t.pub(di,{type:"edit",initialUrl:s,url:o,title:a,text:c,withAnchorText:u,linkNodeKey:l,rectangle:r})})})})})}),YC=Pe([]),GC=Pe(null),KC=Pe(null,t=>{t.pub(Lu,e=>{function n(i){const[r,s]=t.getValues([In,KC]);!r||s===null||e.update(()=>{const o=nr(i.target);if(o!==null){const a=Zr(o,l=>l instanceof mo);a!==null&&s(i,a,a.getURL())}})}return e.registerRootListener((i,r)=>{i&&i.addEventListener("click",n),r&&r.removeEventListener("click",n)})})});function dA(t,e){ye(t)&&e&&(t.setTextContent(e),t.selectStart())}const JC=Pe(!0),Aae=En({init(t,e){t.pub(go,e?.LinkDialog??Eae),t.pub(GC,e?.onClickLinkCallback??null),t.pub(KC,e?.onReadOnlyClickLinkCallback??null),t.pub(JC,e?.showLinkTitleField??!0)},update(t,e={}){t.pub(YC,e.linkAutocompleteSuggestions??[])}});function e_(t,e){return _.forwardRef((n,i)=>{const r=ft(e.className,n.className);return _.createElement(t,{...e,...n,className:r,ref:i})})}function Pae(t){return({title:e,children:n,...i})=>_.createElement(t,{"aria-label":e,...i},_.createElement(Sa,{title:e},n))}const XL=({readOnly:t,children:e,className:n})=>_.createElement(qS,{className:ft("mdxeditor-toolbar",G.toolbarRoot,{[G.readOnlyToolbarRoot]:t},n),...t?{tabIndex:-1}:{}},e),zL=e_(Ks,{className:G.toolbarButton,"data-toolbar-item":!0}),Al=Pae(zL),t_=e_(qp,{className:G.toolbarToggleItem,"data-toolbar-item":!0}),Iae=e_(X0,{type:"single",className:G.toolbarToggleSingleGroup}),n_=_.forwardRef(({on:t,title:e,children:n,disabled:i,...r},s)=>_.createElement(X0,{type:"single",className:G.toolbarToggleSingleGroup,...r,value:t?"on":"off",ref:s},_.createElement(t_,{"aria-label":e,value:"on",disabled:i},_.createElement(Sa,{title:e},n)))),DO=({items:t})=>_.createElement("div",{className:G.toolbarGroupOfGroups},t.map((e,n)=>_.createElement(n_,{key:n,title:e.title,on:e.active,onValueChange:i=>{e.onChange(i==="on")},disabled:e.disabled},e.contents))),i_=({value:t,onChange:e,className:n,ggClassName:i,items:r,disabled:s})=>{const o=Qt();return _.createElement("div",{className:ft(G.toolbarGroupOfGroups,i)},_.createElement(X0,{"aria-label":o("toolbar.toggleGroup","toggle group"),type:"single",className:ft(G.toolbarToggleSingleGroup,n),onValueChange:e,value:t||"",disabled:s,onFocus:a=>{a.preventDefault()}},r.map((a,l)=>_.createElement(t_,{key:l,"aria-label":a.title,value:a.value},_.createElement(Sa,{title:a.title},a.contents)))))},WL=t=>{const e=Pt(In);return _.createElement(_.Fragment,null,t.items.length===1?_.createElement(Al,{title:t.title,onClick:()=>{t.onChoose("")},disabled:e},t.children):_.createElement(IC,{value:"",onValueChange:t.onChoose},_.createElement(FL,{title:t.title},t.children),_.createElement(DC,{className:G.toolbarButtonDropdownContainer},t.items.map((n,i)=>_.createElement(QC,{key:i,value:n.value},n.label)))))};function pA(t){return Object.hasOwn(t,"when")}const og=({options:t})=>{const e=Pt(yl),n=_.useMemo(()=>{const i=t.find(r=>{if(pA(r)){if(r.when(e))return!0}else return!0});return i?pA(i)?i.contents():i.fallback():null},[t,e]);return _.createElement("div",{style:{display:"flex"}},n)},hs=$$,ag=Pe(()=>null),lg=Pe(""),gA=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components }}` to the toolbarPlugin to customize it.",$ae=En({init(t,e){const n=e?.toolbarPosition==="bottom"?aI:oI;t.pubIn({[ag]:e?.toolbarContents??gA,[lg]:e?.toolbarClassName??"",[n]:()=>{const[i,r,s]=$t(ag,In,lg);return _.createElement(XL,{className:s,readOnly:r},i())}})},update(t,e){t.pub(ag,e?.toolbarContents??gA),t.pub(lg,e?.toolbarClassName??"")}});class An{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}offset(e,n=e){return new An(this.fromA+e,this.toA+e,this.fromB+n,this.toB+n)}}function fl(t,e,n,i,r,s){if(t==i)return[];let o=s_(t,e,n,i,r,s),a=o_(t,e+o,n,i,r+o,s);e+=o,n-=a,r+=o,s-=a;let l=n-e,u=s-r;if(!l||!u)return[new An(e,n,r,s)];if(l>u){let h=t.slice(e,n).indexOf(i.slice(r,s));if(h>-1)return[new An(e,e+h,r,r),new An(e+h+u,n,s,s)]}else if(u>l){let h=i.slice(r,s).indexOf(t.slice(e,n));if(h>-1)return[new An(e,e,r,r+h),new An(n,n,r+h+l,s)]}if(l==1||u==1)return[new An(e,n,r,s)];let c=HL(t,e,n,i,r,s);if(c){let[h,d,p]=c;return fl(t,e,h,i,r,d).concat(fl(t,h+p,n,i,d+p,s))}return Rae(t,e,n,i,r,s)}let sh=1e9,oh=0,r_=!1;function Rae(t,e,n,i,r,s){let o=n-e,a=s-r;if(sh<1e9&&Math.min(o,a)>sh*16||oh>0&&Date.now()>oh)return Math.min(o,a)>sh*64?[new An(e,n,r,s)]:mA(t,e,n,i,r,s);let l=Math.ceil((o+a)/2);Tx.reset(l),Ax.reset(l);let u=(p,g)=>t.charCodeAt(e+p)==i.charCodeAt(r+g),c=(p,g)=>t.charCodeAt(n-p-1)==i.charCodeAt(s-g-1),h=(o-a)%2!=0?Ax:null,d=h?null:Tx;for(let p=0;psh||oh>0&&!(p&63)&&Date.now()>oh)return mA(t,e,n,i,r,s);let g=Tx.advance(p,o,a,l,h,!1,u)||Ax.advance(p,o,a,l,d,!0,c);if(g)return Lae(t,e,n,e+g[0],i,r,s,r+g[1])}return[new An(e,n,r,s)]}class UL{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let n=0;nn)this.end+=2;else if(h>i)this.start+=2;else if(s){let d=r+(n-i)-l;if(d>=0&&d=n-c)return[p,r+p-d]}else{let p=n-s.vec[d];if(c>=p)return[c,h]}}}return null}}const Tx=new UL,Ax=new UL;function Lae(t,e,n,i,r,s,o,a){let l=!1;return!Hu(t,i)&&++i==n&&(l=!0),!Hu(r,a)&&++a==o&&(l=!0),l?[new An(e,n,s,o)]:fl(t,e,i,r,s,a).concat(fl(t,i,n,r,a,o))}function qL(t,e){let n=1,i=Math.min(t,e);for(;nn||c>s||t.slice(a,u)!=i.slice(l,c)){if(o==1)return a-e-(Hu(t,a)?0:1);o=o>>1}else{if(u==n||c==s)return u-e;a=u,l=c}}}function o_(t,e,n,i,r,s){if(e==n||r==s||t.charCodeAt(n-1)!=i.charCodeAt(s-1))return 0;let o=qL(n-e,s-r);for(let a=n,l=s;;){let u=a-o,c=l-o;if(u>1}else{if(u==e||c==r)return n-u;a=u,l=c}}}function Kb(t,e,n,i,r,s,o,a){let l=i.slice(r,s),u=null;for(;;){if(u||o=n)break;let d=t.slice(c,h),p=-1;for(;(p=l.indexOf(d,p+1))!=-1;){let g=s_(t,h,n,i,r+p+d.length,s),m=o_(t,e,c,i,r,r+p),v=d.length+g+m;(!u||u[2]>1}}function HL(t,e,n,i,r,s){let o=n-e,a=s-r;if(or.fromA-e&&i.toB>r.fromB-e&&(t[n-1]=new An(i.fromA,r.toA,i.fromB,r.toB),t.splice(n--,1))}}function Nae(t,e,n){for(;;){YL(n,1);let i=!1;for(let r=0;r3||a>3){let l=r==t.length-1?e.length:t[r+1].fromA,u=s.fromA-i,c=l-s.toA,h=xA(e,s.fromA,u),d=OA(e,s.toA,c),p=s.fromA-h,g=d-s.toA;if((!o||!a)&&p&&g){let m=Math.max(o,a),[v,S,b]=o?[e,s.fromA,s.toA]:[n,s.fromB,s.toB];m>p&&e.slice(h,s.fromA)==v.slice(b-p,b)?(s=t[r]=new An(h,h+o,s.fromB-p,s.toB-p),h=s.fromA,d=OA(e,s.toA,l-s.toA)):m>g&&e.slice(s.toA,d)==v.slice(S,S+g)&&(s=t[r]=new An(d-o,d,s.fromB+g,s.toB+g),d=s.toA,h=xA(e,s.fromA,s.fromA-i)),p=s.fromA-h,g=d-s.toA}if(p||g)s=t[r]=new An(s.fromA-p,s.toA+g,s.fromB-p,s.toB+g);else if(o){if(!a){let m=bA(e,s.fromA,s.toA),v,S=m<0?-1:vA(e,s.toA,s.fromA);m>-1&&(v=m-s.fromA)<=c&&e.slice(s.fromA,m)==e.slice(s.toA,s.toA+v)?s=t[r]=s.offset(v):S>-1&&(v=s.toA-S)<=u&&e.slice(s.fromA-v,s.fromA)==e.slice(S,s.toA)&&(s=t[r]=s.offset(-v))}}else{let m=bA(n,s.fromB,s.toB),v,S=m<0?-1:vA(n,s.toB,s.fromB);m>-1&&(v=m-s.fromB)<=c&&n.slice(s.fromB,m)==n.slice(s.toB,s.toB+v)?s=t[r]=s.offset(v):S>-1&&(v=s.toB-S)<=u&&n.slice(s.fromB-v,s.fromB)==n.slice(S,s.toB)&&(s=t[r]=s.offset(-v))}}i=s.toA}return YL(t,3),t}let ja;try{ja=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function GL(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function KL(t,e){if(e==t.length)return 0;let n=t.charCodeAt(e);return n<192?GL(n)?1:0:ja?!tN(n)||e==t.length-1?ja.test(String.fromCharCode(n))?1:0:ja.test(t.slice(e,e+2))?2:0:0}function JL(t,e){if(!e)return 0;let n=t.charCodeAt(e-1);return n<192?GL(n)?1:0:ja?!nN(n)||e==1?ja.test(String.fromCharCode(n))?1:0:ja.test(t.slice(e-2,e))?2:0:0}const eN=8;function OA(t,e,n){if(e==t.length||!JL(t,e))return e;for(let i=e,r=e+n,s=0;sr)return i;i+=o}return e}function xA(t,e,n){if(!e||!KL(t,e))return e;for(let i=e,r=e-n,s=0;st>=55296&&t<=56319,nN=t=>t>=56320&&t<=57343;function Hu(t,e){return!e||e==t.length||!tN(t.charCodeAt(e-1))||!nN(t.charCodeAt(e))}function Qae(t,e,n){var i;let r=n?.override;return r?r(t,e):(sh=((i=n?.scanLimit)!==null&&i!==void 0?i:1e9)>>1,oh=n?.timeout?Date.now()+n.timeout:0,r_=!1,Nae(t,e,fl(t,0,t.length,e,0,e.length)))}function iN(){return!r_}function rN(t,e,n){return Mae(Qae(t,e,n),t,e)}const Dr=Me.define({combine:t=>t[0]}),Jb=Je.define(),Dae=Me.define(),to=Rn.define({create(t){return null},update(t,e){for(let n of e.effects)n.is(Jb)&&(t=n.value);for(let n of e.state.facet(Dae))t=n(t,e);return t}});class vu{constructor(e,n,i,r,s,o=!0){this.changes=e,this.fromA=n,this.toA=i,this.fromB=r,this.toB=s,this.precise=o}offset(e,n){return e||n?new vu(this.changes,this.fromA+e,this.toA+e,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,n,i){let r=rN(e.toString(),n.toString(),i);return sN(r,e,n,0,0,iN())}static updateA(e,n,i,r,s){return _A(CA(e,r,!0,i.length),e,n,i,s)}static updateB(e,n,i,r,s){return _A(CA(e,r,!1,n.length),e,n,i,s)}}function yA(t,e,n,i){let r=n.lineAt(t),s=i.lineAt(e);return r.to==t&&s.to==e&&th+1&&v>d+1)break;p.push(g.offset(-u+i,-c+r)),[h,d]=SA(g.toA+i,g.toB+r,e,n),a++}o.push(new vu(p,u,Math.max(u,h),c,Math.max(c,d),s))}return o}const $p=1e3;function wA(t,e,n,i){let r=0,s=t.length;for(;;){if(r==s){let c=0,h=0;r&&({toA:c,toB:h}=t[r-1]);let d=e-(n?c:h);return[c+d,h+d]}let o=r+s>>1,a=t[o],[l,u]=n?[a.fromA,a.toA]:[a.fromB,a.toB];if(l>e)s=o;else if(u<=e)r=o+1;else return i?[a.fromA,a.fromB]:[a.toA,a.toB]}}function CA(t,e,n,i){let r=[];return e.iterChangedRanges((s,o,a,l)=>{let u=0,c=n?e.length:i,h=0,d=n?i:e.length;s>$p&&([u,h]=wA(t,s-$p,n,!0)),o=u?r[r.length-1]={fromA:g.fromA,fromB:g.fromB,toA:c,toB:d,diffA:g.diffA+m,diffB:g.diffB+v}:r.push({fromA:u,toA:c,fromB:h,toB:d,diffA:m,diffB:v})}),r}function _A(t,e,n,i,r){if(!t.length)return e;let s=[];for(let o=0,a=0,l=0,u=0;;o++){let c=o==t.length?null:t[o],h=c?c.fromA+a:n.length,d=c?c.fromB+l:i.length;for(;uh||v.toB+l>d))break;s.push(v.offset(a,l)),u++}if(!c)break;let p=c.toA+a+c.diffA,g=c.toB+l+c.diffB,m=rN(n.sliceString(h,p),i.sliceString(d,g),r);for(let v of sN(m,n,i,h,d,iN()))s.push(v);for(a+=c.diffA,l+=c.diffB;up&&v.fromB+l>g)break;u++}}return s}const Vae={scanLimit:500},oN=yn.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=TA(t))}update(t){(t.docChanged||t.viewportChanged||Fae(t.startState,t.state)||Bae(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=TA(t.view))}},{decorations:t=>t.deco}),Rp=ns.low(x8({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(oN))===null||e===void 0?void 0:e.gutter)||dt.empty}}));function Fae(t,e){return t.field(to,!1)!=e.field(to,!1)}function Bae(t,e){return t.facet(Dr)!=e.facet(Dr)}const kA=je.line({class:"cm-changedLine"}),jae=je.mark({class:"cm-changedText"}),Zae=je.mark({tagName:"ins",class:"cm-insertedLine"}),Xae=je.mark({tagName:"del",class:"cm-deletedLine"}),EA=new class extends $s{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function zae(t,e,n,i,r,s){let o=n?t.fromA:t.fromB,a=n?t.toA:t.toB,l=0;if(o!=a){r.add(o,o,kA),r.add(o,a,n?Xae:Zae),s&&s.add(o,o,EA);for(let u=e.iterRange(o,a-1),c=o;!u.next().done;){if(u.lineBreak){c++,r.add(c,c,kA),s&&s.add(c,c,EA);continue}let h=c+u.value.length;if(i)for(;l=c)break;(o?h.toA:h.toB)>u&&(!s||!s(t.state,h,a,l))&&zae(h,t.state.doc,o,i,a,l)}return{deco:a.finish(),gutter:l&&l.finish()}}class Lp extends Er{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const Mm=Je.define({map:(t,e)=>t.map(e)}),ah=Rn.define({create:()=>je.none,update:(t,e)=>{for(let n of e.effects)if(n.is(Mm))return n.value;return t.map(e.changes)},provide:t=>Se.decorations.from(t)}),Np=.01;function AA(t,e){if(t.size!=e.size)return!1;let n=t.iter(),i=e.iter();for(;n.value;){if(n.from!=i.from||Math.abs(n.value.spec.widget.height-i.value.spec.widget.height)>1)return!1;n.next(),i.next()}return!0}function Wae(t,e,n){let i=new Vi,r=new Vi,s=t.state.field(ah).iter(),o=e.state.field(ah).iter(),a=0,l=0,u=0,c=0,h=t.viewport,d=e.viewport;for(let v=0;;v++){let S=vNp&&(c+=x,r.add(l,l,je.widget({widget:new Lp(x),block:!0,side:-1})))}if(b>a+1e3&&ah.from&&ld.from){let k=Math.min(h.from-a,d.from-l);a+=k,l+=k,v--}else if(S)a=S.toA,l=S.toB;else break;for(;s.value&&s.fromNp&&r.add(e.state.doc.length,e.state.doc.length,je.widget({widget:new Lp(p),block:!0,side:1}));let g=i.finish(),m=r.finish();AA(g,t.state.field(ah))||t.dispatch({effects:Mm.of(g)}),AA(m,e.state.field(ah))||e.dispatch({effects:Mm.of(m)})}const ey=Je.define({map:(t,e)=>e.mapPos(t)});class Uae extends Er{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let n=document.createElement("div");return n.className="cm-collapsedLines",n.textContent=e.state.phrase("$ unchanged lines",this.lines),n.addEventListener("click",i=>{let r=e.posAtDOM(i.target);e.dispatch({effects:ey.of(r)});let{side:s,sibling:o}=e.state.facet(Dr);o&&o().dispatch({effects:ey.of(qae(r,e.state.field(to),s=="a"))})}),n}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function qae(t,e,n){let i=0,r=0;for(let s=0;;s++){let o=s=t)return r+(t-i);[i,r]=n?[o.toA,o.toB]:[o.toB,o.toA]}}const Hae=Rn.define({create(t){return je.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(ey)&&(t=t.update({filter:i=>i!=n.value}));if(t.size&&e.state.field(to)!=e.startState.field(to,!1)){let n=e.state.facet(Dr).side=="a",i=[];for(let r of e.state.field(to))t.between(n?r.fromA:r.fromB,n?r.toA:r.toB,s=>{i.push(s)});i.length&&(t=t.update({filter:r=>i.indexOf(r)<0}))}return t},provide:t=>Se.decorations.from(t)});function PA({margin:t=3,minSize:e=4}){return Hae.init(n=>Yae(n,t,e))}function Yae(t,e,n){let i=new Vi,r=t.facet(Dr).side=="a",s=t.field(to),o=1;for(let a=0;;a++){let l=a=n&&i.add(t.doc.line(u).from,t.doc.line(c).to,je.replace({widget:new Uae(h),block:!0})),!l)break;o=t.doc.lineAt(Math.min(t.doc.length,r?l.toA:l.toB)).number}return i.finish()}const Gae=Se.styleModule.of(new co({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),Kae=Se.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),IA=new Cc,Mp=new Cc;class Jae{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||Vae;let n=[ns.low(oN),Kae,Gae,ah,Se.updateListener.of(h=>{this.measuring<0&&(h.heightChanged||h.viewportChanged)&&!h.transactions.some(d=>d.effects.some(p=>p.is(Mm)))&&this.measure()})],i=[Dr.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&i.push(Rp);let r=ct.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],Se.editorAttributes.of({class:"cm-merge-a"}),Mp.of(i),n]}),s=[Dr.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&s.push(Rp);let o=ct.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],Se.editorAttributes.of({class:"cm-merge-b"}),Mp.of(s),n]});this.chunks=vu.build(r.doc,o.doc,this.diffConf);let a=[to.init(()=>this.chunks),IA.of(e.collapseUnchanged?PA(e.collapseUnchanged):[])];r=r.update({effects:Je.appendConfig.of(a)}).state,o=o.update({effects:Je.appendConfig.of(a)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let l=e.orientation||"a-b",u=document.createElement("div");u.className="cm-mergeViewEditor";let c=document.createElement("div");c.className="cm-mergeViewEditor",this.editorDOM.appendChild(l=="a-b"?u:c),this.editorDOM.appendChild(l=="a-b"?c:u),this.a=new Se({state:r,parent:u,root:e.root,dispatchTransactions:h=>this.dispatch(h,this.a)}),this.b=new Se({state:o,parent:c,root:e.root,dispatchTransactions:h=>this.dispatch(h,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,n){if(e.some(i=>i.docChanged)){let i=e[e.length-1],r=e.reduce((o,a)=>o.compose(a.changes),Tn.empty(e[0].startState.doc.length));this.chunks=n==this.a?vu.updateA(this.chunks,i.newDoc,this.b.state.doc,r,this.diffConf):vu.updateB(this.chunks,this.a.state.doc,i.newDoc,r,this.diffConf),n.update([...e,i.state.update({effects:Jb.of(this.chunks)})]);let s=n==this.a?this.b:this.a;s.update([s.state.update({effects:Jb.of(this.chunks)})]),this.scheduleMeasure()}else n.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let s=e.orientation!="b-a";if(s!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let o=this.a.dom.parentNode,a=this.b.dom.parentNode;o.remove(),a.remove(),this.editorDOM.insertBefore(s?o:a,this.editorDOM.firstChild),this.editorDOM.appendChild(s?a:o),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let s=!!this.revertDOM,o=this.revertToA,a=this.renderRevert;"revertControls"in e&&(s=!!e.revertControls,o=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(a=e.renderRevertControl),this.setupRevertControls(s,o,a)}let n="highlightChanges"in e,i="gutter"in e,r="collapseUnchanged"in e;if(n||i||r){let s=[],o=[];if(n||i){let a=this.a.state.facet(Dr),l=i?e.gutter!==!1:a.markGutter,u=n?e.highlightChanges!==!1:a.highlightChanges;s.push(Mp.reconfigure([Dr.of({side:"a",sibling:()=>this.b,highlightChanges:u,markGutter:l}),l?Rp:[]])),o.push(Mp.reconfigure([Dr.of({side:"b",sibling:()=>this.a,highlightChanges:u,markGutter:l}),l?Rp:[]]))}if(r){let a=IA.reconfigure(e.collapseUnchanged?PA(e.collapseUnchanged):[]);s.push(a),o.push(a)}this.a.dispatch({effects:s}),this.b.dispatch({effects:o})}this.scheduleMeasure()}setupRevertControls(e,n,i){this.revertToA=n,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=i,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",r=>this.revertClicked(r)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){Wae(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,n=e.firstChild,i=this.a.viewport,r=this.b.viewport;for(let s=0;si.to||o.fromB>r.to)break;if(o.fromA-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function $A(t){let e=t.nextSibling;return t.remove(),e}class Qm{static create(e,n,i,r,s){let o=r+(r<<8)+e+(n<<4)|0;return new Qm(e,n,i,o,s,[],[])}constructor(e,n,i,r,s,o,a){this.type=e,this.value=n,this.from=i,this.hash=r,this.end=s,this.children=o,this.positions=a,this.hashProp=[[tt.contextHash,r]]}addChild(e,n){e.prop(tt.contextHash)!=this.hash&&(e=new pt(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new pt(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,s,o)=>new pt($n.none,r,s,o,this.hashProp)})}}var we;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(we||(we={}));class ele{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class tle{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Th(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,i=0){for(let r=n;r=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(t.type==we.OrderedList?u_:l_)(n,e,!1);return i>0&&(t.type!=we.BulletList||a_(n,e,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==t.value}const aN={[we.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(wt(we.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(Ar(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[we.ListItem](t,e,n){return n.indent-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[we.OrderedList]:RA,[we.BulletList]:RA,[we.Document](){return!0}};function Ar(t){return t==32||t==9||t==10||t==13}function Th(t,e=0){for(;en&&Ar(t.charCodeAt(e-1));)e--;return e}function lN(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(mN.SetextHeading)>-1||i<3?-1:1}function cN(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function l_(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Ar(t.text.charCodeAt(t.pos+1)))&&(!n||cN(e,we.BulletList)||t.skipSpace(t.pos+2)=48&&r<=57;){i++;if(i==t.text.length)return-1;r=t.text.charCodeAt(i)}return i==t.pos||i>t.pos+9||r!=46&&r!=41||it.pos+1||t.next!=49)?-1:i+1-t.pos}function hN(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e6?-1:n}function fN(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e/,pN=/\?>/,ny=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(i);if(s)return t.append(wt(we.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(i);if(o)return t.append(wt(we.ProcessingInstruction,n,n+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return a?t.append(wt(we.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let i=n+1;for(;t.char(i)==e;)i++;let r=t.slice(n-1,n),s=t.slice(i,i+1),o=wf.test(r),a=wf.test(s),l=/\s|^$/.test(r),u=/\s|^$/.test(s),c=!u&&(!a||l||o),h=!l&&(!o||u||a),d=c&&(e==42||!h||o),p=h&&(e==42||!c||a);return t.append(new Ui(e==95?yN:SN,n,i,(d?1:0)|(p?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(wt(we.HardBreak,n,n+2));if(e==32){let i=n+1;for(;t.char(i)==32;)i++;if(t.char(i)==10&&i>=n+2)return t.append(wt(we.HardBreak,n,i+1))}return-1},Link(t,e,n){return e==91?t.append(new Ui($a,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Ui(Dm,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let i=t.parts.length-1;i>=0;i--){let r=t.parts[i];if(r instanceof Ui&&(r.type==$a||r.type==Dm)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[i]=null,-1;let s=t.takeContent(i),o=t.parts[i]=ale(t,s,r.type==$a?we.Link:we.Image,r.from,n+1);if(r.type==$a)for(let a=0;ae?wt(we.URL,e+n,s+n):s==t.length?null:!1}}function CN(t,e,n){let i=t.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let s=e+1,o=!1;s=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,i,r,s){return this.append(new Ui(e,n,i,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Ui&&(n.type==$a||n.type==Dm))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i=e;l--){let m=this.parts[l];if(m instanceof Ui&&m.side&1&&m.type==r.type&&!(s&&(r.side&1||m.side&2)&&(m.to-m.from+o)%3==0&&((m.to-m.from)%3||o%3))){a=m;break}}if(!a)continue;let u=r.type.resolve,c=[],h=a.from,d=r.to;if(s){let m=Math.min(2,a.to-a.from,o);h=a.to-m,d=r.from+m,u=m==1?"Emphasis":"StrongEmphasis"}a.type.mark&&c.push(this.elt(a.type.mark,h,a.to));for(let m=l+1;m=0;n--){let i=this.parts[n];if(i instanceof Ui&&i.type==e&&i.side&1)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}getDelimiterAt(e){let n=this.parts[e];return n instanceof Ui?n:null}skipSpace(e){return Th(this.text,e-this.offset)+this.offset}elt(e,n,i,r){return typeof e=="string"?wt(this.parser.getNodeType(e),n,i,r):new bN(e,n)}}c_.linkStart=$a;c_.imageStart=Dm;function ry(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),i=0;for(let r of e){for(;i(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` +`;)s--;this.fragmentEnd=s?s-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(tt.contextHash)==e}takeNodes(e){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,a=e.block.children.length,l=o,u=a;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let c=kN(n.from-i,e.ranges);if(n.to-i<=e.ranges[e.rangeI].to)e.addNode(n.tree,c);else{let h=new pt(e.parser.nodeSet.types[we.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(h,n.tree),e.addNode(h,c)}if(n.type.is("Block")&&(lle.indexOf(n.type.id)<0?(o=n.to-i,a=e.block.children.length):(o=l,a=u),l=n.to-i,u=e.block.children.length),!n.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-s}};function kN(t,e){let n=t;for(let i=1;iQp[t]),Object.keys(Qp).map(t=>mN[t]),Object.keys(Qp),rle,aN,Object.keys(Ix).map(t=>Ix[t]),Object.keys(Ix),[]);function fle(t,e,n){let i=[];for(let r=t.firstChild,s=e;;r=r.nextSibling){let o=r?r.from:n;if(o>s&&i.push({from:s,to:o}),!r)break;s=r.to}return i}function dle(t){let{codeParser:e,htmlParser:n}=t;return{wrap:W4((r,s)=>{let o=r.type.id;if(e&&(o==we.CodeBlock||o==we.FencedCode)){let a="";if(o==we.FencedCode){let u=r.node.getChild(we.CodeInfo);u&&(a=s.read(u.from,u.to))}let l=e(a);if(l)return{parser:l,overlay:u=>u.type.id==we.CodeText,bracketed:o==we.FencedCode}}else if(n&&(o==we.HTMLBlock||o==we.HTMLTag||o==we.CommentBlock))return{parser:n,overlay:fle(r.node,r.from,r.to)};return null})}}const ple={resolve:"Strikethrough",mark:"StrikethroughMark"},gle={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":Q.strikethrough}},{name:"StrikethroughMark",style:Q.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let i=t.slice(n-1,n),r=t.slice(n+2,n+3),s=/\s|^$/.test(i),o=/\s|^$/.test(r),a=wf.test(i),l=wf.test(r);return t.addDelimiter(ple,n,n+2,!o&&(!l||s||a),!s&&(!a||o||l))},after:"Emphasis"}]};function Ah(t,e,n=0,i,r=0){let s=0,o=!0,a=-1,l=-1,u=!1,c=()=>{i.push(t.elt("TableCell",r+a,r+l,t.parser.parseInline(e.slice(a,l),r+a)))};for(let h=n;h-1)&&s++,o=!1,i&&(a>-1&&c(),i.push(t.elt("TableDelimiter",h+r,h+r+1))),a=l=-1):(u||d!=32&&d!=9)&&(a<0&&(a=h),l=h+1),u=!u&&d==92}return a>-1&&(s++,i&&c()),s}function QA(t,e){for(let n=e;nr instanceof DA)||!QA(e.text,e.basePos))return!1;let i=t.peekLine();return EN.test(i)&&Ah(t,e.text,e.basePos)==Ah(t,i,e.basePos)},before:"SetextHeading"}]};class Ole{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const xle={defineNodes:[{name:"Task",block:!0,style:Q.list},{name:"TaskMarker",style:Q.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Ole:null},after:"SetextHeading"}]},VA=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,FA=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,vle=/[\w-]+\.[\w-]+($|[/:])/,BA=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,jA=/\/[a-zA-Z\d@.]+/gy;function ZA(t,e,n,i){let r=0;for(let s=e;s-1)return-1;let i=e+n[0].length;for(;;){let r=t[i-1],s;if(/[?!.,:*_~]/.test(r)||r==")"&&ZA(t,e,i,")")>ZA(t,e,i,"("))i--;else if(r==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,i))))i=e+s.index;else break}return i}function XA(t,e){BA.lastIndex=e;let n=BA.exec(t);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:e+n[0].length-(i=="."?1:0)}const yle={parseInline:[{name:"Autolink",parse(t,e,n){let i=n-t.offset;if(i&&/\w/.test(t.text[i-1]))return-1;VA.lastIndex=i;let r=VA.exec(t.text),s=-1;if(!r)return-1;if(r[1]||r[2]){if(s=ble(t.text,i+r[0].length),s>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(i,s));s=i+o[0].length}}else r[3]?s=XA(t.text,i):(s=XA(t.text,i+r[0].length),s>-1&&r[0]=="xmpp:"&&(jA.lastIndex=s,r=jA.exec(t.text),r&&(s=r.index+r[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},Sle=[mle,xle,gle,yle];function TN(t,e,n){return(i,r,s)=>{if(r!=t||i.char(s+1)==t)return-1;let o=[i.elt(n,s,s+1)];for(let a=s+1;an%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new Vm(e,[],n,i,i,0,[],0,r?new WA(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,o=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(r,u)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&this.buffer[o-4]==0&&this.buffer[o-1]>-1){if(n==i)return;if(this.buffer[o-2]>=n){this.buffer[o-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>i;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=i,this.buffer[o+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=r;let a=o.stateFlag(s,1);!a&&(r>i||n<=o.maxNode)&&(this.reducePos=r),this.pushState(s,a?i:Math.min(i,this.reducePos)),this.shiftContext(n,i),n<=o.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(n&&e.buffer[n-4]==0&&(n-=4);n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new Vm(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new kle(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,o;sl&1&&a==o)||r.push(n[s],o)}n=r}let i=[];for(let r=0;r>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return a<<19|65536|l}}else{let a=i(o,s+1);if(a!=null)return a}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n0&&this.emitLookAhead()}}class WA{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class kle{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class Fm{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Fm(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Fm(this.stack,this.pos,this.index)}}function lh(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class ug{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const UA=new ug;class Ele{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=UA,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n=this.chunk2Pos&&ia.to&&(this.chunk2=this.chunk2.slice(0,a.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=UA,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class bu{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;AN(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}bu.prototype.contextual=bu.prototype.fallback=bu.prototype.extend=!1;class Bm{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?lh(e):e}token(e,n){let i=e.pos,r=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(AN(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}Bm.prototype.contextual=bu.prototype.fallback=bu.prototype.extend=!1;class or{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function AN(t,e,n,i,r,s){let o=0,a=1<0){let g=t[p];if(l.allows(g)&&(e.token.value==-1||e.token.value==g||Tle(g,e.token.value,r,s))){e.acceptToken(g);break}}let c=e.next,h=0,d=t[o+2];if(e.next<0&&d>h&&t[u+d*3-3]==65535){o=t[u+d*3-1];continue e}for(;h>1,g=u+p+(p<<1),m=t[g],v=t[g+1]||65536;if(c=v)h=p+1;else{o=t[g+2],e.advance();continue e}}break}}function qA(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function Tle(t,e,n,i){let r=qA(n,i,e);return r<0||qA(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class Ale{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?HA(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?HA(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(s instanceof pt){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class Ple{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new ug)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let u=0;uh.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let d=n;if(h.extended>-1&&(n=this.addActions(e,h.extended,h.end,n)),n=this.addActions(e,h.value,h.end,n),!c.extend&&(i=h,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new ug,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new ug,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;se.bufferLength*4?new Ale(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;on)i.push(a);else{if(this.advanceStack(a,i,e))continue;{r||(r=[],s=[]),r.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!i.length){let o=r&&Rle(r);if(o)return Zi&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Zi&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(o)return Zi&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((a,l)=>l.score-a.score);i.length>o;)i.pop();i.some(a=>a.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)i.splice(l--,1);else{i.splice(o--,1);continue e}}}i.length>12&&(i.sort((o,a)=>a.score-o.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let h=this.fragments.nodeAt(r);h;){let d=this.parser.nodeSet.types[h.type.id]==h.type?s.getGoto(e.state,h.type.id):-1;if(d>-1&&h.length&&(!u||(h.prop(tt.contextHash)||0)==c))return e.useNode(h,d),Zi&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(h.type.id)})`),!0;if(!(h instanceof pt)||h.children.length==0||h.positions[0]>0)break;let p=h.children[0];if(p instanceof pt&&h.positions[0]==0)h=p;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),Zi&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;ur?n.push(g):i.push(g)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return YA(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let o=0;o ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),Zi&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,i))))continue;let h=a.split(),d=c;for(let p=0;p<10&&h.forceReduce()&&(Zi&&console.log(d+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,i));p++)Zi&&(d=this.stackID(h)+" -> ");for(let p of a.recoverByInsert(l))Zi&&console.log(c+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>a.pos?(u==a.pos&&(u++,l=0),a.recoverByDelete(l,u),Zi&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),YA(a,i)):(!r||r.scoret;class PN{constructor(e){this.start=e.start,this.shift=e.shift||Rx,this.reduce=e.reduce||Rx,this.reuse=e.reuse||Rx,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Gu extends pO{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;ae.topRules[a][1]),r=[];for(let a=0;a=0)s(c,l,a[u++]);else{let h=a[u+-c];for(let d=-c;d>0;d--)s(a[u++],l,h);u++}}}this.nodeSet=new wc(n.map((a,l)=>$n.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=B4;let o=lh(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;atypeof a=="number"?new bu(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new Ile(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let o=r[s++],a=o&1,l=r[s++];if(a&&i)return l;for(let u=s+(o>>1);s0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=zs(this.data,s+2);else break;r=n(zs(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=zs(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,o)=>o&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(Gu.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(a=>a.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=GA(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(i[o]=!0)}let r=null;for(let s=0;si)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}const Lle=55,Nle=1,Mle=56,Qle=2,Dle=57,Vle=3,KA=4,Fle=5,h_=6,IN=7,$N=8,RN=9,LN=10,Ble=11,jle=12,Zle=13,Lx=58,Xle=14,zle=15,JA=59,NN=21,Wle=23,MN=24,Ule=25,sy=27,QN=28,qle=29,Hle=32,Yle=35,Gle=37,Kle=38,Jle=0,eue=1,tue={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},nue={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},eP={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function iue(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let tP=null,nP=null,iP=0;function oy(t,e){let n=t.pos+e;if(iP==n&&nP==t)return tP;let i=t.peek(e),r="";for(;iue(i);)r+=String.fromCharCode(i),i=t.peek(++e);return nP=t,iP=n,tP=r?r.toLowerCase():i==rue||i==sue?void 0:null}const DN=60,jm=62,f_=47,rue=63,sue=33,oue=45;function rP(t,e){this.name=t,this.parent=e}const aue=[h_,LN,IN,$N,RN],lue=new PN({start:null,shift(t,e,n,i){return aue.indexOf(e)>-1?new rP(oy(i,1)||"",t):t},reduce(t,e){return e==NN&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==h_||r==Gle?new rP(oy(i,1)||"",t):t},strict:!1}),uue=new or((t,e)=>{if(t.next!=DN){t.next<0&&e.context&&t.acceptToken(Lx);return}t.advance();let n=t.next==f_;n&&t.advance();let i=oy(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?zle:Xle);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(Ble);if(r&&nue[r])return t.acceptToken(Lx,-2);if(e.dialectEnabled(Jle))return t.acceptToken(jle);for(let s=e.context;s;s=s.parent)if(s.name==i)return;t.acceptToken(Zle)}else{if(i=="script")return t.acceptToken(IN);if(i=="style")return t.acceptToken($N);if(i=="textarea")return t.acceptToken(RN);if(tue.hasOwnProperty(i))return t.acceptToken(LN);r&&eP[r]&&eP[r][i]?t.acceptToken(Lx,-1):t.acceptToken(h_)}},{contextual:!0}),cue=new or(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(JA);break}if(t.next==oue)e++;else if(t.next==jm&&e>=2){n>=3&&t.acceptToken(JA,-2);break}else e=0;t.advance()}});function hue(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const fue=new or((t,e)=>{if(t.next==f_&&t.peek(1)==jm){let n=e.dialectEnabled(eue)||hue(e.context);t.acceptToken(n?Fle:KA,2)}else t.next==jm&&t.acceptToken(KA,1)});function d_(t,e,n){let i=2+t.length;return new or(r=>{for(let s=0,o=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(e);break}if(s==0&&r.next==DN||s==1&&r.next==f_||s>=2&&so?r.acceptToken(e,-o):r.acceptToken(n,-(o-2));break}else if((r.next==10||r.next==13)&&a){r.acceptToken(e,1);break}else s=o=0;r.advance()}})}const due=d_("script",Lle,Nle),pue=d_("style",Mle,Qle),gue=d_("textarea",Dle,Vle),mue=kc({"Text RawText IncompleteTag IncompleteCloseTag":Q.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Q.angleBracket,TagName:Q.tagName,"MismatchedCloseTag/TagName":[Q.tagName,Q.invalid],AttributeName:Q.attributeName,"AttributeValue UnquotedAttributeValue":Q.attributeValue,Is:Q.definitionOperator,"EntityReference Character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CloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:lue,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[mue],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY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r*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let u=a.type.id;if(u==qle)return Nx(a,l,n);if(u==Hle)return Nx(a,l,i);if(u==Yle)return Nx(a,l,r);if(u==NN&&s.length){let c=a.node,h=c.firstChild,d=h&&sP(h,l),p;if(d){for(let g of s)if(g.tag==d&&(!g.attrs||g.attrs(p||(p=VN(h,l))))){let m=c.lastChild,v=m.type.id==Kle?m.from:c.to;if(v>h.to)return{parser:g.parser,overlay:[{from:h.to,to:v}]}}}}if(o&&u==MN){let c=a.node,h;if(h=c.firstChild){let d=o[l.read(h.from,h.to)];if(d)for(let p of d){if(p.tagName&&p.tagName!=sP(c.parent,l))continue;let g=c.lastChild;if(g.type.id==sy){let m=g.from+1,v=g.lastChild,S=g.to-(v&&v.isError?0:1);if(S>m)return{parser:p.parser,overlay:[{from:m,to:S}],bracketed:!0}}else if(g.type.id==QN)return{parser:p.parser,overlay:[{from:g.from,to:g.to}]}}}}return null})}const xue=145,oP=1,vue=146,bue=147,BN=2,yue=148,Sue=3,wue=4,jN=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Cue=58,_ue=40,ZN=95,kue=91,cg=45,Eue=46,Tue=35,Aue=37,Pue=38,Iue=92,$ue=10,Rue=42;function Cf(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function p_(t){return t>=48&&t<=57}function aP(t){return p_(t)||t>=97&&t<=102||t>=65&&t<=70}const XN=(t,e,n)=>(i,r)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=i;if(Cf(l)||l==cg||l==ZN||s&&p_(l))!s&&(l!=cg||a>0)&&(s=!0),o===a&&l==cg&&o++,i.advance();else if(l==Iue&&i.peek(1)!=$ue){if(i.advance(),aP(i.next)){do i.advance();while(aP(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();s=!0}else{s&&i.acceptToken(o==2&&r.canShift(BN)?e:l==_ue?n:t);break}}},Lue=new or(XN(vue,BN,bue),{contextual:!0}),Nue=new or(XN(yue,Sue,wue),{contextual:!0}),Mue=new or(t=>{if(jN.includes(t.peek(-1))){let{next:e}=t;(Cf(e)||e==ZN||e==Tue||e==Eue||e==Rue||e==kue||e==Cue&&Cf(t.peek(1))||e==cg||e==Pue)&&t.acceptToken(xue)}}),Que=new or(t=>{if(!jN.includes(t.peek(-1))){let{next:e}=t;if(e==Aue&&(t.advance(),t.acceptToken(oP)),Cf(e)){do t.advance();while(Cf(t.next)||p_(t.next));t.acceptToken(oP)}}}),Due=kc({"AtKeyword import charset namespace keyframes media supports font-feature-values":Q.definitionKeyword,"from to selector scope MatchFlag":Q.keyword,NamespaceName:Q.namespace,KeyframeName:Q.labelName,KeyframeRangeName:Q.operatorKeyword,TagName:Q.tagName,ClassName:Q.className,PseudoClassName:Q.constant(Q.className),IdName:Q.labelName,"FeatureName PropertyName":Q.propertyName,AttributeName:Q.attributeName,NumberLiteral:Q.number,KeywordQuery:Q.keyword,UnaryQueryOp:Q.operatorKeyword,"CallTag ValueName FontName":Q.atom,VariableName:Q.variableName,Callee:Q.operatorKeyword,Unit:Q.unit,"UniversalSelector NestingSelector":Q.definitionOperator,"MatchOp CompareOp":Q.compareOperator,"ChildOp SiblingOp, LogicOp":Q.logicOperator,BinOp:Q.arithmeticOperator,Important:Q.modifier,Comment:Q.blockComment,ColorLiteral:Q.color,"ParenthesizedContent StringLiteral":Q.string,":":Q.punctuation,"PseudoOp #":Q.derefOperator,"; , |":Q.separator,"( )":Q.paren,"[ ]":Q.squareBracket,"{ }":Q.brace}),Vue={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:152,"url-prefix":152,domain:152,regexp:152},Fue={__proto__:null,or:104,and:104,not:112,only:112,layer:206},Bue={__proto__:null,selector:118,style:124,layer:202},jue={__proto__:null,"@import":198,"@media":210,"@charset":214,"@namespace":218,"@key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`%{<%lO%jjCW[lY!o`Oy%jz}%j}!OCP!O!Q%j!Q![CP![!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jhDRS!zWOy%jz;'S%j;'S;=`%{<%lO%jjDdSpYOy%jz;'S%j;'S;=`%{<%lO%jnDuSo^Oy%jz;'S%j;'S;=`%{<%lO%jjEWU!zWOy%jz#a%j#a#bEj#b;'S%j;'S;=`%{<%lO%jbEoU!o`Oy%jz#d%j#d#eFR#e;'S%j;'S;=`%{<%lO%jbFWU!o`Oy%jz#c%j#c#dFj#d;'S%j;'S;=`%{<%lO%jbFoU!o`Oy%jz#f%j#f#gGR#g;'S%j;'S;=`%{<%lO%jbGWU!o`Oy%jz#h%j#h#iGj#i;'S%j;'S;=`%{<%lO%jbGoU!o`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!o`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!o`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$pQ!o`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$cUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU#PQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[Mue,Que,Lue,Nue,1,2,3,4,new Bm("m~RRYZ[z{a~~g~aO$_~~dP!P!Qg~lO$`~~",28,152)],topRules:{StyleSheet:[0,6],Styles:[1,126]},dynamicPrecedences:{94:1},specialized:[{term:147,get:t=>Vue[t]||-1},{term:148,get:t=>Fue[t]||-1},{term:4,get:t=>Bue[t]||-1},{term:28,get:t=>jue[t]||-1},{term:146,get:t=>Zue[t]||-1}],tokenPrec:2405});let Mx=null;function Qx(){if(!Mx&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));Mx=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return Mx||[]}const lP=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),uP=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),zue=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Wue=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),Fs=/^(\w[\w-]*|-\w[\w-]*|)$/,Uue=/^-(-[\w-]*)?$/;function que(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return i?.name!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const cP=new z4,Hue=["Declaration"];function Yue(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function zN(t,e,n){if(e.to-e.from>4096){let i=cP.get(e);if(i)return i;let r=[],s=new Set,o=e.cursor(Mt.IncludeAnonymous);if(o.firstChild())do for(let a of zN(t,o.node,n))s.has(a.label)||(s.add(a.label),r.push(a));while(o.nextSibling());return cP.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(Hue)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);r.has(a)||(r.add(a),i.push({label:a,type:"variable"}))}}),i}}const WN=t=>e=>{let{state:n,pos:i}=e,r=Xt(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:Qx(),validFor:Fs};if(r.name=="ValueName")return{from:r.from,options:uP,validFor:Fs};if(r.name=="PseudoClassName")return{from:r.from,options:lP,validFor:Fs};if(t(r)||(e.explicit||s)&&que(r,n.doc))return{from:t(r)||s?r.from:i,options:zN(n.doc,Yue(r),t),validFor:Uue};if(r.name=="TagName"){for(let{parent:l}=r;l;l=l.parent)if(l.name=="Block")return{from:r.from,options:Qx(),validFor:Fs};return{from:r.from,options:zue,validFor:Fs}}if(r.name=="AtKeyword")return{from:r.from,options:Wue,validFor:Fs};if(!e.explicit)return null;let o=r.resolve(i),a=o.childBefore(i);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:i,options:lP,validFor:Fs}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:i,options:uP,validFor:Fs}:o.name=="Block"||o.name=="Styles"?{from:i,options:Qx(),validFor:Fs}:null},UN=WN(t=>t.name=="VariableName"),_f=Xu.define({name:"css",parser:Xue.configure({props:[Ec.add({Declaration:sg()}),Tc.add({"Block KeyframeList":E8})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function qN(){return new Wu(_f,_f.data.of({autocomplete:UN}))}const Gue=Object.freeze(Object.defineProperty({__proto__:null,css:qN,cssCompletionSource:UN,cssLanguage:_f,defineCSSCompletionSource:WN},Symbol.toStringTag,{value:"Module"})),Kue=316,Jue=317,hP=1,ece=2,tce=3,nce=4,ice=318,rce=320,sce=321,oce=5,ace=6,lce=0,ay=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],HN=125,uce=59,ly=47,cce=42,hce=43,fce=45,dce=60,pce=44,gce=63,mce=46,Oce=91,xce=new PN({start:!1,shift(t,e){return e==oce||e==ace||e==rce?t:e==sce},strict:!1}),vce=new or((t,e)=>{let{next:n}=t;(n==HN||n==-1||e.context)&&t.acceptToken(ice)},{contextual:!0,fallback:!0}),bce=new or((t,e)=>{let{next:n}=t,i;ay.indexOf(n)>-1||n==ly&&((i=t.peek(1))==ly||i==cce)||n!=HN&&n!=uce&&n!=-1&&!e.context&&t.acceptToken(Kue)},{contextual:!0}),yce=new or((t,e)=>{t.next==Oce&&!e.context&&t.acceptToken(Jue)},{contextual:!0}),Sce=new or((t,e)=>{let{next:n}=t;if(n==hce||n==fce){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(hP);t.acceptToken(i?hP:ece)}}else n==gce&&t.peek(1)==mce&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(tce))},{contextual:!0});function Dx(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const wce=new or((t,e)=>{if(t.next!=dce||!e.dialectEnabled(lce)||(t.advance(),t.next==ly))return;let n=0;for(;ay.indexOf(t.next)>-1;)t.advance(),n++;if(Dx(t.next,!0)){for(t.advance(),n++;Dx(t.next,!1);)t.advance(),n++;for(;ay.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==pce)return;for(let i=0;;i++){if(i==7){if(!Dx(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(nce,-n)}),Cce=kc({"get set async static":Q.modifier,"for while do if else switch try catch finally return throw break continue default case defer":Q.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":Q.operatorKeyword,"let var const using function class extends":Q.definitionKeyword,"import export from":Q.moduleKeyword,"with debugger new":Q.keyword,TemplateString:Q.special(Q.string),super:Q.atom,BooleanLiteral:Q.bool,this:Q.self,null:Q.null,Star:Q.modifier,VariableName:Q.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Q.function(Q.variableName),VariableDefinition:Q.definition(Q.variableName),Label:Q.labelName,PropertyName:Q.propertyName,PrivatePropertyName:Q.special(Q.propertyName),"CallExpression/MemberExpression/PropertyName":Q.function(Q.propertyName),"FunctionDeclaration/VariableDefinition":Q.function(Q.definition(Q.variableName)),"ClassDeclaration/VariableDefinition":Q.definition(Q.className),"NewExpression/VariableName":Q.className,PropertyDefinition:Q.definition(Q.propertyName),PrivatePropertyDefinition:Q.definition(Q.special(Q.propertyName)),UpdateOp:Q.updateOperator,"LineComment Hashbang":Q.lineComment,BlockComment:Q.blockComment,Number:Q.number,String:Q.string,Escape:Q.escape,ArithOp:Q.arithmeticOperator,LogicOp:Q.logicOperator,BitOp:Q.bitwiseOperator,CompareOp:Q.compareOperator,RegExp:Q.regexp,Equals:Q.definitionOperator,Arrow:Q.function(Q.punctuation),": Spread":Q.punctuation,"( )":Q.paren,"[ ]":Q.squareBracket,"{ }":Q.brace,"InterpolationStart InterpolationEnd":Q.special(Q.brace),".":Q.derefOperator,", ;":Q.separator,"@":Q.meta,TypeName:Q.typeName,TypeDefinition:Q.definition(Q.typeName),"type enum interface implements namespace module declare":Q.definitionKeyword,"abstract global Privacy readonly override":Q.modifier,"is keyof unique infer asserts":Q.operatorKeyword,JSXAttributeValue:Q.attributeValue,JSXText:Q.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Q.angleBracket,"JSXIdentifier JSXNameSpacedName":Q.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Q.attributeName,"JSXBuiltin/JSXIdentifier":Q.standard(Q.tagName)}),_ce={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},k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*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.lPQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.nSR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:xce,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[Cce],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#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~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Bm("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>_ce[t]||-1},{term:343,get:t=>kce[t]||-1},{term:95,get:t=>Ece[t]||-1}],tokenPrec:15201}),g_=[Ci("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ci("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ci("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ci("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ci("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ci(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Ci("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Ci(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Ci(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Ci('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ci('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],YN=g_.concat([Ci("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Ci("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Ci("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),fP=new z4,GN=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Hc(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const Ace=["FunctionDeclaration"],Pce={FunctionDeclaration:Hc("function"),ClassDeclaration:Hc("class"),ClassExpression:()=>!0,EnumDeclaration:Hc("constant"),TypeAliasDeclaration:Hc("type"),NamespaceDeclaration:Hc("namespace"),VariableDefinition(t,e){t.matchContext(Ace)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function KN(t,e){let n=fP.get(e);if(n)return n;let i=[],r=!0;function s(o,a){let l=t.sliceString(o.from,o.to);i.push({label:l,type:a})}return e.cursor(Mt.IncludeAnonymous).iterate(o=>{if(r)r=!1;else if(o.name){let a=Pce[o.name];if(a&&a(o,s)||GN.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of KN(t,o.node))i.push(a);return!1}}),fP.set(e,i),i}const Zm=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,m_=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function JN(t){let e=Xt(t.state).resolveInner(t.pos,-1);if(m_.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Zm.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)GN.has(r.name)&&(i=i.concat(KN(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:Zm}}function Vx(t,e,n){var i;let r=[];for(;;){let s=e.firstChild,o;if(s?.name=="VariableName")return r.push(t(s)),{path:r.reverse(),name:n};if(s?.name=="MemberExpression"&&((i=o=s.lastChild)===null||i===void 0?void 0:i.name)=="PropertyName")r.push(t(o)),e=s;else return null}}function eM(t){let e=i=>t.state.doc.sliceString(i.from,i.to),n=Xt(t.state).resolveInner(t.pos,-1);return n.name=="PropertyName"?Vx(e,n.parent,e(n)):(n.name=="."||n.name=="?.")&&n.parent.name=="MemberExpression"?Vx(e,n.parent,""):m_.indexOf(n.name)>-1?null:n.name=="VariableName"||n.to-n.from<20&&Zm.test(e(n))?{path:[],name:e(n)}:n.name=="MemberExpression"?Vx(e,n,""):t.explicit?{path:[],name:""}:null}function Ice(t,e){let n=t,i=[],r=new Set;for(let s=0;;s++){for(let a of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(a)||r.has(a))continue;r.add(a);let l;try{l=n[a]}catch{continue}i.push({label:a,type:typeof l=="function"?/^[A-Z]/.test(a)?"class":e?"function":"method":e?"variable":"property",boost:-s})}let o=Object.getPrototypeOf(t);if(!o)return i;t=o}}function $ce(t){let e=new Map;return n=>{let i=eM(n);if(!i)return null;let r=t;for(let o of i.path)if(r=r[o],!r)return null;let s=e.get(r);return s||e.set(r,s=Ice(r,!i.path.length)),{from:n.pos-i.name.length,options:s,validFor:Zm}}}const yr=Xu.define({name:"javascript",parser:Tce.configure({props:[Ec.add({IfStatement:sg({except:/^\s*({|else\b)/}),TryStatement:sg({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ene,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:Jte({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":sg({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Tc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":E8,BlockComment(t){return{from:t.from+2,to:t.to-2}},JSXElement(t){let e=t.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let n=t.lastChild;return{from:e.to,to:n.type.isError?t.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(t){var e;let n=(e=t.firstChild)===null||e===void 0?void 0:e.nextSibling,i=t.lastChild;return!n||n.type.isError?null:{from:n.to,to:i.type.isError?t.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),tM={test:t=>/^JSX/.test(t.name),facet:yO({commentTokens:{block:{open:"{/*",close:"*/}"}}})},O_=yr.configure({dialect:"ts"},"typescript"),x_=yr.configure({dialect:"jsx",props:[oC.add(t=>t.isTop?[tM]:void 0)]}),v_=yr.configure({dialect:"jsx ts",props:[oC.add(t=>t.isTop?[tM]:void 0)]},"typescript");let nM=t=>({label:t,type:"keyword"});const iM="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(nM),Rce=iM.concat(["declare","implements","private","protected","public"].map(nM));function rM(t={}){let e=t.jsx?t.typescript?v_:x_:t.typescript?O_:yr,n=t.typescript?YN.concat(Rce):g_.concat(iM);return new Wu(e,[yr.data.of({autocomplete:$re(m_,M7(n))}),yr.data.of({autocomplete:JN}),t.jsx?sM:[]])}function Lce(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function dP(t,e,n=t.length){for(let i=e?.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const Nce=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),sM=Se.inputHandler.of((t,e,n,i,r)=>{if((Nce?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!yr.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var u;let{head:c}=l,h=Xt(o).resolveInner(c-1,-1),d;if(h.name=="JSXStartTag"&&(h=h.parent),!(o.doc.sliceString(c-1,c)!=i||h.name=="JSXAttributeValue"&&h.to>c)){if(i==">"&&h.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:""}};if(i=="/"&&h.name=="JSXStartCloseTag"){let p=h.parent,g=p.parent;if(g&&p.from==c-2&&((d=dP(o.doc,g.firstChild,c))||((u=g.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let m=`${d}>`;return{range:ae.cursor(c+m.length,-1),changes:{from:c,insert:m}}}}else if(i==">"){let p=Lce(h);if(p&&p.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(d=dP(o.doc,p,c)))return{range:l,changes:{from:c,insert:``}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function Mce(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach((n,i)=>{var r;!((r=n.meta.docs)===null||r===void 0)&&r.recommended&&(e.rules[i]=2)})),n=>{let{state:i}=n,r=[];for(let{from:s,to:o}of yr.findRegions(i)){let a=i.doc.lineAt(s),l={line:a.number-1,col:s-a.from,pos:s};for(let u of t.verify(i.sliceDoc(s,o),e))r.push(Qce(u,i.doc,l))}return r}}function pP(t,e,n,i){return n.line(t+i.line).from+e+(t==1?i.col-1:-1)}function Qce(t,e,n){let i=pP(t.line,t.column,e,n),r={from:i,to:t.endLine!=null&&t.endColumn!=1?pP(t.endLine,t.endColumn,e,n):i,message:t.message,source:t.ruleId?"eslint:"+t.ruleId:"eslint",severity:t.severity==1?"warning":"error"};if(t.fix){let{range:s,text:o}=t.fix,a=s[0]+n.pos-i,l=s[1]+n.pos-i;r.actions=[{name:"fix",apply(u,c){u.dispatch({changes:{from:c+a,to:c+l,insert:o},scrollIntoView:!0})}}]}return r}const Vp=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:sM,completionPath:eM,esLint:Mce,javascript:rM,javascriptLanguage:yr,jsxLanguage:x_,localCompletionSource:JN,scopeCompletionSource:$ce,snippets:g_,tsxLanguage:v_,typescriptLanguage:O_,typescriptSnippets:YN},Symbol.toStringTag,{value:"Module"})),Yc=["_blank","_self","_top","_parent"],Fx=["ascii","utf-8","utf-16","latin1","latin1"],Bx=["get","post","put","delete"],jx=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Xi=["true","false"],ze={},Dce={a:{attrs:{href:null,ping:null,type:null,media:null,target:Yc,hreflang:null}},abbr:ze,address:ze,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:ze,aside:ze,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:ze,base:{attrs:{href:null,target:Yc}},bdi:ze,bdo:ze,blockquote:{attrs:{cite:null}},body:ze,br:ze,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:jx,formmethod:Bx,formnovalidate:["novalidate"],formtarget:Yc,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:ze,center:ze,cite:ze,code:ze,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:ze,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:ze,div:ze,dl:ze,dt:ze,em:ze,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:ze,figure:ze,footer:ze,form:{attrs:{action:null,name:null,"accept-charset":Fx,autocomplete:["on","off"],enctype:jx,method:Bx,novalidate:["novalidate"],target:Yc}},h1:ze,h2:ze,h3:ze,h4:ze,h5:ze,h6:ze,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:ze,hgroup:ze,hr:ze,html:{attrs:{manifest:null}},i:ze,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:jx,formmethod:Bx,formnovalidate:["novalidate"],formtarget:Yc,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:ze,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:ze,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:ze,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Fx,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:ze,noscript:ze,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:ze,param:{attrs:{name:null,value:null}},pre:ze,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:ze,rt:ze,ruby:ze,samp:ze,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Fx}},section:ze,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:ze,source:{attrs:{src:null,type:null,media:null}},span:ze,strong:ze,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:ze,summary:ze,sup:ze,table:ze,tbody:ze,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:ze,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:ze,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:ze,time:{attrs:{datetime:null}},title:ze,tr:ze,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:ze,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:ze},oM={accesskey:null,class:null,contenteditable:Xi,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Xi,autocorrect:Xi,autocapitalize:Xi,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Xi,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Xi,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Xi,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Xi,"aria-hidden":Xi,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Xi,"aria-multiselectable":Xi,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Xi,"aria-relevant":null,"aria-required":Xi,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},aM="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of aM)oM[t]=null;class kf{constructor(e,n){this.tags={...Dce,...e},this.globalAttrs={...oM,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}kf.default=new kf;function Ku(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function Ju(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function lM(t,e,n){let i=n.tags[Ku(t,Ju(e))];return i?.children||n.allTags}function b_(t,e){let n=[];for(let i=Ju(e);i&&!i.type.isTop;i=Ju(i.parent)){let r=Ku(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const uM=/^[:\-\.\w\u00b7-\uffff]*$/;function gP(t,e,n,i,r){let s=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",o=Ju(n,n.name=="StartTag"||n.name=="TagName");return{from:i,to:r,options:lM(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(b_(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function mP(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:b_(t.doc,e).map((s,o)=>({label:s,apply:s+r,type:"type",boost:99-o})),validFor:uM}}function Vce(t,e,n,i){let r=[],s=0;for(let o of lM(t.doc,n,e))r.push({label:"<"+o,type:"type"});for(let o of b_(t.doc,n))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Fce(t,e,n,i,r){let s=Ju(n),o=s?e.tags[Ku(t.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:l.map(u=>({label:u,type:"property"})),validFor:uM}}function Bce(t,e,n,i,r){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let u=t.sliceDoc(o.from,o.to),c=e.globalAttrs[u];if(!c){let h=Ju(n),d=h?e.tags[Ku(t.doc,h)]:null;c=d?.attrs&&d.attrs[u]}if(c){let h=t.sliceDoc(i,r).toLowerCase(),d='"',p='"';/^['"]/.test(h)?(l=h[0]=='"'?/^[^"]*$/:/^[^']*$/,d="",p=t.sliceDoc(r,r+1)==h[0]?"":h[0],h=h.slice(1),i++):l=/^[^\s<>='"]*$/;for(let g of c)a.push({label:g,apply:d+g+p,type:"constant"})}}return{from:i,to:r,options:a,validFor:l}}function cM(t,e){let{state:n,pos:i}=e,r=Xt(n).resolveInner(i,-1),s=r.resolve(i);for(let o=i,a;s==r&&(a=r.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.fromcM(i,r)}const jce=yr.parser.configure({top:"SingleExpression"}),dM=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:O_.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:x_.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:v_.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:jce},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:yr.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:_f.parser}],pM=[{name:"style",parser:_f.parser.configure({top:"Styles"})}].concat(aM.map(t=>({name:t,parser:yr.parser}))),gM=Xu.define({name:"html",parser:Oue.configure({props:[Ec.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Ph=gM.configure({wrap:FN(dM,pM)});function mM(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=FN((t.nestedLanguages||[]).concat(dM),(t.nestedAttributes||[]).concat(pM)));let i=n?gM.configure({wrap:n,dialect:e}):e?Ph.configure({dialect:e}):Ph;return new Wu(i,[Ph.data.of({autocomplete:fM(t)}),t.autoCloseTags!==!1?OM:[],rM().support,qN().support])}const OP=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),OM=Se.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Ph.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var u,c,h;let d=o.doc.sliceString(l.from-1,l.to)==i,{head:p}=l,g=Xt(o).resolveInner(p,-1),m;if(d&&i==">"&&g.name=="EndTag"){let v=g.parent;if(((c=(u=v.parent)===null||u===void 0?void 0:u.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(m=Ku(o.doc,v.parent,p))&&!OP.has(m)){let S=p+(o.doc.sliceString(p,p+1)===">"?1:0),b=``;return{range:l,changes:{from:p,to:S,insert:b}}}}else if(d&&i=="/"&&g.name=="IncompleteCloseTag"){let v=g.parent;if(g.from==p-2&&((h=v.lastChild)===null||h===void 0?void 0:h.name)!="CloseTag"&&(m=Ku(o.doc,v,p))&&!OP.has(m)){let S=p+(o.doc.sliceString(p,p+1)===">"?1:0),b=`${m}>`;return{range:ae.cursor(p+b.length,-1),changes:{from:p,to:S,insert:b}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Zce=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:OM,html:mM,htmlCompletionSource:hM,htmlCompletionSourceWith:fM,htmlLanguage:Ph},Symbol.toStringTag,{value:"Module"})),xM=yO({commentTokens:{block:{open:""}}}),vM=new tt,bM=hle.configure({props:[Tc.add(t=>!t.is("Block")||t.is("Document")||uy(t)!=null||Xce(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),vM.add(uy),Ec.add({Document:()=>null}),Fo.add({Document:xM})]});function uy(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Xce(t){return t.name=="OrderedList"||t.name=="BulletList"}function zce(t,e){let n=t;for(;;){let i=n.nextSibling,r;if(!i||(r=uy(i.type))!=null&&r<=e)break;n=i}return n.to}const Wce=k8.of((t,e,n)=>{for(let i=Xt(t).resolveInner(n,-1);i&&!(i.fromn)return{from:n,to:s}}return null});function y_(t){return new Ji(xM,t,[],"markdown")}const yM=y_(bM),Uce=bM.configure([Sle,Cle,wle,_le,{props:[Tc.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Ef=y_(Uce);function qce(t,e){return n=>{if(n&&t){let i=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?i=t(n):i=ee.matchLanguageName(t,n,!0),i instanceof ee)return i.support?i.support.language.parser:ll.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class Zx{constructor(e,n,i,r,s,o,a){this.node=e,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=o,this.item=a}blank(e,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(e,n){let i=this.node.name=="OrderedList"?String(+wM(this.item,e)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function SM(t,e){let n=[],i=[];for(let r=t;r;r=r.parent){if(r.name=="FencedCode")return i;(r.name=="ListItem"||r.name=="Blockquote")&&n.push(r)}for(let r=n.length-1;r>=0;r--){let s=n[r],o,a=e.lineAt(s.from),l=s.from-a.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))i.push(new Zx(s,l,l+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let u=o[3],c=o[0].length;u.length>=4&&(u=u.slice(0,u.length-4),c-=4),i.push(new Zx(s.parent,l,l+c,o[1],u,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let u=o[4],c=o[0].length;u.length>4&&(u=u.slice(0,u.length-4),c-=4);let h=o[2];o[3]&&(h+=o[3].replace(/[xX]/," ")),i.push(new Zx(s.parent,l,l+c,o[1],u,h,s))}}return i}function wM(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function Xx(t,e,n,i=0){for(let r=-1,s=t;;){if(s.name=="ListItem"){let a=wM(s,e),l=+a[2];if(r>=0){if(l!=r+1)return;n.push({from:s.from+a[1].length,to:s.from+a[0].length,insert:String(r+2+i)})}r=l}let o=s.nextSibling;if(!o)break;s=o}}function S_(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(wd)!=" ")return t;let i=Hr(t,4,n),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+t.slice(n)}const CM=(t={})=>({state:e,dispatch:n})=>{let i=Xt(e),{doc:r}=e,s=null,o=e.changeByRange(a=>{if(!a.empty||!Ef.isActiveAt(e,a.from,-1)&&!Ef.isActiveAt(e,a.from,1))return s={range:a};let l=a.from,u=r.lineAt(l),c=SM(i.resolveInner(l,-1),r);for(;c.length&&c[c.length-1].from>l-u.from;)c.pop();if(!c.length)return s={range:a};let h=c[c.length-1];if(h.to-h.spaceAfter.length>l-u.from)return s={range:a};let d=l>=h.to-h.spaceAfter.length&&!/\S/.test(u.text.slice(h.to));if(h.item&&d){let S=h.node.firstChild,b=h.node.getChild("ListItem","ListItem");if(S.to>=l||b&&b.to0&&!/[^\s>]/.test(r.lineAt(u.from-1).text)||t.nonTightLists===!1){let w=c.length>1?c[c.length-2]:null,k,C="";w&&w.item?(k=u.from+w.from,C=w.marker(r,1)):k=u.from+(w?w.to:0);let x=[{from:k,to:l,insert:C}];return h.node.name=="OrderedList"&&Xx(h.item,r,x,-2),w&&w.node.name=="OrderedList"&&Xx(w.item,r,x),{range:ae.cursor(k+C.length),changes:x}}else{let w=vP(c,e,u);return{range:ae.cursor(l+w.length+1),changes:{from:u.from,insert:w+e.lineBreak}}}}if(h.node.name=="Blockquote"&&d&&u.from){let S=r.lineAt(u.from-1),b=/>\s*$/.exec(S.text);if(b&&b.index==h.from){let w=e.changes([{from:S.from+b.index,to:S.to},{from:u.from+h.from,to:u.to}]);return{range:a.map(w),changes:w}}}let p=[];h.node.name=="OrderedList"&&Xx(h.item,r,p);let g=h.item&&h.item.from]*/.exec(u.text)[0].length>=h.to)for(let S=0,b=c.length-1;S<=b;S++)m+=S==b&&!g?c[S].marker(r,1):c[S].blank(Su.from&&/\s/.test(u.text.charAt(v-u.from-1));)v--;return m=S_(m,e),Hce(h.node,e.doc)&&(m=vP(c,e,u)+e.lineBreak+m),p.push({from:v,to:l,insert:e.lineBreak+m}),{range:ae.cursor(v+m.length+1),changes:p}});return s?!1:(n(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},_M=CM();function xP(t){return t.name=="QuoteMark"||t.name=="ListMark"}function Hce(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,i=t.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(n.to),s=e.lineAt(i.from),o=/^[\s>]*$/.test(r.text);return r.number+(o?0:1){let n=Xt(t),i=null,r=t.changeByRange(s=>{let o=s.from,{doc:a}=t;if(s.empty&&Ef.isActiveAt(t,s.from)){let l=a.lineAt(o),u=SM(Yce(n,o),a);if(u.length){let c=u[u.length-1],h=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(o-l.from>h&&!/\S/.test(l.text.slice(h,o-l.from)))return{range:ae.cursor(l.from+h),changes:{from:l.from+h,to:o}};if(o-l.from==h&&(!c.item||l.from<=c.item.from||!/\S/.test(l.text.slice(0,c.to)))){let d=l.from+c.from;if(c.item&&c.node.from{var n;let{main:i}=e.state.selection;if(i.empty)return!1;let r=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r="https://"+r),!Ef.isActiveAt(e.state,i.from,1)))return!1;let s=Xt(e.state),o=!1;return s.iterate({from:i.from,to:i.to,enter:a=>{(a.from>i.from||Jce.test(a.name))&&(o=!0)},leave:a=>{a.to{const[t,e,n]=$t(qr,In,FO),i=bt(ea),r=bt(Ru),s=_.useRef(null),o=_.useCallback(a=>{var l;if(a!==null){const u=[...n,...cy,Se.updateListener.of(({state:c})=>{i(c.doc.toString())}),Se.focusChangeEffect.of((c,h)=>(h||r(new FocusEvent("blur")),null))];e&&u.push(ct.readOnly.of(!0)),a.innerHTML="",s.current=new Se({parent:a,state:ct.create({doc:t,extensions:u})})}else(l=s.current)==null||l.destroy(),s.current=null},[t,e,i,n,r]);return _.createElement("div",{ref:o,className:"cm-sourceView mdxeditor-source-editor"})};function bP(t,e){t!==void 0&&t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e}})}const nhe=()=>{const t=ha(),[e,n,i,r]=$t(qr,Tf,In,w_),s=bt(ea),o=_.useRef(null),a=_.useRef(null),l=Pt(FO),u=bt(Ru);return _.useEffect(()=>t.sub(Tf,c=>{var h;bP((h=a.current)==null?void 0:h.a,c)}),[t]),_.useEffect(()=>t.sub(qr,c=>{var h;bP((h=a.current)==null?void 0:h.b,c)}),[t]),_.useEffect(()=>{const c=i||r,h=c?{renderRevertControl:void 0,revertControls:void 0}:{renderRevertControl:()=>{const d=document.createElement("button");return d.classList.add("cm-merge-revert"),d.appendChild(document.createTextNode("⮕")),d},revertControls:"a-to-b"};return a.current=new Jae({...h,parent:o.current,orientation:"a-b",gutter:!0,a:{doc:n,extensions:[...l,...cy,ct.readOnly.of(!0)]},b:{doc:e,extensions:[...l,...cy,ct.readOnly.of(c),Se.updateListener.of(({state:d})=>{const p=d.doc.toString();s(p)}),Se.focusChangeEffect.of((d,p)=>(p||u(new FocusEvent("blur")),null))]}}),()=>{var d;(d=a.current)==null||d.destroy(),a.current=null}},[s,l]),_.createElement("div",{ref:o,className:"mdxeditor-diff-editor"})},ihe=({children:t})=>{const[e,n]=$t($u,Ps);return _.createElement("div",{className:"mdxeditor-diff-source-wrapper"},e?_.createElement("div",{className:G.markdownParseError},_.createElement("p",null,e.error,"."),_.createElement("p",null,"You can fix the errors in source mode and switch to rich text mode when you are ready.")):null,_.createElement("div",{className:"mdxeditor-rich-text-editor",style:{display:n==="rich-text"&&e==null?"block":"none"}},t),n==="diff"?_.createElement(nhe,null):null,n==="source"?_.createElement(the,null):null)},Tf=Pe(""),FO=Pe([]),w_=Pe(!1),rhe=En({update:(t,e)=>{t.pub(Tf,e?.diffMarkdown??"")},init(t,e){t.pubIn({[Tf]:e?.diffMarkdown??"",[FO]:e?.codeMirrorExtensions??[],[lI]:ihe,[w_]:e?.readOnlyDiff??!1,[Ps]:e?.viewMode??"rich-text"})}});var Wx={exports:{}},yP;function she(){return yP||(yP=1,(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var n=(function(i){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,o={},a={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function b(w){return w instanceof l?new l(w.type,b(w.content),w.alias):Array.isArray(w)?w.map(b):w.replace(/&/g,"&").replace(/"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(C){var b=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(C.stack)||[])[1];if(b){var w=document.getElementsByTagName("script");for(var k in w)if(w[k].src==b)return w[k]}return null}},isActive:function(b,w,k){for(var C="no-"+w;b;){var x=b.classList;if(x.contains(w))return!0;if(x.contains(C))return!1;b=b.parentElement}return!!k}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(b,w){var k=a.util.clone(a.languages[b]);for(var C in w)k[C]=w[C];return k},insertBefore:function(b,w,k,C){C=C||a.languages;var x=C[b],E={};for(var A in x)if(x.hasOwnProperty(A)){if(A==w)for(var I in k)k.hasOwnProperty(I)&&(E[I]=k[I]);k.hasOwnProperty(A)||(E[A]=x[A])}var Z=C[b];return C[b]=E,a.languages.DFS(a.languages,function(U,W){W===Z&&U!=b&&(this[U]=E)}),E},DFS:function b(w,k,C,x){x=x||{};var E=a.util.objId;for(var A in w)if(w.hasOwnProperty(A)){k.call(w,A,w[A],C||A);var I=w[A],Z=a.util.type(I);Z==="Object"&&!x[E(I)]?(x[E(I)]=!0,b(I,k,null,x)):Z==="Array"&&!x[E(I)]&&(x[E(I)]=!0,b(I,k,A,x))}}},plugins:{},highlightAll:function(b,w){a.highlightAllUnder(document,b,w)},highlightAllUnder:function(b,w,k){var C={callback:k,container:b,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",C),C.elements=Array.prototype.slice.apply(C.container.querySelectorAll(C.selector)),a.hooks.run("before-all-elements-highlight",C);for(var x=0,E;E=C.elements[x++];)a.highlightElement(E,w===!0,C.callback)},highlightElement:function(b,w,k){var C=a.util.getLanguage(b),x=a.languages[C];a.util.setLanguage(b,C);var E=b.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(E,C);var A=b.textContent,I={element:b,language:C,grammar:x,code:A};function Z(W){I.highlightedCode=W,a.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,a.hooks.run("after-highlight",I),a.hooks.run("complete",I),k&&k.call(I.element)}if(a.hooks.run("before-sanity-check",I),E=I.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!I.code){a.hooks.run("complete",I),k&&k.call(I.element);return}if(a.hooks.run("before-highlight",I),!I.grammar){Z(a.util.encode(I.code));return}if(w&&i.Worker){var U=new Worker(a.filename);U.onmessage=function(W){Z(W.data)},U.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else Z(a.highlight(I.code,I.grammar,I.language))},highlight:function(b,w,k){var C={code:b,grammar:w,language:k};if(a.hooks.run("before-tokenize",C),!C.grammar)throw new Error('The language "'+C.language+'" has no grammar.');return C.tokens=a.tokenize(C.code,C.grammar),a.hooks.run("after-tokenize",C),l.stringify(a.util.encode(C.tokens),C.language)},tokenize:function(b,w){var k=w.rest;if(k){for(var C in k)w[C]=k[C];delete w.rest}var x=new h;return d(x,x.head,b),c(b,x,w,x.head,0),g(x)},hooks:{all:{},add:function(b,w){var k=a.hooks.all;k[b]=k[b]||[],k[b].push(w)},run:function(b,w){var k=a.hooks.all[b];if(!(!k||!k.length))for(var C=0,x;x=k[C++];)x(w)}},Token:l};i.Prism=a;function l(b,w,k,C){this.type=b,this.content=w,this.alias=k,this.length=(C||"").length|0}l.stringify=function b(w,k){if(typeof w=="string")return w;if(Array.isArray(w)){var C="";return w.forEach(function(Z){C+=b(Z,k)}),C}var x={type:w.type,content:b(w.content,k),tag:"span",classes:["token",w.type],attributes:{},language:k},E=w.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(x.classes,E):x.classes.push(E)),a.hooks.run("wrap",x);var A="";for(var I in x.attributes)A+=" "+I+'="'+(x.attributes[I]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+A+">"+x.content+""};function u(b,w,k,C){b.lastIndex=w;var x=b.exec(k);if(x&&C&&x[1]){var E=x[1].length;x.index+=E,x[0]=x[0].slice(E)}return x}function c(b,w,k,C,x,E){for(var A in k)if(!(!k.hasOwnProperty(A)||!k[A])){var I=k[A];I=Array.isArray(I)?I:[I];for(var Z=0;Z=E.reach);ke+=re.value.length,re=re.next){var Ee=re.value;if(w.length>b.length)return;if(!(Ee instanceof l)){var De=1,Ie;if(ne){if(Ie=u(pe,ke,b,B),!Ie||Ie.index>=b.length)break;var Ge=Ie.index,Ue=Ie.index+Ie[0].length,qe=ke;for(qe+=re.value.length;Ge>=qe;)re=re.next,qe+=re.value.length;if(qe-=re.value.length,ke=qe,re.value instanceof l)continue;for(var Ye=re;Ye!==w.tail&&(qeE.reach&&(E.reach=$e);var Le=re.prev;xe&&(Le=d(w,Le,xe),ke+=xe.length),p(w,Le,De);var Ke=new l(A,W?a.tokenize(he,W):he,j,he);if(re=d(w,Le,Ke),Ce&&d(w,re,Ce),De>1){var lt={cause:A+","+Z,reach:$e};c(b,w,k,re.prev,ke,lt),E&<.reach>E.reach&&(E.reach=lt.reach)}}}}}}function h(){var b={value:null,prev:null,next:null},w={value:null,prev:b,next:null};b.next=w,this.head=b,this.tail=w,this.length=0}function d(b,w,k){var C=w.next,x={value:k,prev:w,next:C};return w.next=x,C.prev=x,b.length++,x}function p(b,w,k){for(var C=w.next,x=0;x/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,s){var o={};o["language-"+s]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[s]},o.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:o}};a["language-"+s]={pattern:/[\s\S]+/,inside:n.languages[s]};var l={};l[r]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(i,r){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:n.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(i){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var s=i.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,(function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",r=function(m,v){return"✖ Error "+m+" while fetching file: "+v},s="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",u="loaded",c="failed",h="pre[data-src]:not(["+a+'="'+u+'"]):not(['+a+'="'+l+'"])';function d(m,v,S){var b=new XMLHttpRequest;b.open("GET",m,!0),b.onreadystatechange=function(){b.readyState==4&&(b.status<400&&b.responseText?v(b.responseText):b.status>=400?S(r(b.status,b.statusText)):S(s))},b.send(null)}function p(m){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(v){var S=Number(v[1]),b=v[2],w=v[3];return b?w?[S,Number(w)]:[S,void 0]:[S,S]}}n.hooks.add("before-highlightall",function(m){m.selector+=", "+h}),n.hooks.add("before-sanity-check",function(m){var v=m.element;if(v.matches(h)){m.code="",v.setAttribute(a,l);var S=v.appendChild(document.createElement("CODE"));S.textContent=i;var b=v.getAttribute("data-src"),w=m.language;if(w==="none"){var k=(/\.(\w+)$/.exec(b)||[,"none"])[1];w=o[k]||k}n.util.setLanguage(S,w),n.util.setLanguage(v,w);var C=n.plugins.autoloader;C&&C.loadLanguages(w),d(b,function(x){v.setAttribute(a,u);var E=p(v.getAttribute("data-range"));if(E){var A=x.split(/\r\n?|\n/g),I=E[0],Z=E[1]==null?A.length:E[1];I<0&&(I+=A.length),I=Math.max(0,Math.min(I-1,A.length)),Z<0&&(Z+=A.length),Z=Math.max(0,Math.min(Z,A.length)),x=A.slice(I,Z).join(` +`),v.hasAttribute("data-start")||v.setAttribute("data-start",String(I+1))}S.textContent=x,n.highlightElement(S)},function(x){v.setAttribute(a,c),S.textContent=x})}}),n.plugins.fileHighlight={highlight:function(v){for(var S=(v||document).querySelectorAll(h),b=0,w;w=S[b++];)n.highlightElement(w)}};var g=!1;n.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Wx)),Wx.exports}she();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var i={};i["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[n]},i.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:i}};r["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var s={};s[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(//g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,r=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+r+s+"(?:"+r+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+r+s+")(?:"+r+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+r+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+r+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(h){c!==h&&(t.languages.markdown[c].inside.content.inside[h]=t.languages.markdown[h])})}),t.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function h(d){if(!(!d||typeof d=="string"))for(var p=0,g=d.length;p",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function u(c){var h=c.replace(o,"");return h=h.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(d,p){if(p=p.toLowerCase(),p[0]==="#"){var g;return p[1]==="x"?g=parseInt(p.slice(2),16):g=Number(p.slice(1)),l(g)}else{var m=a[p];return m||d}}),h}t.languages.md=t.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){var e=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);var SP={},wP;function ohe(){return wP||(wP=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),SP}ohe();var CP={},_P;function ahe(){return _P||(_P=1,(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)e=e.replace(//g,function(){return e});e=e.replace(//g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism)),CP}ahe();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=Prism.languages.swift});var kP={},EP;function lhe(){return EP||(EP=1,(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Prism)),kP}lhe();var TP={},AP;function uhe(){return AP||(AP=1,(function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[i,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:i.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:i.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:i.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:i.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),TP}uhe();var PP={},IP;function che(){return IP||(IP=1,(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(Prism)),PP}che();function IM(t,e){for(const n of t.childNodes){if(ln(n)&&n.tagName===e)return!0;IM(n,e)}return!1}const uh="data-language",Gc="data-highlight-language",Fp="data-theme";class Id extends Oi{static getType(){return"code"}static clone(e){return new Id(e.__language,e.__key)}constructor(e,n){super(n),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){const n=document.createElement("code");Ur(n,e.theme.code),n.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(n.setAttribute(uh,i),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Gc,i));const r=this.getTheme();r&&n.setAttribute(Fp,r);const s=this.getStyle();return s&&n.setAttribute("style",s),n}updateDOM(e,n,i){const r=this.__language,s=e.__language;r?r!==s&&n.setAttribute(uh,r):s&&n.removeAttribute(uh);const o=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&s?o&&r?r!==s&&n.setAttribute(Gc,r):n.removeAttribute(Gc):o&&r&&n.setAttribute(Gc,r);const a=this.__theme,l=e.__theme;a?a!==l&&n.setAttribute(Fp,a):l&&n.removeAttribute(Fp);const u=this.__style,c=e.__style;return u?u!==c&&n.setAttribute("style",u):c&&n.removeAttribute("style"),!1}exportDOM(e){const n=document.createElement("pre");Ur(n,e._config.theme.code),n.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(n.setAttribute(uh,i),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Gc,i));const r=this.getTheme();r&&n.setAttribute(Fp,r);const s=this.getStyle();return s&&n.setAttribute("style",s),{element:n}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||IM(e,"BR"))?{conversion:$P,priority:1}:null,div:()=>({conversion:hhe,priority:1}),pre:()=>({conversion:$P,priority:0}),table:e=>Ux(e)?{conversion:fhe,priority:3}:null,td:e=>{const n=e,i=n.closest("table");return n.classList.contains("js-file-line")||i&&Ux(i)?{conversion:RP,priority:3}:null},tr:e=>{const n=e.closest("table");return n&&Ux(n)?{conversion:RP,priority:3}:null}}}static importJSON(e){return Hs().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,n=!0){const i=this.getChildren(),r=i.length;if(r>=2&&i[r-1].getTextContent()===` +`&&i[r-2].getTextContent()===` +`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===r){i[r-1].remove(),i[r-2].remove();const l=yt();return this.insertAfter(l,n),l}const{anchor:s,focus:o}=e,a=(s.isBefore(o)?s:o).getNode();if(ye(a)){let l=phe(a);const u=[];for(;;)if(Bf(l))u.push(dl()),l=l.getNextSibling();else{if(!NM(l))break;{let v=0;const S=l.getTextContent(),b=l.getTextContentSize();for(;ve.append(n))),this.replace(e),!0}setLanguage(e){const n=this.getWritable();return n.__language=e||void 0,n}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const n=this.getWritable();return n.__isSyntaxHighlightSupported=e,n}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const n=this.getWritable();return n.__theme=e||void 0,n}getTheme(){return this.getLatest().__theme}}function Hs(t,e){return u9(Id).setLanguage(t).setTheme(e)}function C_(t){return t instanceof Id}function $P(t){return{node:Hs(t.getAttribute(uh))}}function hhe(t){const e=t,n=LP(e);return n||(function(i){let r=i.parentElement;for(;r!==null;){if(LP(r))return!0;r=r.parentElement}return!1})(e)?{node:n?Hs():null}:{node:null}}function fhe(){return{node:Hs()}}function RP(){return{node:null}}function LP(t){return t.style.fontFamily.match("monospace")!==null}function Ux(t){return t.classList.contains("js-file-line-container")}let $M=class RM extends Jr{constructor(e="",n,i){super(e,i),this.__highlightType=n}static getType(){return"code-highlight"}static clone(e){return new RM(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const n=this.getWritable();return n.__highlightType=e||void 0,n}canHaveFormat(){return!1}createDOM(e){const n=super.createDOM(e),i=qx(e.theme,this.__highlightType);return Ur(n,i),n}updateDOM(e,n,i){const r=super.updateDOM(e,n,i),s=qx(i.theme,e.__highlightType),o=qx(i.theme,this.__highlightType);return s!==o&&(s&&v0(n,s),o&&Ur(n,o)),r}static importJSON(e){return LM().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return Hs()}};function qx(t,e){return e&&t&&t.codeHighlight&&t.codeHighlight[e]}function LM(t="",e){return vi(new $M(t,e))}function NM(t){return t instanceof $M}function dhe(t,e){let n=t;for(let i=kn(t,e);i&&(NM(i.origin)||Bf(i.origin));i=QF(i))n=i.origin;return n}function phe(t){return dhe(t,"previous")}(function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach((function(n){var i=e[n],r=[];/^\w+$/.test(n)||r.push(/\w+/.exec(n)[0]),n==="diff"&&r.push("bold"),t.languages.diff[n]={pattern:RegExp("^(?:["+i+`].*(?:\r +?| +|(?![\\s\\S])))+`,"m"),alias:r,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(t.languages.diff,"PREFIXES",{value:e})})(Prism);function hy(t,e){const n={};for(const i of t){const r=e(i);r&&(n[r]?n[r].push(i):n[r]=[i])}return n}function ghe(t){const e=hy(t,(n=>n.type));return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const NP=/[!-/:-@[-`{-~\s]/;function mhe(t){return ye(t)&&!t.hasFormat("code")}function Ohe(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function MP(t,e,n){const i=n.length;for(let r=e;r>=i;r--){const s=r-i;if(MM(t,s,n,0,i)&&t[s+i]!==" ")return s}return-1}function MM(t,e,n,i,r){for(let s=0;so[o.length-1])),r=hy(n.textMatch,(({trigger:o})=>o));for(const o of e){const a=o.type;if(a==="element"||a==="text-match"||a==="multiline-element"){const l=o.dependencies;for(const u of l)t.hasNode(u)||Ohe(173,u.getType())}}const s=(o,a,l)=>{(function(u,c,h,d){const p=u.getParent();if(!xn(p)||u.getFirstChild()!==c)return!1;const g=c.getTextContent();if(g[h-1]!==" ")return!1;for(const{regExp:m,replace:v}of d){const S=g.match(m);if(S&&S[0].length===(S[0].endsWith(" ")?h:h-1)){const b=c.getNextSiblings(),[w,k]=c.splitText(h);if(v(u,k?[k,...b]:b,S,!1)!==!1)return w.remove(),!0}}return!1})(o,a,l,n.element)||(function(u,c,h,d){const p=u.getParent();if(!xn(p)||u.getFirstChild()!==c)return!1;const g=c.getTextContent();if(g[h-1]!==" ")return!1;for(const{regExpStart:m,replace:v,regExpEnd:S}of d){if(S&&!("optional"in S)||S&&"optional"in S&&!S.optional)continue;const b=g.match(m);if(b&&b[0].length===(b[0].endsWith(" ")?h:h-1)){const w=c.getNextSiblings(),[k,C]=c.splitText(h);if(v(u,C?[C,...w]:w,b,null,null,!1)!==!1)return k.remove(),!0}}return!1})(o,a,l,n.multilineElement)||(function(u,c,h){let d=u.getTextContent();const p=h[d[c-1]];if(p==null)return!1;c1&&!MM(d,w,S,0,b)||d[w-1]===" ")continue;const k=d[p+1];if(v.intraword===!1&&k&&!NP.test(k))continue;const C=u;let x=C,E=MP(d,w,S),A=x;for(;E<0&&(A=A.getPreviousSibling())&&!vr(A);)if(ye(A)){if(A.hasFormat("code"))continue;const pe=A.getTextContent();x=A,E=MP(pe,pe.length,S)}if(E<0||x===C&&E+b===w)continue;const I=x.getTextContent();if(E>0&&I[E-1]===g)continue;const Z=I[E-1];if(v.intraword===!1&&Z&&!NP.test(Z))continue;const U=C.getTextContent(),W=U.slice(0,w)+U.slice(p+1);C.setTextContent(W);const B=x===C?W:I;x.setTextContent(B.slice(0,E)+B.slice(E+b));const ne=me(),j=fa();an(j);const oe=p-b*(x===C?2:1)+1;j.anchor.set(x.__key,E,"text"),j.focus.set(C.__key,oe,"text");for(const pe of v.format)j.hasFormat(pe)||j.formatText(pe);j.anchor.set(j.focus.key,j.focus.offset,j.focus.type);for(const pe of v.format)j.hasFormat(pe)&&j.toggleFormat(pe);return ce(ne)&&(j.format=ne.format),!0}})(a,l,i)};return t.registerUpdateListener((({tags:o,dirtyLeaves:a,editorState:l,prevEditorState:u})=>{if(o.has(Ly)||o.has(Dh)||t.isComposing())return;const c=l.read(me),h=u.read(me);if(!ce(h)||!ce(c)||!c.isCollapsed()||c.is(h))return;const d=c.anchor.key,p=c.anchor.offset,g=l._nodeMap.get(d);!ye(g)||!a.has(d)||p!==1&&p>h.anchor.offset+1||t.update((()=>{if(!mhe(g))return;const m=g.getParent();m===null||C_(m)||s(m,g,c.anchor.offset)}))}))}const vhe=/^(\s*)(\d{1,})\.\s/,bhe=/^(\s*)[-*+]\s/,yhe=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,She=/^(#{1,6})\s/,whe=/^>\s/,Che=/^[ \t]*```([\w-]+)?/,_he=/[ \t]*```$/,QM=t=>(e,n,i,r)=>{const s=t(i);s.append(...n),e.replace(s),r||s.select(0,0)},__=t=>(e,n,i,r)=>{const s=e.getPreviousSibling(),o=e.getNextSibling(),a=xi(t==="check"?i[3]==="x":void 0);if(He(o)&&o.getListType()===t){const u=o.getFirstChild();u!==null?u.insertBefore(a):o.append(a),e.remove()}else if(He(s)&&s.getListType()===t)s.append(a),e.remove();else{const u=gi(t,t==="number"?Number(i[2]):void 0);u.append(a),e.replace(u)}a.append(...n),r||a.select(0,0);const l=(function(u){const c=u.match(/\t/g),h=u.match(/ /g);let d=0;return c&&(d+=c.length),h&&(d+=Math.floor(h.length/4)),d})(i[1]);l&&a.setIndent(l)},BO=(t,e,n)=>{const i=[],r=t.getChildren();let s=0;for(const o of r)if(rt(o)){if(o.getChildrenSize()===1){const c=o.getFirstChild();if(He(c)){i.push(BO(c,e,n+1));continue}}const a=" ".repeat(4*n),l=t.getListType(),u=l==="number"?`${t.getStart()+s}. `:l==="check"?`- [${o.getChecked()?"x":" "}] `:"- ";i.push(a+u+e(o)),s++}return i.join(` +`)},khe={dependencies:[Gf],export:(t,e)=>{if(!Pu(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:She,replace:QM((t=>{const e="h"+t[1].length;return Ss(e)})),type:"element"},DM={dependencies:[b0],export:(t,e)=>{if(!bv(t))return null;const n=e(t).split(` +`),i=[];for(const r of n)i.push("> "+r);return i.join(` +`)},regExp:whe,replace:(t,e,n,i)=>{if(i){const s=t.getPreviousSibling();if(bv(s))return s.splice(s.getChildrenSize(),0,[Ni(),...e]),void t.remove()}const r=Yf();r.append(...e),t.replace(r),i||r.select(0,0)},type:"element"},VM={dependencies:[Id],export:t=>{if(!C_(t))return null;const e=t.getTextContent();return"```"+(t.getLanguage()||"")+(e?` +`+e:"")+"\n```"},regExpEnd:{optional:!0,regExp:_he},regExpStart:Che,replace:(t,e,n,i,r,s)=>{let o,a;if(!e&&r){if(r.length===1)i?(o=Hs(),a=n[1]+r[0]):(o=Hs(n[1]),a=r[0].startsWith(" ")?r[0].slice(1):r[0]);else{if(o=Hs(n[1]),r[0].trim().length===0)for(;r.length>0&&!r[0].length;)r.shift();else r[0]=r[0].startsWith(" ")?r[0].slice(1):r[0];for(;r.length>0&&!r[r.length-1].length;)r.pop();a=r.join(` +`)}const l=It(a);o.append(l),t.append(o)}else e&&QM((l=>Hs(l?l[1]:void 0)))(t,e,n,s)},type:"multiline-element"},k_={dependencies:[xo,Oo],export:(t,e)=>He(t)?BO(t,e,0):null,regExp:bhe,replace:__("bullet"),type:"element"},FM={dependencies:[xo,Oo],export:(t,e)=>He(t)?BO(t,e,0):null,regExp:yhe,replace:__("check"),type:"element"},E_={dependencies:[xo,Oo],export:(t,e)=>He(t)?BO(t,e,0):null,regExp:vhe,replace:__("number"),type:"element"},BM={format:["code"],tag:"`",type:"text-format"},Ehe={format:["highlight"],tag:"==",type:"text-format"},jM={format:["bold","italic"],tag:"***",type:"text-format"},ZM={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},XM={format:["bold"],tag:"**",type:"text-format"},zM={format:["bold"],intraword:!1,tag:"__",type:"text-format"},The={format:["strikethrough"],tag:"~~",type:"text-format"},WM={format:["italic"],tag:"*",type:"text-format"},UM={format:["italic"],intraword:!1,tag:"_",type:"text-format"},qM={dependencies:[mo],export:(t,e,n)=>{if(!ki(t)||Mr(t))return null;const i=t.getTitle(),r=e(t);return i?`[${r}](${t.getURL()} "${i}")`:`[${r}](${t.getURL()})`},importRegExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{const[,n,i,r]=e,s=oo(i,{title:r}),o=n.split("[").length-1,a=n.split("]").length-1;let l=n,u="";if(oa){const h=n.split("[");u="["+h[0],l=h.slice(1).join("[")}const c=It(l);return c.setFormat(t.getFormat()),s.append(c),t.replace(s),u&&s.insertBefore(It(u)),c},trigger:")",type:"text-match"},Ahe=[khe,DM,k_,E_],Phe=[VM],Ihe=[BM,jM,ZM,XM,zM,Ehe,WM,UM,The],$he=[qM],HM=[...Ahe,...Phe,...Ihe,...$he],Rhe=[{dependencies:[sd],export:t=>PS(t)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(t,e,n,i)=>{const r=gc();i||t.getNextSibling()!=null?t.replace(r):t.insertBefore(r),r.selectNext()},type:"element"},...HM];function Hx({transformers:t=Rhe}){const[e]=ui();return R.useEffect((()=>xhe(e,t)),[e,t]),null}const Lhe=En({init(t){const e=t.getValue(P0),n=e.includes("headings")?t.getValue(rd):[],i=Dhe(e,n),r=i.filter(s=>!Qhe.has(s));t.pubIn({[go]:()=>_.createElement(Hx,{transformers:i}),[T0]:()=>_.createElement(Hx,{transformers:i}),[bS]:()=>_.createElement(Hx,{transformers:r})})}}),Nhe=t=>(e,n,i)=>{const r=t(i);r.append(...n),e.replace(r),r.select(0,0)},Mhe={dependencies:[sd],export:t=>PS(t)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(t,e,n,i)=>{const r=gc();i||t.getNextSibling()!=null?t.replace(r):t.insertBefore(r),r.selectNext()},type:"element"},Qhe=new Set([E_,k_,FM]);function Dhe(t,e){const n=[jM,ZM,XM,zM,BM,WM,UM];if(t.includes("headings")){const i=Math.min(...e),r=Math.max(...e),s=new RegExp(`^(#{${i},${r}})\\s`),o={dependencies:[Gf],export:(a,l)=>{if(!Pu(a))return null;const u=Number(a.getTag().slice(1));return"#".repeat(u)+" "+l(a)},regExp:s,replace:Nhe(a=>{const l=`h${a[1].length}`;return Ss(l)}),type:"element"};n.push(o)}if(t.includes("thematicBreak")&&n.push(Mhe),t.includes("quote")&&n.push(DM),t.includes("link")&&n.push(qM),t.includes("lists")&&n.push(E_,k_,FM),t.includes("codeblock")){const i={...VM,dependencies:[El],replace:(r,s,o)=>{const a=Sc({code:"",language:o[1]??"",meta:""});r.selectPrevious(),r.replace(a),setTimeout(()=>{a.select()},80)}};n.push(i)}return n}const T_={allText:"",nodeIndex:[],offsetIndex:[]},Af=Pe(""),yu=Pe([]),bs=Pe(0),eu=Pe(T_),A_=Pe(!1),P_=Pe("",t=>{t.link(P_,t.pipe(Af,t.transformer(vy(250))))}),jO=Pe(null,t=>t.sub(k0,e=>{var n;t.pub(jO,((n=e?.current)==null?void 0:n.parentNode)??null)})),I_="MdxSearch",Xm="MdxFocusSearch",$_=Pe(T_,t=>{t.link($_,t.pipe(eu,t.transformer(vy(250))))});function*Vhe(t,e){if(!e)return;let n;try{n=new RegExp(e,"gi")}catch(r){console.error("Invalid search pattern:",r);return}let i;for(;(i=n.exec(t))!==null;){if(i[0].length===0){n.lastIndex===i.index&&n.lastIndex++;continue}const r=i.index,s=r+i[0].length-1;yield[r,s]}}function QP(t){var e;let n="";const i=[],r=[];if(!t)return{allText:"",nodeIndex:i,offsetIndex:r};const s="p, h1, h2, h3, h4, h5, h6, li, code, pre",o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,l=>{var u;return(u=l.parentElement)!=null&&u.closest(s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let a;for(;a=o.nextNode();){const l=((e=a.textContent)==null?void 0:e.normalize("NFKD"))??a.textContent??"";for(let u=0;u{CSS.highlights.delete(Xm),t&&CSS.highlights.set(Xm,new Highlight(t))},Fhe=t=>{CSS.highlights.set(I_,new Highlight(...t))},VP=()=>{CSS.highlights.delete(I_),CSS.highlights.delete(Xm)},GM=(t,e,n)=>{const i=n?.ignoreIfInView??!0,r=n?.behavior??"smooth",[s]=t.getClientRects();if(!e){console.warn("No content-editable element found for scrolling.");return}if(!s){console.warn("No client rect found for the range, cannot scroll.");return}const o=e.getBoundingClientRect(),a=s.top-o.top,l=s.bottom-o.top;if(i){const c=a+e.scrollTop,h=l+e.scrollTop,d=e.scrollTop,p=d+e.clientHeight;if(c>=d&&h<=p)return}const u=a+e.scrollTop-s.height;e.scrollTo({top:u,behavior:r})};function Bhe(t,e){return t.startContainer===e.startContainer&&t.startOffset===e.startOffset}function FP(t,e,n){const i=t.startContainer,r=t.endContainer,s=t.startOffset,o=t.endOffset,a=Xf(i);if(!a){console.warn("No editor found for the provided DOM node.");return}a.update(()=>{const l=nr(i),u=nr(r);if(!(!ye(l)||!ye(u)))try{const c=fa();c.anchor.set(l.getKey(),s,"text"),c.focus.set(u.getKey(),o,"text"),c.insertText(e)}catch(c){console.warn("Error replacing text in the editor:",c),n&&n()}},{onUpdate:n})}function jhe(){const t=ha(),e=Pt(yu),n=Pt(bs),i=Pt(Af),r=e[n-1]??null,s=Pt(jO),[o,a]=HP(A_),l=()=>{a(!0)},u=()=>{a(!1)},c=()=>{a(!o)},h=e.length,d=(b,w)=>{const k=typeof b=="number"?e[b-1]:b;if(!k)throw new Error("Error scrolling to range, range does not exist");GM(k,s,w)};return{next:()=>{if(!e.length)return;const b=n%e.length+1;d(b),t.pub(bs,b)},prev:()=>{if(!e.length)return;const b=n<=1?e.length:n-1;d(b),t.pub(bs,b)},total:h,cursor:n,setSearch:b=>{(b??"")!==i&&t.pub(bs,0),t.pub(P_,b??"")},search:i,currentRange:r,isSearchOpen:o,setIsSearchOpen:a,openSearch:l,closeSearch:u,toggleSearch:c,ranges:e,scrollToRangeOrIndex:d,replace:(b,w)=>{const k=e[n-1];if(!k)return;const{startContainer:C,startOffset:x}=k??{};FP(k,b,()=>{const E=t.sub(yu,A=>{E(),Bhe(A[n-1]??{},{startOffset:x,startContainer:C})&&t.pub(bs,(n+1)%(A.length+1)||1)});w?.()})},replaceAll:(b,w)=>{const k=()=>{let C=0;for(let x=e.length-1;x>=0;x--){const E=e[x];if(!E)throw new Error("error replacing all text range does not exist");FP(E,b,()=>{C++,C>=e.length&&w?.()})}};typeof requestIdleCallback=="function"?requestIdleCallback(k):setTimeout(k,0)}}}const Zhe=En({init(t){if(typeof CSS.highlights>"u"){console.warn("CSS.highlights is not supported in this browser. Search functionality will be limited.");return}t.sub(bs,n=>{const i=t.getValue(yu);DP(i[n-1])});const e=(n,i)=>{if(!n){t.pub(bs,0),t.pub(yu,[]),VP();return}const r=Array.from(YM(n,i));if(t.pub(yu,r),Fhe(r),r.length){const s=t.getValue(bs)||1;DP(r[s-1]),t.pub(bs,s);const o=r[s-1];if(!o)throw new Error("error updating highlights, scroll range does not exist");const a=t.getValue(jO);GM(o,a,{ignoreIfInView:!0})}else VP()};t.sub(eu,n=>{e(t.getValue(Af),n)}),t.sub(Af,n=>{e(n,t.getValue(eu))}),t.pub(Sl,n=>{let i=null;return n.registerRootListener(r=>{if(i&&(i.disconnect(),i=null),r){const s=QP(r);return t.pub(eu,s),i=new MutationObserver(()=>{const o=QP(r);t.getValue(A_)?t.pub(eu,o):t.pub($_,o)}),i.observe(r,{childList:!0,subtree:!0,characterData:!0}),()=>i?.disconnect()}})})}}),KM=()=>{const t=bt(zh),e=Pt(yS),n=Pt(P0),i=n.includes("quote"),r=n.includes("headings"),s=Qt();if(!i&&!r)return null;const o=[{label:s("toolbar.blockTypes.paragraph","Paragraph"),value:"paragraph"}];if(i&&o.push({label:s("toolbar.blockTypes.quote","Quote"),value:"quote"}),r){const a=Pt(rd);o.push(...a.map(l=>({label:s("toolbar.blockTypes.heading","Heading {{level}}",{level:l}),value:`h${l}`})))}return _.createElement(Pd,{value:e,onChange:a=>{switch(a){case"quote":t(()=>Yf());break;case"paragraph":t(()=>yt());break;case"":break;default:if(a.startsWith("h"))t(()=>Ss(a));else throw new Error(`Unknown block type: ${a}`)}},triggerTitle:s("toolbar.blockTypeSelect.selectBlockTypeTooltip","Select block type"),placeholder:s("toolbar.blockTypeSelect.placeholder","Block type"),items:o})},Su=({format:t,addTitle:e,removeTitle:n,icon:i,formatName:r})=>{const[s,o]=$t(ed,Jt),a=bt(td),l=(s&t)!==0;return _.createElement(n_,{title:l?n:e,on:l,onValueChange:()=>{a(r)}},o(i))},JM=({options:t})=>{const e=Qt(),n=typeof t>"u";return _.createElement("div",{className:G.toolbarGroupOfGroups},n||t.includes("Bold")?_.createElement(Su,{format:iu,addTitle:e("toolbar.bold","Bold"),removeTitle:e("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,n||t.includes("Italic")?_.createElement(Su,{format:ru,addTitle:e("toolbar.italic","Italic"),removeTitle:e("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,n||t.includes("Underline")?_.createElement(Su,{format:ou,addTitle:e("toolbar.underline","Underline"),removeTitle:e("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},eQ=({options:t})=>{const e=Qt(),n=typeof t>"u";return _.createElement("div",{className:G.toolbarGroupOfGroups},n||t.includes("Strikethrough")?_.createElement(Su,{format:su,addTitle:e("toolbar.strikethrough","Strikethrough"),removeTitle:e("toolbar.removeStrikethrough","Remove strikethrough"),icon:"strikeThrough",formatName:"strikethrough"}):null,n||t.includes("Sup")?_.createElement(Su,{format:lu,addTitle:e("toolbar.superscript","Superscript"),removeTitle:e("toolbar.removeSuperscript","Remove superscript"),icon:"superscript",formatName:"superscript"}):null,n||t.includes("Sub")?_.createElement(Su,{format:au,addTitle:e("toolbar.subscript","Subscript"),removeTitle:e("toolbar.removeSubscript","Remove subscript"),icon:"subscript",formatName:"subscript"}):null)};function R_(t){return{note:t("admonitions.note","Note"),tip:t("admonitions.tip","Tip"),danger:t("admonitions.danger","Danger"),info:t("admonitions.info","Info"),caution:t("admonitions.caution","Caution")}}const tQ=()=>{const[t,e]=$t(yl,Bi),n=t.rootNode,i=Qt(),r=R_(i);return _.createElement(Pd,{value:n.getMdastNode().name,onChange:s=>{e?.update(()=>{n.setMdastNode({...n.getMdastNode(),name:s}),setTimeout(()=>{e.update(()=>{n.getLatest().select()})},80)})},triggerTitle:i("admonitions.changeType","Select admonition type"),placeholder:i("admonitions.placeholder","Admonition type"),items:MO.map(s=>({label:r[s],value:s}))})},nQ=()=>{const[t,e,n]=$t(yl,Gt,yf),i=Qw(t.rootNode)?t.rootNode:null,r=Qt();if(!i)return null;const s=i.getLanguage(),{value:o,items:a}=VC(n,s);return _.createElement("div",{className:G.selectWithLabel},_.createElement("label",null,r("codeBlock.language","Code block language")),_.createElement(Pd,{value:o||Ba,onChange:l=>{e?.update(()=>{i.setLanguage(l===Ba?"":l),setTimeout(()=>{e.update(()=>{i.getLatest().select()})})})},triggerTitle:r("codeBlock.selectLanguage","Select code block language"),placeholder:r("codeBlock.language","Code block language"),items:a}))},iQ=()=>{const[t,e]=$t(ed,Jt),n=bt(td),i=Qt(),r=(t&Kf)!==0,s=r?i("toolbar.removeInlineCode","Remove code format"):i("toolbar.inlineCode","Inline code format");return _.createElement(DO,{items:[{title:s,contents:e("code"),active:r,onChange:n.bind(null,"code")}]})},rQ=()=>{const[t,e]=$t(ed,Jt),n=bt(td),i=Qt(),r=(t&uu)!==0,s=r?i("toolbar.removeHighlight","Remove highlight"):i("toolbar.highlight","Highlight");return _.createElement(DO,{items:[{title:s,contents:e("format_highlight"),active:r,onChange:n.bind(null,"highlight")}]})},sQ=()=>{const t=bt(QO),e=Pt(Jt),n=Qt();return _.createElement(Al,{"aria-label":n("toolbar.link","Create link"),title:n("toolbar.link","Create link"),onClick:i=>{t()}},e("link"))},oQ=({children:t,SourceToolbar:e,options:n=["rich-text","diff","source"]})=>{const[i,r]=$t(Ps,Jt),s=bt(Ps),o=Qt(),a=[];return n.includes("rich-text")&&a.push({title:o("toolbar.richText","Rich text"),contents:r("rich_text"),value:"rich-text"}),n.includes("diff")&&a.push({title:o("toolbar.diffMode","Diff mode"),contents:r("difference"),value:"diff"}),n.includes("source")&&a.push({title:o("toolbar.source","Source mode"),contents:r("markdown"),value:"source"}),_.createElement(_.Fragment,null,i==="rich-text"?t:i==="diff"?_.createElement("span",{className:G.toolbarTitleMode},o("toolbar.diffMode","Diff mode")):e??_.createElement("span",{className:G.toolbarTitleMode},o("toolbar.source","Source mode")),_.createElement("div",{className:G.diffSourceToggleWrapper},_.createElement(i_,{className:G.diffSourceToggle,ggClassName:G.ggDiffSourceToggle,value:i,items:a,onChange:l=>{s(l===""?"rich-text":l)}})))},aQ=()=>{const t=bt(XC),e=Pt(Jt),n=Qt(),i=_.useMemo(()=>{const r=R_(n);return MO.map(s=>({value:s,label:r[s]}))},[n]);return _.createElement(WL,{title:n("toolbar.admonition","Insert Admonition"),onChoose:r=>{t({type:"containerDirective",name:r})},items:i},e("admonition"))},lQ=()=>{const t=bt(dO),e=Pt(Jt),n=Qt();return _.createElement(Al,{title:n("toolbar.codeBlock","Insert Code Block"),onClick:()=>{t({})}},e("frame_source"))},uQ=()=>{const t=bt(kw),[e,n]=$t(Tw,Jt),i=Qt();return _.createElement(Al,{title:e?i("toolbar.editFrontmatter","Edit frontmatter"):i("toolbar.insertFrontmatter","Insert frontmatter"),className:ft({[G.activeToolbarButton]:e}),onClick:()=>{t()}},n("frontmatter"))},cQ=_.forwardRef((t,e)=>{const n=bt(xw),[i,r]=$t(In,Jt),s=Qt();return _.createElement(Ks,{"aria-label":s("toolbar.image","Insert image"),className:G.toolbarButton,ref:e,disabled:i,onClick:()=>{n()}},_.createElement(Sa,{title:s("toolbar.image","Insert image")},r("add_photo")))}),hQ=()=>{const t=Pt(Jt),e=bt(HS),n=Qt(),i=Pt(A0);return _.createElement(Al,{title:n("toolbar.table","Insert Table"),onClick:()=>{e({rows:3,columns:3})},...i?{"aria-disabled":!0,"data-disabled":!0,disabled:!0}:{}},t("table"))},fQ=()=>{const t=bt(IS),e=Pt(Jt),n=Qt();return _.createElement(Al,{title:n("toolbar.thematicBreak","Insert thematic break"),onClick:()=>{t()}},e("horizontal_rule"))},Xhe={bullet:"format_list_bulleted",number:"format_list_numbered",check:"format_list_checked"},dQ=({options:t=["bullet","number","check"]})=>{const[e,n,i]=$t(zg,Jt,A0),r=bt($S),s=Qt(),o={bullet:s("toolbar.bulletedList","Bulleted list"),number:s("toolbar.numberedList","Numbered list"),check:s("toolbar.checkList","Check list")},a=t.map(l=>({value:l,title:o[l],contents:n(Xhe[l])}));return _.createElement(i_,{value:e||"",items:a,onChange:r,disabled:i})},pQ=()=>{const[t,e]=$t(Jt,Gt),[n,i]=_.useState(!1),[r,s]=_.useState(!1),o=Qt();return _.useEffect(()=>{if(e)return ci(e.registerCommand(ql,a=>(i(a),!1),Mi),e.registerCommand(Ul,a=>(s(a),!1),Mi))},[e]),_.createElement(DO,{items:[{title:o("toolbar.undo","Undo {{shortcut}}",{shortcut:qh?"⌘Z":"Ctrl+Z"}),disabled:!n,contents:t("undo"),active:!1,onChange:()=>e?.dispatchCommand($f,void 0)},{title:o("toolbar.redo","Redo {{shortcut}}",{shortcut:qh?"⌘Y":"Ctrl+Y"}),disabled:!r,contents:t("redo"),active:!1,onChange:()=>e?.dispatchCommand(Rf,void 0)}]})};function BP(t){const e=t?.rootNode;return!e||e.getType()!=="directive"?!1:["note","tip","danger","info","caution"].includes(e.getMdastNode().name)}const zhe=()=>_.createElement(oQ,null,_.createElement(og,{options:[{when:t=>t?.editorType==="codeblock",contents:()=>_.createElement(nQ,null)},{fallback:()=>_.createElement(_.Fragment,null,_.createElement(pQ,null),_.createElement(hs,null),_.createElement(JM,null),_.createElement(iQ,null),_.createElement(rQ,null),_.createElement(hs,null),_.createElement(eQ,null),_.createElement(hs,null),_.createElement(dQ,null),_.createElement(hs,null),_.createElement(og,{options:[{when:BP,contents:()=>_.createElement(tQ,null)},{fallback:()=>_.createElement(KM,null)}]}),_.createElement(hs,null),_.createElement(sQ,null),_.createElement(cQ,null),_.createElement(hs,null),_.createElement(hQ,null),_.createElement(fQ,null),_.createElement(hs,null),_.createElement(lQ,null),_.createElement(og,{options:[{when:t=>!BP(t),contents:()=>_.createElement(_.Fragment,null,_.createElement(hs,null),_.createElement(aQ,null))}]}),_.createElement(hs,null),_.createElement(uQ,null))}]})),jP=20,Whe=_.forwardRef(({autocompleteSuggestions:t=[],submitButtonTitle:e,dialogInputPlaceholder:n,onSubmit:i,tooltipTitle:r,buttonContent:s},o)=>{const[a,l]=$t(es,In),[u,c]=_.useState(!1),h=_.useCallback(d=>{i(d),c(!1)},[i]);return _.createElement(q0,{open:u,onOpenChange:c},_.createElement(z$,{asChild:!0},_.createElement(Ks,{"aria-label":r,className:G.toolbarButton,ref:o,disabled:l},_.createElement(Sa,{title:r},s))),_.createElement(H0,{container:a?.current},_.createElement(Y0,{className:G.dialogOverlay}),_.createElement(G0,{className:G.dialogContent},_.createElement(Uhe,{submitButtonTitle:e,autocompleteSuggestions:t,onSubmitCallback:h,dialogInputPlaceholder:n}))))}),Uhe=({autocompleteSuggestions:t,onSubmitCallback:e,dialogInputPlaceholder:n,submitButtonTitle:i})=>{const[r,s]=_.useState(t.slice(0,jP)),o=Pt(Jt),a=Qt(),l=t.length>0,{isOpen:u,getToggleButtonProps:c,getMenuProps:h,getInputProps:d,highlightedIndex:p,getItemProps:g,selectedItem:m}=mw({initialInputValue:"",onInputValueChange({inputValue:C}){C=C?.toLowerCase()??"";const x=[];for(const E of t)if(E.toLowerCase().includes(C)&&(x.push(E),x.length>=jP))break;s(x)},items:r,itemToString(C){return C??""}}),v=_.useCallback(C=>{var x;C.key==="Escape"?(x=C.target.form)==null||x.reset():C.key==="Enter"&&(!u||r.length===0)&&(C.preventDefault(),e(C.target.value))},[u,r,e]),S=d(),b={...S,onKeyDown:C=>{v(C),S.onKeyDown(C)}},w=C=>{C.preventDefault(),C.stopPropagation(),e(b.value)},k=u&&r.length>0;return _.createElement("form",{onSubmit:w,className:ft(G.dialogForm)},_.createElement("div",{className:G.linkDialogInputContainer},_.createElement("div",{"data-visible-dropdown":k,className:G.linkDialogInputWrapper},_.createElement("input",{placeholder:n,className:G.linkDialogInput,...b,autoFocus:!0,size:30,"data-editor-dialog":!0}),l&&_.createElement("button",{"aria-label":"toggle menu",type:"button",...c()},o("arrow_drop_down"))),_.createElement("div",{className:G.downshiftAutocompleteContainer},_.createElement("ul",{...h(),"data-visible":k},r.map((C,x)=>_.createElement("li",{"data-selected":m===C,"data-highlighted":p===x,key:`${C}${x}`,...g({item:C,index:x})},C))))),_.createElement("button",{type:"submit",title:i,"aria-label":i,className:ft(G.actionButton,G.primaryActionButton)},o("check")),_.createElement(K0,{"aria-label":a("dialog.close","Close dialog"),className:G.actionButton},o("close")))},qhe={editorMap:new Map,registerEditor:(t,e)=>{}},L_=R.createContext(qhe),Hhe=({children:t})=>{const[e,n]=_.useState(new Map);R.useEffect(()=>()=>{n(new Map)},[]);const i=R.useCallback((s,o)=>{n(a=>new Map(a).set(s,o))},[]),r=R.useMemo(()=>({editorMap:e,registerEditor:i}),[e,i]);return _.createElement(L_.Provider,{value:r},t)},Yhe=({realm:t,editorId:e})=>{const{registerEditor:n}=_.useContext(L_);return R.useEffect(()=>{n(e,t)},[t,e,n]),null},Ghe=En({init:(t,e)=>{e?.editorId&&t.pub(go,()=>_.createElement(Yhe,{realm:t,editorId:e.editorId}))}});function Khe(t){return _.useContext(L_).editorMap.get(t)}function Jhe(t,e){return t.replace("hsl","hsla").replace(")",`, ${e})`)}const $fe=Object.freeze(Object.defineProperty({__proto__:null,$convertPreElement:V4,$convertTableElement:Q$,$createCodeBlockNode:Sc,$createDirectiveNode:NO,$createFrontmatterNode:pd,$createGenericHTMLNode:oS,$createImageNode:Oa,$createTableNode:W0,$isCodeBlockNode:Qw,$isDirectiveNode:ZL,$isFrontmatterNode:zo,$isGenericHTMLNode:eI,$isImageNode:Yh,$isTableNode:M$,ADMONITION_TYPES:MO,ALL_HEADING_LEVELS:AS,Action:Gr,AdmonitionDirectiveDescriptor:Cae,Appender:ei,BlockTypeSelect:KM,BoldItalicUnderlineToggles:JM,Button:zL,ButtonOrDropdownButton:WL,ButtonWithTooltip:Al,CAN_USE_DOM:TS,COMMON_STATE_CONFIG_EXTENSIONS:Loe,Cell:Pe,ChangeAdmonitionType:tQ,ChangeCodeMirrorLanguage:nQ,CodeBlockNode:El,CodeMirrorEditor:BL,CodeToggle:iQ,ConditionalContents:og,CreateLink:sQ,DEFAULT_FORMAT:lj,DerivedCell:jD,DialogButton:Whe,DiffSourceToggleWrapper:oQ,DirectiveNode:$c,EMPTY_VALUE:Ba,EmptyTextNodeIndex:T_,FrontmatterNode:xc,GenericDirectiveEditor:_ae,GenericHTMLNode:hc,GenericJsxEditor:L4,HighlightToggle:rQ,INSERT_IMAGE_COMMAND:Gh,IS_APPLE:qh,IS_BOLD:iu,IS_CODE:Kf,IS_HIGHLIGHT:uu,IS_ITALIC:ru,IS_STRIKETHROUGH:su,IS_SUBSCRIPT:au,IS_SUPERSCRIPT:lu,IS_UNDERLINE:ou,ImageNode:Oc,InsertAdmonition:aQ,InsertCodeBlock:lQ,InsertFrontmatter:uQ,InsertImage:cQ,InsertTable:hQ,InsertThematicBreak:fQ,KitchenSinkToolbar:zhe,ListsToggle:dQ,MDXEditor:vz,MDX_FOCUS_SEARCH_NAME:Xm,MDX_SEARCH_NAME:I_,MarkdownParseError:Qg,MultipleChoiceToggleGroup:DO,NESTED_EDITOR_UPDATED_COMMAND:Yo,NestedEditorsContext:cO,NestedLexicalEditor:fO,PropertyPopover:Mw,Realm:my,RealmContext:zm,RealmProvider:GD,RealmWithPlugins:GP,RemoteMDXEditorRealmProvider:Hhe,Root:XL,Select:Pd,SelectButtonTrigger:FL,SelectContent:DC,SelectItem:QC,SelectTrigger:VL,Separator:hs,Signal:mn,SingleChoiceToggleGroup:i_,SingleToggleGroup:Iae,StrikeThroughSupSubToggles:eQ,TYPE_NAME:Cv,TableNode:Cl,ToggleSingleGroupWithItem:n_,ToolbarToggleItem:t_,TooltipWrap:Sa,UndoRedo:pQ,UnrecognizedMarkdownConstructError:Dg,activeEditor$:Gt,activeEditorSubscriptions$:hS,activePlugins$:P0,addActivePlugin$:wl,addBottomAreaChild$:aI,addComposerChild$:go,addEditorWrapper$:lI,addExportVisitor$:sr,addImportVisitor$:Qi,addLexicalNode$:rr,addMdastExtension$:Jo,addNestedEditorChild$:T0,addSyntaxExtension$:Ko,addTableCellEditorChild$:bS,addToMarkdownExtension$:bl,addTopAreaChild$:oI,admonitionLabelsMap:R_,allowSetImageDimensions$:Du,allowedHeadingLevels$:rd,always:lV,appendCodeBlockEditorDescriptor$:F4,applyBlockType$:Xj,applyFormat$:td,applyLinkChanges$:Tae,applyListType$:$S,autoFocus$:_v,bottomAreaChildren$:mS,call:YP,cancelLinkEdit$:UC,changeWith:qD,closeImageDialog$:bw,cmExtensions$:FO,codeBlockEditorDescriptors$:vl,codeBlockLanguages$:yf,codeBlockPlugin:dK,codeMirrorAutoLoadLanguageSupport$:Nm,codeMirrorExtensions$:Lm,codeMirrorPlugin:Noe,combine:HD,compose:iV,composerChildren$:pS,contentEditableClassName$:Vg,contentEditableRef$:k0,contentEditableWrapperElement$:rI,controlOrMeta:kI,convertSelectionToNode$:zh,corePlugin:cI,createActiveEditorSubscription$:Lu,createRootEditorSubscription$:Sl,currentBlockType$:yS,currentFormat$:ed,currentListType$:zg,currentSelection$:el,curry1to0:oV,curry2to1:sV,debounceTime:vy,debouncedIndexer$:$_,defaultCodeBlockLanguage$:Go,defaultComparator:Gx,defaultSvgIcons:dI,delayWithMicrotask:eV,diffMarkdown$:Tf,diffSourcePlugin:rhe,directiveDescriptors$:tl,directivesPlugin:wae,disableAutoLink$:j$,disableImageResize$:Jg,disableImageSettingsButton$:yw,editImageToolbarComponent$:nm,editorInFocus$:yl,editorInTable$:A0,editorRootElementRef$:es,editorSearchCursor$:bs,editorSearchRanges$:yu,editorSearchScrollableContent$:jO,editorSearchTerm$:Af,editorSearchTermDebounced$:P_,editorSearchTextNodeIndex$:eu,editorWrapperElementRef$:nI,editorWrappers$:OS,exportLexicalTreeToMdast:S0,exportMarkdownFromLexical:sS,exportVisitors$:fc,filter:ec,fromWithinEditorRead:az,frontmatterDialogOpen$:Kh,frontmatterPlugin:TY,getCodeBlockLanguageSelectData:VC,getSelectedNode:wI,getSelectionAsMarkdown:CI,getSelectionRectangle:ES,getStateAsMarkdown:hz,getValue:YD,handlePromise:nV,hasFrontmatter$:Tw,headingsPlugin:Cz,historyState$:uI,htmlTags:rS,iconComponentFor$:Jt,imageAutocompleteSuggestions$:Kg,imageDialogState$:Xo,imagePlaceholder$:tm,imagePlugin:WH,imagePreviewHandler$:em,imageUploadHandler$:qs,importMarkdownToLexical:J9,importMdastTreeToLexical:w0,importVisitors$:nd,inFocus$:Iu,initialMarkdown$:aS,initialMarkdownNormalize$:Zh,insertCodeBlock$:dO,insertCodeMirror$:jL,insertDecoratorNode$:pc,insertDirective$:XC,insertFrontmatter$:kw,insertImage$:T6,insertJsx$:M4,insertMarkdown$:cS,insertTable$:HS,insertThematicBreak$:IS,isMdastHTMLNode:iS,isMdastJsxNode:N4,isPartOftheEditorUI:z0,joinProc:uV,jsxComponentDescriptors$:so,jsxIsAvailable$:dc,jsxPlugin:oK,lexical:kF,lexicalTheme:Jf,lexicalTheme$:Wh,link:ZD,linkAutocompleteSuggestions$:YC,linkDialogPlugin:Aae,linkDialogState$:di,linkPlugin:Oq,listsPlugin:Qz,makeHslTransparent:Jhe,map:Xr,mapTo:Oy,markdown$:qr,markdownErrorSignal$:jg,markdownProcessingError$:$u,markdownShortcutPlugin:Lhe,markdownSourceEditorValue$:ea,maxLengthPlugin:$Y,mdastExtensions$:uS,muteChange$:Zg,nestedEditorChildren$:xS,noop:Ys,normalizeCodeBlockLanguages:Rm,onBlur$:Ru,onClickLinkCallback$:GC,onNext:tV,onReadOnlyClickLinkCallback$:KC,onWindowChange$:zC,once:KD,openEditImageDialog$:vw,openLinkEditDialog$:QO,openNewImageDialog$:xw,parseImageDimension:il,pipe:UD,placeholder$:Bg,prop:aV,pub:XD,pubIn:WD,quotePlugin:IY,rangeSearchScan:YM,readOnly$:In,readOnlyDiff$:w_,realmPlugin:En,remoteRealmPlugin:Ghe,removeFrontmatter$:Ew,removeLink$:HC,rootEditor$:Bi,rootEditorSubscriptions$:fS,saveImage$:Sw,scan:xy,searchOpen$:A_,searchPlugin:Zhe,setMarkdown$:E0,showLinkTitleField$:JC,spellCheck$:Fg,sub:zD,switchFromPreviewToLinkEdit$:qC,syntaxExtensions$:lS,tableCellEditorChildren$:vS,tablePlugin:iq,tap:by,thematicBreakPlugin:Pz,throttleTime:JD,thrush:rV,toMarkdownExtensions$:_0,toMarkdownOptions$:Xh,toolbarClassName$:lg,toolbarContents$:ag,toolbarPlugin:$ae,topAreaChildren$:gS,translation$:SS,updateLink$:WC,useCell:HP,useCellValue:Pt,useCellValues:$t,useCodeBlockEditorContext:am,useEditorSearch:jhe,useLexicalNodeRemove:$4,useMdastNodeUpdater:hO,useNestedEditorContext:Od,usePublisher:bt,useRealm:ha,useRemoteMDXEditorRealm:Khe,useTranslation:Qt,usedLexicalNodes$:id,uuidv4:R$,viewMode$:Ps,voidEmitter:ef,withLatestFrom:rn},Symbol.toStringTag,{value:"Module"}));export{PN as C,or as E,Mt as I,Xu as L,z4 as N,Wu as a,$re as b,sg as c,M7 as d,Gu as e,Tc as f,Xt as g,Se as h,Ec as i,ae as j,mM as k,Jte as l,Bm as m,WN as n,E8 as o,W4 as p,yr as q,ene as r,kc as s,Q as t,Ci as u,F8 as v,$fe as w}; diff --git a/pkg/cli/webapp/dist/assets/index-gAk31IFT.js b/pkg/cli/webapp/dist/assets/index-gAk31IFT.js new file mode 100644 index 0000000..ba008c1 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-gAk31IFT.js @@ -0,0 +1 @@ +import{L as g,a as q,k as P,p as l,q as i,s as c,t as r,e as R,E as p}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const b=1,$=33,m=34,v=35,x=36,W=new p(O=>{let t=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>t&&O.acceptToken(b)});function n(O,t,a){return new p(e=>{let u=e.pos;for(;e.next!=O&&e.next>=0&&(a||e.next!=38&&(e.next!=123||e.peek(1)!=123));)e.advance();e.pos>u&&e.acceptToken(t)})}const d=n(39,$,!1),C=n(34,m,!1),T=n(39,v,!0),f=n(34,x,!0),A=R.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<O.name=="InterpolationContent"?o:null)}),y=Q.configure({wrap:l((O,t)=>{var a;return O.name=="InterpolationContent"?o:O.name!="AttributeInterpolation"?null:((a=O.node.parent)===null||a===void 0?void 0:a.name)=="StatementAttributeValue"?w:o}),top:"Attribute"}),E={parser:U},k={parser:y},s=P({selfClosingTags:!0});function S(O){return O.configure({wrap:l(z)},"angular")}const N=S(s.language);function z(O,t){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(t.read(O.from,O.to))?k:null;case"Text":return E}return null}function j(O={}){let t=s;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof g))throw new RangeError("The base option must be the result of calling html(...)");t=O.base}return new q(t.language==s.language?N:S(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{j as angular,N as angularLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-hFKTmk28.js b/pkg/cli/webapp/dist/assets/index-hFKTmk28.js new file mode 100644 index 0000000..80d57d5 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-hFKTmk28.js @@ -0,0 +1 @@ +import{a as O,L as r,i as t,l as b,f as s,o as a,s as P,e as n,t as e}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const i={__proto__:null,anyref:34,dataref:34,eqref:34,externref:34,i31ref:34,funcref:34,i8:34,i16:34,i32:34,i64:34,f32:34,f64:34},S=n.deserialize({version:14,states:"!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",stateData:"!P~O_OSPOSQOS~OTPOVROXROYROZROaQO~OSUO~P]OSXO~P]O",goto:"xaPPPPPPbPbPPPhPPPrXROPTVQTOQVPTWTVXSOPTV",nodeNames:"⚠ LineComment BlockComment Module ) ( App Identifier Type Keyword Number String",maxTerm:17,nodeProps:[["isolate",-3,1,2,11,""],["openedBy",4,"("],["closedBy",5,")"],["group",-6,6,7,8,9,10,11,"Expression"]],skippedNodes:[0,1,2],repeatNodeCount:1,tokenData:"0o~R^XY}YZ}]^}pq}rs!Stu#pxy'Uyz(e{|(j}!O(j!Q!R(s!R![*p!]!^.^#T#o.{~!SO_~~!VVOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j<%lO!S~!qOZ~~!tRO;'S!S;'S;=`!};=`O!S~#QWOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j;=`<%l!S<%lO!S~#mP;=`<%l!S~#siqr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%b!`!a%b!a!b%b!b!c%b!c!}%b#Q#R%b#R#S%b#S#T%b#T#o%b#p#q%b#r#s%b~%giV~qr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%b!`!a%b!a!b%b!b!c%b!c!}%b#Q#R%b#R#S%b#S#T%b#T#o%b#p#q%b#r#s%b~'ZPT~!]!^'^~'aTO!]'^!]!^'p!^;'S'^;'S;=`(_<%lO'^~'sVOy'^yz(Yz!]'^!]!^'p!^;'S'^;'S;=`(_<%lO'^~(_OQ~~(bP;=`<%l'^~(jOS~~(mQ!Q!R(s!R![*p~(xUY~!O!P)[!Q![*p!g!h){#R#S+U#X#Y){#l#m+[~)aRY~!Q![)j!g!h){#X#Y){~)oSY~!Q![)j!g!h){#R#S*j#X#Y){~*OR{|*X}!O*X!Q![*_~*[P!Q![*_~*dQY~!Q![*_#R#S*X~*mP!Q![)j~*uTY~!O!P)[!Q![*p!g!h){#R#S+U#X#Y){~+XP!Q![*p~+_R!Q![+h!c!i+h#T#Z+h~+mVY~!O!P,S!Q![+h!c!i+h!r!s-P#R#S+[#T#Z+h#d#e-P~,XTY~!Q![,h!c!i,h!r!s-P#T#Z,h#d#e-P~,mUY~!Q![,h!c!i,h!r!s-P#R#S.Q#T#Z,h#d#e-P~-ST{|-c}!O-c!Q![-o!c!i-o#T#Z-o~-fR!Q![-o!c!i-o#T#Z-o~-tSY~!Q![-o!c!i-o#R#S-c#T#Z-o~.TR!Q![,h!c!i,h#T#Z,h~.aP!]!^.d~.iSP~OY.dZ;'S.d;'S;=`.u<%lO.d~.xP;=`<%l.d~/QiX~qr.{st.{tu.{uv.{vw.{wx.{z{.{{|.{}!O.{!O!P.{!P!Q.{!Q![.{![!].{!^!_.{!_!`.{!`!a.{!a!b.{!b!c.{!c!}.{#Q#R.{#R#S.{#S#T.{#T#o.{#p#q.{#r#s.{",tokenizers:[0],topRules:{Module:[0,3]},specialized:[{term:9,get:o=>i[o]||-1}],tokenPrec:0}),Q=r.define({name:"wast",parser:S.configure({props:[t.add({App:b({closing:")",align:!1})}),s.add({App:a,BlockComment(o){return{from:o.from+2,to:o.to-2}}}),P({Keyword:e.keyword,Type:e.typeName,Number:e.number,String:e.string,Identifier:e.variableName,LineComment:e.lineComment,BlockComment:e.blockComment,"( )":e.paren})]}),languageData:{commentTokens:{line:";;",block:{open:"(;",close:";)"}},closeBrackets:{brackets:["(",'"']}}});function T(){return new O(Q)}export{T as wast,Q as wastLanguage}; diff --git a/pkg/cli/webapp/dist/assets/index-q9STU_Ao.js b/pkg/cli/webapp/dist/assets/index-q9STU_Ao.js new file mode 100644 index 0000000..032b1c2 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-q9STU_Ao.js @@ -0,0 +1,2 @@ +import{w as k}from"./index-C3Ux1Lgv.js";const N=[[/^()$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function S(e,n,t){const i=[];for(const s of e){const o=s.children;let c=o.length-1;t==="v1"?c=0:n&&(c=o.length-2);for(let l=Math.max(c,0);lr.type==="element"),c=[];s.data??={};const l=s.data;l._shiki_notation??=S(o,["jsx","tsx"].includes(this.options.lang),i);const a=l._shiki_notation;for(const r of a){if(r.info[1].length===0)continue;const h=r.line.children.length===(r.isJsxStyle?3:1);let f=o.indexOf(r.line);h&&i!=="v1"&&f++;let u=!1;if(r.info[1]=r.info[1].replace(n,(...m)=>t.call(this,m,r.line,r.token,o,f)?(u=!0,""):m[0]),!u)continue;i==="v1"&&(r.info[1]=C(r.info[1]));const d=r.info[1].trim().length===0;if(d&&(r.info[1]=""),d&&h)c.push(r.line);else if(d&&r.isJsxStyle)r.line.children.splice(r.line.children.indexOf(r.token)-1,3);else if(d)r.line.children.splice(r.line.children.indexOf(r.token),1);else{const m=r.token.children[0];m.type==="text"&&(m.value=r.info.join(""))}}for(const r of c)s.children.splice(s.children.indexOf(r),1)}}}function B(e=[]){return{name:"@shikijs/transformers:compact-line-options",line(n,t){const i=e.find(s=>s.line===t);return i?.classes&&this.addClassToHast(n,i.classes),n}}}function j(e){if(!e)return null;const n=e.match(/\{([\d,-]+)\}/);return n?n[1].split(",").flatMap(i=>{const s=i.split("-").map(o=>Number.parseInt(o,10));return s.length===1?[s[0]]:Array.from({length:s[1]-s[0]+1},(o,c)=>c+s[0])}):null}const x=Symbol("highlighted-lines");function D(e={}){const{className:n="highlighted"}=e;return{name:"@shikijs/transformers:meta-highlight",line(t,i){if(!this.options.meta?.__raw)return;const s=this.meta;return s[x]??=j(this.options.meta.__raw),(s[x]??[]).includes(i)&&this.addClassToHast(t,n),t}}}function _(e){return e?Array.from(e.matchAll(/\/((?:\\.|[^/])+)\//g)).map(t=>t[1].replace(/\\(.)/g,"$1")):[]}function F(e={}){const{className:n="highlighted-word"}=e;return{name:"@shikijs/transformers:meta-word-highlight",preprocess(t,i){if(!this.options.meta?.__raw)return;const s=_(this.options.meta.__raw);i.decorations||=[];for(const o of s){const c=w(t,o);for(const l of c)i.decorations.push({start:l,end:l+o.length,properties:{class:n}})}}}}function w(e,n){const t=[];let i=-1;for(;(i=e.indexOf(n,i+1))!==-1;)t.push(i);return t}function T(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function y(e={},n="@shikijs/transformers:notation-map"){const{classMap:t={},classActivePre:i=void 0}=e;return A(n,new RegExp(`\\s*\\[!code (${Object.keys(t).map(T).join("|")})(:\\d+)?\\]`),function([s,o,c=":1"],l,a,r,h){const f=Number.parseInt(c.slice(1),10);for(let u=h;u=n[0]}function E(e,n,t,i){const s=n.value,o=c=>L(e,{children:[{type:"text",value:c}]});return[t>0?o(s.slice(0,t)):void 0,o(s.slice(t,t+i)),t+i!(n.type==="text"&&n.value===` +`))}}}function U(){return{name:"@shikijs/transformers:remove-notation-escape",postprocess(e){return e.replace(/\[\\!code/g,"[!code")}}}function R(e){const n=[];let t="";function i(){t.length&&n.push(t),t=""}return e.forEach((s,o)=>{P(s)||g(s)&&(g(e[o-1])||g(e[o+1]))?(i(),n.push(s)):t+=s}),i(),n}function P(e){return e===" "}function g(e){return e===" "||e===" "}function I(e,n,t=!0){if(n==="all")return e;let i=0,s=0;if(n==="boundary")for(let c=0;c=0&&g(e[c]);c--)s++;const o=e.slice(i,e.length-s);return[...e.slice(0,i),...t?R(o):[o.join("")],...e.slice(e.length-s)]}function X(e={}){const n={" ":e.classSpace??"space"," ":e.classTab??"tab"},t=e.position??"all",i=Object.keys(n);return{name:"@shikijs/transformers:render-whitespace",root(s){s.children[0].children[0].children.forEach(l=>{if(l.type!=="element")return;const a=l.children.filter(h=>h.type==="element"),r=a.length-1;l.children=l.children.flatMap(h=>{if(h.type!=="element")return h;const f=a.indexOf(h);if(t==="boundary"&&f!==0&&f!==r||t==="trailing"&&f!==r)return h;const u=h.children[0];if(u.type!=="text"||!u.value)return h;const d=I(u.value.split(/([ \t])/).filter(m=>m.length),t==="boundary"&&f===r&&r!==0?"trailing":t,t!=="trailing");return d.length<=1?h:d.map(m=>{const p={...h,properties:{...h.properties}};return p.children=[{type:"text",value:m}],i.includes(m)&&(this.addClassToHast(p,n[m]),delete p.properties.style),p})})})}}}function Y(e={}){const{classPrefix:n="__shiki_",classSuffix:t="",classReplacer:i=l=>l}=e,s=new Map;function o(l){return Object.entries(l).map(([a,r])=>`${a}:${r}`).join(";")}function c(l){const a=typeof l=="string"?l:o(l);let r=n+W(a)+t;return r=i(r),s.has(r)||s.set(r,typeof l=="string"?l:{...l}),r}return{name:"@shikijs/transformers:style-to-class",pre(l){if(!l.properties.style)return;const a=c(l.properties.style);delete l.properties.style,this.addClassToHast(l,a)},tokens(l){for(const a of l)for(const r of a){if(!r.htmlStyle)continue;const h=c(r.htmlStyle);r.htmlStyle={},r.htmlAttrs||={},r.htmlAttrs.class?r.htmlAttrs.class+=` ${h}`:r.htmlAttrs.class=h}},getClassRegistry(){return s},getCSS(){let l="";for(const[a,r]of s.entries())l+=`.${a}{${typeof r=="string"?r:o(r)}}`;return l},clearRegistry(){s.clear()}}}function W(e,n=0){let t=3735928559^n,i=1103547991^n;for(let s=0,o;s>>16,2246822507),t^=Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&i)+(t>>>0)).toString(36).slice(0,6)}export{A as createCommentNotationTransformer,j as parseMetaHighlightString,_ as parseMetaHighlightWords,B as transformerCompactLineOptions,D as transformerMetaHighlight,F as transformerMetaWordHighlight,V as transformerNotationDiff,q as transformerNotationErrorLevel,z as transformerNotationFocus,G as transformerNotationHighlight,y as transformerNotationMap,K as transformerNotationWordHighlight,Q as transformerRemoveLineBreak,U as transformerRemoveNotationEscape,X as transformerRenderWhitespace,Y as transformerStyleToClass}; diff --git a/pkg/cli/webapp/dist/assets/index-vBeBfY-6.js b/pkg/cli/webapp/dist/assets/index-vBeBfY-6.js new file mode 100644 index 0000000..d5f21bd --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-vBeBfY-6.js @@ -0,0 +1 @@ +const j=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class f{constructor(o,t,r){this.normal=t,this.property=o,r&&(this.space=r)}}f.prototype.normal={};f.prototype.property={};f.prototype.space=void 0;function P(l,o){const t={},r={};for(const c of l)Object.assign(t,c.property),Object.assign(r,c.normal);return new f(t,r,o)}function v(l){return l.toLowerCase()}class s{constructor(o,t){this.attribute=t,this.property=o}}s.prototype.attribute="";s.prototype.booleanish=!1;s.prototype.boolean=!1;s.prototype.commaOrSpaceSeparated=!1;s.prototype.commaSeparated=!1;s.prototype.defined=!1;s.prototype.mustUseProperty=!1;s.prototype.number=!1;s.prototype.overloadedBoolean=!1;s.prototype.property="";s.prototype.spaceSeparated=!1;s.prototype.space=void 0;let E=0;const e=h(),u=h(),k=h(),n=h(),a=h(),g=h(),p=h();function h(){return 2**++E}const b=Object.freeze(Object.defineProperty({__proto__:null,boolean:e,booleanish:u,commaOrSpaceSeparated:p,commaSeparated:g,number:n,overloadedBoolean:k,spaceSeparated:a},Symbol.toStringTag,{value:"Module"})),y=Object.keys(b);class S extends s{constructor(o,t,r,c){let i=-1;if(super(o,t),C(this,"space",c),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&B.test(o)){if(o.charAt(4)==="-"){const i=o.slice(5).replace(x,H);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=o.slice(4);if(!x.test(i)){let d=i.replace(z,I);d.charAt(0)!=="-"&&(d="-"+d),o="data"+d}}c=S}return new c(r,o)}function I(l){return"-"+l.toLowerCase()}function H(l){return l.charAt(1).toUpperCase()}const W=P([M,A,D,R,T],"html"),q=P([M,U,D,R,T],"svg");function K(l){const o=[],t=String(l||"");let r=t.indexOf(","),c=0,i=!1;for(;!i;){r===-1&&(r=t.length,i=!0);const d=t.slice(c,r).trim();(d||!i)&&o.push(d),c=r+1,r=t.indexOf(",",c)}return o}function N(l,o){const t=o||{};return(l[l.length-1]===""?[...l,""]:l).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function X(l){const o=String(l||"").trim();return o?o.split(/[ \t\n\r\f]+/g):[]}function Y(l){return l.join(" ").trim()}const F=/[ \t\n\f\r]/g;function _(l){return typeof l=="object"?l.type==="text"?w(l.value):!1:w(l)}function w(l){return l.replace(F,"")===""}export{N as a,Y as b,j as c,K as d,V as f,W as h,v as n,X as p,q as s,_ as w}; diff --git a/pkg/cli/webapp/dist/assets/index-yQy7CrM5.js b/pkg/cli/webapp/dist/assets/index-yQy7CrM5.js new file mode 100644 index 0000000..2d6901e --- /dev/null +++ b/pkg/cli/webapp/dist/assets/index-yQy7CrM5.js @@ -0,0 +1 @@ +import{e as s,s as o,t as r,a as n,L as P,i,c as a,f as Q,o as c}from"./index-Xjp-wlra.js";import"./index-Bz3KHWSS.js";import"./index-RgHATUD5.js";import"./index-DIIxsTGV.js";import"./index-C9q4Fmxx.js";import"./index-DINwPV8Q.js";const g=o({String:r.string,Number:r.number,"True False":r.bool,PropertyName:r.propertyName,Null:r.null,", :":r.separator,"[ ]":r.squareBracket,"{ }":r.brace}),p=s.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[g],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),S=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(O){if(!(O instanceof SyntaxError))throw O;const e=m(O,t.state.doc);return[{from:e,message:O.message,severity:"error",to:e}]}return[]};function m(t,O){let e;return(e=t.message.match(/at position (\d+)/))?Math.min(+e[1],O.length):(e=t.message.match(/at line (\d+) column (\d+)/))?Math.min(O.line(+e[1]).from+ +e[2]-1,O.length):0}const l=P.define({name:"json",parser:p.configure({props:[i.add({Object:a({except:/^\s*\}/}),Array:a({except:/^\s*\]/})}),Q.add({"Object Array":c})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function b(){return new n(l)}export{b as json,l as jsonLanguage,S as jsonParseLinter}; diff --git a/pkg/cli/webapp/dist/assets/java-xI-RfyKK.js b/pkg/cli/webapp/dist/assets/java-xI-RfyKK.js new file mode 100644 index 0000000..02569a4 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/java-xI-RfyKK.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse(`{"displayName":"Java","name":"java","patterns":[{"begin":"\\\\b(package)\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.other.package.java"}},"contentName":"storage.modifier.package.java","end":"\\\\s*(;)","endCaptures":{"1":{"name":"punctuation.terminator.java"}},"name":"meta.package.java","patterns":[{"include":"#comments"},{"match":"(?<=\\\\.)\\\\s*\\\\.|\\\\.(?=\\\\s*;)","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?","endCaptures":{"0":{"name":"punctuation.bracket.angle.java"}},"patterns":[{"match":"\\\\b(extends|super)\\\\b","name":"storage.modifier.$1.java"},{"captures":{"1":{"name":"storage.type.java"}},"match":"(?>>?|~|\\\\^)","name":"keyword.operator.bitwise.java"},{"match":"((&|\\\\^|\\\\||<<|>>>?)=)","name":"keyword.operator.assignment.bitwise.java"},{"match":"(===?|!=|<=|>=|<>|<|>)","name":"keyword.operator.comparison.java"},{"match":"([+*/%-]=)","name":"keyword.operator.assignment.arithmetic.java"},{"match":"(=)","name":"keyword.operator.assignment.java"},{"match":"(\\\\-\\\\-|\\\\+\\\\+)","name":"keyword.operator.increment-decrement.java"},{"match":"(\\\\-|\\\\+|\\\\*|\\\\/|%)","name":"keyword.operator.arithmetic.java"},{"match":"(!|&&|\\\\|\\\\|)","name":"keyword.operator.logical.java"},{"match":"(\\\\||&)","name":"keyword.operator.bitwise.java"},{"match":"\\\\b(const|goto)\\\\b","name":"keyword.reserved.java"}]},"lambda-expression":{"patterns":[{"match":"->","name":"storage.type.function.arrow.java"}]},"member-variables":{"begin":"(?=private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)","end":"(?=\\\\=|;)","patterns":[{"include":"#storage-modifiers"},{"include":"#variables"},{"include":"#primitive-arrays"},{"include":"#object-types"}]},"method-call":{"begin":"(\\\\.)\\\\s*([A-Za-z_$][\\\\w$]*)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"entity.name.function.java"},"3":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.method-call.java","patterns":[{"include":"#code"}]},"methods":{"begin":"(?!new)(?=[\\\\w<].*\\\\s+)(?=([^=/]|/(?!/))+\\\\()","end":"(})|(?=;)","endCaptures":{"1":{"name":"punctuation.section.method.end.bracket.curly.java"}},"name":"meta.method.java","patterns":[{"include":"#storage-modifiers"},{"begin":"(\\\\w+)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.java"},"2":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.method.identifier.java","patterns":[{"include":"#parameters"},{"include":"#parens"},{"include":"#comments"}]},{"include":"#generics"},{"begin":"(?=\\\\w.*\\\\s+\\\\w+\\\\s*\\\\()","end":"(?=\\\\s+\\\\w+\\\\s*\\\\()","name":"meta.method.return-type.java","patterns":[{"include":"#all-types"},{"include":"#parens"},{"include":"#comments"}]},{"include":"#throws"},{"begin":"{","beginCaptures":{"0":{"name":"punctuation.section.method.begin.bracket.curly.java"}},"contentName":"meta.method.body.java","end":"(?=})","patterns":[{"include":"#code"}]},{"include":"#comments"}]},"module":{"begin":"((open)\\\\s)?(module)\\\\s+(\\\\w+)","beginCaptures":{"1":{"name":"storage.modifier.java"},"3":{"name":"storage.modifier.java"},"4":{"name":"entity.name.type.module.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.module.end.bracket.curly.java"}},"name":"meta.module.java","patterns":[{"begin":"{","beginCaptures":{"0":{"name":"punctuation.section.module.begin.bracket.curly.java"}},"contentName":"meta.module.body.java","end":"(?=})","patterns":[{"include":"#comments"},{"include":"#comments-javadoc"},{"match":"\\\\b(requires|transitive|exports|opens|to|uses|provides|with)\\\\b","name":"keyword.module.java"}]}]},"numbers":{"patterns":[{"match":"\\\\b(?)?(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.java"},"2":{"name":"entity.name.type.record.java"},"3":{"patterns":[{"include":"#generics"}]},"4":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.record.identifier.java","patterns":[{"include":"#code"}]},{"begin":"(implements)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\s*\\\\{)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"include":"#record-body"}]},"record-body":{"begin":"{","beginCaptures":{"0":{"name":"punctuation.section.class.begin.bracket.curly.java"}},"end":"(?=})","name":"meta.record.body.java","patterns":[{"include":"#record-constructor"},{"include":"#class-body"}]},"record-constructor":{"begin":"(?!new)(?=[\\\\w<].*\\\\s+)(?=([^\\\\(=/]|/(?!/))+(?={))","end":"(})|(?=;)","endCaptures":{"1":{"name":"punctuation.section.method.end.bracket.curly.java"}},"name":"meta.method.java","patterns":[{"include":"#storage-modifiers"},{"begin":"(\\\\w+)","beginCaptures":{"1":{"name":"entity.name.function.java"}},"end":"(?=\\\\s*{)","name":"meta.method.identifier.java","patterns":[{"include":"#comments"}]},{"include":"#comments"},{"begin":"{","beginCaptures":{"0":{"name":"punctuation.section.method.begin.bracket.curly.java"}},"contentName":"meta.method.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},"static-initializer":{"patterns":[{"include":"#anonymous-block-and-instance-initializer"},{"match":"static","name":"storage.modifier.java"}]},"storage-modifiers":{"match":"\\\\b(public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|volatile|default|strictfp|sealed|non-sealed)\\\\b","name":"storage.modifier.java"},"strings":{"patterns":[{"begin":"\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"\\"\\"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.triple.java","patterns":[{"match":"(\\\\\\\\\\"\\"\\")(?!\\")|(\\\\\\\\.)","name":"constant.character.escape.java"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.double.java","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.java"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.single.java","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.java"}]}]},"throws":{"begin":"throws","beginCaptures":{"0":{"name":"storage.modifier.java"}},"end":"(?={|;)","name":"meta.throwables.java","patterns":[{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"[a-zA-Z$_][\\\\.a-zA-Z0-9$_]*","name":"storage.type.java"},{"include":"#comments"}]},"try-catch-finally":{"patterns":[{"begin":"\\\\btry\\\\b","beginCaptures":{"0":{"name":"keyword.control.try.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.try.end.bracket.curly.java"}},"name":"meta.try.java","patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.try.resources.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.try.resources.end.bracket.round.java"}},"name":"meta.try.resources.java","patterns":[{"include":"#code"}]},{"begin":"{","beginCaptures":{"0":{"name":"punctuation.section.try.begin.bracket.curly.java"}},"contentName":"meta.try.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},{"begin":"\\\\b(catch)\\\\b","beginCaptures":{"1":{"name":"keyword.control.catch.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.catch.end.bracket.curly.java"}},"name":"meta.catch.java","patterns":[{"include":"#comments"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"contentName":"meta.catch.parameters.java","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"patterns":[{"include":"#comments"},{"include":"#storage-modifiers"},{"begin":"[a-zA-Z$_][\\\\.a-zA-Z0-9$_]*","beginCaptures":{"0":{"name":"storage.type.java"}},"end":"(\\\\|)|(?=\\\\))","endCaptures":{"1":{"name":"punctuation.catch.separator.java"}},"patterns":[{"include":"#comments"},{"captures":{"0":{"name":"variable.parameter.java"}},"match":"\\\\w+"}]}]},{"begin":"{","beginCaptures":{"0":{"name":"punctuation.section.catch.begin.bracket.curly.java"}},"contentName":"meta.catch.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},{"begin":"\\\\bfinally\\\\b","beginCaptures":{"0":{"name":"keyword.control.finally.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.finally.end.bracket.curly.java"}},"name":"meta.finally.java","patterns":[{"begin":"{","beginCaptures":{"0":{"name":"punctuation.section.finally.begin.bracket.curly.java"}},"contentName":"meta.finally.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]}]},"variables":{"begin":"(?=\\\\b((void|boolean|byte|char|short|int|float|long|double)|(?>(\\\\w+\\\\.)*[A-Z_]+\\\\w*))\\\\b\\\\s*(<[\\\\w<>,\\\\.?\\\\s\\\\[\\\\]]*>)?\\\\s*((\\\\[\\\\])*)?\\\\s+[A-Za-z_$][\\\\w$]*([\\\\w\\\\[\\\\],$][\\\\w\\\\[\\\\],\\\\s]*)?\\\\s*(=|:|;))","end":"(?=\\\\=|:|;)","name":"meta.definition.variable.java","patterns":[{"captures":{"1":{"name":"variable.other.definition.java"}},"match":"([A-Za-z$_][\\\\w$]*)(?=\\\\s*(\\\\[\\\\])*\\\\s*(;|:|=|,))"},{"include":"#all-types"},{"include":"#code"}]},"variables-local":{"begin":"(?=\\\\b(var)\\\\b\\\\s+[A-Za-z_$][\\\\w$]*\\\\s*(=|:|;))","end":"(?=\\\\=|:|;)","name":"meta.definition.variable.local.java","patterns":[{"match":"\\\\bvar\\\\b","name":"storage.type.local.java"},{"captures":{"1":{"name":"variable.other.definition.java"}},"match":"([A-Za-z$_][\\\\w$]*)(?=\\\\s*(\\\\[\\\\])*\\\\s*(=|:|;))"},{"include":"#code"}]}},"scopeName":"source.java"}`)),a=[e];export{a as default}; diff --git a/pkg/cli/webapp/dist/assets/javascript-iXu5QeM3.js b/pkg/cli/webapp/dist/assets/javascript-iXu5QeM3.js new file mode 100644 index 0000000..08038ab --- /dev/null +++ b/pkg/cli/webapp/dist/assets/javascript-iXu5QeM3.js @@ -0,0 +1 @@ +function fr(x){var pr=x.statementIndent,ur=x.jsonld,br=x.json||ur,k=x.typescript,U=x.wordCharacters||/[\w$\xa1-\uffff]/,wr=(function(){function r(y){return{type:y,style:"keyword"}}var e=r("keyword a"),t=r("keyword b"),f=r("keyword c"),u=r("keyword d"),c=r("operator"),m={type:"atom",style:"atom"};return{if:r("if"),while:e,with:e,else:t,do:t,try:t,finally:t,return:u,break:u,continue:u,new:r("new"),delete:f,void:f,throw:f,debugger:r("debugger"),var:r("var"),const:r("var"),let:r("var"),function:r("function"),catch:r("catch"),for:r("for"),switch:r("switch"),case:r("case"),default:r("default"),in:c,typeof:c,instanceof:c,true:m,false:m,null:m,undefined:m,NaN:m,Infinity:m,this:r("this"),class:r("class"),super:r("atom"),yield:f,export:r("export"),import:r("import"),extends:f,await:f}})(),hr=/[+\-*&%=<>!?|~^@]/,Or=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function qr(r){for(var e=!1,t,f=!1;(t=r.next())!=null;){if(!e){if(t=="/"&&!f)return;t=="["?f=!0:f&&t=="]"&&(f=!1)}e=!e&&t=="\\"}}var D,G;function b(r,e,t){return D=r,G=t,e}function S(r,e){var t=r.next();if(t=='"'||t=="'")return e.tokenize=Nr(t),e.tokenize(r,e);if(t=="."&&r.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return b("number","number");if(t=="."&&r.match(".."))return b("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(t))return b(t);if(t=="="&&r.eat(">"))return b("=>","operator");if(t=="0"&&r.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return b("number","number");if(/\d/.test(t))return r.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),b("number","number");if(t=="/")return r.eat("*")?(e.tokenize=H,H(r,e)):r.eat("/")?(r.skipToEnd(),b("comment","comment")):ce(r,e,1)?(qr(r),r.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),b("regexp","string.special")):(r.eat("="),b("operator","operator",r.current()));if(t=="`")return e.tokenize=L,L(r,e);if(t=="#"&&r.peek()=="!")return r.skipToEnd(),b("meta","meta");if(t=="#"&&r.eatWhile(U))return b("variable","property");if(t=="<"&&r.match("!--")||t=="-"&&r.match("->")&&!/\S/.test(r.string.slice(0,r.start)))return r.skipToEnd(),b("comment","comment");if(hr.test(t))return(t!=">"||!e.lexical||e.lexical.type!=">")&&(r.eat("=")?(t=="!"||t=="=")&&r.eat("="):/[<>*+\-|&?]/.test(t)&&(r.eat(t),t==">"&&r.eat(t))),t=="?"&&r.eat(".")?b("."):b("operator","operator",r.current());if(U.test(t)){r.eatWhile(U);var f=r.current();if(e.lastType!="."){if(wr.propertyIsEnumerable(f)){var u=wr[f];return b(u.type,u.style,f)}if(f=="async"&&r.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return b("async","keyword",f)}return b("variable","variable",f)}}function Nr(r){return function(e,t){var f=!1,u;if(ur&&e.peek()=="@"&&e.match(Or))return t.tokenize=S,b("jsonld-keyword","meta");for(;(u=e.next())!=null&&!(u==r&&!f);)f=!f&&u=="\\";return f||(t.tokenize=S),b("string","string")}}function H(r,e){for(var t=!1,f;f=r.next();){if(f=="/"&&t){e.tokenize=S;break}t=f=="*"}return b("comment","comment")}function L(r,e){for(var t=!1,f;(f=r.next())!=null;){if(!t&&(f=="`"||f=="$"&&r.eat("{"))){e.tokenize=S;break}t=!t&&f=="\\"}return b("quasi","string.special",r.current())}var Br="([{}])";function ar(r,e){e.fatArrowAt&&(e.fatArrowAt=null);var t=r.string.indexOf("=>",r.start);if(!(t<0)){if(k){var f=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(r.string.slice(r.start,t));f&&(t=f.index)}for(var u=0,c=!1,m=t-1;m>=0;--m){var y=r.string.charAt(m),v=Br.indexOf(y);if(v>=0&&v<3){if(!u){++m;break}if(--u==0){y=="("&&(c=!0);break}}else if(v>=3&&v<6)++u;else if(U.test(y))c=!0;else if(/["'\/`]/.test(y))for(;;--m){if(m==0)return;var K=r.string.charAt(m-1);if(K==y&&r.string.charAt(m-2)!="\\"){m--;break}}else if(c&&!u){++m;break}}c&&!u&&(e.fatArrowAt=m)}}var Fr={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function xr(r,e,t,f,u,c){this.indented=r,this.column=e,this.type=t,this.prev=u,this.info=c,f!=null&&(this.align=f)}function Jr(r,e){for(var t=r.localVars;t;t=t.next)if(t.name==e)return!0;for(var f=r.context;f;f=f.prev)for(var t=f.vars;t;t=t.next)if(t.name==e)return!0}function Mr(r,e,t,f,u){var c=r.cc;for(i.state=r,i.stream=u,i.marked=null,i.cc=c,i.style=e,r.lexical.hasOwnProperty("align")||(r.lexical.align=!0);;){var m=c.length?c.pop():br?p:w;if(m(t,f)){for(;c.length&&c[c.length-1].lex;)c.pop()();return i.marked?i.marked:t=="variable"&&Jr(r,f)?"variableName.local":e}}}var i={state:null,marked:null,cc:null};function o(){for(var r=arguments.length-1;r>=0;r--)i.cc.push(arguments[r])}function n(){return o.apply(null,arguments),!0}function or(r,e){for(var t=e;t;t=t.next)if(t.name==r)return!0;return!1}function q(r){var e=i.state;if(i.marked="def",e.context){if(e.lexical.info=="var"&&e.context&&e.context.block){var t=gr(r,e.context);if(t!=null){e.context=t;return}}else if(!or(r,e.localVars)){e.localVars=new Q(r,e.localVars);return}}x.globalVars&&!or(r,e.globalVars)&&(e.globalVars=new Q(r,e.globalVars))}function gr(r,e){if(e)if(e.block){var t=gr(r,e.prev);return t?t==e.prev?e:new P(t,e.vars,!0):null}else return or(r,e.vars)?e:new P(e.prev,new Q(r,e.vars),!1);else return null}function X(r){return r=="public"||r=="private"||r=="protected"||r=="abstract"||r=="readonly"}function P(r,e,t){this.prev=r,this.vars=e,this.block=t}function Q(r,e){this.name=r,this.next=e}var Dr=new Q("this",new Q("arguments",null));function E(){i.state.context=new P(i.state.context,i.state.localVars,!1),i.state.localVars=Dr}function Y(){i.state.context=new P(i.state.context,i.state.localVars,!0),i.state.localVars=null}E.lex=Y.lex=!0;function T(){i.state.localVars=i.state.context.vars,i.state.context=i.state.context.prev}T.lex=!0;function s(r,e){var t=function(){var f=i.state,u=f.indented;if(f.lexical.type=="stat")u=f.lexical.indented;else for(var c=f.lexical;c&&c.type==")"&&c.align;c=c.prev)u=c.indented;f.lexical=new xr(u,i.stream.column(),r,null,f.lexical,e)};return t.lex=!0,t}function a(){var r=i.state;r.lexical.prev&&(r.lexical.type==")"&&(r.indented=r.lexical.indented),r.lexical=r.lexical.prev)}a.lex=!0;function l(r){function e(t){return t==r?n():r==";"||t=="}"||t==")"||t=="]"?o():n(e)}return e}function w(r,e){return r=="var"?n(s("vardef",e),mr,l(";"),a):r=="keyword a"?n(s("form"),sr,w,a):r=="keyword b"?n(s("form"),w,a):r=="keyword d"?i.stream.match(/^\s*$/,!1)?n():n(s("stat"),N,l(";"),a):r=="debugger"?n(l(";")):r=="{"?n(s("}"),Y,rr,a,T):r==";"?n():r=="if"?(i.state.lexical.info=="else"&&i.state.cc[i.state.cc.length-1]==a&&i.state.cc.pop()(),n(s("form"),sr,w,a,jr)):r=="function"?n(_):r=="for"?n(s("form"),Y,zr,w,T,a):r=="class"||k&&e=="interface"?(i.marked="keyword",n(s("form",r=="class"?r:e),Sr,a)):r=="variable"?k&&e=="declare"?(i.marked="keyword",n(w)):k&&(e=="module"||e=="enum"||e=="type")&&i.stream.match(/^\s*\w/,!1)?(i.marked="keyword",e=="enum"?n($r):e=="type"?n(_r,l("operator"),d,l(";")):n(s("form"),V,l("{"),s("}"),rr,a,a)):k&&e=="namespace"?(i.marked="keyword",n(s("form"),p,w,a)):k&&e=="abstract"?(i.marked="keyword",n(w)):n(s("stat"),Kr):r=="switch"?n(s("form"),sr,l("{"),s("}","switch"),Y,rr,a,a,T):r=="case"?n(p,l(":")):r=="default"?n(l(":")):r=="catch"?n(s("form"),E,Lr,w,a,T):r=="export"?n(s("stat"),fe,a):r=="import"?n(s("stat"),ue,a):r=="async"?n(w):e=="@"?n(p,w):o(s("stat"),p,l(";"),a)}function Lr(r){if(r=="(")return n(O,l(")"))}function p(r,e){return yr(r,e,!1)}function g(r,e){return yr(r,e,!0)}function sr(r){return r!="("?o():n(s(")"),N,l(")"),a)}function yr(r,e,t){if(i.state.fatArrowAt==i.stream.start){var f=t?Tr:vr;if(r=="(")return n(E,s(")"),h(O,")"),a,l("=>"),f,T);if(r=="variable")return o(E,V,l("=>"),f,T)}var u=t?B:I;return Fr.hasOwnProperty(r)?n(u):r=="function"?n(_,u):r=="class"||k&&e=="interface"?(i.marked="keyword",n(s("form"),ie,a)):r=="keyword c"||r=="async"?n(t?g:p):r=="("?n(s(")"),N,l(")"),a,u):r=="operator"||r=="spread"?n(t?g:p):r=="["?n(s("]"),oe,a,u):r=="{"?R(C,"}",null,u):r=="quasi"?o(Z,u):r=="new"?n(Qr(t)):n()}function N(r){return r.match(/[;\}\)\],]/)?o():o(p)}function I(r,e){return r==","?n(N):B(r,e,!1)}function B(r,e,t){var f=t==!1?I:B,u=t==!1?p:g;if(r=="=>")return n(E,t?Tr:vr,T);if(r=="operator")return/\+\+|--/.test(e)||k&&e=="!"?n(f):k&&e=="<"&&i.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?n(s(">"),h(d,">"),a,f):e=="?"?n(p,l(":"),u):n(u);if(r=="quasi")return o(Z,f);if(r!=";"){if(r=="(")return R(g,")","call",f);if(r==".")return n(Ur,f);if(r=="[")return n(s("]"),N,l("]"),a,f);if(k&&e=="as")return i.marked="keyword",n(d,f);if(r=="regexp")return i.state.lastType=i.marked="operator",i.stream.backUp(i.stream.pos-i.stream.start-1),n(u)}}function Z(r,e){return r!="quasi"?o():e.slice(e.length-2)!="${"?n(Z):n(N,Pr)}function Pr(r){if(r=="}")return i.marked="string.special",i.state.tokenize=L,n(Z)}function vr(r){return ar(i.stream,i.state),o(r=="{"?w:p)}function Tr(r){return ar(i.stream,i.state),o(r=="{"?w:g)}function Qr(r){return function(e){return e=="."?n(r?Wr:Rr):e=="variable"&&k?n(Cr,r?B:I):o(r?g:p)}}function Rr(r,e){if(e=="target")return i.marked="keyword",n(I)}function Wr(r,e){if(e=="target")return i.marked="keyword",n(B)}function Kr(r){return r==":"?n(a,w):o(I,l(";"),a)}function Ur(r){if(r=="variable")return i.marked="property",n()}function C(r,e){if(r=="async")return i.marked="property",n(C);if(r=="variable"||i.style=="keyword"){if(i.marked="property",e=="get"||e=="set")return n(Gr);var t;return k&&i.state.fatArrowAt==i.stream.start&&(t=i.stream.match(/^\s*:\s*/,!1))&&(i.state.fatArrowAt=i.stream.pos+t[0].length),n($)}else{if(r=="number"||r=="string")return i.marked=ur?"property":i.style+" property",n($);if(r=="jsonld-keyword")return n($);if(k&&X(e))return i.marked="keyword",n(C);if(r=="[")return n(p,F,l("]"),$);if(r=="spread")return n(g,$);if(e=="*")return i.marked="keyword",n(C);if(r==":")return o($)}}function Gr(r){return r!="variable"?o($):(i.marked="property",n(_))}function $(r){if(r==":")return n(g);if(r=="(")return o(_)}function h(r,e,t){function f(u,c){if(t?t.indexOf(u)>-1:u==","){var m=i.state.lexical;return m.info=="call"&&(m.pos=(m.pos||0)+1),n(function(y,v){return y==e||v==e?o():o(r)},f)}return u==e||c==e?n():t&&t.indexOf(";")>-1?o(r):n(l(e))}return function(u,c){return u==e||c==e?n():o(r,f)}}function R(r,e,t){for(var f=3;f"),d);if(r=="quasi")return o(cr,A)}function Yr(r){if(r=="=>")return n(d)}function lr(r){return r.match(/[\}\)\]]/)?n():r==","||r==";"?n(lr):o(W,lr)}function W(r,e){if(r=="variable"||i.style=="keyword")return i.marked="property",n(W);if(e=="?"||r=="number"||r=="string")return n(W);if(r==":")return n(d);if(r=="[")return n(l("variable"),Hr,l("]"),W);if(r=="(")return o(M,W);if(!r.match(/[;\}\)\],]/))return n()}function cr(r,e){return r!="quasi"?o():e.slice(e.length-2)!="${"?n(cr):n(d,Zr)}function Zr(r){if(r=="}")return i.marked="string.special",i.state.tokenize=L,n(cr)}function dr(r,e){return r=="variable"&&i.stream.match(/^\s*[?:]/,!1)||e=="?"?n(dr):r==":"?n(d):r=="spread"?n(dr):o(d)}function A(r,e){if(e=="<")return n(s(">"),h(d,">"),a,A);if(e=="|"||r=="."||e=="&")return n(d);if(r=="[")return n(d,l("]"),A);if(e=="extends"||e=="implements")return i.marked="keyword",n(d);if(e=="?")return n(d,l(":"),d)}function Cr(r,e){if(e=="<")return n(s(">"),h(d,">"),a,A)}function er(){return o(d,re)}function re(r,e){if(e=="=")return n(d)}function mr(r,e){return e=="enum"?(i.marked="keyword",n($r)):o(V,F,z,ne)}function V(r,e){if(k&&X(e))return i.marked="keyword",n(V);if(r=="variable")return q(e),n();if(r=="spread")return n(V);if(r=="[")return R(ee,"]");if(r=="{")return R(Ar,"}")}function Ar(r,e){return r=="variable"&&!i.stream.match(/^\s*:/,!1)?(q(e),n(z)):(r=="variable"&&(i.marked="property"),r=="spread"?n(V):r=="}"?o():r=="["?n(p,l("]"),l(":"),Ar):n(l(":"),V,z))}function ee(){return o(V,z)}function z(r,e){if(e=="=")return n(g)}function ne(r){if(r==",")return n(mr)}function jr(r,e){if(r=="keyword b"&&e=="else")return n(s("form","else"),w,a)}function zr(r,e){if(e=="await")return n(zr);if(r=="(")return n(s(")"),te,a)}function te(r){return r=="var"?n(mr,J):r=="variable"?n(J):o(J)}function J(r,e){return r==")"?n():r==";"?n(J):e=="in"||e=="of"?(i.marked="keyword",n(p,J)):o(p,J)}function _(r,e){if(e=="*")return i.marked="keyword",n(_);if(r=="variable")return q(e),n(_);if(r=="(")return n(E,s(")"),h(O,")"),a,Vr,w,T);if(k&&e=="<")return n(s(">"),h(er,">"),a,_)}function M(r,e){if(e=="*")return i.marked="keyword",n(M);if(r=="variable")return q(e),n(M);if(r=="(")return n(E,s(")"),h(O,")"),a,Vr,T);if(k&&e=="<")return n(s(">"),h(er,">"),a,M)}function _r(r,e){if(r=="keyword"||r=="variable")return i.marked="type",n(_r);if(e=="<")return n(s(">"),h(er,">"),a)}function O(r,e){return e=="@"&&n(p,O),r=="spread"?n(O):k&&X(e)?(i.marked="keyword",n(O)):k&&r=="this"?n(F,z):o(V,F,z)}function ie(r,e){return r=="variable"?Sr(r,e):nr(r,e)}function Sr(r,e){if(r=="variable")return q(e),n(nr)}function nr(r,e){if(e=="<")return n(s(">"),h(er,">"),a,nr);if(e=="extends"||e=="implements"||k&&r==",")return e=="implements"&&(i.marked="keyword"),n(k?d:p,nr);if(r=="{")return n(s("}"),j,a)}function j(r,e){if(r=="async"||r=="variable"&&(e=="static"||e=="get"||e=="set"||k&&X(e))&&i.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return i.marked="keyword",n(j);if(r=="variable"||i.style=="keyword")return i.marked="property",n(tr,j);if(r=="number"||r=="string")return n(tr,j);if(r=="[")return n(p,F,l("]"),tr,j);if(e=="*")return i.marked="keyword",n(j);if(k&&r=="(")return o(M,j);if(r==";"||r==",")return n(j);if(r=="}")return n();if(e=="@")return n(p,j)}function tr(r,e){if(e=="!"||e=="?")return n(tr);if(r==":")return n(d,z);if(e=="=")return n(g);var t=i.state.lexical.prev,f=t&&t.info=="interface";return o(f?M:_)}function fe(r,e){return e=="*"?(i.marked="keyword",n(kr,l(";"))):e=="default"?(i.marked="keyword",n(p,l(";"))):r=="{"?n(h(Er,"}"),kr,l(";")):o(w)}function Er(r,e){if(e=="as")return i.marked="keyword",n(l("variable"));if(r=="variable")return o(g,Er)}function ue(r){return r=="string"?n():r=="("?o(p):r=="."?o(I):o(ir,Ir,kr)}function ir(r,e){return r=="{"?R(ir,"}"):(r=="variable"&&q(e),e=="*"&&(i.marked="keyword"),n(ae))}function Ir(r){if(r==",")return n(ir,Ir)}function ae(r,e){if(e=="as")return i.marked="keyword",n(ir)}function kr(r,e){if(e=="from")return i.marked="keyword",n(p)}function oe(r){return r=="]"?n():o(h(g,"]"))}function $r(){return o(s("form"),V,l("{"),s("}"),h(se,"}"),a,a)}function se(){return o(V,z)}function le(r,e){return r.lastType=="operator"||r.lastType==","||hr.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function ce(r,e,t){return e.tokenize==S&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||e.lastType=="quasi"&&/\{\s*$/.test(r.string.slice(0,r.pos-t))}return{name:x.name,startState:function(r){var e={tokenize:S,lastType:"sof",cc:[],lexical:new xr(-r,0,"block",!1),localVars:x.localVars,context:x.localVars&&new P(null,null,!1),indented:0};return x.globalVars&&typeof x.globalVars=="object"&&(e.globalVars=x.globalVars),e},token:function(r,e){if(r.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=r.indentation(),ar(r,e)),e.tokenize!=H&&r.eatSpace())return null;var t=e.tokenize(r,e);return D=="comment"?t:(e.lastType=D=="operator"&&(G=="++"||G=="--")?"incdec":D,Mr(e,t,D,G,r))},indent:function(r,e,t){if(r.tokenize==H||r.tokenize==L)return null;if(r.tokenize!=S)return 0;var f=e&&e.charAt(0),u=r.lexical,c;if(!/^\s*else\b/.test(e))for(var m=r.cc.length-1;m>=0;--m){var y=r.cc[m];if(y==a)u=u.prev;else if(y!=jr&&y!=T)break}for(;(u.type=="stat"||u.type=="form")&&(f=="}"||(c=r.cc[r.cc.length-1])&&(c==I||c==B)&&!/^[,\.=+\-*:?[\(]/.test(e));)u=u.prev;pr&&u.type==")"&&u.prev.type=="stat"&&(u=u.prev);var v=u.type,K=f==v;return v=="vardef"?u.indented+(r.lastType=="operator"||r.lastType==","?u.info.length+1:0):v=="form"&&f=="{"?u.indented:v=="form"?u.indented+t.unit:v=="stat"?u.indented+(le(r,e)?pr||t.unit:0):u.info=="switch"&&!K&&x.doubleIndentSwitch!=!1?u.indented+(/^(?:case|default)\b/.test(e)?t.unit:2*t.unit):u.align?u.column+(K?0:1):u.indented+(K?0:t.unit)},languageData:{indentOnInput:/^\s*(?:case .*?:|default:|\{|\})$/,commentTokens:br?void 0:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]},wordChars:"$"}}}const de=fr({name:"javascript"}),me=fr({name:"json",json:!0}),ke=fr({name:"json",jsonld:!0}),pe=fr({name:"typescript",typescript:!0});export{de as javascript,me as json,ke as jsonld,pe as typescript}; diff --git a/pkg/cli/webapp/dist/assets/javascript-ySlJ1b_l.js b/pkg/cli/webapp/dist/assets/javascript-ySlJ1b_l.js new file mode 100644 index 0000000..d2b7de7 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/javascript-ySlJ1b_l.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse(`{"displayName":"JavaScript","name":"javascript","patterns":[{"include":"#directives"},{"include":"#statements"},{"include":"#shebang"}],"repository":{"access-modifier":{"match":"(?]|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^yield|[^\\\\._$[:alnum:]]yield|^throw|[^\\\\._$[:alnum:]]throw|^in|[^\\\\._$[:alnum:]]in|^of|[^\\\\._$[:alnum:]]of|^typeof|[^\\\\._$[:alnum:]]typeof|&&|\\\\|\\\\||\\\\*)\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.block.js"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.block.js"}},"name":"meta.objectliteral.js","patterns":[{"include":"#object-member"}]},"array-binding-pattern":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.js"},"2":{"name":"punctuation.definition.binding-pattern.array.js"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.js"}},"patterns":[{"include":"#binding-element"},{"include":"#punctuation-comma"}]},"array-binding-pattern-const":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.js"},"2":{"name":"punctuation.definition.binding-pattern.array.js"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.js"}},"patterns":[{"include":"#binding-element-const"},{"include":"#punctuation-comma"}]},"array-literal":{"begin":"\\\\s*(\\\\[)","beginCaptures":{"1":{"name":"meta.brace.square.js"}},"end":"\\\\]","endCaptures":{"0":{"name":"meta.brace.square.js"}},"name":"meta.array.literal.js","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}]},"arrow-function":{"patterns":[{"captures":{"1":{"name":"storage.modifier.async.js"},"2":{"name":"variable.parameter.js"}},"match":"(?:(?)","name":"meta.arrow.js"},{"begin":"(?:(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]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\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>)))","beginCaptures":{"1":{"name":"storage.modifier.async.js"}},"end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","name":"meta.arrow.js","patterns":[{"include":"#comment"},{"include":"#type-parameters"},{"include":"#function-parameters"},{"include":"#arrow-return-type"},{"include":"#possibly-arrow-return-type"}]},{"begin":"=>","beginCaptures":{"0":{"name":"storage.type.function.arrow.js"}},"end":"((?<=\\\\}|\\\\S)(?)|((?!\\\\{)(?=\\\\S)))(?!\\\\/[\\\\/\\\\*])","name":"meta.arrow.js","patterns":[{"include":"#single-line-comment-consuming-line-ending"},{"include":"#decl-block"},{"include":"#expression"}]}]},"arrow-return-type":{"begin":"(?<=\\\\))\\\\s*(:)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.js"}},"end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","name":"meta.return.type.arrow.js","patterns":[{"include":"#arrow-return-type-body"}]},"arrow-return-type-body":{"patterns":[{"begin":"(?<=[:])(?=\\\\s*\\\\{)","end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"include":"#type-predicate-operator"},{"include":"#type"}]},"async-modifier":{"match":"(?\\\\s*$)","beginCaptures":{"1":{"name":"punctuation.definition.comment.js"}},"end":"(?=$)","name":"comment.line.triple-slash.directive.js","patterns":[{"begin":"(<)(reference|amd-dependency|amd-module)","beginCaptures":{"1":{"name":"punctuation.definition.tag.directive.js"},"2":{"name":"entity.name.tag.directive.js"}},"end":"/>","endCaptures":{"0":{"name":"punctuation.definition.tag.directive.js"}},"name":"meta.tag.js","patterns":[{"match":"path|types|no-default-lib|lib|name|resolution-mode","name":"entity.other.attribute-name.directive.js"},{"match":"=","name":"keyword.operator.assignment.js"},{"include":"#string"}]}]},"docblock":{"patterns":[{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"constant.language.access-type.jsdoc"}},"match":"((@)(?:access|api))\\\\s+(private|protected|public)\\\\b"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"},"4":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"5":{"name":"constant.other.email.link.underline.jsdoc"},"6":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}},"match":"((@)author)\\\\s+([^@\\\\s<>*/](?:[^@<>*/]|\\\\*[^/])*)(?:\\\\s*(<)([^>\\\\s]+)(>))?"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"},"4":{"name":"keyword.operator.control.jsdoc"},"5":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)borrows)\\\\s+((?:[^@\\\\s*/]|\\\\*[^/])+)\\\\s+(as)\\\\s+((?:[^@\\\\s*/]|\\\\*[^/])+)"},{"begin":"((@)example)\\\\s+","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=@|\\\\*/)","name":"meta.example.jsdoc","patterns":[{"match":"^\\\\s\\\\*\\\\s+"},{"begin":"\\\\G(<)caption(>)","beginCaptures":{"0":{"name":"entity.name.tag.inline.jsdoc"},"1":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"2":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}},"contentName":"constant.other.description.jsdoc","end":"()|(?=\\\\*/)","endCaptures":{"0":{"name":"entity.name.tag.inline.jsdoc"},"1":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"2":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}}},{"captures":{"0":{"name":"source.embedded.js"}},"match":"[^\\\\s@*](?:[^*]|\\\\*[^/])*"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"constant.language.symbol-type.jsdoc"}},"match":"((@)kind)\\\\s+(class|constant|event|external|file|function|member|mixin|module|namespace|typedef)\\\\b"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.link.underline.jsdoc"},"4":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)see)\\\\s+(?:((?=https?://)(?:[^\\\\s*]|\\\\*[^/])+)|((?!https?://|(?:\\\\[[^\\\\[\\\\]]*\\\\])?{@(?:link|linkcode|linkplain|tutorial)\\\\b)(?:[^@\\\\s*/]|\\\\*[^/])+))"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)template)\\\\s+([A-Za-z_$][\\\\w$.\\\\[\\\\]]*(?:\\\\s*,\\\\s*[A-Za-z_$][\\\\w$.\\\\[\\\\]]*)*)"},{"begin":"((@)template)\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)","name":"variable.other.jsdoc"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)(?:arg|argument|const|constant|member|namespace|param|var))\\\\s+([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)"},{"begin":"((@)typedef)\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"(?:[^@\\\\s*/]|\\\\*[^/])+","name":"entity.name.type.instance.jsdoc"}]},{"begin":"((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)","name":"variable.other.jsdoc"},{"captures":{"1":{"name":"punctuation.definition.optional-value.begin.bracket.square.jsdoc"},"2":{"name":"keyword.operator.assignment.jsdoc"},"3":{"name":"source.embedded.js"},"4":{"name":"punctuation.definition.optional-value.end.bracket.square.jsdoc"},"5":{"name":"invalid.illegal.syntax.jsdoc"}},"match":"(\\\\[)\\\\s*[\\\\w$]+(?:(?:\\\\[\\\\])?\\\\.[\\\\w$]+)*(?:\\\\s*(=)\\\\s*((?>\\"(?:(?:\\\\*(?!/))|(?:\\\\\\\\(?!\\"))|[^*\\\\\\\\])*?\\"|'(?:(?:\\\\*(?!/))|(?:\\\\\\\\(?!'))|[^*\\\\\\\\])*?'|\\\\[(?:(?:\\\\*(?!/))|[^*])*?\\\\]|(?:(?:\\\\*(?!/))|\\\\s(?!\\\\s*\\\\])|\\\\[.*?(?:\\\\]|(?=\\\\*/))|[^*\\\\s\\\\[\\\\]])*)*))?\\\\s*(?:(\\\\])((?:[^*\\\\s]|\\\\*[^\\\\s/])+)?|(?=\\\\*/))","name":"variable.other.jsdoc"}]},{"begin":"((@)(?:define|enum|exception|export|extends|lends|implements|modifies|namespace|private|protected|returns?|satisfies|suppress|this|throws|type|yields?))\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)(?:alias|augments|callback|constructs|emits|event|fires|exports?|extends|external|function|func|host|lends|listens|interface|memberof!?|method|module|mixes|mixin|name|requires|see|this|typedef|uses))\\\\s+((?:[^{}@\\\\s*]|\\\\*[^/])+)"},{"begin":"((@)(?:default(?:value)?|license|version))\\\\s+(([''\\"]))","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"},"4":{"name":"punctuation.definition.string.begin.jsdoc"}},"contentName":"variable.other.jsdoc","end":"(\\\\3)|(?=$|\\\\*/)","endCaptures":{"0":{"name":"variable.other.jsdoc"},"1":{"name":"punctuation.definition.string.end.jsdoc"}}},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)(?:default(?:value)?|license|tutorial|variation|version))\\\\s+([^\\\\s*]+)"},{"captures":{"1":{"name":"punctuation.definition.block.tag.jsdoc"}},"match":"(@)(?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception|exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func|function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce|yields?)\\\\b","name":"storage.type.class.jsdoc"},{"include":"#inline-tags"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"match":"((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\\\s+)"}]},"enum-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\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\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"captures":{"1":{"name":"storage.modifier.js"},"2":{"name":"keyword.operator.rest.js"},"3":{"name":"variable.parameter.js variable.language.this.js"},"4":{"name":"variable.parameter.js"},"5":{"name":"keyword.operator.optional.js"}},"match":"(?:(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|((?>=|>>>=|\\\\|=","name":"keyword.operator.assignment.compound.bitwise.js"},{"match":"<<|>>>|>>","name":"keyword.operator.bitwise.shift.js"},{"match":"===|!==|==|!=","name":"keyword.operator.comparison.js"},{"match":"<=|>=|<>|<|>","name":"keyword.operator.relational.js"},{"captures":{"1":{"name":"keyword.operator.logical.js"},"2":{"name":"keyword.operator.assignment.compound.js"},"3":{"name":"keyword.operator.arithmetic.js"}},"match":"(?<=[_$[:alnum:]])(\\\\!)\\\\s*(?:(/=)|(?:(/)(?![/*])))"},{"match":"\\\\!|&&|\\\\|\\\\||\\\\?\\\\?","name":"keyword.operator.logical.js"},{"match":"\\\\&|~|\\\\^|\\\\|","name":"keyword.operator.bitwise.js"},{"match":"\\\\=","name":"keyword.operator.assignment.js"},{"match":"--","name":"keyword.operator.decrement.js"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.js"},{"match":"%|\\\\*|/|-|\\\\+","name":"keyword.operator.arithmetic.js"},{"begin":"(?<=[_$[:alnum:])\\\\]])\\\\s*(?=(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)+(?:(/=)|(?:(/)(?![/*]))))","end":"(?:(/=)|(?:(/)(?!\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/)))","endCaptures":{"1":{"name":"keyword.operator.assignment.compound.js"},"2":{"name":"keyword.operator.arithmetic.js"}},"patterns":[{"include":"#comment"}]},{"captures":{"1":{"name":"keyword.operator.assignment.compound.js"},"2":{"name":"keyword.operator.arithmetic.js"}},"match":"(?<=[_$[:alnum:])\\\\]])\\\\s*(?:(/=)|(?:(/)(?![/*])))"}]},"expressionPunctuations":{"patterns":[{"include":"#punctuation-comma"},{"include":"#punctuation-accessor"}]},"expressionWithoutIdentifiers":{"patterns":[{"include":"#jsx"},{"include":"#string"},{"include":"#regex"},{"include":"#comment"},{"include":"#function-expression"},{"include":"#class-expression"},{"include":"#arrow-function"},{"include":"#paren-expression-possibly-arrow"},{"include":"#cast"},{"include":"#ternary-expression"},{"include":"#new-expr"},{"include":"#instanceof-expr"},{"include":"#object-literal"},{"include":"#expression-operators"},{"include":"#function-call"},{"include":"#literal"},{"include":"#support-objects"},{"include":"#paren-expression"}]},"field-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]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])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"match":"\\\\#?[_$[:alpha:]][_$[:alnum:]]*","name":"meta.definition.property.js variable.object.property.js"},{"match":"\\\\?","name":"keyword.operator.optional.js"},{"match":"\\\\!","name":"keyword.operator.definiteassignment.js"}]},"for-loop":{"begin":"(?\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\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\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\\\\())","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))","end":"(?=\\\\s*(?:(\\\\?\\\\.\\\\s*)|(\\\\!))?((<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[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|)))))(([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\\\\())","name":"meta.function-call.js","patterns":[{"include":"#function-call-target"}]},{"include":"#comment"},{"include":"#function-call-optionals"},{"include":"#type-arguments"},{"include":"#paren-expression"}]},{"begin":"(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\\\)]))(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","end":"(?<=\\\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\\\)]))(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))","end":"(?=(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","name":"meta.function-call.js","patterns":[{"include":"#function-call-target"}]},{"include":"#comment"},{"include":"#function-call-optionals"},{"include":"#type-arguments"}]}]},"function-call-optionals":{"patterns":[{"match":"\\\\?\\\\.","name":"meta.function-call.js punctuation.accessor.optional.js"},{"match":"\\\\!","name":"meta.function-call.js keyword.operator.definiteassignment.js"}]},"function-call-target":{"patterns":[{"include":"#support-function-call-identifiers"},{"match":"(\\\\#?[_$[:alpha:]][_$[:alnum:]]*)","name":"entity.name.function.js"}]},"function-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<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\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>)))))"},{"captures":{"1":{"name":"punctuation.accessor.js"},"2":{"name":"punctuation.accessor.optional.js"},"3":{"name":"variable.other.constant.property.js"}},"match":"(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))\\\\s*(\\\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.js"},"2":{"name":"punctuation.accessor.optional.js"},"3":{"name":"variable.other.property.js"}},"match":"(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*)"},{"match":"([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])","name":"variable.other.constant.js"},{"match":"[_$[:alpha:]][_$[:alnum:]]*","name":"variable.other.readwrite.js"}]},"if-statement":{"patterns":[{"begin":"(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|(===|!==|==|!=)|(([\\\\&\\\\~\\\\^\\\\|]\\\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\\\s+instanceof(?![_$[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.)))|((?))","end":"(/>)|(?:())","endCaptures":{"1":{"name":"punctuation.definition.tag.end.js"},"2":{"name":"punctuation.definition.tag.begin.js"},"3":{"name":"entity.name.tag.namespace.js"},"4":{"name":"punctuation.separator.namespace.js"},"5":{"name":"entity.name.tag.js"},"6":{"name":"support.class.component.js"},"7":{"name":"punctuation.definition.tag.end.js"}},"name":"meta.tag.js","patterns":[{"begin":"(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.js"},"2":{"name":"entity.name.tag.namespace.js"},"3":{"name":"punctuation.separator.namespace.js"},"4":{"name":"entity.name.tag.js"},"5":{"name":"support.class.component.js"}},"end":"(?=[/]?>)","patterns":[{"include":"#comment"},{"include":"#type-arguments"},{"include":"#jsx-tag-attributes"}]},{"begin":"(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.end.js"}},"contentName":"meta.jsx.children.js","end":"(?=|/\\\\*|//)"},"jsx-tag-attributes":{"begin":"\\\\s+","end":"(?=[/]?>)","name":"meta.tag.attributes.js","patterns":[{"include":"#comment"},{"include":"#jsx-tag-attribute-name"},{"include":"#jsx-tag-attribute-assignment"},{"include":"#jsx-string-double-quoted"},{"include":"#jsx-string-single-quoted"},{"include":"#jsx-evaluated-code"},{"include":"#jsx-tag-attributes-illegal"}]},"jsx-tag-attributes-illegal":{"match":"\\\\S+","name":"invalid.illegal.attribute.js"},"jsx-tag-in-expression":{"begin":"(?:*]|&&|\\\\|\\\\||\\\\?|\\\\*\\\\/|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^default|[^\\\\._$[:alnum:]]default|^yield|[^\\\\._$[:alnum:]]yield|^)\\\\s*(?!<\\\\s*[_$[:alpha:]][_$[:alnum:]]*((\\\\s+extends\\\\s+[^=>])|,))(?=(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","end":"(?!(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","patterns":[{"include":"#jsx-tag"}]},"jsx-tag-without-attributes":{"begin":"(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.js"},"2":{"name":"entity.name.tag.namespace.js"},"3":{"name":"punctuation.separator.namespace.js"},"4":{"name":"entity.name.tag.js"},"5":{"name":"support.class.component.js"},"6":{"name":"punctuation.definition.tag.end.js"}},"contentName":"meta.jsx.children.js","end":"()","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.js"},"2":{"name":"entity.name.tag.namespace.js"},"3":{"name":"punctuation.separator.namespace.js"},"4":{"name":"entity.name.tag.js"},"5":{"name":"support.class.component.js"},"6":{"name":"punctuation.definition.tag.end.js"}},"name":"meta.tag.without-attributes.js","patterns":[{"include":"#jsx-children"}]},"jsx-tag-without-attributes-in-expression":{"begin":"(?:*]|&&|\\\\|\\\\||\\\\?|\\\\*\\\\/|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^default|[^\\\\._$[:alnum:]]default|^yield|[^\\\\._$[:alnum:]]yield|^)\\\\s*(?=(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","end":"(?!(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","patterns":[{"include":"#jsx-tag-without-attributes"}]},"label":{"patterns":[{"begin":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(:)(?=\\\\s*\\\\{)","beginCaptures":{"1":{"name":"entity.name.label.js"},"2":{"name":"punctuation.separator.label.js"}},"end":"(?<=\\\\})","patterns":[{"include":"#decl-block"}]},{"captures":{"1":{"name":"entity.name.label.js"},"2":{"name":"punctuation.separator.label.js"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(:)"}]},"literal":{"patterns":[{"include":"#numeric-literal"},{"include":"#boolean-literal"},{"include":"#null-literal"},{"include":"#undefined-literal"},{"include":"#numericConstant-literal"},{"include":"#array-literal"},{"include":"#this-literal"},{"include":"#super-literal"}]},"method-declaration":{"patterns":[{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.js"},"2":{"name":"storage.modifier.js"},"3":{"name":"storage.modifier.js"},"4":{"name":"storage.modifier.async.js"},"5":{"name":"keyword.operator.new.js"},"6":{"name":"keyword.generator.asterisk.js"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","name":"meta.method.declaration.js","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"}]},{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.js"},"2":{"name":"storage.modifier.js"},"3":{"name":"storage.modifier.js"},"4":{"name":"storage.modifier.async.js"},"5":{"name":"storage.type.property.js"},"6":{"name":"keyword.generator.asterisk.js"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","name":"meta.method.declaration.js","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"}]}]},"method-declaration-name":{"begin":"(?=((\\\\b(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|((?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.async.js"},"2":{"name":"storage.type.property.js"},"3":{"name":"keyword.generator.asterisk.js"}},"end":"(?=\\\\}|;|,)|(?<=\\\\})","name":"meta.method.declaration.js","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"},{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.async.js"},"2":{"name":"storage.type.property.js"},"3":{"name":"keyword.generator.asterisk.js"}},"end":"(?=\\\\(|\\\\<)","patterns":[{"include":"#method-declaration-name"}]}]},"object-member":{"patterns":[{"include":"#comment"},{"include":"#object-literal-method-declaration"},{"begin":"(?=\\\\[)","end":"(?=:)|((?<=[\\\\]])(?=\\\\s*[\\\\(\\\\<]))","name":"meta.object.member.js meta.object-literal.key.js","patterns":[{"include":"#comment"},{"include":"#array-literal"}]},{"begin":"(?=[\\\\'\\\\\\"\\\\\`])","end":"(?=:)|((?<=[\\\\'\\\\\\"\\\\\`])(?=((\\\\s*[\\\\(\\\\<,}])|(\\\\s+(as|satisifies)\\\\s+))))","name":"meta.object.member.js meta.object-literal.key.js","patterns":[{"include":"#comment"},{"include":"#string"}]},{"begin":"(?=(\\\\b(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\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\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","name":"meta.object.member.js"},{"captures":{"0":{"name":"meta.object-literal.key.js"}},"match":"(?:[_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?=(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*:)","name":"meta.object.member.js"},{"begin":"\\\\.\\\\.\\\\.","beginCaptures":{"0":{"name":"keyword.operator.spread.js"}},"end":"(?=,|\\\\})","name":"meta.object.member.js","patterns":[{"include":"#expression"}]},{"captures":{"1":{"name":"variable.other.readwrite.js"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?=,|\\\\}|$|\\\\/\\\\/|\\\\/\\\\*)","name":"meta.object.member.js"},{"captures":{"1":{"name":"keyword.control.as.js"},"2":{"name":"storage.modifier.js"}},"match":"(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|^|((?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)\\\\(\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.js"}},"end":"(?<=\\\\))","patterns":[{"include":"#type-parameters"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.js"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]}]},{"begin":"(?<=:)\\\\s*(async)?\\\\s*(\\\\()(?=\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.js"},"2":{"name":"meta.brace.round.js"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]},{"begin":"(?<=:)\\\\s*(async)?\\\\s*(?=\\\\<\\\\s*$)","beginCaptures":{"1":{"name":"storage.modifier.async.js"}},"end":"(?<=\\\\>)","patterns":[{"include":"#type-parameters"}]},{"begin":"(?<=\\\\>)\\\\s*(\\\\()(?=\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"meta.brace.round.js"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]},{"include":"#possibly-arrow-return-type"},{"include":"#expression"}]},{"include":"#punctuation-comma"},{"include":"#decl-block"}]},"parameter-array-binding-pattern":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.js"},"2":{"name":"punctuation.definition.binding-pattern.array.js"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.js"}},"patterns":[{"include":"#parameter-binding-element"},{"include":"#punctuation-comma"}]},"parameter-binding-element":{"patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#numeric-literal"},{"include":"#regex"},{"include":"#parameter-object-binding-pattern"},{"include":"#parameter-array-binding-pattern"},{"include":"#destructuring-parameter-rest"},{"include":"#variable-initializer"}]},"parameter-name":{"patterns":[{"captures":{"1":{"name":"storage.modifier.js"}},"match":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\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\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"captures":{"1":{"name":"storage.modifier.js"},"2":{"name":"keyword.operator.rest.js"},"3":{"name":"variable.parameter.js variable.language.this.js"},"4":{"name":"variable.parameter.js"},"5":{"name":"keyword.operator.optional.js"}},"match":"(?:(?])","name":"meta.type.annotation.js","patterns":[{"include":"#type"}]}]},"paren-expression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.js"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js"}},"patterns":[{"include":"#expression"}]},"paren-expression-possibly-arrow":{"patterns":[{"begin":"(?<=[(=,])\\\\s*(async)?(?=\\\\s*((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?\\\\(\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.js"}},"end":"(?<=\\\\))","patterns":[{"include":"#paren-expression-possibly-arrow-with-typeparameters"}]},{"begin":"(?<=[(=,]|=>|^return|[^\\\\._$[:alnum:]]return)\\\\s*(async)?(?=\\\\s*((((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\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<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)))\\\\s*$)","beginCaptures":{"1":{"name":"storage.modifier.async.js"}},"end":"(?<=\\\\))","patterns":[{"include":"#paren-expression-possibly-arrow-with-typeparameters"}]},{"include":"#possibly-arrow-return-type"}]},"paren-expression-possibly-arrow-with-typeparameters":{"patterns":[{"include":"#type-parameters"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.js"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]}]},"possibly-arrow-return-type":{"begin":"(?<=\\\\)|^)\\\\s*(:)(?=\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*=>)","beginCaptures":{"1":{"name":"meta.arrow.js meta.return.type.arrow.js keyword.operator.type.annotation.js"}},"contentName":"meta.arrow.js meta.return.type.arrow.js","end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","patterns":[{"include":"#arrow-return-type-body"}]},"property-accessor":{"match":"(?|&&|\\\\|\\\\||\\\\*\\\\/)\\\\s*(\\\\/)(?![\\\\/*])(?=(?:[^\\\\/\\\\\\\\\\\\[\\\\()]|\\\\\\\\.|\\\\[([^\\\\]\\\\\\\\]|\\\\\\\\.)+\\\\]|\\\\(([^\\\\)\\\\\\\\]|\\\\\\\\.)+\\\\))+\\\\/([dgimsuvy]+|(?![\\\\/\\\\*])|(?=\\\\/\\\\*))(?!\\\\s*[a-zA-Z0-9_$]))","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.js"}},"end":"(/)([dgimsuvy]*)","endCaptures":{"1":{"name":"punctuation.definition.string.end.js"},"2":{"name":"keyword.other.js"}},"name":"string.regexp.js","patterns":[{"include":"#regexp"}]},{"begin":"((?"},{"match":"[?+*]|\\\\{(\\\\d+,\\\\d+|\\\\d+,|,\\\\d+|\\\\d+)\\\\}\\\\??","name":"keyword.operator.quantifier.regexp"},{"match":"\\\\|","name":"keyword.operator.or.regexp"},{"begin":"(\\\\()((\\\\?=)|(\\\\?!)|(\\\\?<=)|(\\\\?))?","beginCaptures":{"0":{"name":"punctuation.definition.group.regexp"},"1":{"name":"punctuation.definition.group.no-capture.regexp"},"2":{"name":"variable.other.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.regexp","patterns":[{"include":"#regexp"}]},{"begin":"(\\\\[)(\\\\^)?","beginCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"},"2":{"name":"keyword.operator.negation.regexp"}},"end":"(\\\\])","endCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"}},"name":"constant.other.character-class.set.regexp","patterns":[{"captures":{"1":{"name":"constant.character.numeric.regexp"},"2":{"name":"constant.character.control.regexp"},"3":{"name":"constant.character.escape.backslash.regexp"},"4":{"name":"constant.character.numeric.regexp"},"5":{"name":"constant.character.control.regexp"},"6":{"name":"constant.character.escape.backslash.regexp"}},"match":"(?:.|(\\\\\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\\\\\c[A-Z])|(\\\\\\\\.))\\\\-(?:[^\\\\]\\\\\\\\]|(\\\\\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\\\\\c[A-Z])|(\\\\\\\\.))","name":"constant.other.character-class.range.regexp"},{"include":"#regex-character-class"}]},{"include":"#regex-character-class"}]},"return-type":{"patterns":[{"begin":"(?<=\\\\))\\\\s*(:)(?=\\\\s*\\\\S)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.js"}},"end":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\())|(?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\\\b(?!\\\\$)))"},{"captures":{"1":{"name":"support.type.object.module.js"},"2":{"name":"support.type.object.module.js"},"3":{"name":"punctuation.accessor.js"},"4":{"name":"punctuation.accessor.optional.js"},"5":{"name":"support.type.object.module.js"}},"match":"(?\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\`)","end":"(?=\`)","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\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(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([_$[:alpha:]][_$[:alnum:]]*)","name":"entity.name.function.tagged-template.js"}]},{"include":"#type-arguments"}]},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\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|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)\`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.js"}},"end":"(?=\`)","patterns":[{"include":"#type-arguments"}]}]},"template-substitution-element":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.js"}},"contentName":"meta.embedded.line.js","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.js"}},"name":"meta.template.expression.js","patterns":[{"include":"#expression"}]},"template-type":{"patterns":[{"include":"#template-call"},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)?(\`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.js"},"2":{"name":"string.template.js punctuation.definition.string.template.begin.js"}},"contentName":"string.template.js","end":"\`","endCaptures":{"0":{"name":"string.template.js punctuation.definition.string.template.end.js"}},"patterns":[{"include":"#template-type-substitution-element"},{"include":"#string-character-escape"}]}]},"template-type-substitution-element":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.js"}},"contentName":"meta.embedded.line.js","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.js"}},"name":"meta.template.expression.js","patterns":[{"include":"#type"}]},"ternary-expression":{"begin":"(?!\\\\?\\\\.\\\\s*[^[:digit:]])(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.js"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.js"}},"patterns":[{"include":"#expression"}]},"this-literal":{"match":"(?])|((?<=[\\\\}>\\\\]\\\\)]|[_$[:alpha:]])\\\\s*(?=\\\\{)))","name":"meta.type.annotation.js","patterns":[{"include":"#type"}]},{"begin":"(:)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.js"}},"end":"(?])|(?=^\\\\s*$)|((?<=[\\\\}>\\\\]\\\\)]|[_$[:alpha:]])\\\\s*(?=\\\\{)))","name":"meta.type.annotation.js","patterns":[{"include":"#type"}]}]},"type-arguments":{"begin":"\\\\<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.js"}},"end":"\\\\>","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.js"}},"name":"meta.type.parameters.js","patterns":[{"include":"#type-arguments-body"}]},"type-arguments-body":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.js"}},"match":"(?)","patterns":[{"include":"#comment"},{"include":"#type-parameters"}]},{"begin":"(?))))))","end":"(?<=\\\\))","name":"meta.type.function.js","patterns":[{"include":"#function-parameters"}]}]},"type-function-return-type":{"patterns":[{"begin":"(=>)(?=\\\\s*\\\\S)","beginCaptures":{"1":{"name":"storage.type.function.arrow.js"}},"end":"(?)(?:\\\\?]|//|$)","name":"meta.type.function.return.js","patterns":[{"include":"#type-function-return-type-core"}]},{"begin":"=>","beginCaptures":{"0":{"name":"storage.type.function.arrow.js"}},"end":"(?)(?]|//|^\\\\s*$)|((?<=\\\\S)(?=\\\\s*$)))","name":"meta.type.function.return.js","patterns":[{"include":"#type-function-return-type-core"}]}]},"type-function-return-type-core":{"patterns":[{"include":"#comment"},{"begin":"(?<==>)(?=\\\\s*\\\\{)","end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"include":"#type-predicate-operator"},{"include":"#type"}]},"type-infer":{"patterns":[{"captures":{"1":{"name":"keyword.operator.expression.infer.js"},"2":{"name":"entity.name.type.js"},"3":{"name":"keyword.operator.expression.extends.js"}},"match":"(?)","endCaptures":{"1":{"name":"meta.type.parameters.js punctuation.definition.typeparameters.end.js"}},"patterns":[{"include":"#type-arguments-body"}]},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(<)","beginCaptures":{"1":{"name":"entity.name.type.js"},"2":{"name":"meta.type.parameters.js punctuation.definition.typeparameters.begin.js"}},"contentName":"meta.type.parameters.js","end":"(>)","endCaptures":{"1":{"name":"meta.type.parameters.js punctuation.definition.typeparameters.end.js"}},"patterns":[{"include":"#type-arguments-body"}]},{"captures":{"1":{"name":"entity.name.type.module.js"},"2":{"name":"punctuation.accessor.js"},"3":{"name":"punctuation.accessor.optional.js"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))"},{"match":"[_$[:alpha:]][_$[:alnum:]]*","name":"entity.name.type.js"}]},"type-object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.js"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.block.js"}},"name":"meta.object.type.js","patterns":[{"include":"#comment"},{"include":"#method-declaration"},{"include":"#indexer-declaration"},{"include":"#indexer-mapped-type-declaration"},{"include":"#field-declaration"},{"include":"#type-annotation"},{"begin":"\\\\.\\\\.\\\\.","beginCaptures":{"0":{"name":"keyword.operator.spread.js"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","patterns":[{"include":"#type"}]},{"include":"#punctuation-comma"},{"include":"#punctuation-semicolon"},{"include":"#type"}]},"type-operators":{"patterns":[{"include":"#typeof-operator"},{"include":"#type-infer"},{"begin":"([&|])(?=\\\\s*\\\\{)","beginCaptures":{"0":{"name":"keyword.operator.type.js"}},"end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"begin":"[&|]","beginCaptures":{"0":{"name":"keyword.operator.type.js"}},"end":"(?=\\\\S)"},{"match":"(?)","endCaptures":{"1":{"name":"punctuation.definition.typeparameters.end.js"}},"name":"meta.type.parameters.js","patterns":[{"include":"#comment"},{"match":"(?)","name":"keyword.operator.assignment.js"}]},"type-paren-or-function-parameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.js"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js"}},"name":"meta.type.paren.cover.js","patterns":[{"captures":{"1":{"name":"storage.modifier.js"},"2":{"name":"keyword.operator.rest.js"},"3":{"name":"entity.name.function.js variable.language.this.js"},"4":{"name":"entity.name.function.js"},"5":{"name":"keyword.operator.optional.js"}},"match":"(?:(?)))))))|(:\\\\s*(?\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))))"},{"captures":{"1":{"name":"storage.modifier.js"},"2":{"name":"keyword.operator.rest.js"},"3":{"name":"variable.parameter.js variable.language.this.js"},"4":{"name":"variable.parameter.js"},"5":{"name":"keyword.operator.optional.js"}},"match":"(?:(?:&|{\\\\?]|(extends\\\\s+)|$|;|^\\\\s*$|(?:^\\\\s*(?:abstract|async|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|var|while)\\\\b))","patterns":[{"include":"#type-arguments"},{"include":"#expression"}]},"undefined-literal":{"match":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\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\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","beginCaptures":{"1":{"name":"meta.definition.variable.js variable.other.constant.js entity.name.function.js"}},"end":"(?=$|^|[;,=}]|((?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([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}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","beginCaptures":{"1":{"name":"meta.definition.variable.js entity.name.function.js"},"2":{"name":"keyword.operator.definiteassignment.js"}},"end":"(?=$|^|[;,=}]|((?\\\\s*$)","beginCaptures":{"1":{"name":"keyword.operator.assignment.js"}},"end":"(?=$|^|[,);}\\\\]]|((?]|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^yield|[^\\\\._$[:alnum:]]yield|^throw|[^\\\\._$[:alnum:]]throw|^in|[^\\\\._$[:alnum:]]in|^of|[^\\\\._$[:alnum:]]of|^typeof|[^\\\\._$[:alnum:]]typeof|&&|\\\\|\\\\||\\\\*)\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.block.js.jsx"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.block.js.jsx"}},"name":"meta.objectliteral.js.jsx","patterns":[{"include":"#object-member"}]},"array-binding-pattern":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.js.jsx"},"2":{"name":"punctuation.definition.binding-pattern.array.js.jsx"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.js.jsx"}},"patterns":[{"include":"#binding-element"},{"include":"#punctuation-comma"}]},"array-binding-pattern-const":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.js.jsx"},"2":{"name":"punctuation.definition.binding-pattern.array.js.jsx"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.js.jsx"}},"patterns":[{"include":"#binding-element-const"},{"include":"#punctuation-comma"}]},"array-literal":{"begin":"\\\\s*(\\\\[)","beginCaptures":{"1":{"name":"meta.brace.square.js.jsx"}},"end":"\\\\]","endCaptures":{"0":{"name":"meta.brace.square.js.jsx"}},"name":"meta.array.literal.js.jsx","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}]},"arrow-function":{"patterns":[{"captures":{"1":{"name":"storage.modifier.async.js.jsx"},"2":{"name":"variable.parameter.js.jsx"}},"match":"(?:(?)","name":"meta.arrow.js.jsx"},{"begin":"(?:(?]|=[^<]|\\\\<\\\\s*(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|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>)))","beginCaptures":{"1":{"name":"storage.modifier.async.js.jsx"}},"end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","name":"meta.arrow.js.jsx","patterns":[{"include":"#comment"},{"include":"#type-parameters"},{"include":"#function-parameters"},{"include":"#arrow-return-type"},{"include":"#possibly-arrow-return-type"}]},{"begin":"=>","beginCaptures":{"0":{"name":"storage.type.function.arrow.js.jsx"}},"end":"((?<=\\\\}|\\\\S)(?)|((?!\\\\{)(?=\\\\S)))(?!\\\\/[\\\\/\\\\*])","name":"meta.arrow.js.jsx","patterns":[{"include":"#single-line-comment-consuming-line-ending"},{"include":"#decl-block"},{"include":"#expression"}]}]},"arrow-return-type":{"begin":"(?<=\\\\))\\\\s*(:)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.js.jsx"}},"end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","name":"meta.return.type.arrow.js.jsx","patterns":[{"include":"#arrow-return-type-body"}]},"arrow-return-type-body":{"patterns":[{"begin":"(?<=[:])(?=\\\\s*\\\\{)","end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"include":"#type-predicate-operator"},{"include":"#type"}]},"async-modifier":{"match":"(?\\\\s*$)","beginCaptures":{"1":{"name":"punctuation.definition.comment.js.jsx"}},"end":"(?=$)","name":"comment.line.triple-slash.directive.js.jsx","patterns":[{"begin":"(<)(reference|amd-dependency|amd-module)","beginCaptures":{"1":{"name":"punctuation.definition.tag.directive.js.jsx"},"2":{"name":"entity.name.tag.directive.js.jsx"}},"end":"/>","endCaptures":{"0":{"name":"punctuation.definition.tag.directive.js.jsx"}},"name":"meta.tag.js.jsx","patterns":[{"match":"path|types|no-default-lib|lib|name|resolution-mode","name":"entity.other.attribute-name.directive.js.jsx"},{"match":"=","name":"keyword.operator.assignment.js.jsx"},{"include":"#string"}]}]},"docblock":{"patterns":[{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"constant.language.access-type.jsdoc"}},"match":"((@)(?:access|api))\\\\s+(private|protected|public)\\\\b"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"},"4":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"5":{"name":"constant.other.email.link.underline.jsdoc"},"6":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}},"match":"((@)author)\\\\s+([^@\\\\s<>*/](?:[^@<>*/]|\\\\*[^/])*)(?:\\\\s*(<)([^>\\\\s]+)(>))?"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"},"4":{"name":"keyword.operator.control.jsdoc"},"5":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)borrows)\\\\s+((?:[^@\\\\s*/]|\\\\*[^/])+)\\\\s+(as)\\\\s+((?:[^@\\\\s*/]|\\\\*[^/])+)"},{"begin":"((@)example)\\\\s+","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=@|\\\\*/)","name":"meta.example.jsdoc","patterns":[{"match":"^\\\\s\\\\*\\\\s+"},{"begin":"\\\\G(<)caption(>)","beginCaptures":{"0":{"name":"entity.name.tag.inline.jsdoc"},"1":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"2":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}},"contentName":"constant.other.description.jsdoc","end":"()|(?=\\\\*/)","endCaptures":{"0":{"name":"entity.name.tag.inline.jsdoc"},"1":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"2":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}}},{"captures":{"0":{"name":"source.embedded.js.jsx"}},"match":"[^\\\\s@*](?:[^*]|\\\\*[^/])*"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"constant.language.symbol-type.jsdoc"}},"match":"((@)kind)\\\\s+(class|constant|event|external|file|function|member|mixin|module|namespace|typedef)\\\\b"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.link.underline.jsdoc"},"4":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)see)\\\\s+(?:((?=https?://)(?:[^\\\\s*]|\\\\*[^/])+)|((?!https?://|(?:\\\\[[^\\\\[\\\\]]*\\\\])?{@(?:link|linkcode|linkplain|tutorial)\\\\b)(?:[^@\\\\s*/]|\\\\*[^/])+))"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)template)\\\\s+([A-Za-z_$][\\\\w$.\\\\[\\\\]]*(?:\\\\s*,\\\\s*[A-Za-z_$][\\\\w$.\\\\[\\\\]]*)*)"},{"begin":"((@)template)\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)","name":"variable.other.jsdoc"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)(?:arg|argument|const|constant|member|namespace|param|var))\\\\s+([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)"},{"begin":"((@)typedef)\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"(?:[^@\\\\s*/]|\\\\*[^/])+","name":"entity.name.type.instance.jsdoc"}]},{"begin":"((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)","name":"variable.other.jsdoc"},{"captures":{"1":{"name":"punctuation.definition.optional-value.begin.bracket.square.jsdoc"},"2":{"name":"keyword.operator.assignment.jsdoc"},"3":{"name":"source.embedded.js.jsx"},"4":{"name":"punctuation.definition.optional-value.end.bracket.square.jsdoc"},"5":{"name":"invalid.illegal.syntax.jsdoc"}},"match":"(\\\\[)\\\\s*[\\\\w$]+(?:(?:\\\\[\\\\])?\\\\.[\\\\w$]+)*(?:\\\\s*(=)\\\\s*((?>\\"(?:(?:\\\\*(?!/))|(?:\\\\\\\\(?!\\"))|[^*\\\\\\\\])*?\\"|'(?:(?:\\\\*(?!/))|(?:\\\\\\\\(?!'))|[^*\\\\\\\\])*?'|\\\\[(?:(?:\\\\*(?!/))|[^*])*?\\\\]|(?:(?:\\\\*(?!/))|\\\\s(?!\\\\s*\\\\])|\\\\[.*?(?:\\\\]|(?=\\\\*/))|[^*\\\\s\\\\[\\\\]])*)*))?\\\\s*(?:(\\\\])((?:[^*\\\\s]|\\\\*[^\\\\s/])+)?|(?=\\\\*/))","name":"variable.other.jsdoc"}]},{"begin":"((@)(?:define|enum|exception|export|extends|lends|implements|modifies|namespace|private|protected|returns?|satisfies|suppress|this|throws|type|yields?))\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)(?:alias|augments|callback|constructs|emits|event|fires|exports?|extends|external|function|func|host|lends|listens|interface|memberof!?|method|module|mixes|mixin|name|requires|see|this|typedef|uses))\\\\s+((?:[^{}@\\\\s*]|\\\\*[^/])+)"},{"begin":"((@)(?:default(?:value)?|license|version))\\\\s+(([''\\"]))","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"},"4":{"name":"punctuation.definition.string.begin.jsdoc"}},"contentName":"variable.other.jsdoc","end":"(\\\\3)|(?=$|\\\\*/)","endCaptures":{"0":{"name":"variable.other.jsdoc"},"1":{"name":"punctuation.definition.string.end.jsdoc"}}},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)(?:default(?:value)?|license|tutorial|variation|version))\\\\s+([^\\\\s*]+)"},{"captures":{"1":{"name":"punctuation.definition.block.tag.jsdoc"}},"match":"(@)(?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception|exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func|function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce|yields?)\\\\b","name":"storage.type.class.jsdoc"},{"include":"#inline-tags"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"match":"((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\\\s+)"}]},"enum-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\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\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"captures":{"1":{"name":"storage.modifier.js.jsx"},"2":{"name":"keyword.operator.rest.js.jsx"},"3":{"name":"variable.parameter.js.jsx variable.language.this.js.jsx"},"4":{"name":"variable.parameter.js.jsx"},"5":{"name":"keyword.operator.optional.js.jsx"}},"match":"(?:(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|((?>=|>>>=|\\\\|=","name":"keyword.operator.assignment.compound.bitwise.js.jsx"},{"match":"<<|>>>|>>","name":"keyword.operator.bitwise.shift.js.jsx"},{"match":"===|!==|==|!=","name":"keyword.operator.comparison.js.jsx"},{"match":"<=|>=|<>|<|>","name":"keyword.operator.relational.js.jsx"},{"captures":{"1":{"name":"keyword.operator.logical.js.jsx"},"2":{"name":"keyword.operator.assignment.compound.js.jsx"},"3":{"name":"keyword.operator.arithmetic.js.jsx"}},"match":"(?<=[_$[:alnum:]])(\\\\!)\\\\s*(?:(/=)|(?:(/)(?![/*])))"},{"match":"\\\\!|&&|\\\\|\\\\||\\\\?\\\\?","name":"keyword.operator.logical.js.jsx"},{"match":"\\\\&|~|\\\\^|\\\\|","name":"keyword.operator.bitwise.js.jsx"},{"match":"\\\\=","name":"keyword.operator.assignment.js.jsx"},{"match":"--","name":"keyword.operator.decrement.js.jsx"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.js.jsx"},{"match":"%|\\\\*|/|-|\\\\+","name":"keyword.operator.arithmetic.js.jsx"},{"begin":"(?<=[_$[:alnum:])\\\\]])\\\\s*(?=(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)+(?:(/=)|(?:(/)(?![/*]))))","end":"(?:(/=)|(?:(/)(?!\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/)))","endCaptures":{"1":{"name":"keyword.operator.assignment.compound.js.jsx"},"2":{"name":"keyword.operator.arithmetic.js.jsx"}},"patterns":[{"include":"#comment"}]},{"captures":{"1":{"name":"keyword.operator.assignment.compound.js.jsx"},"2":{"name":"keyword.operator.arithmetic.js.jsx"}},"match":"(?<=[_$[:alnum:])\\\\]])\\\\s*(?:(/=)|(?:(/)(?![/*])))"}]},"expressionPunctuations":{"patterns":[{"include":"#punctuation-comma"},{"include":"#punctuation-accessor"}]},"expressionWithoutIdentifiers":{"patterns":[{"include":"#jsx"},{"include":"#string"},{"include":"#regex"},{"include":"#comment"},{"include":"#function-expression"},{"include":"#class-expression"},{"include":"#arrow-function"},{"include":"#paren-expression-possibly-arrow"},{"include":"#cast"},{"include":"#ternary-expression"},{"include":"#new-expr"},{"include":"#instanceof-expr"},{"include":"#object-literal"},{"include":"#expression-operators"},{"include":"#function-call"},{"include":"#literal"},{"include":"#support-objects"},{"include":"#paren-expression"}]},"field-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\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*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"match":"\\\\#?[_$[:alpha:]][_$[:alnum:]]*","name":"meta.definition.property.js.jsx variable.object.property.js.jsx"},{"match":"\\\\?","name":"keyword.operator.optional.js.jsx"},{"match":"\\\\!","name":"keyword.operator.definiteassignment.js.jsx"}]},"for-loop":{"begin":"(?\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]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(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\\\\())","end":"(?<=\\\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\\\)]))\\\\s*(?:(\\\\?\\\\.\\\\s*)|(\\\\!))?((<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(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\\\\>)*(?))*(?)*(?\\\\s*)?\\\\())","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))","end":"(?=\\\\s*(?:(\\\\?\\\\.\\\\s*)|(\\\\!))?((<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\\\\())","name":"meta.function-call.js.jsx","patterns":[{"include":"#function-call-target"}]},{"include":"#comment"},{"include":"#function-call-optionals"},{"include":"#type-arguments"},{"include":"#paren-expression"}]},{"begin":"(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\\\)]))(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","end":"(?<=\\\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\\\)]))(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))","end":"(?=(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","name":"meta.function-call.js.jsx","patterns":[{"include":"#function-call-target"}]},{"include":"#comment"},{"include":"#function-call-optionals"},{"include":"#type-arguments"}]}]},"function-call-optionals":{"patterns":[{"match":"\\\\?\\\\.","name":"meta.function-call.js.jsx punctuation.accessor.optional.js.jsx"},{"match":"\\\\!","name":"meta.function-call.js.jsx keyword.operator.definiteassignment.js.jsx"}]},"function-call-target":{"patterns":[{"include":"#support-function-call-identifiers"},{"match":"(\\\\#?[_$[:alpha:]][_$[:alnum:]]*)","name":"entity.name.function.js.jsx"}]},"function-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*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$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>)))))"},{"captures":{"1":{"name":"punctuation.accessor.js.jsx"},"2":{"name":"punctuation.accessor.optional.js.jsx"},"3":{"name":"variable.other.constant.property.js.jsx"}},"match":"(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))\\\\s*(\\\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.js.jsx"},"2":{"name":"punctuation.accessor.optional.js.jsx"},"3":{"name":"variable.other.property.js.jsx"}},"match":"(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*)"},{"match":"([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])","name":"variable.other.constant.js.jsx"},{"match":"[_$[:alpha:]][_$[:alnum:]]*","name":"variable.other.readwrite.js.jsx"}]},"if-statement":{"patterns":[{"begin":"(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|(===|!==|==|!=)|(([\\\\&\\\\~\\\\^\\\\|]\\\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\\\s+instanceof(?![_$[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.)))|((?))","end":"(/>)|(?:())","endCaptures":{"1":{"name":"punctuation.definition.tag.end.js.jsx"},"2":{"name":"punctuation.definition.tag.begin.js.jsx"},"3":{"name":"entity.name.tag.namespace.js.jsx"},"4":{"name":"punctuation.separator.namespace.js.jsx"},"5":{"name":"entity.name.tag.js.jsx"},"6":{"name":"support.class.component.js.jsx"},"7":{"name":"punctuation.definition.tag.end.js.jsx"}},"name":"meta.tag.js.jsx","patterns":[{"begin":"(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.js.jsx"},"2":{"name":"entity.name.tag.namespace.js.jsx"},"3":{"name":"punctuation.separator.namespace.js.jsx"},"4":{"name":"entity.name.tag.js.jsx"},"5":{"name":"support.class.component.js.jsx"}},"end":"(?=[/]?>)","patterns":[{"include":"#comment"},{"include":"#type-arguments"},{"include":"#jsx-tag-attributes"}]},{"begin":"(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.end.js.jsx"}},"contentName":"meta.jsx.children.js.jsx","end":"(?=|/\\\\*|//)"},"jsx-tag-attributes":{"begin":"\\\\s+","end":"(?=[/]?>)","name":"meta.tag.attributes.js.jsx","patterns":[{"include":"#comment"},{"include":"#jsx-tag-attribute-name"},{"include":"#jsx-tag-attribute-assignment"},{"include":"#jsx-string-double-quoted"},{"include":"#jsx-string-single-quoted"},{"include":"#jsx-evaluated-code"},{"include":"#jsx-tag-attributes-illegal"}]},"jsx-tag-attributes-illegal":{"match":"\\\\S+","name":"invalid.illegal.attribute.js.jsx"},"jsx-tag-in-expression":{"begin":"(?:*]|&&|\\\\|\\\\||\\\\?|\\\\*\\\\/|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^default|[^\\\\._$[:alnum:]]default|^yield|[^\\\\._$[:alnum:]]yield|^)\\\\s*(?!<\\\\s*[_$[:alpha:]][_$[:alnum:]]*((\\\\s+extends\\\\s+[^=>])|,))(?=(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","end":"(?!(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","patterns":[{"include":"#jsx-tag"}]},"jsx-tag-without-attributes":{"begin":"(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.js.jsx"},"2":{"name":"entity.name.tag.namespace.js.jsx"},"3":{"name":"punctuation.separator.namespace.js.jsx"},"4":{"name":"entity.name.tag.js.jsx"},"5":{"name":"support.class.component.js.jsx"},"6":{"name":"punctuation.definition.tag.end.js.jsx"}},"contentName":"meta.jsx.children.js.jsx","end":"()","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.js.jsx"},"2":{"name":"entity.name.tag.namespace.js.jsx"},"3":{"name":"punctuation.separator.namespace.js.jsx"},"4":{"name":"entity.name.tag.js.jsx"},"5":{"name":"support.class.component.js.jsx"},"6":{"name":"punctuation.definition.tag.end.js.jsx"}},"name":"meta.tag.without-attributes.js.jsx","patterns":[{"include":"#jsx-children"}]},"jsx-tag-without-attributes-in-expression":{"begin":"(?:*]|&&|\\\\|\\\\||\\\\?|\\\\*\\\\/|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^default|[^\\\\._$[:alnum:]]default|^yield|[^\\\\._$[:alnum:]]yield|^)\\\\s*(?=(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","end":"(?!(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","patterns":[{"include":"#jsx-tag-without-attributes"}]},"label":{"patterns":[{"begin":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(:)(?=\\\\s*\\\\{)","beginCaptures":{"1":{"name":"entity.name.label.js.jsx"},"2":{"name":"punctuation.separator.label.js.jsx"}},"end":"(?<=\\\\})","patterns":[{"include":"#decl-block"}]},{"captures":{"1":{"name":"entity.name.label.js.jsx"},"2":{"name":"punctuation.separator.label.js.jsx"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(:)"}]},"literal":{"patterns":[{"include":"#numeric-literal"},{"include":"#boolean-literal"},{"include":"#null-literal"},{"include":"#undefined-literal"},{"include":"#numericConstant-literal"},{"include":"#array-literal"},{"include":"#this-literal"},{"include":"#super-literal"}]},"method-declaration":{"patterns":[{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.js.jsx"},"2":{"name":"storage.modifier.js.jsx"},"3":{"name":"storage.modifier.js.jsx"},"4":{"name":"storage.modifier.async.js.jsx"},"5":{"name":"keyword.operator.new.js.jsx"},"6":{"name":"keyword.generator.asterisk.js.jsx"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","name":"meta.method.declaration.js.jsx","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"}]},{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.js.jsx"},"2":{"name":"storage.modifier.js.jsx"},"3":{"name":"storage.modifier.js.jsx"},"4":{"name":"storage.modifier.async.js.jsx"},"5":{"name":"storage.type.property.js.jsx"},"6":{"name":"keyword.generator.asterisk.js.jsx"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","name":"meta.method.declaration.js.jsx","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"}]}]},"method-declaration-name":{"begin":"(?=((\\\\b(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|((?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.async.js.jsx"},"2":{"name":"storage.type.property.js.jsx"},"3":{"name":"keyword.generator.asterisk.js.jsx"}},"end":"(?=\\\\}|;|,)|(?<=\\\\})","name":"meta.method.declaration.js.jsx","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"},{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.async.js.jsx"},"2":{"name":"storage.type.property.js.jsx"},"3":{"name":"keyword.generator.asterisk.js.jsx"}},"end":"(?=\\\\(|\\\\<)","patterns":[{"include":"#method-declaration-name"}]}]},"object-member":{"patterns":[{"include":"#comment"},{"include":"#object-literal-method-declaration"},{"begin":"(?=\\\\[)","end":"(?=:)|((?<=[\\\\]])(?=\\\\s*[\\\\(\\\\<]))","name":"meta.object.member.js.jsx meta.object-literal.key.js.jsx","patterns":[{"include":"#comment"},{"include":"#array-literal"}]},{"begin":"(?=[\\\\'\\\\\\"\\\\\`])","end":"(?=:)|((?<=[\\\\'\\\\\\"\\\\\`])(?=((\\\\s*[\\\\(\\\\<,}])|(\\\\s+(as|satisifies)\\\\s+))))","name":"meta.object.member.js.jsx meta.object-literal.key.js.jsx","patterns":[{"include":"#comment"},{"include":"#string"}]},{"begin":"(?=(\\\\b(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\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\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","name":"meta.object.member.js.jsx"},{"captures":{"0":{"name":"meta.object-literal.key.js.jsx"}},"match":"(?:[_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?=(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*:)","name":"meta.object.member.js.jsx"},{"begin":"\\\\.\\\\.\\\\.","beginCaptures":{"0":{"name":"keyword.operator.spread.js.jsx"}},"end":"(?=,|\\\\})","name":"meta.object.member.js.jsx","patterns":[{"include":"#expression"}]},{"captures":{"1":{"name":"variable.other.readwrite.js.jsx"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?=,|\\\\}|$|\\\\/\\\\/|\\\\/\\\\*)","name":"meta.object.member.js.jsx"},{"captures":{"1":{"name":"keyword.control.as.js.jsx"},"2":{"name":"storage.modifier.js.jsx"}},"match":"(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|^|((?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)\\\\(\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.js.jsx"}},"end":"(?<=\\\\))","patterns":[{"include":"#type-parameters"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]}]},{"begin":"(?<=:)\\\\s*(async)?\\\\s*(\\\\()(?=\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.js.jsx"},"2":{"name":"meta.brace.round.js.jsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]},{"begin":"(?<=:)\\\\s*(async)?\\\\s*(?=\\\\<\\\\s*$)","beginCaptures":{"1":{"name":"storage.modifier.async.js.jsx"}},"end":"(?<=\\\\>)","patterns":[{"include":"#type-parameters"}]},{"begin":"(?<=\\\\>)\\\\s*(\\\\()(?=\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"meta.brace.round.js.jsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]},{"include":"#possibly-arrow-return-type"},{"include":"#expression"}]},{"include":"#punctuation-comma"},{"include":"#decl-block"}]},"parameter-array-binding-pattern":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.js.jsx"},"2":{"name":"punctuation.definition.binding-pattern.array.js.jsx"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.js.jsx"}},"patterns":[{"include":"#parameter-binding-element"},{"include":"#punctuation-comma"}]},"parameter-binding-element":{"patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#numeric-literal"},{"include":"#regex"},{"include":"#parameter-object-binding-pattern"},{"include":"#parameter-array-binding-pattern"},{"include":"#destructuring-parameter-rest"},{"include":"#variable-initializer"}]},"parameter-name":{"patterns":[{"captures":{"1":{"name":"storage.modifier.js.jsx"}},"match":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{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\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"captures":{"1":{"name":"storage.modifier.js.jsx"},"2":{"name":"keyword.operator.rest.js.jsx"},"3":{"name":"variable.parameter.js.jsx variable.language.this.js.jsx"},"4":{"name":"variable.parameter.js.jsx"},"5":{"name":"keyword.operator.optional.js.jsx"}},"match":"(?:(?])","name":"meta.type.annotation.js.jsx","patterns":[{"include":"#type"}]}]},"paren-expression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"patterns":[{"include":"#expression"}]},"paren-expression-possibly-arrow":{"patterns":[{"begin":"(?<=[(=,])\\\\s*(async)?(?=\\\\s*((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?\\\\(\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.js.jsx"}},"end":"(?<=\\\\))","patterns":[{"include":"#paren-expression-possibly-arrow-with-typeparameters"}]},{"begin":"(?<=[(=,]|=>|^return|[^\\\\._$[:alnum:]]return)\\\\s*(async)?(?=\\\\s*((((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\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(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)))\\\\s*$)","beginCaptures":{"1":{"name":"storage.modifier.async.js.jsx"}},"end":"(?<=\\\\))","patterns":[{"include":"#paren-expression-possibly-arrow-with-typeparameters"}]},{"include":"#possibly-arrow-return-type"}]},"paren-expression-possibly-arrow-with-typeparameters":{"patterns":[{"include":"#type-parameters"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]}]},"possibly-arrow-return-type":{"begin":"(?<=\\\\)|^)\\\\s*(:)(?=\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*=>)","beginCaptures":{"1":{"name":"meta.arrow.js.jsx meta.return.type.arrow.js.jsx keyword.operator.type.annotation.js.jsx"}},"contentName":"meta.arrow.js.jsx meta.return.type.arrow.js.jsx","end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","patterns":[{"include":"#arrow-return-type-body"}]},"property-accessor":{"match":"(?|&&|\\\\|\\\\||\\\\*\\\\/)\\\\s*(\\\\/)(?![\\\\/*])(?=(?:[^\\\\/\\\\\\\\\\\\[\\\\()]|\\\\\\\\.|\\\\[([^\\\\]\\\\\\\\]|\\\\\\\\.)+\\\\]|\\\\(([^\\\\)\\\\\\\\]|\\\\\\\\.)+\\\\))+\\\\/([dgimsuvy]+|(?![\\\\/\\\\*])|(?=\\\\/\\\\*))(?!\\\\s*[a-zA-Z0-9_$]))","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.js.jsx"}},"end":"(/)([dgimsuvy]*)","endCaptures":{"1":{"name":"punctuation.definition.string.end.js.jsx"},"2":{"name":"keyword.other.js.jsx"}},"name":"string.regexp.js.jsx","patterns":[{"include":"#regexp"}]},{"begin":"((?"},{"match":"[?+*]|\\\\{(\\\\d+,\\\\d+|\\\\d+,|,\\\\d+|\\\\d+)\\\\}\\\\??","name":"keyword.operator.quantifier.regexp"},{"match":"\\\\|","name":"keyword.operator.or.regexp"},{"begin":"(\\\\()((\\\\?=)|(\\\\?!)|(\\\\?<=)|(\\\\?))?","beginCaptures":{"0":{"name":"punctuation.definition.group.regexp"},"1":{"name":"punctuation.definition.group.no-capture.regexp"},"2":{"name":"variable.other.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.regexp","patterns":[{"include":"#regexp"}]},{"begin":"(\\\\[)(\\\\^)?","beginCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"},"2":{"name":"keyword.operator.negation.regexp"}},"end":"(\\\\])","endCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"}},"name":"constant.other.character-class.set.regexp","patterns":[{"captures":{"1":{"name":"constant.character.numeric.regexp"},"2":{"name":"constant.character.control.regexp"},"3":{"name":"constant.character.escape.backslash.regexp"},"4":{"name":"constant.character.numeric.regexp"},"5":{"name":"constant.character.control.regexp"},"6":{"name":"constant.character.escape.backslash.regexp"}},"match":"(?:.|(\\\\\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\\\\\c[A-Z])|(\\\\\\\\.))\\\\-(?:[^\\\\]\\\\\\\\]|(\\\\\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\\\\\c[A-Z])|(\\\\\\\\.))","name":"constant.other.character-class.range.regexp"},{"include":"#regex-character-class"}]},{"include":"#regex-character-class"}]},"return-type":{"patterns":[{"begin":"(?<=\\\\))\\\\s*(:)(?=\\\\s*\\\\S)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.js.jsx"}},"end":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\())|(?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\\\b(?!\\\\$)))"},{"captures":{"1":{"name":"support.type.object.module.js.jsx"},"2":{"name":"support.type.object.module.js.jsx"},"3":{"name":"punctuation.accessor.js.jsx"},"4":{"name":"punctuation.accessor.optional.js.jsx"},"5":{"name":"support.type.object.module.js.jsx"}},"match":"(?\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\`)","end":"(?=\`)","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\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^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([_$[:alpha:]][_$[:alnum:]]*)","name":"entity.name.function.tagged-template.js.jsx"}]},{"include":"#type-arguments"}]},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\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\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)\`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.js.jsx"}},"end":"(?=\`)","patterns":[{"include":"#type-arguments"}]}]},"template-substitution-element":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.js.jsx"}},"contentName":"meta.embedded.line.js.jsx","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.js.jsx"}},"name":"meta.template.expression.js.jsx","patterns":[{"include":"#expression"}]},"template-type":{"patterns":[{"include":"#template-call"},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)?(\`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.js.jsx"},"2":{"name":"string.template.js.jsx punctuation.definition.string.template.begin.js.jsx"}},"contentName":"string.template.js.jsx","end":"\`","endCaptures":{"0":{"name":"string.template.js.jsx punctuation.definition.string.template.end.js.jsx"}},"patterns":[{"include":"#template-type-substitution-element"},{"include":"#string-character-escape"}]}]},"template-type-substitution-element":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.js.jsx"}},"contentName":"meta.embedded.line.js.jsx","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.js.jsx"}},"name":"meta.template.expression.js.jsx","patterns":[{"include":"#type"}]},"ternary-expression":{"begin":"(?!\\\\?\\\\.\\\\s*[^[:digit:]])(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.js.jsx"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.js.jsx"}},"patterns":[{"include":"#expression"}]},"this-literal":{"match":"(?])|((?<=[\\\\}>\\\\]\\\\)]|[_$[:alpha:]])\\\\s*(?=\\\\{)))","name":"meta.type.annotation.js.jsx","patterns":[{"include":"#type"}]},{"begin":"(:)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.js.jsx"}},"end":"(?])|(?=^\\\\s*$)|((?<=[\\\\}>\\\\]\\\\)]|[_$[:alpha:]])\\\\s*(?=\\\\{)))","name":"meta.type.annotation.js.jsx","patterns":[{"include":"#type"}]}]},"type-arguments":{"begin":"\\\\<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.js.jsx"}},"end":"\\\\>","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.js.jsx"}},"name":"meta.type.parameters.js.jsx","patterns":[{"include":"#type-arguments-body"}]},"type-arguments-body":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.js.jsx"}},"match":"(?)","patterns":[{"include":"#comment"},{"include":"#type-parameters"}]},{"begin":"(?))))))","end":"(?<=\\\\))","name":"meta.type.function.js.jsx","patterns":[{"include":"#function-parameters"}]}]},"type-function-return-type":{"patterns":[{"begin":"(=>)(?=\\\\s*\\\\S)","beginCaptures":{"1":{"name":"storage.type.function.arrow.js.jsx"}},"end":"(?)(?:\\\\?]|//|$)","name":"meta.type.function.return.js.jsx","patterns":[{"include":"#type-function-return-type-core"}]},{"begin":"=>","beginCaptures":{"0":{"name":"storage.type.function.arrow.js.jsx"}},"end":"(?)(?]|//|^\\\\s*$)|((?<=\\\\S)(?=\\\\s*$)))","name":"meta.type.function.return.js.jsx","patterns":[{"include":"#type-function-return-type-core"}]}]},"type-function-return-type-core":{"patterns":[{"include":"#comment"},{"begin":"(?<==>)(?=\\\\s*\\\\{)","end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"include":"#type-predicate-operator"},{"include":"#type"}]},"type-infer":{"patterns":[{"captures":{"1":{"name":"keyword.operator.expression.infer.js.jsx"},"2":{"name":"entity.name.type.js.jsx"},"3":{"name":"keyword.operator.expression.extends.js.jsx"}},"match":"(?)","endCaptures":{"1":{"name":"meta.type.parameters.js.jsx punctuation.definition.typeparameters.end.js.jsx"}},"patterns":[{"include":"#type-arguments-body"}]},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(<)","beginCaptures":{"1":{"name":"entity.name.type.js.jsx"},"2":{"name":"meta.type.parameters.js.jsx punctuation.definition.typeparameters.begin.js.jsx"}},"contentName":"meta.type.parameters.js.jsx","end":"(>)","endCaptures":{"1":{"name":"meta.type.parameters.js.jsx punctuation.definition.typeparameters.end.js.jsx"}},"patterns":[{"include":"#type-arguments-body"}]},{"captures":{"1":{"name":"entity.name.type.module.js.jsx"},"2":{"name":"punctuation.accessor.js.jsx"},"3":{"name":"punctuation.accessor.optional.js.jsx"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))"},{"match":"[_$[:alpha:]][_$[:alnum:]]*","name":"entity.name.type.js.jsx"}]},"type-object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.js.jsx"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.block.js.jsx"}},"name":"meta.object.type.js.jsx","patterns":[{"include":"#comment"},{"include":"#method-declaration"},{"include":"#indexer-declaration"},{"include":"#indexer-mapped-type-declaration"},{"include":"#field-declaration"},{"include":"#type-annotation"},{"begin":"\\\\.\\\\.\\\\.","beginCaptures":{"0":{"name":"keyword.operator.spread.js.jsx"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","patterns":[{"include":"#type"}]},{"include":"#punctuation-comma"},{"include":"#punctuation-semicolon"},{"include":"#type"}]},"type-operators":{"patterns":[{"include":"#typeof-operator"},{"include":"#type-infer"},{"begin":"([&|])(?=\\\\s*\\\\{)","beginCaptures":{"0":{"name":"keyword.operator.type.js.jsx"}},"end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"begin":"[&|]","beginCaptures":{"0":{"name":"keyword.operator.type.js.jsx"}},"end":"(?=\\\\S)"},{"match":"(?)","endCaptures":{"1":{"name":"punctuation.definition.typeparameters.end.js.jsx"}},"name":"meta.type.parameters.js.jsx","patterns":[{"include":"#comment"},{"match":"(?)","name":"keyword.operator.assignment.js.jsx"}]},"type-paren-or-function-parameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.js.jsx"}},"name":"meta.type.paren.cover.js.jsx","patterns":[{"captures":{"1":{"name":"storage.modifier.js.jsx"},"2":{"name":"keyword.operator.rest.js.jsx"},"3":{"name":"entity.name.function.js.jsx variable.language.this.js.jsx"},"4":{"name":"entity.name.function.js.jsx"},"5":{"name":"keyword.operator.optional.js.jsx"}},"match":"(?:(?)))))))|(:\\\\s*(?\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))))"},{"captures":{"1":{"name":"storage.modifier.js.jsx"},"2":{"name":"keyword.operator.rest.js.jsx"},"3":{"name":"variable.parameter.js.jsx variable.language.this.js.jsx"},"4":{"name":"variable.parameter.js.jsx"},"5":{"name":"keyword.operator.optional.js.jsx"}},"match":"(?:(?:&|{\\\\?]|(extends\\\\s+)|$|;|^\\\\s*$|(?:^\\\\s*(?:abstract|async|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|var|while)\\\\b))","patterns":[{"include":"#type-arguments"},{"include":"#expression"}]},"undefined-literal":{"match":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))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\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","beginCaptures":{"1":{"name":"meta.definition.variable.js.jsx variable.other.constant.js.jsx entity.name.function.js.jsx"}},"end":"(?=$|^|[;,=}]|((?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\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\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","beginCaptures":{"1":{"name":"meta.definition.variable.js.jsx entity.name.function.js.jsx"},"2":{"name":"keyword.operator.definiteassignment.js.jsx"}},"end":"(?=$|^|[;,=}]|((?\\\\s*$)","beginCaptures":{"1":{"name":"keyword.operator.assignment.js.jsx"}},"end":"(?=$|^|[,);}\\\\]]|((?"u"&&(i=""),typeof n>"u"&&(n="\\b"),new RegExp("^"+i+"(("+e.join(")|(")+"))"+n)}var v="\\\\[0-7]{1,3}",k="\\\\x[A-Fa-f0-9]{1,2}",F=`\\\\[abefnrtv0%?'"\\\\]`,g="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",a=["[<>]:","[<>=]=","<<=?",">>>?=?","=>","--?>","<--[->]?","\\/\\/","\\.{2,3}","[\\.\\\\%*+\\-<>!\\/^|&]=?","\\?","\\$","~",":"],b=o(["[<>]:","[<>=]=","[!=]==","<<=?",">>>?=?","=>?","--?>","<--[->]?","\\/\\/","[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),y=/^[;,()[\]{}]/,m=/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,x=o([v,k,F,g],"'"),z=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],A=["end","else","elseif","catch","finally"],p=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],h=["true","false","nothing","NaN","Inf"],E=o(z),C=o(A),_=o(p),w=o(h),D=/^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,T=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,P=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,B=o(a,"","@"),G=o(a,"",":");function l(e){return e.nestedArrays>0}function S(e){return e.nestedGenerators>0}function t(e,n){return typeof n>"u"&&(n=0),e.scopes.length<=n?null:e.scopes[e.scopes.length-(n+1)]}function f(e,n){if(e.match("#=",!1))return n.tokenize=I,n.tokenize(e,n);var i=n.leavingExpr;if(e.sol()&&(i=!1),n.leavingExpr=!1,i&&e.match(/^'+/))return"operator";if(e.match(/\.{4,}/))return"error";if(e.match(/\.{1,3}/))return"operator";if(e.eatSpace())return null;var r=e.peek();if(r==="#")return e.skipToEnd(),"comment";if(r==="["&&(n.scopes.push("["),n.nestedArrays++),r==="("&&(n.scopes.push("("),n.nestedGenerators++),l(n)&&r==="]"){for(;n.scopes.length&&t(n)!=="[";)n.scopes.pop();n.scopes.pop(),n.nestedArrays--,n.leavingExpr=!0}if(S(n)&&r===")"){for(;n.scopes.length&&t(n)!=="(";)n.scopes.pop();n.scopes.pop(),n.nestedGenerators--,n.leavingExpr=!0}if(l(n)){if(n.lastToken=="end"&&e.match(":"))return"operator";if(e.match("end"))return"number"}var u;if((u=e.match(E,!1))&&n.scopes.push(u[0]),e.match(C,!1)&&n.scopes.pop(),e.match(/^::(?![:\$])/))return n.tokenize=$,n.tokenize(e,n);if(!i&&(e.match(T)||e.match(G)))return"builtin";if(e.match(b))return"operator";if(e.match(/^\.?\d/,!1)){var s=RegExp(/^im\b/),c=!1;if(e.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(c=!0),e.match(/^0x[0-9a-f_]+/i)&&(c=!0),e.match(/^0b[01_]+/i)&&(c=!0),e.match(/^0o[0-7_]+/i)&&(c=!0),e.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(c=!0),e.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(c=!0),c)return e.match(s),n.leavingExpr=!0,"number"}if(e.match("'"))return n.tokenize=O,n.tokenize(e,n);if(e.match(P))return n.tokenize=Z(e.current()),n.tokenize(e,n);if(e.match(D)||e.match(B))return"meta";if(e.match(y))return null;if(e.match(_))return"keyword";if(e.match(w))return"builtin";var d=n.isDefinition||n.lastToken=="function"||n.lastToken=="macro"||n.lastToken=="type"||n.lastToken=="struct"||n.lastToken=="immutable";return e.match(m)?d?e.peek()==="."?(n.isDefinition=!0,"variable"):(n.isDefinition=!1,"def"):(n.leavingExpr=!0,"variable"):(e.next(),"error")}function $(e,n){return e.match(/.*?(?=[,;{}()=\s]|$)/),e.match("{")?n.nestedParameters++:e.match("}")&&n.nestedParameters>0&&n.nestedParameters--,n.nestedParameters>0?e.match(/.*?(?={|})/)||e.next():n.nestedParameters==0&&(n.tokenize=f),"builtin"}function I(e,n){return e.match("#=")&&n.nestedComments++,e.match(/.*?(?=(#=|=#))/)||e.skipToEnd(),e.match("=#")&&(n.nestedComments--,n.nestedComments==0&&(n.tokenize=f)),"comment"}function O(e,n){var i=!1,r;if(e.match(x))i=!0;else if(r=e.match(/\\u([a-f0-9]{1,4})(?=')/i)){var u=parseInt(r[1],16);(u<=55295||u>=57344)&&(i=!0,e.next())}else if(r=e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var u=parseInt(r[1],16);u<=1114111&&(i=!0,e.next())}return i?(n.leavingExpr=!0,n.tokenize=f,"string"):(e.match(/^[^']+(?=')/)||e.skipToEnd(),e.match("'")&&(n.tokenize=f),"error")}function Z(e){e.substr(-3)==='"""'?e='"""':e.substr(-1)==='"'&&(e='"');function n(i,r){if(i.eat("\\"))i.next();else{if(i.match(e))return r.tokenize=f,r.leavingExpr=!0,"string";i.eat(/[`"]/)}return i.eatWhile(/[^\\`"]/),"string"}return n}const j={name:"julia",startState:function(){return{tokenize:f,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(e,n){var i=n.tokenize(e,n),r=e.current();return r&&i&&(n.lastToken=r),i},indent:function(e,n,i){var r=0;return(n==="]"||n===")"||/^end\b/.test(n)||/^else/.test(n)||/^catch\b/.test(n)||/^elseif\b/.test(n)||/^finally/.test(n))&&(r=-1),(e.scopes.length+r)*i.unit},languageData:{indentOnInput:/^\s*(end|else|catch|finally)\b$/,commentTokens:{line:"#",block:{open:"#=",close:"=#"}},closeBrackets:{brackets:["(","[","{",'"']},autocomplete:p.concat(h)}};export{j as julia}; diff --git a/pkg/cli/webapp/dist/assets/livescript-BwQOo05w.js b/pkg/cli/webapp/dist/assets/livescript-BwQOo05w.js new file mode 100644 index 0000000..e61e366 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/livescript-BwQOo05w.js @@ -0,0 +1 @@ +var f=function(e,n){var g=n.next||"start";{n.next=n.next;var k=x[g];if(k.splice){for(var l=0;l|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+s+")?))\\s*$"),r="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",o={token:"string",regex:".+"},x={start:[{token:"docComment",regex:"/\\*",next:"comment"},{token:"comment",regex:"#.*"},{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)"+r},{token:"atom",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+r},{token:"invalid",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+r},{token:"className.standard",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+r},{token:"variableName.function.standard",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+r},{token:"variableName.standard",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+r},{token:"variableName",regex:s+"\\s*:(?![:=])"},{token:"variableName",regex:s},{token:"operatorKeyword",regex:"(?:\\.{3}|\\s+\\?)"},{token:"keyword",regex:"(?:@+|::|\\.\\.)",next:"key"},{token:"operatorKeyword",regex:"\\.\\s*",next:"key"},{token:"string",regex:"\\\\\\S[^\\s,;)}\\]]*"},{token:"docString",regex:"'''",next:"qdoc"},{token:"docString",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"`",next:"js"},{token:"string",regex:"<\\[",next:"words"},{token:"regexp",regex:"//",next:"heregex"},{token:"regexp",regex:"\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}",next:"key"},{token:"number",regex:"(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"},{token:"paren",regex:"[({[]"},{token:"paren",regex:"[)}\\]]",next:"key"},{token:"operatorKeyword",regex:"\\S+"},{token:"content",regex:"\\s+"}],heregex:[{token:"regexp",regex:".*?//[gimy$?]{0,4}",next:"start"},{token:"regexp",regex:"\\s*#{"},{token:"comment",regex:"\\s+(?:#.*)?"},{token:"regexp",regex:"\\S+"}],key:[{token:"operatorKeyword",regex:"[.?@!]+"},{token:"variableName",regex:s,next:"start"},{token:"content",regex:"",next:"start"}],comment:[{token:"docComment",regex:".*?\\*/",next:"start"},{token:"docComment",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},o],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},o],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},o],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},o],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},o],words:[{token:"string",regex:".*?\\]>",next:"key"},o]};for(var d in x){var a=x[d];if(a.splice)for(var i=0,p=a.length;i~@\^\&\*\)\[\]'\?,\|])).*/,!0,!1)||e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)||e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,!0,!1)||e.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variableName.special":e.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,!0,!1)?"character":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,!0,!1)?"variableName.constant":e.match(A,!0,!1)?"keyword":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":(e.next(),"error"))}function Z(e,a){for(var n,r=!1,t=!1;(n=e.next())!=null;){if(n==='"'&&!t){r=!0;break}t=!t&&n==="\\"}return r&&!t&&(a.tokenize=i),"string"}function $(e,a){for(var n,r;a.commentLevel>0&&(r=e.next())!=null;)n==="("&&r==="*"&&a.commentLevel++,n==="*"&&r===")"&&a.commentLevel--,n=r;return a.commentLevel<=0&&(a.tokenize=i),"comment"}const v={name:"mathematica",startState:function(){return{tokenize:i,commentLevel:0}},token:function(e,a){return e.eatSpace()?null:a.tokenize(e,a)},languageData:{commentTokens:{block:{open:"(*",close:"*)"}}}};export{v as mathematica}; diff --git a/pkg/cli/webapp/dist/assets/mbox-CNhZ1qSd.js b/pkg/cli/webapp/dist/assets/mbox-CNhZ1qSd.js new file mode 100644 index 0000000..aac92bf --- /dev/null +++ b/pkg/cli/webapp/dist/assets/mbox-CNhZ1qSd.js @@ -0,0 +1 @@ +var o=["From","Sender","Reply-To","To","Cc","Bcc","Message-ID","In-Reply-To","References","Resent-From","Resent-Sender","Resent-To","Resent-Cc","Resent-Bcc","Resent-Message-ID","Return-Path","Received"],l=["Date","Subject","Comments","Keywords","Resent-Date"],u=/^[ \t]/,d=/^From /,f=new RegExp("^("+o.join("|")+"): "),c=new RegExp("^("+l.join("|")+"): "),t=/^[^:]+:/,m=/^[^ ]+@[^ ]+/,p=/^.*?(?=[^ ]+?@[^ ]+)/,H=/^<.*?>/,v=/^.*?(?=<.*>)/;function h(e){return e==="Subject"?"header":"string"}function R(e,r){if(e.sol()){if(r.inSeparator=!1,r.inHeader&&e.match(u))return null;if(r.inHeader=!1,r.header=null,e.match(d))return r.inHeaders=!0,r.inSeparator=!0,"atom";var n,i=!1;return(n=e.match(c))||(i=!0)&&(n=e.match(f))?(r.inHeaders=!0,r.inHeader=!0,r.emailPermitted=i,r.header=n[1],"atom"):r.inHeaders&&(n=e.match(t))?(r.inHeader=!0,r.emailPermitted=!0,r.header=n[1],"atom"):(r.inHeaders=!1,e.skipToEnd(),null)}if(r.inSeparator)return e.match(m)?"link":(e.match(p)||e.skipToEnd(),"atom");if(r.inHeader){var a=h(r.header);if(r.emailPermitted){if(e.match(H))return a+" link";if(e.match(v))return a}return e.skipToEnd(),a}return e.skipToEnd(),null}const k={name:"mbox",startState:function(){return{inSeparator:!1,inHeader:!1,emailPermitted:!1,header:null,inHeaders:!1}},token:R,blankLine:function(e){e.inHeaders=e.inSeparator=e.inHeader=!1},languageData:{autocomplete:o.concat(l)}};export{k as mbox}; diff --git a/pkg/cli/webapp/dist/assets/mermaid-GHXKKRXX-Cue24Ovd.js b/pkg/cli/webapp/dist/assets/mermaid-GHXKKRXX-Cue24Ovd.js new file mode 100644 index 0000000..6137e0d --- /dev/null +++ b/pkg/cli/webapp/dist/assets/mermaid-GHXKKRXX-Cue24Ovd.js @@ -0,0 +1,115 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-BAeNppwW.js","assets/index-Bz3KHWSS.js","assets/index-CjqsAOBG.css","assets/index-RgHATUD5.js","assets/index-vBeBfY-6.js","assets/index-DIIxsTGV.js"])))=>i.map(i=>d[i]); +import{h as Ua,r as _,j as E,_ as ja,f as $a,g as za}from"./index-Bz3KHWSS.js";import{K as De,L as ur,S as vt,o as _e,M as wo,H as Ya,D as Ro,u as gt,N as Rn,O as Jt,w as Oo,C as Do,z as Po,t as Mo,A as vo,x as Bo,J as Gt,E as Wt,k as Ie,P as Fo,F as Ho,j as Va,G as Uo,v as jo,B as $o,y as zo,Q as gs,V as On,q as Yo}from"./index-RgHATUD5.js";import{f as Rr,p as Ts,d as As,n as _s,h as er,s as Ye,a as qa,b as Ga,c as Vo,w as qo}from"./index-vBeBfY-6.js";import{z as Wa,c as xs}from"./index-DIIxsTGV.js";const Go={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Tt={indicator:"indicator",textOnly:"text-only",remove:"remove"};function Wo({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:s=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:i="text-gray-500",linkBlockPolicy:o=Tt.indicator,imageBlockPolicy:l=Tt.indicator}){const c=t.length&&!t.every(f=>f==="*"),d=r.length&&!r.every(f=>f==="*");if(!e&&(c||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return f=>{const p=el(e,t,r,n,s,a,i,o,l);Ka(f),De(f,p)}}function ks(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Ko(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Qo=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Xo=new Set(["javascript:","data:","file:","vbscript:"]);function Ns(e,t,r,n=!1,s=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const i=ks(e,r);if(!i||Xo.has(i.protocol)||!(Qo.has(i.protocol)||a.includes(i.protocol)||a.includes("*")))return null;if(i.protocol==="mailto:"||!i.protocol.match(/^https?:$/))return i.href;const l=Ko(e);return i&&t.some(c=>{const d=ks(c,r);return!d||d.origin!==i.origin?!1:i.href.startsWith(d.href)})?l?i.pathname+i.search+i.hash:i.href:t.includes("*")?i.protocol!=="https:"&&i.protocol!=="http:"?null:l?i.pathname+i.search+i.hash:i.href:null}function Ka(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Ka(t)}}const Yr=Symbol("node-seen");function Zo(e,t,r){return t===Tt.remove?{type:"remove"}:t===Tt.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:r},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Jo(e,t,r){if(t===Tt.remove)return{type:"remove"};if(t===Tt.textOnly){const n=String(e.properties.alt||"");return n?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:n}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:r},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const el=(e,t,r,n,s,a,i,o,l)=>{const c=(d,f,p)=>{if(d.type!=="element"||d[Yr])return ur;if(d.tagName==="a"){const T=Ns(d.properties.href,t,e,!1,!1,s);if(T===null){if(d[Yr]=!0,De(d,c),p&&typeof f=="number"){const g=Zo(d,o,i);if(g.type==="remove")return p.children.splice(f,1),[vt,f];p.children[f]=g.element}return vt}else return d.properties.href=T,d.properties.target="_blank",d.properties.rel="noopener noreferrer",ur}if(d.tagName==="img"){const T=Ns(d.properties.src,r,e,n,!0,s);if(T===null){if(d[Yr]=!0,De(d,c),p&&typeof f=="number"){const g=Jo(d,l,a);if(g.type==="remove")return p.children.splice(f,1),[vt,f];p.children[f]=g.element}return vt}else return d.properties.src=T,ur}return ur};return c},Qa=-1,Or=0,Ut=1,_r=2,Dn=3,Pn=4,Mn=5,vn=6,Xa=7,Za=8,tl=typeof self=="object"?self:globalThis,Cs=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new tl[e](t)},rl=(e,t)=>{const r=(s,a)=>(e.set(a,s),s),n=s=>{if(e.has(s))return e.get(s);const[a,i]=t[s];switch(a){case Or:case Qa:return r(i,s);case Ut:{const o=r([],s);for(const l of i)o.push(n(l));return o}case _r:{const o=r({},s);for(const[l,c]of i)o[n(l)]=n(c);return o}case Dn:return r(new Date(i),s);case Pn:{const{source:o,flags:l}=i;return r(new RegExp(o,l),s)}case Mn:{const o=r(new Map,s);for(const[l,c]of i)o.set(n(l),n(c));return o}case vn:{const o=r(new Set,s);for(const l of i)o.add(n(l));return o}case Xa:{const{name:o,message:l}=i;return r(Cs(o,l),s)}case Za:return r(BigInt(i),s);case"BigInt":return r(Object(BigInt(i)),s);case"ArrayBuffer":return r(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:o}=new Uint8Array(i);return r(new DataView(o),i)}}return r(Cs(a,i),s)};return n},ys=e=>rl(new Map,e)(0),pt="",{toString:nl}={},{keys:sl}=Object,St=e=>{const t=typeof e;if(t!=="object"||!e)return[Or,t];const r=nl.call(e).slice(8,-1);switch(r){case"Array":return[Ut,pt];case"Object":return[_r,pt];case"Date":return[Dn,pt];case"RegExp":return[Pn,pt];case"Map":return[Mn,pt];case"Set":return[vn,pt];case"DataView":return[Ut,r]}return r.includes("Array")?[Ut,r]:r.includes("Error")?[Xa,r]:[_r,r]},or=([e,t])=>e===Or&&(t==="function"||t==="symbol"),al=(e,t,r,n)=>{const s=(i,o)=>{const l=n.push(i)-1;return r.set(o,l),l},a=i=>{if(r.has(i))return r.get(i);let[o,l]=St(i);switch(o){case Or:{let d=i;switch(l){case"bigint":o=Za,d=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return s([Qa],i)}return s([o,d],i)}case Ut:{if(l){let p=i;return l==="DataView"?p=new Uint8Array(i.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(i)),s([l,[...p]],i)}const d=[],f=s([o,d],i);for(const p of i)d.push(a(p));return f}case _r:{if(l)switch(l){case"BigInt":return s([l,i.toString()],i);case"Boolean":case"Number":case"String":return s([l,i.valueOf()],i)}if(t&&"toJSON"in i)return a(i.toJSON());const d=[],f=s([o,d],i);for(const p of sl(i))(e||!or(St(i[p])))&&d.push([a(p),a(i[p])]);return f}case Dn:return s([o,i.toISOString()],i);case Pn:{const{source:d,flags:f}=i;return s([o,{source:d,flags:f}],i)}case Mn:{const d=[],f=s([o,d],i);for(const[p,T]of i)(e||!(or(St(p))||or(St(T))))&&d.push([a(p),a(T)]);return f}case vn:{const d=[],f=s([o,d],i);for(const p of i)(e||!or(St(p)))&&d.push(a(p));return f}}const{message:c}=i;return s([o,{name:l,message:c}],i)};return a},Is=(e,{json:t,lossy:r}={})=>{const n=[];return al(!(t||r),!!t,new Map,n)(e),n},st=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ys(Is(e,t)):structuredClone(e):(e,t)=>ys(Is(e,t)),Ss=/[#.]/g;function il(e,t){const r=e||"",n={};let s=0,a,i;for(;s-1&&a<=t.length){let i=0;for(;;){let o=r[i];if(o===void 0){const l=ws(t,r[i-1]);o=l===-1?t.length+1:l+1,r[i]=o}if(o>a)return{line:i+1,column:a-(i>0?r[i-1]:0)+1,offset:a};i++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length1?r[a.line-2]:0)+a.column-1;if(i=55296&&e<=57343}function wl(e){return e>=56320&&e<=57343}function Rl(e,t){return(e-55296)*1024+9216+t}function si(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ai(e){return e>=64976&&e<=65007||Ll.has(e)}var x;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(x||(x={}));const Ol=65536;class Dl{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Ol,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,r){const{line:n,col:s,offset:a}=this,i=s+r,o=a+r;return{code:t,startLine:n,endLine:n,startCol:i,endCol:i,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const r=this.html.charCodeAt(this.pos+1);if(wl(r))return this.pos++,this._addGap(),Rl(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,h.EOF;return this._err(x.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,h.EOF;const n=this.html.charCodeAt(r);return n===h.CARRIAGE_RETURN?h.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,h.EOF;let t=this.html.charCodeAt(this.pos);return t===h.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,h.LINE_FEED):t===h.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ni(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===h.LINE_FEED||t===h.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){si(t)?this._err(x.controlCharacterInInputStream):ai(t)&&this._err(x.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}const Pl=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Ml=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function vl(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ml.get(e))!==null&&t!==void 0?t:e}var ie;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ie||(ie={}));const Bl=32;var je;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(je||(je={}));function dn(e){return e>=ie.ZERO&&e<=ie.NINE}function Fl(e){return e>=ie.UPPER_A&&e<=ie.UPPER_F||e>=ie.LOWER_A&&e<=ie.LOWER_F}function Hl(e){return e>=ie.UPPER_A&&e<=ie.UPPER_Z||e>=ie.LOWER_A&&e<=ie.LOWER_Z||dn(e)}function Ul(e){return e===ie.EQUALS||Hl(e)}var ae;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ae||(ae={}));var Oe;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Oe||(Oe={}));class jl{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=ae.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Oe.Strict}startEntity(t){this.decodeMode=t,this.state=ae.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case ae.EntityStart:return t.charCodeAt(r)===ie.NUM?(this.state=ae.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=ae.NamedEntity,this.stateNamedEntity(t,r));case ae.NumericStart:return this.stateNumericStart(t,r);case ae.NumericDecimal:return this.stateNumericDecimal(t,r);case ae.NumericHex:return this.stateNumericHex(t,r);case ae.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|Bl)===ie.LOWER_X?(this.state=ae.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=ae.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,s){if(r!==n){const a=n-r;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(r,a),s),this.consumed+=a}}stateNumericHex(t,r){const n=r;for(;r>14;for(;r>14,a!==0){if(i===ie.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Oe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,s=(n[r]&je.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:s}=this;return this.emitCodePoint(r===1?s[t]&~je.VALUE_LENGTH:s[t+1],n),r===3&&this.emitCodePoint(s[t+2],n),n}end(){var t;switch(this.state){case ae.NamedEntity:return this.result!==0&&(this.decodeMode!==Oe.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ae.NumericDecimal:return this.emitNumericEntity(0,2);case ae.NumericHex:return this.emitNumericEntity(0,3);case ae.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ae.EntityStart:return 0}}}function $l(e,t,r,n){const s=(t&je.BRANCH_LENGTH)>>7,a=t&je.JUMP_TABLE;if(s===0)return a!==0&&n===a?r:-1;if(a){const l=n-a;return l<0||l>=s?-1:e[r+l]-1}let i=r,o=i+s-1;for(;i<=o;){const l=i+o>>>1,c=e[l];if(cn)o=l-1;else return e[l+s]}return-1}var C;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(C||(C={}));var rt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(rt||(rt={}));var me;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(me||(me={}));var A;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(A||(A={}));var u;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(u||(u={}));const zl=new Map([[A.A,u.A],[A.ADDRESS,u.ADDRESS],[A.ANNOTATION_XML,u.ANNOTATION_XML],[A.APPLET,u.APPLET],[A.AREA,u.AREA],[A.ARTICLE,u.ARTICLE],[A.ASIDE,u.ASIDE],[A.B,u.B],[A.BASE,u.BASE],[A.BASEFONT,u.BASEFONT],[A.BGSOUND,u.BGSOUND],[A.BIG,u.BIG],[A.BLOCKQUOTE,u.BLOCKQUOTE],[A.BODY,u.BODY],[A.BR,u.BR],[A.BUTTON,u.BUTTON],[A.CAPTION,u.CAPTION],[A.CENTER,u.CENTER],[A.CODE,u.CODE],[A.COL,u.COL],[A.COLGROUP,u.COLGROUP],[A.DD,u.DD],[A.DESC,u.DESC],[A.DETAILS,u.DETAILS],[A.DIALOG,u.DIALOG],[A.DIR,u.DIR],[A.DIV,u.DIV],[A.DL,u.DL],[A.DT,u.DT],[A.EM,u.EM],[A.EMBED,u.EMBED],[A.FIELDSET,u.FIELDSET],[A.FIGCAPTION,u.FIGCAPTION],[A.FIGURE,u.FIGURE],[A.FONT,u.FONT],[A.FOOTER,u.FOOTER],[A.FOREIGN_OBJECT,u.FOREIGN_OBJECT],[A.FORM,u.FORM],[A.FRAME,u.FRAME],[A.FRAMESET,u.FRAMESET],[A.H1,u.H1],[A.H2,u.H2],[A.H3,u.H3],[A.H4,u.H4],[A.H5,u.H5],[A.H6,u.H6],[A.HEAD,u.HEAD],[A.HEADER,u.HEADER],[A.HGROUP,u.HGROUP],[A.HR,u.HR],[A.HTML,u.HTML],[A.I,u.I],[A.IMG,u.IMG],[A.IMAGE,u.IMAGE],[A.INPUT,u.INPUT],[A.IFRAME,u.IFRAME],[A.KEYGEN,u.KEYGEN],[A.LABEL,u.LABEL],[A.LI,u.LI],[A.LINK,u.LINK],[A.LISTING,u.LISTING],[A.MAIN,u.MAIN],[A.MALIGNMARK,u.MALIGNMARK],[A.MARQUEE,u.MARQUEE],[A.MATH,u.MATH],[A.MENU,u.MENU],[A.META,u.META],[A.MGLYPH,u.MGLYPH],[A.MI,u.MI],[A.MO,u.MO],[A.MN,u.MN],[A.MS,u.MS],[A.MTEXT,u.MTEXT],[A.NAV,u.NAV],[A.NOBR,u.NOBR],[A.NOFRAMES,u.NOFRAMES],[A.NOEMBED,u.NOEMBED],[A.NOSCRIPT,u.NOSCRIPT],[A.OBJECT,u.OBJECT],[A.OL,u.OL],[A.OPTGROUP,u.OPTGROUP],[A.OPTION,u.OPTION],[A.P,u.P],[A.PARAM,u.PARAM],[A.PLAINTEXT,u.PLAINTEXT],[A.PRE,u.PRE],[A.RB,u.RB],[A.RP,u.RP],[A.RT,u.RT],[A.RTC,u.RTC],[A.RUBY,u.RUBY],[A.S,u.S],[A.SCRIPT,u.SCRIPT],[A.SEARCH,u.SEARCH],[A.SECTION,u.SECTION],[A.SELECT,u.SELECT],[A.SOURCE,u.SOURCE],[A.SMALL,u.SMALL],[A.SPAN,u.SPAN],[A.STRIKE,u.STRIKE],[A.STRONG,u.STRONG],[A.STYLE,u.STYLE],[A.SUB,u.SUB],[A.SUMMARY,u.SUMMARY],[A.SUP,u.SUP],[A.TABLE,u.TABLE],[A.TBODY,u.TBODY],[A.TEMPLATE,u.TEMPLATE],[A.TEXTAREA,u.TEXTAREA],[A.TFOOT,u.TFOOT],[A.TD,u.TD],[A.TH,u.TH],[A.THEAD,u.THEAD],[A.TITLE,u.TITLE],[A.TR,u.TR],[A.TRACK,u.TRACK],[A.TT,u.TT],[A.U,u.U],[A.UL,u.UL],[A.SVG,u.SVG],[A.VAR,u.VAR],[A.WBR,u.WBR],[A.XMP,u.XMP]]);function xt(e){var t;return(t=zl.get(e))!==null&&t!==void 0?t:u.UNKNOWN}const y=u,Yl={[C.HTML]:new Set([y.ADDRESS,y.APPLET,y.AREA,y.ARTICLE,y.ASIDE,y.BASE,y.BASEFONT,y.BGSOUND,y.BLOCKQUOTE,y.BODY,y.BR,y.BUTTON,y.CAPTION,y.CENTER,y.COL,y.COLGROUP,y.DD,y.DETAILS,y.DIR,y.DIV,y.DL,y.DT,y.EMBED,y.FIELDSET,y.FIGCAPTION,y.FIGURE,y.FOOTER,y.FORM,y.FRAME,y.FRAMESET,y.H1,y.H2,y.H3,y.H4,y.H5,y.H6,y.HEAD,y.HEADER,y.HGROUP,y.HR,y.HTML,y.IFRAME,y.IMG,y.INPUT,y.LI,y.LINK,y.LISTING,y.MAIN,y.MARQUEE,y.MENU,y.META,y.NAV,y.NOEMBED,y.NOFRAMES,y.NOSCRIPT,y.OBJECT,y.OL,y.P,y.PARAM,y.PLAINTEXT,y.PRE,y.SCRIPT,y.SECTION,y.SELECT,y.SOURCE,y.STYLE,y.SUMMARY,y.TABLE,y.TBODY,y.TD,y.TEMPLATE,y.TEXTAREA,y.TFOOT,y.TH,y.THEAD,y.TITLE,y.TR,y.TRACK,y.UL,y.WBR,y.XMP]),[C.MATHML]:new Set([y.MI,y.MO,y.MN,y.MS,y.MTEXT,y.ANNOTATION_XML]),[C.SVG]:new Set([y.TITLE,y.FOREIGN_OBJECT,y.DESC]),[C.XLINK]:new Set,[C.XML]:new Set,[C.XMLNS]:new Set},fn=new Set([y.H1,y.H2,y.H3,y.H4,y.H5,y.H6]);A.STYLE,A.SCRIPT,A.XMP,A.IFRAME,A.NOEMBED,A.NOFRAMES,A.PLAINTEXT;var m;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(m||(m={}));const re={DATA:m.DATA,RCDATA:m.RCDATA,RAWTEXT:m.RAWTEXT,SCRIPT_DATA:m.SCRIPT_DATA,PLAINTEXT:m.PLAINTEXT,CDATA_SECTION:m.CDATA_SECTION};function Vl(e){return e>=h.DIGIT_0&&e<=h.DIGIT_9}function Bt(e){return e>=h.LATIN_CAPITAL_A&&e<=h.LATIN_CAPITAL_Z}function ql(e){return e>=h.LATIN_SMALL_A&&e<=h.LATIN_SMALL_Z}function Fe(e){return ql(e)||Bt(e)}function Os(e){return Fe(e)||Vl(e)}function lr(e){return e+32}function ui(e){return e===h.SPACE||e===h.LINE_FEED||e===h.TABULATION||e===h.FORM_FEED}function Ds(e){return ui(e)||e===h.SOLIDUS||e===h.GREATER_THAN_SIGN}function Gl(e){return e===h.NULL?x.nullCharacterReference:e>1114111?x.characterReferenceOutsideUnicodeRange:ni(e)?x.surrogateCharacterReference:ai(e)?x.noncharacterCharacterReference:si(e)||e===h.CARRIAGE_RETURN?x.controlCharacterReference:null}class Wl{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=m.DATA,this.returnState=m.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Dl(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new jl(Pl,(n,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(x.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(x.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const s=Gl(n);s&&this._err(s,1)}}:void 0)}_err(t,r=0){var n,s;(s=(n=this.handler).onParseError)===null||s===void 0||s.call(n,this.preprocessor.getError(t,r))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r0&&this._err(x.endTagWithAttributes),t.selfClosing&&this._err(x.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case $.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case $.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case $.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:$.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){const r=ui(t)?$.WHITESPACE_CHARACTER:t===h.NULL?$.NULL_CHARACTER:$.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken($.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=m.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Oe.Attribute:Oe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===m.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===m.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===m.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case m.DATA:{this._stateData(t);break}case m.RCDATA:{this._stateRcdata(t);break}case m.RAWTEXT:{this._stateRawtext(t);break}case m.SCRIPT_DATA:{this._stateScriptData(t);break}case m.PLAINTEXT:{this._statePlaintext(t);break}case m.TAG_OPEN:{this._stateTagOpen(t);break}case m.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case m.TAG_NAME:{this._stateTagName(t);break}case m.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case m.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case m.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case m.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case m.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case m.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case m.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case m.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case m.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case m.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case m.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case m.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case m.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case m.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case m.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case m.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case m.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case m.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case m.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case m.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case m.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case m.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case m.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case m.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case m.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case m.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case m.BOGUS_COMMENT:{this._stateBogusComment(t);break}case m.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case m.COMMENT_START:{this._stateCommentStart(t);break}case m.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case m.COMMENT:{this._stateComment(t);break}case m.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case m.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case m.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case m.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case m.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case m.COMMENT_END:{this._stateCommentEnd(t);break}case m.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case m.DOCTYPE:{this._stateDoctype(t);break}case m.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case m.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case m.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case m.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case m.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case m.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case m.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case m.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case m.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case m.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case m.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case m.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case m.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case m.CDATA_SECTION:{this._stateCdataSection(t);break}case m.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case m.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case m.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case m.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case h.LESS_THAN_SIGN:{this.state=m.TAG_OPEN;break}case h.AMPERSAND:{this._startCharacterReference();break}case h.NULL:{this._err(x.unexpectedNullCharacter),this._emitCodePoint(t);break}case h.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case h.AMPERSAND:{this._startCharacterReference();break}case h.LESS_THAN_SIGN:{this.state=m.RCDATA_LESS_THAN_SIGN;break}case h.NULL:{this._err(x.unexpectedNullCharacter),this._emitChars(X);break}case h.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case h.LESS_THAN_SIGN:{this.state=m.RAWTEXT_LESS_THAN_SIGN;break}case h.NULL:{this._err(x.unexpectedNullCharacter),this._emitChars(X);break}case h.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case h.LESS_THAN_SIGN:{this.state=m.SCRIPT_DATA_LESS_THAN_SIGN;break}case h.NULL:{this._err(x.unexpectedNullCharacter),this._emitChars(X);break}case h.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case h.NULL:{this._err(x.unexpectedNullCharacter),this._emitChars(X);break}case h.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Fe(t))this._createStartTagToken(),this.state=m.TAG_NAME,this._stateTagName(t);else switch(t){case h.EXCLAMATION_MARK:{this.state=m.MARKUP_DECLARATION_OPEN;break}case h.SOLIDUS:{this.state=m.END_TAG_OPEN;break}case h.QUESTION_MARK:{this._err(x.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=m.BOGUS_COMMENT,this._stateBogusComment(t);break}case h.EOF:{this._err(x.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(x.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=m.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Fe(t))this._createEndTagToken(),this.state=m.TAG_NAME,this._stateTagName(t);else switch(t){case h.GREATER_THAN_SIGN:{this._err(x.missingEndTagName),this.state=m.DATA;break}case h.EOF:{this._err(x.eofBeforeTagName),this._emitChars("");break}case h.NULL:{this._err(x.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_ESCAPED,this._emitChars(X);break}case h.EOF:{this._err(x.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=m.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===h.SOLIDUS?this.state=m.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Fe(t)?(this._emitChars("<"),this.state=m.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=m.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Fe(t)?(this.state=m.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("");break}case h.NULL:{this._err(x.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(X);break}case h.EOF:{this._err(x.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===h.SOLIDUS?(this.state=m.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(he.SCRIPT,!1)&&Ds(this.preprocessor.peek(he.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){const n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){const s=this._indexOf(t)+1;this.items.splice(s,0,r),this.tagIDs.splice(s,0,n),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==C.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(t){for(;this.stackTop>=t;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Jl,C.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Zl,C.HTML)}clearBackToTableRowContext(){this.clearBackTo(Xl,C.HTML)}remove(t){const r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===u.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===u.HTML}hasInDynamicScope(t,r){for(let n=this.stackTop;n>=0;n--){const s=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case C.HTML:{if(s===t)return!0;if(r.has(s))return!1;break}case C.SVG:{if(vs.has(s))return!1;break}case C.MATHML:{if(Ms.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,xr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Kl)}hasInButtonScope(t){return this.hasInDynamicScope(t,Ql)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case C.HTML:{if(fn.has(r))return!0;if(xr.has(r))return!1;break}case C.SVG:{if(vs.has(r))return!1;break}case C.MATHML:{if(Ms.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===C.HTML)switch(this.tagIDs[r]){case t:return!0;case u.TABLE:case u.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===C.HTML)switch(this.tagIDs[t]){case u.TBODY:case u.THEAD:case u.TFOOT:return!0;case u.TABLE:case u.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===C.HTML)switch(this.tagIDs[r]){case t:return!0;case u.OPTION:case u.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&oi.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ps.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ps.has(this.currentTagId);)this.pop()}}const Vr=3;var ye;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ye||(ye={}));const Bs={type:ye.Marker};class rc{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const n=[],s=r.length,a=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t);for(let o=0;o[i.name,i.value]));let a=0;for(let i=0;is.get(l.name)===l.value)&&(a+=1,a>=Vr&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Bs)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:ye.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:ye.Element,element:t,token:r})}removeEntry(t){const r=this.entries.indexOf(t);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const t=this.entries.indexOf(Bs);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(n=>n.type===ye.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===ye.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===ye.Element&&r.element===t)}}const He={createDocument(){return{nodeName:"#document",mode:me.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=r,s.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};He.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(He.isTextNode(r)){r.value+=t;return}}He.appendChild(e,He.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&He.isTextNode(n)?n.value+=t:He.insertBefore(e,He.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;ne.startsWith(r))}function oc(e){return e.name===li&&e.publicId===null&&(e.systemId===null||e.systemId===nc)}function lc(e){if(e.name!==li)return me.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===sc)return me.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),ic.has(r))return me.QUIRKS;let n=t===null?ac:ci;if(Fs(r,n))return me.QUIRKS;if(n=t===null?di:uc,Fs(r,n))return me.LIMITED_QUIRKS}return me.NO_QUIRKS}const Hs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},cc="definitionurl",dc="definitionURL",fc=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),hc=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:C.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:C.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:C.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:C.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:C.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:C.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:C.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:C.XML}],["xml:space",{prefix:"xml",name:"space",namespace:C.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:C.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:C.XMLNS}]]),mc=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),pc=new Set([u.B,u.BIG,u.BLOCKQUOTE,u.BODY,u.BR,u.CENTER,u.CODE,u.DD,u.DIV,u.DL,u.DT,u.EM,u.EMBED,u.H1,u.H2,u.H3,u.H4,u.H5,u.H6,u.HEAD,u.HR,u.I,u.IMG,u.LI,u.LISTING,u.MENU,u.META,u.NOBR,u.OL,u.P,u.PRE,u.RUBY,u.S,u.SMALL,u.SPAN,u.STRONG,u.STRIKE,u.SUB,u.SUP,u.TABLE,u.TT,u.U,u.UL,u.VAR]);function bc(e){const t=e.tagID;return t===u.FONT&&e.attrs.some(({name:n})=>n===rt.COLOR||n===rt.SIZE||n===rt.FACE)||pc.has(t)}function fi(e){for(let t=0;t0&&this._setContextModes(t,r)}onItemPop(t,r){var n,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(n=this.treeAdapter).onItemPop)===null||s===void 0||s.call(n,t,this.openElements.current),r){let a,i;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,this._setContextModes(a,i)}}_setContextModes(t,r){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===C.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,C.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=b.TEXT}switchToPlaintextParsing(){this.insertionMode=b.TEXT,this.originalInsertionMode=b.IN_BODY,this.tokenizer.state=re.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===A.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==C.HTML))switch(this.fragmentContextID){case u.TITLE:case u.TEXTAREA:{this.tokenizer.state=re.RCDATA;break}case u.STYLE:case u.XMP:case u.IFRAME:case u.NOEMBED:case u.NOFRAMES:case u.NOSCRIPT:{this.tokenizer.state=re.RAWTEXT;break}case u.SCRIPT:{this.tokenizer.state=re.SCRIPT_DATA;break}case u.PLAINTEXT:{this.tokenizer.state=re.PLAINTEXT;break}}}_setDocumentType(t){const r=t.name||"",n=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,s),t.location){const i=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));i&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){const n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){const n=this.treeAdapter.createElement(t,C.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){const r=this.treeAdapter.createElement(t.tagName,C.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(A.HTML,C.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,u.HTML)}_appendCommentNode(t,r){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(r),a=n?s.lastIndexOf(n):s.length,i=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:l,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:l,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){const n=r.location,s=this.treeAdapter.getTagName(t),a=r.type===$.END_TAG&&s===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===u.SVG&&this.treeAdapter.getTagName(r)===A.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===C.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===u.MGLYPH||t.tagID===u.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,r,C.HTML)}_processToken(t){switch(t.type){case $.CHARACTER:{this.onCharacter(t);break}case $.NULL_CHARACTER:{this.onNullCharacter(t);break}case $.COMMENT:{this.onComment(t);break}case $.DOCTYPE:{this.onDoctype(t);break}case $.START_TAG:{this._processStartTag(t);break}case $.END_TAG:{this.onEndTag(t);break}case $.EOF:{this.onEof(t);break}case $.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){const s=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return Ac(t,s,a,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(s=>s.type===ye.Marker||this.openElements.contains(s.element)),n=r===-1?t-1:r-1;for(let s=n;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=b.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(u.P),this.openElements.popUntilTagNamePopped(u.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case u.TR:{this.insertionMode=b.IN_ROW;return}case u.TBODY:case u.THEAD:case u.TFOOT:{this.insertionMode=b.IN_TABLE_BODY;return}case u.CAPTION:{this.insertionMode=b.IN_CAPTION;return}case u.COLGROUP:{this.insertionMode=b.IN_COLUMN_GROUP;return}case u.TABLE:{this.insertionMode=b.IN_TABLE;return}case u.BODY:{this.insertionMode=b.IN_BODY;return}case u.FRAMESET:{this.insertionMode=b.IN_FRAMESET;return}case u.SELECT:{this._resetInsertionModeForSelect(t);return}case u.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case u.HTML:{this.insertionMode=this.headElement?b.AFTER_HEAD:b.BEFORE_HEAD;return}case u.TD:case u.TH:{if(t>0){this.insertionMode=b.IN_CELL;return}break}case u.HEAD:{if(t>0){this.insertionMode=b.IN_HEAD;return}break}}this.insertionMode=b.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){const n=this.openElements.tagIDs[r];if(n===u.TEMPLATE)break;if(n===u.TABLE){this.insertionMode=b.IN_SELECT_IN_TABLE;return}}this.insertionMode=b.IN_SELECT}_isElementCausesFosterParenting(t){return mi.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case u.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===C.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case u.TABLE:{const n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){const n=this.treeAdapter.getNamespaceURI(t);return Yl[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){e0(this,t);return}switch(this.insertionMode){case b.INITIAL:{Lt(this,t);break}case b.BEFORE_HTML:{jt(this,t);break}case b.BEFORE_HEAD:{$t(this,t);break}case b.IN_HEAD:{zt(this,t);break}case b.IN_HEAD_NO_SCRIPT:{Yt(this,t);break}case b.AFTER_HEAD:{Vt(this,t);break}case b.IN_BODY:case b.IN_CAPTION:case b.IN_CELL:case b.IN_TEMPLATE:{bi(this,t);break}case b.TEXT:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:{qr(this,t);break}case b.IN_TABLE_TEXT:{xi(this,t);break}case b.IN_COLUMN_GROUP:{kr(this,t);break}case b.AFTER_BODY:{Nr(this,t);break}case b.AFTER_AFTER_BODY:{gr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Jd(this,t);return}switch(this.insertionMode){case b.INITIAL:{Lt(this,t);break}case b.BEFORE_HTML:{jt(this,t);break}case b.BEFORE_HEAD:{$t(this,t);break}case b.IN_HEAD:{zt(this,t);break}case b.IN_HEAD_NO_SCRIPT:{Yt(this,t);break}case b.AFTER_HEAD:{Vt(this,t);break}case b.TEXT:{this._insertCharacters(t);break}case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:{qr(this,t);break}case b.IN_COLUMN_GROUP:{kr(this,t);break}case b.AFTER_BODY:{Nr(this,t);break}case b.AFTER_AFTER_BODY:{gr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){hn(this,t);return}switch(this.insertionMode){case b.INITIAL:case b.BEFORE_HTML:case b.BEFORE_HEAD:case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:case b.IN_BODY:case b.IN_TABLE:case b.IN_CAPTION:case b.IN_COLUMN_GROUP:case b.IN_TABLE_BODY:case b.IN_ROW:case b.IN_CELL:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:case b.IN_TEMPLATE:case b.IN_FRAMESET:case b.AFTER_FRAMESET:{hn(this,t);break}case b.IN_TABLE_TEXT:{wt(this,t);break}case b.AFTER_BODY:{Rc(this,t);break}case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:{Oc(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case b.INITIAL:{Dc(this,t);break}case b.BEFORE_HEAD:case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:{this._err(t,x.misplacedDoctype);break}case b.IN_TABLE_TEXT:{wt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,x.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?t0(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case b.INITIAL:{Lt(this,t);break}case b.BEFORE_HTML:{Pc(this,t);break}case b.BEFORE_HEAD:{vc(this,t);break}case b.IN_HEAD:{xe(this,t);break}case b.IN_HEAD_NO_SCRIPT:{Hc(this,t);break}case b.AFTER_HEAD:{jc(this,t);break}case b.IN_BODY:{oe(this,t);break}case b.IN_TABLE:{At(this,t);break}case b.IN_TABLE_TEXT:{wt(this,t);break}case b.IN_CAPTION:{Bd(this,t);break}case b.IN_COLUMN_GROUP:{$n(this,t);break}case b.IN_TABLE_BODY:{Mr(this,t);break}case b.IN_ROW:{vr(this,t);break}case b.IN_CELL:{Ud(this,t);break}case b.IN_SELECT:{Ci(this,t);break}case b.IN_SELECT_IN_TABLE:{$d(this,t);break}case b.IN_TEMPLATE:{Yd(this,t);break}case b.AFTER_BODY:{qd(this,t);break}case b.IN_FRAMESET:{Gd(this,t);break}case b.AFTER_FRAMESET:{Kd(this,t);break}case b.AFTER_AFTER_BODY:{Xd(this,t);break}case b.AFTER_AFTER_FRAMESET:{Zd(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?r0(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case b.INITIAL:{Lt(this,t);break}case b.BEFORE_HTML:{Mc(this,t);break}case b.BEFORE_HEAD:{Bc(this,t);break}case b.IN_HEAD:{Fc(this,t);break}case b.IN_HEAD_NO_SCRIPT:{Uc(this,t);break}case b.AFTER_HEAD:{$c(this,t);break}case b.IN_BODY:{Pr(this,t);break}case b.TEXT:{Id(this,t);break}case b.IN_TABLE:{Kt(this,t);break}case b.IN_TABLE_TEXT:{wt(this,t);break}case b.IN_CAPTION:{Fd(this,t);break}case b.IN_COLUMN_GROUP:{Hd(this,t);break}case b.IN_TABLE_BODY:{mn(this,t);break}case b.IN_ROW:{Ni(this,t);break}case b.IN_CELL:{jd(this,t);break}case b.IN_SELECT:{yi(this,t);break}case b.IN_SELECT_IN_TABLE:{zd(this,t);break}case b.IN_TEMPLATE:{Vd(this,t);break}case b.AFTER_BODY:{Si(this,t);break}case b.IN_FRAMESET:{Wd(this,t);break}case b.AFTER_FRAMESET:{Qd(this,t);break}case b.AFTER_AFTER_BODY:{gr(this,t);break}}}onEof(t){switch(this.insertionMode){case b.INITIAL:{Lt(this,t);break}case b.BEFORE_HTML:{jt(this,t);break}case b.BEFORE_HEAD:{$t(this,t);break}case b.IN_HEAD:{zt(this,t);break}case b.IN_HEAD_NO_SCRIPT:{Yt(this,t);break}case b.AFTER_HEAD:{Vt(this,t);break}case b.IN_BODY:case b.IN_TABLE:case b.IN_CAPTION:case b.IN_COLUMN_GROUP:case b.IN_TABLE_BODY:case b.IN_ROW:case b.IN_CELL:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:{Ai(this,t);break}case b.TEXT:{Sd(this,t);break}case b.IN_TABLE_TEXT:{wt(this,t);break}case b.IN_TEMPLATE:{Ii(this,t);break}case b.AFTER_BODY:case b.IN_FRAMESET:case b.AFTER_FRAMESET:case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:{jn(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===h.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:case b.TEXT:case b.IN_COLUMN_GROUP:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:case b.IN_FRAMESET:case b.AFTER_FRAMESET:{this._insertCharacters(t);break}case b.IN_BODY:case b.IN_CAPTION:case b.IN_CELL:case b.IN_TEMPLATE:case b.AFTER_BODY:case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:{pi(this,t);break}case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:{qr(this,t);break}case b.IN_TABLE_TEXT:{_i(this,t);break}}}}function Cc(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):Ti(e,t),r}function yc(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const s=e.openElements.items[n];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[n])&&(r=s)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function Ic(e,t,r){let n=t,s=e.openElements.getCommonAncestor(t);for(let a=0,i=s;i!==r;a++,i=s){s=e.openElements.getCommonAncestor(i);const o=e.activeFormattingElements.getElementEntry(i),l=o&&a>=kc;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(i)):(i=Sc(e,o),n===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(i,n),n=i)}return n}function Sc(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function Lc(e,t,r){const n=e.treeAdapter.getTagName(t),s=xt(n);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(r);else{const a=e.treeAdapter.getNamespaceURI(t);s===u.TEMPLATE&&a===C.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function wc(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:s}=r,a=e.treeAdapter.createElement(s.tagName,n,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,s.tagID)}function Un(e,t){for(let r=0;r=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(n);if(s&&!s.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],i=e.treeAdapter.getNodeSourceCodeLocation(a);i&&!i.endTag&&e._setEndLocation(a,t)}}}}function Dc(e,t){e._setDocumentType(t);const r=t.forceQuirks?me.QUIRKS:lc(t);oc(t)||e._err(t,x.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=b.BEFORE_HTML}function Lt(e,t){e._err(t,x.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,me.QUIRKS),e.insertionMode=b.BEFORE_HTML,e._processToken(t)}function Pc(e,t){t.tagID===u.HTML?(e._insertElement(t,C.HTML),e.insertionMode=b.BEFORE_HEAD):jt(e,t)}function Mc(e,t){const r=t.tagID;(r===u.HTML||r===u.HEAD||r===u.BODY||r===u.BR)&&jt(e,t)}function jt(e,t){e._insertFakeRootElement(),e.insertionMode=b.BEFORE_HEAD,e._processToken(t)}function vc(e,t){switch(t.tagID){case u.HTML:{oe(e,t);break}case u.HEAD:{e._insertElement(t,C.HTML),e.headElement=e.openElements.current,e.insertionMode=b.IN_HEAD;break}default:$t(e,t)}}function Bc(e,t){const r=t.tagID;r===u.HEAD||r===u.BODY||r===u.HTML||r===u.BR?$t(e,t):e._err(t,x.endTagWithoutMatchingOpenElement)}function $t(e,t){e._insertFakeElement(A.HEAD,u.HEAD),e.headElement=e.openElements.current,e.insertionMode=b.IN_HEAD,e._processToken(t)}function xe(e,t){switch(t.tagID){case u.HTML:{oe(e,t);break}case u.BASE:case u.BASEFONT:case u.BGSOUND:case u.LINK:case u.META:{e._appendElement(t,C.HTML),t.ackSelfClosing=!0;break}case u.TITLE:{e._switchToTextParsing(t,re.RCDATA);break}case u.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,re.RAWTEXT):(e._insertElement(t,C.HTML),e.insertionMode=b.IN_HEAD_NO_SCRIPT);break}case u.NOFRAMES:case u.STYLE:{e._switchToTextParsing(t,re.RAWTEXT);break}case u.SCRIPT:{e._switchToTextParsing(t,re.SCRIPT_DATA);break}case u.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=b.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(b.IN_TEMPLATE);break}case u.HEAD:{e._err(t,x.misplacedStartTagForHeadElement);break}default:zt(e,t)}}function Fc(e,t){switch(t.tagID){case u.HEAD:{e.openElements.pop(),e.insertionMode=b.AFTER_HEAD;break}case u.BODY:case u.BR:case u.HTML:{zt(e,t);break}case u.TEMPLATE:{it(e,t);break}default:e._err(t,x.endTagWithoutMatchingOpenElement)}}function it(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==u.TEMPLATE&&e._err(t,x.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(u.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,x.endTagWithoutMatchingOpenElement)}function zt(e,t){e.openElements.pop(),e.insertionMode=b.AFTER_HEAD,e._processToken(t)}function Hc(e,t){switch(t.tagID){case u.HTML:{oe(e,t);break}case u.BASEFONT:case u.BGSOUND:case u.HEAD:case u.LINK:case u.META:case u.NOFRAMES:case u.STYLE:{xe(e,t);break}case u.NOSCRIPT:{e._err(t,x.nestedNoscriptInHead);break}default:Yt(e,t)}}function Uc(e,t){switch(t.tagID){case u.NOSCRIPT:{e.openElements.pop(),e.insertionMode=b.IN_HEAD;break}case u.BR:{Yt(e,t);break}default:e._err(t,x.endTagWithoutMatchingOpenElement)}}function Yt(e,t){const r=t.type===$.EOF?x.openElementsLeftAfterEof:x.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=b.IN_HEAD,e._processToken(t)}function jc(e,t){switch(t.tagID){case u.HTML:{oe(e,t);break}case u.BODY:{e._insertElement(t,C.HTML),e.framesetOk=!1,e.insertionMode=b.IN_BODY;break}case u.FRAMESET:{e._insertElement(t,C.HTML),e.insertionMode=b.IN_FRAMESET;break}case u.BASE:case u.BASEFONT:case u.BGSOUND:case u.LINK:case u.META:case u.NOFRAMES:case u.SCRIPT:case u.STYLE:case u.TEMPLATE:case u.TITLE:{e._err(t,x.abandonedHeadElementChild),e.openElements.push(e.headElement,u.HEAD),xe(e,t),e.openElements.remove(e.headElement);break}case u.HEAD:{e._err(t,x.misplacedStartTagForHeadElement);break}default:Vt(e,t)}}function $c(e,t){switch(t.tagID){case u.BODY:case u.HTML:case u.BR:{Vt(e,t);break}case u.TEMPLATE:{it(e,t);break}default:e._err(t,x.endTagWithoutMatchingOpenElement)}}function Vt(e,t){e._insertFakeElement(A.BODY,u.BODY),e.insertionMode=b.IN_BODY,Dr(e,t)}function Dr(e,t){switch(t.type){case $.CHARACTER:{bi(e,t);break}case $.WHITESPACE_CHARACTER:{pi(e,t);break}case $.COMMENT:{hn(e,t);break}case $.START_TAG:{oe(e,t);break}case $.END_TAG:{Pr(e,t);break}case $.EOF:{Ai(e,t);break}}}function pi(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function bi(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function zc(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Yc(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function Vc(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,C.HTML),e.insertionMode=b.IN_FRAMESET)}function qc(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,C.HTML)}function Gc(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&fn.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,C.HTML)}function Wc(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,C.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Kc(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,C.HTML),r||(e.formElement=e.openElements.current))}function Qc(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const s=e.openElements.tagIDs[n];if(r===u.LI&&s===u.LI||(r===u.DD||r===u.DT)&&(s===u.DD||s===u.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==u.ADDRESS&&s!==u.DIV&&s!==u.P&&e._isSpecialElement(e.openElements.items[n],s))break}e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,C.HTML)}function Xc(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,C.HTML),e.tokenizer.state=re.PLAINTEXT}function Zc(e,t){e.openElements.hasInScope(u.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(u.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.framesetOk=!1}function Jc(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(A.A);r&&(Un(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ed(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function td(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(u.NOBR)&&(Un(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,C.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function rd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function nd(e,t){e.treeAdapter.getDocumentMode(e.document)!==me.QUIRKS&&e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,C.HTML),e.framesetOk=!1,e.insertionMode=b.IN_TABLE}function Ei(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,C.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gi(e){const t=ii(e,rt.TYPE);return t!=null&&t.toLowerCase()===_c}function sd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,C.HTML),gi(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ad(e,t){e._appendElement(t,C.HTML),t.ackSelfClosing=!0}function id(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._appendElement(t,C.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ud(e,t){t.tagName=A.IMG,t.tagID=u.IMG,Ei(e,t)}function od(e,t){e._insertElement(t,C.HTML),e.skipNextNewLine=!0,e.tokenizer.state=re.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=b.TEXT}function ld(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,re.RAWTEXT)}function cd(e,t){e.framesetOk=!1,e._switchToTextParsing(t,re.RAWTEXT)}function $s(e,t){e._switchToTextParsing(t,re.RAWTEXT)}function dd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===b.IN_TABLE||e.insertionMode===b.IN_CAPTION||e.insertionMode===b.IN_TABLE_BODY||e.insertionMode===b.IN_ROW||e.insertionMode===b.IN_CELL?b.IN_SELECT_IN_TABLE:b.IN_SELECT}function fd(e,t){e.openElements.currentTagId===u.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML)}function hd(e,t){e.openElements.hasInScope(u.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,C.HTML)}function md(e,t){e.openElements.hasInScope(u.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(u.RTC),e._insertElement(t,C.HTML)}function pd(e,t){e._reconstructActiveFormattingElements(),fi(t),Hn(t),t.selfClosing?e._appendElement(t,C.MATHML):e._insertElement(t,C.MATHML),t.ackSelfClosing=!0}function bd(e,t){e._reconstructActiveFormattingElements(),hi(t),Hn(t),t.selfClosing?e._appendElement(t,C.SVG):e._insertElement(t,C.SVG),t.ackSelfClosing=!0}function zs(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML)}function oe(e,t){switch(t.tagID){case u.I:case u.S:case u.B:case u.U:case u.EM:case u.TT:case u.BIG:case u.CODE:case u.FONT:case u.SMALL:case u.STRIKE:case u.STRONG:{ed(e,t);break}case u.A:{Jc(e,t);break}case u.H1:case u.H2:case u.H3:case u.H4:case u.H5:case u.H6:{Gc(e,t);break}case u.P:case u.DL:case u.OL:case u.UL:case u.DIV:case u.DIR:case u.NAV:case u.MAIN:case u.MENU:case u.ASIDE:case u.CENTER:case u.FIGURE:case u.FOOTER:case u.HEADER:case u.HGROUP:case u.DIALOG:case u.DETAILS:case u.ADDRESS:case u.ARTICLE:case u.SEARCH:case u.SECTION:case u.SUMMARY:case u.FIELDSET:case u.BLOCKQUOTE:case u.FIGCAPTION:{qc(e,t);break}case u.LI:case u.DD:case u.DT:{Qc(e,t);break}case u.BR:case u.IMG:case u.WBR:case u.AREA:case u.EMBED:case u.KEYGEN:{Ei(e,t);break}case u.HR:{id(e,t);break}case u.RB:case u.RTC:{hd(e,t);break}case u.RT:case u.RP:{md(e,t);break}case u.PRE:case u.LISTING:{Wc(e,t);break}case u.XMP:{ld(e,t);break}case u.SVG:{bd(e,t);break}case u.HTML:{zc(e,t);break}case u.BASE:case u.LINK:case u.META:case u.STYLE:case u.TITLE:case u.SCRIPT:case u.BGSOUND:case u.BASEFONT:case u.TEMPLATE:{xe(e,t);break}case u.BODY:{Yc(e,t);break}case u.FORM:{Kc(e,t);break}case u.NOBR:{td(e,t);break}case u.MATH:{pd(e,t);break}case u.TABLE:{nd(e,t);break}case u.INPUT:{sd(e,t);break}case u.PARAM:case u.TRACK:case u.SOURCE:{ad(e,t);break}case u.IMAGE:{ud(e,t);break}case u.BUTTON:{Zc(e,t);break}case u.APPLET:case u.OBJECT:case u.MARQUEE:{rd(e,t);break}case u.IFRAME:{cd(e,t);break}case u.SELECT:{dd(e,t);break}case u.OPTION:case u.OPTGROUP:{fd(e,t);break}case u.NOEMBED:case u.NOFRAMES:{$s(e,t);break}case u.FRAMESET:{Vc(e,t);break}case u.TEXTAREA:{od(e,t);break}case u.NOSCRIPT:{e.options.scriptingEnabled?$s(e,t):zs(e,t);break}case u.PLAINTEXT:{Xc(e,t);break}case u.COL:case u.TH:case u.TD:case u.TR:case u.HEAD:case u.FRAME:case u.TBODY:case u.TFOOT:case u.THEAD:case u.CAPTION:case u.COLGROUP:break;default:zs(e,t)}}function Ed(e,t){if(e.openElements.hasInScope(u.BODY)&&(e.insertionMode=b.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function gd(e,t){e.openElements.hasInScope(u.BODY)&&(e.insertionMode=b.AFTER_BODY,Si(e,t))}function Td(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function Ad(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(u.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(u.FORM):r&&e.openElements.remove(r))}function _d(e){e.openElements.hasInButtonScope(u.P)||e._insertFakeElement(A.P,u.P),e._closePElement()}function xd(e){e.openElements.hasInListItemScope(u.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(u.LI),e.openElements.popUntilTagNamePopped(u.LI))}function kd(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function Nd(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Cd(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function yd(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(A.BR,u.BR),e.openElements.pop(),e.framesetOk=!1}function Ti(e,t){const r=t.tagName,n=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],i=e.openElements.tagIDs[s];if(n===i&&(n!==u.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,i))break}}function Pr(e,t){switch(t.tagID){case u.A:case u.B:case u.I:case u.S:case u.U:case u.EM:case u.TT:case u.BIG:case u.CODE:case u.FONT:case u.NOBR:case u.SMALL:case u.STRIKE:case u.STRONG:{Un(e,t);break}case u.P:{_d(e);break}case u.DL:case u.UL:case u.OL:case u.DIR:case u.DIV:case u.NAV:case u.PRE:case u.MAIN:case u.MENU:case u.ASIDE:case u.BUTTON:case u.CENTER:case u.FIGURE:case u.FOOTER:case u.HEADER:case u.HGROUP:case u.DIALOG:case u.ADDRESS:case u.ARTICLE:case u.DETAILS:case u.SEARCH:case u.SECTION:case u.SUMMARY:case u.LISTING:case u.FIELDSET:case u.BLOCKQUOTE:case u.FIGCAPTION:{Td(e,t);break}case u.LI:{xd(e);break}case u.DD:case u.DT:{kd(e,t);break}case u.H1:case u.H2:case u.H3:case u.H4:case u.H5:case u.H6:{Nd(e);break}case u.BR:{yd(e);break}case u.BODY:{Ed(e,t);break}case u.HTML:{gd(e,t);break}case u.FORM:{Ad(e);break}case u.APPLET:case u.OBJECT:case u.MARQUEE:{Cd(e,t);break}case u.TEMPLATE:{it(e,t);break}default:Ti(e,t)}}function Ai(e,t){e.tmplInsertionModeStack.length>0?Ii(e,t):jn(e,t)}function Id(e,t){var r;t.tagID===u.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Sd(e,t){e._err(t,x.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function qr(e,t){if(e.openElements.currentTagId!==void 0&&mi.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=b.IN_TABLE_TEXT,t.type){case $.CHARACTER:{xi(e,t);break}case $.WHITESPACE_CHARACTER:{_i(e,t);break}}else tr(e,t)}function Ld(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,C.HTML),e.insertionMode=b.IN_CAPTION}function wd(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,C.HTML),e.insertionMode=b.IN_COLUMN_GROUP}function Rd(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(A.COLGROUP,u.COLGROUP),e.insertionMode=b.IN_COLUMN_GROUP,$n(e,t)}function Od(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,C.HTML),e.insertionMode=b.IN_TABLE_BODY}function Dd(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(A.TBODY,u.TBODY),e.insertionMode=b.IN_TABLE_BODY,Mr(e,t)}function Pd(e,t){e.openElements.hasInTableScope(u.TABLE)&&(e.openElements.popUntilTagNamePopped(u.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Md(e,t){gi(t)?e._appendElement(t,C.HTML):tr(e,t),t.ackSelfClosing=!0}function vd(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,C.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function At(e,t){switch(t.tagID){case u.TD:case u.TH:case u.TR:{Dd(e,t);break}case u.STYLE:case u.SCRIPT:case u.TEMPLATE:{xe(e,t);break}case u.COL:{Rd(e,t);break}case u.FORM:{vd(e,t);break}case u.TABLE:{Pd(e,t);break}case u.TBODY:case u.TFOOT:case u.THEAD:{Od(e,t);break}case u.INPUT:{Md(e,t);break}case u.CAPTION:{Ld(e,t);break}case u.COLGROUP:{wd(e,t);break}default:tr(e,t)}}function Kt(e,t){switch(t.tagID){case u.TABLE:{e.openElements.hasInTableScope(u.TABLE)&&(e.openElements.popUntilTagNamePopped(u.TABLE),e._resetInsertionMode());break}case u.TEMPLATE:{it(e,t);break}case u.BODY:case u.CAPTION:case u.COL:case u.COLGROUP:case u.HTML:case u.TBODY:case u.TD:case u.TFOOT:case u.TH:case u.THEAD:case u.TR:break;default:tr(e,t)}}function tr(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Dr(e,t),e.fosterParentingEnabled=r}function _i(e,t){e.pendingCharacterTokens.push(t)}function xi(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wt(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r0&&e.openElements.currentTagId===u.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===u.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===u.OPTGROUP&&e.openElements.pop();break}case u.OPTION:{e.openElements.currentTagId===u.OPTION&&e.openElements.pop();break}case u.SELECT:{e.openElements.hasInSelectScope(u.SELECT)&&(e.openElements.popUntilTagNamePopped(u.SELECT),e._resetInsertionMode());break}case u.TEMPLATE:{it(e,t);break}}}function $d(e,t){const r=t.tagID;r===u.CAPTION||r===u.TABLE||r===u.TBODY||r===u.TFOOT||r===u.THEAD||r===u.TR||r===u.TD||r===u.TH?(e.openElements.popUntilTagNamePopped(u.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ci(e,t)}function zd(e,t){const r=t.tagID;r===u.CAPTION||r===u.TABLE||r===u.TBODY||r===u.TFOOT||r===u.THEAD||r===u.TR||r===u.TD||r===u.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(u.SELECT),e._resetInsertionMode(),e.onEndTag(t)):yi(e,t)}function Yd(e,t){switch(t.tagID){case u.BASE:case u.BASEFONT:case u.BGSOUND:case u.LINK:case u.META:case u.NOFRAMES:case u.SCRIPT:case u.STYLE:case u.TEMPLATE:case u.TITLE:{xe(e,t);break}case u.CAPTION:case u.COLGROUP:case u.TBODY:case u.TFOOT:case u.THEAD:{e.tmplInsertionModeStack[0]=b.IN_TABLE,e.insertionMode=b.IN_TABLE,At(e,t);break}case u.COL:{e.tmplInsertionModeStack[0]=b.IN_COLUMN_GROUP,e.insertionMode=b.IN_COLUMN_GROUP,$n(e,t);break}case u.TR:{e.tmplInsertionModeStack[0]=b.IN_TABLE_BODY,e.insertionMode=b.IN_TABLE_BODY,Mr(e,t);break}case u.TD:case u.TH:{e.tmplInsertionModeStack[0]=b.IN_ROW,e.insertionMode=b.IN_ROW,vr(e,t);break}default:e.tmplInsertionModeStack[0]=b.IN_BODY,e.insertionMode=b.IN_BODY,oe(e,t)}}function Vd(e,t){t.tagID===u.TEMPLATE&&it(e,t)}function Ii(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(u.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):jn(e,t)}function qd(e,t){t.tagID===u.HTML?oe(e,t):Nr(e,t)}function Si(e,t){var r;if(t.tagID===u.HTML){if(e.fragmentContext||(e.insertionMode=b.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===u.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else Nr(e,t)}function Nr(e,t){e.insertionMode=b.IN_BODY,Dr(e,t)}function Gd(e,t){switch(t.tagID){case u.HTML:{oe(e,t);break}case u.FRAMESET:{e._insertElement(t,C.HTML);break}case u.FRAME:{e._appendElement(t,C.HTML),t.ackSelfClosing=!0;break}case u.NOFRAMES:{xe(e,t);break}}}function Wd(e,t){t.tagID===u.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==u.FRAMESET&&(e.insertionMode=b.AFTER_FRAMESET))}function Kd(e,t){switch(t.tagID){case u.HTML:{oe(e,t);break}case u.NOFRAMES:{xe(e,t);break}}}function Qd(e,t){t.tagID===u.HTML&&(e.insertionMode=b.AFTER_AFTER_FRAMESET)}function Xd(e,t){t.tagID===u.HTML?oe(e,t):gr(e,t)}function gr(e,t){e.insertionMode=b.IN_BODY,Dr(e,t)}function Zd(e,t){switch(t.tagID){case u.HTML:{oe(e,t);break}case u.NOFRAMES:{xe(e,t);break}}}function Jd(e,t){t.chars=X,e._insertCharacters(t)}function e0(e,t){e._insertCharacters(t),e.framesetOk=!1}function Li(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==C.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function t0(e,t){if(bc(t))Li(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===C.MATHML?fi(t):n===C.SVG&&(Ec(t),hi(t)),Hn(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function r0(e,t){if(t.tagID===u.P||t.tagID===u.BR){Li(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===C.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(n);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(r);break}}}A.AREA,A.BASE,A.BASEFONT,A.BGSOUND,A.BR,A.COL,A.EMBED,A.FRAME,A.HR,A.IMG,A.INPUT,A.KEYGEN,A.LINK,A.META,A.PARAM,A.SOURCE,A.TRACK,A.WBR;const Br=wi("end"),Se=wi("start");function wi(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Ri(e){const t=Se(e),r=Br(e);if(t&&r)return{start:t,end:r}}const n0=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,s0=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ys={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Oi(e,t){const r=m0(e),n=Wa("type",{handlers:{root:a0,element:i0,text:u0,comment:Pi,doctype:o0,raw:c0},unknown:d0}),s={parser:r?new js(Ys):js.getFragmentParser(void 0,Ys),handle(o){n(o,s)},stitches:!1,options:t||{}};n(e,s),kt(s,Se());const a=r?s.parser.document:s.parser.getFragment(),i=bl(a,{file:s.options.file});return s.stitches&&De(i,"comment",function(o,l,c){const d=o;if(d.value.stitch&&c&&l!==void 0){const f=c.children;return f[l]=d.value.stitch,l}}),i.type==="root"&&i.children.length===1&&i.children[0].type===e.type?i.children[0]:i}function Di(e,t){let r=-1;if(e)for(;++r4&&(t.parser.tokenizer.state=0);const r={type:$.CHARACTER,chars:e.value,location:rr(e)};kt(t,Se(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function o0(e,t){const r={type:$.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:rr(e)};kt(t,Se(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function l0(e,t){t.stitches=!0;const r=p0(e);if("children"in e&&"children"in r){const n=Oi({type:"root",children:e.children},t.options);r.children=n.children}Pi({type:"comment",value:{stitch:r}},t)}function Pi(e,t){const r=e.value,n={type:$.COMMENT,data:r,location:rr(e)};kt(t,Se(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function c0(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Mi(t,Se(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(n0,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function d0(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))l0(r,t);else{let n="";throw s0.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function kt(e,t){Mi(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=re.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Mi(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function f0(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===re.PLAINTEXT)return;kt(t,Se(e));const n=t.parser.openElements.current;let s="namespaceURI"in n?n.namespaceURI:tt.html;s===tt.html&&r==="svg"&&(s=tt.svg);const a=_l({...e,children:[]},{space:s===tt.svg?"svg":"html"}),i={type:$.START_TAG,tagName:r,tagID:xt(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:rr(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function h0(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Vo.includes(r)||t.parser.tokenizer.state===re.PLAINTEXT)return;kt(t,Br(e));const n={type:$.END_TAG,tagName:r,tagID:xt(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:rr(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===re.RCDATA||t.parser.tokenizer.state===re.RAWTEXT||t.parser.tokenizer.state===re.SCRIPT_DATA)&&(t.parser.tokenizer.state=re.DATA)}function m0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function rr(e){const t=Se(e)||{line:void 0,column:void 0,offset:void 0},r=Br(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function p0(e){return"children"in e?st({...e,children:[]}):st(e)}function pn(e){return function(t,r){return Oi(t,{...e,file:r})}}const Qe=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Je={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Qe,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Qe],h2:[["className","sr-only"]],img:[...Qe,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Qe,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Qe],table:[...Qe],ul:[...Qe,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ue={}.hasOwnProperty;function b0(e,t){let r={type:"root",children:[]};const n={schema:t?{...Je,...t}:Je,stack:[]},s=vi(n,e);return s&&(Array.isArray(s)?s.length===1?r=s[0]:r.children=s:r=s),r}function vi(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return E0(e,r);case"doctype":return g0(e,r);case"element":return T0(e,r);case"root":return A0(e,r);case"text":return _0(e,r)}}}function E0(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",n=r.indexOf("-->"),a={type:"comment",value:n<0?r:r.slice(0,n)};return nr(a,t),a}}function g0(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return nr(r,t),r}}function T0(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=Bi(e,t.children),s=x0(e,t.properties);e.stack.pop();let a=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(a=!0,e.schema.ancestors&&Ue.call(e.schema.ancestors,r))){const o=e.schema.ancestors[r];let l=-1;for(a=!1;++l1){let s=!1,a=0;for(;++a-1&&a>l||i>-1&&a>i||o>-1&&a>o)return!0;let c=-1;for(;++c4&&t.slice(0,4).toLowerCase()==="data")return r}function Hi(e){return function(t){return b0(t,e)}}function C0(e,t,r){const s=wo((r||{}).ignore||[]),a=y0(t);let i=-1;for(;++i0?{type:"text",value:D}:void 0),D===!1?p.lastIndex=B+1:(g!==B&&L.push({type:"text",value:c.value.slice(g,B)}),Array.isArray(D)?L.push(...D):D&&L.push(D),g=B+P[0].length,I=!0),!p.global)break;P=p.exec(c.value)}return I?(g?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const s=xs(e,"(");let a=xs(e,")");for(;n!==-1&&s>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function Ui(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||gt(r)||Rn(r))&&(!t||r!==47)}ji.peek=K0;function j0(){this.buffer()}function $0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function z0(){this.buffer()}function Y0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function V0(e){const t=this.resume(),r=this.stack[this.stack.length-1];_e(r.type==="footnoteReference"),r.identifier=Jt(this.sliceSerialize(e)).toLowerCase(),r.label=t}function q0(e){this.exit(e)}function G0(e){const t=this.resume(),r=this.stack[this.stack.length-1];_e(r.type==="footnoteDefinition"),r.identifier=Jt(this.sliceSerialize(e)).toLowerCase(),r.label=t}function W0(e){this.exit(e)}function K0(){return"["}function ji(e,t,r,n){const s=r.createTracker(n);let a=s.move("[^");const i=r.enter("footnoteReference"),o=r.enter("reference");return a+=s.move(r.safe(r.associationId(e),{after:"]",before:a})),o(),i(),a+=s.move("]"),a}function Q0(){return{enter:{gfmFootnoteCallString:j0,gfmFootnoteCall:$0,gfmFootnoteDefinitionLabelString:z0,gfmFootnoteDefinition:Y0},exit:{gfmFootnoteCallString:V0,gfmFootnoteCall:q0,gfmFootnoteDefinitionLabelString:G0,gfmFootnoteDefinition:W0}}}function X0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:ji},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,s,a,i){const o=a.createTracker(i);let l=o.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return l+=o.move(a.safe(a.associationId(n),{before:l,after:"]"})),d(),l+=o.move("]:"),n.children&&n.children.length>0&&(o.shift(4),l+=o.move((t?` +`:" ")+a.indentLines(a.containerFlow(n,o.current()),t?$i:Z0))),c(),l}}function Z0(e,t,r){return t===0?e:$i(e,t,r)}function $i(e,t,r){return(r?"":" ")+e}function J0(){return[L0(),Q0(),Oo(),Do(),Po()]}function ef(e){return{extensions:[w0(),X0(e),Mo(),vo(e),Bo()]}}const tf={tokenize:of,partial:!0},zi={tokenize:lf,partial:!0},Yi={tokenize:cf,partial:!0},Vi={tokenize:df,partial:!0},rf={tokenize:ff,partial:!0},qi={name:"wwwAutolink",tokenize:af,previous:Wi},Gi={name:"protocolAutolink",tokenize:uf,previous:Ki},Pe={name:"emailAutolink",tokenize:sf,previous:Qi},Le={};function nf(){return{text:Le}}let Xe=48;for(;Xe<123;)Le[Xe]=Pe,Xe++,Xe===58?Xe=65:Xe===91&&(Xe=97);Le[43]=Pe;Le[45]=Pe;Le[46]=Pe;Le[95]=Pe;Le[72]=[Pe,Gi];Le[104]=[Pe,Gi];Le[87]=[Pe,qi];Le[119]=[Pe,qi];function sf(e,t,r){const n=this;let s,a;return i;function i(f){return!bn(f)||!Qi.call(n,n.previous)||zn(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return bn(f)?(e.consume(f),o):f===64?(e.consume(f),l):r(f)}function l(f){return f===46?e.check(rf,d,c)(f):f===45||f===95||Gt(f)?(a=!0,e.consume(f),l):d(f)}function c(f){return e.consume(f),s=!0,l}function d(f){return a&&s&&Wt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function af(e,t,r){const n=this;return s;function s(i){return i!==87&&i!==119||!Wi.call(n,n.previous)||zn(n.events)?r(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tf,e.attempt(zi,e.attempt(Yi,a),r),r)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function uf(e,t,r){const n=this;let s="",a=!1;return i;function i(f){return(f===72||f===104)&&Ki.call(n,n.previous)&&!zn(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(f),e.consume(f),o):r(f)}function o(f){if(Wt(f)&&s.length<5)return s+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const p=s.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return r(f)}function l(f){return f===47?(e.consume(f),a?c:(a=!0,l)):r(f)}function c(f){return f===null||Fo(f)||Ie(f)||gt(f)||Rn(f)?r(f):e.attempt(zi,e.attempt(Yi,d),r)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function of(e,t,r){let n=0;return s;function s(i){return(i===87||i===119)&&n<3?(n++,e.consume(i),s):i===46&&n===3?(e.consume(i),a):r(i)}function a(i){return i===null?r(i):t(i)}}function lf(e,t,r){let n,s,a;return i;function i(c){return c===46||c===95?e.check(Vi,l,o)(c):c===null||Ie(c)||gt(c)||c!==45&&Rn(c)?l(c):(a=!0,e.consume(c),i)}function o(c){return c===95?n=!0:(s=n,n=void 0),e.consume(c),i}function l(c){return s||n||!a?r(c):t(c)}}function cf(e,t){let r=0,n=0;return s;function s(i){return i===40?(r++,e.consume(i),s):i===41&&n0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function Nt(e){const t=[];let r=-1,n=0,s=0;for(;++r55295&&a<57344){const o=e.charCodeAt(r+1);a<56320&&o>56319&&o<57344?(i=String.fromCharCode(a,o),s=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(n,r),encodeURIComponent(i)),n=r+s+1,i=""),s&&(r+=s,s=0)}return t.join("")+e.slice(n)}const hf={tokenize:_f,partial:!0};function mf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:gf,continuation:{tokenize:Tf},exit:Af}},text:{91:{name:"gfmFootnoteCall",tokenize:Ef},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pf,resolveTo:bf}}}}function pf(e,t,r){const n=this;let s=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i;for(;s--;){const l=n.events[s][1];if(l.type==="labelImage"){i=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!i||!i._balanced)return r(l);const c=Jt(n.sliceSerialize({start:i.end,end:n.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function bf(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...o),e}function Ef(e,t,r){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,i;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!i||f===null||f===91||Ie(f))return r(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(Jt(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return Ie(f)||(i=!0),a++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function gf(e,t,r){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,i=0,o;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):r(g)}function d(g){if(i>999||g===93&&!o||g===null||g===91||Ie(g))return r(g);if(g===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return a=Jt(n.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ie(g)||(o=!0),i++,e.consume(g),g===92?f:d}function f(g){return g===91||g===92||g===93?(e.consume(g),i++,d):d(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),s.includes(a)||s.push(a),Va(e,T,"gfmFootnoteDefinitionWhitespace")):r(g)}function T(g){return t(g)}}function Tf(e,t,r){return e.check(Ho,t,e.attempt(hf,t,r))}function Af(e){e.exit("gfmFootnoteDefinition")}function _f(e,t,r){const n=this;return Va(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const i=n.events[n.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):r(a)}}function xf(e){return Uo([nf(),mf(),jo(e),$o(),zo()])}const kf={};function Nf(e){const t=this,r=e||kf,n=t.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(xf(r)),a.push(J0()),i.push(ef(r))}var Cf=Object.defineProperty,yf=Object.defineProperties,If=Object.getOwnPropertyDescriptors,Gs=Object.getOwnPropertySymbols,Sf=Object.prototype.hasOwnProperty,Lf=Object.prototype.propertyIsEnumerable,Ws=(e,t,r)=>t in e?Cf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xi=(e,t)=>{for(var r in t||(t={}))Sf.call(t,r)&&Ws(e,r,t[r]);if(Gs)for(var r of Gs(t))Lf.call(t,r)&&Ws(e,r,t[r]);return e},Zi=(e,t)=>yf(e,If(t)),de=(e,t)=>{let r=!1,n=!1;for(let s=0;s{let r=e.substring(t,t+3)==="```",n=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return r||n||s},Rf=e=>{let t=0;for(let r=0;r{let r=!1,n=!1,s=-1;for(let a=0;a(=?\s*[$]?\d)/gm,Df=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Of,(t,r,n,s)=>de(e,s)?t:`${r}\\>${n}`),Pf=/(\*\*)([^*]*\*?)$/,Mf=/(__)([^_]*?)$/,vf=/(\*\*\*)([^*]*?)$/,Bf=/(\*)([^*]*?)$/,Ff=/(_)([^_]*?)$/,Hf=/(`)([^`]*?)$/,Uf=/(~~)([^~]*?)$/,ut=/^[\s_~*`]*$/,Ji=/^[\s]*[-*+][\s]+$/,jf=/[\p{L}\p{N}_]/u,$f=/^```[^`\n]*```?$/,zf=/^\*{4,}$/,Yf=/(__)([^_]+)_$/,Vf=/(~~)([^~]+)~$/,Ks=/~~/g,ze=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:jf.test(e)},qf=(e,t)=>{let r=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")r+=1;else if(e[n]==="["&&(r-=1,r===0))return n;return-1},eu=(e,t)=>{let r=1;for(let n=t+1;n{let r=!1,n=!1;for(let s=0;s{for(let r=t;r{for(let r=t-1;r>=0;r-=1){if(e[r]===")")return!1;if(e[r]==="(")return r>0&&e[r-1]==="]"?Gf(e,t):!1;if(e[r]===` +`)return!1}return!1},Wf=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===">")return!1;if(e[r]==="<"){let n=r+1="a"&&n<="z"||n>="A"&&n<="Z"||n==="/"}if(e[r]===` +`)return!1}return!1},Yn=(e,t,r)=>{let n=0;for(let l=t-1;l>=0;l-=1)if(e[l]===` +`){n=l+1;break}let s=e.length;for(let l=t;l=3&&!o},Kf=(e,t,r,n)=>r==="\\"||e.includes("$")&&Fr(e,t)?!0:r!=="*"&&n==="*"?(t{let t=0,r=!1,n=e.length;for(let s=0;s0?e[s-1]:"",i=s!!(r==="\\"||e.includes("$")&&Fr(e,t)||tu(e,t)||Wf(e,t)||r==="_"||n==="_"||r&&n&&ze(r)&&ze(n)),Xf=e=>{let t=0,r=!1,n=e.length;for(let s=0;s0?e[s-1]:"",i=s{let t=0,r=0,n=!1;for(let s=0;s=3&&(t+=Math.floor(r/3)),r=0,n=!n,s+=2;continue}n||(e[s]==="*"?r+=1:(r>=3&&(t+=Math.floor(r/3)),r=0))}return r>=3&&(t+=Math.floor(r/3)),t},Vn=e=>{let t=0,r=!1;for(let n=0;n{let t=0,r=!1;for(let n=0;n{if(!t||ut.test(t))return!0;let n=e.substring(0,r).lastIndexOf(` +`),s=n===-1?0:n+1,a=e.substring(s,r);return Ji.test(a)&&t.includes(` +`)?!0:Yn(e,r,"*")},eh=e=>{let t=e.match(Pf);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return de(e,n)||$e(e,n)||Jf(e,r,n)?e:Vn(e)%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},th=(e,t,r)=>{if(!t||ut.test(t))return!0;let n=e.substring(0,r).lastIndexOf(` +`),s=n===-1?0:n+1,a=e.substring(s,r);return Ji.test(a)&&t.includes(` +`)?!0:Yn(e,r,"_")},rh=e=>{let t=e.match(Mf);if(!t){let s=e.match(Yf);if(s){let a=e.lastIndexOf(s[1]);if(!(de(e,a)||$e(e,a))&&Qs(e)%2===1)return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return de(e,n)||$e(e,n)||th(e,r,n)?e:Qs(e)%2===1?`${e}__`:e},nh=e=>{let t=!1;for(let r=0;r0?e[r-1]:"",s=r{if(!e.match(Bf))return e;let t=nh(e);if(t===-1||de(e,t)||$e(e,t))return e;let r=e.substring(t+1);return!r||ut.test(r)?e:ru(e)%2===1?`${e}*`:e},nu=e=>{let t=!1;for(let r=0;r0?e[r-1]:"",s=r{let t=e.length;for(;t>0&&e[t-1]===` +`;)t-=1;if(t{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Vn(t)%2!==1)return null;let r=t.indexOf("**"),n=nu(t);return r!==-1&&n!==-1&&r{if(!e.match(Ff))return e;let t=nu(e);if(t===-1)return e;let r=e.substring(t+1);if(!r||ut.test(r)||de(e,t)||$e(e,t))return e;if(Xf(e)%2===1){let n=ih(e);return n!==null?n:ah(e)}return e},oh=e=>{let t=Vn(e),r=ru(e);return t%2===0&&r%2===0},lh=(e,t,r)=>!t||ut.test(t)||de(e,r)||$e(e,r)?!0:Yn(e,r,"*"),ch=e=>{if(zf.test(e))return e;let t=e.match(vf);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return lh(e,r,n)?e:Zf(e)%2===1?oh(e)?e:`${e}***`:e},dh=/<[a-zA-Z/][^>]*$/,fh=e=>{let t=e.match(dh);return!t||t.index===void 0||de(e,t.index)?e:e.substring(0,t.index).trimEnd()},hh=e=>!e.match($f)||e.includes(` +`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,mh=e=>(e.match(/```/g)||[]).length%2===1,ph=e=>{let t=hh(e);if(t!==null)return t;let r=e.match(Hf);if(r&&!mh(e)){let n=r[2];if(!n||ut.test(n))return e;if(Rf(e)%2===1)return`${e}\``}return e},su=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",bh=e=>{let t=0,r=!1;for(let n=0;n{let t=0,r=!1;for(let n=0;n{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(` +`,t)!==-1&&!e.endsWith(` +`)?`${e} +$$`:`${e}$$`},Th=e=>bh(e)%2===0?e:gh(e),Ah=e=>Eh(e)%2===1?`${e}$`:e,_h=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=qf(e,t);if(n===-1||de(e,n))return null;let s=n>0&&e[n-1]==="!",a=s?n-1:n,i=e.substring(0,a);if(s)return i;let o=e.substring(n+1,t);return r==="text-only"?`${i}${o}`:`${i}[${o}](streamdown:incomplete-link)`},Xs=(e,t)=>{for(let r=0;r0&&e[r-1]==="!")continue;let n=eu(e,r);if(n===-1)return r;if(n+1{let n=t>0&&e[t-1]==="!",s=n?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,s);if(n)return a;if(r==="text-only"){let i=Xs(e,t);return e.substring(0,i)+e.substring(i+1)}return`${e}](streamdown:incomplete-link)`}if(eu(e,t)===-1){let a=e.substring(0,s);if(n)return a;if(r==="text-only"){let i=Xs(e,t);return e.substring(0,i)+e.substring(i+1)}return`${e}](streamdown:incomplete-link)`}return null},au=(e,t="protocol")=>{let r=e.lastIndexOf("](");if(r!==-1&&!de(e,r)){let n=_h(e,r,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!de(e,n)){let s=xh(e,n,t);if(s!==null)return s}return e},kh=/^-{1,2}$/,Nh=/^[\s]*-{1,2}[\s]+$/,Ch=/^={1,2}$/,yh=/^[\s]*={1,2}[\s]+$/,Ih=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(` +`);if(t===-1)return e;let r=e.substring(t+1),n=e.substring(0,t),s=r.trim();if(kh.test(s)&&!r.match(Nh)){let a=n.split(` +`).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(Ch.test(s)&&!r.match(yh)){let a=n.split(` +`).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},Sh=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),Lh=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(Sh,(t,r)=>de(e,r)?t:"\\~"),wh=e=>{var t,r;let n=e.match(Uf);if(n){let s=n[2];if(!s||ut.test(s))return e;let a=e.lastIndexOf(n[1]);if(de(e,a)||$e(e,a))return e;if(((t=e.match(Ks))==null?void 0:t.length)%2===1)return`${e}~~`}else{let s=e.match(Vf);if(s){let a=e.lastIndexOf(s[0].slice(0,2));if(de(e,a)||$e(e,a))return e;if(((r=e.match(Ks))==null?void 0:r.length)%2===1)return`${e}~`}}return e},Qr=e=>e!==!1,Rh=e=>e===!0,le={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},Oh=[{handler:{name:"singleTilde",handle:Lh,priority:le.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:Df,priority:le.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:fh,priority:le.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Ih,priority:le.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:au,priority:le.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:ch,priority:le.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:eh,priority:le.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:rh,priority:le.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:sh,priority:le.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:uh,priority:le.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:ph,priority:le.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:wh,priority:le.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Th,priority:le.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:Ah,priority:le.INLINE_KATEX},optionKey:"inlineKatex"}],Dh=e=>{var t;let r=(t=e?.linkMode)!=null?t:"protocol";return Oh.filter(({handler:n,optionKey:s})=>n.name==="links"?Qr(e?.links)||Qr(e?.images):n.name==="inlineKatex"?Rh(e?.inlineKatex):Qr(e?.[s])).map(({handler:n,earlyReturn:s})=>n.name==="links"?{handler:Zi(Xi({},n),{handle:a=>au(a,r)}),earlyReturn:r==="protocol"?s:void 0}:{handler:n,earlyReturn:s})},Ph=(e,t)=>{var r;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=Dh(t),a=((r=t?.handlers)!=null?r:[]).map(o=>{var l;return{handler:Zi(Xi({},o),{priority:(l=o.priority)!=null?l:le.DEFAULT}),earlyReturn:void 0}}),i=[...s,...a].sort((o,l)=>{var c,d;return((c=o.handler.priority)!=null?c:0)-((d=l.handler.priority)!=null?d:0)});for(let{handler:o,earlyReturn:l}of i)if(n=o.handle(n),l!=null&&l(n))return n;return n},Mh=Ph;const vh=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),iu=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Cr="-",Zs=[],Fh="arbitrary..",Hh=e=>{const t=jh(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Uh(i);const o=i.split(Cr),l=o[0]===""&&o.length>1?1:0;return uu(o,l,t)},getConflictingClassGroupIds:(i,o)=>{if(o){const l=n[i],c=r[i];return l?c?vh(c,l):l:c||Zs}return r[i]||Zs}}},uu=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],a=r.nextPart.get(s);if(a){const c=uu(e,t+1,a);if(c)return c}const i=r.validators;if(i===null)return;const o=t===0?e.join(Cr):e.slice(t).join(Cr),l=i.length;for(let c=0;ce.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Fh+n:void 0})(),jh=e=>{const{theme:t,classGroups:r}=e;return $h(r,t)},$h=(e,t)=>{const r=iu();for(const n in e){const s=e[n];qn(s,r,n,t)}return r},qn=(e,t,r,n)=>{const s=e.length;for(let a=0;a{if(typeof e=="string"){Yh(e,t,r);return}if(typeof e=="function"){Vh(e,t,r,n);return}qh(e,t,r,n)},Yh=(e,t,r)=>{const n=e===""?t:ou(t,e);n.classGroupId=r},Vh=(e,t,r,n)=>{if(Gh(e)){qn(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Bh(r,e))},qh=(e,t,r,n)=>{const s=Object.entries(e),a=s.length;for(let i=0;i{let r=e;const n=t.split(Cr),s=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,Wh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(a,i)=>{r[a]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let i=r[a];if(i!==void 0)return i;if((i=n[a])!==void 0)return s(a,i),i},set(a,i){a in r?r[a]=i:s(a,i)}}},En="!",Js=":",Kh=[],ea=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Qh=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const a=[];let i=0,o=0,l=0,c;const d=s.length;for(let N=0;Nl?c-l:void 0;return ea(a,T,p,g)};if(t){const s=t+Js,a=n;n=i=>i.startsWith(s)?a(i.slice(s.length)):ea(Kh,!1,i,void 0,!0)}if(r){const s=n;n=a=>r({className:a,parseClassName:s})}return n},Xh=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let a=0;a0&&(s.sort(),n.push(...s),s=[]),n.push(i)):s.push(i)}return s.length>0&&(s.sort(),n.push(...s)),n}},Zh=e=>({cache:Wh(e.cacheSize),parseClassName:Qh(e),sortModifiers:Xh(e),postfixLookupClassGroupIds:Jh(e),...Hh(e)}),Jh=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let n=0;n{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:i}=t,o=[],l=e.trim().split(em);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:p,modifiers:T,hasImportantModifier:g,baseClassName:N,maybePostfixModifierPosition:k}=r(f);if(p){c=f+(c.length>0?" "+c:c);continue}let I=!!k,L;if(I){const V=N.substring(0,k);L=n(V);const S=L&&i[L]?n(N):void 0;S&&S!==L&&(L=S,I=!1)}else L=n(N);if(!L){if(!I){c=f+(c.length>0?" "+c:c);continue}if(L=n(N),!L){c=f+(c.length>0?" "+c:c);continue}I=!1}const P=T.length===0?"":T.length===1?T[0]:a(T).join(":"),B=g?P+En:P,O=B+L;if(o.indexOf(O)>-1)continue;o.push(O);const D=s(L,I);for(let V=0;V0?" "+c:c)}return c},rm=(...e)=>{let t=0,r,n,s="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,s,a;const i=l=>{const c=t.reduce((d,f)=>f(d),e());return r=Zh(c),n=r.cache.get,s=r.cache.set,a=o,o(l)},o=l=>{const c=n(l);if(c)return c;const d=tm(l,r);return s(l,d),d};return a=i,(...l)=>a(rm(...l))},sm=[],ne=e=>{const t=r=>r[e]||sm;return t.isThemeGetter=!0,t},cu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,du=/^\((?:(\w[\w-]*):)?(.+)\)$/i,am=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,im=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,um=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,om=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>am.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),ke=e=>!!e&&Number.isInteger(Number(e)),Xr=e=>e.endsWith("%")&&H(e.slice(0,-1)),Re=e=>im.test(e),fu=()=>!0,dm=e=>um.test(e)&&!om.test(e),Gn=()=>!1,fm=e=>lm.test(e),hm=e=>cm.test(e),mm=e=>!w(e)&&!R(e),pm=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),bm=e=>Ve(e,pu,Gn),w=e=>cu.test(e),Ze=e=>Ve(e,bu,dm),ta=e=>Ve(e,Nm,H),Em=e=>Ve(e,gu,fu),gm=e=>Ve(e,Eu,Gn),ra=e=>Ve(e,hu,Gn),Tm=e=>Ve(e,mu,hm),cr=e=>Ve(e,Tu,fm),R=e=>du.test(e),Rt=e=>ot(e,bu),Am=e=>ot(e,Eu),na=e=>ot(e,hu),_m=e=>ot(e,pu),xm=e=>ot(e,mu),dr=e=>ot(e,Tu,!0),km=e=>ot(e,gu,!0),Ve=(e,t,r)=>{const n=cu.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ot=(e,t,r=!1)=>{const n=du.exec(e);return n?n[1]?t(n[1]):r:!1},hu=e=>e==="position"||e==="percentage",mu=e=>e==="image"||e==="url",pu=e=>e==="length"||e==="size"||e==="bg-size",bu=e=>e==="length",Nm=e=>e==="number",Eu=e=>e==="family-name",gu=e=>e==="number"||e==="weight",Tu=e=>e==="shadow",Cm=()=>{const e=ne("color"),t=ne("font"),r=ne("text"),n=ne("font-weight"),s=ne("tracking"),a=ne("leading"),i=ne("breakpoint"),o=ne("container"),l=ne("spacing"),c=ne("radius"),d=ne("shadow"),f=ne("inset-shadow"),p=ne("text-shadow"),T=ne("drop-shadow"),g=ne("blur"),N=ne("perspective"),k=ne("aspect"),I=ne("ease"),L=ne("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...B(),R,w],D=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],S=()=>[R,w,l],q=()=>[Be,"full","auto",...S()],Z=()=>[ke,"none","subgrid",R,w],ee=()=>["auto",{span:["full",ke,R,w]},ke,R,w],ue=()=>[ke,"auto",R,w],Ee=()=>["auto","min","max","fr",R,w],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...S()],K=()=>[Be,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],ge=()=>[Be,"screen","full","dvw","lvw","svw","min","max","fit",...S()],qe=()=>[Be,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],v=()=>[e,R,w],Ge=()=>[...B(),na,ra,{position:[R,w]}],Me=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ir=()=>["auto","cover","contain",_m,bm,{size:[R,w]}],ct=()=>[Xr,Rt,Ze],W=()=>["","none","full",c,R,w],se=()=>["",H,Rt,Ze],dt=()=>["solid","dashed","dotted","double"],ft=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[H,Xr,na,ra],yt=()=>["","none",g,R,w],ht=()=>["none",H,R,w],We=()=>["none",H,R,w],mt=()=>[H,R,w],Ke=()=>[Be,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Re],breakpoint:[Re],color:[fu],container:[Re],"drop-shadow":[Re],ease:["in","out","in-out"],font:[mm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Re],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Re],shadow:[Re],spacing:["px",H],text:[Re],"text-shadow":[Re],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Be,w,R,k]}],container:["container"],"container-type":[{"@container":["","normal","size",R,w]}],"container-named":[pm],columns:[{columns:[H,w,R,o]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:q()}],"inset-x":[{"inset-x":q()}],"inset-y":[{"inset-y":q()}],start:[{"inset-s":q(),start:q()}],end:[{"inset-e":q(),end:q()}],"inset-bs":[{"inset-bs":q()}],"inset-be":[{"inset-be":q()}],top:[{top:q()}],right:[{right:q()}],bottom:[{bottom:q()}],left:[{left:q()}],visibility:["visible","invisible","collapse"],z:[{z:[ke,"auto",R,w]}],basis:[{basis:[Be,"full","auto",o,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,Be,"auto","initial","none",w]}],grow:[{grow:["",H,R,w]}],shrink:[{shrink:["",H,R,w]}],order:[{order:[ke,"first","last","none",R,w]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ee()}],"auto-rows":[{"auto-rows":Ee()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],"inline-size":[{inline:["auto",...ge()]}],"min-inline-size":[{"min-inline":["auto",...ge()]}],"max-inline-size":[{"max-inline":["none",...ge()]}],"block-size":[{block:["auto",...qe()]}],"min-block-size":[{"min-block":["auto",...qe()]}],"max-block-size":[{"max-block":["none",...qe()]}],w:[{w:[o,"screen",...K()]}],"min-w":[{"min-w":[o,"screen","none",...K()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[i]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",r,Rt,Ze]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,km,Em]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xr,w]}],"font-family":[{font:[Am,gm,t]}],"font-features":[{"font-features":[w]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,R,w]}],"line-clamp":[{"line-clamp":[H,"none",R,ta]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":["none",R,w]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",R,w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:v()}],"text-color":[{text:v()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...dt(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",R,Ze]}],"text-decoration-color":[{decoration:v()}],"underline-offset":[{"underline-offset":[H,"auto",R,w]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[ke,R,w]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R,w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R,w]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ge()}],"bg-repeat":[{bg:Me()}],"bg-size":[{bg:ir()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ke,R,w],radial:["",R,w],conic:[ke,R,w]},xm,Tm]}],"bg-color":[{bg:v()}],"gradient-from-pos":[{from:ct()}],"gradient-via-pos":[{via:ct()}],"gradient-to-pos":[{to:ct()}],"gradient-from":[{from:v()}],"gradient-via":[{via:v()}],"gradient-to":[{to:v()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...dt(),"hidden","none"]}],"divide-style":[{divide:[...dt(),"hidden","none"]}],"border-color":[{border:v()}],"border-color-x":[{"border-x":v()}],"border-color-y":[{"border-y":v()}],"border-color-s":[{"border-s":v()}],"border-color-e":[{"border-e":v()}],"border-color-bs":[{"border-bs":v()}],"border-color-be":[{"border-be":v()}],"border-color-t":[{"border-t":v()}],"border-color-r":[{"border-r":v()}],"border-color-b":[{"border-b":v()}],"border-color-l":[{"border-l":v()}],"divide-color":[{divide:v()}],"outline-style":[{outline:[...dt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,R,w]}],"outline-w":[{outline:["",H,Rt,Ze]}],"outline-color":[{outline:v()}],shadow:[{shadow:["","none",d,dr,cr]}],"shadow-color":[{shadow:v()}],"inset-shadow":[{"inset-shadow":["none",f,dr,cr]}],"inset-shadow-color":[{"inset-shadow":v()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:v()}],"ring-offset-w":[{"ring-offset":[H,Ze]}],"ring-offset-color":[{"ring-offset":v()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":v()}],"text-shadow":[{"text-shadow":["none",p,dr,cr]}],"text-shadow-color":[{"text-shadow":v()}],opacity:[{opacity:[H,R,w]}],"mix-blend":[{"mix-blend":[...ft(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ft()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":v()}],"mask-image-linear-to-color":[{"mask-linear-to":v()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":v()}],"mask-image-t-to-color":[{"mask-t-to":v()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":v()}],"mask-image-r-to-color":[{"mask-r-to":v()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":v()}],"mask-image-b-to-color":[{"mask-b-to":v()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":v()}],"mask-image-l-to-color":[{"mask-l-to":v()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":v()}],"mask-image-x-to-color":[{"mask-x-to":v()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":v()}],"mask-image-y-to-color":[{"mask-y-to":v()}],"mask-image-radial":[{"mask-radial":[R,w]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":v()}],"mask-image-radial-to-color":[{"mask-radial-to":v()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":v()}],"mask-image-conic-to-color":[{"mask-conic-to":v()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ge()}],"mask-repeat":[{mask:Me()}],"mask-size":[{mask:ir()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",R,w]}],filter:[{filter:["","none",R,w]}],blur:[{blur:yt()}],brightness:[{brightness:[H,R,w]}],contrast:[{contrast:[H,R,w]}],"drop-shadow":[{"drop-shadow":["","none",T,dr,cr]}],"drop-shadow-color":[{"drop-shadow":v()}],grayscale:[{grayscale:["",H,R,w]}],"hue-rotate":[{"hue-rotate":[H,R,w]}],invert:[{invert:["",H,R,w]}],saturate:[{saturate:[H,R,w]}],sepia:[{sepia:["",H,R,w]}],"backdrop-filter":[{"backdrop-filter":["","none",R,w]}],"backdrop-blur":[{"backdrop-blur":yt()}],"backdrop-brightness":[{"backdrop-brightness":[H,R,w]}],"backdrop-contrast":[{"backdrop-contrast":[H,R,w]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,R,w]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,R,w]}],"backdrop-invert":[{"backdrop-invert":["",H,R,w]}],"backdrop-opacity":[{"backdrop-opacity":[H,R,w]}],"backdrop-saturate":[{"backdrop-saturate":[H,R,w]}],"backdrop-sepia":[{"backdrop-sepia":["",H,R,w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",R,w]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",R,w]}],ease:[{ease:["linear","initial",I,R,w]}],delay:[{delay:[H,R,w]}],animate:[{animate:["none",L,R,w]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,R,w]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:ht()}],"rotate-x":[{"rotate-x":ht()}],"rotate-y":[{"rotate-y":ht()}],"rotate-z":[{"rotate-z":ht()}],scale:[{scale:We()}],"scale-x":[{"scale-x":We()}],"scale-y":[{"scale-y":We()}],"scale-z":[{"scale-z":We()}],"scale-3d":["scale-3d"],skew:[{skew:mt()}],"skew-x":[{"skew-x":mt()}],"skew-y":[{"skew-y":mt()}],transform:[{transform:[R,w,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ke()}],"translate-x":[{"translate-x":Ke()}],"translate-y":[{"translate-y":Ke()}],"translate-z":[{"translate-z":Ke()}],"translate-none":["translate-none"],zoom:[{zoom:[ke,R,w]}],accent:[{accent:v()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:v()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R,w]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":v()}],"scrollbar-track-color":[{"scrollbar-track":v()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R,w]}],fill:[{fill:["none",...v()]}],"stroke-w":[{stroke:[H,Rt,Ze,ta]}],stroke:[{stroke:["none",...v()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Au=nm(Cm);var bt={},Zr,sa;function ym(){if(sa)return Zr;sa=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,o=/^\s+|\s+$/g,l=` +`,c="/",d="*",f="",p="comment",T="declaration";function g(k,I){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];I=I||{};var L=1,P=1;function B(j){var F=j.match(t);F&&(L+=F.length);var M=j.lastIndexOf(l);P=~M?j.length-M:P+j.length}function O(){var j={line:L,column:P};return function(F){return F.position=new D(j),q(),F}}function D(j){this.start=j,this.end={line:L,column:P},this.source=I.source}D.prototype.content=k;function V(j){var F=new Error(I.source+":"+L+":"+P+": "+j);if(F.reason=j,F.filename=I.source,F.line=L,F.column=P,F.source=k,!I.silent)throw F}function S(j){var F=j.exec(k);if(F){var M=F[0];return B(M),k=k.slice(M.length),F}}function q(){S(r)}function Z(j){var F;for(j=j||[];F=ee();)F!==!1&&j.push(F);return j}function ee(){var j=O();if(!(c!=k.charAt(0)||d!=k.charAt(1))){for(var F=2;f!=k.charAt(F)&&(d!=k.charAt(F)||c!=k.charAt(F+1));)++F;if(F+=2,f===k.charAt(F-1))return V("End of comment missing");var M=k.slice(2,F-2);return P+=2,B(M),k=k.slice(F),P+=2,j({type:p,comment:M})}}function ue(){var j=O(),F=S(n);if(F){if(ee(),!S(s))return V("property missing ':'");var M=S(a),K=j({type:T,property:N(F[0].replace(e,f)),value:M?N(M[0].replace(e,f)):f});return S(i),K}}function Ee(){var j=[];Z(j);for(var F;F=ue();)F!==!1&&(j.push(F),Z(j));return j}return q(),Ee()}function N(k){return k?k.replace(o,f):f}return Zr=g,Zr}var aa;function Im(){if(aa)return bt;aa=1;var e=bt&&bt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(bt,"__esModule",{value:!0}),bt.default=r;const t=e(ym());function r(n,s){let a=null;if(!n||typeof n!="string")return a;const i=(0,t.default)(n),o=typeof s=="function";return i.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:d}=l;o?s(c,d,l):d&&(a=a||{},a[c]=d)}),a}return bt}var Ot={},ia;function Sm(){if(ia)return Ot;ia=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(c){return!c||r.test(c)||e.test(c)},i=function(c,d){return d.toUpperCase()},o=function(c,d){return"".concat(d,"-")},l=function(c,d){return d===void 0&&(d={}),a(c)?c:(c=c.toLowerCase(),d.reactCompat?c=c.replace(s,o):c=c.replace(n,o),c.replace(t,i))};return Ot.camelCase=l,Ot}var Dt,ua;function Lm(){if(ua)return Dt;ua=1;var e=Dt&&Dt.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(Im()),r=Sm();function n(s,a){var i={};return!s||typeof s!="string"||(0,t.default)(s,function(o,l){o&&l&&(i[(0,r.camelCase)(o,a)]=l)}),i}return n.default=n,Dt=n,Dt}var wm=Lm();const Rm=Ua(wm),Wn={}.hasOwnProperty,Om=new Map,Dm=/[A-Z]/g,Pm=new Set(["table","tbody","thead","tfoot","tr"]),Mm=new Set(["td","th"]),_u="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vm(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=Ym(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=zm(r,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ye:er,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=xu(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function xu(e,t,r){if(t.type==="element")return Bm(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Fm(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Um(e,t,r);if(t.type==="mdxjsEsm")return Hm(e,t);if(t.type==="root")return jm(e,t,r);if(t.type==="text")return $m(e,t)}function Bm(e,t,r){const n=e.schema;let s=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=Ye,e.schema=s),e.ancestors.push(t);const a=Nu(e,t.tagName,!1),i=Vm(e,t);let o=Qn(e,t);return Pm.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!qo(l):!0})),ku(e,i,a,t),Kn(i,o),e.ancestors.pop(),e.schema=n,e.create(t,a,i,r)}function Fm(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return _e(n.type==="ExpressionStatement"),e.evaluater.evaluateExpression(n.expression)}Qt(e,t.position)}function Hm(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qt(e,t.position)}function Um(e,t,r){const n=e.schema;let s=n;t.name==="svg"&&n.space==="html"&&(s=Ye,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:Nu(e,t.name,!0),i=qm(e,t),o=Qn(e,t);return ku(e,i,a,t),Kn(i,o),e.ancestors.pop(),e.schema=n,e.create(t,a,i,r)}function jm(e,t,r){const n={};return Kn(n,Qn(e,t)),e.create(t,e.Fragment,n,r)}function $m(e,t){return t.value}function ku(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Kn(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function zm(e,t,r){return n;function n(s,a,i,o){const c=Array.isArray(i.children)?r:t;return o?c(a,i,o):c(a,i)}}function Ym(e,t){return r;function r(n,s,a,i){const o=Array.isArray(a.children),l=Se(n);return t(s,a,i,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Vm(e,t){const r={};let n,s;for(s in t.properties)if(s!=="children"&&Wn.call(t.properties,s)){const a=Gm(e,s,t.properties[s]);if(a){const[i,o]=a;e.tableCellAlignToStyle&&i==="align"&&typeof o=="string"&&Mm.has(t.tagName)?n=o:r[i]=o}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function qm(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];_e(a.type==="ExpressionStatement");const i=a.expression;_e(i.type==="ObjectExpression");const o=i.properties[0];_e(o.type==="SpreadElement"),Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else Qt(e,t.position);else{const s=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const o=n.value.data.estree.body[0];_e(o.type==="ExpressionStatement"),a=e.evaluater.evaluateExpression(o.expression)}else Qt(e,t.position);else a=n.value===null?!0:n.value;r[s]=a}return r}function Qn(e,t){const r=[];let n=-1;const s=e.passKeys?new Map:Om;for(;++n0&&(n.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function rp(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function np(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sp(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),s=Nt(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let i,o=e.footnoteCounts.get(n);o===void 0?(o=0,e.footnoteOrder.push(n),i=e.footnoteOrder.length):i=a+1,o+=1,e.footnoteCounts.set(n,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function ap(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ip(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Cu(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const i=s[s.length-1];return i&&i.type==="text"?i.value+=n:s.push({type:"text",value:n}),s}function up(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Cu(e,t);const s={src:Nt(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(s.title=n.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function op(e,t){const r={src:Nt(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function lp(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function cp(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Cu(e,t);const s={href:Nt(n.url||"")};n.title!==null&&n.title!==void 0&&(s.title=n.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function dp(e,t){const r={href:Nt(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fp(e,t,r){const n=e.all(t),s=r?hp(r):yu(t),a={},i=[];if(typeof t.checked=="boolean"){const d=n[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},n.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o1}function mp(e,t){const r={},n=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++s0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=Se(t.children[1]),l=Br(t.children[t.children.length-1]);o&&l&&(i.position={start:o,end:l}),s.push(i)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function Tp(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",i=r&&r.type==="table"?r.align:void 0,o=i?i.length:t.children.length;let l=-1;const c=[];for(;++l0,!0),n[0]),s=n.index+n[0].length,n=r.exec(t);return a.push(ca(t.slice(s),s>0,!1)),a.join("")}function ca(e,t,r){let n=0,s=e.length;if(t){let a=e.codePointAt(n);for(;a===oa||a===la;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(s-1);for(;a===oa||a===la;)s--,a=e.codePointAt(s-1)}return s>n?e.slice(n,s):""}function xp(e,t){const r={type:"text",value:_p(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function kp(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const Np={blockquote:Jm,break:ep,code:tp,delete:rp,emphasis:np,footnoteReference:sp,heading:ap,html:ip,imageReference:up,image:op,inlineCode:lp,linkReference:cp,link:dp,listItem:fp,list:mp,paragraph:pp,root:bp,strong:Ep,table:gp,tableCell:Ap,tableRow:Tp,text:xp,thematicBreak:kp,toml:fr,yaml:fr,definition:fr,footnoteDefinition:fr};function fr(){}function Cp(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function yp(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Ip(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Cp,n=e.options.footnoteBackLabel||yp,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l0&&g.push({type:"text",value:" "});let L=typeof r=="string"?r:r(l,T);typeof L=="string"&&(L={type:"text",value:L}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,T),className:["data-footnote-backref"]},children:Array.isArray(L)?L:[L]})}const k=d[d.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const L=k.children[k.children.length-1];L&&L.type==="text"?L.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...g)}else d.push(...g);const I={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,I),o.push(I)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...st(i),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:` +`}]}}const gn={}.hasOwnProperty,Sp={};function Lp(e,t){const r=t||Sp,n=new Map,s=new Map,a=new Map,i={...Np,...r.handlers},o={all:c,applyData:Rp,definitionById:n,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:i,one:l,options:r,patch:wp,wrap:Dp};return De(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?n:s,p=String(d.identifier).toUpperCase();f.has(p)||f.set(p,d)}}),o;function l(d,f){const p=d.type,T=o.handlers[p];if(gn.call(o.handlers,p)&&T)return T(o,d,f);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in d){const{children:N,...k}=d,I=st(k);return I.children=o.all(d),I}return st(d)}return(o.options.unknownHandler||Op)(o,d,f)}function c(d){const f=[];if("children"in d){const p=d.children;let T=-1;for(;++T0&&r.push({type:"text",value:` +`}),r}function da(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function fa(e,t){const r=Lp(e,t),n=r.one(e,void 0),s=Ip(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return s&&a.children.push({type:"text",value:` +`},s),a}function Pp(e,t){return e&&"run"in e?async function(r,n){const s=fa(r,{file:n,...t});await e.run(s,n)}:function(r,n){return fa(r,{file:n,...e||t})}}function ha(e){if(e)throw e}var en,ma;function Mp(){if(ma)return en;ma=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!f)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},i=function(c,d){r&&d.name==="__proto__"?r(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},o=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(n)return n(c,d).value}else return;return c[d]};return en=function l(){var c,d,f,p,T,g,N=arguments[0],k=1,I=arguments.length,L=!1;for(typeof N=="boolean"&&(L=N,N=arguments[1]||{},k=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});ki.length;let l;o&&i.push(s);try{l=e.apply(this,i)}catch(c){const d=c;if(o&&r)throw d;return s(d)}o||(l&&l.then&&typeof l.then=="function"?l.then(a,s):l instanceof Error?s(l):a(l))}function s(i,...o){r||(r=!0,t(i,...o))}function a(i){s(null,i)}}const Ce={basename:Hp,dirname:Up,extname:jp,join:$p,sep:"/"};function Hp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');sr(e);let r=0,n=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){r=s+1;break}}else n<0&&(a=!0,n=s+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let i=-1,o=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){r=s+1;break}}else i<0&&(a=!0,i=s+1),o>-1&&(e.codePointAt(s)===t.codePointAt(o--)?o<0&&(n=s):(o=-1,n=i));return r===n?n=i:n<0&&(n=e.length),e.slice(r,n)}function Up(e){if(sr(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function jp(e){sr(e);let t=e.length,r=-1,n=0,s=-1,a=0,i;for(;t--;){const o=e.codePointAt(t);if(o===47){if(i){n=t+1;break}continue}r<0&&(i=!0,r=t+1),o===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||r<0||a===0||a===1&&s===r-1&&s===n+1?"":e.slice(s,r)}function $p(...e){let t=-1,r;for(;++t0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Yp(e,t){let r="",n=0,s=-1,a=0,i=-1,o,l;for(;++i<=e.length;){if(i2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),s=i,a=0;continue}}else if(r.length>0){r="",n=0,s=i,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(s+1,i):r=e.slice(s+1,i),n=i-s-1;s=i,a=0}else o===46&&a>-1?a++:a=-1}return r}function sr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Vp={cwd:qp};function qp(){return"/"}function An(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Gp(e){if(typeof e=="string")e=new URL(e);else if(!An(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Wp(e)}function Wp(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r0){let[T,...g]=d;const N=n[p][1];Tn(N)&&Tn(T)&&(T=tn(!0,N,T)),n[p]=[c,T,...g]}}}}const Jp=new Xn().freeze();function an(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function un(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function on(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ba(e){if(!Tn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ea(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hr(e){return e1(e)?e:new Kp(e)}function e1(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function t1(e){return typeof e=="string"||r1(e)}function r1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Zn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var lt=Zn();function Iu(e){lt=e}var et={exec:()=>null};function Y(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(s,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(ce.caret,"$1"),r=r.replace(s,i),n},getRegex:()=>new RegExp(r,t)};return n}var n1=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},s1=/^(?:[ \t]*(?:\n|$))+/,a1=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,i1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ar=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,u1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Jn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Su=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Lu=Y(Su).replace(/bull/g,Jn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),o1=Y(Su).replace(/bull/g,Jn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),es=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,l1=/^[^\n]+/,ts=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,c1=Y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ts).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),d1=Y(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Jn).getRegex(),Hr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",rs=/|$))/,f1=Y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",rs).replace("tag",Hr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wu=Y(es).replace("hr",ar).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Hr).getRegex(),h1=Y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wu).getRegex(),ns={blockquote:h1,code:a1,def:c1,fences:i1,heading:u1,hr:ar,html:f1,lheading:Lu,list:d1,newline:s1,paragraph:wu,table:et,text:l1},ga=Y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ar).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Hr).getRegex(),m1={...ns,lheading:o1,table:ga,paragraph:Y(es).replace("hr",ar).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ga).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Hr).getRegex()},p1={...ns,html:Y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rs).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:et,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Y(es).replace("hr",ar).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Lu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},b1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,E1=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ru=/^( {2,}|\\)\n(?!\s*$)/,g1=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",n1?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Du=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,k1=Y(Du,"u").replace(/punct/g,Ct).getRegex(),N1=Y(Du,"u").replace(/punct/g,Ou).getRegex(),Pu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",C1=Y(Pu,"gu").replace(/notPunctSpace/g,ss).replace(/punctSpace/g,Ur).replace(/punct/g,Ct).getRegex(),y1=Y(Pu,"gu").replace(/notPunctSpace/g,_1).replace(/punctSpace/g,A1).replace(/punct/g,Ou).getRegex(),I1=Y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ss).replace(/punctSpace/g,Ur).replace(/punct/g,Ct).getRegex(),S1=Y(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ct).getRegex(),L1="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",w1=Y(L1,"gu").replace(/notPunctSpace/g,ss).replace(/punctSpace/g,Ur).replace(/punct/g,Ct).getRegex(),R1=Y(/\\(punct)/,"gu").replace(/punct/g,Ct).getRegex(),O1=Y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),D1=Y(rs).replace("(?:-->|$)","-->").getRegex(),P1=Y("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",D1).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,M1=Y(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",yr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Mu=Y(/^!?\[(label)\]\[(ref)\]/).replace("label",yr).replace("ref",ts).getRegex(),vu=Y(/^!?\[(ref)\](?:\[\])?/).replace("ref",ts).getRegex(),v1=Y("reflink|nolink(?!\\()","g").replace("reflink",Mu).replace("nolink",vu).getRegex(),Ta=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,as={_backpedal:et,anyPunctuation:R1,autolink:O1,blockSkip:x1,br:Ru,code:E1,del:et,delLDelim:et,delRDelim:et,emStrongLDelim:k1,emStrongRDelimAst:C1,emStrongRDelimUnd:I1,escape:b1,link:M1,nolink:vu,punctuation:T1,reflink:Mu,reflinkSearch:v1,tag:P1,text:g1,url:et},B1={...as,link:Y(/^!?\[(label)\]\((.*?)\)/).replace("label",yr).getRegex(),reflink:Y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yr).getRegex()},_n={...as,emStrongRDelimAst:y1,emStrongLDelim:N1,delLDelim:S1,delRDelim:w1,url:Y(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ta).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Y(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Aa=e=>H1[e];function Ne(e,t){if(t){if(ce.escapeTest.test(e))return e.replace(ce.escapeReplace,Aa)}else if(ce.escapeTestNoEncode.test(e))return e.replace(ce.escapeReplaceNoEncode,Aa);return e}function _a(e){try{e=encodeURI(e).replace(ce.percentDecode,"%")}catch{return null}return e}function xa(e,t){let r=e.replace(ce.findPipe,(a,i,o)=>{let l=!1,c=i;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(ce.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function j1(e,t=0){let r=t,n="";for(let s of e)if(s===" "){let a=4-r%4;n+=" ".repeat(a),r+=a}else n+=s,r++;return n}function ka(e,t,r,n,s){let a=t.href,i=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:i,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function $1(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let s=n[1];return t.split(` +`).map(a=>{let i=a.match(r.other.beginningSpace);if(i===null)return a;let[o]=i;return o.length>=s.length?a.slice(s.length):a}).join(` +`)}var Ir=class{options;rules;lexer;constructor(e){this.options=e||lt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Mt(r,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=$1(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=Mt(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Mt(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=Mt(t[0],` +`).split(` +`),n="",s="",a=[];for(;r.length>0;){let i=!1,o=[],l;for(l=0;l1,s={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),i=!1;for(;e;){let l=!1,c="",d="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let f=j1(t[2].split(` +`,1)[0],t[1].length),p=e.split(` +`,1)[0],T=!f.trim(),g=0;if(this.options.pedantic?(g=2,d=f.trimStart()):T?g=t[1].length+1:(g=f.search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=f.slice(g),g+=t[1].length),T&&this.rules.other.blankLine.test(p)&&(c+=p+` +`,e=e.substring(p.length+1),l=!0),!l){let N=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),I=this.rules.other.fencesBeginRegex(g),L=this.rules.other.headingBeginRegex(g),P=this.rules.other.htmlBeginRegex(g),B=this.rules.other.blockquoteBeginRegex(g);for(;e;){let O=e.split(` +`,1)[0],D;if(p=O,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),D=p):D=p.replace(this.rules.other.tabCharGlobal," "),I.test(p)||L.test(p)||P.test(p)||B.test(p)||N.test(p)||k.test(p))break;if(D.search(this.rules.other.nonSpaceChar)>=g||!p.trim())d+=` +`+D.slice(g);else{if(T||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||I.test(f)||L.test(f)||k.test(f))break;d+=` +`+p}T=!p.trim(),c+=O+` +`,e=e.substring(O.length+1),f=D.slice(g)}}s.loose||(i?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0)),s.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),s.raw+=c}let o=s.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let l of s.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let d={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=d.checked,s.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=d.raw+l.tokens[0].raw,l.tokens[0].text=d.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(d)):l.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):l.tokens.unshift(d)}}if(!s.loose){let c=l.tokens.filter(f=>f.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}}if(s.loose)for(let l of s.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=xa(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` +`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let i of n)this.rules.other.tableAlignRight.test(i)?a.align.push("right"):this.rules.other.tableAlignCenter.test(i)?a.align.push("center"):this.rules.other.tableAlignLeft.test(i)?a.align.push("left"):a.align.push(null);for(let i=0;i({text:o,tokens:this.lexer.inline(o),header:!1,align:a.align[l]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let r=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=Mt(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=U1(t[2],"()");if(a===-2)return;if(a>-1){let i=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],s=a[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),ka(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[n.toLowerCase()];if(!s){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return ka(r,s,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,a,i,o=s,l=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+s);(n=c.exec(t))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(i=[...a].length,n[3]||n[4]){o+=i;continue}else if((n[5]||n[6])&&s%3&&!((s+i)%3)){l+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+l);let d=[...n[0]][0].length,f=e.slice(0,s+n.index+d+i);if(Math.min(s,i)%2){let T=f.slice(1,-1);return{type:"em",raw:f,text:T,tokens:this.lexer.inlineTokens(T)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,a,i,o=s,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+s);(n=l.exec(t))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a||(i=[...a].length,i!==s))continue;if(n[3]||n[4]){o+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o);let c=[...n[0]][0].length,d=e.slice(0,s+n.index+c+i),f=d.slice(s,-s);return{type:"del",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,n;if(t[2]==="@")r=t[0],n="mailto:"+r;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);r=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},pe=class xn{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||lt,this.options.tokenizer=this.options.tokenizer||new Ir,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:ce,block:mr.normal,inline:Pt.normal};this.options.pedantic?(r.block=mr.pedantic,r.inline=Pt.pedantic):this.options.gfm&&(r.block=mr.gfm,this.options.breaks?r.inline=Pt.breaks:r.inline=Pt.gfm),this.tokenizer.rules=r}static get rules(){return{block:mr,inline:Pt}}static lex(t,r){return new xn(r).lex(t)}static lexInline(t,r){return new xn(r).inlineTokens(t)}lex(t){t=t.replace(ce.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(s=i.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let i=r.at(-1);s.raw.length===1&&i!==void 0?i.raw+=` +`:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+s.raw,i.text+=` +`+s.text,this.inlineQueue.at(-1).src=i.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+s.raw,i.text+=` +`+s.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let a=t;if(this.options.extensions?.startBlock){let i=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},o),typeof l=="number"&&l>=0&&(i=Math.min(i,l))}),i<1/0&&i>=0&&(a=t.substring(0,i+1))}if(this.state.top&&(s=this.tokenizer.paragraph(a))){let i=r.at(-1);n&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+s.raw,i.text+=` +`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(s),n=a.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let i=r.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+s.raw,i.text+=` +`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(s);continue}if(t){let i="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){this.tokenizer.lexer=this;let n=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)a=s[2]?s[2].length:0,n=n.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let i=!1,o="";for(;t;){i||(o=""),i=!1;let l;if(this.options.extensions?.inline?.some(d=>(l=d.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let d=r.at(-1);l.type==="text"&&d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,n,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t,n,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let d=1/0,f=t.slice(1),p;this.options.extensions.startInline.forEach(T=>{p=T.call({lexer:this},f),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(c=t.substring(0,d+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),i=!0;let d=r.at(-1);d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):r.push(l);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return r}},Sr=class{options;parser;constructor(t){this.options=t||lt}space(t){return""}code({text:t,lang:r,escaped:n}){let s=(r||"").match(ce.notSpaceStart)?.[0],a=t.replace(ce.endingNewline,"")+` +`;return s?'

'+(n?a:Ne(a,!0))+`
+`:"
"+(n?a:Ne(a,!0))+`
+`}blockquote({tokens:t}){return`
+${this.parser.parse(t)}
+`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`${this.parser.parseInline(t)} +`}hr(t){return`
+`}list(t){let r=t.ordered,n=t.start,s="";for(let o=0;o +`+s+" +`}listitem(t){return`
  • ${this.parser.parse(t.tokens)}
  • +`}checkbox({checked:t}){return" '}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    +`}table(t){let r="",n="";for(let a=0;a${s}`),` + +`+r+` +`+s+`
    +`}tablerow({text:t}){return` +${t} +`}tablecell(t){let r=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+r+` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${Ne(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:r,tokens:n}){let s=this.parser.parseInline(n),a=_a(t);if(a===null)return s;t=a;let i='
    ",i}image({href:t,title:r,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let a=_a(t);if(a===null)return Ne(n);t=a;let i=`${Ne(n)}{let o=a[i].flat(1/0);n=n.concat(this.walkTokens(o,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let i=r.renderers[a.name];i?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=i.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=r[a.level];i?i.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),n.renderer){let a=this.defaults.renderer||new Sr(this.defaults);for(let i in n.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,l=n.renderer[o],c=a[o];a[o]=(...d)=>{let f=l.apply(a,d);return f===!1&&(f=c.apply(a,d)),f||""}}s.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new Ir(this.defaults);for(let i in n.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,l=n.tokenizer[o],c=a[o];a[o]=(...d)=>{let f=l.apply(a,d);return f===!1&&(f=c.apply(a,d)),f}}s.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Ft;for(let i in n.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,l=n.hooks[o],c=a[o];Ft.passThroughHooks.has(i)?a[o]=d=>{if(this.defaults.async&&Ft.passThroughHooksRespectAsync.has(i))return(async()=>{let p=await l.call(a,d);return c.call(a,p)})();let f=l.call(a,d);return c.call(a,f)}:a[o]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,d);return p===!1&&(p=await c.apply(a,d)),p})();let f=l.apply(a,d);return f===!1&&(f=c.apply(a,d)),f}}s.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(o){let l=[];return l.push(i.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return pe.lex(t,r??this.defaults)}parser(t,r){return Ae.parse(t,r??this.defaults)}parseMarkdown(t){return(r,n)=>{let s={...n},a={...this.defaults,...s},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer(t):t?pe.lex:pe.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let d=await(a.hooks?await a.hooks.provideParser(t):t?Ae.parse:Ae.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(d):d})().catch(i);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer(t):t?pe.lex:pe.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser(t):t?Ae.parse:Ae.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return i(o)}}}onError(t,r){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,t){let s="

    An error occurred:

    "+Ne(n.message+"",!0)+"
    ";return r?Promise.resolve(s):s}if(r)return Promise.reject(n);throw n}}},at=new z1;function G(e,t){return at.parse(e,t)}G.options=G.setOptions=function(e){return at.setOptions(e),G.defaults=at.defaults,Iu(G.defaults),G};G.getDefaults=Zn;G.defaults=lt;G.use=function(...e){return at.use(...e),G.defaults=at.defaults,Iu(G.defaults),G};G.walkTokens=function(e,t){return at.walkTokens(e,t)};G.parseInline=at.parseInline;G.Parser=Ae;G.parser=Ae.parse;G.Renderer=Sr;G.TextRenderer=is;G.Lexer=pe;G.lexer=pe.lex;G.Tokenizer=Ir;G.Hooks=Ft;G.parse=G;G.options;G.setOptions;G.use;G.walkTokens;G.parseInline;Ae.parse;pe.lex;var Y1=300,V1="300px",q1=500;function G1(e={}){let{immediate:t=!1,debounceDelay:r=Y1,rootMargin:n=V1,idleTimeout:s=q1}=e,[a,i]=_.useState(!1),o=_.useRef(null),l=_.useRef(null),c=_.useRef(null),d=_.useMemo(()=>T=>{let g=Date.now();return window.setTimeout(()=>{T({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),f=_.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(T,g)=>window.requestIdleCallback(T,g):d,[d]),p=_.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?T=>window.cancelIdleCallback(T):T=>{clearTimeout(T)},[]);return _.useEffect(()=>{if(t){i(!0);return}let T=o.current;if(!T)return;l.current&&(clearTimeout(l.current),l.current=null),c.current&&(p(c.current),c.current=null);let g=()=>{l.current&&(clearTimeout(l.current),l.current=null),c.current&&(p(c.current),c.current=null)},N=P=>{c.current=f(B=>{B.timeRemaining()>0||B.didTimeout?(i(!0),P.disconnect()):c.current=f(()=>{i(!0),P.disconnect()},{timeout:s/2})},{timeout:s})},k=P=>{g(),l.current=window.setTimeout(()=>{var B,O;let D=P.takeRecords();(D.length===0||(O=(B=D.at(-1))==null?void 0:B.isIntersecting)!=null&&O)&&N(P)},r)},I=(P,B)=>{P.isIntersecting?k(B):g()},L=new IntersectionObserver(P=>{for(let B of P)I(B,L)},{rootMargin:n,threshold:0});return L.observe(T),()=>{l.current&&clearTimeout(l.current),c.current&&p(c.current),L.disconnect()}},[t,r,n,s,p,f]),{shouldRender:a,containerRef:o}}var Bu=/\s/,W1=/^\s+$/,K1=new Set(["code","pre","svg","math","annotation"]),Q1=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",X1=e=>e.some(t=>Q1(t)&&K1.has(t.tagName)),Z1=e=>{let t=[],r="",n=!1;for(let s of e){let a=Bu.test(s);a!==n&&r&&(t.push(r),r=""),r+=s,n=a}return r&&t.push(r),t},J1=e=>{let t=[],r="";for(let n of e)Bu.test(n)?r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&t.push(r),t},eb=(e,t,r,n,s,a)=>{let i=`--sd-animation:sd-${t};--sd-duration:${s?0:r}ms;--sd-easing:${n}`;return a&&(i+=`;--sd-delay:${a}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:i},children:[{type:"text",value:e}]}},tb=(e,t,r,n,s)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(X1(t))return vt;let i=a,o=i.children.indexOf(e);if(o===-1)return;let l=e.value;if(!l.trim()){s.count+=l.length;return}let c=r.sep==="char"?J1(l):Z1(l),d=n.prevContentLength,f=c.map(p=>{let T=s.count;if(s.count+=p.length,W1.test(p))return{type:"text",value:p};let g=d>0&&Td=>{let f={count:0,newIndex:0};Ya(d,"text",(p,T)=>tb(p,T,i,o,f)),o.lastRenderCharCount=f.count,o.prevContentLength=0};return Object.defineProperty(c,"name",{value:`rehypeAnimate$${l}`}),{name:"animate",type:"animate",rehypePlugin:c,setPrevContentLength(d){o.prevContentLength=d},getLastRenderCharCount(){let d=o.lastRenderCharCount;return o.lastRenderCharCount=0,d}}}Lr();var Fu=_.createContext(!1),Hu=()=>_.useContext(Fu),us=(...e)=>Au($a(e)),nb=(e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(n=>n.startsWith(r)?n:`${e}:${n}`).join(" ")},sb=e=>e?(...t)=>nb(e,Au($a(t))):us,nt=(e,t,r)=>{let n=typeof t=="string"&&r.startsWith("text/csv")?"\uFEFF":"",s=typeof t=="string"?new Blob([n+t],{type:r}):t,a=URL.createObjectURL(s),i=document.createElement("a");i.href=a,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(a)},Nn=_.createContext(us),U=()=>_.useContext(Nn),ab=us("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),ib=e=>{let t={};for(let r of e.split(";")){let n=r.indexOf(":");if(n>0){let s=r.slice(0,n).trim(),a=r.slice(n+1).trim();s&&a&&(t[s]=a)}}return t},ub=_.memo(({children:e,result:t,language:r,className:n,startLine:s,lineNumbers:a=!0,...i})=>{let o=U(),l=_.useMemo(()=>o(ab),[o]),c=_.useMemo(()=>{let d={};return t.bg&&(d["--sdm-bg"]=t.bg),t.fg&&(d["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(d,ib(t.rootStyle)),d},[t.bg,t.fg,t.rootStyle]);return E.jsx("div",{className:o(n,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",...i,children:E.jsx("pre",{className:o(n,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:c,children:E.jsx("code",{className:a?o("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&s&&s>1?{counterReset:`line ${s-1}`}:void 0,children:t.tokens.map((d,f)=>E.jsx("span",{className:a?l:void 0,children:d.length===0||d.length===1&&d[0].content===""?` +`:d.map((p,T)=>{let g={},N=!!p.bgColor;if(p.color&&(g["--sdm-c"]=p.color),p.bgColor&&(g["--sdm-tbg"]=p.bgColor),p.htmlStyle)for(let[k,I]of Object.entries(p.htmlStyle))k==="color"?g["--sdm-c"]=I:k==="background-color"?(g["--sdm-tbg"]=I,N=!0):g[k]=I;return E.jsx("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",N&&"bg-[var(--sdm-tbg)]",N&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:g,...p.htmlAttrs,children:p.content},T)})},f))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),Uu=({className:e,language:t,style:r,isIncomplete:n,...s})=>{let a=U();return E.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...s})},ju=_.createContext({code:""}),$u=()=>_.useContext(ju),zu=({language:e})=>{let t=U();return E.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:E.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},ob=e=>{let t=e.length;for(;t>0&&e[t-1]===` +`;)t--;return e.slice(0,t)},lb=_.lazy(()=>ja(()=>import("./highlighted-body-OFNGDK62-BAeNppwW.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.HighlightedCodeBlockBody}))),Yu=({code:e,language:t,className:r,children:n,isIncomplete:s=!1,startLine:a,lineNumbers:i,...o})=>{let l=U(),c=_.useMemo(()=>ob(e),[e]),d=_.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:c.split(` +`).map(f=>[{content:f,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[c]);return E.jsx(ju.Provider,{value:{code:e},children:E.jsxs(Uu,{isIncomplete:s,language:t,children:[E.jsx(zu,{language:t}),n?E.jsx("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsx("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:n})}):null,E.jsx(_.Suspense,{fallback:E.jsx(ub,{className:r,language:t,lineNumbers:i,result:d,startLine:a,...o}),children:E.jsx(lb,{className:r,code:c,language:t,lineNumbers:i,raw:d,startLine:a,...o})})]})})},cb=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),db=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),fb=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),hb=e=>E.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[E.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),mb=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),pb=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),bb=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Eb=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),gb=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Tb=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Ht={CheckIcon:cb,CopyIcon:db,DownloadIcon:fb,ExternalLinkIcon:Eb,Loader2Icon:hb,Maximize2Icon:mb,RotateCcwIcon:pb,XIcon:bb,ZoomInIcon:gb,ZoomOutIcon:Tb},Vu=_.createContext(Ht),Ab=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(s=>e[s]===t[s])},Na=({icons:e,children:t})=>{let r=_.useRef(e),n=_.useRef(e?{...Ht,...e}:Ht);Ab(r.current,e)||(r.current=e,n.current=e?{...Ht,...e}:Ht);let s=n.current;return E.jsx(Vu.Provider,{value:s,children:t})},be=()=>_.useContext(Vu),os={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Cn=_.createContext(os),we=()=>_.useContext(Cn),yn=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:s,code:a,...i})=>{let o=U(),[l,c]=_.useState(!1),d=_.useRef(0),{code:f}=$u(),{isAnimating:p}=_.useContext(fe),T=we(),g=a??f,N=async()=>{var L;if(typeof window>"u"||!((L=navigator?.clipboard)!=null&&L.writeText)){t?.(new Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(g),c(!0),e?.(),d.current=window.setTimeout(()=>c(!1),r))}catch(P){t?.(P)}};_.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);let k=be(),I=l?k.CheckIcon:k.CopyIcon;return E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:p,onClick:N,title:T.copyCode,type:"button",...i,children:n??E.jsx(I,{size:14})})},Ca={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},qu=({onDownload:e,onError:t,language:r,children:n,className:s,code:a,...i})=>{let o=U(),{code:l}=$u(),{isAnimating:c}=_.useContext(fe),d=we(),f=be(),p=a??l,T=`file.${r&&r in Ca?Ca[r]:"txt"}`,g="text/plain",N=()=>{try{nt(T,p,g),e?.()}catch(k){t?.(k)}};return E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:c,onClick:N,title:d.downloadFile,type:"button",...i,children:n??E.jsx(f.DownloadIcon,{size:14})})},In=()=>{let{Loader2Icon:e}=be(),t=U();return E.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[E.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),E.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:E.jsx(e,{className:t("size-4 animate-spin")})})]})},_b=/\.[^/.]+$/,xb=({node:e,className:t,src:r,alt:n,onLoad:s,onError:a,...i})=>{let{DownloadIcon:o}=be(),l=U(),c=_.useRef(null),[d,f]=_.useState(!1),[p,T]=_.useState(!1),g=we(),N=i.width!=null||i.height!=null,k=(d||N)&&!p,I=p&&!N;_.useEffect(()=>{let O=c.current;if(O!=null&&O.complete){let D=O.naturalWidth>0;f(D),T(!D)}},[]);let L=_.useCallback(O=>{f(!0),T(!1),s?.(O)},[s]),P=_.useCallback(O=>{f(!1),T(!0),a?.(O)},[a]),B=async()=>{if(r)try{let O=await(await fetch(r)).blob(),D=new URL(r,window.location.origin).pathname.split("/").pop()||"",V=D.split(".").pop(),S=D.includes(".")&&V!==void 0&&V.length<=4,q="";if(S)q=D;else{let Z=O.type,ee="png";Z.includes("jpeg")||Z.includes("jpg")?ee="jpg":Z.includes("png")?ee="png":Z.includes("svg")?ee="svg":Z.includes("gif")?ee="gif":Z.includes("webp")&&(ee="webp"),q=`${(n||D||"image").replace(_b,"")}.${ee}`}nt(q,O,O.type)}catch{window.open(r,"_blank")}};return r?E.jsxs("div",{className:l("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[E.jsx("img",{alt:n,className:l("max-w-full rounded-lg",I&&"hidden",t),"data-streamdown":"image",onError:P,onLoad:L,ref:c,src:r,...i}),I&&E.jsx("span",{className:l("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:g.imageNotAvailable}),E.jsx("div",{className:l("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),k&&E.jsx("button",{className:l("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:B,title:g.downloadImage,type:"button",children:E.jsx(o,{size:14})})]}):null},qt=0,ls=()=>{qt+=1,qt===1&&(document.body.style.overflow="hidden")},cs=()=>{qt=Math.max(0,qt-1),qt===0&&(document.body.style.overflow="")},kb=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:s,CopyIcon:a,ExternalLinkIcon:i,XIcon:o}=be(),l=U(),[c,d]=_.useState(!1),f=we(),p=_.useCallback(async()=>{try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)}catch{}},[e]),T=_.useCallback(()=>{n(),r()},[n,r]);return _.useEffect(()=>{if(t){ls();let g=N=>{N.key==="Escape"&&r()};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),cs()}}},[t,r]),t?E.jsx("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:g=>{g.key==="Escape"&&r()},role:"button",tabIndex:0,children:E.jsxs("div",{className:l("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[E.jsx("button",{className:l("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:f.close,type:"button",children:E.jsx(o,{size:16})}),E.jsxs("div",{className:l("flex flex-col gap-2"),children:[E.jsxs("div",{className:l("flex items-center gap-2 font-semibold text-lg"),children:[E.jsx(i,{size:20}),E.jsx("span",{children:f.openExternalLink})]}),E.jsx("p",{className:l("text-muted-foreground text-sm"),children:f.externalLinkWarning})]}),E.jsx("div",{className:l("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),E.jsxs("div",{className:l("flex gap-2"),children:[E.jsx("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:p,type:"button",children:c?E.jsxs(E.Fragment,{children:[E.jsx(s,{size:14}),E.jsx("span",{children:f.copied})]}):E.jsxs(E.Fragment,{children:[E.jsx(a,{size:14}),E.jsx("span",{children:f.copyLink})]})}),E.jsxs("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:T,type:"button",children:[E.jsx(i,{size:14}),E.jsx("span",{children:f.openLink})]})]})]})}):null},Sn=_.createContext(null),ds=()=>_.useContext(Sn),NE=()=>{var e;let t=ds();return(e=t?.code)!=null?e:null},fs=()=>{var e;let t=ds();return(e=t?.mermaid)!=null?e:null},Nb=e=>{var t;let r=ds();return r!=null&&r.renderers&&e&&(t=r.renderers.find(n=>Array.isArray(n.language)?n.language.includes(e):n.language===e))!=null?t:null},Cb=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((s,a)=>{let i="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let l=document.createElement("canvas"),c=o.width*n,d=o.height*n;l.width=c,l.height=d;let f=l.getContext("2d");if(!f){a(new Error("Failed to create 2D canvas context for PNG export"));return}f.drawImage(o,0,0,c,d),l.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}s(p)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=i})},yb=({chart:e,children:t,className:r,onDownload:n,config:s,onError:a})=>{let i=U(),[o,l]=_.useState(!1),c=_.useRef(null),{isAnimating:d}=_.useContext(fe),f=be(),p=fs(),T=we(),g=async N=>{try{if(N==="mmd"){nt("diagram.mmd",e,"text/plain"),l(!1),n?.(N);return}if(!p){a?.(new Error("Mermaid plugin not available"));return}let k=p.getMermaid(s),I=e.split("").reduce((B,O)=>(B<<5)-B+O.charCodeAt(0)|0,0),L=`mermaid-${Math.abs(I)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:P}=await k.render(L,e);if(!P){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(N==="svg"){nt("diagram.svg",P,"image/svg+xml"),l(!1),n?.(N);return}if(N==="png"){let B=await Cb(P);nt("diagram.png",B,"image/png"),n?.(N),l(!1);return}}catch(k){a?.(k)}};return _.useEffect(()=>{let N=k=>{let I=k.composedPath();c.current&&!I.includes(c.current)&&l(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),E.jsxs("div",{className:i("relative"),ref:c,children:[E.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:d,onClick:()=>l(!o),title:T.downloadDiagram,type:"button",children:t??E.jsx(f.DownloadIcon,{size:14})}),o?E.jsxs("div",{className:i("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("svg"),title:T.downloadDiagramAsSvg,type:"button",children:T.mermaidFormatSvg}),E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("png"),title:T.downloadDiagramAsPng,type:"button",children:T.mermaidFormatPng}),E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("mmd"),title:T.downloadDiagramAsMmd,type:"button",children:T.mermaidFormatMmd})]}):null]})},Ib=({chart:e,config:t,onFullscreen:r,onExit:n,className:s,...a})=>{let{Maximize2Icon:i,XIcon:o}=be(),l=U(),[c,d]=_.useState(!1),{isAnimating:f,controls:p}=_.useContext(fe),T=we(),g=(()=>{if(typeof p=="boolean")return p;let k=p.mermaid;return k===!1?!1:k===!0||k===void 0?!0:k.panZoom!==!1})(),N=()=>{d(!c)};return _.useEffect(()=>{if(c){ls();let k=I=>{I.key==="Escape"&&d(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k),cs()}}},[c]),_.useEffect(()=>{c?r?.():n&&n()},[c,r,n]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:f,onClick:N,title:T.viewFullscreen,type:"button",...a,children:E.jsx(i,{size:14})}),c?za.createPortal(E.jsxs("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:N,onKeyDown:k=>{k.key==="Escape"&&N()},role:"button",tabIndex:0,children:[E.jsx("button",{className:l("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:N,title:T.exitFullscreen,type:"button",children:E.jsx(o,{size:20})}),E.jsx("div",{className:l("flex size-full items-center justify-center p-4"),onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),role:"presentation",children:E.jsx(So,{chart:e,className:l("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:g})})]}),document.body):null]})},jr=e=>{var t,r;let n=[],s=[],a=e.querySelectorAll("thead th");for(let o of a)n.push(((t=o.textContent)==null?void 0:t.trim())||"");let i=e.querySelectorAll("tbody tr");for(let o of i){let l=[],c=o.querySelectorAll("td");for(let d of c)l.push(((r=d.textContent)==null?void 0:r.trim())||"");s.push(l)}return{headers:n,rows:s}},Xt=e=>{let{headers:t,rows:r}=e,n=o=>{let l=!1,c=!1;for(let d of o){if(d==='"'){l=!0,c=!0;break}(d===","||d===` +`)&&(l=!0)}return l?c?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},s=t.length>0?r.length+1:r.length,a=new Array(s),i=0;t.length>0&&(a[i]=t.map(n).join(","),i+=1);for(let o of r)a[i]=o.map(n).join(","),i+=1;return a.join(` +`)},Gu=e=>{let{headers:t,rows:r}=e,n=o=>{let l=!1;for(let d of o)if(d===" "||d===` +`||d==="\r"){l=!0;break}if(!l)return o;let c=[];for(let d of o)d===" "?c.push("\\t"):d===` +`?c.push("\\n"):d==="\r"?c.push("\\r"):c.push(d);return c.join("")},s=t.length>0?r.length+1:r.length,a=new Array(s),i=0;t.length>0&&(a[i]=t.map(n).join(" "),i+=1);for(let o of r)a[i]=o.map(n).join(" "),i+=1;return a.join(` +`)},Tr=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"){t=!0;break}if(!t)return e;let r=[];for(let n of e)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):r.push(n);return r.join("")},Zt=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let n=new Array(r.length+2),s=0,a=t.map(o=>Tr(o));n[s]=`| ${a.join(" | ")} |`,s+=1;let i=new Array(t.length);for(let o=0;oTr(c));n[s]=`| ${l.join(" | ")} |`,s+=1}return n.join(` +`)},hs=({children:e,className:t,onCopy:r,onError:n,timeout:s=2e3})=>{let a=U(),[i,o]=_.useState(!1),[l,c]=_.useState(!1),d=_.useRef(null),f=_.useRef(0),{isAnimating:p}=_.useContext(fe),T=we(),g=async I=>{var L,P;if(typeof window>"u"||!((L=navigator?.clipboard)!=null&&L.write)){n?.(new Error("Clipboard API not available"));return}try{let B=(P=d.current)==null?void 0:P.closest('[data-streamdown="table-wrapper"]'),O=B?.querySelector("table");if(!O){n?.(new Error("Table not found"));return}let D=jr(O),V=({csv:Xt,tsv:Gu,md:Zt}[I]||Zt)(D),S=new ClipboardItem({"text/plain":new Blob([V],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([S]),c(!0),o(!1),r?.(I),f.current=window.setTimeout(()=>c(!1),s)}catch(B){n?.(B)}};_.useEffect(()=>{let I=L=>{let P=L.composedPath();d.current&&!P.includes(d.current)&&o(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I),window.clearTimeout(f.current)}},[]);let N=be(),k=l?N.CheckIcon:N.CopyIcon;return E.jsxs("div",{className:a("relative"),ref:d,children:[E.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>o(!i),title:T.copyTable,type:"button",children:e??E.jsx(k,{height:14,width:14})}),i?E.jsxs("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("md"),title:T.copyTableAsMarkdown,type:"button",children:T.tableFormatMarkdown}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:T.copyTableAsCsv,type:"button",children:T.tableFormatCsv}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("tsv"),title:T.copyTableAsTsv,type:"button",children:T.tableFormatTsv})]}):null]})},Sb=({children:e,className:t,onDownload:r,onError:n,format:s="csv",filename:a})=>{let i=U(),{isAnimating:o}=_.useContext(fe),l=we(),c=be(),d=f=>{try{let p=f.currentTarget.closest('[data-streamdown="table-wrapper"]'),T=p?.querySelector("table");if(!T){n?.(new Error("Table not found"));return}let g=jr(T),N="",k="",I="";switch(s){case"csv":N=Xt(g),k="text/csv",I="csv";break;case"markdown":N=Zt(g),k="text/markdown",I="md";break;default:N=Xt(g),k="text/csv",I="csv"}nt(`${a||"table"}.${I}`,N,k),r?.()}catch(p){n?.(p)}};return E.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:d,title:s==="csv"?l.downloadTableAsCsv:l.downloadTableAsMarkdown,type:"button",children:e??E.jsx(c.DownloadIcon,{size:14})})},ms=({children:e,className:t,onDownload:r,onError:n})=>{let s=U(),[a,i]=_.useState(!1),o=_.useRef(null),{isAnimating:l}=_.useContext(fe),c=we(),d=be(),f=p=>{var T;try{let g=(T=o.current)==null?void 0:T.closest('[data-streamdown="table-wrapper"]'),N=g?.querySelector("table");if(!N){n?.(new Error("Table not found"));return}let k=jr(N),I=p==="csv"?Xt(k):Zt(k);nt(`table.${p==="csv"?"csv":"md"}`,I,p==="csv"?"text/csv":"text/markdown"),i(!1),r?.(p)}catch(g){n?.(g)}};return _.useEffect(()=>{let p=T=>{let g=T.composedPath();o.current&&!g.includes(o.current)&&i(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),E.jsxs("div",{className:s("relative"),ref:o,children:[E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:()=>i(!a),title:c.downloadTable,type:"button",children:e??E.jsx(d.DownloadIcon,{size:14})}),a?E.jsxs("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("csv"),title:c.downloadTableAsCsv,type:"button",children:c.tableFormatCsv}),E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("markdown"),title:c.downloadTableAsMarkdown,type:"button",children:c.tableFormatMarkdown})]}):null]})},Lb=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:s,XIcon:a}=be(),i=U(),[o,l]=_.useState(!1),{isAnimating:c}=_.useContext(fe),d=we(),f=()=>{l(!0)},p=()=>{l(!1)};return _.useEffect(()=>{if(o){ls();let T=g=>{g.key==="Escape"&&l(!1)};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),cs()}}},[o]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:f,title:d.viewFullscreen,type:"button",children:E.jsx(s,{size:14})}),o?za.createPortal(E.jsx("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:i("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:p,onKeyDown:T=>{T.key==="Escape"&&p()},role:"dialog",children:E.jsxs("div",{className:i("flex h-full flex-col"),onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),role:"presentation",children:[E.jsxs("div",{className:i("flex items-center justify-end gap-1 p-4"),children:[r?E.jsx(hs,{}):null,n?E.jsx(ms,{}):null,E.jsx("button",{className:i("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:d.exitFullscreen,type:"button",children:E.jsx(a,{size:20})})]}),E.jsx("div",{className:i("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:E.jsx("table",{className:i("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},wb=({children:e,className:t,showControls:r,showCopy:n=!0,showDownload:s=!0,showFullscreen:a=!0,...i})=>{let o=U(),l=r&&n,c=r&&s,d=r&&a,f=l||c||d;return E.jsxs("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[f?E.jsxs("div",{className:o("flex items-center justify-end gap-1"),children:[l?E.jsx(hs,{}):null,c?E.jsx(ms,{}):null,d?E.jsx(Lb,{showCopy:l,showDownload:c,children:e}):null]}):null,E.jsx("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:E.jsx("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...i,children:e})})]})},Rb=/startLine=(\d+)/,Ob=/\bnoLineNumbers\b/,Db=_.lazy(()=>ja(()=>Promise.resolve().then(()=>EE),void 0).then(e=>({default:e.Mermaid}))),Pb=/language-([^\s]+)/;function $r(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let r=e.position.start,n=t.position.start,s=e.position.end,a=t.position.end;return r?.line===n?.line&&r?.column===n?.column&&s?.line===a?.line&&s?.column===a?.column}function te(e,t){return e.className===t.className&&$r(e.node,t.node)}var Ln=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,ln=(e,t)=>{if(typeof e=="boolean")return e;let r=e.table;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},ya=(e,t)=>{if(typeof e=="boolean")return e;let r=e.code;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},pr=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},ps=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("ol",{className:s("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>te(e,t));ps.displayName="MarkdownOl";var Wu=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("li",{className:s("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e})},(e,t)=>e.className===t.className&&$r(e.node,t.node));Wu.displayName="MarkdownLi";var Ku=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("ul",{className:s("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>te(e,t));Ku.displayName="MarkdownUl";var Qu=_.memo(({className:e,node:t,...r})=>{let n=U();return E.jsx("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>te(e,t));Qu.displayName="MarkdownHr";var Xu=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("span",{className:s("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>te(e,t));Xu.displayName="MarkdownStrong";var Mb=({children:e,className:t,href:r,node:n,...s})=>{let a=U(),{linkSafety:i}=_.useContext(fe),[o,l]=_.useState(!1),c=r==="streamdown:incomplete-link",d=_.useCallback(async g=>{if(!(!(i!=null&&i.enabled&&r)||c)){if(g.preventDefault(),i.onLinkCheck&&await i.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}l(!0)}},[i,r,c]),f=_.useCallback(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),p=_.useCallback(()=>{l(!1)},[]),T={url:r??"",isOpen:o,onClose:p,onConfirm:f};return i!=null&&i.enabled&&r?E.jsxs(E.Fragment,{children:[E.jsx("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",onClick:d,type:"button",children:e}),i.renderModal?i.renderModal(T):E.jsx(kb,{...T})]}):E.jsx("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...s,children:e})},Zu=_.memo(Mb,(e,t)=>te(e,t)&&e.href===t.href);Zu.displayName="MarkdownA";var Ju=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("h1",{className:s("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>te(e,t));Ju.displayName="MarkdownH1";var eo=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("h2",{className:s("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>te(e,t));eo.displayName="MarkdownH2";var to=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("h3",{className:s("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>te(e,t));to.displayName="MarkdownH3";var ro=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("h4",{className:s("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>te(e,t));ro.displayName="MarkdownH4";var no=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("h5",{className:s("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>te(e,t));no.displayName="MarkdownH5";var so=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("h6",{className:s("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>te(e,t));so.displayName="MarkdownH6";var ao=_.memo(({children:e,className:t,node:r,...n})=>{let{controls:s}=_.useContext(fe),a=Ln(s,"table"),i=ln(s,"copy"),o=ln(s,"download"),l=ln(s,"fullscreen");return E.jsx(wb,{className:t,showControls:a,showCopy:i,showDownload:o,showFullscreen:l,...n,children:e})},(e,t)=>te(e,t));ao.displayName="MarkdownTable";var io=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("thead",{className:s("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>te(e,t));io.displayName="MarkdownThead";var uo=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("tbody",{className:s("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>te(e,t));uo.displayName="MarkdownTbody";var oo=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("tr",{className:s("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>te(e,t));oo.displayName="MarkdownTr";var lo=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("th",{className:s("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>te(e,t));lo.displayName="MarkdownTh";var co=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("td",{className:s("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>te(e,t));co.displayName="MarkdownTd";var fo=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("blockquote",{className:s("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>te(e,t));fo.displayName="MarkdownBlockquote";var ho=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("sup",{className:s("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>te(e,t));ho.displayName="MarkdownSup";var mo=_.memo(({children:e,className:t,node:r,...n})=>{let s=U();return E.jsx("sub",{className:s("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>te(e,t));mo.displayName="MarkdownSub";var po=_.memo(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let s=i=>{var o,l;if(!_.isValidElement(i))return!1;let c=Array.isArray(i.props.children)?i.props.children:[i.props.children],d=!1,f=!1;for(let p of c)if(p){if(typeof p=="string")p.trim()!==""&&(d=!0);else if(_.isValidElement(p))if(((o=p.props)==null?void 0:o["data-footnote-backref"])!==void 0)f=!0;else{let T=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let g of T){if(typeof g=="string"&&g.trim()!==""){d=!0;break}if(_.isValidElement(g)&&((l=g.props)==null?void 0:l["data-footnote-backref"])===void 0){d=!0;break}}}}return f&&!d},a=Array.isArray(e)?e.map(i=>{if(!_.isValidElement(i))return i;if(i.type===ps){let o=(Array.isArray(i.props.children)?i.props.children:[i.props.children]).filter(l=>!s(l));return o.length===0?null:{...i,props:{...i.props,children:o}}}return i}):e;return(Array.isArray(a)?a.some(i=>i!==null):a!==null)?E.jsx("section",{className:t,...n,children:a}):null}return E.jsx("section",{className:t,...n,children:e})},(e,t)=>te(e,t));po.displayName="MarkdownSection";var vb=({node:e,className:t,children:r,...n})=>{var s,a;let i=U(),o=!("data-block"in n),{mermaid:l,controls:c,lineNumbers:d}=_.useContext(fe),f=fs(),p=Hu(),T=t?.match(Pb),g=(s=T?.at(1))!=null?s:"",N=Nb(g);if(o)return E.jsx("code",{className:i("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let k=(a=e?.properties)==null?void 0:a.metastring,I=k?.match(Rb),L=I?Number.parseInt(I[1],10):void 0,P=L!==void 0&&L>=1?L:void 0,B=!(k&&Ob.test(k))&&d!==!1,O="";if(_.isValidElement(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?O=r.props.children:typeof r=="string"&&(O=r),N){let q=N.component;return E.jsx(_.Suspense,{fallback:E.jsx(In,{}),children:E.jsx(q,{code:O,isIncomplete:p,language:g,meta:k})})}if(g==="mermaid"&&f){let q=Ln(c,"mermaid"),Z=pr(c,"download"),ee=pr(c,"copy"),ue=pr(c,"fullscreen"),Ee=pr(c,"panZoom"),j=q&&(Z||ee||ue);return E.jsx(_.Suspense,{fallback:E.jsx(In,{}),children:E.jsxs("div",{className:i("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[E.jsx("div",{className:i("flex h-8 items-center text-muted-foreground text-xs"),children:E.jsx("span",{className:i("ml-1 font-mono lowercase"),children:"mermaid"})}),j?E.jsx("div",{className:i("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsxs("div",{className:i("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[Z?E.jsx(yb,{chart:O,config:l?.config}):null,ee?E.jsx(yn,{code:O}):null,ue?E.jsx(Ib,{chart:O,config:l?.config}):null]})}):null,E.jsx("div",{className:i("rounded-md border border-border bg-background"),children:E.jsx(Db,{chart:O,config:l?.config,showControls:Ee})})]})})}let D=Ln(c,"code"),V=ya(c,"download"),S=ya(c,"copy");return E.jsx(Yu,{className:t,code:O,isIncomplete:p,language:g,lineNumbers:B,startLine:P,children:D?E.jsxs(E.Fragment,{children:[V?E.jsx(qu,{code:O,language:g}):null,S?E.jsx(yn,{}):null]}):null})},bo=_.memo(vb,(e,t)=>e.className===t.className&&$r(e.node,t.node));bo.displayName="MarkdownCode";var Eo=_.memo(xb,(e,t)=>e.className===t.className&&$r(e.node,t.node));Eo.displayName="MarkdownImg";var go=_.memo(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(n.length===1&&_.isValidElement(n[0])){let s=n[0].props.node,a=s?.tagName;if(a==="img")return E.jsx(E.Fragment,{children:e});if(a==="code"&&"data-block"in n[0].props)return E.jsx(E.Fragment,{children:e})}return E.jsx("p",{...r,children:e})},(e,t)=>te(e,t));go.displayName="MarkdownParagraph";var Bb={ol:ps,li:Wu,ul:Ku,hr:Qu,strong:Xu,a:Zu,h1:Ju,h2:eo,h3:to,h4:ro,h5:no,h6:so,table:ao,thead:io,tbody:uo,tr:oo,th:lo,td:co,blockquote:fo,code:bo,img:Eo,pre:({children:e})=>_.isValidElement(e)?_.cloneElement(e,{"data-block":"true"}):e,sup:ho,sub:mo,p:go,section:po},Fb=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Hb=new RegExp("\\p{L}","u");function wn(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let r of t){if(Fb.test(r))return"rtl";if(Hb.test(r))return"ltr"}return"ltr"}var Ub=/^[ \t]{0,3}(`{3,}|~{3,})/,jb=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Ia=e=>{let t=e.split(` +`),r=null,n=0;for(let s of t){let a=Ub.exec(s);if(r===null){if(a){let i=a[1];r=i[0],n=i.length}}else if(a){let i=a[1],o=i[0],l=i.length;o===r&&l>=n&&(r=null,n=0)}}return r!==null},$b=e=>{let t=e.split(` +`);for(let r of t){let n=r.trim();if(n.length>0&&n.includes("|")&&jb.test(n))return!0}return!1},zb=()=>e=>{De(e,"html",(t,r,n)=>{!n||typeof r!="number"||(n.children[r]={type:"text",value:t.value})})},Sa=[],La={allowDangerousHtml:!0},br=new WeakMap,Yb=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let r=e.rehypePlugins,n=e.remarkPlugins,s=e.remarkRehypeOptions;if(!(r||n||s)){let d="default";return this.keyCache.set(e,d),d}let a=d=>{if(!d||d.length===0)return"";let f="";for(let p=0;p0&&(f+=","),Array.isArray(T)){let[g,N]=T;if(typeof g=="function"){let k=br.get(g);k||(k=g.name,br.set(g,k)),f+=k}else f+=String(g);f+=":",f+=JSON.stringify(N)}else if(typeof T=="function"){let g=br.get(T);g||(g=T.name,br.set(T,g)),f+=g}else f+=String(T)}return f},i=a(r),o=a(n),l=s?JSON.stringify(s):"",c=`${o}::${i}::${l}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(e,t){let r=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(r,t)}clear(){this.cache.clear()}},wa=new Yb,To=e=>{let t=Vb(e),r=e.children||"",n=t.runSync(t.parse(r),r);return Xb(n,e)},Vb=e=>{let t=wa.get(e);if(t)return t;let r=Gb(e);return wa.set(e,r),r},qb=e=>e.some(t=>Array.isArray(t)?t[0]===pn:t===pn),Gb=e=>{let t=e.rehypePlugins||Sa,r=e.remarkPlugins||Sa,n=qb(t)?r:[...r,zb],s=e.remarkRehypeOptions?{...La,...e.remarkRehypeOptions}:La;return Jp().use(Zm).use(n).use(Pp,s).use(t)},Ao=e=>e,Wb=(e,t,r,n)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:n}},Kb=(e,t)=>{var r;for(let n in Jr)if(Object.hasOwn(Jr,n)&&Object.hasOwn(e.properties,n)){let s=e.properties[n],a=Jr[n];(a===null||a.includes(e.tagName))&&(e.properties[n]=(r=t(String(s||""),n,e))!=null?r:void 0)}},Qb=(e,t,r,n,s,a)=>{let i=!1;return n?i=!n.includes(e.tagName):s&&(i=s.includes(e.tagName)),!i&&a&&typeof t=="number"&&(i=!a(e,t,r)),i},Xb=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:s,skipHtml:a,unwrapDisallowed:i,urlTransform:o}=t;if(r||n||s||a||o){let l=o||Ao;De(e,(c,d,f)=>{if(c.type==="raw"&&f&&typeof d=="number")return Wb(f,d,a,c.value),d;if(c.type==="element"&&(Kb(c,l),Qb(c,d,f,n,s,r)&&f&&typeof d=="number"))return i&&c.children?f.children.splice(d,1,...c.children):f.children.splice(d,1),d})}return vm(e,{Fragment:E.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0})},Zb=/\[\^[\w-]{1,200}\](?!:)/,Jb=/\[\^[\w-]{1,200}\]:/,eE=/<(\w+)[\s>]/,tE=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ra=new Map,Oa=new Map,rE=e=>{let t=e.toLowerCase(),r=Ra.get(t);if(r)return r;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Ra.set(t,n),n},nE=e=>{let t=e.toLowerCase(),r=Oa.get(t);if(r)return r;let n=new RegExp(`])[^>]*>`,"gi");return Oa.set(t,n),n},Da=(e,t)=>{if(tE.has(t.toLowerCase()))return 0;let r=e.match(rE(t));if(!r)return 0;let n=0;for(let s of r)s.trimEnd().endsWith("/>")||(n+=1);return n},Pa=(e,t)=>{let r=e.match(nE(t));return r?r.length:0},sE=e=>{let t=0;for(let r=0;r{let t=Zb.test(e),r=Jb.test(e);if(t||r)return[e];let n=pe.lex(e,{gfm:!0}),s=[],a=[],i=!1;for(let o of n){let l=o.raw,c=s.length;if(a.length>0){s[c-1]+=l;let d=a.at(-1),f=Da(l,d),p=Pa(l,d);for(let T=0;T0&&a.at(-1)===d&&a.pop();continue}if(o.type==="html"&&o.block){let d=l.match(eE);if(d){let f=d[1],p=Da(l,f),T=Pa(l,f);p>T&&a.push(f)}}if(c>0&&!i){let d=s[c-1];if(sE(d)%2===1){s[c-1]=d+l;continue}}s.push(l),o.type!=="space"&&(i=o.type==="code")}return s},aE=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let s=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)()`,"gi");r=r.replace(s,(a,i,o,l)=>{if(!o.includes(` + +`))return i+o+l;let c=o.replace(/\n\n/g,` + +`),d=(c.startsWith(` +`)?"":` +`)+c+(c.endsWith(` +`)?"":` +`);return`${i}${d}${l} + +`})}return r},iE=/([\\`*_~[\]|])/g,uE=e=>e.replace(iE,"\\$1"),oE=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let s=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)()`,"gi");r=r.replace(s,(a,i,o,l)=>{let c=uE(o).replace(/\n\n/g," ");return i+c+l})}return r},xo=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(xo).join(""):"",lE=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(n=>n.toLowerCase()));De(t,"element",n=>{if(r.has(n.tagName.toLowerCase())){let s=xo(n);n.children=s?[{type:"text",value:s}]:[]}})},cE=()=>e=>{De(e,"code",t=>{var r,n;t.meta&&(t.data=(r=t.data)!=null?r:{},t.data.hProperties={...(n=t.data.hProperties)!=null?n:{},metastring:t.meta})})},dE=/^[ \t]*<[\w!/?-]/,fE=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,ko=e=>typeof e!="string"||e.length===0||!dE.test(e)?e:e.replace(fE,"$1"),Ma,va,Ba,Fa,Ar={...Je,protocols:{...Je.protocols,href:[...(va=(Ma=Je.protocols)==null?void 0:Ma.href)!=null?va:[],"tel"]},attributes:{...Je.attributes,code:[...(Fa=(Ba=Je.attributes)==null?void 0:Ba.code)!=null?Fa:[],"metastring"]}},wr={raw:pn,sanitize:[Hi,Ar],harden:[Wo,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},No={gfm:[Nf,{}],codeMeta:cE},Ha=Object.values(wr),hE=Object.values(No),mE={block:" ▋",circle:" ●"},Co=["github-light","github-dark"],yo={enabled:!0},pE={shikiTheme:Co,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:yo},fe=_.createContext(pE),bs=_.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:s,dir:a,animatePlugin:i,...o})=>{if(i){let d=i.getLastRenderCharCount();i.setPrevContentLength(d)}let l=typeof e=="string"&&r?ko(e):e,c=E.jsx(To,{...o,children:l});return E.jsx(Fu.Provider,{value:s,children:a?E.jsx("div",{dir:a,style:{display:"contents"},children:c}):c})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let r=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(r.length!==n.length||r.some(s=>{var a,i;return((a=e.components)==null?void 0:a[s])!==((i=t.components)==null?void 0:i[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});bs.displayName="Block";var Io=_.memo(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:s=!1,components:a,rehypePlugins:i=Ha,remarkPlugins:o=hE,className:l,shikiTheme:c=Co,mermaid:d,controls:f=!0,isAnimating:p=!1,animated:T,BlockComponent:g=bs,parseMarkdownIntoBlocksFn:N=_o,caret:k,plugins:I,remend:L,linkSafety:P=yo,lineNumbers:B=!0,allowedTags:O,literalTagContent:D,translations:V,icons:S,prefix:q,onAnimationStart:Z,onAnimationEnd:ee,...ue})=>{let Ee=_.useId(),[j,F]=_.useTransition(),M=_.useMemo(()=>sb(q),[q]),K=_.useRef(null),ge=_.useRef(Z),qe=_.useRef(ee);ge.current=Z,qe.current=ee,_.useEffect(()=>{var z,J,Te;if(t==="static")return;let ve=K.current;if(K.current=p,ve===null){p&&((z=ge.current)==null||z.call(ge));return}p&&!ve?(J=ge.current)==null||J.call(ge):!p&&ve&&((Te=qe.current)==null||Te.call(qe))},[p,t]);let v=_.useMemo(()=>O?Object.keys(O):[],[O]),Ge=_.useMemo(()=>{if(typeof e!="string")return"";let z=t==="streaming"&&n?Mh(e,L):e;return D&&D.length>0&&(z=oE(z,D)),v.length>0&&(z=aE(z,v)),z},[e,t,n,L,v,D]),Me=_.useMemo(()=>N(Ge),[Ge,N]),[ir,ct]=_.useState(Me);_.useEffect(()=>{t==="streaming"&&!Q?F(()=>{ct(Me)}):ct(Me)},[Me,t]);let W=t==="streaming"?ir:Me,se=_.useMemo(()=>r==="auto"?W.map(wn):void 0,[W,r]),dt=_.useMemo(()=>W.map((z,J)=>`${Ee}-${J}`),[W.length,Ee]),ft=_.useMemo(()=>T===!0?"true":T?JSON.stringify(T):"",[T]),Q=_.useMemo(()=>ft?ft==="true"?Lr():Lr(T):null,[ft]),yt=_.useMemo(()=>{var z,J;return{shikiTheme:(J=(z=I?.code)==null?void 0:z.getThemes())!=null?J:c,controls:f,isAnimating:p,lineNumbers:B,mode:t,mermaid:d,linkSafety:P}},[c,f,p,B,t,d,P,I?.code]),ht=_.useMemo(()=>V?JSON.stringify(V):"",[V]),We=_.useMemo(()=>({...os,...V}),[ht]),mt=_.useMemo(()=>{let{inlineCode:z,...J}=a??{},Te={...Bb,...J};if(z){let ve=Te.code;Te.code=It=>"data-block"in It?ve?_.createElement(ve,It):null:_.createElement(z,It)}return Te},[a]),Ke=_.useMemo(()=>{let z=[];return I!=null&&I.cjk&&(z=[...z,...I.cjk.remarkPluginsBefore]),z=[...z,...o],I!=null&&I.cjk&&(z=[...z,...I.cjk.remarkPluginsAfter]),I!=null&&I.math&&(z=[...z,I.math.remarkPlugin]),z},[o,I?.math,I?.cjk]),Es=_.useMemo(()=>{var z;let J=i;if(O&&Object.keys(O).length>0&&i===Ha){let Te={...Ar,tagNames:[...(z=Ar.tagNames)!=null?z:[],...Object.keys(O)],attributes:{...Ar.attributes,...O}};J=[wr.raw,[Hi,Te],wr.harden]}return D&&D.length>0&&(J=[...J,[lE,D]]),I!=null&&I.math&&(J=[...J,I.math.rehypePlugin]),Q&&p&&(J=[...J,Q.rehypePlugin]),J},[i,I?.math,Q,p,O,D]),zr=_.useMemo(()=>{if(!p||W.length===0)return!1;let z=W.at(-1);return Ia(z)||$b(z)},[p,W]),Lo=_.useMemo(()=>k&&p&&!zr?{"--streamdown-caret":`"${mE[k]}"`}:void 0,[k,p,zr]);return t==="static"?E.jsx(Cn.Provider,{value:We,children:E.jsx(Sn.Provider,{value:I??null,children:E.jsx(fe.Provider,{value:yt,children:E.jsx(Na,{icons:S,children:E.jsx(Nn.Provider,{value:M,children:E.jsx("div",{className:M("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",l),dir:r==="auto"?wn(Ge):r,children:E.jsx(To,{components:mt,rehypePlugins:Es,remarkPlugins:Ke,...ue,children:Ge})})})})})})}):E.jsx(Cn.Provider,{value:We,children:E.jsx(Sn.Provider,{value:I??null,children:E.jsx(fe.Provider,{value:yt,children:E.jsx(Na,{icons:S,children:E.jsx(Nn.Provider,{value:M,children:E.jsxs("div",{className:M("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",k&&!zr?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,l),style:Lo,children:[W.length===0&&k&&p&&E.jsx("span",{}),W.map((z,J)=>{var Te;let ve=J===W.length-1,It=p&&ve&&Ia(z);return E.jsx(g,{animatePlugin:Q,components:mt,content:z,dir:(Te=se?.[J])!=null?Te:r!=="auto"?r:void 0,index:J,isIncomplete:It,rehypePlugins:Es,remarkPlugins:Ke,shouldNormalizeHtmlIndentation:s,shouldParseIncompleteMarkdown:n,...ue},dt[J])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Io.displayName="Streamdown";var bE=({children:e,className:t,minZoom:r=.5,maxZoom:n=3,zoomStep:s=.1,showControls:a=!0,initialZoom:i=1,fullscreen:o=!1})=>{let{RotateCcwIcon:l,ZoomInIcon:c,ZoomOutIcon:d}=be(),f=U(),p=_.useRef(null),T=_.useRef(null),[g,N]=_.useState(i),[k,I]=_.useState({x:0,y:0}),[L,P]=_.useState(!1),[B,O]=_.useState({x:0,y:0}),[D,V]=_.useState({x:0,y:0}),S=_.useCallback(M=>{N(K=>Math.max(r,Math.min(n,K+M)))},[r,n]),q=_.useCallback(()=>{S(s)},[S,s]),Z=_.useCallback(()=>{S(-s)},[S,s]),ee=_.useCallback(()=>{N(i),I({x:0,y:0})},[i]),ue=_.useCallback(M=>{M.preventDefault();let K=M.deltaY>0?-s:s;S(K)},[S,s]),Ee=_.useCallback(M=>{if(M.button!==0||M.isPrimary===!1)return;P(!0),O({x:M.clientX,y:M.clientY}),V(k);let K=M.currentTarget;K instanceof HTMLElement&&K.setPointerCapture(M.pointerId)},[k]),j=_.useCallback(M=>{if(!L)return;M.preventDefault();let K=M.clientX-B.x,ge=M.clientY-B.y;I({x:D.x+K,y:D.y+ge})},[L,B,D]),F=_.useCallback(M=>{P(!1);let K=M.currentTarget;K instanceof HTMLElement&&K.releasePointerCapture(M.pointerId)},[]);return _.useEffect(()=>{let M=p.current;if(M)return M.addEventListener("wheel",ue,{passive:!1}),()=>{M.removeEventListener("wheel",ue)}},[ue]),_.useEffect(()=>{let M=T.current;if(M&&L)return document.body.style.userSelect="none",M.addEventListener("pointermove",j,{passive:!1}),M.addEventListener("pointerup",F),M.addEventListener("pointercancel",F),()=>{document.body.style.userSelect="",M.removeEventListener("pointermove",j),M.removeEventListener("pointerup",F),M.removeEventListener("pointercancel",F)}},[L,j,F]),E.jsxs("div",{className:f("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:p,style:{cursor:L?"grabbing":"grab"},children:[a?E.jsxs("div",{className:f("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[E.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g>=n,onClick:q,title:"Zoom in",type:"button",children:E.jsx(c,{size:16})}),E.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g<=r,onClick:Z,title:"Zoom out",type:"button",children:E.jsx(d,{size:16})}),E.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:ee,title:"Reset zoom and pan",type:"button",children:E.jsx(l,{size:16})})]}):null,E.jsx("div",{className:f("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Ee,ref:T,role:"application",style:{transform:`translate(${k.x}px, ${k.y}px) scale(${g})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},So=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:s=!0})=>{let a=U(),[i,o]=_.useState(null),[l,c]=_.useState(!1),[d,f]=_.useState(""),[p,T]=_.useState(""),[g,N]=_.useState(0),{mermaid:k}=_.useContext(fe),I=fs(),L=k?.errorComponent,{shouldRender:P,containerRef:B}=G1({immediate:n});if(_.useEffect(()=>{if(P){if(!I){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),c(!0);let D=I.getMermaid(r),V=e.split("").reduce((Z,ee)=>(Z<<5)-Z+ee.charCodeAt(0)|0,0),S=`mermaid-${Math.abs(V)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:q}=await D.render(S,e);f(q),T(q)}catch(D){if(!(p||d)){let V=D instanceof Error?D.message:"Failed to render Mermaid chart";o(V)}}finally{c(!1)}})()}},[e,r,g,P,I]),!(P||d||p))return E.jsx("div",{className:a("my-4 min-h-[200px]",t),ref:B});if(l&&!d&&!p)return E.jsx("div",{className:a("my-4 flex justify-center p-4",t),ref:B,children:E.jsxs("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[E.jsx("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),E.jsx("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(i&&!d&&!p){let D=()=>N(V=>V+1);return L?E.jsx("div",{ref:B,children:E.jsx(L,{chart:e,error:i,retry:D})}):E.jsxs("div",{className:a("rounded-md bg-red-50 p-4",t),ref:B,children:[E.jsxs("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",i]}),E.jsxs("details",{className:a("mt-2"),children:[E.jsx("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),E.jsx("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let O=d||p;return E.jsx("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:B,children:E.jsx(bE,{className:a(n?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:E.jsx("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:O},role:"img"})})})};const CE=Object.freeze(Object.defineProperty({__proto__:null,Block:bs,CodeBlock:Yu,CodeBlockContainer:Uu,CodeBlockCopyButton:yn,CodeBlockDownloadButton:qu,CodeBlockHeader:zu,CodeBlockSkeleton:In,Streamdown:Io,StreamdownContext:fe,TableCopyDropdown:hs,TableDownloadButton:Sb,TableDownloadDropdown:ms,createAnimatePlugin:Lr,defaultRehypePlugins:wr,defaultRemarkPlugins:No,defaultTranslations:os,defaultUrlTransform:Ao,detectTextDirection:wn,escapeMarkdownTableCell:Tr,extractTableDataFromElement:jr,normalizeHtmlIndentation:ko,parseMarkdownIntoBlocks:_o,tableDataToCSV:Xt,tableDataToMarkdown:Zt,tableDataToTSV:Gu,useIsCodeFenceIncomplete:Hu},Symbol.toStringTag,{value:"Module"})),EE=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:So},Symbol.toStringTag,{value:"Module"}));export{ub as A,NE as L,fe as R,CE as i}; diff --git a/pkg/cli/webapp/dist/assets/mirc-CjQqDB4T.js b/pkg/cli/webapp/dist/assets/mirc-CjQqDB4T.js new file mode 100644 index 0000000..105b6ea --- /dev/null +++ b/pkg/cli/webapp/dist/assets/mirc-CjQqDB4T.js @@ -0,0 +1 @@ +function n(e){for(var $={},r=e.split(" "),i=0;i!?^\/\|]/;function d(e,$,r){return $.tokenize=r,r(e,$)}function o(e,$){var r=$.beforeParams;$.beforeParams=!1;var i=e.next();if(/[\[\]{}\(\),\.]/.test(i))return i=="("&&r?$.inParams=!0:i==")"&&($.inParams=!1),null;if(/\d/.test(i))return e.eatWhile(/[\w\.]/),"number";if(i=="\\")return e.eat("\\"),e.eat(/./),"number";if(i=="/"&&e.eat("*"))return d(e,$,m);if(i==";"&&e.match(/ *\( *\(/))return d(e,$,p);if(i==";"&&!$.inParams)return e.skipToEnd(),"comment";if(i=='"')return e.eat(/"/),"keyword";if(i=="$")return e.eatWhile(/[$_a-z0-9A-Z\.:]/),a&&a.propertyIsEnumerable(e.current().toLowerCase())?"keyword":($.beforeParams=!0,"builtin");if(i=="%")return e.eatWhile(/[^,\s()]/),$.beforeParams=!0,"string";if(c.test(i))return e.eatWhile(c),"operator";e.eatWhile(/[\w\$_{}]/);var t=e.current().toLowerCase();return s&&s.propertyIsEnumerable(t)?"keyword":l&&l.propertyIsEnumerable(t)?($.beforeParams=!0,"keyword"):null}function m(e,$){for(var r=!1,i;i=e.next();){if(i=="/"&&r){$.tokenize=o;break}r=i=="*"}return"comment"}function p(e,$){for(var r=0,i;i=e.next();){if(i==";"&&r==2){$.tokenize=o;break}i==")"?r++:i!=" "&&(r=0)}return"meta"}const u={name:"mirc",startState:function(){return{tokenize:o,beforeParams:!1,inParams:!1}},token:function(e,$){return e.eatSpace()?null:$.tokenize(e,$)}};export{u as mirc}; diff --git a/pkg/cli/webapp/dist/assets/mllike-CXdrOF99.js b/pkg/cli/webapp/dist/assets/mllike-CXdrOF99.js new file mode 100644 index 0000000..c99d9ff --- /dev/null +++ b/pkg/cli/webapp/dist/assets/mllike-CXdrOF99.js @@ -0,0 +1 @@ +function y(i){var t={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},l=i.extraWords||{};for(var w in l)l.hasOwnProperty(w)&&(t[w]=i.extraWords[w]);var u=[];for(var a in t)u.push(a);function d(e,r){var o=e.next();if(o==='"')return r.tokenize=c,r.tokenize(e,r);if(o==="{"&&e.eat("|"))return r.longString=!0,r.tokenize=b,r.tokenize(e,r);if(o==="("&&e.match(/^\*(?!\))/))return r.commentLevel++,r.tokenize=f,r.tokenize(e,r);if(o==="~"||o==="?")return e.eatWhile(/\w/),"variableName.special";if(o==="`")return e.eatWhile(/\w/),"quote";if(o==="/"&&i.slashComments&&e.eat("/"))return e.skipToEnd(),"comment";if(/\d/.test(o))return o==="0"&&e.eat(/[bB]/)&&e.eatWhile(/[01]/),o==="0"&&e.eat(/[xX]/)&&e.eatWhile(/[0-9a-fA-F]/),o==="0"&&e.eat(/[oO]/)?e.eatWhile(/[0-7]/):(e.eatWhile(/[\d_]/),e.eat(".")&&e.eatWhile(/[\d]/),e.eat(/[eE]/)&&e.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(o))return"operator";if(/[\w\xa1-\uffff]/.test(o)){e.eatWhile(/[\w\xa1-\uffff]/);var n=e.current();return t.hasOwnProperty(n)?t[n]:"variable"}return null}function c(e,r){for(var o,n=!1,k=!1;(o=e.next())!=null;){if(o==='"'&&!k){n=!0;break}k=!k&&o==="\\"}return n&&!k&&(r.tokenize=d),"string"}function f(e,r){for(var o,n;r.commentLevel>0&&(n=e.next())!=null;)o==="("&&n==="*"&&r.commentLevel++,o==="*"&&n===")"&&r.commentLevel--,o=n;return r.commentLevel<=0&&(r.tokenize=d),"comment"}function b(e,r){for(var o,n;r.longString&&(n=e.next())!=null;)o==="|"&&n==="}"&&(r.longString=!1),o=n;return r.longString||(r.tokenize=d),"string"}return{startState:function(){return{tokenize:d,commentLevel:0,longString:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)},languageData:{autocomplete:u,commentTokens:{line:i.slashComments?"//":void 0,block:{open:"(*",close:"*)"}}}}}const s=y({extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),h=y({extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),p=y({extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0});export{h as fSharp,s as oCaml,p as sml}; diff --git a/pkg/cli/webapp/dist/assets/modelica-Dc1JOy9r.js b/pkg/cli/webapp/dist/assets/modelica-Dc1JOy9r.js new file mode 100644 index 0000000..197f2d8 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/modelica-Dc1JOy9r.js @@ -0,0 +1 @@ +function r(n){for(var e={},i=n.split(" "),l=0;l+\-\/^\[\]]/,s=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,o=/[0-9]/,c=/[_a-zA-Z]/;function p(n,e){return n.skipToEnd(),e.tokenize=null,"comment"}function d(n,e){for(var i=!1,l;l=n.next();){if(i&&l=="/"){e.tokenize=null;break}i=l=="*"}return"comment"}function h(n,e){for(var i=!1,l;(l=n.next())!=null;){if(l=='"'&&!i){e.tokenize=null,e.sol=!1;break}i=!i&&l=="\\"}return"string"}function b(n,e){for(n.eatWhile(o);n.eat(o)||n.eat(c););var i=n.current();return e.sol&&(i=="package"||i=="model"||i=="when"||i=="connector")?e.level++:e.sol&&i=="end"&&e.level>0&&e.level--,e.tokenize=null,e.sol=!1,t.propertyIsEnumerable(i)?"keyword":a.propertyIsEnumerable(i)?"builtin":u.propertyIsEnumerable(i)?"atom":"variable"}function v(n,e){for(;n.eat(/[^']/););return e.tokenize=null,e.sol=!1,n.eat("'")?"variable":"error"}function g(n,e){return n.eatWhile(o),n.eat(".")&&n.eatWhile(o),(n.eat("e")||n.eat("E"))&&(n.eat("-")||n.eat("+"),n.eatWhile(o)),e.tokenize=null,e.sol=!1,"number"}const z={name:"modelica",startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(n,e){if(e.tokenize!=null)return e.tokenize(n,e);if(n.sol()&&(e.sol=!0),n.eatSpace())return e.tokenize=null,null;var i=n.next();if(i=="/"&&n.eat("/"))e.tokenize=p;else if(i=="/"&&n.eat("*"))e.tokenize=d;else{if(s.test(i+n.peek()))return n.next(),e.tokenize=null,"operator";if(k.test(i))return e.tokenize=null,"operator";if(c.test(i))e.tokenize=b;else if(i=="'"&&n.peek()&&n.peek()!="'")e.tokenize=v;else if(i=='"')e.tokenize=h;else if(o.test(i))e.tokenize=g;else return e.tokenize=null,"error"}return e.tokenize(n,e)},indent:function(n,e,i){if(n.tokenize!=null)return null;var l=n.level;return/(algorithm)/.test(e)&&l--,/(equation)/.test(e)&&l--,/(initial algorithm)/.test(e)&&l--,/(initial equation)/.test(e)&&l--,/(end)/.test(e)&&l--,l>0?i.unit*l:0},languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:f}};export{z as modelica}; diff --git a/pkg/cli/webapp/dist/assets/mscgen-BA5vi2Kp.js b/pkg/cli/webapp/dist/assets/mscgen-BA5vi2Kp.js new file mode 100644 index 0000000..670ef1b --- /dev/null +++ b/pkg/cli/webapp/dist/assets/mscgen-BA5vi2Kp.js @@ -0,0 +1 @@ +function c(t){return{name:"mscgen",startState:i,copyState:s,token:u(t),languageData:{commentTokens:{line:"#",block:{open:"/*",close:"*/"}}}}}const a=c({keywords:["msc"],options:["hscale","width","arcgradient","wordwraparcs"],constants:["true","false","on","off"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]}),l=c({keywords:null,options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:null,brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]}),b=c({keywords:["msc","xu"],options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip","title","deactivate","activate","activation"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]});function n(t){return new RegExp("^\\b("+t.join("|")+")\\b","i")}function o(t){return new RegExp("^(?:"+t.join("|")+")","i")}function i(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}}function s(t){return{inComment:t.inComment,inString:t.inString,inAttributeList:t.inAttributeList,inScript:t.inScript}}function u(t){return function(r,e){if(r.match(o(t.brackets),!0,!0))return"bracket";if(!e.inComment){if(r.match(/\/\*[^\*\/]*/,!0,!0))return e.inComment=!0,"comment";if(r.match(o(t.singlecomment),!0,!0))return r.skipToEnd(),"comment"}if(e.inComment)return r.match(/[^\*\/]*\*\//,!0,!0)?e.inComment=!1:r.skipToEnd(),"comment";if(!e.inString&&r.match(/\"(\\\"|[^\"])*/,!0,!0))return e.inString=!0,"string";if(e.inString)return r.match(/[^\"]*\"/,!0,!0)?e.inString=!1:r.skipToEnd(),"string";if(t.keywords&&r.match(n(t.keywords),!0,!0)||r.match(n(t.options),!0,!0)||r.match(n(t.arcsWords),!0,!0)||r.match(o(t.arcsOthers),!0,!0))return"keyword";if(t.operators&&r.match(o(t.operators),!0,!0))return"operator";if(t.constants&&r.match(o(t.constants),!0,!0))return"variable";if(!t.inAttributeList&&t.attributes&&r.match("[",!0,!0))return t.inAttributeList=!0,"bracket";if(t.inAttributeList){if(t.attributes!==null&&r.match(n(t.attributes),!0,!0))return"attribute";if(r.match("]",!0,!0))return t.inAttributeList=!1,"bracket"}return r.next(),null}}export{a as mscgen,l as msgenny,b as xu}; diff --git a/pkg/cli/webapp/dist/assets/mumps-BT43cFF4.js b/pkg/cli/webapp/dist/assets/mumps-BT43cFF4.js new file mode 100644 index 0000000..cc81bd1 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/mumps-BT43cFF4.js @@ -0,0 +1 @@ +function o(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var i=new RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),$=new RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),t=new RegExp("^[\\.,:]"),c=new RegExp("[()]"),l=new RegExp("^[%A-Za-z][A-Za-z0-9]*"),a=["break","close","do","else","for","goto","halt","hang","if","job","kill","lock","merge","new","open","quit","read","set","tcommit","trollback","tstart","use","view","write","xecute","b","c","d","e","f","g","h","i","j","k","l","m","n","o","q","r","s","tc","tro","ts","u","v","w","x"],d=["\\$ascii","\\$char","\\$data","\\$ecode","\\$estack","\\$etrap","\\$extract","\\$find","\\$fnumber","\\$get","\\$horolog","\\$io","\\$increment","\\$job","\\$justify","\\$length","\\$name","\\$next","\\$order","\\$piece","\\$qlength","\\$qsubscript","\\$query","\\$quit","\\$random","\\$reverse","\\$select","\\$stack","\\$test","\\$text","\\$translate","\\$view","\\$x","\\$y","\\$a","\\$c","\\$d","\\$e","\\$ec","\\$es","\\$et","\\$f","\\$fn","\\$g","\\$h","\\$i","\\$j","\\$l","\\$n","\\$na","\\$o","\\$p","\\$q","\\$ql","\\$qs","\\$r","\\$re","\\$s","\\$st","\\$t","\\$tr","\\$v","\\$z"],u=o(d),f=o(a);function m(e,n){e.sol()&&(n.label=!0,n.commandMode=0);var r=e.peek();return r==" "||r==" "?(n.label=!1,n.commandMode==0?n.commandMode=1:(n.commandMode<0||n.commandMode==2)&&(n.commandMode=0)):r!="."&&n.commandMode>0&&(r==":"?n.commandMode=-1:n.commandMode=2),(r==="("||r===" ")&&(n.label=!1),r===";"?(e.skipToEnd(),"comment"):e.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)?"number":r=='"'?e.skipTo('"')?(e.next(),"string"):(e.skipToEnd(),"error"):e.match($)||e.match(i)?"operator":e.match(t)?null:c.test(r)?(e.next(),"bracket"):n.commandMode>0&&e.match(f)?"controlKeyword":e.match(u)?"builtin":e.match(l)?"variable":r==="$"||r==="^"?(e.next(),"builtin"):r==="@"?(e.next(),"string.special"):/[\w%]/.test(r)?(e.eatWhile(/[\w%]/),"variable"):(e.next(),"error")}const s={name:"mumps",startState:function(){return{label:!1,commandMode:0}},token:function(e,n){var r=m(e,n);return n.label?"tag":r}};export{s as mumps}; diff --git a/pkg/cli/webapp/dist/assets/nginx-DdIZxoE0.js b/pkg/cli/webapp/dist/assets/nginx-DdIZxoE0.js new file mode 100644 index 0000000..379b172 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/nginx-DdIZxoE0.js @@ -0,0 +1 @@ +function n(_){for(var t={},i=_.split(" "),e=0;e*\/]/.test(e)?r(null,"select-op"):/[;{}:\[\]]/.test(e)?r(null,e):(_.eatWhile(/[\w\\\-]/),r("variable","variable"))}function c(_,t){for(var i=!1,e;(e=_.next())!=null;){if(i&&e=="/"){t.tokenize=a;break}i=e=="*"}return r("comment","comment")}function l(_,t){for(var i=0,e;(e=_.next())!=null;){if(i>=2&&e==">"){t.tokenize=a;break}i=e=="-"?i+1:0}return r("comment","comment")}function d(_){return function(t,i){for(var e=!1,o;(o=t.next())!=null&&!(o==_&&!e);)e=!e&&o=="\\";return e||(i.tokenize=a),r("string","string")}}const m={name:"nginx",startState:function(){return{tokenize:a,baseIndent:0,stack:[]}},token:function(_,t){if(_.eatSpace())return null;s=null;var i=t.tokenize(_,t),e=t.stack[t.stack.length-1];return s=="hash"&&e=="rule"?i="atom":i=="variable"&&(e=="rule"?i="number":(!e||e=="@media{")&&(i="tag")),e=="rule"&&/^[\{\};]$/.test(s)&&t.stack.pop(),s=="{"?e=="@media"?t.stack[t.stack.length-1]="@media{":t.stack.push("{"):s=="}"?t.stack.pop():s=="@media"?t.stack.push("@media"):e=="{"&&s!="comment"&&t.stack.push("rule"),i},indent:function(_,t,i){var e=_.stack.length;return/^\}/.test(t)&&(e-=_.stack[_.stack.length-1]=="rule"?2:1),_.baseIndent+e*i.unit},languageData:{indentOnInput:/^\s*\}$/}};export{m as nginx}; diff --git a/pkg/cli/webapp/dist/assets/nsis-LdVXkNf5.js b/pkg/cli/webapp/dist/assets/nsis-LdVXkNf5.js new file mode 100644 index 0000000..6b1598f --- /dev/null +++ b/pkg/cli/webapp/dist/assets/nsis-LdVXkNf5.js @@ -0,0 +1 @@ +import{s as e}from"./simple-mode-GW_nhZxv.js";const n=e({start:[{regex:/(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/,token:"number"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/`(?:[^\\`]|\\.)*`?/,token:"string"},{regex:/^\s*(?:\!(addincludedir|addplugindir|appendfile|assert|cd|define|delfile|echo|error|execute|finalize|getdllversion|gettlbversion|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|uninstfinalize|verbose|warning))\b/i,token:"keyword"},{regex:/^\s*(?:\!(if(?:n?def)?|ifmacron?def|macro))\b/i,token:"keyword",indent:!0},{regex:/^\s*(?:\!(else|endif|macroend))\b/i,token:"keyword",dedent:!0},{regex:/^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetKnownFolderPath|GetLabelAddress|GetTempFileName|GetWinVer|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfRtlLanguage|IfShellVarContextAll|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadAndSetImage|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestLongPathAware|ManifestMaxVersionTested|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEAddResource|PEDllCharacteristics|PERemoveResource|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Target|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/i,token:"keyword"},{regex:/^\s*(?:Function|PageEx|Section(?:Group)?)\b/i,token:"keyword",indent:!0},{regex:/^\s*(?:(Function|PageEx|Section(?:Group)?)End)\b/i,token:"keyword",dedent:!0},{regex:/\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/i,token:"atom"},{regex:/\b(?:admin|all|amd64-unicode|auto|both|bottom|bzip2|components|current|custom|directory|false|force|hide|highest|ifdiff|ifnewer|instfiles|lastused|leave|left|license|listonly|lzma|nevershow|none|normal|notset|off|on|right|show|silent|silentlog|textonly|top|true|try|un\.components|un\.custom|un\.directory|un\.instfiles|un\.license|uninstConfirm|user|Win10|Win7|Win8|WinVista|x-86-(ansi|unicode)|zlib)\b/i,token:"builtin"},{regex:/\$\{(?:And(?:If(?:Not)?|Unless)|Break|Case(?:2|3|4|5|Else)?|Continue|Default|Do(?:Until|While)?|Else(?:If(?:Not)?|Unless)?|End(?:If|Select|Switch)|Exit(?:Do|For|While)|For(?:Each)?|If(?:Cmd|Not(?:Then)?|Then)?|Loop(?:Until|While)?|Or(?:If(?:Not)?|Unless)|Select|Switch|Unless|While)\}/i,token:"variable-2",indent:!0},{regex:/\$\{(?:BannerTrimPath|DirState|DriveSpace|Get(BaseName|Drives|ExeName|ExePath|FileAttributes|FileExt|FileName|FileVersion|Options|OptionsS|Parameters|Parent|Root|Size|Time)|Locate|RefreshShellIcons)\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:Memento(?:Section(?:Done|End|Restore|Save)?|UnselectedSection))\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:Config(?:Read|ReadS|Write|WriteS)|File(?:Join|ReadFromEnd|Recode)|Line(?:Find|Read|Sum)|Text(?:Compare|CompareS)|TrimNewLines)\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:(?:At(?:Least|Most)|Is)(?:ServicePack|Win(?:7|8|10|95|98|200(?:0|3|8(?:R2)?)|ME|NT4|Vista|XP))|Is(?:NT|Server))\}/i,token:"variable",dedent:!0},{regex:/\$\{(?:StrFilterS?|Version(?:Compare|Convert)|Word(?:AddS?|Find(?:(?:2|3)X)?S?|InsertS?|ReplaceS?))\}/i,token:"keyword",dedent:!0},{regex:/\$\{(?:RunningX64)\}/i,token:"variable",dedent:!0},{regex:/\$\{(?:Disable|Enable)X64FSRedirection\}/i,token:"keyword",dedent:!0},{regex:/(#|;).*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/\$\w[\w\.]*/,token:"variable"},{regex:/\${[\!\w\.:-]+}/,token:"variableName.constant"},{regex:/\$\([\!\w\.:-]+\)/,token:"atom"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],languageData:{name:"nsis",indentOnInput:/^\s*((Function|PageEx|Section|Section(Group)?)End|(\!(endif|macroend))|\$\{(End(If|Unless|While)|Loop(Until)|Next)\})$/i,commentTokens:{line:"#",block:{open:"/*",close:"*/"}}}});export{n as nsis}; diff --git a/pkg/cli/webapp/dist/assets/ntriples-BfvgReVJ.js b/pkg/cli/webapp/dist/assets/ntriples-BfvgReVJ.js new file mode 100644 index 0000000..680db89 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/ntriples-BfvgReVJ.js @@ -0,0 +1 @@ +var _={PRE_SUBJECT:0,WRITING_SUB_URI:1,WRITING_BNODE_URI:2,PRE_PRED:3,WRITING_PRED_URI:4,PRE_OBJ:5,WRITING_OBJ_URI:6,WRITING_OBJ_BNODE:7,WRITING_OBJ_LITERAL:8,WRITING_LIT_LANG:9,WRITING_LIT_TYPE:10,POST_OBJ:11,ERROR:12};function T(e,I){var R=e.location,i;R==_.PRE_SUBJECT&&I=="<"?i=_.WRITING_SUB_URI:R==_.PRE_SUBJECT&&I=="_"?i=_.WRITING_BNODE_URI:R==_.PRE_PRED&&I=="<"?i=_.WRITING_PRED_URI:R==_.PRE_OBJ&&I=="<"?i=_.WRITING_OBJ_URI:R==_.PRE_OBJ&&I=="_"?i=_.WRITING_OBJ_BNODE:R==_.PRE_OBJ&&I=='"'?i=_.WRITING_OBJ_LITERAL:R==_.WRITING_SUB_URI&&I==">"||R==_.WRITING_BNODE_URI&&I==" "?i=_.PRE_PRED:R==_.WRITING_PRED_URI&&I==">"?i=_.PRE_OBJ:R==_.WRITING_OBJ_URI&&I==">"||R==_.WRITING_OBJ_BNODE&&I==" "||R==_.WRITING_OBJ_LITERAL&&I=='"'||R==_.WRITING_LIT_LANG&&I==" "||R==_.WRITING_LIT_TYPE&&I==">"?i=_.POST_OBJ:R==_.WRITING_OBJ_LITERAL&&I=="@"?i=_.WRITING_LIT_LANG:R==_.WRITING_OBJ_LITERAL&&I=="^"?i=_.WRITING_LIT_TYPE:I==" "&&(R==_.PRE_SUBJECT||R==_.PRE_PRED||R==_.PRE_OBJ||R==_.POST_OBJ)?i=R:R==_.POST_OBJ&&I=="."?i=_.PRE_SUBJECT:i=_.ERROR,e.location=i}const u={name:"ntriples",startState:function(){return{location:_.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(e,I){var R=e.next();if(R=="<"){T(I,R);var i="";return e.eatWhile(function(n){return n!="#"&&n!=">"?(i+=n,!0):!1}),I.uris.push(i),e.match("#",!1)||(e.next(),T(I,">")),"variable"}if(R=="#"){var r="";return e.eatWhile(function(n){return n!=">"&&n!=" "?(r+=n,!0):!1}),I.anchors.push(r),"url"}if(R==">")return T(I,">"),"variable";if(R=="_"){T(I,R);var f="";return e.eatWhile(function(n){return n!=" "?(f+=n,!0):!1}),I.bnodes.push(f),e.next(),T(I," "),"builtin"}if(R=='"')return T(I,R),e.eatWhile(function(n){return n!='"'}),e.next(),e.peek()!="@"&&e.peek()!="^"&&T(I,'"'),"string";if(R=="@"){T(I,"@");var E="";return e.eatWhile(function(n){return n!=" "?(E+=n,!0):!1}),I.langs.push(E),e.next(),T(I," "),"string.special"}if(R=="^"){e.next(),T(I,"^");var l="";return e.eatWhile(function(n){return n!=">"?(l+=n,!0):!1}),I.types.push(l),e.next(),T(I,">"),"variable"}R==" "&&T(I,R),R=="."&&T(I,R)}};export{u as ntriples}; diff --git a/pkg/cli/webapp/dist/assets/octave-Ck1zUtKM.js b/pkg/cli/webapp/dist/assets/octave-Ck1zUtKM.js new file mode 100644 index 0000000..f5000f5 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/octave-Ck1zUtKM.js @@ -0,0 +1 @@ +function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var f=new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),u=new RegExp("^[\\(\\[\\{\\},:=;\\.]"),a=new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),l=new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),c=new RegExp("^((>>=)|(<<=))"),p=new RegExp("^[\\]\\)]"),d=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*"),s=t(["error","eval","function","abs","acos","atan","asin","cos","cosh","exp","log","prod","sum","log10","max","min","sign","sin","sinh","sqrt","tan","reshape","break","zeros","default","margin","round","ones","rand","syn","ceil","floor","size","clear","zeros","eye","mean","std","cov","det","eig","inv","norm","rank","trace","expm","logm","sqrtm","linspace","plot","title","xlabel","ylabel","legend","text","grid","meshgrid","mesh","num2str","fft","ifft","arrayfun","cellfun","input","fliplr","flipud","ismember"]),h=t(["return","case","switch","else","elseif","end","endif","endfunction","if","otherwise","do","for","while","try","catch","classdef","properties","events","methods","global","persistent","endfor","endwhile","printf","sprintf","disp","until","continue","pkg"]);function o(e,n){return!e.sol()&&e.peek()==="'"?(e.next(),n.tokenize=i,"operator"):(n.tokenize=i,i(e,n))}function m(e,n){return e.match(/^.*%}/)?(n.tokenize=i,"comment"):(e.skipToEnd(),"comment")}function i(e,n){if(e.eatSpace())return null;if(e.match("%{"))return n.tokenize=m,e.skipToEnd(),"comment";if(e.match(/^[%#]/))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return e.tokenize=i,"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)||e.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}if(e.match(t(["nan","NaN","inf","Inf"])))return"number";var r=e.match(/^"(?:[^"]|"")*("|$)/)||e.match(/^'(?:[^']|'')*('|$)/);return r?r[1]?"string":"error":e.match(h)?"keyword":e.match(s)?"builtin":e.match(d)?"variable":e.match(f)||e.match(a)?"operator":e.match(u)||e.match(l)||e.match(c)?null:e.match(p)?(n.tokenize=o,null):(e.next(),"error")}const g={name:"octave",startState:function(){return{tokenize:i}},token:function(e,n){var r=n.tokenize(e,n);return(r==="number"||r==="variable")&&(n.tokenize=o),r},languageData:{commentTokens:{line:"%"}}};export{g as octave}; diff --git a/pkg/cli/webapp/dist/assets/oz-BzwKVEFT.js b/pkg/cli/webapp/dist/assets/oz-BzwKVEFT.js new file mode 100644 index 0000000..9742186 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/oz-BzwKVEFT.js @@ -0,0 +1 @@ +function o(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var k=/[\^@!\|<>#~\.\*\-\+\\/,=]/,s=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,p=/(:::)|(\.\.\.)|(=<:)|(>=:)/,f=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],l=["end"],z=o(["true","false","nil","unit"]),m=o(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),v=o(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),d=o(f),h=o(l);function i(e,n){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match("[]"))return"keyword";if(e.match(p)||e.match(s))return"operator";if(e.match(z))return"atom";var t=e.match(v);if(t)return n.doInCurrentLine?n.doInCurrentLine=!1:n.currentIndent++,t[0]=="proc"||t[0]=="fun"?n.tokenize=x:t[0]=="class"?n.tokenize=g:t[0]=="meth"&&(n.tokenize=w),"keyword";if(e.match(d)||e.match(m))return"keyword";if(e.match(h))return n.currentIndent--,"keyword";var r=e.next();if(r=='"'||r=="'")return n.tokenize=y(r),n.tokenize(e,n);if(/[~\d]/.test(r)){if(r=="~")if(/^[0-9]/.test(e.peek())){if(e.next()=="0"&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return"number"}else return null;return r=="0"&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return r=="%"?(e.skipToEnd(),"comment"):r=="/"&&e.eat("*")?(n.tokenize=a,a(e,n)):k.test(r)?"operator":(e.eatWhile(/\w/),"variable")}function g(e,n){return e.eatSpace()?null:(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),n.tokenize=i,"type")}function w(e,n){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),n.tokenize=i,"def")}function x(e,n){return e.eatSpace()?null:!n.hasPassedFirstStage&&e.eat("{")?(n.hasPassedFirstStage=!0,"bracket"):n.hasPassedFirstStage?(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/),n.hasPassedFirstStage=!1,n.tokenize=i,"def"):(n.tokenize=i,null)}function a(e,n){for(var t=!1,r;r=e.next();){if(r=="/"&&t){n.tokenize=i;break}t=r=="*"}return"comment"}function y(e){return function(n,t){for(var r=!1,u,c=!1;(u=n.next())!=null;){if(u==e&&!r){c=!0;break}r=!r&&u=="\\"}return(c||!r)&&(t.tokenize=i),"string"}}function b(){var e=f.concat(l);return new RegExp("[\\[\\]]|("+e.join("|")+")$")}const I={name:"oz",startState:function(){return{tokenize:i,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(e,n){return e.sol()&&(n.doInCurrentLine=0),n.tokenize(e,n)},indent:function(e,n,t){var r=n.replace(/^\s+|\s+$/g,"");return r.match(h)||r.match(d)||r.match(/(\[])/)?t.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*t.unit},languageData:{indentOnInut:b(),commentTokens:{line:"%",block:{open:"/*",close:"*/"}}}};export{I as oz}; diff --git a/pkg/cli/webapp/dist/assets/pascal--L3eBynH.js b/pkg/cli/webapp/dist/assets/pascal--L3eBynH.js new file mode 100644 index 0000000..455009f --- /dev/null +++ b/pkg/cli/webapp/dist/assets/pascal--L3eBynH.js @@ -0,0 +1 @@ +function c(r){for(var n={},e=r.split(" "),t=0;t!?|\/]/;function d(r,n){var e=r.next();if(e=="#"&&n.startOfLine)return r.skipToEnd(),"meta";if(e=='"'||e=="'")return n.tokenize=p(e),n.tokenize(r,n);if(e=="("&&r.eat("*"))return n.tokenize=l,l(r,n);if(e=="{")return n.tokenize=u,u(r,n);if(/[\[\]\(\),;\:\.]/.test(e))return null;if(/\d/.test(e))return r.eatWhile(/[\w\.]/),"number";if(e=="/"&&r.eat("/"))return r.skipToEnd(),"comment";if(a.test(e))return r.eatWhile(a),"operator";r.eatWhile(/[\w\$_]/);var t=r.current().toLowerCase();return s.propertyIsEnumerable(t)?"keyword":f.propertyIsEnumerable(t)?"atom":"variable"}function p(r){return function(n,e){for(var t=!1,i,o=!1;(i=n.next())!=null;){if(i==r&&!t){o=!0;break}t=!t&&i=="\\"}return(o||!t)&&(e.tokenize=null),"string"}}function l(r,n){for(var e=!1,t;t=r.next();){if(t==")"&&e){n.tokenize=null;break}e=t=="*"}return"comment"}function u(r,n){for(var e;e=r.next();)if(e=="}"){n.tokenize=null;break}return"comment"}const k={name:"pascal",startState:function(){return{tokenize:null}},token:function(r,n){if(r.eatSpace())return null;var e=(n.tokenize||d)(r,n);return e=="comment"||e=="meta",e},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{block:{open:"(*",close:"*)"}}}};export{k as pascal}; diff --git a/pkg/cli/webapp/dist/assets/perl-CdXCOZ3F.js b/pkg/cli/webapp/dist/assets/perl-CdXCOZ3F.js new file mode 100644 index 0000000..12b1ea5 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/perl-CdXCOZ3F.js @@ -0,0 +1 @@ +function t(n,e){return n.string.charAt(n.pos+(e||0))}function O(n,e){if(e){var u=n.pos-e;return n.string.substr(u>=0?u:0,e)}else return n.string.substr(0,n.pos-1)}function g(n,e){var u=n.string.length,$=u-n.pos+1;return n.string.substr(n.pos,e&&e=($=n.string.length-1)?n.pos=$:n.pos=u}var p={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},f="string.special",l=/[goseximacplud]/;function r(n,e,u,$,E){return e.chain=null,e.style=null,e.tail=null,e.tokenize=function(i,R){for(var _=!1,A,d=0;A=i.next();){if(A===u[d]&&!_)return u[++d]!==void 0?(R.chain=u[d],R.style=$,R.tail=E):E&&i.eatWhile(E),R.tokenize=T,$;_=!_&&A=="\\"}return $},e.tokenize(n,e)}function S(n,e,u){return e.tokenize=function($,E){return $.string==u&&(E.tokenize=T),$.skipToEnd(),"string"},e.tokenize(n,e)}function T(n,e){if(n.eatSpace())return null;if(e.chain)return r(n,e,e.chain,e.style,e.tail);if(n.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))return"number";if(n.match(/^<<(?=[_a-zA-Z])/))return n.eatWhile(/\w/),S(n,e,n.current().substr(2));if(n.sol()&&n.match(/^\=item(?!\w)/))return S(n,e,"=cut");var u=n.next();if(u=='"'||u=="'"){if(O(n,3)=="<<"+u){var $=n.pos;n.eatWhile(/\w/);var E=n.current().substr(1);if(E&&n.eat(u))return S(n,e,E);n.pos=$}return r(n,e,[u],"string")}if(u=="q"){var i=t(n,-2);if(!(i&&/\w/.test(i))){if(i=t(n,0),i=="x"){if(i=t(n,1),i=="(")return o(n,2),r(n,e,[")"],f,l);if(i=="[")return o(n,2),r(n,e,["]"],f,l);if(i=="{")return o(n,2),r(n,e,["}"],f,l);if(i=="<")return o(n,2),r(n,e,[">"],f,l);if(/[\^'"!~\/]/.test(i))return o(n,1),r(n,e,[n.eat(i)],f,l)}else if(i=="q"){if(i=t(n,1),i=="(")return o(n,2),r(n,e,[")"],"string");if(i=="[")return o(n,2),r(n,e,["]"],"string");if(i=="{")return o(n,2),r(n,e,["}"],"string");if(i=="<")return o(n,2),r(n,e,[">"],"string");if(/[\^'"!~\/]/.test(i))return o(n,1),r(n,e,[n.eat(i)],"string")}else if(i=="w"){if(i=t(n,1),i=="(")return o(n,2),r(n,e,[")"],"bracket");if(i=="[")return o(n,2),r(n,e,["]"],"bracket");if(i=="{")return o(n,2),r(n,e,["}"],"bracket");if(i=="<")return o(n,2),r(n,e,[">"],"bracket");if(/[\^'"!~\/]/.test(i))return o(n,1),r(n,e,[n.eat(i)],"bracket")}else if(i=="r"){if(i=t(n,1),i=="(")return o(n,2),r(n,e,[")"],f,l);if(i=="[")return o(n,2),r(n,e,["]"],f,l);if(i=="{")return o(n,2),r(n,e,["}"],f,l);if(i=="<")return o(n,2),r(n,e,[">"],f,l);if(/[\^'"!~\/]/.test(i))return o(n,1),r(n,e,[n.eat(i)],f,l)}else if(/[\^'"!~\/(\[{<]/.test(i)){if(i=="(")return o(n,1),r(n,e,[")"],"string");if(i=="[")return o(n,1),r(n,e,["]"],"string");if(i=="{")return o(n,1),r(n,e,["}"],"string");if(i=="<")return o(n,1),r(n,e,[">"],"string");if(/[\^'"!~\/]/.test(i))return r(n,e,[n.eat(i)],"string")}}}if(u=="m"){var i=t(n,-2);if(!(i&&/\w/.test(i))&&(i=n.eat(/[(\[{<\^'"!~\/]/),i)){if(/[\^'"!~\/]/.test(i))return r(n,e,[i],f,l);if(i=="(")return r(n,e,[")"],f,l);if(i=="[")return r(n,e,["]"],f,l);if(i=="{")return r(n,e,["}"],f,l);if(i=="<")return r(n,e,[">"],f,l)}}if(u=="s"){var i=/[\/>\]})\w]/.test(t(n,-2));if(!i&&(i=n.eat(/[(\[{<\^'"!~\/]/),i))return i=="["?r(n,e,["]","]"],f,l):i=="{"?r(n,e,["}","}"],f,l):i=="<"?r(n,e,[">",">"],f,l):i=="("?r(n,e,[")",")"],f,l):r(n,e,[i,i],f,l)}if(u=="y"){var i=/[\/>\]})\w]/.test(t(n,-2));if(!i&&(i=n.eat(/[(\[{<\^'"!~\/]/),i))return i=="["?r(n,e,["]","]"],f,l):i=="{"?r(n,e,["}","}"],f,l):i=="<"?r(n,e,[">",">"],f,l):i=="("?r(n,e,[")",")"],f,l):r(n,e,[i,i],f,l)}if(u=="t"){var i=/[\/>\]})\w]/.test(t(n,-2));if(!i&&(i=n.eat("r"),i&&(i=n.eat(/[(\[{<\^'"!~\/]/),i)))return i=="["?r(n,e,["]","]"],f,l):i=="{"?r(n,e,["}","}"],f,l):i=="<"?r(n,e,[">",">"],f,l):i=="("?r(n,e,[")",")"],f,l):r(n,e,[i,i],f,l)}if(u=="`")return r(n,e,[u],"builtin");if(u=="/")return/~\s*$/.test(O(n))?r(n,e,[u],f,l):"operator";if(u=="$"){var $=n.pos;if(n.eatWhile(/\d/)||n.eat("{")&&n.eatWhile(/\d/)&&n.eat("}"))return"builtin";n.pos=$}if(/[$@%]/.test(u)){var $=n.pos;if(n.eat("^")&&n.eat(/[A-Z]/)||!/[@$%&]/.test(t(n,-2))&&n.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var i=n.current();if(p[i])return"builtin"}n.pos=$}if(/[$@%&]/.test(u)&&(n.eatWhile(/[\w$]/)||n.eat("{")&&n.eatWhile(/[\w$]/)&&n.eat("}"))){var i=n.current();return p[i]?"builtin":"variable"}if(u=="#"&&t(n,-2)!="$")return n.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(u)){var $=n.pos;if(n.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),p[n.current()])return"operator";n.pos=$}if(u=="_"&&n.pos==1){if(g(n,6)=="_END__")return r(n,e,["\0"],"comment");if(g(n,7)=="_DATA__")return r(n,e,["\0"],"builtin");if(g(n,7)=="_C__")return r(n,e,["\0"],"string")}if(/\w/.test(u)){var $=n.pos;if(t(n,-2)=="{"&&(t(n,0)=="}"||n.eatWhile(/\w/)&&t(n,0)=="}"))return"string";n.pos=$}if(/[A-Z]/.test(u)){var R=t(n,-2),$=n.pos;if(n.eatWhile(/[A-Z_]/),/[\da-z]/.test(t(n,0)))n.pos=$;else{var i=p[n.current()];return i?(i[1]&&(i=i[0]),R!=":"?i==1?"keyword":i==2?"def":i==3?"atom":i==4?"operator":i==5?"builtin":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(u)){var R=t(n,-2);n.eatWhile(/\w/);var i=p[n.current()];return i?(i[1]&&(i=i[0]),R!=":"?i==1?"keyword":i==2?"def":i==3?"atom":i==4?"operator":i==5?"builtin":"meta":"meta"):"meta"}return null}const I={name:"perl",startState:function(){return{tokenize:T,chain:null,style:null,tail:null}},token:function(n,e){return(e.tokenize||T)(n,e)},languageData:{commentTokens:{line:"#"},wordChars:"$"}};export{I as perl}; diff --git a/pkg/cli/webapp/dist/assets/pig-CevX1Tat.js b/pkg/cli/webapp/dist/assets/pig-CevX1Tat.js new file mode 100644 index 0000000..db4ece2 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/pig-CevX1Tat.js @@ -0,0 +1 @@ +function r(e){for(var T={},O=e.split(" "),E=0;E=&?:\/!|]/;function L(e,T,O){return T.tokenize=O,O(e,T)}function u(e,T){for(var O=!1,E;E=e.next();){if(E=="/"&&O){T.tokenize=A;break}O=E=="*"}return"comment"}function C(e){return function(T,O){for(var E=!1,N,R=!1;(N=T.next())!=null;){if(N==e&&!E){R=!0;break}E=!E&&N=="\\"}return(R||!E)&&(O.tokenize=A),"error"}}function A(e,T){var O=e.next();return O=='"'||O=="'"?L(e,T,C(O)):/[\[\]{}\(\),;\.]/.test(O)?null:/\d/.test(O)?(e.eatWhile(/[\w\.]/),"number"):O=="/"?e.eat("*")?L(e,T,u):(e.eatWhile(I),"operator"):O=="-"?e.eat("-")?(e.skipToEnd(),"comment"):(e.eatWhile(I),"operator"):I.test(O)?(e.eatWhile(I),"operator"):(e.eatWhile(/[\w\$_]/),n&&n.propertyIsEnumerable(e.current().toUpperCase())&&!e.eat(")")&&!e.eat(".")?"keyword":S&&S.propertyIsEnumerable(e.current().toUpperCase())?"builtin":t&&t.propertyIsEnumerable(e.current().toUpperCase())?"type":"variable")}const G={name:"pig",startState:function(){return{tokenize:A,startOfLine:!0}},token:function(e,T){if(e.eatSpace())return null;var O=T.tokenize(e,T);return O},languageData:{autocomplete:(i+o+U).split(" ")}};export{G as pig}; diff --git a/pkg/cli/webapp/dist/assets/powershell-CFHJl5sT.js b/pkg/cli/webapp/dist/assets/powershell-CFHJl5sT.js new file mode 100644 index 0000000..80a1cc1 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/powershell-CFHJl5sT.js @@ -0,0 +1 @@ +function a(e,n){n=n||{};for(var r=n.prefix!==void 0?n.prefix:"^",t=n.suffix!==void 0?n.suffix:"\\b",i=0;i/,k=a([b,C],{suffix:""}),h=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,x=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,E=/[A-Z]:|%|\?/i,w=a([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),y=a([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""}),M=a([E,w,y],{suffix:f}),p={keyword:P,number:h,operator:k,builtin:M,punctuation:d,variable:x};function o(e,n){var r=n.returnStack[n.returnStack.length-1];if(r&&r.shouldReturnFrom(n))return n.tokenize=r.tokenize,n.returnStack.pop(),n.tokenize(e,n);if(e.eatSpace())return null;if(e.eat("("))return n.bracketNesting+=1,"punctuation";if(e.eat(")"))return n.bracketNesting-=1,"punctuation";for(var t in p)if(e.match(p[t]))return t;var i=e.next();if(i==="'")return R(e,n);if(i==="$")return s(e,n);if(i==='"')return v(e,n);if(i==="<"&&e.eat("#"))return n.tokenize=S,S(e,n);if(i==="#")return e.skipToEnd(),"comment";if(i==="@"){var l=e.eat(/["']/);if(l&&e.eol())return n.tokenize=u,n.startQuote=l[0],u(e,n);if(e.eol())return"error";if(e.peek().match(/[({]/))return"punctuation";if(e.peek().match(c))return s(e,n)}return"error"}function R(e,n){for(var r;(r=e.peek())!=null;)if(e.next(),r==="'"&&!e.eat("'"))return n.tokenize=o,"string";return"error"}function v(e,n){for(var r;(r=e.peek())!=null;){if(r==="$")return n.tokenize=I,"string";if(e.next(),r==="`"){e.next();continue}if(r==='"'&&!e.eat('"'))return n.tokenize=o,"string"}return"error"}function I(e,n){return g(e,n,v)}function z(e,n){return n.tokenize=u,n.startQuote='"',u(e,n)}function T(e,n){return g(e,n,z)}function g(e,n,r){if(e.match("$(")){var t=n.bracketNesting;return n.returnStack.push({shouldReturnFrom:function(i){return i.bracketNesting===t},tokenize:r}),n.tokenize=o,n.bracketNesting+=1,"punctuation"}else return e.next(),n.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:r}),n.tokenize=s,n.tokenize(e,n)}function S(e,n){for(var r=!1,t;(t=e.next())!=null;){if(r&&t==">"){n.tokenize=o;break}r=t==="#"}return"comment"}function s(e,n){var r=e.peek();return e.eat("{")?(n.tokenize=m,m(e,n)):r!=null&&r.match(c)?(e.eatWhile(c),n.tokenize=o,"variable"):(n.tokenize=o,"error")}function m(e,n){for(var r;(r=e.next())!=null;)if(r==="}"){n.tokenize=o;break}return"variable"}function u(e,n){var r=n.startQuote;if(e.sol()&&e.match(new RegExp(r+"@")))n.tokenize=o;else if(r==='"')for(;!e.eol();){var t=e.peek();if(t==="$")return n.tokenize=T,"string";e.next(),t==="`"&&e.next()}else e.skipToEnd();return"string"}const D={name:"powershell",startState:function(){return{returnStack:[],bracketNesting:0,tokenize:o}},token:function(e,n){return n.tokenize(e,n)},languageData:{commentTokens:{line:"#",block:{open:"<#",close:"#>"}}}};export{D as powerShell}; diff --git a/pkg/cli/webapp/dist/assets/properties-C78fOPTZ.js b/pkg/cli/webapp/dist/assets/properties-C78fOPTZ.js new file mode 100644 index 0000000..449af6e --- /dev/null +++ b/pkg/cli/webapp/dist/assets/properties-C78fOPTZ.js @@ -0,0 +1 @@ +const f={name:"properties",token:function(e,i){var o=e.sol()||i.afterSection,l=e.eol();if(i.afterSection=!1,o&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),l&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),o)for(;e.eatSpace(););var n=e.next();return o&&(n==="#"||n==="!"||n===";")?(i.position="comment",e.skipToEnd(),"comment"):o&&n==="["?(i.afterSection=!0,e.skipTo("]"),e.eat("]"),"header"):n==="="||n===":"?(i.position="quote",null):(n==="\\"&&i.position==="quote"&&e.eol()&&(i.nextMultiline=!0),i.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}};export{f as properties}; diff --git a/pkg/cli/webapp/dist/assets/protobuf-ChK-085T.js b/pkg/cli/webapp/dist/assets/protobuf-ChK-085T.js new file mode 100644 index 0000000..64dfb2c --- /dev/null +++ b/pkg/cli/webapp/dist/assets/protobuf-ChK-085T.js @@ -0,0 +1 @@ +function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var n=["package","message","import","syntax","required","optional","repeated","reserved","default","extensions","packed","bool","bytes","double","enum","float","string","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","option","service","rpc","returns"],r=t(n),i=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*");function f(e){return e.eatSpace()?null:e.match("//")?(e.skipToEnd(),"comment"):e.match(/^[0-9\.+-]/,!1)&&(e.match(/^[+-]?0x[0-9a-fA-F]+/)||e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":e.match(/^"([^"]|(""))*"/)||e.match(/^'([^']|(''))*'/)?"string":e.match(r)?"keyword":e.match(i)?"variable":(e.next(),null)}const u={name:"protobuf",token:f,languageData:{autocomplete:n}};export{u as protobuf}; diff --git a/pkg/cli/webapp/dist/assets/pug-DeIclll2.js b/pkg/cli/webapp/dist/assets/pug-DeIclll2.js new file mode 100644 index 0000000..d1a2063 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/pug-DeIclll2.js @@ -0,0 +1 @@ +import{javascript as e}from"./javascript-iXu5QeM3.js";var f={"{":"}","(":")","[":"]"};function p(i){if(typeof i!="object")return i;let n={};for(let t in i){let r=i[t];n[t]=r instanceof Array?r.slice():r}return n}class u{constructor(n){this.indentUnit=n,this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=e.startState(n),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken=""}copy(){var n=new u(this.indentUnit);return n.javaScriptLine=this.javaScriptLine,n.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,n.javaScriptArguments=this.javaScriptArguments,n.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,n.isInterpolating=this.isInterpolating,n.interpolationNesting=this.interpolationNesting,n.jsState=(e.copyState||p)(this.jsState),n.restOfLine=this.restOfLine,n.isIncludeFiltered=this.isIncludeFiltered,n.isEach=this.isEach,n.lastTag=this.lastTag,n.isAttrs=this.isAttrs,n.attrsNest=this.attrsNest.slice(),n.inAttributeName=this.inAttributeName,n.attributeIsType=this.attributeIsType,n.attrValue=this.attrValue,n.indentOf=this.indentOf,n.indentToken=this.indentToken,n}}function h(i,n){if(i.sol()&&(n.javaScriptLine=!1,n.javaScriptLineExcludesColon=!1),n.javaScriptLine){if(n.javaScriptLineExcludesColon&&i.peek()===":"){n.javaScriptLine=!1,n.javaScriptLineExcludesColon=!1;return}var t=e.token(i,n.jsState);return i.eol()&&(n.javaScriptLine=!1),t||!0}}function d(i,n){if(n.javaScriptArguments){if(n.javaScriptArgumentsDepth===0&&i.peek()!=="("){n.javaScriptArguments=!1;return}if(i.peek()==="("?n.javaScriptArgumentsDepth++:i.peek()===")"&&n.javaScriptArgumentsDepth--,n.javaScriptArgumentsDepth===0){n.javaScriptArguments=!1;return}var t=e.token(i,n.jsState);return t||!0}}function s(i){if(i.match(/^yield\b/))return"keyword"}function S(i){if(i.match(/^(?:doctype) *([^\n]+)?/))return"meta"}function o(i,n){if(i.match("#{"))return n.isInterpolating=!0,n.interpolationNesting=0,"punctuation"}function v(i,n){if(n.isInterpolating){if(i.peek()==="}"){if(n.interpolationNesting--,n.interpolationNesting<0)return i.next(),n.isInterpolating=!1,"punctuation"}else i.peek()==="{"&&n.interpolationNesting++;return e.token(i,n.jsState)||!0}}function g(i,n){if(i.match(/^case\b/))return n.javaScriptLine=!0,"keyword"}function j(i,n){if(i.match(/^when\b/))return n.javaScriptLine=!0,n.javaScriptLineExcludesColon=!0,"keyword"}function k(i){if(i.match(/^default\b/))return"keyword"}function b(i,n){if(i.match(/^extends?\b/))return n.restOfLine="string","keyword"}function A(i,n){if(i.match(/^append\b/))return n.restOfLine="variable","keyword"}function y(i,n){if(i.match(/^prepend\b/))return n.restOfLine="variable","keyword"}function L(i,n){if(i.match(/^block\b *(?:(prepend|append)\b)?/))return n.restOfLine="variable","keyword"}function w(i,n){if(i.match(/^include\b/))return n.restOfLine="string","keyword"}function N(i,n){if(i.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&i.match("include"))return n.isIncludeFiltered=!0,"keyword"}function x(i,n){if(n.isIncludeFiltered){var t=l(i,n);return n.isIncludeFiltered=!1,n.restOfLine="string",t}}function T(i,n){if(i.match(/^mixin\b/))return n.javaScriptLine=!0,"keyword"}function I(i,n){if(i.match(/^\+([-\w]+)/))return i.match(/^\( *[-\w]+ *=/,!1)||(n.javaScriptArguments=!0,n.javaScriptArgumentsDepth=0),"variable";if(i.match("+#{",!1))return i.next(),n.mixinCallAfter=!0,o(i,n)}function O(i,n){if(n.mixinCallAfter)return n.mixinCallAfter=!1,i.match(/^\( *[-\w]+ *=/,!1)||(n.javaScriptArguments=!0,n.javaScriptArgumentsDepth=0),!0}function C(i,n){if(i.match(/^(if|unless|else if|else)\b/))return n.javaScriptLine=!0,"keyword"}function E(i,n){if(i.match(/^(- *)?(each|for)\b/))return n.isEach=!0,"keyword"}function D(i,n){if(n.isEach){if(i.match(/^ in\b/))return n.javaScriptLine=!0,n.isEach=!1,"keyword";if(i.sol()||i.eol())n.isEach=!1;else if(i.next()){for(;!i.match(/^ in\b/,!1)&&i.next(););return"variable"}}}function F(i,n){if(i.match(/^while\b/))return n.javaScriptLine=!0,"keyword"}function m(i,n){var t;if(t=i.match(/^(\w(?:[-:\w]*\w)?)\/?/))return n.lastTag=t[1].toLowerCase(),"tag"}function l(i,n){if(i.match(/^:([\w\-]+)/))return c(i,n),"atom"}function V(i,n){if(i.match(/^(!?=|-)/))return n.javaScriptLine=!0,"punctuation"}function U(i){if(i.match(/^#([\w-]+)/))return"builtin"}function z(i){if(i.match(/^\.([\w-]+)/))return"className"}function B(i,n){if(i.peek()=="(")return i.next(),n.isAttrs=!0,n.attrsNest=[],n.inAttributeName=!0,n.attrValue="",n.attributeIsType=!1,"punctuation"}function a(i,n){if(n.isAttrs){if(f[i.peek()]&&n.attrsNest.push(f[i.peek()]),n.attrsNest[n.attrsNest.length-1]===i.peek())n.attrsNest.pop();else if(i.eat(")"))return n.isAttrs=!1,"punctuation";if(n.inAttributeName&&i.match(/^[^=,\)!]+/))return(i.peek()==="="||i.peek()==="!")&&(n.inAttributeName=!1,n.jsState=e.startState(2),n.lastTag==="script"&&i.current().trim().toLowerCase()==="type"?n.attributeIsType=!0:n.attributeIsType=!1),"attribute";var t=e.token(i,n.jsState);if(n.attrsNest.length===0&&(t==="string"||t==="variable"||t==="keyword"))try{return Function("","var x "+n.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),n.inAttributeName=!0,n.attrValue="",i.backUp(i.current().length),a(i,n)}catch{}return n.attrValue+=i.current(),t||!0}}function M(i,n){if(i.match(/^&attributes\b/))return n.javaScriptArguments=!0,n.javaScriptArgumentsDepth=0,"keyword"}function R(i){if(i.sol()&&i.eatSpace())return"indent"}function Z(i,n){if(i.match(/^ *\/\/(-)?([^\n]*)/))return n.indentOf=i.indentation(),n.indentToken="comment","comment"}function $(i){if(i.match(/^: */))return"colon"}function q(i,n){if(i.match(/^(?:\| ?| )([^\n]+)/))return"string";if(i.match(/^(<[^\n]*)/,!1))return c(i,n),i.skipToEnd(),n.indentToken}function G(i,n){if(i.eat("."))return c(i,n),"dot"}function H(i){return i.next(),null}function c(i,n){n.indentOf=i.indentation(),n.indentToken="string"}function J(i,n){if(i.sol()&&(n.restOfLine=""),n.restOfLine){i.skipToEnd();var t=n.restOfLine;return n.restOfLine="",t}}function K(i){return new u(i)}function P(i){return i.copy()}function Q(i,n){var t=J(i,n)||v(i,n)||x(i,n)||D(i,n)||a(i,n)||h(i,n)||d(i,n)||O(i,n)||s(i)||S(i)||o(i,n)||g(i,n)||j(i,n)||k(i)||b(i,n)||A(i,n)||y(i,n)||L(i,n)||w(i,n)||N(i,n)||T(i,n)||I(i,n)||C(i,n)||E(i,n)||F(i,n)||m(i,n)||l(i,n)||V(i,n)||U(i)||z(i)||B(i,n)||M(i,n)||R(i)||q(i,n)||Z(i,n)||$(i)||G(i,n)||H(i);return t===!0?null:t}const X={startState:K,copyState:P,token:Q};export{X as pug}; diff --git a/pkg/cli/webapp/dist/assets/puppet-DMA9R1ak.js b/pkg/cli/webapp/dist/assets/puppet-DMA9R1ak.js new file mode 100644 index 0000000..751e8b4 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/puppet-DMA9R1ak.js @@ -0,0 +1 @@ +var c={},s=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;function a(e,n){for(var i=n.split(" "),o=0;o.*/,!1),t=e.match(/(\s+)?[\w:_]+(\s+)?{/,!1),f=e.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),r=e.next();if(r==="$")return e.match(s)?n.continueString?"variableName.special":"variable":"error";if(n.continueString)return e.backUp(1),u(e,n);if(n.inDefinition){if(e.match(/(\s+)?[\w:_]+(\s+)?/))return"def";e.match(/\s+{/),n.inDefinition=!1}return n.inInclude?(e.match(/(\s+)?\S+(\s+)?/),n.inInclude=!1,"def"):e.match(/(\s+)?\w+\(/)?(e.backUp(1),"def"):o?(e.match(/(\s+)?\w+/),"tag"):i&&c.hasOwnProperty(i)?(e.backUp(1),e.match(/[\w]+/),e.match(/\s+\S+\s+{/,!1)&&(n.inDefinition=!0),i=="include"&&(n.inInclude=!0),c[i]):/(^|\s+)[A-Z][\w:_]+/.test(i)?(e.backUp(1),e.match(/(^|\s+)[A-Z][\w:_]+/),"def"):t?(e.match(/(\s+)?[\w:_]+/),"def"):f?(e.match(/(\s+)?[@]{1,2}/),"atom"):r=="#"?(e.skipToEnd(),"comment"):r=="'"||r=='"'?(n.pending=r,u(e,n)):r=="{"||r=="}"?"bracket":r=="/"?(e.match(/^[^\/]*\//),"string.special"):r.match(/[0-9]/)?(e.eatWhile(/[0-9]+/),"number"):r=="="?(e.peek()==">"&&e.next(),"operator"):(e.eatWhile(/[\w-]/),null)}const p={name:"puppet",startState:function(){var e={};return e.inDefinition=!1,e.inInclude=!1,e.continueString=!1,e.pending=!1,e},token:function(e,n){return e.eatSpace()?null:l(e,n)}};export{p as puppet}; diff --git a/pkg/cli/webapp/dist/assets/python-BuPzkPfP.js b/pkg/cli/webapp/dist/assets/python-BuPzkPfP.js new file mode 100644 index 0000000..edd2b6e --- /dev/null +++ b/pkg/cli/webapp/dist/assets/python-BuPzkPfP.js @@ -0,0 +1 @@ +function s(o){return new RegExp("^(("+o.join(")|(")+"))\\b")}var N=s(["and","or","not","is"]),E=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],F=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function c(o){return o.scopes[o.scopes.length-1]}function A(o){for(var p="error",O=o.delimiters||o.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,h=[o.singleOperators,o.doubleOperators,o.doubleDelimiters,o.tripleDelimiters,o.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],g=0;gi?S(n,e):l0&&_(n,e)&&(t+=" "+p),t}}return v(n,e)}function v(n,e,r){if(n.eatSpace())return null;if(!r&&n.match(/^#.*/))return"comment";if(n.match(/^[0-9\.]/,!1)){var i=!1;if(n.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),n.match(/^[\d_]+\.\d*/)&&(i=!0),n.match(/^\.\d+/)&&(i=!0),i)return n.eat(/J/i),"number";var l=!1;if(n.match(/^0x[0-9a-f_]+/i)&&(l=!0),n.match(/^0b[01_]+/i)&&(l=!0),n.match(/^0o[0-7_]+/i)&&(l=!0),n.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(n.eat(/J/i),l=!0),n.match(/^0(?![\dx])/i)&&(l=!0),l)return n.eat(/L/i),"number"}if(n.match(w)){var t=n.current().toLowerCase().indexOf("f")!==-1;return t?(e.tokenize=R(n.current(),e.tokenize),e.tokenize(n,e)):(e.tokenize=B(n.current(),e.tokenize),e.tokenize(n,e))}for(var u=0;u=0;)n=n.substr(1);var r=n.length==1,i="string";function l(u){return function(f,b){var T=v(f,b,!0);return T=="punctuation"&&(f.current()=="{"?b.tokenize=l(u+1):f.current()=="}"&&(u>1?b.tokenize=l(u-1):b.tokenize=t)),T}}function t(u,f){for(;!u.eol();)if(u.eatWhile(/[^'"\{\}\\]/),u.eat("\\")){if(u.next(),r&&u.eol())return i}else{if(u.match(n))return f.tokenize=e,i;if(u.match("{{"))return i;if(u.match("{",!1))return f.tokenize=l(0),u.current()?i:f.tokenize(u,f);if(u.match("}}"))return i;if(u.match("}"))return p;u.eat(/['"]/)}if(r){if(o.singleLineStringErrors)return p;f.tokenize=e}return i}return t.isString=!0,t}function B(n,e){for(;"rubf".indexOf(n.charAt(0).toLowerCase())>=0;)n=n.substr(1);var r=n.length==1,i="string";function l(t,u){for(;!t.eol();)if(t.eatWhile(/[^'"\\]/),t.eat("\\")){if(t.next(),r&&t.eol())return i}else{if(t.match(n))return u.tokenize=e,i;t.eat(/['"]/)}if(r){if(o.singleLineStringErrors)return p;u.tokenize=e}return i}return l.isString=!0,l}function S(n,e){for(;c(e).type!="py";)e.scopes.pop();e.scopes.push({offset:c(e).offset+n.indentUnit,type:"py",align:null})}function m(n,e,r){var i=n.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:n.column()+1;e.scopes.push({offset:e.indent+(k||n.indentUnit),type:r,align:i})}function _(n,e){for(var r=n.indentation();e.scopes.length>1&&c(e).offset>r;){if(c(e).type!="py")return!0;e.scopes.pop()}return c(e).offset!=r}function D(n,e){n.sol()&&(e.beginningOfLine=!0,e.dedent=!1);var r=e.tokenize(n,e),i=n.current();if(e.beginningOfLine&&i=="@")return n.match(y,!1)?"meta":x?"operator":p;if(/\S/.test(i)&&(e.beginningOfLine=!1),(r=="variable"||r=="builtin")&&e.lastToken=="meta"&&(r="meta"),(i=="pass"||i=="return")&&(e.dedent=!0),i=="lambda"&&(e.lambda=!0),i==":"&&!e.lambda&&c(e).type=="py"&&n.match(/^\s*(?:#|$)/,!1)&&S(n,e),i.length==1&&!/string|comment/.test(r)){var l="[({".indexOf(i);if(l!=-1&&m(n,e,"])}".slice(l,l+1)),l="])}".indexOf(i),l!=-1)if(c(e).type==i)e.indent=e.scopes.pop().offset-(k||n.indentUnit);else return p}return e.dedent&&n.eol()&&c(e).type=="py"&&e.scopes.length>1&&e.scopes.pop(),r}return{name:"python",startState:function(){return{tokenize:z,scopes:[{offset:0,type:"py",align:null}],indent:0,lastToken:null,lambda:!1,dedent:0}},token:function(n,e){var r=e.errorToken;r&&(e.errorToken=!1);var i=D(n,e);return i&&i!="comment"&&(e.lastToken=i=="keyword"||i=="punctuation"?n.current():i),i=="punctuation"&&(i=null),n.eol()&&e.lambda&&(e.lambda=!1),r?p:i},indent:function(n,e,r){if(n.tokenize!=z)return n.tokenize.isString?null:0;var i=c(n),l=i.type==e.charAt(0)||i.type=="py"&&!n.dedent&&/^(else:|elif |except |finally:)/.test(e);return i.align!=null?i.align-(l?1:0):i.offset-(l?k||r.unit:0)},languageData:{autocomplete:E.concat(F).concat(["exec","print"]),indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,commentTokens:{line:"#"},closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""']}}}}var U=function(o){return o.split(" ")};const Z=A({}),P=A({extra_keywords:U("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")});export{P as cython,A as mkPython,Z as python}; diff --git a/pkg/cli/webapp/dist/assets/python-DhUJRlN_.js b/pkg/cli/webapp/dist/assets/python-DhUJRlN_.js new file mode 100644 index 0000000..4e3097a --- /dev/null +++ b/pkg/cli/webapp/dist/assets/python-DhUJRlN_.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse(`{"displayName":"Python","name":"python","patterns":[{"include":"#statement"},{"include":"#expression"}],"repository":{"annotated-parameter":{"begin":"\\\\b([[:alpha:]_]\\\\w*)\\\\s*(:)","beginCaptures":{"1":{"name":"variable.parameter.function.language.python"},"2":{"name":"punctuation.separator.annotation.python"}},"end":"(,)|(?=\\\\))","endCaptures":{"1":{"name":"punctuation.separator.parameters.python"}},"patterns":[{"include":"#expression"},{"match":"=(?!=)","name":"keyword.operator.assignment.python"}]},"assignment-operator":{"match":"<<=|>>=|//=|\\\\*\\\\*=|\\\\+=|-=|/=|@=|\\\\*=|%=|~=|\\\\^=|&=|\\\\|=|=(?!=)","name":"keyword.operator.assignment.python"},"backticks":{"begin":"\\\\\`","end":"(?:\\\\\`|(?))","name":"comment.typehint.punctuation.notation.python"},{"match":"([[:alpha:]_]\\\\w*)","name":"comment.typehint.variable.notation.python"}]},{"include":"#comments-base"}]},"comments-base":{"begin":"(\\\\#)","beginCaptures":{"1":{"name":"punctuation.definition.comment.python"}},"end":"($)","name":"comment.line.number-sign.python","patterns":[{"include":"#codetags"}]},"comments-string-double-three":{"begin":"(\\\\#)","beginCaptures":{"1":{"name":"punctuation.definition.comment.python"}},"end":"($|(?=\\"\\"\\"))","name":"comment.line.number-sign.python","patterns":[{"include":"#codetags"}]},"comments-string-single-three":{"begin":"(\\\\#)","beginCaptures":{"1":{"name":"punctuation.definition.comment.python"}},"end":"($|(?='''))","name":"comment.line.number-sign.python","patterns":[{"include":"#codetags"}]},"curly-braces":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.dict.begin.python"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.dict.end.python"}},"patterns":[{"match":":","name":"punctuation.separator.dict.python"},{"include":"#expression"}]},"decorator":{"begin":"^\\\\s*((@))\\\\s*(?=[[:alpha:]_]\\\\w*)","beginCaptures":{"1":{"name":"entity.name.function.decorator.python"},"2":{"name":"punctuation.definition.decorator.python"}},"end":"(\\\\))(?:(.*?)(?=\\\\s*(?:\\\\#|$)))|(?=\\\\n|\\\\#)","endCaptures":{"1":{"name":"punctuation.definition.arguments.end.python"},"2":{"name":"invalid.illegal.decorator.python"}},"name":"meta.function.decorator.python","patterns":[{"include":"#decorator-name"},{"include":"#function-arguments"}]},"decorator-name":{"patterns":[{"include":"#builtin-callables"},{"include":"#illegal-object-name"},{"captures":{"2":{"name":"punctuation.separator.period.python"}},"match":"([[:alpha:]_]\\\\w*)|(\\\\.)","name":"entity.name.function.decorator.python"},{"include":"#line-continuation"},{"captures":{"1":{"name":"invalid.illegal.decorator.python"}},"match":"\\\\s*([^([:alpha:]\\\\s_\\\\.#\\\\\\\\].*?)(?=\\\\#|$)","name":"invalid.illegal.decorator.python"}]},"docstring":{"patterns":[{"begin":"(\\\\'\\\\'\\\\'|\\\\\\"\\\\\\"\\\\\\")","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.python"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"punctuation.definition.string.end.python"}},"name":"string.quoted.docstring.multi.python","patterns":[{"include":"#docstring-prompt"},{"include":"#codetags"},{"include":"#docstring-guts-unicode"}]},{"begin":"([rR])(\\\\'\\\\'\\\\'|\\\\\\"\\\\\\"\\\\\\")","beginCaptures":{"1":{"name":"storage.type.string.python"},"2":{"name":"punctuation.definition.string.begin.python"}},"end":"(\\\\2)","endCaptures":{"1":{"name":"punctuation.definition.string.end.python"}},"name":"string.quoted.docstring.raw.multi.python","patterns":[{"include":"#string-consume-escape"},{"include":"#docstring-prompt"},{"include":"#codetags"}]},{"begin":"(\\\\'|\\\\\\")","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.python"}},"end":"(\\\\1)|(\\\\n)","endCaptures":{"1":{"name":"punctuation.definition.string.end.python"},"2":{"name":"invalid.illegal.newline.python"}},"name":"string.quoted.docstring.single.python","patterns":[{"include":"#codetags"},{"include":"#docstring-guts-unicode"}]},{"begin":"([rR])(\\\\'|\\\\\\")","beginCaptures":{"1":{"name":"storage.type.string.python"},"2":{"name":"punctuation.definition.string.begin.python"}},"end":"(\\\\2)|(\\\\n)","endCaptures":{"1":{"name":"punctuation.definition.string.end.python"},"2":{"name":"invalid.illegal.newline.python"}},"name":"string.quoted.docstring.raw.single.python","patterns":[{"include":"#string-consume-escape"},{"include":"#codetags"}]}]},"docstring-guts-unicode":{"patterns":[{"include":"#escape-sequence-unicode"},{"include":"#escape-sequence"},{"include":"#string-line-continuation"}]},"docstring-prompt":{"captures":{"1":{"name":"keyword.control.flow.python"}},"match":"(?:(?:^|\\\\G)\\\\s*((?:>>>|\\\\.\\\\.\\\\.)\\\\s)(?=\\\\s*\\\\S))"},"docstring-statement":{"begin":"^(?=\\\\s*[rR]?(\\\\'\\\\'\\\\'|\\\\\\"\\\\\\"\\\\\\"|\\\\'|\\\\\\"))","comment":"the string either terminates correctly or by the beginning of a new line (this is for single line docstrings that aren't terminated) AND it's not followed by another docstring","end":"((?<=\\\\1)|^)(?!\\\\s*[rR]?(\\\\'\\\\'\\\\'|\\\\\\"\\\\\\"\\\\\\"|\\\\'|\\\\\\"))","patterns":[{"include":"#docstring"}]},"double-one-regexp-character-set":{"patterns":[{"match":"\\\\[\\\\^?\\\\](?!.*?\\\\])"},{"begin":"(\\\\[)(\\\\^)?(\\\\])?","beginCaptures":{"1":{"name":"punctuation.character.set.begin.regexp constant.other.set.regexp"},"2":{"name":"keyword.operator.negation.regexp"},"3":{"name":"constant.character.set.regexp"}},"end":"(\\\\]|(?=\\"))|((?=(?)","beginCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"},"2":{"name":"entity.name.tag.named.group.regexp"}},"end":"(\\\\)|(?=\\"))|((?=(?)","beginCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"},"2":{"name":"entity.name.tag.named.group.regexp"}},"end":"(\\\\)|(?=\\"\\"\\"))","endCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"},"2":{"name":"invalid.illegal.newline.python"}},"name":"meta.named.regexp","patterns":[{"include":"#double-three-regexp-expression"},{"include":"#comments-string-double-three"}]},"double-three-regexp-parentheses":{"begin":"\\\\(","beginCaptures":{"0":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"}},"end":"(\\\\)|(?=\\"\\"\\"))","endCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"},"2":{"name":"invalid.illegal.newline.python"}},"patterns":[{"include":"#double-three-regexp-expression"},{"include":"#comments-string-double-three"}]},"double-three-regexp-parentheses-non-capturing":{"begin":"\\\\(\\\\?:","beginCaptures":{"0":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"}},"end":"(\\\\)|(?=\\"\\"\\"))","endCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"},"2":{"name":"invalid.illegal.newline.python"}},"patterns":[{"include":"#double-three-regexp-expression"},{"include":"#comments-string-double-three"}]},"ellipsis":{"match":"\\\\.\\\\.\\\\.","name":"constant.other.ellipsis.python"},"escape-sequence":{"match":"\\\\\\\\(x[0-9A-Fa-f]{2}|[0-7]{1,3}|[\\\\\\\\\\"'abfnrtv])","name":"constant.character.escape.python"},"escape-sequence-unicode":{"patterns":[{"match":"\\\\\\\\(u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|N\\\\{[\\\\w\\\\s]+?\\\\})","name":"constant.character.escape.python"}]},"expression":{"comment":"All valid Python expressions","patterns":[{"include":"#expression-base"},{"include":"#member-access"},{"comment":"Tokenize identifiers to help linters","match":"\\\\b([[:alpha:]_]\\\\w*)\\\\b"}]},"expression-bare":{"comment":"valid Python expressions w/o comments and line continuation","patterns":[{"include":"#backticks"},{"include":"#illegal-anno"},{"include":"#literal"},{"include":"#regexp"},{"include":"#string"},{"include":"#lambda"},{"include":"#generator"},{"include":"#illegal-operator"},{"include":"#operator"},{"include":"#curly-braces"},{"include":"#item-access"},{"include":"#list"},{"include":"#odd-function-call"},{"include":"#round-braces"},{"include":"#function-call"},{"include":"#builtin-functions"},{"include":"#builtin-types"},{"include":"#builtin-exceptions"},{"include":"#magic-names"},{"include":"#special-names"},{"include":"#illegal-names"},{"include":"#special-variables"},{"include":"#ellipsis"},{"include":"#punctuation"},{"include":"#line-continuation"}]},"expression-base":{"comment":"valid Python expressions with comments and line continuation","patterns":[{"include":"#comments"},{"include":"#expression-bare"},{"include":"#line-continuation"}]},"f-expression":{"comment":"All valid Python expressions, except comments and line continuation","patterns":[{"include":"#expression-bare"},{"include":"#member-access"},{"comment":"Tokenize identifiers to help linters","match":"\\\\b([[:alpha:]_]\\\\w*)\\\\b"}]},"fregexp-base-expression":{"patterns":[{"include":"#fregexp-quantifier"},{"include":"#fstring-formatting-braces"},{"match":"\\\\{.*?\\\\}"},{"include":"#regexp-base-common"}]},"fregexp-quantifier":{"match":"\\\\{\\\\{(\\\\d+|\\\\d+,(\\\\d+)?|,\\\\d+)\\\\}\\\\}","name":"keyword.operator.quantifier.regexp"},"fstring-fnorm-quoted-multi-line":{"begin":"(\\\\b[fF])([bBuU])?('''|\\"\\"\\")","beginCaptures":{"1":{"name":"string.interpolated.python string.quoted.multi.python storage.type.string.python"},"2":{"name":"invalid.illegal.prefix.python"},"3":{"name":"punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python"}},"end":"(\\\\3)","endCaptures":{"1":{"name":"punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"},"2":{"name":"invalid.illegal.newline.python"}},"name":"meta.fstring.python","patterns":[{"include":"#fstring-guts"},{"include":"#fstring-illegal-multi-brace"},{"include":"#fstring-multi-brace"},{"include":"#fstring-multi-core"}]},"fstring-fnorm-quoted-single-line":{"begin":"(\\\\b[fF])([bBuU])?((['\\"]))","beginCaptures":{"1":{"name":"string.interpolated.python string.quoted.single.python storage.type.string.python"},"2":{"name":"invalid.illegal.prefix.python"},"3":{"name":"punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python"}},"end":"(\\\\3)|((?=^]?[-+ ]?\\\\#?\\\\d*,?(\\\\.\\\\d+)?[bcdeEfFgGnosxX%]?)(?=})"},{"include":"#fstring-terminator-multi-tail"}]},"fstring-terminator-multi-tail":{"begin":"((?:=?)(?:![rsa])?)(:)(?=.*?{)","beginCaptures":{"1":{"name":"storage.type.format.python"},"2":{"name":"storage.type.format.python"}},"end":"(?=})","patterns":[{"include":"#fstring-illegal-multi-brace"},{"include":"#fstring-multi-brace"},{"match":"([bcdeEfFgGnosxX%])(?=})","name":"storage.type.format.python"},{"match":"(\\\\.\\\\d+)","name":"storage.type.format.python"},{"match":"(,)","name":"storage.type.format.python"},{"match":"(\\\\d+)","name":"storage.type.format.python"},{"match":"(\\\\#)","name":"storage.type.format.python"},{"match":"([-+ ])","name":"storage.type.format.python"},{"match":"([<>=^])","name":"storage.type.format.python"},{"match":"(\\\\w)","name":"storage.type.format.python"}]},"fstring-terminator-single":{"patterns":[{"match":"(=(![rsa])?)(?=})","name":"storage.type.format.python"},{"match":"(=?![rsa])(?=})","name":"storage.type.format.python"},{"captures":{"1":{"name":"storage.type.format.python"},"2":{"name":"storage.type.format.python"}},"match":"((?:=?)(?:![rsa])?)(:\\\\w?[<>=^]?[-+ ]?\\\\#?\\\\d*,?(\\\\.\\\\d+)?[bcdeEfFgGnosxX%]?)(?=})"},{"include":"#fstring-terminator-single-tail"}]},"fstring-terminator-single-tail":{"begin":"((?:=?)(?:![rsa])?)(:)(?=.*?{)","beginCaptures":{"1":{"name":"storage.type.format.python"},"2":{"name":"storage.type.format.python"}},"end":"(?=})|(?=\\\\n)","patterns":[{"include":"#fstring-illegal-single-brace"},{"include":"#fstring-single-brace"},{"match":"([bcdeEfFgGnosxX%])(?=})","name":"storage.type.format.python"},{"match":"(\\\\.\\\\d+)","name":"storage.type.format.python"},{"match":"(,)","name":"storage.type.format.python"},{"match":"(\\\\d+)","name":"storage.type.format.python"},{"match":"(\\\\#)","name":"storage.type.format.python"},{"match":"([-+ ])","name":"storage.type.format.python"},{"match":"([<>=^])","name":"storage.type.format.python"},{"match":"(\\\\w)","name":"storage.type.format.python"}]},"function-arguments":{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.arguments.begin.python"}},"contentName":"meta.function-call.arguments.python","end":"(?=\\\\))(?!\\\\)\\\\s*\\\\()","patterns":[{"match":"(,)","name":"punctuation.separator.arguments.python"},{"captures":{"1":{"name":"keyword.operator.unpacking.arguments.python"}},"match":"(?:(?<=[,(])|^)\\\\s*(\\\\*{1,2})"},{"include":"#lambda-incomplete"},{"include":"#illegal-names"},{"captures":{"1":{"name":"variable.parameter.function-call.python"},"2":{"name":"keyword.operator.assignment.python"}},"match":"\\\\b([[:alpha:]_]\\\\w*)\\\\s*(=)(?!=)"},{"match":"=(?!=)","name":"keyword.operator.assignment.python"},{"include":"#expression"},{"captures":{"1":{"name":"punctuation.definition.arguments.end.python"},"2":{"name":"punctuation.definition.arguments.begin.python"}},"match":"\\\\s*(\\\\))\\\\s*(\\\\()"}]},"function-call":{"begin":"\\\\b(?=([[:alpha:]_]\\\\w*)\\\\s*(\\\\())","comment":"Regular function call of the type \\"name(args)\\"","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.arguments.end.python"}},"name":"meta.function-call.python","patterns":[{"include":"#special-variables"},{"include":"#function-name"},{"include":"#function-arguments"}]},"function-declaration":{"begin":"\\\\s*(?:\\\\b(async)\\\\s+)?\\\\b(def)\\\\s+(?=[[:alpha:]_][[:word:]]*\\\\s*\\\\()","beginCaptures":{"1":{"name":"storage.type.function.async.python"},"2":{"name":"storage.type.function.python"}},"end":"(:|(?=[#'\\"\\\\n]))","endCaptures":{"1":{"name":"punctuation.section.function.begin.python"}},"name":"meta.function.python","patterns":[{"include":"#function-def-name"},{"include":"#parameters"},{"include":"#line-continuation"},{"include":"#return-annotation"}]},"function-def-name":{"patterns":[{"include":"#illegal-object-name"},{"include":"#builtin-possible-callables"},{"match":"\\\\b([[:alpha:]_]\\\\w*)\\\\b","name":"entity.name.function.python"}]},"function-name":{"patterns":[{"include":"#builtin-possible-callables"},{"comment":"Some color schemas support meta.function-call.generic scope","match":"\\\\b([[:alpha:]_]\\\\w*)\\\\b","name":"meta.function-call.generic.python"}]},"generator":{"begin":"\\\\bfor\\\\b","beginCaptures":{"0":{"name":"keyword.control.flow.python"}},"comment":"Match \\"for ... in\\" construct used in generators and for loops to\\ncorrectly identify the \\"in\\" as a control flow keyword.\\n","end":"\\\\bin\\\\b","endCaptures":{"0":{"name":"keyword.control.flow.python"}},"patterns":[{"include":"#expression"}]},"illegal-anno":{"match":"->","name":"invalid.illegal.annotation.python"},"illegal-names":{"captures":{"1":{"name":"keyword.control.flow.python"},"2":{"name":"keyword.control.import.python"}},"match":"\\\\b(?:(and|assert|async|await|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|in|is|(?<=\\\\.)lambda|lambda(?=\\\\s*[\\\\.=])|nonlocal|not|or|pass|raise|return|try|while|with|yield)|(as|import))\\\\b"},"illegal-object-name":{"comment":"It's illegal to name class or function \\"True\\"","match":"\\\\b(True|False|None)\\\\b","name":"keyword.illegal.name.python"},"illegal-operator":{"patterns":[{"match":"&&|\\\\|\\\\||--|\\\\+\\\\+","name":"invalid.illegal.operator.python"},{"match":"[?$]","name":"invalid.illegal.operator.python"},{"comment":"We don't want \`!\` to flash when we're typing \`!=\`","match":"!\\\\b","name":"invalid.illegal.operator.python"}]},"import":{"comment":"Import statements used to correctly mark \`from\`, \`import\`, and \`as\`\\n","patterns":[{"begin":"\\\\b(?>|&|\\\\||\\\\^|~)|(\\\\*\\\\*|\\\\*|\\\\+|-|%|//|/|@)|(!=|==|>=|<=|<|>)|(:=)"},"parameter-special":{"captures":{"1":{"name":"variable.parameter.function.language.python"},"2":{"name":"variable.parameter.function.language.special.self.python"},"3":{"name":"variable.parameter.function.language.special.cls.python"},"4":{"name":"punctuation.separator.parameters.python"}},"match":"\\\\b((self)|(cls))\\\\b\\\\s*(?:(,)|(?=\\\\)))"},"parameters":{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.parameters.begin.python"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.python"}},"name":"meta.function.parameters.python","patterns":[{"match":"/","name":"keyword.operator.positional.parameter.python"},{"match":"(\\\\*\\\\*|\\\\*)","name":"keyword.operator.unpacking.parameter.python"},{"include":"#lambda-incomplete"},{"include":"#illegal-names"},{"include":"#illegal-object-name"},{"include":"#parameter-special"},{"captures":{"1":{"name":"variable.parameter.function.language.python"},"2":{"name":"punctuation.separator.parameters.python"}},"match":"([[:alpha:]_]\\\\w*)\\\\s*(?:(,)|(?=[)#\\\\n=]))"},{"include":"#comments"},{"include":"#loose-default"},{"include":"#annotated-parameter"}]},"punctuation":{"patterns":[{"match":":","name":"punctuation.separator.colon.python"},{"match":",","name":"punctuation.separator.element.python"}]},"regexp":{"patterns":[{"include":"#regexp-single-three-line"},{"include":"#regexp-double-three-line"},{"include":"#regexp-single-one-line"},{"include":"#regexp-double-one-line"}]},"regexp-backreference":{"captures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp"},"2":{"name":"entity.name.tag.named.backreference.regexp"},"3":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp"}},"match":"(\\\\()(\\\\?P=\\\\w+(?:\\\\s+[[:alnum:]]+)?)(\\\\))","name":"meta.backreference.named.regexp"},"regexp-backreference-number":{"captures":{"1":{"name":"entity.name.tag.backreference.regexp"}},"match":"(\\\\\\\\[1-9]\\\\d?)","name":"meta.backreference.regexp"},"regexp-base-common":{"patterns":[{"match":"\\\\.","name":"support.other.match.any.regexp"},{"match":"\\\\^","name":"support.other.match.begin.regexp"},{"match":"\\\\$","name":"support.other.match.end.regexp"},{"match":"[+*?]\\\\??","name":"keyword.operator.quantifier.regexp"},{"match":"\\\\|","name":"keyword.operator.disjunction.regexp"},{"include":"#regexp-escape-sequence"}]},"regexp-base-expression":{"patterns":[{"include":"#regexp-quantifier"},{"include":"#regexp-base-common"}]},"regexp-charecter-set-escapes":{"patterns":[{"match":"\\\\\\\\[abfnrtv\\\\\\\\]","name":"constant.character.escape.regexp"},{"include":"#regexp-escape-special"},{"match":"\\\\\\\\([0-7]{1,3})","name":"constant.character.escape.regexp"},{"include":"#regexp-escape-character"},{"include":"#regexp-escape-unicode"},{"include":"#regexp-escape-catchall"}]},"regexp-double-one-line":{"begin":"\\\\b(([uU]r)|([bB]r)|(r[bB]?))(\\")","beginCaptures":{"2":{"name":"invalid.deprecated.prefix.python"},"3":{"name":"storage.type.string.python"},"4":{"name":"storage.type.string.python"},"5":{"name":"punctuation.definition.string.begin.python"}},"end":"(\\")|(?)","beginCaptures":{"1":{"name":"punctuation.separator.annotation.result.python"}},"end":"(?=:)","patterns":[{"include":"#expression"}]},"round-braces":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.parenthesis.begin.python"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.parenthesis.end.python"}},"patterns":[{"include":"#expression"}]},"semicolon":{"patterns":[{"match":"\\\\;$","name":"invalid.deprecated.semicolon.python"}]},"single-one-regexp-character-set":{"patterns":[{"match":"\\\\[\\\\^?\\\\](?!.*?\\\\])"},{"begin":"(\\\\[)(\\\\^)?(\\\\])?","beginCaptures":{"1":{"name":"punctuation.character.set.begin.regexp constant.other.set.regexp"},"2":{"name":"keyword.operator.negation.regexp"},"3":{"name":"constant.character.set.regexp"}},"end":"(\\\\]|(?=\\\\'))|((?=(?)","beginCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"},"2":{"name":"entity.name.tag.named.group.regexp"}},"end":"(\\\\)|(?=\\\\'))|((?=(?)","beginCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"},"2":{"name":"entity.name.tag.named.group.regexp"}},"end":"(\\\\)|(?=\\\\'\\\\'\\\\'))","endCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"},"2":{"name":"invalid.illegal.newline.python"}},"name":"meta.named.regexp","patterns":[{"include":"#single-three-regexp-expression"},{"include":"#comments-string-single-three"}]},"single-three-regexp-parentheses":{"begin":"\\\\(","beginCaptures":{"0":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"}},"end":"(\\\\)|(?=\\\\'\\\\'\\\\'))","endCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"},"2":{"name":"invalid.illegal.newline.python"}},"patterns":[{"include":"#single-three-regexp-expression"},{"include":"#comments-string-single-three"}]},"single-three-regexp-parentheses-non-capturing":{"begin":"\\\\(\\\\?:","beginCaptures":{"0":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"}},"end":"(\\\\)|(?=\\\\'\\\\'\\\\'))","endCaptures":{"1":{"name":"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"},"2":{"name":"invalid.illegal.newline.python"}},"patterns":[{"include":"#single-three-regexp-expression"},{"include":"#comments-string-single-three"}]},"special-names":{"match":"\\\\b(_*[[:upper:]][_\\\\d]*[[:upper:]])[[:upper:]\\\\d]*(_\\\\w*)?\\\\b","name":"constant.other.caps.python"},"special-variables":{"captures":{"1":{"name":"variable.language.special.self.python"},"2":{"name":"variable.language.special.cls.python"}},"match":"\\\\b(?=^]?[-+ ]?\\\\#?\\\\d*,?(\\\\.\\\\d+)?[bcdeEfFgGnosxX%]?)?}))","name":"meta.format.brace.python"},{"captures":{"1":{"name":"constant.character.format.placeholder.other.python"},"3":{"name":"storage.type.format.python"},"4":{"name":"storage.type.format.python"}},"match":"({\\\\w*(\\\\.[[:alpha:]_]\\\\w*|\\\\[[^\\\\]'\\"]+\\\\])*(![rsa])?(:)[^'\\"{}\\\\n]*(?:\\\\{[^'\\"}\\\\n]*?\\\\}[^'\\"{}\\\\n]*)*})","name":"meta.format.brace.python"}]},"string-consume-escape":{"match":"\\\\\\\\['\\"\\\\n\\\\\\\\]"},"string-entity":{"patterns":[{"include":"#escape-sequence"},{"include":"#string-line-continuation"},{"include":"#string-formatting"}]},"string-formatting":{"captures":{"1":{"name":"constant.character.format.placeholder.other.python"}},"match":"(%(\\\\([\\\\w\\\\s]*\\\\))?[-+#0 ]*(\\\\d+|\\\\*)?(\\\\.(\\\\d+|\\\\*))?([hlL])?[diouxXeEfFgGcrsab%])","name":"meta.format.percent.python"},"string-line-continuation":{"match":"\\\\\\\\$","name":"constant.language.python"},"string-multi-bad-brace1-formatting-raw":{"begin":"(?=\\\\{%(.*?(?!'''|\\"\\"\\"))%\\\\})","comment":"template using {% ... %}","end":"(?='''|\\"\\"\\")","patterns":[{"include":"#string-consume-escape"}]},"string-multi-bad-brace1-formatting-unicode":{"begin":"(?=\\\\{%(.*?(?!'''|\\"\\"\\"))%\\\\})","comment":"template using {% ... %}","end":"(?='''|\\"\\"\\")","patterns":[{"include":"#escape-sequence-unicode"},{"include":"#escape-sequence"},{"include":"#string-line-continuation"}]},"string-multi-bad-brace2-formatting-raw":{"begin":"(?!\\\\{\\\\{)(?=\\\\{(\\\\w*?(?!'''|\\"\\"\\")[^!:\\\\.\\\\[}\\\\w]).*?(?!'''|\\"\\"\\")\\\\})","comment":"odd format or format-like syntax","end":"(?='''|\\"\\"\\")","patterns":[{"include":"#string-consume-escape"},{"include":"#string-formatting"}]},"string-multi-bad-brace2-formatting-unicode":{"begin":"(?!\\\\{\\\\{)(?=\\\\{(\\\\w*?(?!'''|\\"\\"\\")[^!:\\\\.\\\\[}\\\\w]).*?(?!'''|\\"\\"\\")\\\\})","comment":"odd format or format-like syntax","end":"(?='''|\\"\\"\\")","patterns":[{"include":"#escape-sequence-unicode"},{"include":"#string-entity"}]},"string-quoted-multi-line":{"begin":"(?:\\\\b([rR])(?=[uU]))?([uU])?('''|\\"\\"\\")","beginCaptures":{"1":{"name":"invalid.illegal.prefix.python"},"2":{"name":"storage.type.string.python"},"3":{"name":"punctuation.definition.string.begin.python"}},"end":"(\\\\3)","endCaptures":{"1":{"name":"punctuation.definition.string.end.python"},"2":{"name":"invalid.illegal.newline.python"}},"name":"string.quoted.multi.python","patterns":[{"include":"#string-multi-bad-brace1-formatting-unicode"},{"include":"#string-multi-bad-brace2-formatting-unicode"},{"include":"#string-unicode-guts"}]},"string-quoted-single-line":{"begin":"(?:\\\\b([rR])(?=[uU]))?([uU])?((['\\"]))","beginCaptures":{"1":{"name":"invalid.illegal.prefix.python"},"2":{"name":"storage.type.string.python"},"3":{"name":"punctuation.definition.string.begin.python"}},"end":"(\\\\3)|((?<,?_\'\"\[\(\]\)\s{}]/;function x(n){return new RegExp("^("+n.join("|")+")$")}function r(n,e){var o=n.sol(),i=n.next();if(c=null,o){if(i=="/")return(e.tokenize=s)(n,e);if(i=="\\")return n.eol()||/\s/.test(n.peek())?(n.skipToEnd(),/^\\\s*$/.test(n.current())?(e.tokenize=v)(n):e.tokenize=r,"comment"):(e.tokenize=r,"builtin")}if(/\s/.test(i))return n.peek()=="/"?(n.skipToEnd(),"comment"):"null";if(i=='"')return(e.tokenize=m)(n,e);if(i=="`")return n.eatWhile(/[A-Za-z\d_:\/.]/),"macroName";if(i=="."&&/\d/.test(n.peek())||/\d/.test(i)){var t=null;return n.backUp(1),n.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||n.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||n.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||n.match(/^\d+[ptuv]{1}/)?t="temporal":(n.match(/^0[NwW]{1}/)||n.match(/^0x[\da-fA-F]*/)||n.match(/^[01]+[b]{1}/)||n.match(/^\d+[chijn]{1}/)||n.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(t="number"),t&&(!(i=n.peek())||f.test(i))?t:(n.next(),"error")}return/[A-Za-z]|\./.test(i)?(n.eatWhile(/[A-Za-z._\d]/),p.test(n.current())?"keyword":"variable"):/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(i)||/[{}\(\[\]\)]/.test(i)?null:"error"}function s(n,e){return n.skipToEnd(),/^\/\s*$/.test(n.current())?(e.tokenize=k)(n,e):e.tokenize=r,"comment"}function k(n,e){var o=n.sol()&&n.peek()=="\\";return n.skipToEnd(),o&&/^\\\s*$/.test(n.current())&&(e.tokenize=r),"comment"}function v(n){return n.skipToEnd(),"comment"}function m(n,e){for(var o=!1,i,t=!1;i=n.next();){if(i=='"'&&!o){t=!0;break}o=!o&&i=="\\"}return t&&(e.tokenize=r),"string"}function l(n,e,o){n.context={prev:n.context,indent:n.indent,col:o,type:e}}function u(n){n.indent=n.context.indent,n.context=n.context.prev}const a={name:"q",startState:function(){return{tokenize:r,context:null,indent:0,col:0}},token:function(n,e){n.sol()&&(e.context&&e.context.align==null&&(e.context.align=!1),e.indent=n.indentation());var o=e.tokenize(n,e);if(o!="comment"&&e.context&&e.context.align==null&&e.context.type!="pattern"&&(e.context.align=!0),c=="(")l(e,")",n.column());else if(c=="[")l(e,"]",n.column());else if(c=="{")l(e,"}",n.column());else if(/[\]\}\)]/.test(c)){for(;e.context&&e.context.type=="pattern";)u(e);e.context&&c==e.context.type&&u(e)}else c=="."&&e.context&&e.context.type=="pattern"?u(e):/atom|string|variable/.test(o)&&e.context&&(/[\}\]]/.test(e.context.type)?l(e,"pattern",n.column()):e.context.type=="pattern"&&!e.context.align&&(e.context.align=!0,e.context.col=n.column()));return o},indent:function(n,e,o){var i=e&&e.charAt(0),t=n.context;if(/[\]\}]/.test(i))for(;t&&t.type=="pattern";)t=t.prev;var d=t&&i==t.type;return t?t.type=="pattern"?t.col:t.align?t.col+(d?0:1):t.indent+(d?0:o.unit):0},languageData:{commentTokens:{line:"/"}}};export{a as q}; diff --git a/pkg/cli/webapp/dist/assets/r-B6wPVr8A.js b/pkg/cli/webapp/dist/assets/r-B6wPVr8A.js new file mode 100644 index 0000000..6200ced --- /dev/null +++ b/pkg/cli/webapp/dist/assets/r-B6wPVr8A.js @@ -0,0 +1 @@ +function f(e){for(var n={},r=0;r=!&|~$:]/,t;function p(e,n){t=null;var r=e.next();if(r=="#")return e.skipToEnd(),"comment";if(r=="0"&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if(r=="."&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(r))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if(r=="'"||r=='"')return n.tokenize=E(r),"string";if(r=="`")return e.match(/[^`]+`/),"string.special";if(r=="."&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(r)){e.eatWhile(/[\w\.]/);var i=e.current();return h.propertyIsEnumerable(i)?"atom":N.propertyIsEnumerable(i)?(A.propertyIsEnumerable(i)&&!e.match(/\s*if(\s+|$)/,!1)&&(t="block"),"keyword"):m.propertyIsEnumerable(i)?"builtin":"variable"}else return r=="%"?(e.skipTo("%")&&e.next(),"variableName.special"):r=="<"&&e.eat("-")||r=="<"&&e.match("<-")||r=="-"&&e.match(/>>?/)||r=="="&&n.ctx.argList?"operator":k.test(r)?(r=="$"||e.eatWhile(k),"operator"):/[\(\){}\[\];]/.test(r)?(t=r,r==";"?"punctuation":null):null}function E(e){return function(n,r){if(n.eat("\\")){var i=n.next();return i=="x"?n.match(/^[a-f0-9]{2}/i):(i=="u"||i=="U")&&n.eat("{")&&n.skipTo("}")?n.next():i=="u"?n.match(/^[a-f0-9]{4}/i):i=="U"?n.match(/^[a-f0-9]{8}/i):/[0-7]/.test(i)&&n.match(/^[0-7]{1,2}/),"string.special"}else{for(var l;(l=n.next())!=null;){if(l==e){r.tokenize=p;break}if(l=="\\"){n.backUp(1);break}}return"string"}}}var v=1,u=2,c=4;function o(e,n,r){e.ctx={type:n,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function x(e,n){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|n,column:r.column,prev:r.prev}}function a(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}const I={name:"r",startState:function(e){return{tokenize:p,ctx:{type:"top",indent:-e,flags:u},indent:0,afterIdent:!1}},token:function(e,n){if(e.sol()&&((n.ctx.flags&3)==0&&(n.ctx.flags|=u),n.ctx.flags&c&&a(n),n.indent=e.indentation()),e.eatSpace())return null;var r=n.tokenize(e,n);return r!="comment"&&(n.ctx.flags&u)==0&&x(n,v),(t==";"||t=="{"||t=="}")&&n.ctx.type=="block"&&a(n),t=="{"?o(n,"}",e):t=="("?(o(n,")",e),n.afterIdent&&(n.ctx.argList=!0)):t=="["?o(n,"]",e):t=="block"?o(n,"block",e):t==n.ctx.type?a(n):n.ctx.type=="block"&&r!="comment"&&x(n,c),n.afterIdent=r=="variable"||r=="keyword",r},indent:function(e,n,r){if(e.tokenize!=p)return 0;var i=n&&n.charAt(0),l=e.ctx,d=i==l.type;return l.flags&c&&(l=l.prev),l.type=="block"?l.indent+(i=="{"?0:r.unit):l.flags&v?l.column+(d?0:1):l.indent+(d?0:r.unit)},languageData:{wordChars:".",commentTokens:{line:"#"},autocomplete:b.concat(g,s)}};export{I as r}; diff --git a/pkg/cli/webapp/dist/assets/rpm-CTu-6PCP.js b/pkg/cli/webapp/dist/assets/rpm-CTu-6PCP.js new file mode 100644 index 0000000..9734d1b --- /dev/null +++ b/pkg/cli/webapp/dist/assets/rpm-CTu-6PCP.js @@ -0,0 +1 @@ +var o=/^-+$/,a=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,c=/^[\w+.-]+@[\w.-]+/;const h={name:"rpmchanges",token:function(r){return r.sol()&&(r.match(o)||r.match(a))?"tag":r.match(c)?"string":(r.next(),null)}};var i=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,t=/^[a-zA-Z0-9()]+:/,l=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,p=/^%(ifnarch|ifarch|if)/,f=/^%(else|endif)/,u=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;const d={name:"rpmspec",startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(r,e){var n=r.peek();if(n=="#")return r.skipToEnd(),"comment";if(r.sol()){if(r.match(t))return"header";if(r.match(l))return"atom"}if(r.match(/^\$\w+/)||r.match(/^\$\{\w+\}/))return"def";if(r.match(f))return"keyword";if(r.match(p))return e.controlFlow=!0,"keyword";if(e.controlFlow){if(r.match(u))return"operator";if(r.match(/^(\d+)/))return"number";r.eol()&&(e.controlFlow=!1)}if(r.match(i))return r.eol()&&(e.controlFlow=!1),"number";if(r.match(/^%[\w]+/))return r.match("(")&&(e.macroParameters=!0),"keyword";if(e.macroParameters){if(r.match(/^\d+/))return"number";if(r.match(")"))return e.macroParameters=!1,"keyword"}return r.match(/^%\{\??[\w \-\:\!]+\}/)?(r.eol()&&(e.controlFlow=!1),"def"):(r.next(),null)}};export{h as rpmChanges,d as rpmSpec}; diff --git a/pkg/cli/webapp/dist/assets/ruby-B2Rjki9n.js b/pkg/cli/webapp/dist/assets/ruby-B2Rjki9n.js new file mode 100644 index 0000000..a95f357 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/ruby-B2Rjki9n.js @@ -0,0 +1 @@ +function k(e){for(var i={},n=0,o=e.length;n]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if(n=="@"&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"propertyName";if(n=="$")return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variableName.special";if(/[a-zA-Z_\xa1-\uffff]/.test(n))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"variable";if(n=="|"&&(i.varList||i.lastTok=="{"||i.lastTok=="do"))return f="|",null;if(/[\(\)\[\]{}\\;]/.test(n))return f=n,null;if(n=="-"&&e.eat(">"))return"operator";if(/[=+\-\/*:\.^%<>~|]/.test(n)){var t=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return n=="."&&!t&&(f="."),"operator"}else return null}}}function g(e){for(var i=e.pos,n=0,o,l=!1,r=!1;(o=e.next())!=null;)if(r)r=!1;else{if("[{(".indexOf(o)>-1)n++;else if("]})".indexOf(o)>-1){if(n--,n<0)break}else if(o=="/"&&n==0){l=!0;break}r=o=="\\"}return e.backUp(e.pos-i),l}function a(e){return e||(e=1),function(i,n){if(i.peek()=="}"){if(e==1)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](i,n);n.tokenize[n.tokenize.length-1]=a(e-1)}else i.peek()=="{"&&(n.tokenize[n.tokenize.length-1]=a(e+1));return p(i,n)}}function y(){var e=!1;return function(i,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](i,n)):(e=!0,p(i,n))}}function d(e,i,n,o){return function(l,r){var u=!1,t;for(r.context.type==="read-quoted-paused"&&(r.context=r.context.prev,l.eat("}"));(t=l.next())!=null;){if(t==e&&(o||!u)){r.tokenize.pop();break}if(n&&t=="#"&&!u){if(l.eat("{")){e=="}"&&(r.context={prev:r.context,type:"read-quoted-paused"}),r.tokenize.push(a());break}else if(/[@\$]/.test(l.peek())){r.tokenize.push(y());break}}u=!u&&t=="\\"}return i}}function s(e,i){return function(n,o){return i&&n.eatSpace(),n.match(e)?o.tokenize.pop():n.skipToEnd(),"string"}}function w(e,i){return e.sol()&&e.match("=end")&&e.eol()&&i.tokenize.pop(),e.skipToEnd(),"comment"}const E={name:"ruby",startState:function(e){return{tokenize:[p],indented:0,context:{type:"top",indented:-e},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,i){f=null,e.sol()&&(i.indented=e.indentation());var n=i.tokenize[i.tokenize.length-1](e,i),o,l=f;if(n=="variable"){var r=e.current();n=i.lastTok=="."?"property":x.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(r)?"tag":i.lastTok=="def"||i.lastTok=="class"||i.varList?"def":"variable",n=="keyword"&&(l=r,z.propertyIsEnumerable(r)?o="indent":b.propertyIsEnumerable(r)?o="dedent":((r=="if"||r=="unless")&&e.column()==e.indentation()||r=="do"&&i.context.indented=|!=|<>)/,p=/[=\(:\),{}.*<>+\-\/^\[\]]/;function s(e,r,o){if(o)for(var i=r.split(" "),n=0;ninteger char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),q=w("define let letrec let* lambda define-macro defmacro let-syntax letrec-syntax let-values let*-values define-syntax syntax-rules define-values when unless");function C(e,n,i){this.indent=e,this.type=n,this.prev=i}function s(e,n,i){e.indentStack=new C(n,i,e.indentStack)}function N(e){e.indentStack=e.indentStack.prev}var M=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),Q=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),I=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),R=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);function B(e){return e.match(M)}function $(e){return e.match(Q)}function u(e,n){return n===!0&&e.backUp(1),e.match(R)}function O(e){return e.match(I)}function y(e,n){for(var i,t=!1;(i=e.next())!=null;){if(i==n.token&&!t){n.state.mode=!1;break}t=!t&&i=="\\"}}const U={name:"scheme",startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1,sExprQuote:!1}},token:function(e,n){if(n.indentStack==null&&e.sol()&&(n.indentation=e.indentation()),e.eatSpace())return null;var i=null;switch(n.mode){case"string":y(e,{token:'"',state:n}),i=g;break;case"symbol":y(e,{token:"|",state:n}),i=x;break;case"comment":for(var t,p=!1;(t=e.next())!=null;){if(t=="#"&&p){n.mode=!1;break}p=t=="|"}i=a;break;case"s-expr-comment":if(n.mode=!1,e.peek()=="("||e.peek()=="[")n.sExprComment=0;else{e.eatWhile(/[^\s\(\)\[\]]/),i=a;break}default:var r=e.next();if(r=='"')n.mode="string",i=g;else if(r=="'")e.peek()=="("||e.peek()=="["?(typeof n.sExprQuote!="number"&&(n.sExprQuote=0),i=c):(e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),i=c);else if(r=="|")n.mode="symbol",i=x;else if(r=="#")if(e.eat("|"))n.mode="comment",i=a;else if(e.eat(/[tf]/i))i=c;else if(e.eat(";"))n.mode="s-expr-comment",i=a;else{var l=null,o=!1,m=!0;e.eat(/[ei]/i)?o=!0:e.backUp(1),e.match(/^#b/i)?l=B:e.match(/^#o/i)?l=$:e.match(/^#x/i)?l=O:e.match(/^#d/i)?l=u:e.match(/^[-+0-9.]/,!1)?(m=!1,l=u):o||e.eat("#"),l!=null&&(m&&!o&&e.match(/^#[ei]/i),l(e)&&(i=b))}else if(/^[-+0-9.]/.test(r)&&u(e,!0))i=b;else if(r==";")e.skipToEnd(),i=a;else if(r=="("||r=="["){for(var d="",f=e.column(),h;(h=e.eat(/[^\s\(\[\;\)\]]/))!=null;)d+=h;d.length>0&&q.propertyIsEnumerable(d)?s(n,f+S,r):(e.eatSpace(),e.eol()||e.peek()==";"?s(n,f+1,r):s(n,f+e.current().length,r)),e.backUp(e.current().length-1),typeof n.sExprComment=="number"&&n.sExprComment++,typeof n.sExprQuote=="number"&&n.sExprQuote++,i=v}else r==")"||r=="]"?(i=v,n.indentStack!=null&&n.indentStack.type==(r==")"?"(":"[")&&(N(n),typeof n.sExprComment=="number"&&--n.sExprComment==0&&(i=a,n.sExprComment=!1),typeof n.sExprQuote=="number"&&--n.sExprQuote==0&&(i=c,n.sExprQuote=!1))):(e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),k&&k.propertyIsEnumerable(e.current())?i=E:i="variable")}return typeof n.sExprComment=="number"?a:typeof n.sExprQuote=="number"?c:i},indent:function(e){return e.indentStack==null?e.indentation:e.indentStack.indent},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:";;"}}};export{U as scheme}; diff --git a/pkg/cli/webapp/dist/assets/shell-CjFT_Tl9.js b/pkg/cli/webapp/dist/assets/shell-CjFT_Tl9.js new file mode 100644 index 0000000..965d43b --- /dev/null +++ b/pkg/cli/webapp/dist/assets/shell-CjFT_Tl9.js @@ -0,0 +1 @@ +var c={};function s(n,e){for(var i=0;i1&&n.eat("$");var i=n.next();return/['"({]/.test(i)?(e.tokens[0]=l(i,i=="("?"quote":i=="{"?"def":"string"),u(n,e)):(/\d/.test(i)||n.eatWhile(/\w/),e.tokens.shift(),"def")};function w(n){return function(e,i){return e.sol()&&e.string==n&&i.tokens.shift(),e.skipToEnd(),"string.special"}}function u(n,e){return(e.tokens[0]||d)(n,e)}const v={name:"shell",startState:function(){return{tokens:[]}},token:function(n,e){return u(n,e)},languageData:{autocomplete:k.concat(h,p),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};export{v as shell}; diff --git a/pkg/cli/webapp/dist/assets/sieve-C3Gn_uJK.js b/pkg/cli/webapp/dist/assets/sieve-C3Gn_uJK.js new file mode 100644 index 0000000..06cc3a2 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/sieve-C3Gn_uJK.js @@ -0,0 +1 @@ +function l(n){for(var e={},i=n.split(" "),r=0;r2&&r.token&&typeof r.token!="string"){e.pending=[];for(var o=2;o-1)return null;var d=e.indent.length-1,u=n[e.state];n:for(;;){for(var r=0;r=@%|&?!.,:;^]/,p=/true|false|nil|self|super|thisContext/,l=function(e,n){this.next=e,this.parent=n},r=function(e,n,t){this.name=e,this.context=n,this.eos=t},c=function(){this.context=new l(h,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};c.prototype.userIndent=function(e,n){this.userIndentationDelta=e>0?e/n-this.indentation:0};var h=function(e,n,t){var i=new r(null,n,!1),a=e.next();return a==='"'?i=u(e,new l(u,n)):a==="'"?i=s(e,new l(s,n)):a==="#"?e.peek()==="'"?(e.next(),i=f(e,new l(f,n))):e.eatWhile(/[^\s.{}\[\]()]/)?i.name="string.special":i.name="meta":a==="$"?(e.next()==="<"&&(e.eatWhile(/[^\s>]/),e.next()),i.name="string.special"):a==="|"&&t.expectVariable?i.context=new l(x,n):/[\[\]{}()]/.test(a)?(i.name="bracket",i.eos=/[\[{(]/.test(a),a==="["?t.indentation++:a==="]"&&(t.indentation=Math.max(0,t.indentation-1))):o.test(a)?(e.eatWhile(o),i.name="operator",i.eos=a!==";"):/\d/.test(a)?(e.eatWhile(/[\w\d]/),i.name="number"):/[\w_]/.test(a)?(e.eatWhile(/[\w\d_]/),i.name=t.expectVariable?p.test(e.current())?"keyword":"variable":null):i.eos=t.expectVariable,i},u=function(e,n){return e.eatWhile(/[^"]/),new r("comment",e.eat('"')?n.parent:n,!0)},s=function(e,n){return e.eatWhile(/[^']/),new r("string",e.eat("'")?n.parent:n,!1)},f=function(e,n){return e.eatWhile(/[^']/),new r("string.special",e.eat("'")?n.parent:n,!1)},x=function(e,n){var t=new r(null,n,!1),i=e.next();return i==="|"?(t.context=n.parent,t.eos=!0):(e.eatWhile(/[^|]/),t.name="variable"),t};const d={name:"smalltalk",startState:function(){return new c},token:function(e,n){if(n.userIndent(e.indentation(),e.indentUnit),e.eatSpace())return null;var t=n.context.next(e,n.context,n);return n.context=t.context,n.expectVariable=t.eos,t.name},blankLine:function(e,n){e.userIndent(0,n)},indent:function(e,n,t){var i=e.context.next===h&&n&&n.charAt(0)==="]"?-1:e.userIndentationDelta;return(e.indentation+i)*t.unit},languageData:{indentOnInput:/^\s*\]$/}};export{d as smalltalk}; diff --git a/pkg/cli/webapp/dist/assets/solr-DehyRSwq.js b/pkg/cli/webapp/dist/assets/solr-DehyRSwq.js new file mode 100644 index 0000000..4229b56 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/solr-DehyRSwq.js @@ -0,0 +1 @@ +var u=/[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\"\\]/,f=/[\|\!\+\-\*\?\~\^\&]/,l=/^(OR|AND|NOT|TO)$/;function k(n){return parseFloat(n).toString()===n}function a(n){return function(e,r){for(var t=!1,o;(o=e.next())!=null&&!(o==n&&!t);)t=!t&&o=="\\";return t||(r.tokenize=i),"string"}}function c(n){return function(e,r){return n=="|"?e.eat(/\|/):n=="&"&&e.eat(/\&/),r.tokenize=i,"operator"}}function s(n){return function(e,r){for(var t=n;(n=e.peek())&&n.match(u)!=null;)t+=e.next();return r.tokenize=i,l.test(t)?"operator":k(t)?"number":e.peek()==":"?"propertyName":"string"}}function i(n,e){var r=n.next();return r=='"'?e.tokenize=a(r):f.test(r)?e.tokenize=c(r):u.test(r)&&(e.tokenize=s(r)),e.tokenize!=i?e.tokenize(n,e):null}const p={name:"solr",startState:function(){return{tokenize:i}},token:function(n,e){return n.eatSpace()?null:e.tokenize(n,e)}};export{p as solr}; diff --git a/pkg/cli/webapp/dist/assets/sparql-DkYu6x3z.js b/pkg/cli/webapp/dist/assets/sparql-DkYu6x3z.js new file mode 100644 index 0000000..61ab1ec --- /dev/null +++ b/pkg/cli/webapp/dist/assets/sparql-DkYu6x3z.js @@ -0,0 +1 @@ +var u;function s(n){return new RegExp("^(?:"+n.join("|")+")$","i")}var d=s(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","iri","uri","bnode","count","sum","min","max","avg","sample","group_concat","rand","abs","ceil","floor","round","concat","substr","strlen","replace","ucase","lcase","encode_for_uri","contains","strstarts","strends","strbefore","strafter","year","month","day","hours","minutes","seconds","timezone","tz","now","uuid","struuid","md5","sha1","sha256","sha384","sha512","coalesce","if","strlang","strdt","isnumeric","regex","exists","isblank","isliteral","a","bind"]),F=s(["base","prefix","select","distinct","reduced","construct","describe","ask","from","named","where","order","limit","offset","filter","optional","graph","by","asc","desc","as","having","undef","values","group","minus","in","not","service","silent","using","insert","delete","union","true","false","with","data","copy","to","move","add","create","drop","clear","load","into"]),x=/[*+\-<>=&|\^\/!\?]/,a="[A-Za-z_\\-0-9]",h=new RegExp("[A-Za-z]"),g=new RegExp("(("+a+"|\\.)*("+a+"))?:");function p(n,e){var t=n.next();if(u=null,t=="$"||t=="?")return t=="?"&&n.match(/\s/,!1)?"operator":(n.match(/^[A-Za-z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Za-z0-9_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*/),"variableName.local");if(t=="<"&&!n.match(/^[\s\u00a0=]/,!1))return n.match(/^[^\s\u00a0>]*>?/),"atom";if(t=='"'||t=="'")return e.tokenize=v(t),e.tokenize(n,e);if(/[{}\(\),\.;\[\]]/.test(t))return u=t,"bracket";if(t=="#")return n.skipToEnd(),"comment";if(x.test(t))return"operator";if(t==":")return f(n),"atom";if(t=="@")return n.eatWhile(/[a-z\d\-]/i),"meta";if(h.test(t)&&n.match(g))return f(n),"atom";n.eatWhile(/[_\w\d]/);var i=n.current();return d.test(i)?"builtin":F.test(i)?"keyword":"variable"}function f(n){n.match(/(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/i)}function v(n){return function(e,t){for(var i=!1,r;(r=e.next())!=null;){if(r==n&&!i){t.tokenize=p;break}i=!i&&r=="\\"}return"string"}}function o(n,e,t){n.context={prev:n.context,indent:n.indent,col:t,type:e}}function c(n){n.indent=n.context.indent,n.context=n.context.prev}const m={name:"sparql",startState:function(){return{tokenize:p,context:null,indent:0,col:0}},token:function(n,e){if(n.sol()&&(e.context&&e.context.align==null&&(e.context.align=!1),e.indent=n.indentation()),n.eatSpace())return null;var t=e.tokenize(n,e);if(t!="comment"&&e.context&&e.context.align==null&&e.context.type!="pattern"&&(e.context.align=!0),u=="(")o(e,")",n.column());else if(u=="[")o(e,"]",n.column());else if(u=="{")o(e,"}",n.column());else if(/[\]\}\)]/.test(u)){for(;e.context&&e.context.type=="pattern";)c(e);e.context&&u==e.context.type&&(c(e),u=="}"&&e.context&&e.context.type=="pattern"&&c(e))}else u=="."&&e.context&&e.context.type=="pattern"?c(e):/atom|string|variable/.test(t)&&e.context&&(/[\}\]]/.test(e.context.type)?o(e,"pattern",n.column()):e.context.type=="pattern"&&!e.context.align&&(e.context.align=!0,e.context.col=n.column()));return t},indent:function(n,e,t){var i=e&&e.charAt(0),r=n.context;if(/[\]\}]/.test(i))for(;r&&r.type=="pattern";)r=r.prev;var l=r&&i==r.type;return r?r.type=="pattern"?r.col:r.align?r.col+(l?0:1):r.indent+(l?0:t.unit):0},languageData:{commentTokens:{line:"#"}}};export{m as sparql}; diff --git a/pkg/cli/webapp/dist/assets/spreadsheet-BCZA_wO0.js b/pkg/cli/webapp/dist/assets/spreadsheet-BCZA_wO0.js new file mode 100644 index 0000000..c66187c --- /dev/null +++ b/pkg/cli/webapp/dist/assets/spreadsheet-BCZA_wO0.js @@ -0,0 +1 @@ +const i={name:"spreadsheet",startState:function(){return{stringType:null,stack:[]}},token:function(e,n){if(e){switch(n.stack.length===0&&(e.peek()=='"'||e.peek()=="'")&&(n.stringType=e.peek(),e.next(),n.stack.unshift("string")),n.stack[0]){case"string":for(;n.stack[0]==="string"&&!e.eol();)e.peek()===n.stringType?(e.next(),n.stack.shift()):e.peek()==="\\"?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return"string";case"characterClass":for(;n.stack[0]==="characterClass"&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(/^\\./)||n.stack.shift();return"operator"}var c=e.peek();switch(c){case"[":return e.next(),n.stack.unshift("characterClass"),"bracket";case":":return e.next(),"operator";case"\\":return e.match(/\\[a-z]+/)?"string.special":(e.next(),"atom");case".":case",":case";":case"*":case"-":case"+":case"^":case"<":case"/":case"=":return e.next(),"atom";case"$":return e.next(),"builtin"}return e.match(/\d+/)?e.match(/^\w+/)?"error":"number":e.match(/^[a-zA-Z_]\w*/)?e.match(/(?=[\(.])/,!1)?"keyword":"variable":["[","]","(",")","{","}"].indexOf(c)!=-1?(e.next(),"bracket"):(e.eatSpace()||e.next(),null)}}};export{i as spreadsheet}; diff --git a/pkg/cli/webapp/dist/assets/sql-COK4E0Yg.js b/pkg/cli/webapp/dist/assets/sql-COK4E0Yg.js new file mode 100644 index 0000000..183f55a --- /dev/null +++ b/pkg/cli/webapp/dist/assets/sql-COK4E0Yg.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse('{"displayName":"SQL","name":"sql","patterns":[{"match":"((?]?=|<>|<|>","name":"keyword.operator.comparison.sql"},{"match":"-|\\\\+|/","name":"keyword.operator.math.sql"},{"match":"\\\\|\\\\|","name":"keyword.operator.concatenator.sql"},{"captures":{"1":{"name":"support.function.aggregate.sql"}},"match":"(?i)\\\\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdev|stdevp|var|varp)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.analytic.sql"}},"match":"(?i)\\\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.bitmanipulation.sql"}},"match":"(?i)\\\\b(bit_count|get_bit|left_shift|right_shift|set_bit)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.conversion.sql"}},"match":"(?i)\\\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.collation.sql"}},"match":"(?i)\\\\b(collationproperty|tertiary_weights)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cryptographic.sql"}},"match":"(?i)\\\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cursor.sql"}},"match":"(?i)\\\\b(cursor_status)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datetime.sql"}},"match":"(?i)\\\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datatype.sql"}},"match":"(?i)\\\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.expression.sql"}},"match":"(?i)\\\\b(coalesce|nullif)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.globalvar.sql"}},"match":"(?!=&|~^\/]/,o=a.support||{},y=a.hooks||{},C=a.dateSQL||{date:!0,time:!0,timestamp:!0},Q=a.backslashStringEscapes!==!1,j=a.brackets||/^[\{}\(\)\[\]]/,v=a.punctuation||/^[;.,:]/;function g(t,i){var r=t.next();if(y[r]){var n=y[r](t,i);if(n!==!1)return n}if(o.hexNumber&&(r=="0"&&t.match(/^[xX][0-9a-fA-F]+/)||(r=="x"||r=="X")&&t.match(/^'[0-9a-fA-F]*'/)))return"number";if(o.binaryNumber&&((r=="b"||r=="B")&&t.match(/^'[01]+'/)||r=="0"&&t.match(/^b[01]*/)))return"number";if(r.charCodeAt(0)>47&&r.charCodeAt(0)<58)return t.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),o.decimallessFloat&&t.match(/^\.(?!\.)/),"number";if(r=="?"&&(t.eatSpace()||t.eol()||t.eat(";")))return"macroName";if(r=="'"||r=='"'&&o.doubleQuote)return i.tokenize=x(r),i.tokenize(t,i);if((o.nCharCast&&(r=="n"||r=="N")||o.charsetCast&&r=="_"&&t.match(/[a-z][a-z0-9]*/i))&&(t.peek()=="'"||t.peek()=='"'))return"keyword";if(o.escapeConstant&&(r=="e"||r=="E")&&(t.peek()=="'"||t.peek()=='"'&&o.doubleQuote))return i.tokenize=function(m,k){return(k.tokenize=x(m.next(),!0))(m,k)},"keyword";if(o.commentSlashSlash&&r=="/"&&t.eat("/"))return t.skipToEnd(),"comment";if(o.commentHash&&r=="#"||r=="-"&&t.eat("-")&&(!o.commentSpaceRequired||t.eat(" ")))return t.skipToEnd(),"comment";if(r=="/"&&t.eat("*"))return i.tokenize=b(1),i.tokenize(t,i);if(r=="."){if(o.zerolessFloat&&t.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(t.match(/^\.+/))return null;if(o.ODBCdotTable&&t.match(/^[\w\d_$#]+/))return"type"}else{if(_.test(r))return t.eatWhile(_),"operator";if(j.test(r))return"bracket";if(v.test(r))return t.eatWhile(v),"punctuation";if(r=="{"&&(t.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||t.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";t.eatWhile(/^[_\w\d]/);var l=t.current().toLowerCase();return C.hasOwnProperty(l)&&(t.match(/^( )+'[^']*'/)||t.match(/^( )+"[^"]*"/))?"number":h.hasOwnProperty(l)?"atom":p.hasOwnProperty(l)?"type":S.hasOwnProperty(l)?"keyword":c.hasOwnProperty(l)?"builtin":null}}function x(t,i){return function(r,n){for(var l=!1,m;(m=r.next())!=null;){if(m==t&&!l){n.tokenize=g;break}l=(Q||i)&&!l&&m=="\\"}return"string"}}function b(t){return function(i,r){var n=i.match(/^.*?(\/\*|\*\/)/);return n?n[1]=="/*"?r.tokenize=b(t+1):t>1?r.tokenize=b(t-1):r.tokenize=g:i.skipToEnd(),"comment"}}function w(t,i,r){i.context={prev:i.context,indent:t.indentation(),col:t.column(),type:r}}function L(t){t.indent=t.context.indent,t.context=t.context.prev}return{name:"sql",startState:function(){return{tokenize:g,context:null}},token:function(t,i){if(t.sol()&&i.context&&i.context.align==null&&(i.context.align=!1),i.tokenize==g&&t.eatSpace())return null;var r=i.tokenize(t,i);if(r=="comment")return r;i.context&&i.context.align==null&&(i.context.align=!0);var n=t.current();return n=="("?w(t,i,")"):n=="["?w(t,i,"]"):i.context&&i.context.type==n&&L(i),r},indent:function(t,i,r){var n=t.context;if(!n)return null;var l=i.charAt(0)==n.type;return n.align?n.col+(l?0:1):n.indent+(l?0:r.unit)},languageData:{commentTokens:{line:o.commentSlashSlash?"//":o.commentHash?"#":"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}}}function f(a){for(var c;(c=a.next())!=null;)if(c=="`"&&!a.eat("`"))return"string.special";return a.backUp(a.current().length-1),a.eatWhile(/\w/)?"string.special":null}function N(a){for(var c;(c=a.next())!=null;)if(c=='"'&&!a.eat('"'))return"string.special";return a.backUp(a.current().length-1),a.eatWhile(/\w/)?"string.special":null}function u(a){return a.eat("@")&&(a.match("session."),a.match("local."),a.match("global.")),a.eat("'")?(a.match(/^.*'/),"string.special"):a.eat('"')?(a.match(/^.*"/),"string.special"):a.eat("`")?(a.match(/^.*`/),"string.special"):a.match(/^[0-9a-zA-Z$\.\_]+/)?"string.special":null}function q(a){return a.eat("N")?"atom":a.match(/^[a-zA-Z.#!?]/)?"string.special":null}var d="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function e(a){for(var c={},h=a.split(" "),p=0;p!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:e("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":u}}),B=s({client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(d+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":u,"`":f,"\\":q}}),D=s({client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(d+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":u,"`":f,"\\":q}}),O=s({client:e("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:e(d+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:e("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:e("date time timestamp datetime"),support:e("decimallessFloat zerolessFloat"),hooks:{"@":u,":":u,"?":u,$:u,'"':N,"`":f}}),$=s({client:{},keywords:e("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:e("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:e("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:e("commentSlashSlash decimallessFloat"),hooks:{}}),E=s({client:e("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:e("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:e("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:e("date time timestamp"),support:e("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),A=s({keywords:e("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:e("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:e("date timestamp"),support:e("ODBCdotTable doubleQuote binaryNumber hexNumber")}),P=s({client:e("source"),keywords:e(d+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:e("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:e("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),W=s({keywords:e("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:e("false true"),builtin:e("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),H=s({client:e("source"),keywords:e("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:e("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),R=s({keywords:e("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:e("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:e("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable doubleQuote zerolessFloat")}),I=s({client:e("source"),keywords:e("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:e("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:e("time"),support:e("decimallessFloat zerolessFloat binaryNumber hexNumber")});export{$ as cassandra,I as esper,H as gpSQL,W as gql,A as hive,D as mariaDB,T as msSQL,B as mySQL,P as pgSQL,E as plSQL,R as sparkSQL,s as sql,O as sqlite,F as standardSQL}; diff --git a/pkg/cli/webapp/dist/assets/stex-C3f8Ysf7.js b/pkg/cli/webapp/dist/assets/stex-C3f8Ysf7.js new file mode 100644 index 0000000..cec927d --- /dev/null +++ b/pkg/cli/webapp/dist/assets/stex-C3f8Ysf7.js @@ -0,0 +1 @@ +function k(b){function h(t,n){t.cmdState.push(n)}function g(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function p(t){var n=t.cmdState.pop();n&&n.closeBracket()}function s(t){for(var n=t.cmdState,e=n.length-1;e>=0;e--){var a=n[e];if(a.name!="DEFAULT")return a}return{styleIdentifier:function(){return null}}}function i(t,n,e){return function(){this.name=t,this.bracketNo=0,this.style=n,this.styles=e,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var r={};r.importmodule=i("importmodule","tag",["string","builtin"]),r.documentclass=i("documentclass","tag",["","atom"]),r.usepackage=i("usepackage","tag",["atom"]),r.begin=i("begin","tag",["atom"]),r.end=i("end","tag",["atom"]),r.label=i("label","tag",["atom"]),r.ref=i("ref","tag",["atom"]),r.eqref=i("eqref","tag",["atom"]),r.cite=i("cite","tag",["atom"]),r.bibitem=i("bibitem","tag",["atom"]),r.Bibitem=i("Bibitem","tag",["atom"]),r.RBibitem=i("RBibitem","tag",["atom"]),r.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function f(t,n){t.f=n}function l(t,n){var e;if(t.match(/^\\[a-zA-Z@\xc0-\u1fff\u2060-\uffff]+/)){var a=t.current().slice(1);return e=r.hasOwnProperty(a)?r[a]:r.DEFAULT,e=new e,h(n,e),f(n,d),e.style}if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return f(n,function(m,c){return o(m,c,"\\]")}),"keyword";if(t.match("\\("))return f(n,function(m,c){return o(m,c,"\\)")}),"keyword";if(t.match("$$"))return f(n,function(m,c){return o(m,c,"$$")}),"keyword";if(t.match("$"))return f(n,function(m,c){return o(m,c,"$")}),"keyword";var u=t.next();if(u=="%")return t.skipToEnd(),"comment";if(u=="}"||u=="]"){if(e=g(n),e)e.closeBracket(u),f(n,d);else return"error";return"bracket"}else return u=="{"||u=="["?(e=r.DEFAULT,e=new e,h(n,e),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),e=s(n),e.name=="begin"&&(e.argument=t.current()),e.styleIdentifier())}function o(t,n,e){if(t.eatSpace())return null;if(e&&t.match(e))return f(n,l),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variableName.special";if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/]/)||t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var a=t.next();return a=="{"||a=="}"||a=="["||a=="]"||a=="("||a==")"?"bracket":a=="%"?(t.skipToEnd(),"comment"):"error"}function d(t,n){var e=t.peek(),a;return e=="{"||e=="["?(a=g(n),a.openBracket(e),t.eat(e),f(n,l),"bracket"):/[ \t\r]/.test(e)?(t.eat(e),null):(f(n,l),p(n),l(t,n))}return{name:"stex",startState:function(){var t=b?function(n,e){return o(n,e)}:l;return{cmdState:[],f:t}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,n){return n.f(t,n)},blankLine:function(t){t.f=l,t.cmdState.length=0},languageData:{commentTokens:{line:"%"}}}}const y=k(!1),S=k(!0);export{y as stex,S as stexMath}; diff --git a/pkg/cli/webapp/dist/assets/stylus-B533Al4x.js b/pkg/cli/webapp/dist/assets/stylus-B533Al4x.js new file mode 100644 index 0000000..3f4ccb7 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/stylus-B533Al4x.js @@ -0,0 +1 @@ +var B=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],$=["domain","regexp","url-prefix","url"],R=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],I=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"],O=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],W=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],C=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],N=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],S=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],T=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],E=["for","if","else","unless","from","to"],U=["null","true","false","href","title","type","not-allowed","readonly","disabled"],A=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],G=B.concat($,R,I,O,W,N,S,C,T,E,U,A);function F(i){return i=i.sort(function(e,r){return r>e}),new RegExp("^(("+i.join(")|(")+"))\\b")}function p(i){for(var e={},r=0;r]=?|\?:|\~)/,de=F(T),se=p(E),X=new RegExp(/^\-(moz|ms|o|webkit)-/i),ue=p(U),q="",c={},g,m,P,t;function fe(i,e){if(q=i.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),e.context.line.firstWord=q?q[0].replace(/^\s*/,""):"",e.context.line.indent=i.indentation(),g=i.peek(),i.match("//"))return i.skipToEnd(),["comment","comment"];if(i.match("/*"))return e.tokenize=K,K(i,e);if(g=='"'||g=="'")return i.next(),e.tokenize=Y(g),e.tokenize(i,e);if(g=="@")return i.next(),i.eatWhile(/[\w\\-]/),["def",i.current()];if(g=="#"){if(i.next(),i.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(i.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return i.match(X)?["meta","vendor-prefixes"]:i.match(/^-?[0-9]?\.?[0-9]/)?(i.eatWhile(/[a-z%]/i),["number","unit"]):g=="!"?(i.next(),[i.match(/^(important|optional)/i)?"keyword":"operator","important"]):g=="."&&i.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:i.match(oe)?(i.peek()=="("&&(e.tokenize=pe),["property","word"]):i.match(/^[a-z][\w-]*\(/i)?(i.backUp(1),["keyword","mixin"]):i.match(/^(\+|-)[a-z][\w-]*\(/i)?(i.backUp(1),["keyword","block-mixin"]):i.string.match(/^\s*&/)&&i.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:i.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(i.backUp(1),["variableName.special","reference"]):i.match(/^&{1}\s*$/)?["variableName.special","reference"]:i.match(de)?["operator","operator"]:i.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?i.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!b(i.current())?(i.match("."),["variable","variable-name"]):["variable","word"]:i.match(ce)?["operator",i.current()]:/[:;,{}\[\]\(\)]/.test(g)?(i.next(),[null,g]):(i.next(),[null,null])}function K(i,e){for(var r=!1,o;(o=i.next())!=null;){if(r&&o=="/"){e.tokenize=null;break}r=o=="*"}return["comment","comment"]}function Y(i){return function(e,r){for(var o=!1,l;(l=e.next())!=null;){if(l==i&&!o){i==")"&&e.backUp(1);break}o=!o&&l=="\\"}return(l==i||!o&&i!=")")&&(r.tokenize=null),["string","string"]}}function pe(i,e){return i.next(),i.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=Y(")"),[null,"("]}function Z(i,e,r,o){this.type=i,this.indent=e,this.prev=r,this.line=o||{firstWord:"",indent:0}}function n(i,e,r,o){return o=o>=0?o:e.indentUnit,i.context=new Z(r,e.indentation()+o,i.context),r}function v(i,e,r){var o=i.context.indent-e.indentUnit;return r=r||!1,i.context=i.context.prev,r&&(i.context.indent=o),i.context.type}function he(i,e,r){return c[r.context.type](i,e,r)}function _(i,e,r,o){for(var l=1;l>0;l--)r.context=r.context.prev;return he(i,e,r)}function b(i){return i.toLowerCase()in J}function x(i){return i=i.toLowerCase(),i in Q||i in le}function w(i){return i.toLowerCase()in se}function L(i){return i.toLowerCase().match(X)}function y(i){var e=i.toLowerCase(),r="variable";return b(i)?r="tag":w(i)?r="block-keyword":x(i)?r="property":e in ie||e in ue?r="atom":e=="return"||e in re?r="keyword":i.match(/^[A-Z]/)&&(r="string"),r}function V(i,e){return a(e)&&(i=="{"||i=="]"||i=="hash"||i=="qualifier")||i=="block-mixin"}function D(i,e){return i=="{"&&e.match(/^\s*\$?[\w-]+/i,!1)}function M(i,e){return i==":"&&e.match(/^[a-z-]+/,!1)}function k(i){return i.sol()||i.string.match(new RegExp("^\\s*"+H(i.current())))}function a(i){return i.eol()||i.match(/^\s*$/,!1)}function u(i){var e=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r=typeof i=="string"?i.match(e):i.string.match(e);return r?r[0].replace(/^\s*/,""):""}c.block=function(i,e,r){if(i=="comment"&&k(e)||i==","&&a(e)||i=="mixin")return n(r,e,"block",0);if(D(i,e))return n(r,e,"interpolation");if(a(e)&&i=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(e.string)&&!b(u(e)))return n(r,e,"block",0);if(V(i,e))return n(r,e,"block");if(i=="}"&&a(e))return n(r,e,"block",0);if(i=="variable-name")return e.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||w(u(e))?n(r,e,"variableName"):n(r,e,"variableName",0);if(i=="=")return!a(e)&&!w(u(e))?n(r,e,"block",0):n(r,e,"block");if(i=="*"&&(a(e)||e.match(/\s*(,|\.|#|\[|:|{)/,!1)))return t="tag",n(r,e,"block");if(M(i,e))return n(r,e,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(i))return n(r,e,a(e)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(i))return n(r,e,"keyframes");if(/@extends?/.test(i))return n(r,e,"extend",0);if(i&&i.charAt(0)=="@")return e.indentation()>0&&x(e.current().slice(1))?(t="variable","block"):/(@import|@require|@charset)/.test(i)?n(r,e,"block",0):n(r,e,"block");if(i=="reference"&&a(e))return n(r,e,"block");if(i=="(")return n(r,e,"parens");if(i=="vendor-prefixes")return n(r,e,"vendorPrefixes");if(i=="word"){var o=e.current();if(t=y(o),t=="property")return k(e)?n(r,e,"block",0):(t="atom","block");if(t=="tag"){if(/embed|menu|pre|progress|sub|table/.test(o)&&x(u(e))||e.string.match(new RegExp("\\[\\s*"+o+"|"+o+"\\s*\\]")))return t="atom","block";if(j.test(o)&&(k(e)&&e.string.match(/=/)||!k(e)&&!e.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!b(u(e))))return t="variable",w(u(e))?"block":n(r,e,"block",0);if(a(e))return n(r,e,"block")}if(t=="block-keyword")return t="keyword",e.current(/(if|unless)/)&&!k(e)?"block":n(r,e,"block");if(o=="return")return n(r,e,"block",0);if(t=="variable"&&e.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return n(r,e,"block")}return r.context.type};c.parens=function(i,e,r){if(i=="(")return n(r,e,"parens");if(i==")")return r.context.prev.type=="parens"?v(r,e):e.string.match(/^[a-z][\w-]*\(/i)&&a(e)||w(u(e))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(u(e))||!e.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&b(u(e))?n(r,e,"block"):e.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||e.string.match(/^\s*(\(|\)|[0-9])/)||e.string.match(/^\s+[a-z][\w-]*\(/i)||e.string.match(/^\s+[\$-]?[a-z]/i)?n(r,e,"block",0):a(e)?n(r,e,"block"):n(r,e,"block",0);if(i&&i.charAt(0)=="@"&&x(e.current().slice(1))&&(t="variable"),i=="word"){var o=e.current();t=y(o),t=="tag"&&j.test(o)&&(t="variable"),(t=="property"||o=="to")&&(t="atom")}return i=="variable-name"?n(r,e,"variableName"):M(i,e)?n(r,e,"pseudo"):r.context.type};c.vendorPrefixes=function(i,e,r){return i=="word"?(t="property",n(r,e,"block",0)):v(r,e)};c.pseudo=function(i,e,r){return x(u(e.string))?_(i,e,r):(e.match(/^[a-z-]+/),t="variableName.special",a(e)?n(r,e,"block"):v(r,e))};c.atBlock=function(i,e,r){if(i=="(")return n(r,e,"atBlock_parens");if(V(i,e))return n(r,e,"block");if(D(i,e))return n(r,e,"interpolation");if(i=="word"){var o=e.current().toLowerCase();if(/^(only|not|and|or)$/.test(o)?t="keyword":ne.hasOwnProperty(o)?t="tag":ae.hasOwnProperty(o)?t="attribute":te.hasOwnProperty(o)?t="property":ee.hasOwnProperty(o)?t="string.special":t=y(e.current()),t=="tag"&&a(e))return n(r,e,"block")}return i=="operator"&&/^(not|and|or)$/.test(e.current())&&(t="keyword"),r.context.type};c.atBlock_parens=function(i,e,r){if(i=="{"||i=="}")return r.context.type;if(i==")")return a(e)?n(r,e,"block"):n(r,e,"atBlock");if(i=="word"){var o=e.current().toLowerCase();return t=y(o),/^(max|min)/.test(o)&&(t="property"),t=="tag"&&(j.test(o)?t="variable":t="atom"),r.context.type}return c.atBlock(i,e,r)};c.keyframes=function(i,e,r){return e.indentation()=="0"&&(i=="}"&&k(e)||i=="]"||i=="hash"||i=="qualifier"||b(e.current()))?_(i,e,r):i=="{"?n(r,e,"keyframes"):i=="}"?k(e)?v(r,e,!0):n(r,e,"keyframes"):i=="unit"&&/^[0-9]+\%$/.test(e.current())?n(r,e,"keyframes"):i=="word"&&(t=y(e.current()),t=="block-keyword")?(t="keyword",n(r,e,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(i)?n(r,e,a(e)?"block":"atBlock"):i=="mixin"?n(r,e,"block",0):r.context.type};c.interpolation=function(i,e,r){return i=="{"&&v(r,e)&&n(r,e,"block"),i=="}"?e.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||e.string.match(/^\s*[a-z]/i)&&b(u(e))?n(r,e,"block"):!e.string.match(/^(\{|\s*\&)/)||e.match(/\s*[\w-]/,!1)?n(r,e,"block",0):n(r,e,"block"):i=="variable-name"?n(r,e,"variableName",0):(i=="word"&&(t=y(e.current()),t=="tag"&&(t="atom")),r.context.type)};c.extend=function(i,e,r){return i=="["||i=="="?"extend":i=="]"?v(r,e):i=="word"?(t=y(e.current()),"extend"):v(r,e)};c.variableName=function(i,e,r){return i=="string"||i=="["||i=="]"||e.current().match(/^(\.|\$)/)?(e.current().match(/^\.[\w-]+/i)&&(t="variable"),"variableName"):_(i,e,r)};const ge={name:"stylus",startState:function(){return{tokenize:null,state:"block",context:new Z("block",0,null)}},token:function(i,e){return!e.tokenize&&i.eatSpace()?null:(m=(e.tokenize||fe)(i,e),m&&typeof m=="object"&&(P=m[1],m=m[0]),t=m,e.state=c[e.state](P,i,e),t)},indent:function(i,e,r){var o=i.context,l=e&&e.charAt(0),f=o.indent,z=u(e),h=o.line.indent,d=i.context.prev?i.context.prev.line.firstWord:"",s=i.context.prev?i.context.prev.line.indent:h;return o.prev&&(l=="}"&&(o.type=="block"||o.type=="atBlock"||o.type=="keyframes")||l==")"&&(o.type=="parens"||o.type=="atBlock_parens")||l=="{"&&o.type=="at")?f=o.indent-r.unit:/(\})/.test(l)||(/@|\$|\d/.test(l)||/^\{/.test(e)||/^\s*\/(\/|\*)/.test(e)||/^\s*\/\*/.test(d)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(e)||/^(\+|-)?[a-z][\w-]*\(/i.test(e)||/^return/.test(e)||w(z)?f=h:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(l)||b(z)?/\,\s*$/.test(d)?f=s:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(d)||b(d)?f=h<=s?s:s+r.unit:f=h:!/,\s*$/.test(e)&&(L(z)||x(z))&&(w(d)?f=h<=s?s:s+r.unit:/^\{/.test(d)?f=h<=s?h:s+r.unit:L(d)||x(d)?f=h>=s?s:h:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(d)||/=\s*$/.test(d)||b(d)||/^\$[\w-\.\[\]\'\"]/.test(d)?f=s+r.unit:f=h)),f},languageData:{indentOnInput:/^\s*\}$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:G}};export{ge as stylus}; diff --git a/pkg/cli/webapp/dist/assets/swift-BzpIVaGY.js b/pkg/cli/webapp/dist/assets/swift-BzpIVaGY.js new file mode 100644 index 0000000..743846e --- /dev/null +++ b/pkg/cli/webapp/dist/assets/swift-BzpIVaGY.js @@ -0,0 +1 @@ +function c(n){for(var e={},t=0;t~^?!",_=":;,.(){}[]",s=/^\-?0b[01][01_]*/,k=/^\-?0o[0-7][0-7_]*/,x=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,y=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,g=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,w=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,z=/^\#[A-Za-z]+/,b=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function f(n,e,t){if(n.sol()&&(e.indented=n.indentation()),n.eatSpace())return null;var i=n.peek();if(i=="/"){if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return e.tokenize.push(a),a(n,e)}if(n.match(z))return"builtin";if(n.match(b))return"attribute";if(n.match(s)||n.match(k)||n.match(x)||n.match(y))return"number";if(n.match(w))return"property";if(h.indexOf(i)>-1)return n.next(),"operator";if(_.indexOf(i)>-1)return n.next(),n.match(".."),"punctuation";var r;if(r=n.match(/("""|"|')/)){var o=I.bind(null,r[0]);return e.tokenize.push(o),o(n,e)}if(n.match(g)){var u=n.current();return v.hasOwnProperty(u)?"type":d.hasOwnProperty(u)?"atom":l.hasOwnProperty(u)?(p.hasOwnProperty(u)&&(e.prev="define"),"keyword"):t=="define"?"def":"variable"}return n.next(),null}function A(){var n=0;return function(e,t,i){var r=f(e,t,i);if(r=="punctuation"){if(e.current()=="(")++n;else if(e.current()==")"){if(n==0)return e.backUp(1),t.tokenize.pop(),t.tokenize[t.tokenize.length-1](e,t);--n}}return r}}function I(n,e,t){for(var i=n.length==1,r,o=!1;r=e.peek();)if(o){if(e.next(),r=="(")return t.tokenize.push(A()),"string";o=!1}else{if(e.match(n))return t.tokenize.pop(),"string";e.next(),o=r=="\\"}return i&&t.tokenize.pop(),"string"}function a(n,e){for(var t;t=n.next();)if(t==="/"&&n.eat("*"))e.tokenize.push(a);else if(t==="*"&&n.eat("/")){e.tokenize.pop();break}return"comment"}function O(n,e,t){this.prev=n,this.align=e,this.indented=t}function m(n,e){var t=e.match(/^\s*($|\/[\/\*]|[)}\]])/,!1)?null:e.column()+1;n.context=new O(n.context,t,n.indented)}function S(n){n.context&&(n.indented=n.context.indented,n.context=n.context.prev)}const C={name:"swift",startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(n,e){var t=e.prev;e.prev=null;var i=e.tokenize[e.tokenize.length-1]||f,r=i(n,e,t);if(!r||r=="comment"?e.prev=t:e.prev||(e.prev=r),r=="punctuation"){var o=/[\(\[\{]|([\]\)\}])/.exec(n.current());o&&(o[1]?S:m)(e,n)}return r},indent:function(n,e,t){var i=n.context;if(!i)return 0;var r=/^[\]\}\)]/.test(e);return i.align!=null?i.align-(r?1:0):i.indented+(r?0:t.unit)},languageData:{indentOnInput:/^\s*[\)\}\]]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}};export{C as swift}; diff --git a/pkg/cli/webapp/dist/assets/tcl-DVfN8rqt.js b/pkg/cli/webapp/dist/assets/tcl-DVfN8rqt.js new file mode 100644 index 0000000..61923b4 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/tcl-DVfN8rqt.js @@ -0,0 +1 @@ +function s(r){for(var n={},t=r.split(" "),e=0;e!?^\/\|]/;function i(r,n,t){return n.tokenize=t,t(r,n)}function o(r,n){var t=n.beforeParams;n.beforeParams=!1;var e=r.next();if((e=='"'||e=="'")&&n.inParams)return i(r,n,p(e));if(/[\[\]{}\(\),;\.]/.test(e))return e=="("&&t?n.inParams=!0:e==")"&&(n.inParams=!1),null;if(/\d/.test(e))return r.eatWhile(/[\w\.]/),"number";if(e=="#")return r.eat("*")?i(r,n,d):e=="#"&&r.match(/ *\[ *\[/)?i(r,n,k):(r.skipToEnd(),"comment");if(e=='"')return r.skipTo(/"/),"comment";if(e=="$")return r.eatWhile(/[$_a-z0-9A-Z\.{:]/),r.eatWhile(/}/),n.beforeParams=!0,"builtin";if(c.test(e))return r.eatWhile(c),"comment";r.eatWhile(/[\w\$_{}\xa1-\uffff]/);var a=r.current().toLowerCase();return f&&f.propertyIsEnumerable(a)?"keyword":u&&u.propertyIsEnumerable(a)?(n.beforeParams=!0,"keyword"):null}function p(r){return function(n,t){for(var e=!1,a,l=!1;(a=n.next())!=null;){if(a==r&&!e){l=!0;break}e=!e&&a=="\\"}return l&&(t.tokenize=o),"string"}}function d(r,n){for(var t=!1,e;e=r.next();){if(e=="#"&&t){n.tokenize=o;break}t=e=="*"}return"comment"}function k(r,n){for(var t=0,e;e=r.next();){if(e=="#"&&t==2){n.tokenize=o;break}e=="]"?t++:e!=" "&&(t=0)}return"meta"}const m={name:"tcl",startState:function(){return{tokenize:o,beforeParams:!1,inParams:!1}},token:function(r,n){return r.eatSpace()?null:n.tokenize(r,n)},languageData:{commentTokens:{line:"#"}}};export{m as tcl}; diff --git a/pkg/cli/webapp/dist/assets/textile-CnDTJFAw.js b/pkg/cli/webapp/dist/assets/textile-CnDTJFAw.js new file mode 100644 index 0000000..34a99f8 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/textile-CnDTJFAw.js @@ -0,0 +1 @@ +var f={addition:"inserted",attributes:"propertyName",bold:"strong",cite:"keyword",code:"monospace",definitionList:"list",deletion:"deleted",div:"punctuation",em:"emphasis",footnote:"variable",footCite:"qualifier",header:"heading",html:"comment",image:"atom",italic:"emphasis",link:"link",linkDefinition:"link",list1:"list",list2:"list.special",list3:"list",notextile:"string.special",pre:"operator",p:"content",quote:"bracket",span:"quote",specialChar:"character",strong:"strong",sub:"content.special",sup:"content.special",table:"variableName.special",tableHeading:"operator"};function h(i,e){e.mode=r.newLayout,e.tableHeading=!1,e.layoutType==="definitionList"&&e.spanningLayout&&i.match(l("definitionListEnd"),!1)&&(e.spanningLayout=!1)}function s(i,e,n){if(n==="_")return i.eat("_")?a(i,e,"italic",/__/,2):a(i,e,"em",/_/,1);if(n==="*")return i.eat("*")?a(i,e,"bold",/\*\*/,2):a(i,e,"strong",/\*/,1);if(n==="[")return i.match(/\d+\]/)&&(e.footCite=!0),u(e);if(n==="("){var o=i.match(/^(r|tm|c)\)/);if(o)return f.specialChar}if(n==="<"&&i.match(/(\w+)[^>]+>[^<]+<\/\1>/))return f.html;if(n==="?"&&i.eat("?"))return a(i,e,"cite",/\?\?/,2);if(n==="="&&i.eat("="))return a(i,e,"notextile",/==/,2);if(n==="-"&&!i.eat("-"))return a(i,e,"deletion",/-/,1);if(n==="+")return a(i,e,"addition",/\+/,1);if(n==="~")return a(i,e,"sub",/~/,1);if(n==="^")return a(i,e,"sup",/\^/,1);if(n==="%")return a(i,e,"span",/%/,1);if(n==="@")return a(i,e,"code",/@/,1);if(n==="!"){var c=a(i,e,"image",/(?:\([^\)]+\))?!/,1);return i.match(/^:\S+/),c}return u(e)}function a(i,e,n,o,c){var d=i.pos>c?i.string.charAt(i.pos-c-1):null,p=i.peek();if(e[n]){if((!p||/\W/.test(p))&&d&&/\S/.test(d)){var y=u(e);return e[n]=!1,y}}else(!d||/\W/.test(d))&&p&&/\S/.test(p)&&i.match(new RegExp("^.*\\S"+o.source+"(?:\\W|$)"),!1)&&(e[n]=!0,e.mode=r.attributes);return u(e)}function u(i){var e=b(i);if(e)return e;var n=[];return i.layoutType&&n.push(f[i.layoutType]),n=n.concat(g(i,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),i.layoutType==="header"&&n.push(f.header+"-"+i.header),n.length?n.join(" "):null}function b(i){var e=i.layoutType;switch(e){case"notextile":case"code":case"pre":return f[e];default:return i.notextile?f.notextile+(e?" "+f[e]:""):null}}function g(i){for(var e=[],n=1;n]+)?>(?:[^<]+<\/\1>)?/,link:/[^"]+":\S/,linkDefinition:/\[[^\s\]]+\]\S+/,list:/(?:#+|\*+)/,notextile:"notextile",para:"p",pre:"pre",table:"table",tableCellAttributes:/[\/\\]\d+/,tableHeading:/\|_\./,tableText:/[^"_\*\[\(\?\+~\^%@|-]+/,text:/[^!"_=\*\[\(<\?\+~\^%@-]+/},attributes:{align:/(?:<>|<|>|=)/,selector:/\([^\(][^\)]+\)/,lang:/\[[^\[\]]+\]/,pad:/(?:\(+|\)+){1,2}/,css:/\{[^\}]+\}/},createRe:function(i){switch(i){case"drawTable":return t.makeRe("^",t.single.drawTable,"$");case"html":return t.makeRe("^",t.single.html,"(?:",t.single.html,")*","$");case"linkDefinition":return t.makeRe("^",t.single.linkDefinition,"$");case"listLayout":return t.makeRe("^",t.single.list,l("allAttributes"),"*\\s+");case"tableCellAttributes":return t.makeRe("^",t.choiceRe(t.single.tableCellAttributes,l("allAttributes")),"+\\.");case"type":return t.makeRe("^",l("allTypes"));case"typeLayout":return t.makeRe("^",l("allTypes"),l("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return t.makeRe("^",l("allAttributes"),"+");case"allTypes":return t.choiceRe(t.single.div,t.single.foot,t.single.header,t.single.bc,t.single.bq,t.single.notextile,t.single.pre,t.single.table,t.single.para);case"allAttributes":return t.choiceRe(t.attributes.selector,t.attributes.css,t.attributes.lang,t.attributes.align,t.attributes.pad);default:return t.makeRe("^",t.single[i])}},makeRe:function(){for(var i="",e=0;e$/,v=/^$/,S=/^\{\{\{$/,y=/^\}\}\}$/,$=/.*?\}\}\}/;function o(e,t,r){return t.tokenize=r,r(e,t)}function i(e,t){var r=e.sol(),n=e.peek();if(t.block=!1,r&&/[<\/\*{}\-]/.test(n)){if(e.match(S))return t.block=!0,o(e,t,u);if(e.match(a))return"quote";if(e.match(h)||e.match(d)||e.match(p)||e.match(w)||e.match(b)||e.match(v))return"comment";if(e.match(k))return"contentSeparator"}if(e.next(),r&&/[\/\*!#;:>|]/.test(n)){if(n=="!")return e.skipToEnd(),"header";if(n=="*")return e.eatWhile("*"),"comment";if(n=="#")return e.eatWhile("#"),"comment";if(n==";")return e.eatWhile(";"),"comment";if(n==":")return e.eatWhile(":"),"comment";if(n==">")return e.eatWhile(">"),"quote";if(n=="|")return"header"}if(n=="{"&&e.match("{{"))return o(e,t,u);if(/[hf]/i.test(n)&&/[ti]/i.test(e.peek())&&e.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if(n=='"')return"string";if(n=="~"||/[\[\]]/.test(n)&&e.match(n))return"brace";if(n=="@")return e.eatWhile(f),"link";if(/\d/.test(n))return e.eatWhile(/\d/),"number";if(n=="/"){if(e.eat("%"))return o(e,t,z);if(e.eat("/"))return o(e,t,W)}if(n=="_"&&e.eat("_"))return o(e,t,x);if(n=="-"&&e.eat("-")){if(e.peek()!=" ")return o(e,t,g);if(e.peek()==" ")return"brace"}return n=="'"&&e.eat("'")?o(e,t,C):n=="<"&&e.eat("<")?o(e,t,T):(e.eatWhile(/[\w\$_]/),c.propertyIsEnumerable(e.current())?"keyword":null)}function z(e,t){for(var r=!1,n;n=e.next();){if(n=="/"&&r){t.tokenize=i;break}r=n=="%"}return"comment"}function C(e,t){for(var r=!1,n;n=e.next();){if(n=="'"&&r){t.tokenize=i;break}r=n=="'"}return"strong"}function u(e,t){var r=t.block;return r&&e.current()?"comment":!r&&e.match($)||r&&e.sol()&&e.match(y)?(t.tokenize=i,"comment"):(e.next(),"comment")}function W(e,t){for(var r=!1,n;n=e.next();){if(n=="/"&&r){t.tokenize=i;break}r=n=="/"}return"emphasis"}function x(e,t){for(var r=!1,n;n=e.next();){if(n=="_"&&r){t.tokenize=i;break}r=n=="_"}return"link"}function g(e,t){for(var r=!1,n;n=e.next();){if(n=="-"&&r){t.tokenize=i;break}r=n=="-"}return"deleted"}function T(e,t){if(e.current()=="<<")return"meta";var r=e.next();return r?r==">"&&e.peek()==">"?(e.next(),t.tokenize=i,"meta"):(e.eatWhile(/[\w\$_]/),l.propertyIsEnumerable(e.current())?"keyword":null):(t.tokenize=i,null)}const m={name:"tiddlywiki",startState:function(){return{tokenize:i}},token:function(e,t){if(e.eatSpace())return null;var r=t.tokenize(e,t);return r}};export{m as tiddlyWiki}; diff --git a/pkg/cli/webapp/dist/assets/tiki-DGYXhP31.js b/pkg/cli/webapp/dist/assets/tiki-DGYXhP31.js new file mode 100644 index 0000000..d1f6738 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/tiki-DGYXhP31.js @@ -0,0 +1 @@ +function c(e,t,n){return function(r,a){for(;!r.eol();){if(r.match(t)){a.tokenize=o;break}r.next()}return n&&(a.tokenize=n),e}}function f(e){return function(t,n){for(;!t.eol();)t.next();return n.tokenize=o,e}}function o(e,t){function n(p){return t.tokenize=p,p(e,t)}var r=e.sol(),a=e.next();switch(a){case"{":return e.eat("/"),e.eatSpace(),e.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),t.tokenize=h,"tag";case"_":if(e.eat("_"))return n(c("strong","__",o));break;case"'":if(e.eat("'"))return n(c("em","''",o));break;case"(":if(e.eat("("))return n(c("link","))",o));break;case"[":return n(c("url","]",o));case"|":if(e.eat("|"))return n(c("comment","||"));break;case"-":if(e.eat("="))return n(c("header string","=-",o));if(e.eat("-"))return n(c("error tw-deleted","--",o));break;case"=":if(e.match("=="))return n(c("tw-underline","===",o));break;case":":if(e.eat(":"))return n(c("comment","::"));break;case"^":return n(c("tw-box","^"));case"~":if(e.match("np~"))return n(c("meta","~/np~"));break}if(r)switch(a){case"!":return e.match("!!!!!")||e.match("!!!!")||e.match("!!!")||e.match("!!"),n(f("header string"));case"*":case"#":case"+":return n(f("tw-listitem bracket"))}return null}var g,s;function h(e,t){var n=e.next(),r=e.peek();return n=="}"?(t.tokenize=o,"tag"):n=="("||n==")"?"bracket":n=="="?(s="equals",r==">"&&(e.next(),r=e.peek()),/[\'\"]/.test(r)||(t.tokenize=z()),"operator"):/[\'\"]/.test(n)?(t.tokenize=w(n),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function w(e){return function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=h;break}return"string"}}function z(){return function(e,t){for(;!e.eol();){var n=e.next(),r=e.peek();if(n==" "||n==","||/[ )}]/.test(r)){t.tokenize=h;break}}return"string"}}var i,l;function k(){for(var e=arguments.length-1;e>=0;e--)i.cc.push(arguments[e])}function u(){return k.apply(null,arguments),!0}function b(e,t){var n=i.context&&i.context.noIndent;i.context={prev:i.context,pluginName:e,indent:i.indented,startOfLine:t,noIndent:n}}function x(){i.context&&(i.context=i.context.prev)}function L(e){if(e=="openPlugin")return i.pluginName=g,u(d,N(i.startOfLine));if(e=="closePlugin"){var t=!1;return i.context?(t=i.context.pluginName!=g,x()):t=!0,t&&(l="error"),u(P(t))}else return e=="string"&&((!i.context||i.context.name!="!cdata")&&b("!cdata"),i.tokenize==o&&x()),u()}function N(e){return function(t){return t=="selfclosePlugin"||t=="endPlugin"||t=="endPlugin"&&b(i.pluginName,e),u()}}function P(e){return function(t){return e&&(l="error"),t=="endPlugin"?u():k()}}function d(e){return e=="keyword"?(l="attribute",u(d)):e=="equals"?u(O,d):k()}function O(e){return e=="keyword"?(l="string",u()):e=="string"?u(v):k()}function v(e){return e=="string"?u(v):k()}const S={name:"tiki",startState:function(){return{tokenize:o,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(e,t){if(e.sol()&&(t.startOfLine=!0,t.indented=e.indentation()),e.eatSpace())return null;l=s=g=null;var n=t.tokenize(e,t);if((n||s)&&n!="comment")for(i=t;;){var r=t.cc.pop()||L;if(r(s||n))break}return t.startOfLine=!1,l||n},indent:function(e,t,n){var r=e.context;if(r&&r.noIndent)return 0;for(r&&/^{\//.test(t)&&(r=r.prev);r&&!r.startOfLine;)r=r.prev;return r?r.indent+n.unit:0}};export{S as tiki}; diff --git a/pkg/cli/webapp/dist/assets/toml-Bm5Em-hy.js b/pkg/cli/webapp/dist/assets/toml-Bm5Em-hy.js new file mode 100644 index 0000000..72d38e6 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/toml-Bm5Em-hy.js @@ -0,0 +1 @@ +const r={name:"toml",startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(n,e){let i;if(!e.inString&&(i=n.match(/^('''|"""|'|")/))&&(e.stringType=i[0],e.inString=!0),n.sol()&&!e.inString&&e.inArray===0&&(e.lhs=!0),e.inString){for(;e.inString;)if(n.match(e.stringType))e.inString=!1;else if(n.peek()==="\\")n.next(),n.next();else{if(n.eol())break;n.match(/^.[^\\\"\']*/)}return e.lhs?"property":"string"}else{if(e.inArray&&n.peek()==="]")return n.next(),e.inArray--,"bracket";if(e.lhs&&n.peek()==="["&&n.skipTo("]"))return n.next(),n.peek()==="]"&&n.next(),"atom";if(n.peek()==="#")return n.skipToEnd(),"comment";if(n.eatSpace())return null;if(e.lhs&&n.eatWhile(function(l){return l!="="&&l!=" "}))return"property";if(e.lhs&&n.peek()==="=")return n.next(),e.lhs=!1,null;if(!e.lhs&&n.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!e.lhs&&(n.match("true")||n.match("false")))return"atom";if(!e.lhs&&n.peek()==="[")return e.inArray++,n.next(),"bracket";if(!e.lhs&&n.match(/^\-?\d+(?:\.\d+)?/))return"number";n.eatSpace()||n.next()}return null},languageData:{commentTokens:{line:"#"}}};export{r as toml}; diff --git a/pkg/cli/webapp/dist/assets/troff-wAsdV37c.js b/pkg/cli/webapp/dist/assets/troff-wAsdV37c.js new file mode 100644 index 0000000..bc38dc7 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/troff-wAsdV37c.js @@ -0,0 +1 @@ +var h={};function u(n){if(n.eatSpace())return null;var t=n.sol(),c=n.next();if(c==="\\")return n.match("fB")||n.match("fR")||n.match("fI")||n.match("u")||n.match("d")||n.match("%")||n.match("&")?"string":n.match("m[")?(n.skipTo("]"),n.next(),"string"):n.match("s+")||n.match("s-")?(n.eatWhile(/[\d-]/),"string"):((n.match("(")||n.match("*("))&&n.eatWhile(/[\w-]/),"string");if(t&&(c==="."||c==="'")&&n.eat("\\")&&n.eat('"'))return n.skipToEnd(),"comment";if(t&&c==="."){if(n.match("B ")||n.match("I ")||n.match("R "))return"attribute";if(n.match("TH ")||n.match("SH ")||n.match("SS ")||n.match("HP "))return n.skipToEnd(),"quote";if(n.match(/[A-Z]/)&&n.match(/[A-Z]/)||n.match(/[a-z]/)&&n.match(/[a-z]/))return"attribute"}n.eatWhile(/[\w-]/);var i=n.current();return h.hasOwnProperty(i)?h[i]:null}function f(n,t){return(t.tokens[0]||u)(n,t)}const o={name:"troff",startState:function(){return{tokens:[]}},token:function(n,t){return f(n,t)}};export{o as troff}; diff --git a/pkg/cli/webapp/dist/assets/tsx-B6W0miNI.js b/pkg/cli/webapp/dist/assets/tsx-B6W0miNI.js new file mode 100644 index 0000000..dfac737 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/tsx-B6W0miNI.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse(`{"displayName":"TSX","name":"tsx","patterns":[{"include":"#directives"},{"include":"#statements"},{"include":"#shebang"}],"repository":{"access-modifier":{"match":"(?]|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^yield|[^\\\\._$[:alnum:]]yield|^throw|[^\\\\._$[:alnum:]]throw|^in|[^\\\\._$[:alnum:]]in|^of|[^\\\\._$[:alnum:]]of|^typeof|[^\\\\._$[:alnum:]]typeof|&&|\\\\|\\\\||\\\\*)\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.block.tsx"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.block.tsx"}},"name":"meta.objectliteral.tsx","patterns":[{"include":"#object-member"}]},"array-binding-pattern":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.tsx"},"2":{"name":"punctuation.definition.binding-pattern.array.tsx"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.tsx"}},"patterns":[{"include":"#binding-element"},{"include":"#punctuation-comma"}]},"array-binding-pattern-const":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.tsx"},"2":{"name":"punctuation.definition.binding-pattern.array.tsx"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.tsx"}},"patterns":[{"include":"#binding-element-const"},{"include":"#punctuation-comma"}]},"array-literal":{"begin":"\\\\s*(\\\\[)","beginCaptures":{"1":{"name":"meta.brace.square.tsx"}},"end":"\\\\]","endCaptures":{"0":{"name":"meta.brace.square.tsx"}},"name":"meta.array.literal.tsx","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}]},"arrow-function":{"patterns":[{"captures":{"1":{"name":"storage.modifier.async.tsx"},"2":{"name":"variable.parameter.tsx"}},"match":"(?:(?)","name":"meta.arrow.tsx"},{"begin":"(?:(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?[(]\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([)]\\\\s*:)|((\\\\.\\\\.\\\\.\\\\s*)?[_$[:alpha:]][_$[:alnum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\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>)))","beginCaptures":{"1":{"name":"storage.modifier.async.tsx"}},"end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","name":"meta.arrow.tsx","patterns":[{"include":"#comment"},{"include":"#type-parameters"},{"include":"#function-parameters"},{"include":"#arrow-return-type"},{"include":"#possibly-arrow-return-type"}]},{"begin":"=>","beginCaptures":{"0":{"name":"storage.type.function.arrow.tsx"}},"end":"((?<=\\\\}|\\\\S)(?)|((?!\\\\{)(?=\\\\S)))(?!\\\\/[\\\\/\\\\*])","name":"meta.arrow.tsx","patterns":[{"include":"#single-line-comment-consuming-line-ending"},{"include":"#decl-block"},{"include":"#expression"}]}]},"arrow-return-type":{"begin":"(?<=\\\\))\\\\s*(:)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.tsx"}},"end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","name":"meta.return.type.arrow.tsx","patterns":[{"include":"#arrow-return-type-body"}]},"arrow-return-type-body":{"patterns":[{"begin":"(?<=[:])(?=\\\\s*\\\\{)","end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"include":"#type-predicate-operator"},{"include":"#type"}]},"async-modifier":{"match":"(?\\\\s*$)","beginCaptures":{"1":{"name":"punctuation.definition.comment.tsx"}},"end":"(?=$)","name":"comment.line.triple-slash.directive.tsx","patterns":[{"begin":"(<)(reference|amd-dependency|amd-module)","beginCaptures":{"1":{"name":"punctuation.definition.tag.directive.tsx"},"2":{"name":"entity.name.tag.directive.tsx"}},"end":"/>","endCaptures":{"0":{"name":"punctuation.definition.tag.directive.tsx"}},"name":"meta.tag.tsx","patterns":[{"match":"path|types|no-default-lib|lib|name|resolution-mode","name":"entity.other.attribute-name.directive.tsx"},{"match":"=","name":"keyword.operator.assignment.tsx"},{"include":"#string"}]}]},"docblock":{"patterns":[{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"constant.language.access-type.jsdoc"}},"match":"((@)(?:access|api))\\\\s+(private|protected|public)\\\\b"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"},"4":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"5":{"name":"constant.other.email.link.underline.jsdoc"},"6":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}},"match":"((@)author)\\\\s+([^@\\\\s<>*/](?:[^@<>*/]|\\\\*[^/])*)(?:\\\\s*(<)([^>\\\\s]+)(>))?"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"},"4":{"name":"keyword.operator.control.jsdoc"},"5":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)borrows)\\\\s+((?:[^@\\\\s*/]|\\\\*[^/])+)\\\\s+(as)\\\\s+((?:[^@\\\\s*/]|\\\\*[^/])+)"},{"begin":"((@)example)\\\\s+","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=@|\\\\*/)","name":"meta.example.jsdoc","patterns":[{"match":"^\\\\s\\\\*\\\\s+"},{"begin":"\\\\G(<)caption(>)","beginCaptures":{"0":{"name":"entity.name.tag.inline.jsdoc"},"1":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"2":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}},"contentName":"constant.other.description.jsdoc","end":"()|(?=\\\\*/)","endCaptures":{"0":{"name":"entity.name.tag.inline.jsdoc"},"1":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"2":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}}},{"captures":{"0":{"name":"source.embedded.tsx"}},"match":"[^\\\\s@*](?:[^*]|\\\\*[^/])*"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"constant.language.symbol-type.jsdoc"}},"match":"((@)kind)\\\\s+(class|constant|event|external|file|function|member|mixin|module|namespace|typedef)\\\\b"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.link.underline.jsdoc"},"4":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)see)\\\\s+(?:((?=https?://)(?:[^\\\\s*]|\\\\*[^/])+)|((?!https?://|(?:\\\\[[^\\\\[\\\\]]*\\\\])?{@(?:link|linkcode|linkplain|tutorial)\\\\b)(?:[^@\\\\s*/]|\\\\*[^/])+))"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)template)\\\\s+([A-Za-z_$][\\\\w$.\\\\[\\\\]]*(?:\\\\s*,\\\\s*[A-Za-z_$][\\\\w$.\\\\[\\\\]]*)*)"},{"begin":"((@)template)\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)","name":"variable.other.jsdoc"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)(?:arg|argument|const|constant|member|namespace|param|var))\\\\s+([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)"},{"begin":"((@)typedef)\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"(?:[^@\\\\s*/]|\\\\*[^/])+","name":"entity.name.type.instance.jsdoc"}]},{"begin":"((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)","name":"variable.other.jsdoc"},{"captures":{"1":{"name":"punctuation.definition.optional-value.begin.bracket.square.jsdoc"},"2":{"name":"keyword.operator.assignment.jsdoc"},"3":{"name":"source.embedded.tsx"},"4":{"name":"punctuation.definition.optional-value.end.bracket.square.jsdoc"},"5":{"name":"invalid.illegal.syntax.jsdoc"}},"match":"(\\\\[)\\\\s*[\\\\w$]+(?:(?:\\\\[\\\\])?\\\\.[\\\\w$]+)*(?:\\\\s*(=)\\\\s*((?>\\"(?:(?:\\\\*(?!/))|(?:\\\\\\\\(?!\\"))|[^*\\\\\\\\])*?\\"|'(?:(?:\\\\*(?!/))|(?:\\\\\\\\(?!'))|[^*\\\\\\\\])*?'|\\\\[(?:(?:\\\\*(?!/))|[^*])*?\\\\]|(?:(?:\\\\*(?!/))|\\\\s(?!\\\\s*\\\\])|\\\\[.*?(?:\\\\]|(?=\\\\*/))|[^*\\\\s\\\\[\\\\]])*)*))?\\\\s*(?:(\\\\])((?:[^*\\\\s]|\\\\*[^\\\\s/])+)?|(?=\\\\*/))","name":"variable.other.jsdoc"}]},{"begin":"((@)(?:define|enum|exception|export|extends|lends|implements|modifies|namespace|private|protected|returns?|satisfies|suppress|this|throws|type|yields?))\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)(?:alias|augments|callback|constructs|emits|event|fires|exports?|extends|external|function|func|host|lends|listens|interface|memberof!?|method|module|mixes|mixin|name|requires|see|this|typedef|uses))\\\\s+((?:[^{}@\\\\s*]|\\\\*[^/])+)"},{"begin":"((@)(?:default(?:value)?|license|version))\\\\s+(([''\\"]))","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"},"4":{"name":"punctuation.definition.string.begin.jsdoc"}},"contentName":"variable.other.jsdoc","end":"(\\\\3)|(?=$|\\\\*/)","endCaptures":{"0":{"name":"variable.other.jsdoc"},"1":{"name":"punctuation.definition.string.end.jsdoc"}}},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)(?:default(?:value)?|license|tutorial|variation|version))\\\\s+([^\\\\s*]+)"},{"captures":{"1":{"name":"punctuation.definition.block.tag.jsdoc"}},"match":"(@)(?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception|exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func|function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce|yields?)\\\\b","name":"storage.type.class.jsdoc"},{"include":"#inline-tags"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"match":"((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\\\s+)"}]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|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"captures":{"1":{"name":"storage.modifier.tsx"},"2":{"name":"keyword.operator.rest.tsx"},"3":{"name":"variable.parameter.tsx variable.language.this.tsx"},"4":{"name":"variable.parameter.tsx"},"5":{"name":"keyword.operator.optional.tsx"}},"match":"(?:(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|((?>=|>>>=|\\\\|=","name":"keyword.operator.assignment.compound.bitwise.tsx"},{"match":"<<|>>>|>>","name":"keyword.operator.bitwise.shift.tsx"},{"match":"===|!==|==|!=","name":"keyword.operator.comparison.tsx"},{"match":"<=|>=|<>|<|>","name":"keyword.operator.relational.tsx"},{"captures":{"1":{"name":"keyword.operator.logical.tsx"},"2":{"name":"keyword.operator.assignment.compound.tsx"},"3":{"name":"keyword.operator.arithmetic.tsx"}},"match":"(?<=[_$[:alnum:]])(\\\\!)\\\\s*(?:(/=)|(?:(/)(?![/*])))"},{"match":"\\\\!|&&|\\\\|\\\\||\\\\?\\\\?","name":"keyword.operator.logical.tsx"},{"match":"\\\\&|~|\\\\^|\\\\|","name":"keyword.operator.bitwise.tsx"},{"match":"\\\\=","name":"keyword.operator.assignment.tsx"},{"match":"--","name":"keyword.operator.decrement.tsx"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.tsx"},{"match":"%|\\\\*|/|-|\\\\+","name":"keyword.operator.arithmetic.tsx"},{"begin":"(?<=[_$[:alnum:])\\\\]])\\\\s*(?=(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)+(?:(/=)|(?:(/)(?![/*]))))","end":"(?:(/=)|(?:(/)(?!\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/)))","endCaptures":{"1":{"name":"keyword.operator.assignment.compound.tsx"},"2":{"name":"keyword.operator.arithmetic.tsx"}},"patterns":[{"include":"#comment"}]},{"captures":{"1":{"name":"keyword.operator.assignment.compound.tsx"},"2":{"name":"keyword.operator.arithmetic.tsx"}},"match":"(?<=[_$[:alnum:])\\\\]])\\\\s*(?:(/=)|(?:(/)(?![/*])))"}]},"expressionPunctuations":{"patterns":[{"include":"#punctuation-comma"},{"include":"#punctuation-accessor"}]},"expressionWithoutIdentifiers":{"patterns":[{"include":"#jsx"},{"include":"#string"},{"include":"#regex"},{"include":"#comment"},{"include":"#function-expression"},{"include":"#class-expression"},{"include":"#arrow-function"},{"include":"#paren-expression-possibly-arrow"},{"include":"#cast"},{"include":"#ternary-expression"},{"include":"#new-expr"},{"include":"#instanceof-expr"},{"include":"#object-literal"},{"include":"#expression-operators"},{"include":"#function-call"},{"include":"#literal"},{"include":"#support-objects"},{"include":"#paren-expression"}]},"field-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\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ha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"match":"\\\\#?[_$[:alpha:]][_$[:alnum:]]*","name":"meta.definition.property.tsx variable.object.property.tsx"},{"match":"\\\\?","name":"keyword.operator.optional.tsx"},{"match":"\\\\!","name":"keyword.operator.definiteassignment.tsx"}]},"for-loop":{"begin":"(?\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\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\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\\\\())","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))","end":"(?=\\\\s*(?:(\\\\?\\\\.\\\\s*)|(\\\\!))?((<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\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\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\\\\())","name":"meta.function-call.tsx","patterns":[{"include":"#function-call-target"}]},{"include":"#comment"},{"include":"#function-call-optionals"},{"include":"#type-arguments"},{"include":"#paren-expression"}]},{"begin":"(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\\\)]))(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","end":"(?<=\\\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\\\)]))(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))","end":"(?=(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","name":"meta.function-call.tsx","patterns":[{"include":"#function-call-target"}]},{"include":"#comment"},{"include":"#function-call-optionals"},{"include":"#type-arguments"}]}]},"function-call-optionals":{"patterns":[{"match":"\\\\?\\\\.","name":"meta.function-call.tsx punctuation.accessor.optional.tsx"},{"match":"\\\\!","name":"meta.function-call.tsx keyword.operator.definiteassignment.tsx"}]},"function-call-target":{"patterns":[{"include":"#support-function-call-identifiers"},{"match":"(\\\\#?[_$[:alpha:]][_$[:alnum:]]*)","name":"entity.name.function.tsx"}]},"function-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\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s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>)))))"},{"captures":{"1":{"name":"punctuation.accessor.tsx"},"2":{"name":"punctuation.accessor.optional.tsx"},"3":{"name":"variable.other.constant.property.tsx"}},"match":"(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))\\\\s*(\\\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.tsx"},"2":{"name":"punctuation.accessor.optional.tsx"},"3":{"name":"variable.other.property.tsx"}},"match":"(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*)"},{"match":"([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])","name":"variable.other.constant.tsx"},{"match":"[_$[:alpha:]][_$[:alnum:]]*","name":"variable.other.readwrite.tsx"}]},"if-statement":{"patterns":[{"begin":"(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|(===|!==|==|!=)|(([\\\\&\\\\~\\\\^\\\\|]\\\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\\\s+instanceof(?![_$[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.)))|((?))","end":"(/>)|(?:())","endCaptures":{"1":{"name":"punctuation.definition.tag.end.tsx"},"2":{"name":"punctuation.definition.tag.begin.tsx"},"3":{"name":"entity.name.tag.namespace.tsx"},"4":{"name":"punctuation.separator.namespace.tsx"},"5":{"name":"entity.name.tag.tsx"},"6":{"name":"support.class.component.tsx"},"7":{"name":"punctuation.definition.tag.end.tsx"}},"name":"meta.tag.tsx","patterns":[{"begin":"(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.tsx"},"2":{"name":"entity.name.tag.namespace.tsx"},"3":{"name":"punctuation.separator.namespace.tsx"},"4":{"name":"entity.name.tag.tsx"},"5":{"name":"support.class.component.tsx"}},"end":"(?=[/]?>)","patterns":[{"include":"#comment"},{"include":"#type-arguments"},{"include":"#jsx-tag-attributes"}]},{"begin":"(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.end.tsx"}},"contentName":"meta.jsx.children.tsx","end":"(?=|/\\\\*|//)"},"jsx-tag-attributes":{"begin":"\\\\s+","end":"(?=[/]?>)","name":"meta.tag.attributes.tsx","patterns":[{"include":"#comment"},{"include":"#jsx-tag-attribute-name"},{"include":"#jsx-tag-attribute-assignment"},{"include":"#jsx-string-double-quoted"},{"include":"#jsx-string-single-quoted"},{"include":"#jsx-evaluated-code"},{"include":"#jsx-tag-attributes-illegal"}]},"jsx-tag-attributes-illegal":{"match":"\\\\S+","name":"invalid.illegal.attribute.tsx"},"jsx-tag-in-expression":{"begin":"(?:*]|&&|\\\\|\\\\||\\\\?|\\\\*\\\\/|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^default|[^\\\\._$[:alnum:]]default|^yield|[^\\\\._$[:alnum:]]yield|^)\\\\s*(?!<\\\\s*[_$[:alpha:]][_$[:alnum:]]*((\\\\s+extends\\\\s+[^=>])|,))(?=(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","end":"(?!(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","patterns":[{"include":"#jsx-tag"}]},"jsx-tag-without-attributes":{"begin":"(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.tsx"},"2":{"name":"entity.name.tag.namespace.tsx"},"3":{"name":"punctuation.separator.namespace.tsx"},"4":{"name":"entity.name.tag.tsx"},"5":{"name":"support.class.component.tsx"},"6":{"name":"punctuation.definition.tag.end.tsx"}},"contentName":"meta.jsx.children.tsx","end":"()","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.tsx"},"2":{"name":"entity.name.tag.namespace.tsx"},"3":{"name":"punctuation.separator.namespace.tsx"},"4":{"name":"entity.name.tag.tsx"},"5":{"name":"support.class.component.tsx"},"6":{"name":"punctuation.definition.tag.end.tsx"}},"name":"meta.tag.without-attributes.tsx","patterns":[{"include":"#jsx-children"}]},"jsx-tag-without-attributes-in-expression":{"begin":"(?:*]|&&|\\\\|\\\\||\\\\?|\\\\*\\\\/|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^default|[^\\\\._$[:alnum:]]default|^yield|[^\\\\._$[:alnum:]]yield|^)\\\\s*(?=(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","end":"(?!(<)\\\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))","patterns":[{"include":"#jsx-tag-without-attributes"}]},"label":{"patterns":[{"begin":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(:)(?=\\\\s*\\\\{)","beginCaptures":{"1":{"name":"entity.name.label.tsx"},"2":{"name":"punctuation.separator.label.tsx"}},"end":"(?<=\\\\})","patterns":[{"include":"#decl-block"}]},{"captures":{"1":{"name":"entity.name.label.tsx"},"2":{"name":"punctuation.separator.label.tsx"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(:)"}]},"literal":{"patterns":[{"include":"#numeric-literal"},{"include":"#boolean-literal"},{"include":"#null-literal"},{"include":"#undefined-literal"},{"include":"#numericConstant-literal"},{"include":"#array-literal"},{"include":"#this-literal"},{"include":"#super-literal"}]},"method-declaration":{"patterns":[{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.tsx"},"2":{"name":"storage.modifier.tsx"},"3":{"name":"storage.modifier.tsx"},"4":{"name":"storage.modifier.async.tsx"},"5":{"name":"keyword.operator.new.tsx"},"6":{"name":"keyword.generator.asterisk.tsx"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","name":"meta.method.declaration.tsx","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"}]},{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.tsx"},"2":{"name":"storage.modifier.tsx"},"3":{"name":"storage.modifier.tsx"},"4":{"name":"storage.modifier.async.tsx"},"5":{"name":"storage.type.property.tsx"},"6":{"name":"keyword.generator.asterisk.tsx"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","name":"meta.method.declaration.tsx","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"}]}]},"method-declaration-name":{"begin":"(?=((\\\\b(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|((?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.async.tsx"},"2":{"name":"storage.type.property.tsx"},"3":{"name":"keyword.generator.asterisk.tsx"}},"end":"(?=\\\\}|;|,)|(?<=\\\\})","name":"meta.method.declaration.tsx","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"},{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.async.tsx"},"2":{"name":"storage.type.property.tsx"},"3":{"name":"keyword.generator.asterisk.tsx"}},"end":"(?=\\\\(|\\\\<)","patterns":[{"include":"#method-declaration-name"}]}]},"object-member":{"patterns":[{"include":"#comment"},{"include":"#object-literal-method-declaration"},{"begin":"(?=\\\\[)","end":"(?=:)|((?<=[\\\\]])(?=\\\\s*[\\\\(\\\\<]))","name":"meta.object.member.tsx meta.object-literal.key.tsx","patterns":[{"include":"#comment"},{"include":"#array-literal"}]},{"begin":"(?=[\\\\'\\\\\\"\\\\\`])","end":"(?=:)|((?<=[\\\\'\\\\\\"\\\\\`])(?=((\\\\s*[\\\\(\\\\<,}])|(\\\\s+(as|satisifies)\\\\s+))))","name":"meta.object.member.tsx meta.object-literal.key.tsx","patterns":[{"include":"#comment"},{"include":"#string"}]},{"begin":"(?=(\\\\b(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\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`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","name":"meta.object.member.tsx"},{"captures":{"0":{"name":"meta.object-literal.key.tsx"}},"match":"(?:[_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?=(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*:)","name":"meta.object.member.tsx"},{"begin":"\\\\.\\\\.\\\\.","beginCaptures":{"0":{"name":"keyword.operator.spread.tsx"}},"end":"(?=,|\\\\})","name":"meta.object.member.tsx","patterns":[{"include":"#expression"}]},{"captures":{"1":{"name":"variable.other.readwrite.tsx"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?=,|\\\\}|$|\\\\/\\\\/|\\\\/\\\\*)","name":"meta.object.member.tsx"},{"captures":{"1":{"name":"keyword.control.as.tsx"},"2":{"name":"storage.modifier.tsx"}},"match":"(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|^|((?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)\\\\(\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.tsx"}},"end":"(?<=\\\\))","patterns":[{"include":"#type-parameters"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.tsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.tsx"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]}]},{"begin":"(?<=:)\\\\s*(async)?\\\\s*(\\\\()(?=\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.tsx"},"2":{"name":"meta.brace.round.tsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.tsx"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]},{"begin":"(?<=:)\\\\s*(async)?\\\\s*(?=\\\\<\\\\s*$)","beginCaptures":{"1":{"name":"storage.modifier.async.tsx"}},"end":"(?<=\\\\>)","patterns":[{"include":"#type-parameters"}]},{"begin":"(?<=\\\\>)\\\\s*(\\\\()(?=\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"meta.brace.round.tsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.tsx"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]},{"include":"#possibly-arrow-return-type"},{"include":"#expression"}]},{"include":"#punctuation-comma"},{"include":"#decl-block"}]},"parameter-array-binding-pattern":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.tsx"},"2":{"name":"punctuation.definition.binding-pattern.array.tsx"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.tsx"}},"patterns":[{"include":"#parameter-binding-element"},{"include":"#punctuation-comma"}]},"parameter-binding-element":{"patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#numeric-literal"},{"include":"#regex"},{"include":"#parameter-object-binding-pattern"},{"include":"#parameter-array-binding-pattern"},{"include":"#destructuring-parameter-rest"},{"include":"#variable-initializer"}]},"parameter-name":{"patterns":[{"captures":{"1":{"name":"storage.modifier.tsx"}},"match":"(?)))|((async\\\\s*)?(((<\\\\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|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"captures":{"1":{"name":"storage.modifier.tsx"},"2":{"name":"keyword.operator.rest.tsx"},"3":{"name":"variable.parameter.tsx variable.language.this.tsx"},"4":{"name":"variable.parameter.tsx"},"5":{"name":"keyword.operator.optional.tsx"}},"match":"(?:(?])","name":"meta.type.annotation.tsx","patterns":[{"include":"#type"}]}]},"paren-expression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.tsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.tsx"}},"patterns":[{"include":"#expression"}]},"paren-expression-possibly-arrow":{"patterns":[{"begin":"(?<=[(=,])\\\\s*(async)?(?=\\\\s*((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?\\\\(\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.tsx"}},"end":"(?<=\\\\))","patterns":[{"include":"#paren-expression-possibly-arrow-with-typeparameters"}]},{"begin":"(?<=[(=,]|=>|^return|[^\\\\._$[:alnum:]]return)\\\\s*(async)?(?=\\\\s*((((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(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+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)))\\\\s*$)","beginCaptures":{"1":{"name":"storage.modifier.async.tsx"}},"end":"(?<=\\\\))","patterns":[{"include":"#paren-expression-possibly-arrow-with-typeparameters"}]},{"include":"#possibly-arrow-return-type"}]},"paren-expression-possibly-arrow-with-typeparameters":{"patterns":[{"include":"#type-parameters"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.tsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.tsx"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]}]},"possibly-arrow-return-type":{"begin":"(?<=\\\\)|^)\\\\s*(:)(?=\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*=>)","beginCaptures":{"1":{"name":"meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx"}},"contentName":"meta.arrow.tsx meta.return.type.arrow.tsx","end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","patterns":[{"include":"#arrow-return-type-body"}]},"property-accessor":{"match":"(?|&&|\\\\|\\\\||\\\\*\\\\/)\\\\s*(\\\\/)(?![\\\\/*])(?=(?:[^\\\\/\\\\\\\\\\\\[\\\\()]|\\\\\\\\.|\\\\[([^\\\\]\\\\\\\\]|\\\\\\\\.)+\\\\]|\\\\(([^\\\\)\\\\\\\\]|\\\\\\\\.)+\\\\))+\\\\/([dgimsuvy]+|(?![\\\\/\\\\*])|(?=\\\\/\\\\*))(?!\\\\s*[a-zA-Z0-9_$]))","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.tsx"}},"end":"(/)([dgimsuvy]*)","endCaptures":{"1":{"name":"punctuation.definition.string.end.tsx"},"2":{"name":"keyword.other.tsx"}},"name":"string.regexp.tsx","patterns":[{"include":"#regexp"}]},{"begin":"((?"},{"match":"[?+*]|\\\\{(\\\\d+,\\\\d+|\\\\d+,|,\\\\d+|\\\\d+)\\\\}\\\\??","name":"keyword.operator.quantifier.regexp"},{"match":"\\\\|","name":"keyword.operator.or.regexp"},{"begin":"(\\\\()((\\\\?=)|(\\\\?!)|(\\\\?<=)|(\\\\?))?","beginCaptures":{"0":{"name":"punctuation.definition.group.regexp"},"1":{"name":"punctuation.definition.group.no-capture.regexp"},"2":{"name":"variable.other.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.regexp","patterns":[{"include":"#regexp"}]},{"begin":"(\\\\[)(\\\\^)?","beginCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"},"2":{"name":"keyword.operator.negation.regexp"}},"end":"(\\\\])","endCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"}},"name":"constant.other.character-class.set.regexp","patterns":[{"captures":{"1":{"name":"constant.character.numeric.regexp"},"2":{"name":"constant.character.control.regexp"},"3":{"name":"constant.character.escape.backslash.regexp"},"4":{"name":"constant.character.numeric.regexp"},"5":{"name":"constant.character.control.regexp"},"6":{"name":"constant.character.escape.backslash.regexp"}},"match":"(?:.|(\\\\\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\\\\\c[A-Z])|(\\\\\\\\.))\\\\-(?:[^\\\\]\\\\\\\\]|(\\\\\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\\\\\c[A-Z])|(\\\\\\\\.))","name":"constant.other.character-class.range.regexp"},{"include":"#regex-character-class"}]},{"include":"#regex-character-class"}]},"return-type":{"patterns":[{"begin":"(?<=\\\\))\\\\s*(:)(?=\\\\s*\\\\S)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.tsx"}},"end":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\())|(?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\\\b(?!\\\\$)))"},{"captures":{"1":{"name":"support.type.object.module.tsx"},"2":{"name":"support.type.object.module.tsx"},"3":{"name":"punctuation.accessor.tsx"},"4":{"name":"punctuation.accessor.optional.tsx"},"5":{"name":"support.type.object.module.tsx"}},"match":"(?\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\`)","end":"(?=\`)","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\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\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([_$[:alpha:]][_$[:alnum:]]*)","name":"entity.name.function.tagged-template.tsx"}]},{"include":"#type-arguments"}]},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]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\\\\.)*\\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)\`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.tsx"}},"end":"(?=\`)","patterns":[{"include":"#type-arguments"}]}]},"template-substitution-element":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.tsx"}},"contentName":"meta.embedded.line.tsx","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.tsx"}},"name":"meta.template.expression.tsx","patterns":[{"include":"#expression"}]},"template-type":{"patterns":[{"include":"#template-call"},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)?(\`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.tsx"},"2":{"name":"string.template.tsx punctuation.definition.string.template.begin.tsx"}},"contentName":"string.template.tsx","end":"\`","endCaptures":{"0":{"name":"string.template.tsx punctuation.definition.string.template.end.tsx"}},"patterns":[{"include":"#template-type-substitution-element"},{"include":"#string-character-escape"}]}]},"template-type-substitution-element":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.tsx"}},"contentName":"meta.embedded.line.tsx","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.tsx"}},"name":"meta.template.expression.tsx","patterns":[{"include":"#type"}]},"ternary-expression":{"begin":"(?!\\\\?\\\\.\\\\s*[^[:digit:]])(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.tsx"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.tsx"}},"patterns":[{"include":"#expression"}]},"this-literal":{"match":"(?])|((?<=[\\\\}>\\\\]\\\\)]|[_$[:alpha:]])\\\\s*(?=\\\\{)))","name":"meta.type.annotation.tsx","patterns":[{"include":"#type"}]},{"begin":"(:)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.tsx"}},"end":"(?])|(?=^\\\\s*$)|((?<=[\\\\}>\\\\]\\\\)]|[_$[:alpha:]])\\\\s*(?=\\\\{)))","name":"meta.type.annotation.tsx","patterns":[{"include":"#type"}]}]},"type-arguments":{"begin":"\\\\<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.tsx"}},"end":"\\\\>","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.tsx"}},"name":"meta.type.parameters.tsx","patterns":[{"include":"#type-arguments-body"}]},"type-arguments-body":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.tsx"}},"match":"(?)","patterns":[{"include":"#comment"},{"include":"#type-parameters"}]},{"begin":"(?))))))","end":"(?<=\\\\))","name":"meta.type.function.tsx","patterns":[{"include":"#function-parameters"}]}]},"type-function-return-type":{"patterns":[{"begin":"(=>)(?=\\\\s*\\\\S)","beginCaptures":{"1":{"name":"storage.type.function.arrow.tsx"}},"end":"(?)(?:\\\\?]|//|$)","name":"meta.type.function.return.tsx","patterns":[{"include":"#type-function-return-type-core"}]},{"begin":"=>","beginCaptures":{"0":{"name":"storage.type.function.arrow.tsx"}},"end":"(?)(?]|//|^\\\\s*$)|((?<=\\\\S)(?=\\\\s*$)))","name":"meta.type.function.return.tsx","patterns":[{"include":"#type-function-return-type-core"}]}]},"type-function-return-type-core":{"patterns":[{"include":"#comment"},{"begin":"(?<==>)(?=\\\\s*\\\\{)","end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"include":"#type-predicate-operator"},{"include":"#type"}]},"type-infer":{"patterns":[{"captures":{"1":{"name":"keyword.operator.expression.infer.tsx"},"2":{"name":"entity.name.type.tsx"},"3":{"name":"keyword.operator.expression.extends.tsx"}},"match":"(?)","endCaptures":{"1":{"name":"meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx"}},"patterns":[{"include":"#type-arguments-body"}]},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(<)","beginCaptures":{"1":{"name":"entity.name.type.tsx"},"2":{"name":"meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx"}},"contentName":"meta.type.parameters.tsx","end":"(>)","endCaptures":{"1":{"name":"meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx"}},"patterns":[{"include":"#type-arguments-body"}]},{"captures":{"1":{"name":"entity.name.type.module.tsx"},"2":{"name":"punctuation.accessor.tsx"},"3":{"name":"punctuation.accessor.optional.tsx"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))"},{"match":"[_$[:alpha:]][_$[:alnum:]]*","name":"entity.name.type.tsx"}]},"type-object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.tsx"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.block.tsx"}},"name":"meta.object.type.tsx","patterns":[{"include":"#comment"},{"include":"#method-declaration"},{"include":"#indexer-declaration"},{"include":"#indexer-mapped-type-declaration"},{"include":"#field-declaration"},{"include":"#type-annotation"},{"begin":"\\\\.\\\\.\\\\.","beginCaptures":{"0":{"name":"keyword.operator.spread.tsx"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","patterns":[{"include":"#type"}]},{"include":"#punctuation-comma"},{"include":"#punctuation-semicolon"},{"include":"#type"}]},"type-operators":{"patterns":[{"include":"#typeof-operator"},{"include":"#type-infer"},{"begin":"([&|])(?=\\\\s*\\\\{)","beginCaptures":{"0":{"name":"keyword.operator.type.tsx"}},"end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"begin":"[&|]","beginCaptures":{"0":{"name":"keyword.operator.type.tsx"}},"end":"(?=\\\\S)"},{"match":"(?)","endCaptures":{"1":{"name":"punctuation.definition.typeparameters.end.tsx"}},"name":"meta.type.parameters.tsx","patterns":[{"include":"#comment"},{"match":"(?)","name":"keyword.operator.assignment.tsx"}]},"type-paren-or-function-parameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.tsx"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.tsx"}},"name":"meta.type.paren.cover.tsx","patterns":[{"captures":{"1":{"name":"storage.modifier.tsx"},"2":{"name":"keyword.operator.rest.tsx"},"3":{"name":"entity.name.function.tsx variable.language.this.tsx"},"4":{"name":"entity.name.function.tsx"},"5":{"name":"keyword.operator.optional.tsx"}},"match":"(?:(?)))))))|(:\\\\s*(?\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))))"},{"captures":{"1":{"name":"storage.modifier.tsx"},"2":{"name":"keyword.operator.rest.tsx"},"3":{"name":"variable.parameter.tsx variable.language.this.tsx"},"4":{"name":"variable.parameter.tsx"},"5":{"name":"keyword.operator.optional.tsx"}},"match":"(?:(?:&|{\\\\?]|(extends\\\\s+)|$|;|^\\\\s*$|(?:^\\\\s*(?:abstract|async|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|var|while)\\\\b))","patterns":[{"include":"#type-arguments"},{"include":"#expression"}]},"undefined-literal":{"match":"(?)))|((async\\\\s*)?(((<\\\\s*$)|([\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|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$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","beginCaptures":{"1":{"name":"meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx"}},"end":"(?=$|^|[;,=}]|((?)))|((async\\\\s*)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)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\'\\\\\\"\\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\'([^\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\\`([^\\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","beginCaptures":{"1":{"name":"meta.definition.variable.tsx entity.name.function.tsx"},"2":{"name":"keyword.operator.definiteassignment.tsx"}},"end":"(?=$|^|[;,=}]|((?\\\\s*$)","beginCaptures":{"1":{"name":"keyword.operator.assignment.tsx"}},"end":"(?=$|^|[,);}\\\\]]|((?!\/]/,l;function T(e,t){var n=e.next();if(n=='"'||n=="'")return t.tokenize=N(n),t.tokenize(e,t);if(/[\[\]{}\(\),;\\:\?\.]/.test(n))return l=n,"punctuation";if(n=="#")return e.skipToEnd(),"atom";if(n=="%")return e.eatWhile(/\b/),"atom";if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if(n=="/"){if(e.eat("*"))return t.tokenize=m,m(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(d.test(n))return n=="@"&&(e.match("try")||e.match("catch")||e.match("lazy"))?"keyword":(e.eatWhile(d),"operator");e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current();return y.propertyIsEnumerable(r)?"keyword":v.propertyIsEnumerable(r)?"builtin":x.propertyIsEnumerable(r)||k.propertyIsEnumerable(r)||O.propertyIsEnumerable(r)||g.propertyIsEnumerable(r)||w.propertyIsEnumerable(r)||E.propertyIsEnumerable(r)?"def":C.propertyIsEnumerable(r)||I.propertyIsEnumerable(r)||z.propertyIsEnumerable(r)?"string":L.propertyIsEnumerable(r)?"typeName.standard":M.propertyIsEnumerable(r)?"modifier":S.propertyIsEnumerable(r)?"atom":"variable"}function N(e){return function(t,n){for(var r=!1,c,f=!1;(c=t.next())!=null;){if(c==e&&!r){var s=t.peek();s&&(s=s.toLowerCase(),(s=="b"||s=="h"||s=="o")&&t.next()),f=!0;break}r=!r&&c=="\\"}return f&&(n.tokenize=null),"string"}}function m(e,t){for(var n=!1,r;r=e.next();){if(r=="/"&&n){t.tokenize=null;break}n=r=="*"}return"comment"}function b(e,t,n,r,c){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=c}function a(e,t,n){var r=e.indented;return e.context&&e.context.type=="statement"&&(r=e.context.indented),e.context=new b(r,t,n,null,e.context)}function u(e){var t=e.context.type;return(t==")"||t=="]"||t=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const P={name:"ttcn",startState:function(){return{tokenize:null,context:new b(0,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(n.align==null&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;l=null;var r=(t.tokenize||T)(e,t);if(r=="comment")return r;if(n.align==null&&(n.align=!0),(l==";"||l==":"||l==",")&&n.type=="statement")u(t);else if(l=="{")a(t,e.column(),"}");else if(l=="[")a(t,e.column(),"]");else if(l=="(")a(t,e.column(),")");else if(l=="}"){for(;n.type=="statement";)n=u(t);for(n.type=="}"&&(n=u(t));n.type=="statement";)n=u(t)}else l==n.type?u(t):W&&((n.type=="}"||n.type=="top")&&l!=";"||n.type=="statement"&&l=="newstatement")&&a(t,e.column(),"statement");return t.startOfLine=!1,r},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:h}};export{P as ttcn}; diff --git a/pkg/cli/webapp/dist/assets/ttcn-cfg-B9xdYoR4.js b/pkg/cli/webapp/dist/assets/ttcn-cfg-B9xdYoR4.js new file mode 100644 index 0000000..7d3a7eb --- /dev/null +++ b/pkg/cli/webapp/dist/assets/ttcn-cfg-B9xdYoR4.js @@ -0,0 +1 @@ +function I(e){for(var n={},T=e.split(" "),E=0;E=&|]/;function x(e,n){var t=e.next();if(r=null,t=="<"&&!e.match(/^[\s\u00a0=]/,!1))return e.match(/^[^\s\u00a0>]*>?/),"atom";if(t=='"'||t=="'")return n.tokenize=v(t),n.tokenize(e,n);if(/[{}\(\),\.;\[\]]/.test(t))return r=t,null;if(t=="#")return e.skipToEnd(),"comment";if(f.test(t))return e.eatWhile(f),null;if(t==":")return"operator";if(e.eatWhile(/[_\w\d]/),e.peek()==":")return"variableName.special";var i=e.current();return d.test(i)?"meta":t>="A"&&t<="Z"?"comment":"keyword";var i=e.current()}function v(e){return function(n,t){for(var i=!1,o;(o=n.next())!=null;){if(o==e&&!i){t.tokenize=x;break}i=!i&&o=="\\"}return"string"}}function l(e,n,t){e.context={prev:e.context,indent:e.indent,col:t,type:n}}function c(e){e.indent=e.context.indent,e.context=e.context.prev}const g={name:"turtle",startState:function(){return{tokenize:x,context:null,indent:0,col:0}},token:function(e,n){if(e.sol()&&(n.context&&n.context.align==null&&(n.context.align=!1),n.indent=e.indentation()),e.eatSpace())return null;var t=n.tokenize(e,n);if(t!="comment"&&n.context&&n.context.align==null&&n.context.type!="pattern"&&(n.context.align=!0),r=="(")l(n,")",e.column());else if(r=="[")l(n,"]",e.column());else if(r=="{")l(n,"}",e.column());else if(/[\]\}\)]/.test(r)){for(;n.context&&n.context.type=="pattern";)c(n);n.context&&r==n.context.type&&c(n)}else r=="."&&n.context&&n.context.type=="pattern"?c(n):/atom|string|variable/.test(t)&&n.context&&(/[\}\]]/.test(n.context.type)?l(n,"pattern",e.column()):n.context.type=="pattern"&&!n.context.align&&(n.context.align=!0,n.context.col=e.column()));return t},indent:function(e,n,t){var i=n&&n.charAt(0),o=e.context;if(/[\]\}]/.test(i))for(;o&&o.type=="pattern";)o=o.prev;var u=o&&i==o.type;return o?o.type=="pattern"?o.col:o.align?o.col+(u?0:1):o.indent+(u?0:t.unit):0},languageData:{commentTokens:{line:"#"}}};export{g as turtle}; diff --git a/pkg/cli/webapp/dist/assets/typescript-Dj6nwHGl.js b/pkg/cli/webapp/dist/assets/typescript-Dj6nwHGl.js new file mode 100644 index 0000000..675a8a0 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/typescript-Dj6nwHGl.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse('{"displayName":"TypeScript","name":"typescript","patterns":[{"include":"#directives"},{"include":"#statements"},{"include":"#shebang"}],"repository":{"access-modifier":{"match":"(?]|^await|[^\\\\._$[:alnum:]]await|^return|[^\\\\._$[:alnum:]]return|^yield|[^\\\\._$[:alnum:]]yield|^throw|[^\\\\._$[:alnum:]]throw|^in|[^\\\\._$[:alnum:]]in|^of|[^\\\\._$[:alnum:]]of|^typeof|[^\\\\._$[:alnum:]]typeof|&&|\\\\|\\\\||\\\\*)\\\\s*(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.block.ts"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"name":"meta.objectliteral.ts","patterns":[{"include":"#object-member"}]},"array-binding-pattern":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.ts"},"2":{"name":"punctuation.definition.binding-pattern.array.ts"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.ts"}},"patterns":[{"include":"#binding-element"},{"include":"#punctuation-comma"}]},"array-binding-pattern-const":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.ts"},"2":{"name":"punctuation.definition.binding-pattern.array.ts"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.ts"}},"patterns":[{"include":"#binding-element-const"},{"include":"#punctuation-comma"}]},"array-literal":{"begin":"\\\\s*(\\\\[)","beginCaptures":{"1":{"name":"meta.brace.square.ts"}},"end":"\\\\]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.array.literal.ts","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}]},"arrow-function":{"patterns":[{"captures":{"1":{"name":"storage.modifier.async.ts"},"2":{"name":"variable.parameter.ts"}},"match":"(?:(?)","name":"meta.arrow.ts"},{"begin":"(?:(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\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\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\\'\\\\\\"\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>)))","beginCaptures":{"1":{"name":"storage.modifier.async.ts"}},"end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","name":"meta.arrow.ts","patterns":[{"include":"#comment"},{"include":"#type-parameters"},{"include":"#function-parameters"},{"include":"#arrow-return-type"},{"include":"#possibly-arrow-return-type"}]},{"begin":"=>","beginCaptures":{"0":{"name":"storage.type.function.arrow.ts"}},"end":"((?<=\\\\}|\\\\S)(?)|((?!\\\\{)(?=\\\\S)))(?!\\\\/[\\\\/\\\\*])","name":"meta.arrow.ts","patterns":[{"include":"#single-line-comment-consuming-line-ending"},{"include":"#decl-block"},{"include":"#expression"}]}]},"arrow-return-type":{"begin":"(?<=\\\\))\\\\s*(:)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","name":"meta.return.type.arrow.ts","patterns":[{"include":"#arrow-return-type-body"}]},"arrow-return-type-body":{"patterns":[{"begin":"(?<=[:])(?=\\\\s*\\\\{)","end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"include":"#type-predicate-operator"},{"include":"#type"}]},"async-modifier":{"match":"(?)","name":"cast.expr.ts"},{"begin":"(?:(?*?\\\\&\\\\|\\\\^]|[^_$[:alnum:]](?:\\\\+\\\\+|\\\\-\\\\-)|[^\\\\+]\\\\+|[^\\\\-]\\\\-))\\\\s*(<)(?!)","endCaptures":{"1":{"name":"meta.brace.angle.ts"}},"name":"cast.expr.ts","patterns":[{"include":"#type"}]},{"begin":"(?:(?<=^))\\\\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\\\\s*>)","beginCaptures":{"1":{"name":"meta.brace.angle.ts"}},"end":"(\\\\>)","endCaptures":{"1":{"name":"meta.brace.angle.ts"}},"name":"cast.expr.ts","patterns":[{"include":"#type"}]}]},"class-declaration":{"begin":"(?\\\\s*$)","beginCaptures":{"1":{"name":"punctuation.definition.comment.ts"}},"end":"(?=$)","name":"comment.line.triple-slash.directive.ts","patterns":[{"begin":"(<)(reference|amd-dependency|amd-module)","beginCaptures":{"1":{"name":"punctuation.definition.tag.directive.ts"},"2":{"name":"entity.name.tag.directive.ts"}},"end":"/>","endCaptures":{"0":{"name":"punctuation.definition.tag.directive.ts"}},"name":"meta.tag.ts","patterns":[{"match":"path|types|no-default-lib|lib|name|resolution-mode","name":"entity.other.attribute-name.directive.ts"},{"match":"=","name":"keyword.operator.assignment.ts"},{"include":"#string"}]}]},"docblock":{"patterns":[{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"constant.language.access-type.jsdoc"}},"match":"((@)(?:access|api))\\\\s+(private|protected|public)\\\\b"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"},"4":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"5":{"name":"constant.other.email.link.underline.jsdoc"},"6":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}},"match":"((@)author)\\\\s+([^@\\\\s<>*/](?:[^@<>*/]|\\\\*[^/])*)(?:\\\\s*(<)([^>\\\\s]+)(>))?"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"},"4":{"name":"keyword.operator.control.jsdoc"},"5":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)borrows)\\\\s+((?:[^@\\\\s*/]|\\\\*[^/])+)\\\\s+(as)\\\\s+((?:[^@\\\\s*/]|\\\\*[^/])+)"},{"begin":"((@)example)\\\\s+","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=@|\\\\*/)","name":"meta.example.jsdoc","patterns":[{"match":"^\\\\s\\\\*\\\\s+"},{"begin":"\\\\G(<)caption(>)","beginCaptures":{"0":{"name":"entity.name.tag.inline.jsdoc"},"1":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"2":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}},"contentName":"constant.other.description.jsdoc","end":"()|(?=\\\\*/)","endCaptures":{"0":{"name":"entity.name.tag.inline.jsdoc"},"1":{"name":"punctuation.definition.bracket.angle.begin.jsdoc"},"2":{"name":"punctuation.definition.bracket.angle.end.jsdoc"}}},{"captures":{"0":{"name":"source.embedded.ts"}},"match":"[^\\\\s@*](?:[^*]|\\\\*[^/])*"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"constant.language.symbol-type.jsdoc"}},"match":"((@)kind)\\\\s+(class|constant|event|external|file|function|member|mixin|module|namespace|typedef)\\\\b"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.link.underline.jsdoc"},"4":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)see)\\\\s+(?:((?=https?://)(?:[^\\\\s*]|\\\\*[^/])+)|((?!https?://|(?:\\\\[[^\\\\[\\\\]]*\\\\])?{@(?:link|linkcode|linkplain|tutorial)\\\\b)(?:[^@\\\\s*/]|\\\\*[^/])+))"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)template)\\\\s+([A-Za-z_$][\\\\w$.\\\\[\\\\]]*(?:\\\\s*,\\\\s*[A-Za-z_$][\\\\w$.\\\\[\\\\]]*)*)"},{"begin":"((@)template)\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)","name":"variable.other.jsdoc"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)(?:arg|argument|const|constant|member|namespace|param|var))\\\\s+([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)"},{"begin":"((@)typedef)\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"(?:[^@\\\\s*/]|\\\\*[^/])+","name":"entity.name.type.instance.jsdoc"}]},{"begin":"((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"},{"match":"([A-Za-z_$][\\\\w$.\\\\[\\\\]]*)","name":"variable.other.jsdoc"},{"captures":{"1":{"name":"punctuation.definition.optional-value.begin.bracket.square.jsdoc"},"2":{"name":"keyword.operator.assignment.jsdoc"},"3":{"name":"source.embedded.ts"},"4":{"name":"punctuation.definition.optional-value.end.bracket.square.jsdoc"},"5":{"name":"invalid.illegal.syntax.jsdoc"}},"match":"(\\\\[)\\\\s*[\\\\w$]+(?:(?:\\\\[\\\\])?\\\\.[\\\\w$]+)*(?:\\\\s*(=)\\\\s*((?>\\"(?:(?:\\\\*(?!/))|(?:\\\\\\\\(?!\\"))|[^*\\\\\\\\])*?\\"|\'(?:(?:\\\\*(?!/))|(?:\\\\\\\\(?!\'))|[^*\\\\\\\\])*?\'|\\\\[(?:(?:\\\\*(?!/))|[^*])*?\\\\]|(?:(?:\\\\*(?!/))|\\\\s(?!\\\\s*\\\\])|\\\\[.*?(?:\\\\]|(?=\\\\*/))|[^*\\\\s\\\\[\\\\]])*)*))?\\\\s*(?:(\\\\])((?:[^*\\\\s]|\\\\*[^\\\\s/])+)?|(?=\\\\*/))","name":"variable.other.jsdoc"}]},{"begin":"((@)(?:define|enum|exception|export|extends|lends|implements|modifies|namespace|private|protected|returns?|satisfies|suppress|this|throws|type|yields?))\\\\s+(?={)","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"end":"(?=\\\\s|\\\\*/|[^{}\\\\[\\\\]A-Za-z_$])","patterns":[{"include":"#jsdoctype"}]},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"entity.name.type.instance.jsdoc"}},"match":"((@)(?:alias|augments|callback|constructs|emits|event|fires|exports?|extends|external|function|func|host|lends|listens|interface|memberof!?|method|module|mixes|mixin|name|requires|see|this|typedef|uses))\\\\s+((?:[^{}@\\\\s*]|\\\\*[^/])+)"},{"begin":"((@)(?:default(?:value)?|license|version))\\\\s+(([\'\'\\"]))","beginCaptures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"},"4":{"name":"punctuation.definition.string.begin.jsdoc"}},"contentName":"variable.other.jsdoc","end":"(\\\\3)|(?=$|\\\\*/)","endCaptures":{"0":{"name":"variable.other.jsdoc"},"1":{"name":"punctuation.definition.string.end.jsdoc"}}},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"},"3":{"name":"variable.other.jsdoc"}},"match":"((@)(?:default(?:value)?|license|tutorial|variation|version))\\\\s+([^\\\\s*]+)"},{"captures":{"1":{"name":"punctuation.definition.block.tag.jsdoc"}},"match":"(@)(?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception|exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func|function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce|yields?)\\\\b","name":"storage.type.class.jsdoc"},{"include":"#inline-tags"},{"captures":{"1":{"name":"storage.type.class.jsdoc"},"2":{"name":"punctuation.definition.block.tag.jsdoc"}},"match":"((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\\\s+)"}]},"enum-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\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]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\\'\\\\\\"\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"keyword.operator.rest.ts"},"3":{"name":"variable.parameter.ts variable.language.this.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|((?>=|>>>=|\\\\|=","name":"keyword.operator.assignment.compound.bitwise.ts"},{"match":"<<|>>>|>>","name":"keyword.operator.bitwise.shift.ts"},{"match":"===|!==|==|!=","name":"keyword.operator.comparison.ts"},{"match":"<=|>=|<>|<|>","name":"keyword.operator.relational.ts"},{"captures":{"1":{"name":"keyword.operator.logical.ts"},"2":{"name":"keyword.operator.assignment.compound.ts"},"3":{"name":"keyword.operator.arithmetic.ts"}},"match":"(?<=[_$[:alnum:]])(\\\\!)\\\\s*(?:(/=)|(?:(/)(?![/*])))"},{"match":"\\\\!|&&|\\\\|\\\\||\\\\?\\\\?","name":"keyword.operator.logical.ts"},{"match":"\\\\&|~|\\\\^|\\\\|","name":"keyword.operator.bitwise.ts"},{"match":"\\\\=","name":"keyword.operator.assignment.ts"},{"match":"--","name":"keyword.operator.decrement.ts"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.ts"},{"match":"%|\\\\*|/|-|\\\\+","name":"keyword.operator.arithmetic.ts"},{"begin":"(?<=[_$[:alnum:])\\\\]])\\\\s*(?=(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)+(?:(/=)|(?:(/)(?![/*]))))","end":"(?:(/=)|(?:(/)(?!\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/)))","endCaptures":{"1":{"name":"keyword.operator.assignment.compound.ts"},"2":{"name":"keyword.operator.arithmetic.ts"}},"patterns":[{"include":"#comment"}]},{"captures":{"1":{"name":"keyword.operator.assignment.compound.ts"},"2":{"name":"keyword.operator.arithmetic.ts"}},"match":"(?<=[_$[:alnum:])\\\\]])\\\\s*(?:(/=)|(?:(/)(?![/*])))"}]},"expressionPunctuations":{"patterns":[{"include":"#punctuation-comma"},{"include":"#punctuation-accessor"}]},"expressionWithoutIdentifiers":{"patterns":[{"include":"#string"},{"include":"#regex"},{"include":"#comment"},{"include":"#function-expression"},{"include":"#class-expression"},{"include":"#arrow-function"},{"include":"#paren-expression-possibly-arrow"},{"include":"#cast"},{"include":"#ternary-expression"},{"include":"#new-expr"},{"include":"#instanceof-expr"},{"include":"#object-literal"},{"include":"#expression-operators"},{"include":"#function-call"},{"include":"#literal"},{"include":"#support-objects"},{"include":"#paren-expression"}]},"field-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?[\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*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([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))))|(:\\\\s*(=>|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(<[^<>]*>)|[^<>(),=])+=\\\\s*(((async\\\\s+)?((function\\\\s*[(<*])|(function\\\\s+)|([_$[:alpha:]][_$[:alnum:]]*\\\\s*=>)))|((async\\\\s*)?(((<\\\\s*$)|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([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\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"match":"\\\\#?[_$[:alpha:]][_$[:alnum:]]*","name":"meta.definition.property.ts variable.object.property.ts"},{"match":"\\\\?","name":"keyword.operator.optional.ts"},{"match":"\\\\!","name":"keyword.operator.definiteassignment.ts"}]},"for-loop":{"begin":"(?\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\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\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\\\\())","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))","end":"(?=\\\\s*(?:(\\\\?\\\\.\\\\s*)|(\\\\!))?((<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\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^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?\\\\())","name":"meta.function-call.ts","patterns":[{"include":"#function-call-target"}]},{"include":"#comment"},{"include":"#function-call-optionals"},{"include":"#type-arguments"},{"include":"#paren-expression"}]},{"begin":"(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\\\)]))(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","end":"(?<=\\\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\\\)]))(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\\\s*\\\\??\\\\.\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\\\??\\\\.\\\\s*\\\\#?[_$[:alpha:]][_$[:alnum:]]*))","end":"(?=(<\\\\s*[\\\\{\\\\[\\\\(]\\\\s*$))","name":"meta.function-call.ts","patterns":[{"include":"#function-call-target"}]},{"include":"#comment"},{"include":"#function-call-optionals"},{"include":"#type-arguments"}]}]},"function-call-optionals":{"patterns":[{"match":"\\\\?\\\\.","name":"meta.function-call.ts punctuation.accessor.optional.ts"},{"match":"\\\\!","name":"meta.function-call.ts keyword.operator.definiteassignment.ts"}]},"function-call-target":{"patterns":[{"include":"#support-function-call-identifiers"},{"match":"(\\\\#?[_$[:alpha:]][_$[:alnum:]]*)","name":"entity.name.function.ts"}]},"function-declaration":{"begin":"(?)))|((async\\\\s*)?(((<\\\\s*$)|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))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|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>)))))"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"punctuation.accessor.optional.ts"},"3":{"name":"variable.other.constant.property.ts"}},"match":"(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))\\\\s*(\\\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"punctuation.accessor.optional.ts"},"3":{"name":"variable.other.property.ts"}},"match":"(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))\\\\s*(\\\\#?[_$[:alpha:]][_$[:alnum:]]*)"},{"match":"([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])","name":"variable.other.constant.ts"},{"match":"[_$[:alpha:]][_$[:alnum:]]*","name":"variable.other.readwrite.ts"}]},"if-statement":{"patterns":[{"begin":"(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|(===|!==|==|!=)|(([\\\\&\\\\~\\\\^\\\\|]\\\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\\\s+instanceof(?![_$[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.)))|((?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"storage.modifier.ts"},"4":{"name":"storage.modifier.async.ts"},"5":{"name":"keyword.operator.new.ts"},"6":{"name":"keyword.generator.asterisk.ts"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","name":"meta.method.declaration.ts","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"}]},{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"storage.modifier.ts"},"4":{"name":"storage.modifier.async.ts"},"5":{"name":"storage.type.property.ts"},"6":{"name":"keyword.generator.asterisk.ts"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","name":"meta.method.declaration.ts","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"}]}]},"method-declaration-name":{"begin":"(?=((\\\\b(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|((?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.async.ts"},"2":{"name":"storage.type.property.ts"},"3":{"name":"keyword.generator.asterisk.ts"}},"end":"(?=\\\\}|;|,)|(?<=\\\\})","name":"meta.method.declaration.ts","patterns":[{"include":"#method-declaration-name"},{"include":"#function-body"},{"begin":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*))?[\\\\(])","beginCaptures":{"1":{"name":"storage.modifier.async.ts"},"2":{"name":"storage.type.property.ts"},"3":{"name":"keyword.generator.asterisk.ts"}},"end":"(?=\\\\(|\\\\<)","patterns":[{"include":"#method-declaration-name"}]}]},"object-member":{"patterns":[{"include":"#comment"},{"include":"#object-literal-method-declaration"},{"begin":"(?=\\\\[)","end":"(?=:)|((?<=[\\\\]])(?=\\\\s*[\\\\(\\\\<]))","name":"meta.object.member.ts meta.object-literal.key.ts","patterns":[{"include":"#comment"},{"include":"#array-literal"}]},{"begin":"(?=[\\\\\'\\\\\\"\\\\`])","end":"(?=:)|((?<=[\\\\\'\\\\\\"\\\\`])(?=((\\\\s*[\\\\(\\\\<,}])|(\\\\s+(as|satisifies)\\\\s+))))","name":"meta.object.member.ts meta.object-literal.key.ts","patterns":[{"include":"#comment"},{"include":"#string"}]},{"begin":"(?=(\\\\b(?)))|((async\\\\s*)?(((<\\\\s*$)|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?[\\\\(]\\\\s*((([\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\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\\'\\\\\\"\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","name":"meta.object.member.ts"},{"captures":{"0":{"name":"meta.object-literal.key.ts"}},"match":"(?:[_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?=(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*:)","name":"meta.object.member.ts"},{"begin":"\\\\.\\\\.\\\\.","beginCaptures":{"0":{"name":"keyword.operator.spread.ts"}},"end":"(?=,|\\\\})","name":"meta.object.member.ts","patterns":[{"include":"#expression"}]},{"captures":{"1":{"name":"variable.other.readwrite.ts"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?=,|\\\\}|$|\\\\/\\\\/|\\\\/\\\\*)","name":"meta.object.member.ts"},{"captures":{"1":{"name":"keyword.control.as.ts"},"2":{"name":"storage.modifier.ts"}},"match":"(?]|\\\\|\\\\||\\\\&\\\\&|\\\\!\\\\=\\\\=|$|^|((?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)\\\\(\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.ts"}},"end":"(?<=\\\\))","patterns":[{"include":"#type-parameters"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]}]},{"begin":"(?<=:)\\\\s*(async)?\\\\s*(\\\\()(?=\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.ts"},"2":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]},{"begin":"(?<=:)\\\\s*(async)?\\\\s*(?=\\\\<\\\\s*$)","beginCaptures":{"1":{"name":"storage.modifier.async.ts"}},"end":"(?<=\\\\>)","patterns":[{"include":"#type-parameters"}]},{"begin":"(?<=\\\\>)\\\\s*(\\\\()(?=\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]},{"include":"#possibly-arrow-return-type"},{"include":"#expression"}]},{"include":"#punctuation-comma"},{"include":"#decl-block"}]},"parameter-array-binding-pattern":{"begin":"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.rest.ts"},"2":{"name":"punctuation.definition.binding-pattern.array.ts"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.binding-pattern.array.ts"}},"patterns":[{"include":"#parameter-binding-element"},{"include":"#punctuation-comma"}]},"parameter-binding-element":{"patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#numeric-literal"},{"include":"#regex"},{"include":"#parameter-object-binding-pattern"},{"include":"#parameter-array-binding-pattern"},{"include":"#destructuring-parameter-rest"},{"include":"#variable-initializer"}]},"parameter-name":{"patterns":[{"captures":{"1":{"name":"storage.modifier.ts"}},"match":"(?)))|((async\\\\s*)?(((<\\\\s*$)|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\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\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\\'\\\\\\"\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"keyword.operator.rest.ts"},"3":{"name":"variable.parameter.ts variable.language.this.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:(?])","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]}]},"paren-expression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#expression"}]},"paren-expression-possibly-arrow":{"patterns":[{"begin":"(?<=[(=,])\\\\s*(async)?(?=\\\\s*((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\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+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))))","beginCaptures":{"1":{"name":"storage.modifier.async.ts"}},"end":"(?<=\\\\))","patterns":[{"include":"#paren-expression-possibly-arrow-with-typeparameters"}]},{"begin":"(?<=[(=,]|=>|^return|[^\\\\._$[:alnum:]]return)\\\\s*(async)?(?=\\\\s*((((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>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\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)))\\\\s*$)","beginCaptures":{"1":{"name":"storage.modifier.async.ts"}},"end":"(?<=\\\\))","patterns":[{"include":"#paren-expression-possibly-arrow-with-typeparameters"}]},{"include":"#possibly-arrow-return-type"}]},"paren-expression-possibly-arrow-with-typeparameters":{"patterns":[{"include":"#type-parameters"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#expression-inside-possibly-arrow-parens"}]}]},"possibly-arrow-return-type":{"begin":"(?<=\\\\)|^)\\\\s*(:)(?=\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*=>)","beginCaptures":{"1":{"name":"meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts"}},"contentName":"meta.arrow.ts meta.return.type.arrow.ts","end":"(?==>|\\\\{|(^\\\\s*(export|function|class|interface|let|var|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))","patterns":[{"include":"#arrow-return-type-body"}]},"property-accessor":{"match":"(?|&&|\\\\|\\\\||\\\\*\\\\/)\\\\s*(\\\\/)(?![\\\\/*])(?=(?:[^\\\\/\\\\\\\\\\\\[\\\\()]|\\\\\\\\.|\\\\[([^\\\\]\\\\\\\\]|\\\\\\\\.)+\\\\]|\\\\(([^\\\\)\\\\\\\\]|\\\\\\\\.)+\\\\))+\\\\/([dgimsuvy]+|(?![\\\\/\\\\*])|(?=\\\\/\\\\*))(?!\\\\s*[a-zA-Z0-9_$]))","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.ts"}},"end":"(/)([dgimsuvy]*)","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"keyword.other.ts"}},"name":"string.regexp.ts","patterns":[{"include":"#regexp"}]},{"begin":"((?"},{"match":"[?+*]|\\\\{(\\\\d+,\\\\d+|\\\\d+,|,\\\\d+|\\\\d+)\\\\}\\\\??","name":"keyword.operator.quantifier.regexp"},{"match":"\\\\|","name":"keyword.operator.or.regexp"},{"begin":"(\\\\()((\\\\?=)|(\\\\?!)|(\\\\?<=)|(\\\\?))?","beginCaptures":{"0":{"name":"punctuation.definition.group.regexp"},"1":{"name":"punctuation.definition.group.no-capture.regexp"},"2":{"name":"variable.other.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.regexp","patterns":[{"include":"#regexp"}]},{"begin":"(\\\\[)(\\\\^)?","beginCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"},"2":{"name":"keyword.operator.negation.regexp"}},"end":"(\\\\])","endCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"}},"name":"constant.other.character-class.set.regexp","patterns":[{"captures":{"1":{"name":"constant.character.numeric.regexp"},"2":{"name":"constant.character.control.regexp"},"3":{"name":"constant.character.escape.backslash.regexp"},"4":{"name":"constant.character.numeric.regexp"},"5":{"name":"constant.character.control.regexp"},"6":{"name":"constant.character.escape.backslash.regexp"}},"match":"(?:.|(\\\\\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\\\\\c[A-Z])|(\\\\\\\\.))\\\\-(?:[^\\\\]\\\\\\\\]|(\\\\\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\\\\\c[A-Z])|(\\\\\\\\.))","name":"constant.other.character-class.range.regexp"},{"include":"#regex-character-class"}]},{"include":"#regex-character-class"}]},"return-type":{"patterns":[{"begin":"(?<=\\\\))\\\\s*(:)(?=\\\\s*\\\\S)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\())|(?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\\\b(?!\\\\$)))"},{"captures":{"1":{"name":"support.type.object.module.ts"},"2":{"name":"support.type.object.module.ts"},"3":{"name":"punctuation.accessor.ts"},"4":{"name":"punctuation.accessor.optional.ts"},"5":{"name":"support.type.object.module.ts"}},"match":"(?\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?`)","end":"(?=`)","patterns":[{"begin":"(?=(([_$[:alpha:]][_$[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*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\\\\.)*\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)?`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([_$[:alpha:]][_$[:alnum:]]*)","name":"entity.name.function.tagged-template.ts"}]},{"include":"#type-arguments"}]},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))(?=\\\\s*([\\\\<\\\\>\\\\,\\\\.\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^<>\\\\(]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(?<==)\\\\>|\\\\<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]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\))*\\\\)))*\\\\))|(?<==)\\\\>)*(?))*(?)*(?\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?=`)","patterns":[{"include":"#type-arguments"}]}]},"template-substitution-element":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"meta.embedded.line.ts","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"name":"meta.template.expression.ts","patterns":[{"include":"#expression"}]},"template-type":{"patterns":[{"include":"#template-call"},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)?(`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"},"2":{"name":"string.template.ts punctuation.definition.string.template.begin.ts"}},"contentName":"string.template.ts","end":"`","endCaptures":{"0":{"name":"string.template.ts punctuation.definition.string.template.end.ts"}},"patterns":[{"include":"#template-type-substitution-element"},{"include":"#string-character-escape"}]}]},"template-type-substitution-element":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"meta.embedded.line.ts","end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"name":"meta.template.expression.ts","patterns":[{"include":"#type"}]},"ternary-expression":{"begin":"(?!\\\\?\\\\.\\\\s*[^[:digit:]])(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"patterns":[{"include":"#expression"}]},"this-literal":{"match":"(?])|((?<=[\\\\}>\\\\]\\\\)]|[_$[:alpha:]])\\\\s*(?=\\\\{)))","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]},{"begin":"(:)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?])|(?=^\\\\s*$)|((?<=[\\\\}>\\\\]\\\\)]|[_$[:alpha:]])\\\\s*(?=\\\\{)))","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]}]},"type-arguments":{"begin":"\\\\<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":"\\\\>","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#type-arguments-body"}]},"type-arguments-body":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.ts"}},"match":"(?)","patterns":[{"include":"#comment"},{"include":"#type-parameters"}]},{"begin":"(?))))))","end":"(?<=\\\\))","name":"meta.type.function.ts","patterns":[{"include":"#function-parameters"}]}]},"type-function-return-type":{"patterns":[{"begin":"(=>)(?=\\\\s*\\\\S)","beginCaptures":{"1":{"name":"storage.type.function.arrow.ts"}},"end":"(?)(?:\\\\?]|//|$)","name":"meta.type.function.return.ts","patterns":[{"include":"#type-function-return-type-core"}]},{"begin":"=>","beginCaptures":{"0":{"name":"storage.type.function.arrow.ts"}},"end":"(?)(?]|//|^\\\\s*$)|((?<=\\\\S)(?=\\\\s*$)))","name":"meta.type.function.return.ts","patterns":[{"include":"#type-function-return-type-core"}]}]},"type-function-return-type-core":{"patterns":[{"include":"#comment"},{"begin":"(?<==>)(?=\\\\s*\\\\{)","end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"include":"#type-predicate-operator"},{"include":"#type"}]},"type-infer":{"patterns":[{"captures":{"1":{"name":"keyword.operator.expression.infer.ts"},"2":{"name":"entity.name.type.ts"},"3":{"name":"keyword.operator.expression.extends.ts"}},"match":"(?)","endCaptures":{"1":{"name":"meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"}},"patterns":[{"include":"#type-arguments-body"}]},{"begin":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(<)","beginCaptures":{"1":{"name":"entity.name.type.ts"},"2":{"name":"meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"}},"contentName":"meta.type.parameters.ts","end":"(>)","endCaptures":{"1":{"name":"meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"}},"patterns":[{"include":"#type-arguments-body"}]},{"captures":{"1":{"name":"entity.name.type.module.ts"},"2":{"name":"punctuation.accessor.ts"},"3":{"name":"punctuation.accessor.optional.ts"}},"match":"([_$[:alpha:]][_$[:alnum:]]*)\\\\s*(?:(\\\\.)|(\\\\?\\\\.(?!\\\\s*[[:digit:]])))"},{"match":"[_$[:alpha:]][_$[:alnum:]]*","name":"entity.name.type.ts"}]},"type-object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"name":"meta.object.type.ts","patterns":[{"include":"#comment"},{"include":"#method-declaration"},{"include":"#indexer-declaration"},{"include":"#indexer-mapped-type-declaration"},{"include":"#field-declaration"},{"include":"#type-annotation"},{"begin":"\\\\.\\\\.\\\\.","beginCaptures":{"0":{"name":"keyword.operator.spread.ts"}},"end":"(?=\\\\}|;|,|$)|(?<=\\\\})","patterns":[{"include":"#type"}]},{"include":"#punctuation-comma"},{"include":"#punctuation-semicolon"},{"include":"#type"}]},"type-operators":{"patterns":[{"include":"#typeof-operator"},{"include":"#type-infer"},{"begin":"([&|])(?=\\\\s*\\\\{)","beginCaptures":{"0":{"name":"keyword.operator.type.ts"}},"end":"(?<=\\\\})","patterns":[{"include":"#type-object"}]},{"begin":"[&|]","beginCaptures":{"0":{"name":"keyword.operator.type.ts"}},"end":"(?=\\\\S)"},{"match":"(?)","endCaptures":{"1":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#comment"},{"match":"(?)","name":"keyword.operator.assignment.ts"}]},"type-paren-or-function-parameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"name":"meta.type.paren.cover.ts","patterns":[{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"keyword.operator.rest.ts"},"3":{"name":"entity.name.function.ts variable.language.this.ts"},"4":{"name":"entity.name.function.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:(?)))))))|(:\\\\s*(?]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?[\\\\(]\\\\s*((([\\\\{\\\\[]\\\\s*)?$)|((\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})\\\\s*((:\\\\s*\\\\{?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*)))|((\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])\\\\s*((:\\\\s*\\\\[?$)|((\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+\\\\s*)?=\\\\s*))))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"keyword.operator.rest.ts"},"3":{"name":"variable.parameter.ts variable.language.this.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:(?:&|{\\\\?]|(extends\\\\s+)|$|;|^\\\\s*$|(?:^\\\\s*(?:abstract|async|(?:\\\\bawait\\\\s+(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)\\\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[_$[:alpha:]])\\\\b)|var|while)\\\\b))","patterns":[{"include":"#type-arguments"},{"include":"#expression"}]},"undefined-literal":{"match":"(?)))|((async\\\\s*)?(((<\\\\s*$)|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<]|\\\\<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{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[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\\'\\\\\\"\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","beginCaptures":{"1":{"name":"meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts"}},"end":"(?=$|^|[;,=}]|((?)))|((async\\\\s*)?(((<\\\\s*$)|((<\\\\s*(((const\\\\s+)?[_$[:alpha:]])|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(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}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\]))([^=<>]|=[^<])*\\\\>)*\\\\>)*>\\\\s*)?\\\\(\\\\s*(\\\\/\\\\*([^\\\\*]|(\\\\*[^\\\\/]))*\\\\*\\\\/\\\\s*)*(([_$[:alpha:]]|(\\\\{([^\\\\{\\\\}]|(\\\\{([^\\\\{\\\\}]|\\\\{[^\\\\{\\\\}]*\\\\})*\\\\}))*\\\\})|(\\\\[([^\\\\[\\\\]]|(\\\\[([^\\\\[\\\\]]|\\\\[[^\\\\[\\\\]]*\\\\])*\\\\]))*\\\\])|(\\\\.\\\\.\\\\.\\\\s*[_$[:alpha:]]))([^()\\\\\'\\\\\\"\\\\`]|(\\\\(([^\\\\(\\\\)]|(\\\\(([^\\\\(\\\\)]|\\\\([^\\\\(\\\\)]*\\\\))*\\\\)))*\\\\))|(\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\.)*\\\\\')|(\\\\\\"([^\\\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\\\")|(\\\\`([^\\\\`\\\\\\\\]|\\\\\\\\.)*\\\\`))*)?\\\\)(\\\\s*:\\\\s*([^<>\\\\(\\\\)\\\\{\\\\}]|\\\\<([^<>]|\\\\<([^<>]|\\\\<[^<>]+\\\\>)+\\\\>)+\\\\>|\\\\([^\\\\(\\\\)]+\\\\)|\\\\{[^\\\\{\\\\}]+\\\\})+)?\\\\s*=>))))))","beginCaptures":{"1":{"name":"meta.definition.variable.ts entity.name.function.ts"},"2":{"name":"keyword.operator.definiteassignment.ts"}},"end":"(?=$|^|[;,=}]|((?\\\\s*$)","beginCaptures":{"1":{"name":"keyword.operator.assignment.ts"}},"end":"(?=$|^|[,);}\\\\]]|((?!]"),k=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),x=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),m=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),I=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),R=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),a=["class","module","sub","enum","select","while","if","function","get","set","property","try","structure","synclock","using","with"],f=["else","elseif","case","catch","finally"],h=["next","loop"],s=["and","andalso","or","orelse","xor","in","not","is","isnot","like"],O=o(s),v=["#const","#else","#elseif","#end","#if","#region","addhandler","addressof","alias","as","byref","byval","cbool","cbyte","cchar","cdate","cdbl","cdec","cint","clng","cobj","compare","const","continue","csbyte","cshort","csng","cstr","cuint","culng","cushort","declare","default","delegate","dim","directcast","each","erase","error","event","exit","explicit","false","for","friend","gettype","goto","handles","implements","imports","infer","inherits","interface","isfalse","istrue","lib","me","mod","mustinherit","mustoverride","my","mybase","myclass","namespace","narrowing","new","nothing","notinheritable","notoverridable","of","off","on","operator","option","optional","out","overloads","overridable","overrides","paramarray","partial","private","protected","public","raiseevent","readonly","redim","removehandler","resume","return","shadows","shared","static","step","stop","strict","then","throw","to","true","trycast","typeof","until","until","when","widening","withevents","writeonly"],p=["object","boolean","char","string","byte","sbyte","short","ushort","int16","uint16","integer","uinteger","int32","uint32","long","ulong","int64","uint64","decimal","single","double","float","date","datetime","intptr","uintptr"],z=o(v),E=o(p),C='"',S=o(a),g=o(f),y=o(h),w=o(["end"]),T=o(["do"]);function l(e,n){n.currentIndent++}function c(e,n){n.currentIndent--}function d(e,n){if(e.eatSpace())return null;var i=e.peek();if(i==="'")return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var r=!1;if((e.match(/^\d*\.\d+F?/i)||e.match(/^\d+\.\d*F?/)||e.match(/^\.\d+F?/))&&(r=!0),r)return e.eat(/J/i),"number";var t=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?t=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),t=!0):e.match(/^0(?![\dx])/i)&&(t=!0),t)return e.eat(/L/i),"number"}return e.match(C)?(n.tokenize=F(e.current()),n.tokenize(e,n)):e.match(I)||e.match(m)?null:e.match(x)||e.match(b)||e.match(O)?"operator":e.match(k)?null:e.match(T)?(l(e,n),n.doInCurrentLine=!0,"keyword"):e.match(S)?(n.doInCurrentLine?n.doInCurrentLine=!1:l(e,n),"keyword"):e.match(g)?"keyword":e.match(w)?(c(e,n),c(e,n),"keyword"):e.match(y)?(c(e,n),"keyword"):e.match(E)||e.match(z)?"keyword":e.match(R)?"variable":(e.next(),u)}function F(e){var n=e.length==1,i="string";return function(r,t){for(;!r.eol();){if(r.eatWhile(/[^'"]/),r.match(e))return t.tokenize=d,i;r.eat(/['"]/)}return n&&(t.tokenize=d),i}}function K(e,n){var i=n.tokenize(e,n),r=e.current();if(r===".")return i=n.tokenize(e,n),i==="variable"?"variable":u;var t="[({".indexOf(r);return t!==-1&&l(e,n),t="])}".indexOf(r),t!==-1&&c(e,n)?u:i}const L={name:"vb",startState:function(){return{tokenize:d,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,n){e.sol()&&(n.currentIndent+=n.nextLineIndent,n.nextLineIndent=0,n.doInCurrentLine=0);var i=K(e,n);return n.lastToken={style:i,content:e.current()},i},indent:function(e,n,i){var r=n.replace(/^\s+|\s+$/g,"");return r.match(y)||r.match(w)||r.match(g)?i.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*i.unit},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:"'"},autocomplete:a.concat(f).concat(h).concat(s).concat(v).concat(p)}};export{L as vb}; diff --git a/pkg/cli/webapp/dist/assets/vbscript-BuJXcnF6.js b/pkg/cli/webapp/dist/assets/vbscript-BuJXcnF6.js new file mode 100644 index 0000000..f10f7a0 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/vbscript-BuJXcnF6.js @@ -0,0 +1 @@ +function p(h){var v="error";function i(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var y=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),g=new RegExp("^((<>)|(<=)|(>=))"),m=new RegExp("^[\\.,]"),w=new RegExp("^[\\(\\)]"),k=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),x=["class","sub","select","while","if","function","property","with","for"],C=["else","elseif","case"],I=["next","loop","wend"],S=i(["and","or","not","xor","is","mod","eqv","imp"]),O=["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"],D=["true","false","nothing","empty","null"],R=["abs","array","asc","atn","cbool","cbyte","ccur","cdate","cdbl","chr","cint","clng","cos","csng","cstr","date","dateadd","datediff","datepart","dateserial","datevalue","day","escape","eval","execute","exp","filter","formatcurrency","formatdatetime","formatnumber","formatpercent","getlocale","getobject","getref","hex","hour","inputbox","instr","instrrev","int","fix","isarray","isdate","isempty","isnull","isnumeric","isobject","join","lbound","lcase","left","len","loadpicture","log","ltrim","rtrim","trim","maths","mid","minute","month","monthname","msgbox","now","oct","replace","rgb","right","rnd","round","scriptengine","scriptenginebuildversion","scriptenginemajorversion","scriptengineminorversion","second","setlocale","sgn","sin","space","split","sqr","strcomp","string","strreverse","tan","time","timer","timeserial","timevalue","typename","ubound","ucase","unescape","vartype","weekday","weekdayname","year"],E=["vbBlack","vbRed","vbGreen","vbYellow","vbBlue","vbMagenta","vbCyan","vbWhite","vbBinaryCompare","vbTextCompare","vbSunday","vbMonday","vbTuesday","vbWednesday","vbThursday","vbFriday","vbSaturday","vbUseSystemDayOfWeek","vbFirstJan1","vbFirstFourDays","vbFirstFullWeek","vbGeneralDate","vbLongDate","vbShortDate","vbLongTime","vbShortTime","vbObjectError","vbOKOnly","vbOKCancel","vbAbortRetryIgnore","vbYesNoCancel","vbYesNo","vbRetryCancel","vbCritical","vbQuestion","vbExclamation","vbInformation","vbDefaultButton1","vbDefaultButton2","vbDefaultButton3","vbDefaultButton4","vbApplicationModal","vbSystemModal","vbOK","vbCancel","vbAbort","vbRetry","vbIgnore","vbYes","vbNo","vbCr","VbCrLf","vbFormFeed","vbLf","vbNewLine","vbNullChar","vbNullString","vbTab","vbVerticalTab","vbUseDefault","vbTrue","vbFalse","vbEmpty","vbNull","vbInteger","vbLong","vbSingle","vbDouble","vbCurrency","vbDate","vbString","vbObject","vbError","vbBoolean","vbVariant","vbDataObject","vbDecimal","vbByte","vbArray"],a=["WScript","err","debug","RegExp"],L=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],T=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"],j=["server","response","request","session","application"],F=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],B=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],c=T.concat(L);a=a.concat(E),h.isASP&&(a=a.concat(j),c=c.concat(B,F));var W=i(O),z=i(D),A=i(R),K=i(a),N=i(c),M='"',P=i(x),b=i(C),d=i(I),s=i(["end"]),q=i(["do"]),V=i(["on error resume next","exit"]),Y=i(["rem"]);function f(e,n){n.currentIndent++}function u(e,n){n.currentIndent--}function l(e,n){if(e.eatSpace())return null;var r=e.peek();if(r==="'"||e.match(Y))return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var t=!1;if((e.match(/^\d*\.\d+/i)||e.match(/^\d+\.\d*/)||e.match(/^\.\d+/))&&(t=!0),t)return e.eat(/J/i),"number";var o=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?o=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),o=!0):e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}return e.match(M)?(n.tokenize=_(e.current()),n.tokenize(e,n)):e.match(g)||e.match(y)||e.match(S)?"operator":e.match(m)?null:e.match(w)?"bracket":e.match(V)?(n.doInCurrentLine=!0,"keyword"):e.match(q)?(f(e,n),n.doInCurrentLine=!0,"keyword"):e.match(P)?(n.doInCurrentLine?n.doInCurrentLine=!1:f(e,n),"keyword"):e.match(b)?"keyword":e.match(s)?(u(e,n),u(e,n),"keyword"):e.match(d)?(n.doInCurrentLine?n.doInCurrentLine=!1:u(e,n),"keyword"):e.match(W)?"keyword":e.match(z)?"atom":e.match(N)?"variableName.special":e.match(A)||e.match(K)?"builtin":e.match(k)?"variable":(e.next(),v)}function _(e){var n=e.length==1,r="string";return function(t,o){for(;!t.eol();){if(t.eatWhile(/[^'"]/),t.match(e))return o.tokenize=l,r;t.eat(/['"]/)}return n&&(o.tokenize=l),r}}function H(e,n){var r=n.tokenize(e,n),t=e.current();return t==="."?(r=n.tokenize(e,n),t=e.current(),r&&(r.substr(0,8)==="variable"||r==="builtin"||r==="keyword")?((r==="builtin"||r==="keyword")&&(r="variable"),c.indexOf(t.substr(1))>-1&&(r="keyword"),r):v):r}return{name:"vbscript",startState:function(){return{tokenize:l,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(e,n){e.sol()&&(n.currentIndent+=n.nextLineIndent,n.nextLineIndent=0,n.doInCurrentLine=0);var r=H(e,n);return n.lastToken={style:r,content:e.current()},r===null&&(r=null),r},indent:function(e,n,r){var t=n.replace(/^\s+|\s+$/g,"");return t.match(d)||t.match(s)||t.match(b)?r.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*r.unit}}}const J=p({}),U=p({isASP:!0});export{J as vbScript,U as vbScriptASP}; diff --git a/pkg/cli/webapp/dist/assets/velocity-D8B20fx6.js b/pkg/cli/webapp/dist/assets/velocity-D8B20fx6.js new file mode 100644 index 0000000..9f87ece --- /dev/null +++ b/pkg/cli/webapp/dist/assets/velocity-D8B20fx6.js @@ -0,0 +1 @@ +function u(n){for(var e={},i=n.split(" "),r=0;r!?:\/|]/;function o(n,e,i){return e.tokenize=i,i(n,e)}function t(n,e){var i=e.beforeParams;e.beforeParams=!1;var r=n.next();if(r=="'"&&!e.inString&&e.inParams)return e.lastTokenWasBuiltin=!1,o(n,e,p(r));if(r=='"'){if(e.lastTokenWasBuiltin=!1,e.inString)return e.inString=!1,"string";if(e.inParams)return o(n,e,p(r))}else{if(/[\[\]{}\(\),;\.]/.test(r))return r=="("&&i?e.inParams=!0:r==")"&&(e.inParams=!1,e.lastTokenWasBuiltin=!0),null;if(/\d/.test(r))return e.lastTokenWasBuiltin=!1,n.eatWhile(/[\w\.]/),"number";if(r=="#"&&n.eat("*"))return e.lastTokenWasBuiltin=!1,o(n,e,h);if(r=="#"&&n.match(/ *\[ *\[/))return e.lastTokenWasBuiltin=!1,o(n,e,b);if(r=="#"&&n.eat("#"))return e.lastTokenWasBuiltin=!1,n.skipToEnd(),"comment";if(r=="$")return n.eat("!"),n.eatWhile(/[\w\d\$_\.{}-]/),c&&c.propertyIsEnumerable(n.current())?"keyword":(e.lastTokenWasBuiltin=!0,e.beforeParams=!0,"builtin");if(k.test(r))return e.lastTokenWasBuiltin=!1,n.eatWhile(k),"operator";n.eatWhile(/[\w\$_{}@]/);var l=n.current();return s&&s.propertyIsEnumerable(l)?"keyword":a&&a.propertyIsEnumerable(l)||n.current().match(/^#@?[a-z0-9_]+ *$/i)&&n.peek()=="("&&!(a&&a.propertyIsEnumerable(l.toLowerCase()))?(e.beforeParams=!0,e.lastTokenWasBuiltin=!1,"keyword"):e.inString?(e.lastTokenWasBuiltin=!1,"string"):n.pos>l.length&&n.string.charAt(n.pos-l.length-1)=="."&&e.lastTokenWasBuiltin?"builtin":(e.lastTokenWasBuiltin=!1,null)}}function p(n){return function(e,i){for(var r=!1,l,f=!1;(l=e.next())!=null;){if(l==n&&!r){f=!0;break}if(n=='"'&&e.peek()=="$"&&!r){i.inString=!0,f=!0;break}r=!r&&l=="\\"}return f&&(i.tokenize=t),"string"}}function h(n,e){for(var i=!1,r;r=n.next();){if(r=="#"&&i){e.tokenize=t;break}i=r=="*"}return"comment"}function b(n,e){for(var i=0,r;r=n.next();){if(r=="#"&&i==2){e.tokenize=t;break}r=="]"?i++:r!=" "&&(i=0)}return"meta"}const W={name:"velocity",startState:function(){return{tokenize:t,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(n,e){return n.eatSpace()?null:e.tokenize(n,e)},languageData:{commentTokens:{line:"##",block:{open:"#*",close:"*#"}}}};export{W as velocity}; diff --git a/pkg/cli/webapp/dist/assets/verilog-C6RDOZhf.js b/pkg/cli/webapp/dist/assets/verilog-C6RDOZhf.js new file mode 100644 index 0000000..2a1290d --- /dev/null +++ b/pkg/cli/webapp/dist/assets/verilog-C6RDOZhf.js @@ -0,0 +1 @@ +function A(i){var o=i.statementIndentUnit,u=i.dontAlignCalls,c=i.noIndentKeywords||[],s=i.multiLineStrings,a=i.hooks||{};function g(e){for(var n={},t=e.split(" "),r=0;r=0)return r}var l=e.context,y=n&&n.charAt(0);l.type=="statement"&&y=="}"&&(l=l.prev);var x=!1,$=n.match(M);return $&&(x=N($[0],l.type)),l.type=="statement"?l.indented+(y=="{"?0:o||t.unit):U.test(l.type)&&l.align&&!u?l.column+(x?0:1):l.type==")"&&!x?l.indented+(o||t.unit):l.indented+(x?0:t.unit)},languageData:{indentOnInput:P(),commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}}}const J=A({});var z={"|":"link",">":"property",$:"variable",$$:"variable","?$":"qualifier","?*":"qualifier","-":"contentSeparator","/":"property","/-":"property","@":"variableName.special","@-":"variableName.special","@++":"variableName.special","@+=":"variableName.special","@+=-":"variableName.special","@--":"variableName.special","@-=":"variableName.special","%+":"tag","%-":"tag","%":"tag",">>":"tag","<<":"tag","<>":"tag","#":"tag","^":"attribute","^^":"attribute","^!":"attribute","*":"variable","**":"variable","\\":"keyword",'"':"comment"},E={"/":"beh-hier",">":"beh-hier","-":"phys-hier","|":"pipe","?":"when","@":"stage","\\":"keyword"},S=3,q=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/,F=/^[! ] */,G=/^\/[\/\*]/;const Q=A({hooks:{electricInput:!1,token:function(i,o){var u=void 0,c;if(i.sol()&&!o.tlvInBlockComment){i.peek()=="\\"&&(u="def",i.skipToEnd(),i.string.match(/\\SV/)?o.tlvCodeActive=!1:i.string.match(/\\TLV/)&&(o.tlvCodeActive=!0)),o.tlvCodeActive&&i.pos==0&&o.indented==0&&(c=i.match(F,!1))&&(o.indented=c[0].length);var s=o.indented,a=s/S;if(a<=o.tlvIndentationStyle.length){var g=i.string.length==s,h=a*S;if(h0||(o.tlvIndentationStyle[a]=E[k],a++))}if(!g)for(;o.tlvIndentationStyle.length>a;)o.tlvIndentationStyle.pop()}o.tlvNextIndent=s}if(o.tlvCodeActive){var c;if(u===void 0)if(o.tlvInBlockComment)i.match(/^.*?\*\//)?o.tlvInBlockComment=!1:i.skipToEnd(),u="comment";else if((c=i.match(G))&&!o.tlvInBlockComment)c[0]=="//"?i.skipToEnd():o.tlvInBlockComment=!0,u="comment";else if(c=i.match(q)){var b=c[1],I=c[2];z.hasOwnProperty(b)&&(I.length>0||i.eol())?u=z[b]:i.backUp(i.current().length-1)}else i.match(/^\t+/)?u="invalid":i.match(/^[\[\]{}\(\);\:]+/)?u="meta":(c=i.match(/^[mM]4([\+_])?[\w\d_]*/))?u=c[1]=="+"?"keyword.special":"keyword":i.match(/^ +/)?i.eol()&&(u="error"):i.match(/^[\w\d_]+/)?u="number":i.next()}else i.match(/^[mM]4([\w\d_]*)/)&&(u="keyword");return u},indent:function(i){return i.tlvCodeActive==!0?i.tlvNextIndent:-1},startState:function(i){i.tlvIndentationStyle=[],i.tlvCodeActive=!0,i.tlvNextIndent=-1,i.tlvInBlockComment=!1}}});export{Q as tlv,J as verilog}; diff --git a/pkg/cli/webapp/dist/assets/vhdl-lSbBsy5d.js b/pkg/cli/webapp/dist/assets/vhdl-lSbBsy5d.js new file mode 100644 index 0000000..3b344d6 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/vhdl-lSbBsy5d.js @@ -0,0 +1 @@ +function f(e){for(var t={},n=e.split(","),r=0;rA.charCodeAt(0));const g=Q,E=async A=>WebAssembly.instantiate(g,A).then(B=>B.instance.exports);export{E as default,E as getWasmInstance,g as wasmBinary}; diff --git a/pkg/cli/webapp/dist/assets/webidl-ZXfAyPTL.js b/pkg/cli/webapp/dist/assets/webidl-ZXfAyPTL.js new file mode 100644 index 0000000..88c9e0c --- /dev/null +++ b/pkg/cli/webapp/dist/assets/webidl-ZXfAyPTL.js @@ -0,0 +1 @@ +function a(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var l=["Clamp","Constructor","EnforceRange","Exposed","ImplicitThis","Global","PrimaryGlobal","LegacyArrayClass","LegacyUnenumerableNamedProperties","LenientThis","NamedConstructor","NewObject","NoInterfaceObject","OverrideBuiltins","PutForwards","Replaceable","SameObject","TreatNonObjectAsNull","TreatNullAs","EmptyString","Unforgeable","Unscopeable"],u=a(l),o=["unsigned","short","long","unrestricted","float","double","boolean","byte","octet","Promise","ArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","Float32Array","Float64Array","ByteString","DOMString","USVString","sequence","object","RegExp","Error","DOMException","FrozenArray","any","void"],m=a(o),c=["attribute","callback","const","deleter","dictionary","enum","getter","implements","inherit","interface","iterable","legacycaller","maplike","partial","required","serializer","setlike","setter","static","stringifier","typedef","optional","readonly","or"],s=a(c),f=["true","false","Infinity","NaN","null"],y=a(f),d=["callback","dictionary","enum","interface"],p=a(d),b=["typedef"],v=a(b),A=/^[:<=>?]/,g=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,h=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,i=/^_?[A-Za-z][0-9A-Z_a-z-]*/,D=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,k=/^"[^"]*"/,E=/^\/\*.*?\*\//,C=/^\/\*.*/,w=/^.*?\*\//;function N(e,r){if(e.eatSpace())return null;if(r.inComment)return e.match(w)?(r.inComment=!1,"comment"):(e.skipToEnd(),"comment");if(e.match("//"))return e.skipToEnd(),"comment";if(e.match(E))return"comment";if(e.match(C))return r.inComment=!0,"comment";if(e.match(/^-?[0-9\.]/,!1)&&(e.match(g)||e.match(h)))return"number";if(e.match(k))return"string";if(r.startDef&&e.match(i))return"def";if(r.endDef&&e.match(D))return r.endDef=!1,"def";if(e.match(s))return"keyword";if(e.match(m)){var t=r.lastToken,n=(e.match(/^\s*(.+?)\b/,!1)||[])[1];return t===":"||t==="implements"||n==="implements"||n==="="?"builtin":"type"}return e.match(u)?"builtin":e.match(y)?"atom":e.match(i)?"variable":e.match(A)?"operator":(e.next(),null)}const S={name:"webidl",startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(e,r){var t=N(e,r);if(t){var n=e.current();r.lastToken=n,t==="keyword"?(r.startDef=p.test(n),r.endDef=r.endDef||v.test(n)):r.startDef=!1}return t},languageData:{autocomplete:l.concat(o).concat(c).concat(f)}};export{S as webIDL}; diff --git a/pkg/cli/webapp/dist/assets/xml-e3z08dGr.js b/pkg/cli/webapp/dist/assets/xml-e3z08dGr.js new file mode 100644 index 0000000..c36acb4 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/xml-e3z08dGr.js @@ -0,0 +1 @@ +import e from"./java-xI-RfyKK.js";const n=Object.freeze(JSON.parse(`{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-_a-zA-Z0-9]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([a-zA-Z-]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"()","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-_a-zA-Z0-9]+)(:))?([-_a-zA-Z0-9:]+))(?=(\\\\s[^>]*)?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)()","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"()","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"()","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(\\\\])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:a-zA-Z_][:a-zA-Z0-9_.-]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-\\\\w.]+)((:)))?([-\\\\w.:]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}`)),a=[...e,n];export{a as default}; diff --git a/pkg/cli/webapp/dist/assets/xquery-DzFWVndE.js b/pkg/cli/webapp/dist/assets/xquery-DzFWVndE.js new file mode 100644 index 0000000..0ffb311 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/xquery-DzFWVndE.js @@ -0,0 +1 @@ +var d=(function(){function e(w){return{type:w,style:"keyword"}}for(var n=e("operator"),t={type:"atom",style:"atom"},i={type:"punctuation",style:null},o={type:"axis_specifier",style:"qualifier"},l={",":i},p=["after","all","allowing","ancestor","ancestor-or-self","any","array","as","ascending","at","attribute","base-uri","before","boundary-space","by","case","cast","castable","catch","child","collation","comment","construction","contains","content","context","copy","copy-namespaces","count","decimal-format","declare","default","delete","descendant","descendant-or-self","descending","diacritics","different","distance","document","document-node","element","else","empty","empty-sequence","encoding","end","entire","every","exactly","except","external","first","following","following-sibling","for","from","ftand","ftnot","ft-option","ftor","function","fuzzy","greatest","group","if","import","in","inherit","insensitive","insert","instance","intersect","into","invoke","is","item","language","last","lax","least","let","levels","lowercase","map","modify","module","most","namespace","next","no","node","nodes","no-inherit","no-preserve","not","occurs","of","only","option","order","ordered","ordering","paragraph","paragraphs","parent","phrase","preceding","preceding-sibling","preserve","previous","processing-instruction","relationship","rename","replace","return","revalidation","same","satisfies","schema","schema-attribute","schema-element","score","self","sensitive","sentence","sentences","sequence","skip","sliding","some","stable","start","stemming","stop","strict","strip","switch","text","then","thesaurus","times","to","transform","treat","try","tumbling","type","typeswitch","union","unordered","update","updating","uppercase","using","validate","value","variable","version","weight","when","where","wildcards","window","with","without","word","words","xquery"],r=0,a=p.length;r",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"],r=0,a=f.length;r\"\'\/?]/);)p+=r;return x(e,n,S(p,l))}else{if(t=="{")return s(n,{type:"codeblock"}),null;if(t=="}")return c(n),null;if(b(n))return t==">"?"tag":t=="/"&&e.eat(">")?(c(n),"tag"):"variable";if(/\d/.test(t))return e.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if(t==="("&&e.eat(":"))return s(n,{type:"comment"}),x(e,n,z);if(!o&&(t==='"'||t==="'"))return m(e,n,t);if(t==="$")return x(e,n,T);if(t===":"&&e.eat("="))return"keyword";if(t==="(")return s(n,{type:"paren"}),null;if(t===")")return c(n),null;if(t==="[")return s(n,{type:"bracket"}),null;if(t==="]")return c(n),null;var a=d.propertyIsEnumerable(t)&&d[t];if(o&&t==='"')for(;e.next()!=='"';);if(o&&t==="'")for(;e.next()!=="'";);a||e.eatWhile(/[\w\$_-]/);var g=e.eat(":");!e.eat(":")&&g&&e.eatWhile(/[\w\$_-]/),e.match(/^[ \t]*\(/,!1)&&(i=!0);var f=e.current();return a=d.propertyIsEnumerable(f)&&d[f],i&&!a&&(a={type:"function_call",style:"def"}),D(n)?(c(n),"variable"):((f=="element"||f=="attribute"||a.type=="axis_specifier")&&s(n,{type:"xmlconstructor"}),a?a.style:"variable")}}function z(e,n){for(var t=!1,i=!1,o=0,l;l=e.next();){if(l==")"&&t)if(o>0)o--;else{c(n);break}else l==":"&&i&&o++;t=l==":",i=l=="("}return"comment"}function I(e,n){return function(t,i){for(var o;o=t.next();)if(o==e){c(i),n&&(i.tokenize=n);break}else if(t.match("{",!1)&&h(i))return s(i,{type:"codeblock"}),i.tokenize=u,"string";return"string"}}function m(e,n,t,i){let o=I(t,i);return s(n,{type:"string",name:t,tokenize:o}),x(e,n,o)}function T(e,n){var t=/[\w\$_-]/;if(e.eat('"')){for(;e.next()!=='"';);e.eat(":")}else e.eatWhile(t),e.match(":=",!1)||e.eat(":");return e.eatWhile(t),n.tokenize=u,"variable"}function S(e,n){return function(t,i){if(t.eatSpace(),n&&t.eat(">"))return c(i),i.tokenize=u,"tag";if(t.eat("/")||s(i,{type:"tag",name:e,tokenize:u}),t.eat(">"))i.tokenize=u;else return i.tokenize=y,"tag";return"tag"}}function y(e,n){var t=e.next();return t=="/"&&e.eat(">")?(h(n)&&c(n),b(n)&&c(n),"tag"):t==">"?(h(n)&&c(n),"tag"):t=="="?null:t=='"'||t=="'"?m(e,n,t,y):(h(n)||s(n,{type:"attribute",tokenize:y}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace(),(e.match(">",!1)||e.match("/",!1))&&(c(n),n.tokenize=u),"attribute")}function N(e,n){for(var t;t=e.next();)if(t=="-"&&e.match("->",!0))return n.tokenize=u,"comment"}function E(e,n){for(var t;t=e.next();)if(t=="]"&&e.match("]",!0))return n.tokenize=u,"comment"}function A(e,n){for(var t;t=e.next();)if(t=="?"&&e.match(">",!0))return n.tokenize=u,"processingInstruction"}function b(e){return k(e,"tag")}function h(e){return k(e,"attribute")}function D(e){return k(e,"xmlconstructor")}function _(e){return e.current()==='"'?e.match(/^[^\"]+\"\:/,!1):e.current()==="'"?e.match(/^[^\"]+\'\:/,!1):!1}function k(e,n){return e.stack.length&&e.stack[e.stack.length-1].type==n}function s(e,n){e.stack.push(n)}function c(e){e.stack.pop();var n=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=n||u}const C={name:"xquery",startState:function(){return{tokenize:u,cc:[],stack:[]}},token:function(e,n){if(e.eatSpace())return null;var t=n.tokenize(e,n);return t},languageData:{commentTokens:{block:{open:"(:",close:":)"}}}};export{C as xQuery}; diff --git a/pkg/cli/webapp/dist/assets/yacas-BJ4BC0dw.js b/pkg/cli/webapp/dist/assets/yacas-BJ4BC0dw.js new file mode 100644 index 0000000..4ea3241 --- /dev/null +++ b/pkg/cli/webapp/dist/assets/yacas-BJ4BC0dw.js @@ -0,0 +1 @@ +function t(e){for(var n={},r=e.split(" "),o=0;o|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)?"operator":"error"}function v(e,n){for(var r,o=!1,i=!1;(r=e.next())!=null;){if(r==='"'&&!i){o=!0;break}i=!i&&r==="\\"}return o&&!i&&(n.tokenize=l),"string"}function h(e,n){for(var r,o;(o=e.next())!=null;){if(r==="*"&&o==="/"){n.tokenize=l;break}r=o}return"comment"}function c(e){var n=null;return e.scopes.length>0&&(n=e.scopes[e.scopes.length-1]),n}const b={name:"yacas",startState:function(){return{tokenize:l,scopes:[]}},token:function(e,n){return e.eatSpace()?null:n.tokenize(e,n)},indent:function(e,n,r){if(e.tokenize!==l&&e.tokenize!==null)return null;var o=0;return(n==="]"||n==="];"||n==="}"||n==="};"||n===");")&&(o=-1),(e.scopes.length+o)*r.unit},languageData:{electricInput:/[{}\[\]()\;]/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{b as yacas}; diff --git a/pkg/cli/webapp/dist/assets/yaml-CVw76BM1.js b/pkg/cli/webapp/dist/assets/yaml-CVw76BM1.js new file mode 100644 index 0000000..dcab59a --- /dev/null +++ b/pkg/cli/webapp/dist/assets/yaml-CVw76BM1.js @@ -0,0 +1 @@ +const e=Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^\\\\s[-?:,\\\\[\\\\]{}#&*!|>'\\"%@\`]]|[?:-]\\\\S)([^\\\\s:]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+\\\\#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^\\\\s[-?:,\\\\[\\\\]{}#&*!|>'\\"%@\`]]|[?:-]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+\\\\#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^([ ]+)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:(^[ \\\\t]*)|[ \\\\t]+)(?=#\\\\p{Print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[ \\\\t]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[ \\\\t]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[ \\\\t]+((?:!(?:[0-9A-Za-z\\\\-]*!)?))(?:[ \\\\t]+(!(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\\\-#;/?:@&=+$,_.!~*'()\\\\[\\\\]])*|(?![,!\\\\[\\\\]{}])(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\\\-#;/?:@&=+$,_.!~*'()\\\\[\\\\]])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[ \\\\t]+(\\\\w+)(?:[ \\\\t]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^\\\\s\\\\[\\\\]/{/},]+)([^\\\\s\\\\]},]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[},\\\\]])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[\\\\[\\\\]{},])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[},\\\\]])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^\\\\s[-?:,\\\\[\\\\]{}#&*!|>'\\"%@\`]]|[?:-][^\\\\s[\\\\[\\\\]{},]])([^\\\\s:[\\\\[\\\\]{},]]|:[^\\\\s[\\\\[\\\\]{},]]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+\\\\#|\\\\s*:(\\\\s|$)|\\\\s*:[\\\\[\\\\]{},]|\\\\s*[\\\\[\\\\]{},])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^\\\\s[-?:,\\\\[\\\\]{}#&*!|>'\\"%@\`]]|[?:-][^\\\\s[\\\\[\\\\]{},]]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+\\\\#|\\\\s*:(\\\\s|$)|\\\\s*:[\\\\[\\\\]{},]|\\\\s*[\\\\[\\\\]{},])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[\\\\[\\\\]{},])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[},\\\\]])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([0abtnvfre \\"/\\\\\\\\N_Lp]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^\\\\s[-?:,\\\\[\\\\]{}#&*!|>'\\"%@\`]]|[?:-][^\\\\s[\\\\[\\\\]{},]]","end":"(?=\\\\s*$|\\\\s+\\\\#|\\\\s*:(\\\\s|$)|\\\\s*:[\\\\[\\\\]{},]|\\\\s*[\\\\[\\\\]{},])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|(y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|((?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[0-9a-fA-F_]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+))|((?:[-+]?(?:[0-9][0-9_]*)?\\\\.[0-9.]*(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN)))|((?:\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[ \\\\t]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:(?:[ \\\\t]*)Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?))|(=)|(<<))(?:(?=\\\\s*$|\\\\s+\\\\#|\\\\s*:(\\\\s|$)|\\\\s*:[\\\\[\\\\]{},]|\\\\s*[\\\\[\\\\]{},]))"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^\\\\s[-?:,\\\\[\\\\]{}#&*!|>'\\"%@\`]]|[?:-]\\\\S","end":"(?=\\\\s*$|\\\\s+\\\\#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|(y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|((?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[0-9a-fA-F_]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+))|((?:[-+]?(?:[0-9][0-9_]*)?\\\\.[0-9.]*(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN)))|((?:\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[ \\\\t]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:(?:[ \\\\t]*)Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?))|(=)|(<<))(?:(?=\\\\s*$|\\\\s+\\\\#|\\\\s*:(\\\\s|$)))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"\\\\]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![},\\\\]])","end":"(?=[},\\\\]])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=!|&)","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^\\\\s\\\\[\\\\]/{/},]+)(\\\\S+)?"},{"match":"\\\\G(?:!<(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\\\-#;/?:@&=+$,_.!~*'()\\\\[\\\\]])+>|(?:!(?:[0-9A-Za-z\\\\-]*!)?)(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\\\-#;/?:@&=+$_.~*'()])+|!)(?=\\\\ |\\\\t|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`)),n=[e];export{n as default}; diff --git a/pkg/cli/webapp/dist/assets/z80-Hz9HOZM7.js b/pkg/cli/webapp/dist/assets/z80-Hz9HOZM7.js new file mode 100644 index 0000000..c0ab5ea --- /dev/null +++ b/pkg/cli/webapp/dist/assets/z80-Hz9HOZM7.js @@ -0,0 +1 @@ +function o(t){var n,l;t?(n=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,l=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(n=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,l=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var u=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,d=/^(n?[zc]|p[oe]?|m)\b/i,f=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,c=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{name:"z80",startState:function(){return{context:0}},token:function(e,i){if(e.column()||(i.context=0),e.eatSpace())return null;var r;if(e.eatWhile(/\w/))if(t&&e.eat(".")&&e.eatWhile(/\w/),r=e.current(),e.indentation()){if((i.context==1||i.context==4)&&u.test(r))return i.context=4,"variable";if(i.context==2&&d.test(r))return i.context=4,"variableName.special";if(n.test(r))return i.context=1,"keyword";if(l.test(r))return i.context=2,"keyword";if(i.context==4&&c.test(r))return"number";if(f.test(r))return"error"}else return e.match(c)?"number":null;else{if(e.eat(";"))return e.skipToEnd(),"comment";if(e.eat('"')){for(;(r=e.next())&&r!='"';)r=="\\"&&e.next();return"string"}else if(e.eat("'")){if(e.match(/\\?.'/))return"number"}else if(e.eat(".")||e.sol()&&e.eat("#")){if(i.context=5,e.eatWhile(/\w/))return"def"}else if(e.eat("$")){if(e.eatWhile(/[\da-f]/i))return"number"}else if(e.eat("%")){if(e.eatWhile(/[01]/))return"number"}else e.next()}return null}}}const a=o(!1),s=o(!0);export{s as ez80,a as z80}; diff --git a/pkg/cli/webapp/dist/index.html b/pkg/cli/webapp/dist/index.html new file mode 100644 index 0000000..ff4c3d1 --- /dev/null +++ b/pkg/cli/webapp/dist/index.html @@ -0,0 +1,13 @@ + + + + + + Captain + + + + +
    + + diff --git a/pkg/cli/webapp/package.json b/pkg/cli/webapp/package.json new file mode 100644 index 0000000..95d4b9e --- /dev/null +++ b/pkg/cli/webapp/package.json @@ -0,0 +1,46 @@ +{ + "name": "captain-webapp", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@ai-sdk/react": "^3.0.201", + "@flanksource/clicky-ui": "link:../../../../clicky-ui/packages/ui", + "@radix-ui/react-compose-refs": "^1.1.2", + "@radix-ui/react-slot": "^1.1.1", + "@shikijs/langs": "^1.24.0", + "@shikijs/themes": "^1.24.0", + "@shikijs/transformers": "^1.24.0", + "@tanstack/react-query": "^5.80.7", + "ai": "^6.0.199", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "marked": "^15.0.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-rnd": "^10.5.3", + "shiki": "^1.24.0", + "streamdown": "^2.5.0", + "tailwind-merge": "^2.6.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.2.2", + "@types/react": "^19.2.17", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^5.0.4", + "tailwindcss": "^4.2.2", + "typescript": "~5.9.3", + "vite": "^7.1.7" + }, + "pnpm": { + "overrides": { + "@types/react": "19.2.17", + "@types/react-dom": "19.2.3" + } + } +} diff --git a/pkg/cli/webapp/pnpm-lock.yaml b/pkg/cli/webapp/pnpm-lock.yaml new file mode 100644 index 0000000..4badd60 --- /dev/null +++ b/pkg/cli/webapp/pnpm-lock.yaml @@ -0,0 +1,3760 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +overrides: + '@types/react': 19.2.17 + '@types/react-dom': 19.2.3 + +importers: + + .: + dependencies: + '@ai-sdk/react': + specifier: ^3.0.201 + version: 3.0.216(react@18.3.1)(zod@4.4.3) + '@flanksource/clicky-ui': + specifier: link:../../../../clicky-ui/packages/ui + version: link:../../../../clicky-ui/packages/ui + '@radix-ui/react-compose-refs': + specifier: ^1.1.2 + version: 1.1.3(@types/react@19.2.17)(react@18.3.1) + '@radix-ui/react-slot': + specifier: ^1.1.1 + version: 1.3.0(@types/react@19.2.17)(react@18.3.1) + '@shikijs/langs': + specifier: ^1.24.0 + version: 1.29.2 + '@shikijs/themes': + specifier: ^1.24.0 + version: 1.29.2 + '@shikijs/transformers': + specifier: ^1.24.0 + version: 1.29.2 + '@tanstack/react-query': + specifier: ^5.80.7 + version: 5.101.2(react@18.3.1) + ai: + specifier: ^6.0.199 + version: 6.0.214(zod@4.4.3) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + marked: + specifier: ^15.0.0 + version: 15.0.12 + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + react-rnd: + specifier: ^10.5.3 + version: 10.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + shiki: + specifier: ^1.24.0 + version: 1.29.2 + streamdown: + specifier: ^2.5.0 + version: 2.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + tailwind-merge: + specifier: ^2.6.0 + version: 2.6.1 + devDependencies: + '@tailwindcss/vite': + specifier: ^4.2.2 + version: 4.3.1(vite@7.3.6(jiti@2.7.0)(lightningcss@1.32.0)) + '@types/react': + specifier: 19.2.17 + version: 19.2.17 + '@types/react-dom': + specifier: 19.2.3 + version: 19.2.3(@types/react@19.2.17) + '@vitejs/plugin-react': + specifier: ^5.0.4 + version: 5.2.0(vite@7.3.6(jiti@2.7.0)(lightningcss@1.32.0)) + tailwindcss: + specifier: ^4.2.2 + version: 4.3.1 + typescript: + specifier: ~5.9.3 + version: 5.9.3 + vite: + specifier: ^7.1.7 + version: 7.3.6(jiti@2.7.0)(lightningcss@1.32.0) + +packages: + + '@ai-sdk/gateway@3.0.139': + resolution: {integrity: sha512-RFpxyh5j9g7ZMfKxhiwCcF7bGU872o3JvoiIqZbHOM4qkR4RCzeKJF+k+zHomcJYGeUabEbeMXTKNASzz4Toxw==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + + '@ai-sdk/provider-utils@4.0.33': + resolution: {integrity: sha512-nJ0bAfegMAIJtrzMJtbzer1cS3nb7c7DsyU1S4nrPm7ZU0Mn6SBBZv5IGZZGTbpWTJwqKTSPeZJTXalbAxt1BA==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + + '@ai-sdk/provider@3.0.12': + resolution: {integrity: sha512-sj9DWTJ2Ze0WR9qsiOPqoqzNx3OxL6iMxHImbhvoe9qOspekbzxNDMiJ4TIGfYHYh9w4OmBjz3prvqhzTi96+Q==} + engines: {node: '>=18'} + + '@ai-sdk/react@3.0.216': + resolution: {integrity: sha512-fDMKTHRCC3SI/2F3O9d8eYSN6MkV8Z9KY8Xp3asw87am70pGdno2xV2ZDjx/P+9I9ZIIQjPNTmId70MJVtFOWQ==} + engines: {node: '>=18'} + peerDependencies: + react: ^18 || ~19.0.1 || ~19.1.2 || ^19.2.1 + + '@antfu/install-pkg@1.1.0': + resolution: {integrity: sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==} + + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.7': + resolution: {integrity: sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.7': + resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.7': + resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-transform-react-jsx-self@7.29.7': + resolution: {integrity: sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.29.7': + resolution: {integrity: sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.7': + resolution: {integrity: sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.7': + resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} + engines: {node: '>=6.9.0'} + + '@braintree/sanitize-url@7.1.2': + resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==} + + '@chevrotain/types@11.1.2': + resolution: {integrity: sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==} + + '@esbuild/aix-ppc64@0.28.1': + resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.28.1': + resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.28.1': + resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.28.1': + resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.28.1': + resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.28.1': + resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.28.1': + resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.28.1': + resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.28.1': + resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.28.1': + resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.28.1': + resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.28.1': + resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.28.1': + resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.28.1': + resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.1': + resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.28.1': + resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.28.1': + resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.28.1': + resolution: {integrity: sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.28.1': + resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.28.1': + resolution: {integrity: sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.28.1': + resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.1': + resolution: {integrity: sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.28.1': + resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.28.1': + resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.28.1': + resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.28.1': + resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@iconify/utils@3.1.3': + resolution: {integrity: sha512-LPKOXPn/zV+zis1oOfGWogaXVpqUybF3ZS6SCZIsz8vg0ivVp9+fVqyYB7xq0aiST/VhUQYGO1qo6uoYSiEJqw==} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@mermaid-js/parser@1.2.0': + resolution: {integrity: sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==} + + '@opentelemetry/api@1.9.1': + resolution: {integrity: sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==} + engines: {node: '>=8.0.0'} + + '@radix-ui/react-compose-refs@1.1.3': + resolution: {integrity: sha512-rYOP8OMnuuPMQF1uhPVlGNcCDlkokKqGFE3JcxFViIkAXP7EvFWUliJAstrapypaBLJNHbZL6jGhbVDGTwmVhA==} + peerDependencies: + '@types/react': 19.2.17 + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-slot@1.3.0': + resolution: {integrity: sha512-MojKku4U/miO8Av4Dkb+ctMAQx7JmY96LmtDQlAarCRtd7rN52QCSzBF+XAvr5S6coSVj9HEPBgHAHKEJVk/WA==} + peerDependencies: + '@types/react': 19.2.17 + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@rolldown/pluginutils@1.0.0-rc.3': + resolution: {integrity: sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==} + + '@rollup/rollup-android-arm-eabi@4.62.2': + resolution: {integrity: sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.62.2': + resolution: {integrity: sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.62.2': + resolution: {integrity: sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.62.2': + resolution: {integrity: sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.62.2': + resolution: {integrity: sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.62.2': + resolution: {integrity: sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': + resolution: {integrity: sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm-musleabihf@4.62.2': + resolution: {integrity: sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-arm64-gnu@4.62.2': + resolution: {integrity: sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm64-musl@4.62.2': + resolution: {integrity: sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-loong64-gnu@4.62.2': + resolution: {integrity: sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==} + cpu: [loong64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-loong64-musl@4.62.2': + resolution: {integrity: sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==} + cpu: [loong64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-ppc64-gnu@4.62.2': + resolution: {integrity: sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-ppc64-musl@4.62.2': + resolution: {integrity: sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==} + cpu: [ppc64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-riscv64-gnu@4.62.2': + resolution: {integrity: sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-riscv64-musl@4.62.2': + resolution: {integrity: sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-s390x-gnu@4.62.2': + resolution: {integrity: sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-gnu@4.62.2': + resolution: {integrity: sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-musl@4.62.2': + resolution: {integrity: sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rollup/rollup-openbsd-x64@4.62.2': + resolution: {integrity: sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.62.2': + resolution: {integrity: sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + resolution: {integrity: sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.62.2': + resolution: {integrity: sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.62.2': + resolution: {integrity: sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.62.2': + resolution: {integrity: sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==} + cpu: [x64] + os: [win32] + + '@shikijs/core@1.29.2': + resolution: {integrity: sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ==} + + '@shikijs/engine-javascript@1.29.2': + resolution: {integrity: sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==} + + '@shikijs/engine-oniguruma@1.29.2': + resolution: {integrity: sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==} + + '@shikijs/langs@1.29.2': + resolution: {integrity: sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==} + + '@shikijs/themes@1.29.2': + resolution: {integrity: sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==} + + '@shikijs/transformers@1.29.2': + resolution: {integrity: sha512-NHQuA+gM7zGuxGWP9/Ub4vpbwrYCrho9nQCLcCPfOe3Yc7LOYwmSuhElI688oiqIXk9dlZwDiyAG9vPBTuPJMA==} + + '@shikijs/types@1.29.2': + resolution: {integrity: sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@tailwindcss/node@4.3.1': + resolution: {integrity: sha512-6NDaqRoAMSXD1mr/RXu0HBvNE9a2n5tHPsxu9XHLws8o4Twes5rBM2205SUUiJ9goAtadrN6xTGX0UDEwp/N4A==} + + '@tailwindcss/oxide-android-arm64@4.3.1': + resolution: {integrity: sha512-SVlyf61g374l5cHyg8x9kf5xmLcOaxvOTsbsqDnSsDJaKOEFZ7GCvi84VAVGpxojYOs1+3K6M0UjXfqPU8vmOQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [android] + + '@tailwindcss/oxide-darwin-arm64@4.3.1': + resolution: {integrity: sha512-hVnWLwv+e/l7c4WKyVtHVrIPvYdqWHjRB3MDIqARynzFtnQg85kmQEFCbV9Ja0VVx4xXTIiDWY60Y7iz/iNoDA==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [darwin] + + '@tailwindcss/oxide-darwin-x64@4.3.1': + resolution: {integrity: sha512-Cf7abu0WVgbhU7ANgPUnSAvm7nCvMweusHb8FnaHlLfv/Caq4GYaEZg7ZImzzmjx4lIAfuS8q+eLIS7A7IzxIg==} + engines: {node: '>= 20'} + cpu: [x64] + os: [darwin] + + '@tailwindcss/oxide-freebsd-x64@4.3.1': + resolution: {integrity: sha512-ZZqzX2Y+GXtXXfqSfpJhDm60OoZfvLHLCgm+J7NVqgHHJjG/m9ugZI77RwTsVd4fnBJuCFP6Ae6kTJb71UdS8g==} + engines: {node: '>= 20'} + cpu: [x64] + os: [freebsd] + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.1': + resolution: {integrity: sha512-/Ah/xik0LaMYfv9DZ0S/t4pBlBNYOcqtRwusjgovHkvT8ixueWCLyJjsaF5kQIckjb4IT8Q6K6p/iPmZMixYgg==} + engines: {node: '>= 20'} + cpu: [arm] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.1': + resolution: {integrity: sha512-gqdFoVJlw444GvpnheZLHmvTzSxI/cOUUh2KSNejQjTcYkW062SVD+En0rUgD+QV91bz1XGIGtt1HJd48xUGbQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@tailwindcss/oxide-linux-arm64-musl@4.3.1': + resolution: {integrity: sha512-Bwv9KwOvE0VKa86xPFif9b9c3Y1NxOV1P0gLti/IYaWEsQYZXDlxfGEtA8mdDZ7SG3wyNXAWYT5SIn3giL57oA==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@tailwindcss/oxide-linux-x64-gnu@4.3.1': + resolution: {integrity: sha512-Ymi8O8T15HYQdOUWUtTI6ldN0neHP85FC+Qz32xTcZ7iJXtem/x8ITev0o1e9e5rkqj4lONZfTRLvkmin1+tKg==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@tailwindcss/oxide-linux-x64-musl@4.3.1': + resolution: {integrity: sha512-M+P/91qJ6uILLw4k2G93GMDRAXj61SMvFQYt39AqvUqYgExXpLL5aepfns7sj4HiAQeolirQF9E0lzRvdf4zPQ==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@tailwindcss/oxide-wasm32-wasi@4.3.1': + resolution: {integrity: sha512-zsM8uOeqvVGHsAXsJxsT28ttosFahLJKCLOTUBqRAtKnVgGSRitds9T432QiT8b77Yga7JIBkulIRRlJPtYhRA==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + bundledDependencies: + - '@napi-rs/wasm-runtime' + - '@emnapi/core' + - '@emnapi/runtime' + - '@tybys/wasm-util' + - '@emnapi/wasi-threads' + - tslib + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.1': + resolution: {integrity: sha512-aiNvSq9BsVk8V513lDKlrCFAgf8qBMPZTpgEhInL+NwQqs97mYmupVMrPrgBBSL8Pv/0zXu9MrMF9rMun1ZeNg==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [win32] + + '@tailwindcss/oxide-win32-x64-msvc@4.3.1': + resolution: {integrity: sha512-xDEyu1rg290472FEGaKHnzyDyh5QH+AlWvsU5hMoMtPpzmKlRI0jaYKCgSHDYtaQWZOYbMaduSyCwFwY4n1HmA==} + engines: {node: '>= 20'} + cpu: [x64] + os: [win32] + + '@tailwindcss/oxide@4.3.1': + resolution: {integrity: sha512-yVPyo8RNkabVr3O2EhHEE0Rewu7YKzc1DhIqfL46LKveFrmu9XbDazNOJY7/GRuvw1h6u3utWnR29H/p5JPlgA==} + engines: {node: '>= 20'} + + '@tailwindcss/vite@4.3.1': + resolution: {integrity: sha512-hItDHuIIlEV61R+faXu66s1K36aTurO/Qw0e45Vskz57gXl9pWOT6eg3zmcEui6CZXddbN7zd41bwmvag4JGwQ==} + peerDependencies: + vite: ^5.2.0 || ^6 || ^7 || ^8 + + '@tanstack/query-core@5.101.2': + resolution: {integrity: sha512-hH5MLoJhF7KaIGd7q3xTXGXvslI+GYlM1Z/35aSHHWaCJWB7XvTSHYuV3eM7tw+aE0mT/xMro4M4Q9rCGHT0lw==} + + '@tanstack/react-query@5.101.2': + resolution: {integrity: sha512-seDkr6kzGzX1okaaTtZPtgA688CDPlXUz1C6xSg0ESqn04Vuc8tlrYms1s3de+znBqhPVxFRfpAfUf+6XvfPWg==} + peerDependencies: + react: ^18 || ^19 + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.27.0': + resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.28.0': + resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} + + '@types/d3-array@3.2.2': + resolution: {integrity: sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==} + + '@types/d3-axis@3.0.6': + resolution: {integrity: sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==} + + '@types/d3-brush@3.0.6': + resolution: {integrity: sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==} + + '@types/d3-chord@3.0.6': + resolution: {integrity: sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==} + + '@types/d3-color@3.1.3': + resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==} + + '@types/d3-contour@3.0.6': + resolution: {integrity: sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==} + + '@types/d3-delaunay@6.0.4': + resolution: {integrity: sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==} + + '@types/d3-dispatch@3.0.7': + resolution: {integrity: sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==} + + '@types/d3-drag@3.0.7': + resolution: {integrity: sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==} + + '@types/d3-dsv@3.0.7': + resolution: {integrity: sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==} + + '@types/d3-ease@3.0.2': + resolution: {integrity: sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==} + + '@types/d3-fetch@3.0.7': + resolution: {integrity: sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==} + + '@types/d3-force@3.0.10': + resolution: {integrity: sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==} + + '@types/d3-format@3.0.4': + resolution: {integrity: sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==} + + '@types/d3-geo@3.1.0': + resolution: {integrity: sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==} + + '@types/d3-hierarchy@3.1.7': + resolution: {integrity: sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==} + + '@types/d3-interpolate@3.0.4': + resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==} + + '@types/d3-path@3.1.1': + resolution: {integrity: sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==} + + '@types/d3-polygon@3.0.2': + resolution: {integrity: sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==} + + '@types/d3-quadtree@3.0.6': + resolution: {integrity: sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==} + + '@types/d3-random@3.0.3': + resolution: {integrity: sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==} + + '@types/d3-scale-chromatic@3.1.0': + resolution: {integrity: sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==} + + '@types/d3-scale@4.0.9': + resolution: {integrity: sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==} + + '@types/d3-selection@3.0.11': + resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==} + + '@types/d3-shape@3.1.8': + resolution: {integrity: sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==} + + '@types/d3-time-format@4.0.3': + resolution: {integrity: sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==} + + '@types/d3-time@3.0.4': + resolution: {integrity: sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==} + + '@types/d3-timer@3.0.2': + resolution: {integrity: sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==} + + '@types/d3-transition@3.0.9': + resolution: {integrity: sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==} + + '@types/d3-zoom@3.0.8': + resolution: {integrity: sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==} + + '@types/d3@7.4.3': + resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==} + + '@types/debug@4.1.13': + resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==} + + '@types/estree-jsx@1.0.5': + resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/geojson@7946.0.16': + resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==} + + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + + '@types/mdast@4.0.4': + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + + '@types/react-dom@19.2.3': + resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==} + peerDependencies: + '@types/react': 19.2.17 + + '@types/react@19.2.17': + resolution: {integrity: sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==} + + '@types/trusted-types@2.0.7': + resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + + '@types/unist@2.0.11': + resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} + + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + + '@ungap/structured-clone@1.3.2': + resolution: {integrity: sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==} + + '@upsetjs/venn.js@2.0.0': + resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==} + + '@vercel/oidc@3.2.0': + resolution: {integrity: sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug==} + engines: {node: '>= 20'} + + '@vitejs/plugin-react@5.2.0': + resolution: {integrity: sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + + ai@6.0.214: + resolution: {integrity: sha512-9MlePEXT5pXtQv4fXqmiR0RG3DZU4Dbv+kU9ktEJC2COi2RH2WvI2GiyG9MuCqgPII6f1w+5kB5fNIiArqPzaQ==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + + bail@2.0.2: + resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} + + baseline-browser-mapping@2.10.40: + resolution: {integrity: sha512-BSSLZ9/Cjjv7Gtj5B68ZzXcXUg8iOf3fme+FCuh8rC/Go+Kmh8cox7M3A8dolou16s64QjLPOSdngh7GxXvkSw==} + engines: {node: '>=6.0.0'} + hasBin: true + + browserslist@4.28.4: + resolution: {integrity: sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + caniuse-lite@1.0.30001799: + resolution: {integrity: sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw==} + + ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + + character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + + character-entities-legacy@3.0.0: + resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + + character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + + character-reference-invalid@2.0.1: + resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} + + class-variance-authority@0.7.1: + resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + + comma-separated-tokens@2.0.3: + resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + + commander@7.2.0: + resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} + engines: {node: '>= 10'} + + commander@8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cose-base@1.0.3: + resolution: {integrity: sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==} + + cose-base@2.2.0: + resolution: {integrity: sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + cytoscape-cose-bilkent@4.1.0: + resolution: {integrity: sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==} + peerDependencies: + cytoscape: ^3.2.0 + + cytoscape-fcose@2.2.0: + resolution: {integrity: sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==} + peerDependencies: + cytoscape: ^3.2.0 + + cytoscape@3.34.0: + resolution: {integrity: sha512-62rNSrioXw93uliKFBwjukeQyeWwH2PqDrTac31r2P6464u3AUvTk0xS4LVvT251g7IgkFunrI48ZEZGjywSOg==} + engines: {node: '>=0.10'} + + d3-array@2.12.1: + resolution: {integrity: sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==} + + d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + + d3-axis@3.0.0: + resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==} + engines: {node: '>=12'} + + d3-brush@3.0.0: + resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==} + engines: {node: '>=12'} + + d3-chord@3.0.1: + resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==} + engines: {node: '>=12'} + + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + + d3-contour@4.0.2: + resolution: {integrity: sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==} + engines: {node: '>=12'} + + d3-delaunay@6.0.4: + resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==} + engines: {node: '>=12'} + + d3-dispatch@3.0.1: + resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + engines: {node: '>=12'} + + d3-drag@3.0.0: + resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} + engines: {node: '>=12'} + + d3-dsv@3.0.1: + resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==} + engines: {node: '>=12'} + hasBin: true + + d3-ease@3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + + d3-fetch@3.0.1: + resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==} + engines: {node: '>=12'} + + d3-force@3.0.0: + resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==} + engines: {node: '>=12'} + + d3-format@3.1.2: + resolution: {integrity: sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==} + engines: {node: '>=12'} + + d3-geo@3.1.1: + resolution: {integrity: sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==} + engines: {node: '>=12'} + + d3-hierarchy@3.1.2: + resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + + d3-path@1.0.9: + resolution: {integrity: sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==} + + d3-path@3.1.0: + resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==} + engines: {node: '>=12'} + + d3-polygon@3.0.1: + resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==} + engines: {node: '>=12'} + + d3-quadtree@3.0.1: + resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==} + engines: {node: '>=12'} + + d3-random@3.0.1: + resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==} + engines: {node: '>=12'} + + d3-sankey@0.12.3: + resolution: {integrity: sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==} + + d3-scale-chromatic@3.1.0: + resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==} + engines: {node: '>=12'} + + d3-scale@4.0.2: + resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + engines: {node: '>=12'} + + d3-selection@3.0.0: + resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + engines: {node: '>=12'} + + d3-shape@1.3.7: + resolution: {integrity: sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==} + + d3-shape@3.2.0: + resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==} + engines: {node: '>=12'} + + d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + + d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + engines: {node: '>=12'} + + d3-timer@3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + + d3-transition@3.0.1: + resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + engines: {node: '>=12'} + peerDependencies: + d3-selection: 2 - 3 + + d3-zoom@3.0.0: + resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} + engines: {node: '>=12'} + + d3@7.9.0: + resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==} + engines: {node: '>=12'} + + dagre-d3-es@7.0.14: + resolution: {integrity: sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==} + + dayjs@1.11.21: + resolution: {integrity: sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decode-named-character-reference@1.3.0: + resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==} + + delaunator@5.1.0: + resolution: {integrity: sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==} + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + + dompurify@3.4.11: + resolution: {integrity: sha512-zhlUV12GsaRzMsf9q5M254YhA4+VuF0fG+QFqu6aYpoGlKtz+w8//jBcGVYBgQkR5GHjUomejY84AV+/uPbWdw==} + + electron-to-chromium@1.5.380: + resolution: {integrity: sha512-W6d5AbuEoRayO447cqrg6lKJIlscgRnnxOZl/08kfV71BQDoEBC7Wwis68z87LjyK6f4kWyTaubuDbhHKrZkbA==} + + emoji-regex-xs@1.0.0: + resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} + + enhanced-resolve@5.21.6: + resolution: {integrity: sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==} + engines: {node: '>=10.13.0'} + + entities@6.0.1: + resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} + engines: {node: '>=0.12'} + + es-toolkit@1.49.0: + resolution: {integrity: sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==} + + esbuild@0.28.1: + resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + + estree-util-is-identifier-name@3.0.0: + resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==} + + eventsource-parser@3.1.0: + resolution: {integrity: sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg==} + engines: {node: '>=18.0.0'} + + extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + hachure-fill@0.5.2: + resolution: {integrity: sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==} + + hast-util-from-parse5@8.0.3: + resolution: {integrity: sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==} + + hast-util-parse-selector@4.0.0: + resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==} + + hast-util-raw@9.1.0: + resolution: {integrity: sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==} + + hast-util-sanitize@5.0.2: + resolution: {integrity: sha512-3yTWghByc50aGS7JlGhk61SPenfE/p1oaFeNwkOOyrscaOkMGrcW9+Cy/QAIOBpZxP1yqDIzFMR0+Np0i0+usg==} + + hast-util-to-html@9.0.5: + resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} + + hast-util-to-jsx-runtime@2.3.6: + resolution: {integrity: sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==} + + hast-util-to-parse5@8.0.1: + resolution: {integrity: sha512-MlWT6Pjt4CG9lFCjiz4BH7l9wmrMkfkJYCxFwKQic8+RTZgWPuWxwAfjJElsXkex7DJjfSJsQIt931ilUgmwdA==} + + hast-util-whitespace@3.0.0: + resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} + + hastscript@9.0.1: + resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==} + + html-url-attributes@3.0.1: + resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==} + + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + import-meta-resolve@4.2.0: + resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} + + inline-style-parser@0.2.7: + resolution: {integrity: sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==} + + internmap@1.0.1: + resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==} + + internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + + is-alphabetical@2.0.1: + resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} + + is-alphanumerical@2.0.1: + resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + + is-decimal@2.0.1: + resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + + is-hexadecimal@2.0.1: + resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json-schema@0.4.0: + resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + katex@0.16.47: + resolution: {integrity: sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==} + hasBin: true + + khroma@2.1.0: + resolution: {integrity: sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==} + + layout-base@1.0.2: + resolution: {integrity: sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==} + + layout-base@2.0.1: + resolution: {integrity: sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==} + + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} + + lodash-es@4.18.1: + resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==} + + longest-streak@3.1.0: + resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + markdown-table@3.0.4: + resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} + + marked@15.0.12: + resolution: {integrity: sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==} + engines: {node: '>= 18'} + hasBin: true + + marked@16.4.2: + resolution: {integrity: sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==} + engines: {node: '>= 20'} + hasBin: true + + marked@17.0.6: + resolution: {integrity: sha512-gB0gkNafnonOw0obSTEGZTT86IuhILt2Wfx0mWH/1Au83kybTayroZ/V6nS25mN7u8ASy+5fMhgB3XPNrOZdmA==} + engines: {node: '>= 20'} + hasBin: true + + mdast-util-find-and-replace@3.0.2: + resolution: {integrity: sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==} + + mdast-util-from-markdown@2.0.3: + resolution: {integrity: sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q==} + + mdast-util-gfm-autolink-literal@2.0.1: + resolution: {integrity: sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==} + + mdast-util-gfm-footnote@2.1.0: + resolution: {integrity: sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==} + + mdast-util-gfm-strikethrough@2.0.0: + resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} + + mdast-util-gfm-table@2.0.0: + resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==} + + mdast-util-gfm-task-list-item@2.0.0: + resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==} + + mdast-util-gfm@3.1.0: + resolution: {integrity: sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==} + + mdast-util-mdx-expression@2.0.1: + resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==} + + mdast-util-mdx-jsx@3.2.0: + resolution: {integrity: sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==} + + mdast-util-mdxjs-esm@2.0.1: + resolution: {integrity: sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==} + + mdast-util-phrasing@4.1.0: + resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + + mdast-util-to-hast@13.2.1: + resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} + + mdast-util-to-markdown@2.1.2: + resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==} + + mdast-util-to-string@4.0.0: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + + mermaid@11.16.0: + resolution: {integrity: sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==} + + micromark-core-commonmark@2.0.3: + resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} + + micromark-extension-gfm-autolink-literal@2.1.0: + resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==} + + micromark-extension-gfm-footnote@2.1.0: + resolution: {integrity: sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==} + + micromark-extension-gfm-strikethrough@2.1.0: + resolution: {integrity: sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==} + + micromark-extension-gfm-table@2.1.1: + resolution: {integrity: sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==} + + micromark-extension-gfm-tagfilter@2.0.0: + resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==} + + micromark-extension-gfm-task-list-item@2.1.0: + resolution: {integrity: sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==} + + micromark-extension-gfm@3.0.0: + resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==} + + micromark-factory-destination@2.0.1: + resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==} + + micromark-factory-label@2.0.1: + resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==} + + micromark-factory-space@2.0.1: + resolution: {integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==} + + micromark-factory-title@2.0.1: + resolution: {integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==} + + micromark-factory-whitespace@2.0.1: + resolution: {integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==} + + micromark-util-character@2.1.1: + resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} + + micromark-util-chunked@2.0.1: + resolution: {integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==} + + micromark-util-classify-character@2.0.1: + resolution: {integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==} + + micromark-util-combine-extensions@2.0.1: + resolution: {integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==} + + micromark-util-decode-numeric-character-reference@2.0.2: + resolution: {integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==} + + micromark-util-decode-string@2.0.1: + resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==} + + micromark-util-encode@2.0.1: + resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} + + micromark-util-html-tag-name@2.0.1: + resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==} + + micromark-util-normalize-identifier@2.0.1: + resolution: {integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==} + + micromark-util-resolve-all@2.0.1: + resolution: {integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==} + + micromark-util-sanitize-uri@2.0.1: + resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} + + micromark-util-subtokenize@2.1.0: + resolution: {integrity: sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==} + + micromark-util-symbol@2.0.1: + resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} + + micromark-util-types@2.0.2: + resolution: {integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==} + + micromark@4.0.2: + resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.15: + resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + node-releases@2.0.50: + resolution: {integrity: sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg==} + engines: {node: '>=18'} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + oniguruma-to-es@2.3.0: + resolution: {integrity: sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==} + + package-manager-detector@1.6.0: + resolution: {integrity: sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==} + + parse-entities@4.0.2: + resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==} + + parse5@7.3.0: + resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} + + path-data-parser@0.1.0: + resolution: {integrity: sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + engines: {node: '>=12'} + + points-on-curve@0.2.0: + resolution: {integrity: sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==} + + points-on-path@0.2.1: + resolution: {integrity: sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==} + + postcss@8.5.16: + resolution: {integrity: sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==} + engines: {node: ^10 || ^12 || >=14} + + prop-types@15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + + property-information@7.2.0: + resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} + + re-resizable@6.11.2: + resolution: {integrity: sha512-2xI2P3OHs5qw7K0Ud1aLILK6MQxW50TcO+DetD9eIV58j84TqYeHoZcL9H4GXFXXIh7afhH8mv5iUCXII7OW7A==} + peerDependencies: + react: ^16.13.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + react-dom@18.3.1: + resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + peerDependencies: + react: ^18.3.1 + + react-draggable@4.7.0: + resolution: {integrity: sha512-kTpANmKWVnFXiZ76Ag2ZowiFStuBYnJ606PI1TbUsOg29/400/JNIxI9+CuenhiAqFuXWJffz6F4UI3R51kUug==} + peerDependencies: + react: '>= 16.3.0' + react-dom: '>= 16.3.0' + + react-is@16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + + react-refresh@0.18.0: + resolution: {integrity: sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==} + engines: {node: '>=0.10.0'} + + react-rnd@10.5.3: + resolution: {integrity: sha512-s/sIT3pGZnQ+57egijkTp9mizjIWrJz68Pq6yd+F/wniFY3IriML18dUXnQe/HP9uMiJ+9MAp44hljG99fZu6Q==} + peerDependencies: + react: '>=16.3.0' + react-dom: '>=16.3.0' + + react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + engines: {node: '>=0.10.0'} + + regex-recursion@5.1.1: + resolution: {integrity: sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==} + + regex-utilities@2.3.0: + resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} + + regex@5.1.1: + resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==} + + rehype-harden@1.1.8: + resolution: {integrity: sha512-Qn7vR1xrf6fZCrkm9TDWi/AB4ylrHy+jqsNm1EHOAmbARYA6gsnVJBq/sdBh6kmT4NEZxH5vgIjrscefJAOXcw==} + + rehype-raw@7.0.0: + resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} + + rehype-sanitize@6.0.0: + resolution: {integrity: sha512-CsnhKNsyI8Tub6L4sm5ZFsme4puGfc6pYylvXo1AeqaGbjOYyzNv3qZPwvs0oMJ39eryyeOdmxwUIo94IpEhqg==} + + remark-gfm@4.0.1: + resolution: {integrity: sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==} + + remark-parse@11.0.0: + resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} + + remark-rehype@11.1.2: + resolution: {integrity: sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==} + + remark-stringify@11.0.0: + resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} + + remend@1.3.0: + resolution: {integrity: sha512-iIhggPkhW3hFImKtB10w0dz4EZbs28mV/dmbcYVonWEJ6UGHHpP+bFZnTh6GNWJONg5m+U56JrL+8IxZRdgWjw==} + + robust-predicates@3.0.3: + resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} + + rollup@4.62.2: + resolution: {integrity: sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + roughjs@4.6.6: + resolution: {integrity: sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==} + + rw@1.3.3: + resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + scheduler@0.23.2: + resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + shiki@1.29.2: + resolution: {integrity: sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg==} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + space-separated-tokens@2.0.2: + resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + + streamdown@2.5.0: + resolution: {integrity: sha512-/tTnURfIOxZK/pqJAxsfCvETG/XCJHoWnk3jq9xLcuz6CSpnjjuxSRBTTL4PKGhxiZQf0lqPxGhImdpwcZ2XwA==} + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + + stringify-entities@4.0.4: + resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} + + style-to-js@1.1.21: + resolution: {integrity: sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==} + + style-to-object@1.0.14: + resolution: {integrity: sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==} + + stylis@4.4.0: + resolution: {integrity: sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==} + + swr@2.4.2: + resolution: {integrity: sha512-ej644Y2bvkIajfR32KGeSSdBXQW+ScjGjkybZgSE7kFpk9eGnV44XY9FJylXi+W75pavSX1PVNB57W5EbhGIYw==} + peerDependencies: + react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + tailwind-merge@2.6.1: + resolution: {integrity: sha512-Oo6tHdpZsGpkKG88HJ8RR1rg/RdnEkQEfMoEk2x1XRI3F1AxeU+ijRXpiVUF4UbLfcxxRGw6TbUINKYdWVsQTQ==} + + tailwind-merge@3.6.0: + resolution: {integrity: sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w==} + + tailwindcss@4.3.1: + resolution: {integrity: sha512-hk+TB1m+K8CYNrP6rjQaq/Y+4Zylwpa87mLYBKCunwnnQ9p+fHb7kmSfGqyEJoxF/O6CDyABWVFEafNSYKll+Q==} + + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + engines: {node: '>=6'} + + throttleit@2.1.0: + resolution: {integrity: sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==} + engines: {node: '>=18'} + + tinyexec@1.2.4: + resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + + trough@2.2.0: + resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} + + ts-dedent@2.3.0: + resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==} + engines: {node: '>=6.10'} + + tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} + hasBin: true + + unified@11.0.5: + resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} + + unist-util-is@6.0.1: + resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} + + unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + + unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + + unist-util-visit-parents@6.0.2: + resolution: {integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==} + + unist-util-visit@5.1.0: + resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} + + update-browserslist-db@1.2.3: + resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + use-sync-external-store@1.6.0: + resolution: {integrity: sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + uuid@14.0.1: + resolution: {integrity: sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==} + hasBin: true + + vfile-location@5.0.3: + resolution: {integrity: sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==} + + vfile-message@4.0.3: + resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==} + + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + + vite@7.3.6: + resolution: {integrity: sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + jiti: '>=1.21.0' + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + web-namespaces@2.0.1: + resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + zod@4.4.3: + resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + + zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + +snapshots: + + '@ai-sdk/gateway@3.0.139(zod@4.4.3)': + dependencies: + '@ai-sdk/provider': 3.0.12 + '@ai-sdk/provider-utils': 4.0.33(zod@4.4.3) + '@vercel/oidc': 3.2.0 + zod: 4.4.3 + + '@ai-sdk/provider-utils@4.0.33(zod@4.4.3)': + dependencies: + '@ai-sdk/provider': 3.0.12 + '@standard-schema/spec': 1.1.0 + eventsource-parser: 3.1.0 + zod: 4.4.3 + + '@ai-sdk/provider@3.0.12': + dependencies: + json-schema: 0.4.0 + + '@ai-sdk/react@3.0.216(react@18.3.1)(zod@4.4.3)': + dependencies: + '@ai-sdk/provider-utils': 4.0.33(zod@4.4.3) + ai: 6.0.214(zod@4.4.3) + react: 18.3.1 + swr: 2.4.2(react@18.3.1) + throttleit: 2.1.0 + transitivePeerDependencies: + - zod + + '@antfu/install-pkg@1.1.0': + dependencies: + package-manager-detector: 1.6.0 + tinyexec: 1.2.4 + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.4.3 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.7': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.28.4 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-module-imports@7.29.7': + dependencies: + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.29.7': {} + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.7': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/parser@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/plugin-transform-react-jsx-self@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-transform-react-jsx-source@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/traverse@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.29.7': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@braintree/sanitize-url@7.1.2': {} + + '@chevrotain/types@11.1.2': {} + + '@esbuild/aix-ppc64@0.28.1': + optional: true + + '@esbuild/android-arm64@0.28.1': + optional: true + + '@esbuild/android-arm@0.28.1': + optional: true + + '@esbuild/android-x64@0.28.1': + optional: true + + '@esbuild/darwin-arm64@0.28.1': + optional: true + + '@esbuild/darwin-x64@0.28.1': + optional: true + + '@esbuild/freebsd-arm64@0.28.1': + optional: true + + '@esbuild/freebsd-x64@0.28.1': + optional: true + + '@esbuild/linux-arm64@0.28.1': + optional: true + + '@esbuild/linux-arm@0.28.1': + optional: true + + '@esbuild/linux-ia32@0.28.1': + optional: true + + '@esbuild/linux-loong64@0.28.1': + optional: true + + '@esbuild/linux-mips64el@0.28.1': + optional: true + + '@esbuild/linux-ppc64@0.28.1': + optional: true + + '@esbuild/linux-riscv64@0.28.1': + optional: true + + '@esbuild/linux-s390x@0.28.1': + optional: true + + '@esbuild/linux-x64@0.28.1': + optional: true + + '@esbuild/netbsd-arm64@0.28.1': + optional: true + + '@esbuild/netbsd-x64@0.28.1': + optional: true + + '@esbuild/openbsd-arm64@0.28.1': + optional: true + + '@esbuild/openbsd-x64@0.28.1': + optional: true + + '@esbuild/openharmony-arm64@0.28.1': + optional: true + + '@esbuild/sunos-x64@0.28.1': + optional: true + + '@esbuild/win32-arm64@0.28.1': + optional: true + + '@esbuild/win32-ia32@0.28.1': + optional: true + + '@esbuild/win32-x64@0.28.1': + optional: true + + '@iconify/types@2.0.0': {} + + '@iconify/utils@3.1.3': + dependencies: + '@antfu/install-pkg': 1.1.0 + '@iconify/types': 2.0.0 + import-meta-resolve: 4.2.0 + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@mermaid-js/parser@1.2.0': + dependencies: + '@chevrotain/types': 11.1.2 + + '@opentelemetry/api@1.9.1': {} + + '@radix-ui/react-compose-refs@1.1.3(@types/react@19.2.17)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 19.2.17 + + '@radix-ui/react-slot@1.3.0(@types/react@19.2.17)(react@18.3.1)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.3(@types/react@19.2.17)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 19.2.17 + + '@rolldown/pluginutils@1.0.0-rc.3': {} + + '@rollup/rollup-android-arm-eabi@4.62.2': + optional: true + + '@rollup/rollup-android-arm64@4.62.2': + optional: true + + '@rollup/rollup-darwin-arm64@4.62.2': + optional: true + + '@rollup/rollup-darwin-x64@4.62.2': + optional: true + + '@rollup/rollup-freebsd-arm64@4.62.2': + optional: true + + '@rollup/rollup-freebsd-x64@4.62.2': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.62.2': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-x64-musl@4.62.2': + optional: true + + '@rollup/rollup-openbsd-x64@4.62.2': + optional: true + + '@rollup/rollup-openharmony-arm64@4.62.2': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.62.2': + optional: true + + '@shikijs/core@1.29.2': + dependencies: + '@shikijs/engine-javascript': 1.29.2 + '@shikijs/engine-oniguruma': 1.29.2 + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + + '@shikijs/engine-javascript@1.29.2': + dependencies: + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 + oniguruma-to-es: 2.3.0 + + '@shikijs/engine-oniguruma@1.29.2': + dependencies: + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/langs@1.29.2': + dependencies: + '@shikijs/types': 1.29.2 + + '@shikijs/themes@1.29.2': + dependencies: + '@shikijs/types': 1.29.2 + + '@shikijs/transformers@1.29.2': + dependencies: + '@shikijs/core': 1.29.2 + '@shikijs/types': 1.29.2 + + '@shikijs/types@1.29.2': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@10.0.2': {} + + '@standard-schema/spec@1.1.0': {} + + '@tailwindcss/node@4.3.1': + dependencies: + '@jridgewell/remapping': 2.3.5 + enhanced-resolve: 5.21.6 + jiti: 2.7.0 + lightningcss: 1.32.0 + magic-string: 0.30.21 + source-map-js: 1.2.1 + tailwindcss: 4.3.1 + + '@tailwindcss/oxide-android-arm64@4.3.1': + optional: true + + '@tailwindcss/oxide-darwin-arm64@4.3.1': + optional: true + + '@tailwindcss/oxide-darwin-x64@4.3.1': + optional: true + + '@tailwindcss/oxide-freebsd-x64@4.3.1': + optional: true + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.1': + optional: true + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.1': + optional: true + + '@tailwindcss/oxide-linux-arm64-musl@4.3.1': + optional: true + + '@tailwindcss/oxide-linux-x64-gnu@4.3.1': + optional: true + + '@tailwindcss/oxide-linux-x64-musl@4.3.1': + optional: true + + '@tailwindcss/oxide-wasm32-wasi@4.3.1': + optional: true + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.1': + optional: true + + '@tailwindcss/oxide-win32-x64-msvc@4.3.1': + optional: true + + '@tailwindcss/oxide@4.3.1': + optionalDependencies: + '@tailwindcss/oxide-android-arm64': 4.3.1 + '@tailwindcss/oxide-darwin-arm64': 4.3.1 + '@tailwindcss/oxide-darwin-x64': 4.3.1 + '@tailwindcss/oxide-freebsd-x64': 4.3.1 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.1 + '@tailwindcss/oxide-linux-arm64-gnu': 4.3.1 + '@tailwindcss/oxide-linux-arm64-musl': 4.3.1 + '@tailwindcss/oxide-linux-x64-gnu': 4.3.1 + '@tailwindcss/oxide-linux-x64-musl': 4.3.1 + '@tailwindcss/oxide-wasm32-wasi': 4.3.1 + '@tailwindcss/oxide-win32-arm64-msvc': 4.3.1 + '@tailwindcss/oxide-win32-x64-msvc': 4.3.1 + + '@tailwindcss/vite@4.3.1(vite@7.3.6(jiti@2.7.0)(lightningcss@1.32.0))': + dependencies: + '@tailwindcss/node': 4.3.1 + '@tailwindcss/oxide': 4.3.1 + tailwindcss: 4.3.1 + vite: 7.3.6(jiti@2.7.0)(lightningcss@1.32.0) + + '@tanstack/query-core@5.101.2': {} + + '@tanstack/react-query@5.101.2(react@18.3.1)': + dependencies: + '@tanstack/query-core': 5.101.2 + react: 18.3.1 + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + '@types/babel__generator': 7.27.0 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.28.0 + + '@types/babel__generator@7.27.0': + dependencies: + '@babel/types': 7.29.7 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@types/babel__traverse@7.28.0': + dependencies: + '@babel/types': 7.29.7 + + '@types/d3-array@3.2.2': {} + + '@types/d3-axis@3.0.6': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-brush@3.0.6': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-chord@3.0.6': {} + + '@types/d3-color@3.1.3': {} + + '@types/d3-contour@3.0.6': + dependencies: + '@types/d3-array': 3.2.2 + '@types/geojson': 7946.0.16 + + '@types/d3-delaunay@6.0.4': {} + + '@types/d3-dispatch@3.0.7': {} + + '@types/d3-drag@3.0.7': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-dsv@3.0.7': {} + + '@types/d3-ease@3.0.2': {} + + '@types/d3-fetch@3.0.7': + dependencies: + '@types/d3-dsv': 3.0.7 + + '@types/d3-force@3.0.10': {} + + '@types/d3-format@3.0.4': {} + + '@types/d3-geo@3.1.0': + dependencies: + '@types/geojson': 7946.0.16 + + '@types/d3-hierarchy@3.1.7': {} + + '@types/d3-interpolate@3.0.4': + dependencies: + '@types/d3-color': 3.1.3 + + '@types/d3-path@3.1.1': {} + + '@types/d3-polygon@3.0.2': {} + + '@types/d3-quadtree@3.0.6': {} + + '@types/d3-random@3.0.3': {} + + '@types/d3-scale-chromatic@3.1.0': {} + + '@types/d3-scale@4.0.9': + dependencies: + '@types/d3-time': 3.0.4 + + '@types/d3-selection@3.0.11': {} + + '@types/d3-shape@3.1.8': + dependencies: + '@types/d3-path': 3.1.1 + + '@types/d3-time-format@4.0.3': {} + + '@types/d3-time@3.0.4': {} + + '@types/d3-timer@3.0.2': {} + + '@types/d3-transition@3.0.9': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-zoom@3.0.8': + dependencies: + '@types/d3-interpolate': 3.0.4 + '@types/d3-selection': 3.0.11 + + '@types/d3@7.4.3': + dependencies: + '@types/d3-array': 3.2.2 + '@types/d3-axis': 3.0.6 + '@types/d3-brush': 3.0.6 + '@types/d3-chord': 3.0.6 + '@types/d3-color': 3.1.3 + '@types/d3-contour': 3.0.6 + '@types/d3-delaunay': 6.0.4 + '@types/d3-dispatch': 3.0.7 + '@types/d3-drag': 3.0.7 + '@types/d3-dsv': 3.0.7 + '@types/d3-ease': 3.0.2 + '@types/d3-fetch': 3.0.7 + '@types/d3-force': 3.0.10 + '@types/d3-format': 3.0.4 + '@types/d3-geo': 3.1.0 + '@types/d3-hierarchy': 3.1.7 + '@types/d3-interpolate': 3.0.4 + '@types/d3-path': 3.1.1 + '@types/d3-polygon': 3.0.2 + '@types/d3-quadtree': 3.0.6 + '@types/d3-random': 3.0.3 + '@types/d3-scale': 4.0.9 + '@types/d3-scale-chromatic': 3.1.0 + '@types/d3-selection': 3.0.11 + '@types/d3-shape': 3.1.8 + '@types/d3-time': 3.0.4 + '@types/d3-time-format': 4.0.3 + '@types/d3-timer': 3.0.2 + '@types/d3-transition': 3.0.9 + '@types/d3-zoom': 3.0.8 + + '@types/debug@4.1.13': + dependencies: + '@types/ms': 2.1.0 + + '@types/estree-jsx@1.0.5': + dependencies: + '@types/estree': 1.0.9 + + '@types/estree@1.0.9': {} + + '@types/geojson@7946.0.16': {} + + '@types/hast@3.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/mdast@4.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/ms@2.1.0': {} + + '@types/react-dom@19.2.3(@types/react@19.2.17)': + dependencies: + '@types/react': 19.2.17 + + '@types/react@19.2.17': + dependencies: + csstype: 3.2.3 + + '@types/trusted-types@2.0.7': + optional: true + + '@types/unist@2.0.11': {} + + '@types/unist@3.0.3': {} + + '@ungap/structured-clone@1.3.2': {} + + '@upsetjs/venn.js@2.0.0': + optionalDependencies: + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + '@vercel/oidc@3.2.0': {} + + '@vitejs/plugin-react@5.2.0(vite@7.3.6(jiti@2.7.0)(lightningcss@1.32.0))': + dependencies: + '@babel/core': 7.29.7 + '@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-react-jsx-source': 7.29.7(@babel/core@7.29.7) + '@rolldown/pluginutils': 1.0.0-rc.3 + '@types/babel__core': 7.20.5 + react-refresh: 0.18.0 + vite: 7.3.6(jiti@2.7.0)(lightningcss@1.32.0) + transitivePeerDependencies: + - supports-color + + ai@6.0.214(zod@4.4.3): + dependencies: + '@ai-sdk/gateway': 3.0.139(zod@4.4.3) + '@ai-sdk/provider': 3.0.12 + '@ai-sdk/provider-utils': 4.0.33(zod@4.4.3) + '@opentelemetry/api': 1.9.1 + zod: 4.4.3 + + bail@2.0.2: {} + + baseline-browser-mapping@2.10.40: {} + + browserslist@4.28.4: + dependencies: + baseline-browser-mapping: 2.10.40 + caniuse-lite: 1.0.30001799 + electron-to-chromium: 1.5.380 + node-releases: 2.0.50 + update-browserslist-db: 1.2.3(browserslist@4.28.4) + + caniuse-lite@1.0.30001799: {} + + ccount@2.0.1: {} + + character-entities-html4@2.1.0: {} + + character-entities-legacy@3.0.0: {} + + character-entities@2.0.2: {} + + character-reference-invalid@2.0.1: {} + + class-variance-authority@0.7.1: + dependencies: + clsx: 2.1.1 + + clsx@2.1.1: {} + + comma-separated-tokens@2.0.3: {} + + commander@7.2.0: {} + + commander@8.3.0: {} + + convert-source-map@2.0.0: {} + + cose-base@1.0.3: + dependencies: + layout-base: 1.0.2 + + cose-base@2.2.0: + dependencies: + layout-base: 2.0.1 + + csstype@3.2.3: {} + + cytoscape-cose-bilkent@4.1.0(cytoscape@3.34.0): + dependencies: + cose-base: 1.0.3 + cytoscape: 3.34.0 + + cytoscape-fcose@2.2.0(cytoscape@3.34.0): + dependencies: + cose-base: 2.2.0 + cytoscape: 3.34.0 + + cytoscape@3.34.0: {} + + d3-array@2.12.1: + dependencies: + internmap: 1.0.1 + + d3-array@3.2.4: + dependencies: + internmap: 2.0.3 + + d3-axis@3.0.0: {} + + d3-brush@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + d3-chord@3.0.1: + dependencies: + d3-path: 3.1.0 + + d3-color@3.1.0: {} + + d3-contour@4.0.2: + dependencies: + d3-array: 3.2.4 + + d3-delaunay@6.0.4: + dependencies: + delaunator: 5.1.0 + + d3-dispatch@3.0.1: {} + + d3-drag@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-selection: 3.0.0 + + d3-dsv@3.0.1: + dependencies: + commander: 7.2.0 + iconv-lite: 0.6.3 + rw: 1.3.3 + + d3-ease@3.0.1: {} + + d3-fetch@3.0.1: + dependencies: + d3-dsv: 3.0.1 + + d3-force@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-quadtree: 3.0.1 + d3-timer: 3.0.1 + + d3-format@3.1.2: {} + + d3-geo@3.1.1: + dependencies: + d3-array: 3.2.4 + + d3-hierarchy@3.1.2: {} + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + + d3-path@1.0.9: {} + + d3-path@3.1.0: {} + + d3-polygon@3.0.1: {} + + d3-quadtree@3.0.1: {} + + d3-random@3.0.1: {} + + d3-sankey@0.12.3: + dependencies: + d3-array: 2.12.1 + d3-shape: 1.3.7 + + d3-scale-chromatic@3.1.0: + dependencies: + d3-color: 3.1.0 + d3-interpolate: 3.0.1 + + d3-scale@4.0.2: + dependencies: + d3-array: 3.2.4 + d3-format: 3.1.2 + d3-interpolate: 3.0.1 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + + d3-selection@3.0.0: {} + + d3-shape@1.3.7: + dependencies: + d3-path: 1.0.9 + + d3-shape@3.2.0: + dependencies: + d3-path: 3.1.0 + + d3-time-format@4.1.0: + dependencies: + d3-time: 3.1.0 + + d3-time@3.1.0: + dependencies: + d3-array: 3.2.4 + + d3-timer@3.0.1: {} + + d3-transition@3.0.1(d3-selection@3.0.0): + dependencies: + d3-color: 3.1.0 + d3-dispatch: 3.0.1 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-timer: 3.0.1 + + d3-zoom@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + d3@7.9.0: + dependencies: + d3-array: 3.2.4 + d3-axis: 3.0.0 + d3-brush: 3.0.0 + d3-chord: 3.0.1 + d3-color: 3.1.0 + d3-contour: 4.0.2 + d3-delaunay: 6.0.4 + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-dsv: 3.0.1 + d3-ease: 3.0.1 + d3-fetch: 3.0.1 + d3-force: 3.0.0 + d3-format: 3.1.2 + d3-geo: 3.1.1 + d3-hierarchy: 3.1.2 + d3-interpolate: 3.0.1 + d3-path: 3.1.0 + d3-polygon: 3.0.1 + d3-quadtree: 3.0.1 + d3-random: 3.0.1 + d3-scale: 4.0.2 + d3-scale-chromatic: 3.1.0 + d3-selection: 3.0.0 + d3-shape: 3.2.0 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + d3-timer: 3.0.1 + d3-transition: 3.0.1(d3-selection@3.0.0) + d3-zoom: 3.0.0 + + dagre-d3-es@7.0.14: + dependencies: + d3: 7.9.0 + lodash-es: 4.18.1 + + dayjs@1.11.21: {} + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + decode-named-character-reference@1.3.0: + dependencies: + character-entities: 2.0.2 + + delaunator@5.1.0: + dependencies: + robust-predicates: 3.0.3 + + dequal@2.0.3: {} + + detect-libc@2.1.2: {} + + devlop@1.1.0: + dependencies: + dequal: 2.0.3 + + dompurify@3.4.11: + optionalDependencies: + '@types/trusted-types': 2.0.7 + + electron-to-chromium@1.5.380: {} + + emoji-regex-xs@1.0.0: {} + + enhanced-resolve@5.21.6: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.3 + + entities@6.0.1: {} + + es-toolkit@1.49.0: {} + + esbuild@0.28.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.1 + '@esbuild/android-arm': 0.28.1 + '@esbuild/android-arm64': 0.28.1 + '@esbuild/android-x64': 0.28.1 + '@esbuild/darwin-arm64': 0.28.1 + '@esbuild/darwin-x64': 0.28.1 + '@esbuild/freebsd-arm64': 0.28.1 + '@esbuild/freebsd-x64': 0.28.1 + '@esbuild/linux-arm': 0.28.1 + '@esbuild/linux-arm64': 0.28.1 + '@esbuild/linux-ia32': 0.28.1 + '@esbuild/linux-loong64': 0.28.1 + '@esbuild/linux-mips64el': 0.28.1 + '@esbuild/linux-ppc64': 0.28.1 + '@esbuild/linux-riscv64': 0.28.1 + '@esbuild/linux-s390x': 0.28.1 + '@esbuild/linux-x64': 0.28.1 + '@esbuild/netbsd-arm64': 0.28.1 + '@esbuild/netbsd-x64': 0.28.1 + '@esbuild/openbsd-arm64': 0.28.1 + '@esbuild/openbsd-x64': 0.28.1 + '@esbuild/openharmony-arm64': 0.28.1 + '@esbuild/sunos-x64': 0.28.1 + '@esbuild/win32-arm64': 0.28.1 + '@esbuild/win32-ia32': 0.28.1 + '@esbuild/win32-x64': 0.28.1 + + escalade@3.2.0: {} + + escape-string-regexp@5.0.0: {} + + estree-util-is-identifier-name@3.0.0: {} + + eventsource-parser@3.1.0: {} + + extend@3.0.2: {} + + fdir@6.5.0(picomatch@4.0.4): + optionalDependencies: + picomatch: 4.0.4 + + fsevents@2.3.3: + optional: true + + gensync@1.0.0-beta.2: {} + + graceful-fs@4.2.11: {} + + hachure-fill@0.5.2: {} + + hast-util-from-parse5@8.0.3: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + devlop: 1.1.0 + hastscript: 9.0.1 + property-information: 7.2.0 + vfile: 6.0.3 + vfile-location: 5.0.3 + web-namespaces: 2.0.1 + + hast-util-parse-selector@4.0.0: + dependencies: + '@types/hast': 3.0.4 + + hast-util-raw@9.1.0: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + '@ungap/structured-clone': 1.3.2 + hast-util-from-parse5: 8.0.3 + hast-util-to-parse5: 8.0.1 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.1 + parse5: 7.3.0 + unist-util-position: 5.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + + hast-util-sanitize@5.0.2: + dependencies: + '@types/hast': 3.0.4 + '@ungap/structured-clone': 1.3.2 + unist-util-position: 5.0.0 + + hast-util-to-html@9.0.5: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.1 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + + hast-util-to-jsx-runtime@2.3.6: + dependencies: + '@types/estree': 1.0.9 + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + hast-util-whitespace: 3.0.0 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.2.0 + mdast-util-mdxjs-esm: 2.0.1 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + style-to-js: 1.1.21 + unist-util-position: 5.0.0 + vfile-message: 4.0.3 + transitivePeerDependencies: + - supports-color + + hast-util-to-parse5@8.0.1: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + + hast-util-whitespace@3.0.0: + dependencies: + '@types/hast': 3.0.4 + + hastscript@9.0.1: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + hast-util-parse-selector: 4.0.0 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + + html-url-attributes@3.0.1: {} + + html-void-elements@3.0.0: {} + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + import-meta-resolve@4.2.0: {} + + inline-style-parser@0.2.7: {} + + internmap@1.0.1: {} + + internmap@2.0.3: {} + + is-alphabetical@2.0.1: {} + + is-alphanumerical@2.0.1: + dependencies: + is-alphabetical: 2.0.1 + is-decimal: 2.0.1 + + is-decimal@2.0.1: {} + + is-hexadecimal@2.0.1: {} + + is-plain-obj@4.1.0: {} + + jiti@2.7.0: {} + + js-tokens@4.0.0: {} + + jsesc@3.1.0: {} + + json-schema@0.4.0: {} + + json5@2.2.3: {} + + katex@0.16.47: + dependencies: + commander: 8.3.0 + + khroma@2.1.0: {} + + layout-base@1.0.2: {} + + layout-base@2.0.1: {} + + lightningcss-android-arm64@1.32.0: + optional: true + + lightningcss-darwin-arm64@1.32.0: + optional: true + + lightningcss-darwin-x64@1.32.0: + optional: true + + lightningcss-freebsd-x64@1.32.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true + + lightningcss-linux-arm64-gnu@1.32.0: + optional: true + + lightningcss-linux-arm64-musl@1.32.0: + optional: true + + lightningcss-linux-x64-gnu@1.32.0: + optional: true + + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 + + lodash-es@4.18.1: {} + + longest-streak@3.1.0: {} + + loose-envify@1.4.0: + dependencies: + js-tokens: 4.0.0 + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + markdown-table@3.0.4: {} + + marked@15.0.12: {} + + marked@16.4.2: {} + + marked@17.0.6: {} + + mdast-util-find-and-replace@3.0.2: + dependencies: + '@types/mdast': 4.0.4 + escape-string-regexp: 5.0.0 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.0.2 + + mdast-util-from-markdown@2.0.3: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.2 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-decode-string: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-autolink-literal@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-find-and-replace: 3.0.2 + micromark-util-character: 2.1.1 + + mdast-util-gfm-footnote@2.1.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + micromark-util-normalize-identifier: 2.0.1 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-strikethrough@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-table@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + markdown-table: 3.0.4 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-task-list-item@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm@3.1.0: + dependencies: + mdast-util-from-markdown: 2.0.3 + mdast-util-gfm-autolink-literal: 2.0.1 + mdast-util-gfm-footnote: 2.1.0 + mdast-util-gfm-strikethrough: 2.0.0 + mdast-util-gfm-table: 2.0.0 + mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-mdx-expression@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-mdx-jsx@3.2.0: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + parse-entities: 4.0.2 + stringify-entities: 4.0.4 + unist-util-stringify-position: 4.0.0 + vfile-message: 4.0.3 + transitivePeerDependencies: + - supports-color + + mdast-util-mdxjs-esm@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-phrasing@4.1.0: + dependencies: + '@types/mdast': 4.0.4 + unist-util-is: 6.0.1 + + mdast-util-to-hast@13.2.1: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.3.2 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.1 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + + mdast-util-to-markdown@2.1.2: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + longest-streak: 3.1.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-string: 4.0.0 + micromark-util-classify-character: 2.0.1 + micromark-util-decode-string: 2.0.1 + unist-util-visit: 5.1.0 + zwitch: 2.0.4 + + mdast-util-to-string@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + + mermaid@11.16.0: + dependencies: + '@braintree/sanitize-url': 7.1.2 + '@iconify/utils': 3.1.3 + '@mermaid-js/parser': 1.2.0 + '@types/d3': 7.4.3 + '@upsetjs/venn.js': 2.0.0 + cytoscape: 3.34.0 + cytoscape-cose-bilkent: 4.1.0(cytoscape@3.34.0) + cytoscape-fcose: 2.2.0(cytoscape@3.34.0) + d3: 7.9.0 + d3-sankey: 0.12.3 + dagre-d3-es: 7.0.14 + dayjs: 1.11.21 + dompurify: 3.4.11 + es-toolkit: 1.49.0 + katex: 0.16.47 + khroma: 2.1.0 + marked: 16.4.2 + roughjs: 4.6.6 + stylis: 4.4.0 + ts-dedent: 2.3.0 + uuid: 14.0.1 + + micromark-core-commonmark@2.0.3: + dependencies: + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + micromark-factory-destination: 2.0.1 + micromark-factory-label: 2.0.1 + micromark-factory-space: 2.0.1 + micromark-factory-title: 2.0.1 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-html-tag-name: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-autolink-literal@2.1.0: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-footnote@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-core-commonmark: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-strikethrough@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-table@2.1.1: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-tagfilter@2.0.0: + dependencies: + micromark-util-types: 2.0.2 + + micromark-extension-gfm-task-list-item@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm@3.0.0: + dependencies: + micromark-extension-gfm-autolink-literal: 2.1.0 + micromark-extension-gfm-footnote: 2.1.0 + micromark-extension-gfm-strikethrough: 2.1.0 + micromark-extension-gfm-table: 2.1.1 + micromark-extension-gfm-tagfilter: 2.0.0 + micromark-extension-gfm-task-list-item: 2.1.0 + micromark-util-combine-extensions: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-destination@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-label@2.0.1: + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-space@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-types: 2.0.2 + + micromark-factory-title@2.0.1: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-whitespace@2.0.1: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-character@2.1.1: + dependencies: + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-chunked@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-classify-character@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-combine-extensions@2.0.1: + dependencies: + micromark-util-chunked: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-decode-numeric-character-reference@2.0.2: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-decode-string@2.0.1: + dependencies: + decode-named-character-reference: 1.3.0 + micromark-util-character: 2.1.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-symbol: 2.0.1 + + micromark-util-encode@2.0.1: {} + + micromark-util-html-tag-name@2.0.1: {} + + micromark-util-normalize-identifier@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-resolve-all@2.0.1: + dependencies: + micromark-util-types: 2.0.2 + + micromark-util-sanitize-uri@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-encode: 2.0.1 + micromark-util-symbol: 2.0.1 + + micromark-util-subtokenize@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-symbol@2.0.1: {} + + micromark-util-types@2.0.2: {} + + micromark@4.0.2: + dependencies: + '@types/debug': 4.1.13 + debug: 4.4.3 + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-combine-extensions: 2.0.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-encode: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + transitivePeerDependencies: + - supports-color + + ms@2.1.3: {} + + nanoid@3.3.15: {} + + node-releases@2.0.50: {} + + object-assign@4.1.1: {} + + oniguruma-to-es@2.3.0: + dependencies: + emoji-regex-xs: 1.0.0 + regex: 5.1.1 + regex-recursion: 5.1.1 + + package-manager-detector@1.6.0: {} + + parse-entities@4.0.2: + dependencies: + '@types/unist': 2.0.11 + character-entities-legacy: 3.0.0 + character-reference-invalid: 2.0.1 + decode-named-character-reference: 1.3.0 + is-alphanumerical: 2.0.1 + is-decimal: 2.0.1 + is-hexadecimal: 2.0.1 + + parse5@7.3.0: + dependencies: + entities: 6.0.1 + + path-data-parser@0.1.0: {} + + picocolors@1.1.1: {} + + picomatch@4.0.4: {} + + points-on-curve@0.2.0: {} + + points-on-path@0.2.1: + dependencies: + path-data-parser: 0.1.0 + points-on-curve: 0.2.0 + + postcss@8.5.16: + dependencies: + nanoid: 3.3.15 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prop-types@15.8.1: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react-is: 16.13.1 + + property-information@7.2.0: {} + + re-resizable@6.11.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + react-dom@18.3.1(react@18.3.1): + dependencies: + loose-envify: 1.4.0 + react: 18.3.1 + scheduler: 0.23.2 + + react-draggable@4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + clsx: 2.1.1 + prop-types: 15.8.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + react-is@16.13.1: {} + + react-refresh@0.18.0: {} + + react-rnd@10.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + re-resizable: 6.11.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-draggable: 4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + tslib: 2.6.2 + + react@18.3.1: + dependencies: + loose-envify: 1.4.0 + + regex-recursion@5.1.1: + dependencies: + regex: 5.1.1 + regex-utilities: 2.3.0 + + regex-utilities@2.3.0: {} + + regex@5.1.1: + dependencies: + regex-utilities: 2.3.0 + + rehype-harden@1.1.8: + dependencies: + unist-util-visit: 5.1.0 + + rehype-raw@7.0.0: + dependencies: + '@types/hast': 3.0.4 + hast-util-raw: 9.1.0 + vfile: 6.0.3 + + rehype-sanitize@6.0.0: + dependencies: + '@types/hast': 3.0.4 + hast-util-sanitize: 5.0.2 + + remark-gfm@4.0.1: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-gfm: 3.1.0 + micromark-extension-gfm: 3.0.0 + remark-parse: 11.0.0 + remark-stringify: 11.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + + remark-parse@11.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.0.3 + micromark-util-types: 2.0.2 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + + remark-rehype@11.1.2: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + mdast-util-to-hast: 13.2.1 + unified: 11.0.5 + vfile: 6.0.3 + + remark-stringify@11.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-to-markdown: 2.1.2 + unified: 11.0.5 + + remend@1.3.0: {} + + robust-predicates@3.0.3: {} + + rollup@4.62.2: + dependencies: + '@types/estree': 1.0.9 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.62.2 + '@rollup/rollup-android-arm64': 4.62.2 + '@rollup/rollup-darwin-arm64': 4.62.2 + '@rollup/rollup-darwin-x64': 4.62.2 + '@rollup/rollup-freebsd-arm64': 4.62.2 + '@rollup/rollup-freebsd-x64': 4.62.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.62.2 + '@rollup/rollup-linux-arm-musleabihf': 4.62.2 + '@rollup/rollup-linux-arm64-gnu': 4.62.2 + '@rollup/rollup-linux-arm64-musl': 4.62.2 + '@rollup/rollup-linux-loong64-gnu': 4.62.2 + '@rollup/rollup-linux-loong64-musl': 4.62.2 + '@rollup/rollup-linux-ppc64-gnu': 4.62.2 + '@rollup/rollup-linux-ppc64-musl': 4.62.2 + '@rollup/rollup-linux-riscv64-gnu': 4.62.2 + '@rollup/rollup-linux-riscv64-musl': 4.62.2 + '@rollup/rollup-linux-s390x-gnu': 4.62.2 + '@rollup/rollup-linux-x64-gnu': 4.62.2 + '@rollup/rollup-linux-x64-musl': 4.62.2 + '@rollup/rollup-openbsd-x64': 4.62.2 + '@rollup/rollup-openharmony-arm64': 4.62.2 + '@rollup/rollup-win32-arm64-msvc': 4.62.2 + '@rollup/rollup-win32-ia32-msvc': 4.62.2 + '@rollup/rollup-win32-x64-gnu': 4.62.2 + '@rollup/rollup-win32-x64-msvc': 4.62.2 + fsevents: 2.3.3 + + roughjs@4.6.6: + dependencies: + hachure-fill: 0.5.2 + path-data-parser: 0.1.0 + points-on-curve: 0.2.0 + points-on-path: 0.2.1 + + rw@1.3.3: {} + + safer-buffer@2.1.2: {} + + scheduler@0.23.2: + dependencies: + loose-envify: 1.4.0 + + semver@6.3.1: {} + + shiki@1.29.2: + dependencies: + '@shikijs/core': 1.29.2 + '@shikijs/engine-javascript': 1.29.2 + '@shikijs/engine-oniguruma': 1.29.2 + '@shikijs/langs': 1.29.2 + '@shikijs/themes': 1.29.2 + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + source-map-js@1.2.1: {} + + space-separated-tokens@2.0.2: {} + + streamdown@2.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + clsx: 2.1.1 + hast-util-to-jsx-runtime: 2.3.6 + html-url-attributes: 3.0.1 + marked: 17.0.6 + mermaid: 11.16.0 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + rehype-harden: 1.1.8 + rehype-raw: 7.0.0 + rehype-sanitize: 6.0.0 + remark-gfm: 4.0.1 + remark-parse: 11.0.0 + remark-rehype: 11.1.2 + remend: 1.3.0 + tailwind-merge: 3.6.0 + unified: 11.0.5 + unist-util-visit: 5.1.0 + unist-util-visit-parents: 6.0.2 + transitivePeerDependencies: + - supports-color + + stringify-entities@4.0.4: + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + + style-to-js@1.1.21: + dependencies: + style-to-object: 1.0.14 + + style-to-object@1.0.14: + dependencies: + inline-style-parser: 0.2.7 + + stylis@4.4.0: {} + + swr@2.4.2(react@18.3.1): + dependencies: + dequal: 2.0.3 + react: 18.3.1 + use-sync-external-store: 1.6.0(react@18.3.1) + + tailwind-merge@2.6.1: {} + + tailwind-merge@3.6.0: {} + + tailwindcss@4.3.1: {} + + tapable@2.3.3: {} + + throttleit@2.1.0: {} + + tinyexec@1.2.4: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + + trim-lines@3.0.1: {} + + trough@2.2.0: {} + + ts-dedent@2.3.0: {} + + tslib@2.6.2: {} + + typescript@5.9.3: {} + + unified@11.0.5: + dependencies: + '@types/unist': 3.0.3 + bail: 2.0.2 + devlop: 1.1.0 + extend: 3.0.2 + is-plain-obj: 4.1.0 + trough: 2.2.0 + vfile: 6.0.3 + + unist-util-is@6.0.1: + dependencies: + '@types/unist': 3.0.3 + + unist-util-position@5.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-stringify-position@4.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-visit-parents@6.0.2: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + + unist-util-visit@5.1.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.0.2 + + update-browserslist-db@1.2.3(browserslist@4.28.4): + dependencies: + browserslist: 4.28.4 + escalade: 3.2.0 + picocolors: 1.1.1 + + use-sync-external-store@1.6.0(react@18.3.1): + dependencies: + react: 18.3.1 + + uuid@14.0.1: {} + + vfile-location@5.0.3: + dependencies: + '@types/unist': 3.0.3 + vfile: 6.0.3 + + vfile-message@4.0.3: + dependencies: + '@types/unist': 3.0.3 + unist-util-stringify-position: 4.0.0 + + vfile@6.0.3: + dependencies: + '@types/unist': 3.0.3 + vfile-message: 4.0.3 + + vite@7.3.6(jiti@2.7.0)(lightningcss@1.32.0): + dependencies: + esbuild: 0.28.1 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + postcss: 8.5.16 + rollup: 4.62.2 + tinyglobby: 0.2.17 + optionalDependencies: + fsevents: 2.3.3 + jiti: 2.7.0 + lightningcss: 1.32.0 + + web-namespaces@2.0.1: {} + + yallist@3.1.1: {} + + zod@4.4.3: {} + + zwitch@2.0.4: {} diff --git a/pkg/cli/webapp/src/App.tsx b/pkg/cli/webapp/src/App.tsx index ed07676..442fa9c 100644 --- a/pkg/cli/webapp/src/App.tsx +++ b/pkg/cli/webapp/src/App.tsx @@ -1,11 +1,6 @@ import { useMemo, type ReactNode } from "react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { - AppShell, - Button, - DensitySwitcher, - ThemeSwitcher, -} from "@flanksource/clicky-ui/components"; +import { AppShell } from "@flanksource/clicky-ui/components"; import { RouterProvider, useBrowserRouter, @@ -16,7 +11,15 @@ import { apiClient } from "./api"; import { AgentLauncher } from "./AgentLauncher"; import { ChatLayer } from "./ChatLayer"; import { ChatRoute } from "./ChatRoute"; +import { HomeDashboard } from "./HomeDashboard"; +import { PromptWorkbench } from "./PromptWorkbench"; import { SessionBrowser } from "./SessionBrowser"; +import { + CAPTAIN_SIDEBAR_COLLAPSE_KEY, + ShellActions, + captainNavSections, + type PrimaryRoute, +} from "./shell"; export function App() { const queryClient = useMemo( @@ -37,15 +40,21 @@ export function App() { } + navSections={captainNavSections("sessions")} actions={} /> - ) : ( - - {route.kind === "operations" ? ( + navSections={captainNavSections("prompts")} + actions={} + /> + ) : ( + + {route.kind === "dashboard" ? ( + + ) : route.kind === "operations" ? ( } - nav={} + navSections={captainNavSections(active)} + collapsedStorageKey={CAPTAIN_SIDEBAR_COLLAPSE_KEY} actions={} contentClassName="p-0 overflow-hidden" > @@ -111,57 +119,29 @@ function ShellBrand({ ); } -function CaptainNav({ - active, - onNavigate, -}: { - active: PrimaryRoute; - onNavigate: (to: string, opts?: { replace?: boolean }) => void; -}) { - return ( -
    - - - -
    - ); -} - -function ShellActions() { - return ( - <> - - - - ); -} - type Route = - | { kind: "launcher" } + | { kind: "dashboard" } + | { kind: "agent" } | { kind: "sessions"; sessionId?: string } + | { kind: "prompts"; promptId?: string } | { kind: "operations" } | { kind: "chat"; threadId: string; model?: string }; +function primaryRoute(route: Route): PrimaryRoute { + if (route.kind === "dashboard") return "dashboard"; + if (route.kind === "operations") return "operations"; + if (route.kind === "prompts") return "prompts"; + if (route.kind === "sessions") return "sessions"; + return "agent"; +} + function parseRoute(pathname: string, search: string): Route { if (pathname.startsWith("/operations")) return { kind: "operations" }; + if (pathname.startsWith("/prompts")) { + const raw = pathname.slice("/prompts".length).replace(/^\/+/, ""); + const promptId = raw ? decodeURIComponent(raw.split("/")[0] ?? "") : undefined; + return promptId ? { kind: "prompts", promptId } : { kind: "prompts" }; + } if (pathname.startsWith("/sessions")) { const raw = pathname.slice("/sessions".length).replace(/^\/+/, ""); const sessionId = raw ? decodeURIComponent(raw.split("/")[0] ?? "") : undefined; @@ -170,7 +150,8 @@ function parseRoute(pathname: string, search: string): Route { if (pathname.startsWith("/chat/")) { const threadId = decodeURIComponent(pathname.slice("/chat/".length).split("/")[0] ?? ""); const model = new URLSearchParams(search).get("model") || undefined; - return threadId ? { kind: "chat", threadId, model } : { kind: "launcher" }; + return threadId ? { kind: "chat", threadId, model } : { kind: "dashboard" }; } - return { kind: "launcher" }; + if (pathname.startsWith("/agent")) return { kind: "agent" }; + return { kind: "dashboard" }; } diff --git a/pkg/cli/webapp/src/ChatLayer.tsx b/pkg/cli/webapp/src/ChatLayer.tsx index 8ca51d6..0bf49d5 100644 --- a/pkg/cli/webapp/src/ChatLayer.tsx +++ b/pkg/cli/webapp/src/ChatLayer.tsx @@ -18,6 +18,7 @@ export function ChatLayer() { ); } - diff --git a/pkg/cli/webapp/src/HomeDashboard.tsx b/pkg/cli/webapp/src/HomeDashboard.tsx new file mode 100644 index 0000000..cd530d3 --- /dev/null +++ b/pkg/cli/webapp/src/HomeDashboard.tsx @@ -0,0 +1,1042 @@ +import { useMemo, useState, type ComponentProps, type KeyboardEvent, type ReactNode } from "react"; +import { useQuery } from "@tanstack/react-query"; +import { + Button, + SearchInput, + SegmentedControl, + Switch, +} from "@flanksource/clicky-ui/components"; +import { + Icon, + ProgressBars, + UiActivity, + UiArrowDown, + UiArrowUp, + UiBrain, + UiChartBar, + UiChip, + UiClock, + UiCopy, + UiHistory, + UiMemoryStick, + UiRefresh, + UiRobotAi, + UiSparkles, + UiTerminal, +} from "@flanksource/clicky-ui/data"; +import { + SOURCE_OPTIONS, + commandLabel, + errorMessage, + fetchLiveSessions, + formatCompactNumber, + formatCost, + formatTime, + healthDotClassName, + healthRank, + projectLabel, + sessionSortTime, + sessionTitle, + type SessionDashboard, + type SessionLive, + type SessionRecord, + type SourceFilter, +} from "./sessionData"; + +type DashboardView = "list" | "cards"; +type DashboardSort = "model" | "health" | "context" | "cpu" | "memory" | "tokens" | "recent"; +type SortDirection = "asc" | "desc"; +type Navigate = (to: string, opts?: { replace?: boolean }) => void; +type DashboardIcon = NonNullable["icon"]>; +type LiveSessionRecord = SessionRecord & { live: SessionLive }; +type ProjectSessionGroup = { + key: string; + label: string; + detail?: string; + sessions: LiveSessionRecord[]; +}; + +const PERCENT_UNIT = { + perBar: 25, + label: "%", + barLabel: "25%", + format: (units: number) => `${Math.round(units * 25)}`, +}; + +const VIEW_OPTIONS = [ + { id: "list", label: "List" }, + { id: "cards", label: "Cards" }, +] satisfies Array<{ id: DashboardView; label: string }>; + +const SORT_OPTIONS = [ + { id: "model", label: "Model" }, + { id: "health", label: "Health" }, + { id: "context", label: "Context" }, + { id: "cpu", label: "CPU" }, + { id: "memory", label: "Memory" }, + { id: "tokens", label: "Tokens" }, + { id: "recent", label: "Recent" }, +] satisfies Array<{ id: DashboardSort; label: string }>; + +const SESSION_GRID_CLASS = + "grid grid-cols-[minmax(12rem,1.4fr)_5.25rem_6.25rem] sm:grid-cols-[minmax(13rem,1.5fr)_5.25rem_6.25rem_6.25rem] lg:grid-cols-[minmax(15rem,1.6fr)_5.5rem_7rem_7rem_7rem_6rem_7rem_5.5rem]"; + +const SESSION_COLUMNS = [ + { label: "Model", sort: "model" }, + { label: "Status", sort: "health" }, + { label: "CPU", sort: "cpu" }, + { label: "Memory", sort: "memory" }, + { label: "Context", sort: "context" }, + { label: "Tokens", sort: "tokens" }, + { label: "Updated", sort: "recent" }, + { label: "Actions" }, +] satisfies Array<{ label: string; sort?: DashboardSort }>; + +export function HomeDashboard({ onNavigate }: { onNavigate: Navigate }) { + const [source, setSource] = useState("all"); + const [allProjects, setAllProjects] = useState(false); + const [query, setQuery] = useState(""); + const [view, setView] = useState("list"); + const [sort, setSort] = useState("health"); + const [sortDirection, setSortDirection] = useState("desc"); + + const sessionsQuery = useQuery({ + queryKey: ["sessions-dashboard", source, allProjects, query], + queryFn: () => fetchLiveSessions({ source, allProjects, query, limit: 200 }), + refetchInterval: 5000, + refetchIntervalInBackground: false, + }); + + const sessions = sessionsQuery.data?.sessions ?? []; + const liveSessions = useMemo( + () => + sessions + .filter(hasLiveProcess) + .sort((left, right) => compareSessions(left, right, sort, sortDirection)), + [sessions, sort, sortDirection], + ); + const liveProjectGroups = useMemo( + () => groupSessionsByProject(liveSessions), + [liveSessions], + ); + const alertSessions = useMemo( + () => + sessions + .filter((session) => (session.health?.length ?? 0) > 0) + .sort((left, right) => healthRank(right) - healthRank(left) || sessionSortTime(right) - sessionSortTime(left)), + [sessions], + ); + const recentSessions = useMemo( + () => + sessions + .filter((session) => !session.live && session.detailAvailable !== false) + .sort((left, right) => sessionSortTime(right) - sessionSortTime(left)) + .slice(0, 6), + [sessions], + ); + + const openSession = (session: SessionRecord) => { + if (session.detailAvailable === false) return; + onNavigate(`/sessions/${encodeURIComponent(session.key)}`); + }; + + const selectSort = (nextSort: DashboardSort) => { + setSort(nextSort); + setSortDirection(defaultSortDirection(nextSort)); + }; + + const toggleSort = (nextSort: DashboardSort) => { + if (sort === nextSort) { + setSortDirection((direction) => (direction === "asc" ? "desc" : "asc")); + return; + } + selectSort(nextSort); + }; + + return ( +
    + void sessionsQuery.refetch()} + onNewAgent={() => onNavigate("/agent")} + /> + +
    + {sessionsQuery.error ? ( +
    + {errorMessage(sessionsQuery.error)} +
    + ) : null} + + + +
    +
    +
    +
    +
    Running Sessions
    +
    + {sessionsQuery.isFetching ? "Refreshing..." : `${liveSessions.length} live / ${sessions.length} shown`} +
    +
    +
    + + {liveSessions.length === 0 && !sessionsQuery.isLoading ? ( + onNavigate("/agent")} /> + ) : view === "cards" ? ( + + ) : ( + + )} +
    + + +
    +
    +
    + ); +} + +function DashboardToolbar({ + source, + onSourceChange, + allProjects, + onAllProjectsChange, + query, + onQueryChange, + view, + onViewChange, + sort, + onSortChange, + loading, + onRefresh, + onNewAgent, +}: { + source: SourceFilter; + onSourceChange: (source: SourceFilter) => void; + allProjects: boolean; + onAllProjectsChange: (enabled: boolean) => void; + query: string; + onQueryChange: (query: string) => void; + view: DashboardView; + onViewChange: (view: DashboardView) => void; + sort: DashboardSort; + onSortChange: (sort: DashboardSort) => void; + loading: boolean; + onRefresh: () => void; + onNewAgent: () => void; +}) { + return ( +
    +
    +
    +

    Running Sessions

    +
    + {loading ? "Refreshing live process data" : "Live agent process dashboard"} +
    +
    +
    + + +
    +
    + +
    + + + + + +
    +
    + ); +} + +function MetricGrid({ + summary, + liveCount, + loading, +}: { + summary?: SessionDashboard; + liveCount: number; + loading: boolean; +}) { + const stats = [ + { + label: "Live", + value: summary ? `${summary.liveSessions}/${summary.totalSessions}` : loading ? "--" : "0/0", + detail: `${summary?.activeSessions ?? liveCount} active`, + icon: UiActivity, + }, + { + label: "Alerts", + value: summary?.alertSessions ?? 0, + detail: `${summary?.stoppedSessions ?? 0} stopped`, + icon: UiChartBar, + }, + { + label: "Context", + value: summary?.lowestContextFree !== undefined ? `${summary.lowestContextFree}%` : "--", + detail: "lowest free", + icon: UiMemoryStick, + }, + { + label: "Tokens", + value: formatCompactNumber(summary?.totalTokens ?? 0), + detail: `${formatCompactNumber(summary?.outputTokens ?? 0)} output`, + icon: UiTerminal, + }, + { + label: "Cache", + value: formatCompactNumber(summary?.cacheReadTokens ?? 0), + detail: `${formatCompactNumber(summary?.cacheCreationTokens ?? 0)} created`, + icon: UiHistory, + }, + { + label: "Cost", + value: formatCost(summary?.costUsd ?? 0), + detail: "estimated", + icon: UiClock, + }, + ] satisfies Array<{ + label: string; + value: ReactNode; + detail: string; + icon: DashboardIcon; + }>; + + return ( +
    + {stats.map((stat) => ( + + ))} +
    + ); +} + +function MetricTile({ + label, + value, + detail, + icon, +}: { + label: string; + value: ReactNode; + detail: string; + icon: DashboardIcon; +}) { + return ( +
    +
    +
    {label}
    + +
    +
    {value}
    +
    {detail}
    +
    + ); +} + +function SessionTable({ + groups, + sort, + sortDirection, + onSortChange, + onOpen, +}: { + groups: ProjectSessionGroup[]; + sort: DashboardSort; + sortDirection: SortDirection; + onSortChange: (sort: DashboardSort) => void; + onOpen: (session: SessionRecord) => void; +}) { + return ( +
    +
    + {SESSION_COLUMNS.map((column) => ( + + ))} +
    +
    + {groups.map((group) => ( +
    + +
    + {group.sessions.map((session) => ( +
    activateSession(session, onOpen)} + onKeyDown={(event) => handleSessionKeyDown(event, session, onOpen)} + className={`${SESSION_GRID_CLASS} cursor-pointer items-center gap-density-2 px-density-3 py-density-2 text-sm transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[disabled=true]:cursor-default data-[disabled=true]:hover:bg-transparent`} + data-disabled={session.detailAvailable === false ? "true" : undefined} + > + + + + + + + + +
    + ))} +
    +
    + ))} +
    +
    + ); +} + +function SessionHeaderCell({ + column, + sort, + sortDirection, + onSortChange, +}: { + column: (typeof SESSION_COLUMNS)[number]; + sort: DashboardSort; + sortDirection: SortDirection; + onSortChange: (sort: DashboardSort) => void; +}) { + if (!column.sort) { + return
    {column.label}
    ; + } + + const active = sort === column.sort; + return ( + + ); +} + +function SessionCardGrid({ + groups, + onOpen, +}: { + groups: ProjectSessionGroup[]; + onOpen: (session: SessionRecord) => void; +}) { + return ( +
    + {groups.map((group) => ( +
    + +
    + {group.sessions.map((session) => ( +
    activateSession(session, onOpen)} + onKeyDown={(event) => handleSessionKeyDown(event, session, onOpen)} + className="min-w-0 cursor-pointer rounded border border-border bg-card p-density-3 transition-colors hover:border-muted-foreground/40 hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[disabled=true]:cursor-default data-[disabled=true]:hover:border-border data-[disabled=true]:hover:bg-card" + data-disabled={session.detailAvailable === false ? "true" : undefined} + > +
    + + +
    +
    + + + + } + /> + + } + /> + + +
    +
    + +
    +
    + {commandLabel(session.live.command)} +
    +
    + ))} +
    +
    + ))} +
    + ); +} + +function ProjectGroupHeader({ group }: { group: ProjectSessionGroup }) { + return ( +
    +
    +
    {group.label}
    + {group.detail ? ( +
    {group.detail}
    + ) : null} +
    +
    + {group.sessions.length} +
    +
    + ); +} + +function UsageBarsCell({ + title, + value, + icon, + thresholds, +}: { + title: string; + value: number | undefined; + icon: DashboardIcon; + thresholds: [warning: number, danger: number]; +}) { + return ( +
    + + + {formatPercent(value)} + +
    + ); +} + +function SessionIdentity({ session }: { session: SessionRecord }) { + const model = modelLabel(session); + const effort = effortLabel(session.reasoningEffort); + return ( +
    +
    + + + + {model} + + {session.source} + +
    +
    + {effort ? ( + + + {effort} + + ) : null} + {sessionTitle(session)} +
    +
    + {session.live?.pid ? `pid ${session.live.pid} - ` : ""} + {commandLabel(session.live?.command)} +
    +
    + ); +} + +function StatusCell({ session }: { session: SessionRecord & { live: SessionLive } }) { + const signal = session.health?.[0]; + return ( +
    +
    + + {session.live.status ?? "active"} +
    +
    + ); +} + +function ContextCell({ + session, + expanded = false, +}: { + session: SessionRecord; + expanded?: boolean; +}) { + const percent = session.context?.freePercent; + if (percent === undefined) { + return ; + } + return ( +
    +
    + {percent}% free + {expanded && session.context?.windowTokens ? ( + + {formatCompactNumber(session.context.windowTokens)} + + ) : null} +
    +
    +
    +
    +
    + ); +} + +function SessionActions({ + session, + onOpen, + compact = false, +}: { + session: SessionRecord; + onOpen: (session: SessionRecord) => void; + compact?: boolean; +}) { + return ( +
    + + +
    + ); +} + +function HealthPanel({ + sessions, + onOpen, +}: { + sessions: SessionRecord[]; + onOpen: (session: SessionRecord) => void; +}) { + return ( + + {sessions.length === 0 ? ( + Clear + ) : ( +
    + {sessions.slice(0, 6).map((session) => { + const signal = session.health?.[0]; + return ( + + ); + })} +
    + )} +
    + ); +} + +function RecentPanel({ + sessions, + onOpen, +}: { + sessions: SessionRecord[]; + onOpen: (session: SessionRecord) => void; +}) { + return ( + + {sessions.length === 0 ? ( + None + ) : ( +
    + {sessions.map((session) => ( + + ))} +
    + )} +
    + ); +} + +function SidePanel({ + title, + count, + children, +}: { + title: string; + count: number; + children: ReactNode; +}) { + return ( +
    +
    +
    {title}
    +
    {count}
    +
    +
    {children}
    +
    + ); +} + +function EmptyLiveSessions({ onNewAgent }: { onNewAgent: () => void }) { + return ( +
    +
    No running sessions.
    +
    Start an agent or switch scope.
    + +
    + ); +} + +function PanelEmpty({ children }: { children: ReactNode }) { + return
    {children}
    ; +} + +function MetricBox({ label, value }: { label: string; value: ReactNode }) { + const isTextValue = typeof value === "string" || typeof value === "number"; + return ( +
    +
    {label}
    +
    + {value} +
    +
    + ); +} + +function MetricText({ value }: { value: ReactNode }) { + return
    {value}
    ; +} + +function hasLiveProcess(session: SessionRecord): session is LiveSessionRecord { + return Boolean(session.live); +} + +function compareSessions( + left: LiveSessionRecord, + right: LiveSessionRecord, + sort: DashboardSort, + direction: SortDirection, +) { + if (sort === "model") { + return directionalCompare( + modelLabel(left).localeCompare(modelLabel(right)) || + sessionSortTime(right) - sessionSortTime(left), + direction, + "asc", + ); + } + if (sort === "context") { + return directionalCompare( + (left.context?.freePercent ?? 101) - (right.context?.freePercent ?? 101) || + sessionSortTime(right) - sessionSortTime(left), + direction, + "asc", + ); + } + if (sort === "cpu") { + return directionalCompare( + (right.live.cpuPercent ?? -1) - (left.live.cpuPercent ?? -1) || + sessionSortTime(right) - sessionSortTime(left), + direction, + "desc", + ); + } + if (sort === "memory") { + return directionalCompare( + (right.live.memoryPercent ?? -1) - (left.live.memoryPercent ?? -1) || + sessionSortTime(right) - sessionSortTime(left), + direction, + "desc", + ); + } + if (sort === "tokens") { + return directionalCompare( + tokenTotal(right) - tokenTotal(left) || + sessionSortTime(right) - sessionSortTime(left), + direction, + "desc", + ); + } + if (sort === "recent") { + return directionalCompare( + sessionSortTime(right) - sessionSortTime(left), + direction, + "desc", + ); + } + return directionalCompare( + healthRank(right) - healthRank(left) || + (left.context?.freePercent ?? 101) - (right.context?.freePercent ?? 101) || + (right.live.cpuPercent ?? -1) - (left.live.cpuPercent ?? -1) || + sessionSortTime(right) - sessionSortTime(left), + direction, + "desc", + ); +} + +function directionalCompare(value: number, direction: SortDirection, natural: SortDirection) { + return direction === natural ? value : -value; +} + +function defaultSortDirection(sort: DashboardSort): SortDirection { + return sort === "model" || sort === "context" ? "asc" : "desc"; +} + +function tokenTotal(session: SessionRecord) { + return session.tokens?.totalTokens ?? 0; +} + +function groupSessionsByProject(sessions: LiveSessionRecord[]): ProjectSessionGroup[] { + const groups = new Map(); + + for (const session of sessions) { + const cwd = session.live.cwd ?? session.cwd; + const key = cwd || "unknown"; + const label = projectLabel(cwd); + const existing = groups.get(key); + + if (existing) { + existing.sessions.push(session); + continue; + } + + groups.set(key, { + key, + label, + detail: cwd && cwd !== label ? cwd : undefined, + sessions: [session], + }); + } + + return [...groups.values()]; +} + +function activateSession(session: SessionRecord, onOpen: (session: SessionRecord) => void) { + if (session.detailAvailable === false) return; + onOpen(session); +} + +function handleSessionKeyDown( + event: KeyboardEvent, + session: SessionRecord, + onOpen: (session: SessionRecord) => void, +) { + if (event.key !== "Enter" && event.key !== " ") return; + event.preventDefault(); + activateSession(session, onOpen); +} + +function modelLabel(session: SessionRecord) { + return session.model || session.provider || session.source; +} + +function modelIcon(session: SessionRecord): DashboardIcon { + const value = `${session.provider ?? ""} ${session.model ?? ""} ${session.source}`.toLowerCase(); + if (value.includes("claude") || value.includes("anthropic")) return UiSparkles; + if (value.includes("codex") || value.includes("openai") || value.includes("gpt")) return UiRobotAi; + return UiTerminal; +} + +function effortLabel(value: string | undefined) { + return value ? value.replace(/_/g, " ") : undefined; +} + +function formatPercent(value: number | undefined) { + return value === undefined ? "--" : `${value.toFixed(1)}%`; +} + +function formatRelativeTime(value: string | undefined) { + if (!value) return "--"; + const time = new Date(value).getTime(); + if (Number.isNaN(time)) return value; + const delta = Date.now() - time; + if (delta < 60_000) return "now"; + if (delta < 3_600_000) return `${Math.round(delta / 60_000)}m ago`; + if (delta < 86_400_000) return `${Math.round(delta / 3_600_000)}h ago`; + return `${Math.round(delta / 86_400_000)}d ago`; +} + +function contextTone(percent: number) { + if (percent <= 10) return "font-medium text-destructive"; + if (percent <= 25) return "font-medium text-amber-700"; + return "font-medium text-emerald-700"; +} + +function contextBarTone(percent: number) { + if (percent <= 10) return "bg-destructive"; + if (percent <= 25) return "bg-amber-500"; + return "bg-emerald-500"; +} + +function copySessionRef(session: SessionRecord) { + if (!navigator.clipboard) return; + const value = session.live?.pid ? `${session.source}:${session.live.pid}` : session.key; + void navigator.clipboard.writeText(value).catch(() => undefined); +} diff --git a/pkg/cli/webapp/src/PromptRunStream.tsx b/pkg/cli/webapp/src/PromptRunStream.tsx new file mode 100644 index 0000000..a6df5d5 --- /dev/null +++ b/pkg/cli/webapp/src/PromptRunStream.tsx @@ -0,0 +1,82 @@ +import { SessionViewer } from "@flanksource/clicky-ui/ai"; +import { usePromptRunStream, type PromptRunStreamStatus, type PromptRunSummary } from "./hooks/usePromptRunStream"; + +/** + * PromptRunStream renders a prompt run's session history live: it subscribes to + * the run's SSE stream and feeds the growing session.Message[] into SessionViewer, + * with a status pill and a completion summary footer. + */ +export function PromptRunStream({ runID }: { runID: string }) { + const { messages, summary, status, error } = usePromptRunStream(runID); + const empty = messages.length === 0; + + return ( +
    +
    + +
    + {error && ( +
    + {error} +
    + )} +
    + {empty ? ( +
    + {status === "done" ? "No session activity." : "Starting run…"} +
    + ) : ( +
    + +
    + )} +
    + {summary && } +
    + ); +} + +const STATUS_LABEL: Record = { + idle: "idle", + connecting: "connecting…", + streaming: "streaming…", + done: "done", + error: "error", +}; + +const STATUS_DOT: Record = { + idle: "bg-muted-foreground", + connecting: "bg-blue-500 animate-pulse", + streaming: "bg-blue-500 animate-pulse", + done: "bg-green-500", + error: "bg-destructive", +}; + +function StatusPill({ status }: { status: PromptRunStreamStatus }) { + return ( + + + {STATUS_LABEL[status]} + + ); +} + +function RunSummaryFooter({ summary }: { summary: PromptRunSummary }) { + const parts: string[] = []; + if (summary.model) parts.push(summary.model); + if (summary.backend) parts.push(summary.backend); + if (summary.duration) parts.push(summary.duration); + if (summary.inputTokens != null) parts.push(`${summary.inputTokens} in`); + if (summary.outputTokens != null) parts.push(`${summary.outputTokens} out`); + if (summary.costUSD != null) parts.push(`$${summary.costUSD.toFixed(4)}`); + if (summary.sessionId) parts.push(`session ${summary.sessionId}`); + return ( +
    + {parts.map((part, i) => ( + + {part} + + ))} +
    + ); +} diff --git a/pkg/cli/webapp/src/PromptWorkbench.tsx b/pkg/cli/webapp/src/PromptWorkbench.tsx new file mode 100644 index 0000000..f6904f4 --- /dev/null +++ b/pkg/cli/webapp/src/PromptWorkbench.tsx @@ -0,0 +1,1568 @@ +import { useEffect, useMemo, useState, type ReactNode } from "react"; +import { useQuery } from "@tanstack/react-query"; +import { + AppShell, + Button, + Modal, + SearchInput, + SegmentedControl, + Tabs, + type AppShellNavSection, + type KeyPreview, + type JsonSchemaObject, + type SecretKind, + type SecretResource, +} from "@flanksource/clicky-ui/components"; +import { + CodeBlock, + Icon, + SchemaViewer, + UiAdd, + UiCode2, + UiFileSearch, + UiListTree, + UiPlay, + UiRefresh, + UiSave, + UiTerminal, + UiTrash, +} from "@flanksource/clicky-ui/data"; +import "@flanksource/clicky-ui/mdx-editor.css"; +import { MdxEditorField } from "@flanksource/clicky-ui/mdx-editor"; +import { + PromptRunEditor, + buildAISpecRuntimePayload, + type AISpecRuntimePermissionCatalog, + type AISpecRuntimeValue, + type ToolMeta, +} from "@flanksource/clicky-ui/ai"; +import { type ChatModel } from "@flanksource/clicky-ui/chat"; +import { + useOperations, + type ExecutionResponse, + type ResolvedOperation, +} from "@flanksource/clicky-ui/rpc"; +import { apiClient } from "./api"; +import { PromptRunStream } from "./PromptRunStream"; +import { RunningPrompts } from "./RunningPrompts"; +import type { PromptRunHandle } from "./hooks/usePromptRunStream"; +import { CAPTAIN_SIDEBAR_COLLAPSE_KEY } from "./shell"; + +type Navigate = (to: string, opts?: { replace?: boolean }) => void; + +type SourceFilter = "all" | "embedded" | "local"; +type DetailTab = "source" | "runner" | "schema" | "runs"; + +type PromptVariable = { + name: string; + type?: string; + description?: string; + required?: boolean; +}; + +type PromptSummary = { + id: string; + name: string; + description?: string; + sourceKind: "embedded" | "local" | string; + sourceId: string; + source: string; + path: string; + relPath: string; + writable: boolean; + model?: string; + backend?: string; + variables?: PromptVariable[]; + parseError?: string; + updatedAt?: string; +}; + +type PromptDetail = PromptSummary & { + content: string; + inputSchema?: Record; + inputDefault?: Record; + outputSchema?: Record; + metadata?: Record; +}; + +type PromptRenderResult = { + id: string; + name: string; + model?: string; + backend?: string; + user?: string; + system?: string; + input?: unknown; + config?: unknown; + inputSchema?: Record; + inputDefault?: Record; + outputSchema?: Record; + validationError?: string; +}; + +type PromptOps = { + list?: ResolvedOperation; + get?: ResolvedOperation; + create?: ResolvedOperation; + update?: ResolvedOperation; + delete?: ResolvedOperation; + render?: ResolvedOperation; + run?: ResolvedOperation; +}; + +type PromptWorkbenchProps = { + selectedId?: string; + onNavigate: Navigate; + navSections: AppShellNavSection[]; + actions: ReactNode; +}; + +const SOURCE_OPTIONS = [ + { id: "all", label: "All" }, + { id: "embedded", label: "Embedded" }, + { id: "local", label: "Local" }, +] satisfies Array<{ id: SourceFilter; label: string }>; + +const EMPTY_RUNTIME: AISpecRuntimeValue = { budget: { timeout: "2h" } }; + +const AGENT_TOOLS = [ + { + name: "Read", + label: "Read", + group: "Files", + description: "Read files from the workspace.", + defaultPermission: "ask", + }, + { + name: "Edit", + label: "Edit", + group: "Files", + description: "Apply targeted file edits.", + defaultPermission: "ask", + }, + { + name: "MultiEdit", + label: "MultiEdit", + group: "Files", + description: "Apply multiple edits to one file.", + defaultPermission: "ask", + }, + { + name: "Write", + label: "Write", + group: "Files", + description: "Create or overwrite files.", + defaultPermission: "ask", + }, + { + name: "Glob", + label: "Glob", + group: "Search", + description: "Find files by glob pattern.", + defaultPermission: "ask", + }, + { + name: "Grep", + label: "Grep", + group: "Search", + description: "Search file contents.", + defaultPermission: "ask", + }, + { + name: "LS", + label: "List", + group: "Search", + description: "List directory contents.", + defaultPermission: "ask", + }, + { + name: "Bash", + label: "Bash", + group: "Shell", + description: "Run shell commands.", + defaultPermission: "ask", + }, + { + name: "Task", + label: "Task", + group: "Agent", + description: "Launch a delegated agent task.", + defaultPermission: "ask", + }, + { + name: "TodoWrite", + label: "Todos", + group: "Agent", + description: "Track an agent todo list.", + defaultPermission: "ask", + }, + { + name: "WebFetch", + label: "Web Fetch", + group: "Web", + description: "Fetch content from a URL.", + defaultPermission: "ask", + }, + { + name: "WebSearch", + label: "Web Search", + group: "Web", + description: "Search the web.", + defaultPermission: "ask", + }, +] satisfies ToolMeta[]; + +export function PromptWorkbench({ + selectedId, + onNavigate, + navSections, + actions, +}: PromptWorkbenchProps) { + const { + operations, + isLoading: operationsLoading, + error: operationsError, + } = useOperations(apiClient); + const promptOps = useMemo(() => resolvePromptOps(operations), [operations]); + const [source, setSource] = useState("all"); + const [query, setQuery] = useState(""); + const [tab, setTab] = useState("runner"); + const [draft, setDraft] = useState(""); + const [variables, setVariables] = useState>({}); + const [variablesValid, setVariablesValid] = useState(true); + const [runtime, setRuntime] = useState(EMPTY_RUNTIME); + const [renderResult, setRenderResult] = useState< + PromptRenderResult | undefined + >(); + const [activeRunID, setActiveRunID] = useState(); + const [actionError, setActionError] = useState(); + const [actionLoading, setActionLoading] = useState< + "save" | "render" | "run" | "delete" | undefined + >(); + const [createOpen, setCreateOpen] = useState(false); + + const listQuery = useQuery({ + queryKey: [ + "prompts", + promptOps.list?.path, + promptOps.list?.method, + source, + query, + ], + queryFn: () => + fetchPromptList(requiredOperation(promptOps.list, "list"), { + source, + query, + }), + enabled: Boolean(promptOps.list), + }); + const modelsQuery = useQuery({ + queryKey: ["chat-models"], + queryFn: fetchChatModels, + }); + const permissionCatalogQuery = useQuery({ + queryKey: ["permission-catalog"], + queryFn: () => fetchPermissionCatalog(), + }); + + const prompts = listQuery.data ?? []; + const models = modelsQuery.data ?? []; + + useEffect(() => { + if (selectedId || prompts.length === 0) return; + onNavigate(`/prompts/${encodeURIComponent(prompts[0].id)}`, { + replace: true, + }); + }, [onNavigate, prompts, selectedId]); + + const selectedSummary = useMemo( + () => prompts.find((prompt) => prompt.id === selectedId), + [prompts, selectedId], + ); + + const detailQuery = useQuery({ + queryKey: [ + "prompt", + promptOps.get?.path, + promptOps.get?.method, + selectedId, + ], + queryFn: () => + fetchPromptDetail( + requiredOperation(promptOps.get, "get"), + String(selectedId), + ), + enabled: Boolean(promptOps.get && selectedId), + }); + + const selected = detailQuery.data ?? selectedSummary; + const detail = detailQuery.data; + const writableSources = useMemo( + () => uniqueWritableSources(prompts), + [prompts], + ); + const canSave = Boolean( + detail && + promptOps.update && + (detail.writable ? draft !== detail.content : true), + ); + const hasSelection = Boolean(selectedId); + const operationsReady = Boolean( + promptOps.list && promptOps.get && promptOps.render && promptOps.run, + ); + + useEffect(() => { + if (!detail) return; + setDraft(detail.content); + const defaults = detail.inputDefault ?? {}; + setVariables(defaults); + setVariablesValid(true); + setRuntime({ ...EMPTY_RUNTIME, ...runtimeSelectionFromPrompt(detail) }); + setRenderResult(undefined); + setActiveRunID(undefined); + setActionError(undefined); + }, [detail?.id]); + + async function refreshAll() { + await listQuery.refetch(); + if (selectedId) await detailQuery.refetch(); + } + + async function saveDraft() { + if (!detail || !promptOps.update) return; + setActionError(undefined); + setActionLoading("save"); + try { + const saved = await submitPromptOperation( + promptOps.update, + { id: detail.id }, + { content: draft }, + ); + await listQuery.refetch(); + if (saved.id === detail.id) { + setDraft(saved.content); + await detailQuery.refetch(); + } else { + // Saving a read-only (embedded) prompt forks it to a local copy; + // switch to the new writable prompt. + onNavigate(`/prompts/${encodeURIComponent(saved.id)}`); + } + } catch (error) { + setActionError(errorMessage(error)); + } finally { + setActionLoading(undefined); + } + } + + async function renderPrompt() { + if (!detail || !promptOps.render) return; + setActionError(undefined); + setActionLoading("render"); + try { + const rendered = await submitPromptOperation( + promptOps.render, + { id: detail.id }, + { variables, ...runtimePayload(runtime, models) }, + ); + setRenderResult(rendered); + setActiveRunID(undefined); + } catch (error) { + setActionError(errorMessage(error)); + } finally { + setActionLoading(undefined); + } + } + + async function runPrompt() { + if (!detail || !promptOps.run) return; + setActionError(undefined); + setActionLoading("run"); + try { + const handle = await submitPromptOperation( + promptOps.run, + { id: detail.id }, + { variables, ...runtimePayload(runtime, models) }, + ); + setRenderResult(undefined); + setActiveRunID(handle.runId); + setTab("runner"); + } catch (error) { + setActionError(errorMessage(error)); + } finally { + setActionLoading(undefined); + } + } + + async function deletePrompt() { + if (!detail || !promptOps.delete) return; + setActionError(undefined); + setActionLoading("delete"); + try { + await executePromptOperation(promptOps.delete, { id: detail.id }, {}); + onNavigate("/prompts", { replace: true }); + await listQuery.refetch(); + } catch (error) { + setActionError(errorMessage(error)); + } finally { + setActionLoading(undefined); + } + } + + return ( + Captain
    } + navSections={navSections} + collapsedStorageKey={CAPTAIN_SIDEBAR_COLLAPSE_KEY} + actions={actions} + bodySidebar={ + + onNavigate(`/prompts/${encodeURIComponent(prompt.id)}`) + } + onRefresh={() => void refreshAll()} + onCreate={() => setCreateOpen(true)} + /> + } + bodyHeader={ + + } + bodyActions={ +
    + { + setActiveRunID(id); + setTab("runner"); + }} + /> + {detail?.writable && promptOps.delete && ( + + )} + {detail && promptOps.update && ( + + )} + +
    + } + bodySplit={30} + contentClassName="p-0 overflow-hidden" + > + setTab(next as DetailTab)} + draft={draft} + onDraftChange={setDraft} + variables={variables} + variablesValid={variablesValid} + onVariablesChange={setVariables} + onVariablesValidityChange={setVariablesValid} + runtime={runtime} + onRuntimeChange={setRuntime} + models={models} + tools={AGENT_TOOLS} + permissionCatalog={permissionCatalogQuery.data} + renderResult={renderResult} + activeRunID={activeRunID} + onSelectRun={(id) => { + setActiveRunID(id); + if (id) setTab("runner"); + }} + onRender={() => void renderPrompt()} + onRun={() => void runPrompt()} + renderLoading={actionLoading === "render"} + runLoading={actionLoading === "run"} + renderEnabled={Boolean(promptOps.render && detail)} + runEnabled={Boolean(promptOps.run && detail)} + /> + setCreateOpen(false)} + sources={writableSources} + createOp={promptOps.create} + seedContent={detail?.content} + onCreated={(prompt) => { + setCreateOpen(false); + void listQuery.refetch(); + onNavigate(`/prompts/${encodeURIComponent(prompt.id)}`); + }} + /> + + ); +} + +function PromptSidebar({ + source, + onSourceChange, + query, + onQueryChange, + prompts, + selectedId, + loading, + error, + onSelect, + onRefresh, + onCreate, +}: { + source: SourceFilter; + onSourceChange: (source: SourceFilter) => void; + query: string; + onQueryChange: (query: string) => void; + prompts: PromptSummary[]; + selectedId?: string; + loading: boolean; + error: unknown; + onSelect: (prompt: PromptSummary) => void; + onRefresh: () => void; + onCreate: () => void; +}) { + return ( +
    +
    +
    +
    Prompts
    +
    + + +
    +
    + + +
    + {loading ? "Loading..." : `${prompts.length} prompts`} +
    +
    + +
    + {error ? ( +
    + {errorMessage(error)} +
    + ) : prompts.length === 0 && !loading ? ( +
    + No prompts found. +
    + ) : ( +
    + {prompts.map((prompt) => { + const active = prompt.id === selectedId; + return ( + + ); + })} +
    + )} +
    +
    + ); +} + +function PromptHeader({ + prompt, + loading, + ready, +}: { + prompt?: PromptSummary; + loading: boolean; + ready: boolean; +}) { + if (!ready) { + return ( +
    +
    Prompt Workbench
    +
    + Loading prompt operations... +
    +
    + ); + } + if (loading && !prompt) { + return ( +
    Loading prompt...
    + ); + } + if (!prompt) { + return ( +
    +
    Prompt Workbench
    +
    + Select or create a prompt. +
    +
    + ); + } + return ( +
    +
    +
    {prompt.name}
    + + {prompt.sourceKind} + + {prompt.writable && ( + + editable + + )} +
    +
    + {prompt.model && {prompt.model}} + {prompt.backend && {prompt.backend}} + {prompt.path} +
    +
    + ); +} + +function PromptDetailPane({ + detail, + hasSelection, + loading, + error, + tab, + onTabChange, + draft, + onDraftChange, + variables, + variablesValid, + onVariablesChange, + onVariablesValidityChange, + runtime, + onRuntimeChange, + models, + tools, + permissionCatalog, + renderResult, + activeRunID, + onSelectRun, + onRender, + onRun, + renderLoading, + runLoading, + renderEnabled, + runEnabled, +}: { + detail?: PromptDetail; + hasSelection: boolean; + loading: boolean; + error: unknown; + tab: DetailTab; + onTabChange: (tab: string) => void; + draft: string; + onDraftChange: (value: string) => void; + variables: Record; + variablesValid: boolean; + onVariablesChange: (value: Record) => void; + onVariablesValidityChange: (valid: boolean) => void; + runtime: AISpecRuntimeValue; + onRuntimeChange: (value: AISpecRuntimeValue) => void; + models: ChatModel[]; + tools: ToolMeta[]; + permissionCatalog?: AISpecRuntimePermissionCatalog; + renderResult?: PromptRenderResult; + activeRunID?: string; + onSelectRun: (id: string | undefined) => void; + onRender: () => void; + onRun: () => void; + renderLoading: boolean; + runLoading: boolean; + renderEnabled: boolean; + runEnabled: boolean; +}) { + const promptSchemaQuery = useQuery({ + queryKey: ["prompt-schema"], + queryFn: fetchPromptSchema, + }); + + if (!hasSelection) { + return ( +
    + Select a prompt. +
    + ); + } + if (loading && !detail) { + return ( +
    + Loading prompt... +
    + ); + } + if (!detail) { + return ( +
    + {error ? errorMessage(error) : "Prompt not found."} +
    + ); + } + + const schema = normalizeObjectSchema(detail.inputSchema); + const backendCliArgs = promptSchemaQuery.data?.backends?.find( + (backend) => backend.backend === runtime.backend, + )?.args; + + return ( +
    +
    + +
    +
    + {Boolean(error) && ( +
    + {errorMessage(error)} +
    + )} + {tab === "source" ? ( + + ) : tab === "runs" ? ( + + ) : tab === "schema" ? ( + + ) : ( +
    +
    + + +
    + + +
    +
    + + +
    + )} +
    +
    + ); +} + +function SourceEditor({ + detail, + draft, + onDraftChange, +}: { + detail: PromptDetail; + draft: string; + onDraftChange: (value: string) => void; +}) { + return ( +
    + {!detail.writable && ( +
    + This is an embedded prompt. Saving your edits creates a local, + editable copy. +
    + )} + +
    + ); +} + +function PromptSourceMarkdownEditor({ + label, + value, + onChange, + readOnly = false, + minHeight, +}: { + label: string; + value: string; + onChange?: (value: string) => void; + readOnly?: boolean; + minHeight: string | number; +}) { + return ( +
    +
    + {label} +
    +
    + +
    +
    + ); +} + +function Field({ label, children }: { label: string; children: ReactNode }) { + return ( +
    + {label} + {children} +
    + ); +} + +function RunnerOutput({ + renderResult, + activeRunID, +}: { + renderResult?: PromptRenderResult; + activeRunID?: string; +}) { + if (activeRunID) { + return ; + } + if (renderResult) { + return ( +
    + {renderResult.validationError && ( +
    + {renderResult.validationError} +
    + )} + + +
    + ); + } + return ( +
    + Render or run the selected prompt. +
    + ); +} + +// SchemaPreview browses the prompt's input and output JSON schemas read-only, +// via clicky-ui's SchemaViewer. Absent schemas (most prompts declare no +// output.schema) degrade to an empty state rather than an error. +function SchemaPreview({ + inputSchema, + outputSchema, +}: { + inputSchema?: JsonSchemaObject; + outputSchema?: JsonSchemaObject; +}) { + return ( +
    + + } + schema={inputSchema} + emptyLabel="This prompt declares no input schema." + /> + + } + schema={outputSchema} + emptyLabel="This prompt declares no output schema." + /> +
    + ); +} + +function SchemaPanel({ + title, + icon, + schema, + emptyLabel, +}: { + title: string; + icon: ReactNode; + schema?: JsonSchemaObject; + emptyLabel: string; +}) { + return ( +
    +
    + {icon} + {title} +
    + {schema ? ( +
    + +
    + ) : ( +
    + {emptyLabel} +
    + )} +
    + ); +} + +function CreatePromptModal({ + open, + onClose, + sources, + createOp, + seedContent, + onCreated, +}: { + open: boolean; + onClose: () => void; + sources: Array<{ id: string; label: string }>; + createOp?: ResolvedOperation; + seedContent?: string; + onCreated: (prompt: PromptDetail) => void; +}) { + const [name, setName] = useState(""); + const [relPath, setRelPath] = useState(""); + const [target, setTarget] = useState(""); + const [content, setContent] = useState(defaultPromptContent("")); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(); + + useEffect(() => { + if (!open) return; + setName(""); + setRelPath(""); + setTarget(sources[0]?.id ?? ""); + setContent(seedContent || defaultPromptContent("")); + setError(undefined); + }, [open, seedContent, sources]); + + async function submit() { + if (!createOp) return; + setLoading(true); + setError(undefined); + try { + const created = await submitPromptOperation( + createOp, + {}, + { + target, + name, + relPath, + content, + }, + ); + onCreated(created); + } catch (err) { + setError(errorMessage(err)); + } finally { + setLoading(false); + } + } + + return ( + + + + + } + > +
    + {error &&
    {error}
    } +
    + + { + const next = event.target.value; + setName(next); + if (!relPath) setContent(defaultPromptContent(next)); + }} + className="h-control-h w-full rounded-md border border-border bg-background px-density-3 text-sm outline-none focus:ring-2 focus:ring-ring" + /> + + + setRelPath(event.target.value)} + className="h-control-h w-full rounded-md border border-border bg-background px-density-3 text-sm outline-none focus:ring-2 focus:ring-ring" + placeholder="name.prompt" + /> + + + + +
    + +
    +
    + ); +} + +function resolvePromptOps(operations: ResolvedOperation[]): PromptOps { + return { + list: findPromptOperation(operations, "list"), + get: findPromptOperation(operations, "get"), + create: findPromptOperation(operations, "create"), + update: findPromptOperation(operations, "update"), + delete: findPromptOperation(operations, "delete"), + render: findPromptOperation(operations, "action", "render"), + run: findPromptOperation(operations, "action", "run"), + }; +} + +function findPromptOperation( + operations: ResolvedOperation[], + verb: NonNullable["verb"], + actionName?: string, +) { + return operations.find((op) => { + const meta = op.operation["x-clicky"]; + if (!meta || meta.verb !== verb) return false; + if (actionName && meta.actionName !== actionName) return false; + const surface = (meta.surface || "").toLowerCase(); + const command = (meta.command || "").toLowerCase(); + const path = op.path.toLowerCase(); + return ( + surface === "prompt" || + surface === "prompts" || + command === "prompt" || + command.startsWith("prompt ") || + path.includes("/prompt") + ); + }); +} + +function requiredOperation(op: ResolvedOperation | undefined, name: string) { + if (!op) throw new Error(`Prompt ${name} operation is not available.`); + return op; +} + +async function fetchPromptList( + op: ResolvedOperation, + params: { source: SourceFilter; query: string }, +) { + const response = await apiClient.executeCommand( + op.path, + op.method, + { source: params.source, query: params.query }, + { Accept: "application/json" }, + ); + return unwrapResponse(response); +} + +async function fetchChatModels() { + const response = await fetch("/api/chat/models", { + headers: { Accept: "application/json" }, + }); + if (!response.ok) { + const message = await response.text(); + throw new Error(message || `Model catalog failed with ${response.status}`); + } + return (await response.json()) as ChatModel[]; +} + +async function fetchPermissionCatalog() { + const response = await fetch("/api/captain/ai/permissions/catalog", { + headers: { Accept: "application/json" }, + }); + if (!response.ok) { + const message = await response.text(); + throw new Error( + message || `Permission catalog failed with ${response.status}`, + ); + } + return (await response.json()) as AISpecRuntimePermissionCatalog; +} + +// One backend entry from `captain prompt --schema`: its kind/auth/model status +// plus, for cmux backends, the JSON schema for its extra CLI args. +type PromptSchemaBackend = { + backend: string; + kind?: string; + authenticated?: boolean; + ready?: boolean; + models?: string[]; + args?: JsonSchemaObject; +}; + +// The `captain prompt --schema` document. Only the fields the workbench consumes +// are typed; the served document also carries `spec`/`prompt`/`promptAction` +// schemas and a flat `models` list. +type PromptSchemaDoc = { + schemaVersion: number; + backends?: PromptSchemaBackend[]; + spec?: JsonSchemaObject; +}; + +async function fetchPromptSchema(): Promise { + const response = await fetch("/api/captain/ai/prompt/schema", { + headers: { Accept: "application/json" }, + }); + if (!response.ok) { + const message = await response.text(); + throw new Error(message || `Prompt schema failed with ${response.status}`); + } + return (await response.json()) as PromptSchemaDoc; +} + +const CAPTAIN_SECRET_SELECTOR = { + loadResources: fetchSecretResources, + loadKeyPreview: fetchSecretKeyPreview, +}; + +async function fetchSecretResources( + kind: SecretKind, +): Promise { + const response = await fetch( + `/api/captain/secrets/resources?kind=${encodeURIComponent(kind)}`, + { + headers: { Accept: "application/json" }, + }, + ); + if (!response.ok) return []; + return (await response.json()) as SecretResource[]; +} + +async function fetchSecretKeyPreview( + kind: SecretKind, + name: string, +): Promise { + const response = await fetch( + `/api/captain/secrets/preview?kind=${encodeURIComponent(kind)}&name=${encodeURIComponent(name)}`, + { headers: { Accept: "application/json" } }, + ); + if (!response.ok) return []; + return (await response.json()) as KeyPreview[]; +} + +async function fetchPromptDetail(op: ResolvedOperation, id: string) { + const response = await apiClient.executeCommand( + op.path, + op.method, + { id }, + { Accept: "application/json" }, + ); + return unwrapResponse(response); +} + +async function submitPromptOperation( + op: ResolvedOperation, + params: Record, + body: Record, +) { + const response = await apiClient.submitForm!( + resolveOperationPath(op.path, params), + op.method, + body, + { Accept: "application/json" }, + ); + return unwrapResponse(response); +} + +async function executePromptOperation( + op: ResolvedOperation, + params: Record, + body: Record, +) { + const response = await apiClient.executeCommand( + op.path, + op.method, + paramsWithPathValues(op.path, params, body), + { Accept: "application/json" }, + ); + return unwrapResponse(response); +} + +function unwrapResponse(response: ExecutionResponse): T { + if (!response.success) { + throw new Error(response.error || response.output || "Operation failed."); + } + return response.parsed as T; +} + +function resolveOperationPath(path: string, params: Record) { + let next = path; + for (const [key, value] of Object.entries(params)) { + next = next.replace(`{${key}}`, encodeURIComponent(value)); + } + return next; +} + +function paramsWithPathValues( + path: string, + pathParams: Record, + params: Record, +) { + const next = { ...params }; + for (const key of path.matchAll(/\{([^{}]+)\}/g)) { + const name = key[1]; + if (name && pathParams[name]) next[name] = pathParams[name]; + } + return next; +} + +function uniqueWritableSources(prompts: PromptSummary[]) { + const seen = new Set(); + const out: Array<{ id: string; label: string }> = []; + for (const prompt of prompts) { + if (!prompt.writable || seen.has(prompt.sourceId)) continue; + seen.add(prompt.sourceId); + out.push({ id: prompt.sourceId, label: prompt.source }); + } + return out; +} + +function normalizeObjectSchema( + schema: Record | undefined, +): JsonSchemaObject | undefined { + if (!schema || typeof schema !== "object") return undefined; + const properties = schema.properties; + if ( + !properties || + typeof properties !== "object" || + Array.isArray(properties) + ) + return undefined; + return { + ...schema, + type: "object", + properties: properties as JsonSchemaObject["properties"], + } as JsonSchemaObject; +} + +// runtime is the single source of truth: the inline PromptRunEditor and its +// "Edit spec" modal both edit this one AISpecRuntimeValue, so the payload is +// just the compacted spec (plus catalog model/backend normalization). +function runtimePayload(runtime: AISpecRuntimeValue, models: ChatModel[]) { + return normalizeSpecRuntimePayload( + buildAISpecRuntimePayload(runtime), + models, + ); +} + +function normalizeSpecRuntimePayload( + payload: Record, + models: ChatModel[], +) { + const spec = payload.spec; + if (!spec || typeof spec !== "object" || Array.isArray(spec)) return payload; + const specRecord = { ...(spec as Record) }; + if (typeof specRecord.model === "string") { + const selected = normalizeRuntimeModel(specRecord.model, models); + if (selected.model && selected.model !== specRecord.model) { + if (typeof specRecord.id !== "string" || !specRecord.id.trim()) { + specRecord.id = specRecord.model; + } + specRecord.model = selected.model; + } + if ( + selected.backend && + (typeof specRecord.backend !== "string" || !specRecord.backend.trim()) + ) { + specRecord.backend = selected.backend; + } + } + return { ...payload, spec: specRecord }; +} + +// Seeds the runtime spec's backend from the prompt (explicit, else inferred from +// the model). The PromptRunEditor derives the family/mode picker from spec.backend. +function runtimeSelectionFromPrompt(prompt: PromptSummary): AISpecRuntimeValue { + const backend = + prompt.backend?.trim() || inferBackendFromModel(prompt.model || ""); + return backend ? { backend } : {}; +} + +function inferBackendFromModel(model: string) { + const value = model.trim().toLowerCase(); + if (!value) return ""; + if (value.startsWith("anthropic/")) return "anthropic"; + if (value.startsWith("openai/")) return "openai"; + if (value.startsWith("googleai/")) return "gemini"; + if (value.startsWith("deepseek/") || value.startsWith("deepseek-")) + return "deepseek"; + if (value.startsWith("claude-agent-")) return "claude-agent"; + if (value.startsWith("claude-code-")) return "claude-cli"; + if (value.startsWith("codex")) return "codex-cli"; + if (value.startsWith("gemini-cli-")) return "gemini-cli"; + if (value.startsWith("claude-")) return "anthropic"; + if (value.startsWith("gemini-") || value.startsWith("models/gemini-")) + return "gemini"; + if ( + value.startsWith("gpt-") || + value.startsWith("o1") || + value.startsWith("o3") || + value.startsWith("o4") + ) { + return "openai"; + } + return ""; +} + +function promptSelectableModels(models: ChatModel[]) { + return models.map((model) => + model.configured === false ? { ...model, configured: true } : model, + ); +} + +function normalizeRuntimeModel(model: string, models: ChatModel[]) { + const id = model.trim(); + if (!id) return { model: "", backend: "" }; + + const selected = models.find((entry) => entry.id === id); + if (!selected) return { model: id, backend: "" }; + + const backend = providerToBackend(selected.provider); + if ( + selected.provider === "anthropic" || + selected.provider === "openai" || + selected.provider === "googleai" || + selected.provider === "deepseek" + ) { + return { model: stripProviderPrefix(id), backend }; + } + if (selected.provider === "codex-cli" && id.startsWith("codex-")) { + return { model: id.slice("codex-".length), backend }; + } + return { model: id, backend }; +} + +function providerToBackend(provider: string) { + switch (provider) { + case "googleai": + return "gemini"; + case "anthropic": + case "openai": + case "deepseek": + case "claude-agent": + case "claude-cli": + case "codex-cli": + case "gemini-cli": + return provider; + default: + return ""; + } +} + +function stripProviderPrefix(model: string) { + const slash = model.indexOf("/"); + return slash >= 0 ? model.slice(slash + 1) : model; +} + +function defaultPromptContent(name: string) { + const promptName = name.trim() || "new prompt"; + return `--- +name: ${JSON.stringify(promptName)} +description: "" +input: + schema: + input: string +--- +{{role "user"}} +{{input}} +`; +} + +function errorMessage(error: unknown) { + if (error instanceof Error) return error.message; + if (typeof error === "string") return error; + return "Unexpected error."; +} diff --git a/pkg/cli/webapp/src/RunningPrompts.tsx b/pkg/cli/webapp/src/RunningPrompts.tsx new file mode 100644 index 0000000..c01eace --- /dev/null +++ b/pkg/cli/webapp/src/RunningPrompts.tsx @@ -0,0 +1,69 @@ +import { useState } from "react"; +import { useTaskRuns } from "@flanksource/clicky-ui/hooks"; +import { TaskManager } from "@flanksource/clicky-ui/data"; + +const TASK_BASE = "/api/captain"; + +/** + * RunningPrompts surfaces in-flight prompt runs, tracked as clicky task groups + * of kind "prompt". Badge is a compact header indicator; RunsTab is the full + * cross-run list backed by clicky's TaskManager. Both share the same task API. + */ +function Badge({ onSelectRun }: { onSelectRun: (id: string) => void }) { + const { runs } = useTaskRuns({ kind: "prompt", status: "running", basePath: TASK_BASE }); + const [open, setOpen] = useState(false); + + if (runs.length === 0) return null; + + return ( +
    + + {open && ( +
    + {runs.map((run) => ( + + ))} +
    + )} +
    + ); +} + +function RunsTab({ + activeRunID, + onSelectRun, +}: { + activeRunID?: string; + onSelectRun: (id: string | undefined) => void; +}) { + return ( +
    + onSelectRun(id ?? undefined)} + /> +
    + ); +} + +export const RunningPrompts = { Badge, RunsTab }; diff --git a/pkg/cli/webapp/src/SessionBrowser.tsx b/pkg/cli/webapp/src/SessionBrowser.tsx index a0d33b5..76ad58b 100644 --- a/pkg/cli/webapp/src/SessionBrowser.tsx +++ b/pkg/cli/webapp/src/SessionBrowser.tsx @@ -1,4 +1,4 @@ -import { useEffect, useMemo, useState, type ReactNode } from "react"; +import { useState, type ReactNode } from "react"; import { useQuery } from "@tanstack/react-query"; import { AppShell, @@ -6,132 +6,166 @@ import { SearchInput, SegmentedControl, Switch, + type AppShellNavSection, } from "@flanksource/clicky-ui/components"; -import { SessionViewer, type SessionEntry } from "@flanksource/clicky-ui/ai"; -import { apiClient } from "./api"; +import { SessionViewer } from "@flanksource/clicky-ui/ai"; +import { CAPTAIN_SIDEBAR_COLLAPSE_KEY } from "./shell"; +import { TimingBadge } from "./TimingBadge"; +import type { TimingMetric } from "./serverTiming"; +import { + SOURCE_OPTIONS, + errorMessage, + fetchLiveSessions, + fetchSession, + formatCompactNumber, + formatCost, + formatTime, + healthClassName, + sessionCostTotal, + sessionTitle, + sessionToolCount, + unifiedSessionTitle, + type SessionDashboard, + type SessionRecord, + type SourceFilter, + type UnifiedSession, +} from "./sessionData"; -type SourceFilter = "all" | "claude" | "codex"; - -type SessionListResult = { - sessions: SessionRecord[]; - total: number; - source: SourceFilter; - scope: "current" | "all"; -}; - -type SessionRecord = { - key: string; - id: string; - source: "claude" | "codex"; - startedAt?: string; - endedAt?: string; - model?: string; - reasoningEffort?: string; - version?: string; - gitBranch?: string; - provider?: string; - cwd?: string; - toolCalls: number; - messages: number; - entries?: SessionEntry[]; -}; +type Navigate = (to: string, opts?: { replace?: boolean }) => void; type SessionBrowserProps = { selectedId?: string; - onNavigate: (to: string, opts?: { replace?: boolean }) => void; - nav: ReactNode; + onNavigate: Navigate; + navSections: AppShellNavSection[]; actions: ReactNode; }; -const SOURCE_OPTIONS = [ - { id: "all", label: "All" }, - { id: "claude", label: "Claude" }, - { id: "codex", label: "Codex" }, -] satisfies Array<{ id: SourceFilter; label: string }>; - export function SessionBrowser({ selectedId, onNavigate, - nav, + navSections, actions, }: SessionBrowserProps) { - const [source, setSource] = useState("all"); - const [allProjects, setAllProjects] = useState(false); - const [query, setQuery] = useState(""); - - const listQuery = useQuery({ - queryKey: ["sessions", source, allProjects, query], - queryFn: () => fetchSessions({ source, allProjects, query }), - }); - const sessions = listQuery.data?.sessions ?? []; - - useEffect(() => { - if (selectedId || sessions.length === 0) return; - onNavigate(`/sessions/${encodeURIComponent(sessions[0].key)}`, { replace: true }); - }, [onNavigate, selectedId, sessions]); - - const selectedSummary = useMemo( - () => sessions.find((session) => session.key === selectedId || session.id === selectedId), - [selectedId, sessions], + return selectedId ? ( + + ) : ( + ); +} +// The detail page is a listing-free view: the dedicated session listing lives on +// /sessions (SessionListPage) and on the home dashboard, so here we render only +// the selected session's header and transcript. +function SessionDetailPage({ + selectedId, + onNavigate, + navSections, + actions, +}: { + selectedId: string; + onNavigate: Navigate; + navSections: AppShellNavSection[]; + actions: ReactNode; +}) { const detailQuery = useQuery({ queryKey: ["session", selectedId], - queryFn: () => fetchSession(String(selectedId)), - enabled: Boolean(selectedId), + queryFn: () => fetchSession(selectedId), }); - const selected = detailQuery.data ?? selectedSummary; return ( Captain} - nav={nav} + navSections={navSections} + collapsedStorageKey={CAPTAIN_SIDEBAR_COLLAPSE_KEY} actions={actions} - bodySidebar={ - onNavigate(`/sessions/${encodeURIComponent(session.key)}`)} - onRefresh={() => void listQuery.refetch()} + bodyHeader={ + } - bodyHeader={} bodyActions={ - +
    + + +
    } - bodySplit={28} contentClassName="p-0 overflow-hidden" >
    ); } -function SessionSidebar({ +function SessionListPage({ + onNavigate, + navSections, + actions, +}: { + onNavigate: Navigate; + navSections: AppShellNavSection[]; + actions: ReactNode; +}) { + const [source, setSource] = useState("all"); + const [allProjects, setAllProjects] = useState(false); + const [query, setQuery] = useState(""); + + const listQuery = useQuery({ + queryKey: ["sessions", source, allProjects, query], + queryFn: () => fetchLiveSessions({ source, allProjects, query }), + }); + const sessions = listQuery.data?.sessions ?? []; + + return ( + Captain} + navSections={navSections} + collapsedStorageKey={CAPTAIN_SIDEBAR_COLLAPSE_KEY} + actions={actions} + bodyHeader={
    Sessions
    } + bodyActions={ + + } + contentClassName="p-0 overflow-hidden" + > + onNavigate(`/sessions/${encodeURIComponent(session.key)}`)} + /> +
    + ); +} + +function SessionList({ source, onSourceChange, allProjects, @@ -139,12 +173,12 @@ function SessionSidebar({ query, onQueryChange, sessions, - selectedId, + summary, + timing, total, loading, error, onSelect, - onRefresh, }: { source: SourceFilter; onSourceChange: (source: SourceFilter) => void; @@ -153,43 +187,36 @@ function SessionSidebar({ query: string; onQueryChange: (query: string) => void; sessions: SessionRecord[]; - selectedId?: string; + summary?: SessionDashboard; + timing?: TimingMetric[]; total: number; loading: boolean; error: unknown; onSelect: (session: SessionRecord) => void; - onRefresh: () => void; }) { return (
    -
    -
    Sessions
    - +
    + + +
    - - - -
    - {loading ? "Loading..." : `${sessions.length} shown / ${total} total`} + +
    + {loading ? "Loading..." : `${sessions.length} shown / ${total} total`} +
    @@ -199,17 +226,18 @@ function SessionSidebar({ ) : sessions.length === 0 && !loading ? (
    No sessions found.
    ) : ( -
    +
    {sessions.map((session) => { - const active = session.key === selectedId || session.id === selectedId; + const detailAvailable = session.detailAvailable !== false; return (