diff --git a/_pagefind/fragment/en_712ea35.pf_fragment b/_pagefind/fragment/en_712ea35.pf_fragment deleted file mode 100644 index 51e9424f..00000000 Binary files a/_pagefind/fragment/en_712ea35.pf_fragment and /dev/null differ diff --git a/_pagefind/fragment/en_89975e1.pf_fragment b/_pagefind/fragment/en_89975e1.pf_fragment new file mode 100644 index 00000000..64d7fb75 Binary files /dev/null and b/_pagefind/fragment/en_89975e1.pf_fragment differ diff --git a/_pagefind/fragment/en_a78368e.pf_fragment b/_pagefind/fragment/en_a78368e.pf_fragment new file mode 100644 index 00000000..99477ccc Binary files /dev/null and b/_pagefind/fragment/en_a78368e.pf_fragment differ diff --git a/_pagefind/fragment/en_afb43dd.pf_fragment b/_pagefind/fragment/en_afb43dd.pf_fragment deleted file mode 100644 index 73a50fe1..00000000 Binary files a/_pagefind/fragment/en_afb43dd.pf_fragment and /dev/null differ diff --git a/_pagefind/fragment/en_bd75262.pf_fragment b/_pagefind/fragment/en_bd75262.pf_fragment deleted file mode 100644 index 64f1b5db..00000000 Binary files a/_pagefind/fragment/en_bd75262.pf_fragment and /dev/null differ diff --git a/_pagefind/fragment/en_d82ee4f.pf_fragment b/_pagefind/fragment/en_d82ee4f.pf_fragment new file mode 100644 index 00000000..e15e3d07 Binary files /dev/null and b/_pagefind/fragment/en_d82ee4f.pf_fragment differ diff --git a/_pagefind/index/en_3c15537.pf_index b/_pagefind/index/en_3c15537.pf_index new file mode 100644 index 00000000..4baa7199 Binary files /dev/null and b/_pagefind/index/en_3c15537.pf_index differ diff --git a/_pagefind/index/en_afda60a.pf_index b/_pagefind/index/en_afda60a.pf_index deleted file mode 100644 index b916eebf..00000000 Binary files a/_pagefind/index/en_afda60a.pf_index and /dev/null differ diff --git a/_pagefind/index/en_c352d87.pf_index b/_pagefind/index/en_c352d87.pf_index new file mode 100644 index 00000000..79870373 Binary files /dev/null and b/_pagefind/index/en_c352d87.pf_index differ diff --git a/_pagefind/index/en_dc4a96a.pf_index b/_pagefind/index/en_dc4a96a.pf_index deleted file mode 100644 index 748b1034..00000000 Binary files a/_pagefind/index/en_dc4a96a.pf_index and /dev/null differ diff --git a/_pagefind/pagefind-entry.json b/_pagefind/pagefind-entry.json index c14bc172..ee96ad9c 100644 --- a/_pagefind/pagefind-entry.json +++ b/_pagefind/pagefind-entry.json @@ -1 +1 @@ -{"version":"1.5.2","languages":{"en":{"hash":"en_0ff25a73f4","wasm":"en","page_count":21}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]} \ No newline at end of file +{"version":"1.5.2","languages":{"en":{"hash":"en_80f5da5232","wasm":"en","page_count":21}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]} \ No newline at end of file diff --git a/_pagefind/pagefind.en_0ff25a73f4.pf_meta b/_pagefind/pagefind.en_0ff25a73f4.pf_meta deleted file mode 100644 index 987d45be..00000000 Binary files a/_pagefind/pagefind.en_0ff25a73f4.pf_meta and /dev/null differ diff --git a/_pagefind/pagefind.en_80f5da5232.pf_meta b/_pagefind/pagefind.en_80f5da5232.pf_meta new file mode 100644 index 00000000..afff5ef9 Binary files /dev/null and b/_pagefind/pagefind.en_80f5da5232.pf_meta differ diff --git a/advanced/json-output/index.html b/advanced/json-output/index.html index 02fef785..c8635cc7 100644 --- a/advanced/json-output/index.html +++ b/advanced/json-output/index.html @@ -7,7 +7,7 @@ - + diff --git a/advanced/subagents/index.html b/advanced/subagents/index.html index d546de76..d5e3f687 100644 --- a/advanced/subagents/index.html +++ b/advanced/subagents/index.html @@ -7,7 +7,7 @@ - + diff --git a/advanced/testing/index.html b/advanced/testing/index.html index 72fcff7b..219e4628 100644 --- a/advanced/testing/index.html +++ b/advanced/testing/index.html @@ -7,7 +7,7 @@ - + diff --git a/assets/commands-UPFOPOAU.js b/assets/commands-BkbgH-ZH.js similarity index 86% rename from assets/commands-UPFOPOAU.js rename to assets/commands-BkbgH-ZH.js index cb356108..d4be3707 100644 --- a/assets/commands-UPFOPOAU.js +++ b/assets/commands-BkbgH-ZH.js @@ -29,6 +29,20 @@ const e={frontmatter:{title:"Commands",description:"Complete reference for all K kit install --all # Install all extensions without prompting

Skills

kit skill                    # Install the Kit extensions skill via skills.sh
+

Skills CLI flags

+

Control which skills are loaded at startup:

+
# Load a specific skill file
+kit --skill path/to/skill.md "prompt"
+
+# Load multiple skill files or directories (flag is repeatable)
+kit --skill ./skill1.md --skill ./skill2.md "prompt"
+
+# Load all skills from a custom directory instead of the default locations
+kit --skills-dir /path/to/skills "prompt"
+
+# Disable all skill loading (auto-discovery and explicit)
+kit --no-skills "prompt"
+

Skills are auto-discovered from ~/.config/kit/skills/, .kit/skills/, and .agents/skills/ by default. Use --skills-dir to override the project-local search root, or --skill to load files explicitly (which disables auto-discovery). --no-skills suppresses all skill loading regardless of other flags.

Interactive slash commands

These commands are available inside the Kit TUI during an interactive session:

@@ -212,7 +226,7 @@ const e={frontmatter:{title:"Commands",description:"Complete reference for all K

ACP server

Run Kit as an ACP (Agent Client Protocol) agent server. ACP-compatible clients communicate with Kit over JSON-RPC 2.0 on stdin/stdout.

kit acp                      # Start as ACP agent
-kit acp --debug              # With debug logging to stderr
`,headings:[{depth:2,text:"Authentication",id:"authentication"},{depth:2,text:"Model database",id:"model-database"},{depth:2,text:"Extension management",id:"extension-management"},{depth:3,text:"Installing extensions from git",id:"installing-extensions-from-git"},{depth:2,text:"Skills",id:"skills"},{depth:2,text:"Interactive slash commands",id:"interactive-slash-commands"},{depth:3,text:"Prompt history",id:"prompt-history"},{depth:3,text:"Cancelling operations",id:"cancelling-operations"},{depth:3,text:"External editor",id:"external-editor"},{depth:3,text:"Mid-turn steering",id:"mid-turn-steering"},{depth:3,text:"Image attachments",id:"image-attachments"},{depth:2,text:"Prompt templates",id:"prompt-templates"},{depth:3,text:"Creating templates",id:"creating-templates"},{depth:3,text:"Using templates",id:"using-templates"},{depth:3,text:"Argument placeholders",id:"argument-placeholders"},{depth:3,text:"CLI flags",id:"cli-flags"},{depth:2,text:"ACP server",id:"acp-server"}],raw:` +kit acp --debug # With debug logging to stderr`,headings:[{depth:2,text:"Authentication",id:"authentication"},{depth:2,text:"Model database",id:"model-database"},{depth:2,text:"Extension management",id:"extension-management"},{depth:3,text:"Installing extensions from git",id:"installing-extensions-from-git"},{depth:2,text:"Skills",id:"skills"},{depth:3,text:"Skills CLI flags",id:"skills-cli-flags"},{depth:2,text:"Interactive slash commands",id:"interactive-slash-commands"},{depth:3,text:"Prompt history",id:"prompt-history"},{depth:3,text:"Cancelling operations",id:"cancelling-operations"},{depth:3,text:"External editor",id:"external-editor"},{depth:3,text:"Mid-turn steering",id:"mid-turn-steering"},{depth:3,text:"Image attachments",id:"image-attachments"},{depth:2,text:"Prompt templates",id:"prompt-templates"},{depth:3,text:"Creating templates",id:"creating-templates"},{depth:3,text:"Using templates",id:"using-templates"},{depth:3,text:"Argument placeholders",id:"argument-placeholders"},{depth:3,text:"CLI flags",id:"cli-flags"},{depth:2,text:"ACP server",id:"acp-server"}],raw:` # Commands ## Authentication @@ -266,6 +280,26 @@ kit install --all # Install all extensions without prompting kit skill # Install the Kit extensions skill via skills.sh \`\`\` +### Skills CLI flags + +Control which skills are loaded at startup: + +\`\`\`bash +# Load a specific skill file +kit --skill path/to/skill.md "prompt" + +# Load multiple skill files or directories (flag is repeatable) +kit --skill ./skill1.md --skill ./skill2.md "prompt" + +# Load all skills from a custom directory instead of the default locations +kit --skills-dir /path/to/skills "prompt" + +# Disable all skill loading (auto-discovery and explicit) +kit --no-skills "prompt" +\`\`\` + +Skills are auto-discovered from \`~/.config/kit/skills/\`, \`.kit/skills/\`, and \`.agents/skills/\` by default. Use \`--skills-dir\` to override the project-local search root, or \`--skill\` to load files explicitly (which disables auto-discovery). \`--no-skills\` suppresses all skill loading regardless of other flags. + ## Interactive slash commands These commands are available inside the Kit TUI during an interactive session: diff --git a/assets/configuration-BOyO9N_c.js b/assets/configuration-wkiRfTFi.js similarity index 78% rename from assets/configuration-BOyO9N_c.js rename to assets/configuration-wkiRfTFi.js index 9818f35d..3a22bf06 100644 --- a/assets/configuration-BOyO9N_c.js +++ b/assets/configuration-wkiRfTFi.js @@ -143,6 +143,24 @@ const e={frontmatter:{title:"Configuration",description:"Configure Kit using con + + + + + + + + + + + + + + + + + +
Specific template to load by name
no-skillsboolfalseDisable skill loading (auto-discovery and explicit)
skilllistExplicit skill files or directories to load (disables auto-discovery)
skills-dirstringOverride the project-local directory used for skill auto-discovery

Environment variables

@@ -466,4 +484,4 @@ plug in a progress callback — see SDK options
  • Config file (model:, thinking-level:)
  • Saved preferences (~/.config/kit/preferences.yml)
  • Default values
  • -`,headings:[{depth:2,text:"Basic configuration",id:"basic-configuration"},{depth:2,text:"All configuration keys",id:"all-configuration-keys"},{depth:2,text:"Environment variables",id:"environment-variables"},{depth:2,text:"MCP server configuration",id:"mcp-server-configuration"},{depth:3,text:"MCP server fields",id:"mcp-server-fields"},{depth:3,text:"MCP tasks (long-running tools)",id:"mcp-tasks-long-running-tools"},{depth:2,text:"Custom models",id:"custom-models"},{depth:3,text:"Custom model fields",id:"custom-model-fields"},{depth:2,text:"Per-model settings",id:"per-model-settings"},{depth:3,text:"Per-model fields",id:"per-model-fields"},{depth:3,text:"Precedence summary",id:"precedence-summary"},{depth:2,text:"Theme configuration",id:"theme-configuration"},{depth:2,text:"Preferences persistence",id:"preferences-persistence"}],raw:'\n# Configuration\n\nKit looks for configuration in the following locations, in order of priority:\n\n1. CLI flags\n2. Environment variables (with `KIT_` prefix)\n3. `./.kit.yml` / `./.kit.yaml` / `./.kit.json` (project-local)\n4. `~/.kit.yml` / `~/.kit.yaml` / `~/.kit.json` (global)\n\n## Basic configuration\n\nCreate `~/.kit.yml`:\n\n```yaml\nmodel: anthropic/claude-sonnet-latest\nmax-tokens: 8192\ntemperature: 0.7\nstream: true\n```\n\n## All configuration keys\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `model` | string | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `max-tokens` | int | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model\'s catalog ceiling is higher and no explicit value is set. Use [`modelSettings[provider/model].maxTokens`](#per-model-settings) to override per-model. |\n| `temperature` | float | `0.7` | Randomness 0.0–1.0 |\n| `top-p` | float | `0.95` | Nucleus sampling 0.0–1.0 |\n| `top-k` | int | `40` | Limit top K tokens |\n| `stream` | bool | `true` | Enable streaming output |\n| `debug` | bool | `false` | Enable debug logging |\n| `compact` | bool | `false` | Enable compact output mode |\n| `system-prompt` | string | — | System prompt text or file path |\n| `max-steps` | int | `0` | Maximum agent steps (0 = unlimited) |\n| `thinking-level` | string | `off` | Extended thinking: off, none, minimal, low, medium, high |\n| `provider-api-key` | string | — | API key for the provider |\n| `provider-url` | string | — | Base URL for provider API |\n| `tls-skip-verify` | bool | `false` | Skip TLS certificate verification |\n| `frequency-penalty` | float | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `presence-penalty` | float | `0.0` | Penalize present tokens (0.0–2.0) |\n| `stop-sequences` | list | — | Custom stop sequences |\n| `theme` | object or string | — | UI theme ([inline overrides or file path](/themes)) |\n| `prompt-templates` | bool | `true` | Enable prompt template loading |\n| `prompt-template` | string | — | Specific template to load by name |\n\n## Environment variables\n\nAny configuration key can be set via environment variable with the `KIT_` prefix. Hyphens become underscores:\n\n```bash\nexport KIT_MODEL="openai/gpt-4o"\nexport KIT_MAX_TOKENS="8192"\nexport KIT_TEMPERATURE="0.5"\n```\n\nProvider API keys use their own environment variables:\n\n```bash\nexport ANTHROPIC_API_KEY="sk-..."\nexport OPENAI_API_KEY="sk-..."\nexport GOOGLE_API_KEY="..."\n```\n\n## MCP server configuration\n\nAdd external MCP servers to your `.kit.yml`:\n\n```yaml\nmcpServers:\n filesystem:\n type: local\n command: ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed"]\n environment:\n LOG_LEVEL: "info"\n allowedTools: ["read_file", "write_file"]\n excludedTools: ["delete_file"]\n\n search:\n type: remote\n url: "https://mcp.example.com/search"\n\n pubmed:\n type: remote\n url: "https://pubmed.mcp.example.com"\n noOAuth: true # skip OAuth for public servers\n headers:\n - "ApiKey: ${env://API_KEY}" # required env var\n - "X-Tenant: ${env://TENANT_ID:-default}" # with fallback default\n\n builds:\n type: remote\n url: "https://builds.mcp.example.com"\n tasksMode: always # always run tools/call as async tasks (Phase 1 MVP)\n```\n\n### MCP server fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `type` | string | `local` (stdio) or `remote` (streamable HTTP) |\n| `command` | list | Command and args for local servers |\n| `environment` | map | Environment variables for the server process |\n| `url` | string | URL for remote servers |\n| `allowedTools` | list | Whitelist of tool names to expose |\n| `excludedTools` | list | Blacklist of tool names to hide |\n| `noOAuth` | bool | Skip OAuth for this server (for public servers that don\'t require auth) |\n| `headers` | list of strings | HTTP headers to attach to every request, each as a `"Key: Value"` string. Values support env-substitution: `${env://VAR}` or `${env://VAR:-default}`. |\n| `tasksMode` | string | When to augment `tools/call` with MCP task metadata: `auto` (default — only when the server advertises task support), `never`, or `always`. See [MCP tasks](#mcp-tasks-long-running-tools). |\n\nA legacy format with `transport`, `args`, and `env` fields is also supported; `headers` works in both the current and legacy formats.\n\n### MCP tasks (long-running tools)\n\nKit advertises [MCP task support](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks)\nduring `initialize` so servers can respond to `tools/call` with a\n`CreateTaskResult` (a task ID + `working` status) instead of blocking until\nthe operation finishes. Kit then polls `tasks/get` / `tasks/result` until the\ntask reaches a terminal state, and best-effort `tasks/cancel`s on context\ncancellation.\n\nThis avoids HTTP/SSE proxy timeouts on long builds, deploys, and batch jobs,\nand lets the user/agent abort cleanly with Ctrl-C.\n\n**Per-server `tasksMode`:**\n\n| Value | Behaviour |\n|-------|-----------|\n| `auto` (default) | Augment `tools/call` with task metadata only when the server advertised `tasks/toolCalls` capability. Servers that don\'t advertise it run synchronously, exactly as before. |\n| `never` | Always issue `tools/call` synchronously, regardless of server capability. |\n| `always` | Always opt into task augmentation, even when the server didn\'t advertise the capability. The server may still respond synchronously — this just expresses client intent unconditionally. |\n\nDefaults are safe: any existing MCP server keeps its previous behaviour\nbit-for-bit. SDK consumers can also override the mode programmatically and\nplug in a progress callback — see [SDK options](/sdk/options#mcp-tasks).\n\n## Custom models\n\nDefine custom models in your `.kit.yml` for use with the `custom` provider. This is useful for self-hosted models or API endpoints not in the built-in database:\n\n```yaml\ncustomModels:\n my-model:\n name: "My Custom Model"\n baseUrl: "http://localhost:8080/v1"\n apiKey: "my-secret-key"\n reasoning: true\n temperature: true\n cost:\n input: 0.002\n output: 0.004\n limit:\n context: 128000\n output: 32000\n```\n\n### Custom model fields\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `name` | string | Yes | Display name for the model |\n| `baseUrl` | string | No | Per-model base URL override; when set, `--provider-url` is not required |\n| `apiKey` | string | No | Per-model API key override |\n| `reasoning` | bool | No | Whether the model supports reasoning/thinking |\n| `temperature` | bool | No | Whether the model supports temperature adjustment |\n| `cost.input` | float | No | Cost per 1K input tokens |\n| `cost.output` | float | No | Cost per 1K output tokens |\n| `limit.context` | int | Yes | Maximum context window in tokens |\n| `limit.output` | int | No | Maximum output tokens |\n\nUse with a per-model `baseUrl` (no `--provider-url` needed):\n\n```bash\nkit --model custom/my-model "Hello"\n```\n\nOr override the base URL at runtime:\n\n```bash\nkit --provider-url "http://localhost:8080/v1" --model custom/my-model "Hello"\n```\n\nWhen `--provider-url` is specified without `--model`, Kit defaults to `custom/custom` which has zero cost tracking and a 262K context window.\n\n## Per-model settings\n\nOverride generation parameters and system prompt on a per-model basis using `modelSettings`:\n\n```yaml\nmodelSettings:\n anthropic/claude-sonnet-4-5-20250929:\n temperature: 0.3\n maxTokens: 8192\n systemPrompt: "You are a concise coding assistant."\n openai/gpt-4o:\n temperature: 0.7\n frequencyPenalty: 0.5\n```\n\n### Per-model fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `temperature` | float | Temperature override for this model |\n| `maxTokens` | int | Max output tokens override |\n| `topP` | float | Top-p override |\n| `topK` | int | Top-k override |\n| `frequencyPenalty` | float | Frequency penalty override |\n| `presencePenalty` | float | Presence penalty override |\n| `stopSequences` | list | Stop sequences override |\n| `thinkingLevel` | string | Thinking level override |\n| `systemPrompt` | string | Per-model system prompt (used when no explicit prompt is set) |\n\nSettings from `modelSettings` and `customModels.params` act as model-level defaults — explicit CLI flags, `KIT_*` environment variables, global config values, and SDK `Options.*` fields all take precedence over them.\n\nWhen switching models via `/model` or `SetModel()`, if the new model has a per-model system prompt and no custom global prompt was set, the per-model prompt automatically replaces the previous one.\n\n### Precedence summary\n\nFor the generation and provider parameters documented above, the resolved value at runtime comes from the first source that sets it:\n\n1. CLI flag (e.g. `--max-tokens`, `--temperature`, `--provider-api-key`)\n2. SDK `Options.X` when embedding Kit as a library (`kit.Options.MaxTokens`, `Temperature`, `ProviderAPIKey`, etc.)\n3. `KIT_*` environment variable (`KIT_MAX_TOKENS`, `KIT_TEMPERATURE`, ...)\n4. `.kit.yml` / `.kit.yaml` / `.kit.json` (project-local, then global)\n5. Per-model defaults (`modelSettings[provider/model]` / `customModels[...].params`)\n6. Provider-level defaults (e.g. Anthropic\'s own temperature default)\n7. SDK last-resort floor — currently an 8192 output-token ceiling matching the CLI `--max-tokens` default, auto-raised per-model up to 32768 when the model\'s catalog ceiling is higher\n\nSee the [SDK options reference](/sdk/options) for the full list of `kit.Options` fields that map to these keys.\n\n## Theme configuration\n\n```yaml\n# Inline partial overrides (unspecified fields inherit from default)\ntheme:\n primary:\n light: "#8839ef"\n dark: "#cba6f7"\n error:\n dark: "#FF0000"\n```\n\n```yaml\n# Reference external theme file\ntheme: "./themes/my-custom-theme.yml"\n```\n\nSee [Themes](/themes) for the full theme file format, built-in themes, and the extension theme API.\n\n## Preferences persistence\n\nKit automatically saves your UI preferences across sessions to `~/.config/kit/preferences.yml`:\n\n- **Theme** — Set via `/theme ` or `ctx.SetTheme()`\n- **Model** — Set via `/model ` or the model selector\n- **Thinking level** — Set via `/thinking ` or Shift+Tab cycling\n\nThese preferences are restored on next launch. Precedence (highest to lowest):\n1. CLI flags (`--model`, `--thinking-level`)\n2. Config file (`model:`, `thinking-level:`)\n3. Saved preferences (`~/.config/kit/preferences.yml`)\n4. Default values\n'};export{e as default}; +`,headings:[{depth:2,text:"Basic configuration",id:"basic-configuration"},{depth:2,text:"All configuration keys",id:"all-configuration-keys"},{depth:2,text:"Environment variables",id:"environment-variables"},{depth:2,text:"MCP server configuration",id:"mcp-server-configuration"},{depth:3,text:"MCP server fields",id:"mcp-server-fields"},{depth:3,text:"MCP tasks (long-running tools)",id:"mcp-tasks-long-running-tools"},{depth:2,text:"Custom models",id:"custom-models"},{depth:3,text:"Custom model fields",id:"custom-model-fields"},{depth:2,text:"Per-model settings",id:"per-model-settings"},{depth:3,text:"Per-model fields",id:"per-model-fields"},{depth:3,text:"Precedence summary",id:"precedence-summary"},{depth:2,text:"Theme configuration",id:"theme-configuration"},{depth:2,text:"Preferences persistence",id:"preferences-persistence"}],raw:'\n# Configuration\n\nKit looks for configuration in the following locations, in order of priority:\n\n1. CLI flags\n2. Environment variables (with `KIT_` prefix)\n3. `./.kit.yml` / `./.kit.yaml` / `./.kit.json` (project-local)\n4. `~/.kit.yml` / `~/.kit.yaml` / `~/.kit.json` (global)\n\n## Basic configuration\n\nCreate `~/.kit.yml`:\n\n```yaml\nmodel: anthropic/claude-sonnet-latest\nmax-tokens: 8192\ntemperature: 0.7\nstream: true\n```\n\n## All configuration keys\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `model` | string | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `max-tokens` | int | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model\'s catalog ceiling is higher and no explicit value is set. Use [`modelSettings[provider/model].maxTokens`](#per-model-settings) to override per-model. |\n| `temperature` | float | `0.7` | Randomness 0.0–1.0 |\n| `top-p` | float | `0.95` | Nucleus sampling 0.0–1.0 |\n| `top-k` | int | `40` | Limit top K tokens |\n| `stream` | bool | `true` | Enable streaming output |\n| `debug` | bool | `false` | Enable debug logging |\n| `compact` | bool | `false` | Enable compact output mode |\n| `system-prompt` | string | — | System prompt text or file path |\n| `max-steps` | int | `0` | Maximum agent steps (0 = unlimited) |\n| `thinking-level` | string | `off` | Extended thinking: off, none, minimal, low, medium, high |\n| `provider-api-key` | string | — | API key for the provider |\n| `provider-url` | string | — | Base URL for provider API |\n| `tls-skip-verify` | bool | `false` | Skip TLS certificate verification |\n| `frequency-penalty` | float | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `presence-penalty` | float | `0.0` | Penalize present tokens (0.0–2.0) |\n| `stop-sequences` | list | — | Custom stop sequences |\n| `theme` | object or string | — | UI theme ([inline overrides or file path](/themes)) |\n| `prompt-templates` | bool | `true` | Enable prompt template loading |\n| `prompt-template` | string | — | Specific template to load by name |\n| `no-skills` | bool | `false` | Disable skill loading (auto-discovery and explicit) |\n| `skill` | list | — | Explicit skill files or directories to load (disables auto-discovery) |\n| `skills-dir` | string | — | Override the project-local directory used for skill auto-discovery |\n\n## Environment variables\n\nAny configuration key can be set via environment variable with the `KIT_` prefix. Hyphens become underscores:\n\n```bash\nexport KIT_MODEL="openai/gpt-4o"\nexport KIT_MAX_TOKENS="8192"\nexport KIT_TEMPERATURE="0.5"\n```\n\nProvider API keys use their own environment variables:\n\n```bash\nexport ANTHROPIC_API_KEY="sk-..."\nexport OPENAI_API_KEY="sk-..."\nexport GOOGLE_API_KEY="..."\n```\n\n## MCP server configuration\n\nAdd external MCP servers to your `.kit.yml`:\n\n```yaml\nmcpServers:\n filesystem:\n type: local\n command: ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed"]\n environment:\n LOG_LEVEL: "info"\n allowedTools: ["read_file", "write_file"]\n excludedTools: ["delete_file"]\n\n search:\n type: remote\n url: "https://mcp.example.com/search"\n\n pubmed:\n type: remote\n url: "https://pubmed.mcp.example.com"\n noOAuth: true # skip OAuth for public servers\n headers:\n - "ApiKey: ${env://API_KEY}" # required env var\n - "X-Tenant: ${env://TENANT_ID:-default}" # with fallback default\n\n builds:\n type: remote\n url: "https://builds.mcp.example.com"\n tasksMode: always # always run tools/call as async tasks (Phase 1 MVP)\n```\n\n### MCP server fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `type` | string | `local` (stdio) or `remote` (streamable HTTP) |\n| `command` | list | Command and args for local servers |\n| `environment` | map | Environment variables for the server process |\n| `url` | string | URL for remote servers |\n| `allowedTools` | list | Whitelist of tool names to expose |\n| `excludedTools` | list | Blacklist of tool names to hide |\n| `noOAuth` | bool | Skip OAuth for this server (for public servers that don\'t require auth) |\n| `headers` | list of strings | HTTP headers to attach to every request, each as a `"Key: Value"` string. Values support env-substitution: `${env://VAR}` or `${env://VAR:-default}`. |\n| `tasksMode` | string | When to augment `tools/call` with MCP task metadata: `auto` (default — only when the server advertises task support), `never`, or `always`. See [MCP tasks](#mcp-tasks-long-running-tools). |\n\nA legacy format with `transport`, `args`, and `env` fields is also supported; `headers` works in both the current and legacy formats.\n\n### MCP tasks (long-running tools)\n\nKit advertises [MCP task support](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks)\nduring `initialize` so servers can respond to `tools/call` with a\n`CreateTaskResult` (a task ID + `working` status) instead of blocking until\nthe operation finishes. Kit then polls `tasks/get` / `tasks/result` until the\ntask reaches a terminal state, and best-effort `tasks/cancel`s on context\ncancellation.\n\nThis avoids HTTP/SSE proxy timeouts on long builds, deploys, and batch jobs,\nand lets the user/agent abort cleanly with Ctrl-C.\n\n**Per-server `tasksMode`:**\n\n| Value | Behaviour |\n|-------|-----------|\n| `auto` (default) | Augment `tools/call` with task metadata only when the server advertised `tasks/toolCalls` capability. Servers that don\'t advertise it run synchronously, exactly as before. |\n| `never` | Always issue `tools/call` synchronously, regardless of server capability. |\n| `always` | Always opt into task augmentation, even when the server didn\'t advertise the capability. The server may still respond synchronously — this just expresses client intent unconditionally. |\n\nDefaults are safe: any existing MCP server keeps its previous behaviour\nbit-for-bit. SDK consumers can also override the mode programmatically and\nplug in a progress callback — see [SDK options](/sdk/options#mcp-tasks).\n\n## Custom models\n\nDefine custom models in your `.kit.yml` for use with the `custom` provider. This is useful for self-hosted models or API endpoints not in the built-in database:\n\n```yaml\ncustomModels:\n my-model:\n name: "My Custom Model"\n baseUrl: "http://localhost:8080/v1"\n apiKey: "my-secret-key"\n reasoning: true\n temperature: true\n cost:\n input: 0.002\n output: 0.004\n limit:\n context: 128000\n output: 32000\n```\n\n### Custom model fields\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `name` | string | Yes | Display name for the model |\n| `baseUrl` | string | No | Per-model base URL override; when set, `--provider-url` is not required |\n| `apiKey` | string | No | Per-model API key override |\n| `reasoning` | bool | No | Whether the model supports reasoning/thinking |\n| `temperature` | bool | No | Whether the model supports temperature adjustment |\n| `cost.input` | float | No | Cost per 1K input tokens |\n| `cost.output` | float | No | Cost per 1K output tokens |\n| `limit.context` | int | Yes | Maximum context window in tokens |\n| `limit.output` | int | No | Maximum output tokens |\n\nUse with a per-model `baseUrl` (no `--provider-url` needed):\n\n```bash\nkit --model custom/my-model "Hello"\n```\n\nOr override the base URL at runtime:\n\n```bash\nkit --provider-url "http://localhost:8080/v1" --model custom/my-model "Hello"\n```\n\nWhen `--provider-url` is specified without `--model`, Kit defaults to `custom/custom` which has zero cost tracking and a 262K context window.\n\n## Per-model settings\n\nOverride generation parameters and system prompt on a per-model basis using `modelSettings`:\n\n```yaml\nmodelSettings:\n anthropic/claude-sonnet-4-5-20250929:\n temperature: 0.3\n maxTokens: 8192\n systemPrompt: "You are a concise coding assistant."\n openai/gpt-4o:\n temperature: 0.7\n frequencyPenalty: 0.5\n```\n\n### Per-model fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `temperature` | float | Temperature override for this model |\n| `maxTokens` | int | Max output tokens override |\n| `topP` | float | Top-p override |\n| `topK` | int | Top-k override |\n| `frequencyPenalty` | float | Frequency penalty override |\n| `presencePenalty` | float | Presence penalty override |\n| `stopSequences` | list | Stop sequences override |\n| `thinkingLevel` | string | Thinking level override |\n| `systemPrompt` | string | Per-model system prompt (used when no explicit prompt is set) |\n\nSettings from `modelSettings` and `customModels.params` act as model-level defaults — explicit CLI flags, `KIT_*` environment variables, global config values, and SDK `Options.*` fields all take precedence over them.\n\nWhen switching models via `/model` or `SetModel()`, if the new model has a per-model system prompt and no custom global prompt was set, the per-model prompt automatically replaces the previous one.\n\n### Precedence summary\n\nFor the generation and provider parameters documented above, the resolved value at runtime comes from the first source that sets it:\n\n1. CLI flag (e.g. `--max-tokens`, `--temperature`, `--provider-api-key`)\n2. SDK `Options.X` when embedding Kit as a library (`kit.Options.MaxTokens`, `Temperature`, `ProviderAPIKey`, etc.)\n3. `KIT_*` environment variable (`KIT_MAX_TOKENS`, `KIT_TEMPERATURE`, ...)\n4. `.kit.yml` / `.kit.yaml` / `.kit.json` (project-local, then global)\n5. Per-model defaults (`modelSettings[provider/model]` / `customModels[...].params`)\n6. Provider-level defaults (e.g. Anthropic\'s own temperature default)\n7. SDK last-resort floor — currently an 8192 output-token ceiling matching the CLI `--max-tokens` default, auto-raised per-model up to 32768 when the model\'s catalog ceiling is higher\n\nSee the [SDK options reference](/sdk/options) for the full list of `kit.Options` fields that map to these keys.\n\n## Theme configuration\n\n```yaml\n# Inline partial overrides (unspecified fields inherit from default)\ntheme:\n primary:\n light: "#8839ef"\n dark: "#cba6f7"\n error:\n dark: "#FF0000"\n```\n\n```yaml\n# Reference external theme file\ntheme: "./themes/my-custom-theme.yml"\n```\n\nSee [Themes](/themes) for the full theme file format, built-in themes, and the extension theme API.\n\n## Preferences persistence\n\nKit automatically saves your UI preferences across sessions to `~/.config/kit/preferences.yml`:\n\n- **Theme** — Set via `/theme ` or `ctx.SetTheme()`\n- **Model** — Set via `/model ` or the model selector\n- **Thinking level** — Set via `/thinking ` or Shift+Tab cycling\n\nThese preferences are restored on next launch. Precedence (highest to lowest):\n1. CLI flags (`--model`, `--thinking-level`)\n2. Config file (`model:`, `thinking-level:`)\n3. Saved preferences (`~/.config/kit/preferences.yml`)\n4. Default values\n'};export{e as default}; diff --git a/assets/flags-DBc7n5J6.js b/assets/flags-BA8a7myk.js similarity index 59% rename from assets/flags-DBc7n5J6.js rename to assets/flags-BA8a7myk.js index 5eba8a36..dc0330ff 100644 --- a/assets/flags-DBc7n5J6.js +++ b/assets/flags-BA8a7myk.js @@ -167,6 +167,37 @@ const t={frontmatter:{title:"Global Flags",description:"Complete reference for a +

    Skills

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FlagShortDefaultDescription
    --skillLoad skill file or directory (repeatable)
    --skills-dirOverride the project-local skills directory for auto-discovery
    --no-skillsfalseDisable skill loading (auto-discovery and explicit)

    Generation parameters

    @@ -258,4 +289,4 @@ const t={frontmatter:{title:"Global Flags",description:"Complete reference for a -
    Enable debug logging
    `,headings:[{depth:2,text:"Model and provider",id:"model-and-provider"},{depth:2,text:"Session management",id:"session-management"},{depth:2,text:"Behavior",id:"behavior"},{depth:2,text:"Extensions",id:"extensions"},{depth:2,text:"Generation parameters",id:"generation-parameters"},{depth:2,text:"System",id:"system"}],raw:"\n# Global Flags\n\nAll flags can be passed to the root `kit` command.\n\n## Model and provider\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--model` | `-m` | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `--provider-api-key` | — | — | API key for the provider |\n| `--provider-url` | — | — | Base URL for provider API |\n| `--tls-skip-verify` | — | `false` | Skip TLS certificate verification |\n\n## Session management\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--session` | `-s` | — | Open specific JSONL session file |\n| `--continue` | `-c` | `false` | Resume most recent session for current directory |\n| `--resume` | `-r` | `false` | Interactive session picker |\n| `--no-session` | — | `false` | Ephemeral mode, no persistence |\n\n## Behavior\n\nThese flags control Kit's behavior. When a prompt is passed as a positional argument, Kit runs in non-interactive mode.\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--quiet` | — | `false` | Suppress all output (non-interactive only) |\n| `--json` | — | `false` | Output response as JSON (non-interactive only) |\n| `--no-exit` | — | `false` | Enter interactive mode after prompt completes |\n| `--max-steps` | — | `0` | Maximum agent steps (0 for unlimited) |\n| `--stream` | — | `true` | Enable streaming output |\n| `--compact` | — | `false` | Enable compact output mode |\n| `--auto-compact` | — | `false` | Auto-compact conversation near context limit |\n\n## Extensions\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--extension` | `-e` | — | Load additional extension file(s) (repeatable) |\n| `--no-extensions` | — | `false` | Disable all extensions |\n| `--prompt-template` | — | — | Load a specific prompt template by name |\n| `--no-prompt-templates` | — | `false` | Disable prompt template loading |\n\n## Generation parameters\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--max-tokens` | — | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model's catalog ceiling is higher and no explicit value is set. |\n| `--temperature` | — | `0.7` | Randomness 0.0–1.0 |\n| `--top-p` | — | `0.95` | Nucleus sampling 0.0–1.0 |\n| `--top-k` | — | `40` | Limit top K tokens |\n| `--stop-sequences` | — | — | Custom stop sequences (comma-separated) |\n| `--frequency-penalty` | — | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `--presence-penalty` | — | `0.0` | Penalize present tokens (0.0–2.0) |\n| `--thinking-level` | — | `off` | Extended thinking level: off, none, minimal, low, medium, high |\n\n## System\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--config` | — | `~/.kit.yml` | Config file path |\n| `--system-prompt` | — | — | System prompt text or file path |\n| `--debug` | — | `false` | Enable debug logging |\n"};export{t as default}; +`,headings:[{depth:2,text:"Model and provider",id:"model-and-provider"},{depth:2,text:"Session management",id:"session-management"},{depth:2,text:"Behavior",id:"behavior"},{depth:2,text:"Extensions",id:"extensions"},{depth:2,text:"Skills",id:"skills"},{depth:2,text:"Generation parameters",id:"generation-parameters"},{depth:2,text:"System",id:"system"}],raw:"\n# Global Flags\n\nAll flags can be passed to the root `kit` command.\n\n## Model and provider\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--model` | `-m` | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `--provider-api-key` | — | — | API key for the provider |\n| `--provider-url` | — | — | Base URL for provider API |\n| `--tls-skip-verify` | — | `false` | Skip TLS certificate verification |\n\n## Session management\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--session` | `-s` | — | Open specific JSONL session file |\n| `--continue` | `-c` | `false` | Resume most recent session for current directory |\n| `--resume` | `-r` | `false` | Interactive session picker |\n| `--no-session` | — | `false` | Ephemeral mode, no persistence |\n\n## Behavior\n\nThese flags control Kit's behavior. When a prompt is passed as a positional argument, Kit runs in non-interactive mode.\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--quiet` | — | `false` | Suppress all output (non-interactive only) |\n| `--json` | — | `false` | Output response as JSON (non-interactive only) |\n| `--no-exit` | — | `false` | Enter interactive mode after prompt completes |\n| `--max-steps` | — | `0` | Maximum agent steps (0 for unlimited) |\n| `--stream` | — | `true` | Enable streaming output |\n| `--compact` | — | `false` | Enable compact output mode |\n| `--auto-compact` | — | `false` | Auto-compact conversation near context limit |\n\n## Extensions\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--extension` | `-e` | — | Load additional extension file(s) (repeatable) |\n| `--no-extensions` | — | `false` | Disable all extensions |\n| `--prompt-template` | — | — | Load a specific prompt template by name |\n| `--no-prompt-templates` | — | `false` | Disable prompt template loading |\n\n## Skills\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--skill` | — | — | Load skill file or directory (repeatable) |\n| `--skills-dir` | — | — | Override the project-local skills directory for auto-discovery |\n| `--no-skills` | — | `false` | Disable skill loading (auto-discovery and explicit) |\n\n## Generation parameters\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--max-tokens` | — | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model's catalog ceiling is higher and no explicit value is set. |\n| `--temperature` | — | `0.7` | Randomness 0.0–1.0 |\n| `--top-p` | — | `0.95` | Nucleus sampling 0.0–1.0 |\n| `--top-k` | — | `40` | Limit top K tokens |\n| `--stop-sequences` | — | — | Custom stop sequences (comma-separated) |\n| `--frequency-penalty` | — | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `--presence-penalty` | — | `0.0` | Penalize present tokens (0.0–2.0) |\n| `--thinking-level` | — | `off` | Extended thinking level: off, none, minimal, low, medium, high |\n\n## System\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--config` | — | `~/.kit.yml` | Config file path |\n| `--system-prompt` | — | — | System prompt text or file path |\n| `--debug` | — | `false` | Enable debug logging |\n"};export{t as default}; diff --git a/assets/index-CvQQgDnR.js b/assets/index-EtDEWCgb.js similarity index 60% rename from assets/index-CvQQgDnR.js rename to assets/index-EtDEWCgb.js index 8948a162..ee5ecf67 100644 --- a/assets/index-CvQQgDnR.js +++ b/assets/index-EtDEWCgb.js @@ -1,4 +1,4 @@ -(function(){const p=document.createElement("link").relList;if(p&&p.supports&&p.supports("modulepreload"))return;for(const v of document.querySelectorAll('link[rel="modulepreload"]'))c(v);new MutationObserver(v=>{for(const E of v)if(E.type==="childList")for(const j of E.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&c(j)}).observe(document,{childList:!0,subtree:!0});function d(v){const E={};return v.integrity&&(E.integrity=v.integrity),v.referrerPolicy&&(E.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?E.credentials="include":v.crossOrigin==="anonymous"?E.credentials="omit":E.credentials="same-origin",E}function c(v){if(v.ep)return;v.ep=!0;const E=d(v);fetch(v.href,E)}})();function zp(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var qu={exports:{}},ii={};/** +(function(){const p=document.createElement("link").relList;if(p&&p.supports&&p.supports("modulepreload"))return;for(const v of document.querySelectorAll('link[rel="modulepreload"]'))c(v);new MutationObserver(v=>{for(const E of v)if(E.type==="childList")for(const j of E.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&c(j)}).observe(document,{childList:!0,subtree:!0});function d(v){const E={};return v.integrity&&(E.integrity=v.integrity),v.referrerPolicy&&(E.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?E.credentials="include":v.crossOrigin==="anonymous"?E.credentials="omit":E.credentials="same-origin",E}function c(v){if(v.ep)return;v.ep=!0;const E=d(v);fetch(v.href,E)}})();function Cp(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var qu={exports:{}},ii={};/** * @license React * react-jsx-runtime.production.js * @@ -14,7 +14,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Xd;function jp(){if(Xd)return ot;Xd=1;var u=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),j=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),K=Symbol.iterator;function nt(m){return m===null||typeof m!="object"?null:(m=K&&m[K]||m["@@iterator"],typeof m=="function"?m:null)}var xt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ot=Object.assign,At={};function W(m,k,H){this.props=m,this.context=k,this.refs=At,this.updater=H||xt}W.prototype.isReactComponent={},W.prototype.setState=function(m,k){if(typeof m!="object"&&typeof m!="function"&&m!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,k,"setState")},W.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function I(){}I.prototype=W.prototype;function ct(m,k,H){this.props=m,this.context=k,this.refs=At,this.updater=H||xt}var Q=ct.prototype=new I;Q.constructor=ct,Ot(Q,W.prototype),Q.isPureReactComponent=!0;var Y=Array.isArray;function L(){}var U={H:null,A:null,T:null,S:null},at=Object.prototype.hasOwnProperty;function lt(m,k,H){var q=H.ref;return{$$typeof:u,type:m,key:k,ref:q!==void 0?q:null,props:H}}function P(m,k){return lt(m.type,k,m.props)}function mt(m){return typeof m=="object"&&m!==null&&m.$$typeof===u}function tt(m){var k={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(H){return k[H]})}var jt=/\/+/g;function $t(m,k){return typeof m=="object"&&m!==null&&m.key!=null?tt(""+m.key):k.toString(36)}function ft(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(L,L):(m.status="pending",m.then(function(k){m.status==="pending"&&(m.status="fulfilled",m.value=k)},function(k){m.status==="pending"&&(m.status="rejected",m.reason=k)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function M(m,k,H,q,it){var rt=typeof m;(rt==="undefined"||rt==="boolean")&&(m=null);var Et=!1;if(m===null)Et=!0;else switch(rt){case"bigint":case"string":case"number":Et=!0;break;case"object":switch(m.$$typeof){case u:case p:Et=!0;break;case G:return Et=m._init,M(Et(m._payload),k,H,q,it)}}if(Et)return it=it(m),Et=q===""?"."+$t(m,0):q,Y(it)?(H="",Et!=null&&(H=Et.replace(jt,"$&/")+"/"),M(it,k,H,"",function(Ze){return Ze})):it!=null&&(mt(it)&&(it=P(it,H+(it.key==null||m&&m.key===it.key?"":(""+it.key).replace(jt,"$&/")+"/")+Et)),k.push(it)),1;Et=0;var It=q===""?".":q+":";if(Y(m))for(var Ut=0;Ut>>1,Tt=M[J];if(0>>1;Jv(H,Z))qv(it,H)?(M[J]=it,M[q]=Z,J=q):(M[J]=H,M[k]=Z,J=k);else if(qv(it,Z))M[J]=it,M[q]=Z,J=q;else break t}}return B}function v(M,B){var Z=M.sortIndex-B.sortIndex;return Z!==0?Z:M.id-B.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var E=performance;u.unstable_now=function(){return E.now()}}else{var j=Date,D=j.now();u.unstable_now=function(){return j.now()-D}}var z=[],y=[],G=1,R=null,K=3,nt=!1,xt=!1,Ot=!1,At=!1,W=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,ct=typeof setImmediate<"u"?setImmediate:null;function Q(M){for(var B=d(y);B!==null;){if(B.callback===null)c(y);else if(B.startTime<=M)c(y),B.sortIndex=B.expirationTime,p(z,B);else break;B=d(y)}}function Y(M){if(Ot=!1,Q(M),!xt)if(d(z)!==null)xt=!0,L||(L=!0,tt());else{var B=d(y);B!==null&&ft(Y,B.startTime-M)}}var L=!1,U=-1,at=5,lt=-1;function P(){return At?!0:!(u.unstable_now()-ltM&&P());){var J=R.callback;if(typeof J=="function"){R.callback=null,K=R.priorityLevel;var Tt=J(R.expirationTime<=M);if(M=u.unstable_now(),typeof Tt=="function"){R.callback=Tt,Q(M),B=!0;break e}R===d(z)&&c(z),Q(M)}else c(z);R=d(z)}if(R!==null)B=!0;else{var m=d(y);m!==null&&ft(Y,m.startTime-M),B=!1}}break t}finally{R=null,K=Z,nt=!1}B=void 0}}finally{B?tt():L=!1}}}var tt;if(typeof ct=="function")tt=function(){ct(mt)};else if(typeof MessageChannel<"u"){var jt=new MessageChannel,$t=jt.port2;jt.port1.onmessage=mt,tt=function(){$t.postMessage(null)}}else tt=function(){W(mt,0)};function ft(M,B){U=W(function(){M(u.unstable_now())},B)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(M){M.callback=null},u.unstable_forceFrameRate=function(M){0>M||125J?(M.sortIndex=Z,p(y,M),d(z)===null&&M===d(y)&&(Ot?(I(U),U=-1):Ot=!0,ft(Y,Z-J))):(M.sortIndex=Tt,p(z,M),xt||nt||(xt=!0,L||(L=!0,tt()))),M},u.unstable_shouldYield=P,u.unstable_wrapCallback=function(M){var B=K;return function(){var Z=K;K=B;try{return M.apply(this,arguments)}finally{K=Z}}}})(Xu)),Xu}var Zd;function kp(){return Zd||(Zd=1,Ku.exports=_p()),Ku.exports}var Qu={exports:{}},re={};/** + */var Vd;function kp(){return Vd||(Vd=1,(function(u){function p(M,B){var Z=M.length;M.push(B);t:for(;0>>1,Tt=M[J];if(0>>1;Jv(H,Z))qv(it,H)?(M[J]=it,M[q]=Z,J=q):(M[J]=H,M[_]=Z,J=_);else if(qv(it,Z))M[J]=it,M[q]=Z,J=q;else break t}}return B}function v(M,B){var Z=M.sortIndex-B.sortIndex;return Z!==0?Z:M.id-B.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var E=performance;u.unstable_now=function(){return E.now()}}else{var j=Date,D=j.now();u.unstable_now=function(){return j.now()-D}}var C=[],y=[],G=1,R=null,K=3,nt=!1,xt=!1,Ot=!1,At=!1,W=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,ct=typeof setImmediate<"u"?setImmediate:null;function Q(M){for(var B=d(y);B!==null;){if(B.callback===null)c(y);else if(B.startTime<=M)c(y),B.sortIndex=B.expirationTime,p(C,B);else break;B=d(y)}}function Y(M){if(Ot=!1,Q(M),!xt)if(d(C)!==null)xt=!0,L||(L=!0,tt());else{var B=d(y);B!==null&&ft(Y,B.startTime-M)}}var L=!1,U=-1,lt=5,at=-1;function P(){return At?!0:!(u.unstable_now()-atM&&P());){var J=R.callback;if(typeof J=="function"){R.callback=null,K=R.priorityLevel;var Tt=J(R.expirationTime<=M);if(M=u.unstable_now(),typeof Tt=="function"){R.callback=Tt,Q(M),B=!0;break e}R===d(C)&&c(C),Q(M)}else c(C);R=d(C)}if(R!==null)B=!0;else{var m=d(y);m!==null&&ft(Y,m.startTime-M),B=!1}}break t}finally{R=null,K=Z,nt=!1}B=void 0}}finally{B?tt():L=!1}}}var tt;if(typeof ct=="function")tt=function(){ct(mt)};else if(typeof MessageChannel<"u"){var jt=new MessageChannel,$t=jt.port2;jt.port1.onmessage=mt,tt=function(){$t.postMessage(null)}}else tt=function(){W(mt,0)};function ft(M,B){U=W(function(){M(u.unstable_now())},B)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(M){M.callback=null},u.unstable_forceFrameRate=function(M){0>M||125J?(M.sortIndex=Z,p(y,M),d(C)===null&&M===d(y)&&(Ot?(I(U),U=-1):Ot=!0,ft(Y,Z-J))):(M.sortIndex=Tt,p(C,M),xt||nt||(xt=!0,L||(L=!0,tt()))),M},u.unstable_shouldYield=P,u.unstable_wrapCallback=function(M){var B=K;return function(){var Z=K;K=B;try{return M.apply(this,arguments)}finally{K=Z}}}})(Xu)),Xu}var Zd;function _p(){return Zd||(Zd=1,Ku.exports=kp()),Ku.exports}var Qu={exports:{}},re={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Jd;function Op(){if(Jd)return re;Jd=1;var u=$u();function p(z){var y="https://react.dev/errors/"+z;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(p){console.error(p)}}return u(),Qu.exports=Op(),Qu.exports}/** + */var Jd;function Op(){if(Jd)return re;Jd=1;var u=$u();function p(C){var y="https://react.dev/errors/"+C;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(p){console.error(p)}}return u(),Qu.exports=Op(),Qu.exports}/** * @license React * react-dom-client.production.js * @@ -38,24 +38,24 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Fd;function Rp(){if(Fd)return oi;Fd=1;var u=kp(),p=$u(),d=Dp();function c(t){var e="https://react.dev/errors/"+t;if(1Tt||(t.current=J[Tt],J[Tt]=null,Tt--)}function H(t,e){Tt++,J[Tt]=t.current,t.current=e}var q=m(null),it=m(null),rt=m(null),Et=m(null);function It(t,e){switch(H(rt,e),H(it,t),H(q,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?fd(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=fd(e),t=dd(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}k(q),H(q,t)}function Ut(){k(q),k(it),k(rt)}function Ze(t){t.memoizedState!==null&&H(Et,t);var e=q.current,n=dd(e,t.type);e!==n&&(H(it,t),H(q,n))}function ha(t){it.current===t&&(k(q),k(it)),Et.current===t&&(k(Et),ei._currentValue=Z)}var pa,rl;function Je(t){if(pa===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);pa=e&&e[1]||"",rl=-1Tt||(t.current=J[Tt],J[Tt]=null,Tt--)}function H(t,e){Tt++,J[Tt]=t.current,t.current=e}var q=m(null),it=m(null),rt=m(null),Et=m(null);function It(t,e){switch(H(rt,e),H(it,t),H(q,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?fd(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=fd(e),t=dd(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}_(q),H(q,t)}function Ut(){_(q),_(it),_(rt)}function Ze(t){t.memoizedState!==null&&H(Et,t);var e=q.current,n=dd(e,t.type);e!==n&&(H(it,t),H(q,n))}function hl(t){it.current===t&&(_(q),_(it)),Et.current===t&&(_(Et),ei._currentValue=Z)}var pl,ra;function Je(t){if(pl===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);pl=e&&e[1]||"",ra=-1)":-1l||f[a]!==S[l]){var A=` -`+f[a].replace(" at new "," at ");return t.displayName&&A.includes("")&&(A=A.replace("",t.displayName)),A}while(1<=a&&0<=l);break}}}finally{cl=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Je(n):""}function Oo(t,e){switch(t.tag){case 26:case 27:case 5:return Je(t.type);case 16:return Je("Lazy");case 13:return t.child!==e&&e!==null?Je("Suspense Fallback"):Je("Suspense");case 19:return Je("SuspenseList");case 0:case 15:return ga(t.type,!1);case 11:return ga(t.type.render,!1);case 1:return ga(t.type,!0);case 31:return Je("Activity");default:return""}}function We(t){try{var e="",n=null;do e+=Oo(t,n),n=t,t=t.return;while(t);return e}catch(a){return` -Error generating stack: `+a.message+` -`+a.stack}}var Fn=Object.prototype.hasOwnProperty,fl=u.unstable_scheduleCallback,va=u.unstable_cancelCallback,Do=u.unstable_shouldYield,si=u.unstable_requestPaint,se=u.unstable_now,ui=u.unstable_getCurrentPriorityLevel,te=u.unstable_ImmediatePriority,ya=u.unstable_UserBlockingPriority,xn=u.unstable_NormalPriority,Sn=u.unstable_LowPriority,ri=u.unstable_IdlePriority,Pu=u.log,ba=u.unstable_setDisableYieldValue,ye=null,ue=null;function Ae(t){if(typeof Pu=="function"&&ba(t),ue&&typeof ue.setStrictMode=="function")try{ue.setStrictMode(ye,t)}catch{}}var ee=Math.clz32?Math.clz32:Sa,ci=Math.log,xa=Math.LN2;function Sa(t){return t>>>=0,t===0?32:31-(ci(t)/xa|0)|0}var Fe=256,$e=262144,Ie=4194304;function Pe(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ta(t,e,n){var a=t.pendingLanes;if(a===0)return 0;var l=0,i=t.suspendedLanes,o=t.pingedLanes;t=t.warmLanes;var r=a&134217727;return r!==0?(a=r&~i,a!==0?l=Pe(a):(o&=r,o!==0?l=Pe(o):n||(n=r&~t,n!==0&&(l=Pe(n))))):(r=a&~i,r!==0?l=Pe(r):o!==0?l=Pe(o):n||(n=a&~t,n!==0&&(l=Pe(n)))),l===0?0:e!==0&&e!==l&&(e&i)===0&&(i=l&-l,n=e&-e,i>=n||i===32&&(n&4194048)!==0)?e:l}function Tn(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function He(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32: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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ea(){var t=Ie;return Ie<<=1,(Ie&62914560)===0&&(Ie=4194304),t}function Ca(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function En(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function fi(t,e,n,a,l,i){var o=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var r=t.entanglements,f=t.expirationTimes,S=t.hiddenUpdates;for(n=o&~n;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var bm=/[\n"\\]/g;function _e(t){return t.replace(bm,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function wo(t,e,n,a,l,i,o,r){t.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.type=o:t.removeAttribute("type"),e!=null?o==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+je(e)):t.value!==""+je(e)&&(t.value=""+je(e)):o!=="submit"&&o!=="reset"||t.removeAttribute("value"),e!=null?Bo(t,o,je(e)):n!=null?Bo(t,o,je(n)):a!=null&&t.removeAttribute("value"),l==null&&i!=null&&(t.defaultChecked=!!i),l!=null&&(t.checked=l&&typeof l!="function"&&typeof l!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?t.name=""+je(r):t.removeAttribute("name")}function lr(t,e,n,a,l,i,o,r){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){Ro(t);return}n=n!=null?""+je(n):"",e=e!=null?""+je(e):n,r||e===t.value||(t.value=e),t.defaultValue=e}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=r?t.checked:!!a,t.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(t.name=o),Ro(t)}function Bo(t,e,n){e==="number"&&vi(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function _a(t,e,n,a){if(t=t.options,e){e={};for(var l=0;l"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qo=!1;if(an)try{var bl={};Object.defineProperty(bl,"passive",{get:function(){qo=!0}}),window.addEventListener("test",bl,bl),window.removeEventListener("test",bl,bl)}catch{qo=!1}var zn=null,Go=null,bi=null;function fr(){if(bi)return bi;var t,e=Go,n=e.length,a,l="value"in zn?zn.value:zn.textContent,i=l.length;for(t=0;t=Tl),vr=" ",yr=!1;function br(t,e){switch(t){case"keyup":return Zm.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xr(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ra=!1;function Wm(t,e){switch(t){case"compositionend":return xr(e);case"keypress":return e.which!==32?null:(yr=!0,vr);case"textInput":return t=e.data,t===vr&&yr?null:t;default:return null}}function Fm(t,e){if(Ra)return t==="compositionend"||!Vo&&br(t,e)?(t=fr(),bi=Go=zn=null,Ra=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=a}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=jr(n)}}function kr(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?kr(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Or(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=vi(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=vi(t.document)}return e}function Wo(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var lh=an&&"documentMode"in document&&11>=document.documentMode,wa=null,Fo=null,Ml=null,$o=!1;function Dr(t,e,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$o||wa==null||wa!==vi(a)||(a=wa,"selectionStart"in a&&Wo(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ml&&zl(Ml,a)||(Ml=a,a=mo(Fo,"onSelect"),0>=o,l-=o,Ke=1<<32-ee(e)+l|n<ut?(vt=V,V=null):vt=V.sibling;var zt=T(g,V,x[ut],_);if(zt===null){V===null&&(V=vt);break}t&&V&&zt.alternate===null&&e(g,V),h=i(zt,h,ut),Ct===null?F=zt:Ct.sibling=zt,Ct=zt,V=vt}if(ut===x.length)return n(g,V),bt&&on(g,ut),F;if(V===null){for(;utut?(vt=V,V=null):vt=V.sibling;var Zn=T(g,V,zt.value,_);if(Zn===null){V===null&&(V=vt);break}t&&V&&Zn.alternate===null&&e(g,V),h=i(Zn,h,ut),Ct===null?F=Zn:Ct.sibling=Zn,Ct=Zn,V=vt}if(zt.done)return n(g,V),bt&&on(g,ut),F;if(V===null){for(;!zt.done;ut++,zt=x.next())zt=O(g,zt.value,_),zt!==null&&(h=i(zt,h,ut),Ct===null?F=zt:Ct.sibling=zt,Ct=zt);return bt&&on(g,ut),F}for(V=a(V);!zt.done;ut++,zt=x.next())zt=C(V,g,ut,zt.value,_),zt!==null&&(t&&zt.alternate!==null&&V.delete(zt.key===null?ut:zt.key),h=i(zt,h,ut),Ct===null?F=zt:Ct.sibling=zt,Ct=zt);return t&&V.forEach(function(Cp){return e(g,Cp)}),bt&&on(g,ut),F}function wt(g,h,x,_){if(typeof x=="object"&&x!==null&&x.type===Ot&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case nt:t:{for(var F=x.key;h!==null;){if(h.key===F){if(F=x.type,F===Ot){if(h.tag===7){n(g,h.sibling),_=l(h,x.props.children),_.return=g,g=_;break t}}else if(h.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===at&&sa(F)===h.type){n(g,h.sibling),_=l(h,x.props),Dl(_,x),_.return=g,g=_;break t}n(g,h);break}else e(g,h);h=h.sibling}x.type===Ot?(_=na(x.props.children,g.mode,_,x.key),_.return=g,g=_):(_=_i(x.type,x.key,x.props,null,g.mode,_),Dl(_,x),_.return=g,g=_)}return o(g);case xt:t:{for(F=x.key;h!==null;){if(h.key===F)if(h.tag===4&&h.stateNode.containerInfo===x.containerInfo&&h.stateNode.implementation===x.implementation){n(g,h.sibling),_=l(h,x.children||[]),_.return=g,g=_;break t}else{n(g,h);break}else e(g,h);h=h.sibling}_=ls(x,g.mode,_),_.return=g,g=_}return o(g);case at:return x=sa(x),wt(g,h,x,_)}if(ft(x))return X(g,h,x,_);if(tt(x)){if(F=tt(x),typeof F!="function")throw Error(c(150));return x=F.call(x),$(g,h,x,_)}if(typeof x.then=="function")return wt(g,h,Ui(x),_);if(x.$$typeof===ct)return wt(g,h,Di(g,x),_);Li(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,h!==null&&h.tag===6?(n(g,h.sibling),_=l(h,x),_.return=g,g=_):(n(g,h),_=as(x,g.mode,_),_.return=g,g=_),o(g)):n(g,h)}return function(g,h,x,_){try{Ol=0;var F=wt(g,h,x,_);return Qa=null,F}catch(V){if(V===Xa||V===wi)throw V;var Ct=xe(29,V,null,g.mode);return Ct.lanes=_,Ct.return=g,Ct}finally{}}}var ra=ec(!0),nc=ec(!1),kn=!1;function gs(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vs(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function On(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Dn(t,e,n){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(Mt&2)!==0){var l=a.pending;return l===null?e.next=e:(e.next=l.next,l.next=e),a.pending=e,e=ji(t),Nr(t,null,n),e}return Ai(t,a,e,n),ji(t)}function Rl(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,ml(t,n)}}function ys(t,e){var n=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=e:i=i.next=e}else l=i=e;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var bs=!1;function wl(){if(bs){var t=Ka;if(t!==null)throw t}}function Bl(t,e,n,a){bs=!1;var l=t.updateQueue;kn=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,r=l.shared.pending;if(r!==null){l.shared.pending=null;var f=r,S=f.next;f.next=null,o===null?i=S:o.next=S,o=f;var A=t.alternate;A!==null&&(A=A.updateQueue,r=A.lastBaseUpdate,r!==o&&(r===null?A.firstBaseUpdate=S:r.next=S,A.lastBaseUpdate=f))}if(i!==null){var O=l.baseState;o=0,A=S=f=null,r=i;do{var T=r.lane&-536870913,C=T!==r.lane;if(C?(gt&T)===T:(a&T)===T){T!==0&&T===Ya&&(bs=!0),A!==null&&(A=A.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});t:{var X=t,$=r;T=e;var wt=n;switch($.tag){case 1:if(X=$.payload,typeof X=="function"){O=X.call(wt,O,T);break t}O=X;break t;case 3:X.flags=X.flags&-65537|128;case 0:if(X=$.payload,T=typeof X=="function"?X.call(wt,O,T):X,T==null)break t;O=R({},O,T);break t;case 2:kn=!0}}T=r.callback,T!==null&&(t.flags|=64,C&&(t.flags|=8192),C=l.callbacks,C===null?l.callbacks=[T]:C.push(T))}else C={lane:T,tag:r.tag,payload:r.payload,callback:r.callback,next:null},A===null?(S=A=C,f=O):A=A.next=C,o|=T;if(r=r.next,r===null){if(r=l.shared.pending,r===null)break;C=r,r=C.next,C.next=null,l.lastBaseUpdate=C,l.shared.pending=null}}while(!0);A===null&&(f=O),l.baseState=f,l.firstBaseUpdate=S,l.lastBaseUpdate=A,i===null&&(l.shared.lanes=0),Ln|=o,t.lanes=o,t.memoizedState=O}}function ac(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function lc(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;ti?i:8;var o=M.T,r={};M.T=r,Hs(t,!1,e,n);try{var f=l(),S=M.S;if(S!==null&&S(r,f),f!==null&&typeof f=="object"&&typeof f.then=="function"){var A=mh(f,a);Hl(t,e,A,ze(t))}else Hl(t,e,a,ze(t))}catch(O){Hl(t,e,{then:function(){},status:"rejected",reason:O},ze())}finally{B.p=i,o!==null&&r.types!==null&&(o.types=r.types),M.T=o}}function bh(){}function Us(t,e,n,a){if(t.tag!==5)throw Error(c(476));var l=Uc(t).queue;Bc(t,l,e,Z,n===null?bh:function(){return Lc(t),n(a)})}function Uc(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:Z},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Lc(t){var e=Uc(t);e.next===null&&(e=t.alternate.memoizedState),Hl(t,e.next.queue,{},ze())}function Ls(){return le(ei)}function Hc(){return Xt().memoizedState}function Nc(){return Xt().memoizedState}function xh(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=ze();t=On(n);var a=Dn(e,t,n);a!==null&&(ve(a,e,n),Rl(a,e,n)),e={cache:ds()},t.payload=e;return}e=e.return}}function Sh(t,e,n){var a=ze();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zi(t)?Gc(e,n):(n=es(t,e,n,a),n!==null&&(ve(n,t,a),Yc(n,e,a)))}function qc(t,e,n){var a=ze();Hl(t,e,n,a)}function Hl(t,e,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zi(t))Gc(e,l);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,r=i(o,n);if(l.hasEagerState=!0,l.eagerState=r,be(r,o))return Ai(t,e,l,0),Bt===null&&Mi(),!1}catch{}finally{}if(n=es(t,e,l,a),n!==null)return ve(n,t,a),Yc(n,e,a),!0}return!1}function Hs(t,e,n,a){if(a={lane:2,revertLane:gu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Zi(t)){if(e)throw Error(c(479))}else e=es(t,n,a,2),e!==null&&ve(e,t,2)}function Zi(t){var e=t.alternate;return t===st||e!==null&&e===st}function Gc(t,e){Za=qi=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Yc(t,e,n){if((n&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,ml(t,n)}}var Nl={readContext:le,use:Ki,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};Nl.useEffectEvent=Gt;var Kc={readContext:le,use:Ki,useCallback:function(t,e){return fe().memoizedState=[t,e===void 0?null:e],t},useContext:le,useEffect:Mc,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Qi(4194308,4,kc.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Qi(4194308,4,t,e)},useInsertionEffect:function(t,e){Qi(4,2,t,e)},useMemo:function(t,e){var n=fe();e=e===void 0?null:e;var a=t();if(ca){Ae(!0);try{t()}finally{Ae(!1)}}return n.memoizedState=[a,e],a},useReducer:function(t,e,n){var a=fe();if(n!==void 0){var l=n(e);if(ca){Ae(!0);try{n(e)}finally{Ae(!1)}}}else l=e;return a.memoizedState=a.baseState=l,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:l},a.queue=t,t=t.dispatch=Sh.bind(null,st,t),[a.memoizedState,t]},useRef:function(t){var e=fe();return t={current:t},e.memoizedState=t},useState:function(t){t=Os(t);var e=t.queue,n=qc.bind(null,st,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:ws,useDeferredValue:function(t,e){var n=fe();return Bs(n,t,e)},useTransition:function(){var t=Os(!1);return t=Bc.bind(null,st,t.queue,!0,!1),fe().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var a=st,l=fe();if(bt){if(n===void 0)throw Error(c(407));n=n()}else{if(n=e(),Bt===null)throw Error(c(349));(gt&127)!==0||cc(a,e,n)}l.memoizedState=n;var i={value:n,getSnapshot:e};return l.queue=i,Mc(dc.bind(null,a,i,t),[t]),a.flags|=2048,Wa(9,{destroy:void 0},fc.bind(null,a,i,n,e),null),n},useId:function(){var t=fe(),e=Bt.identifierPrefix;if(bt){var n=Xe,a=Ke;n=(a&~(1<<32-ee(a)-1)).toString(32)+n,e="_"+e+"R_"+n,n=Gi++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?o.createElement(l,{is:a.is}):o.createElement(l)}}i[Qt]=e,i[ne]=a;t:for(o=e.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break t;for(;o.sibling===null;){if(o.return===null||o.return===e)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}e.stateNode=i;t:switch(oe(i,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&dn(e)}}return Ht(e),Is(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&dn(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(c(166));if(t=rt.current,qa(e)){if(t=e.stateNode,n=e.memoizedProps,a=null,l=ae,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}t[Qt]=e,t=!!(t.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||rd(t.nodeValue,n)),t||jn(e,!0)}else t=ho(t).createTextNode(a),t[Qt]=e,e.stateNode=t}return Ht(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(a=qa(e),n!==null){if(t===null){if(!a)throw Error(c(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(557));t[Qt]=e}else aa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ht(e),t=!1}else n=us(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(Te(e),e):(Te(e),null);if((e.flags&128)!==0)throw Error(c(558))}return Ht(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(l=qa(e),a!==null&&a.dehydrated!==null){if(t===null){if(!l)throw Error(c(318));if(l=e.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(c(317));l[Qt]=e}else aa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ht(e),l=!1}else l=us(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),l=!0;if(!l)return e.flags&256?(Te(e),e):(Te(e),null)}return Te(e),(e.flags&128)!==0?(e.lanes=n,e):(n=a!==null,t=t!==null&&t.memoizedState!==null,n&&(a=e.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==l&&(a.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),Ii(e,e.updateQueue),Ht(e),null);case 4:return Ut(),t===null&&xu(e.stateNode.containerInfo),Ht(e),null;case 10:return un(e.type),Ht(e),null;case 19:if(k(Kt),a=e.memoizedState,a===null)return Ht(e),null;if(l=(e.flags&128)!==0,i=a.rendering,i===null)if(l)Gl(a,!1);else{if(Yt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=Ni(t),i!==null){for(e.flags|=128,Gl(a,!1),t=i.updateQueue,e.updateQueue=t,Ii(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)qr(n,t),n=n.sibling;return H(Kt,Kt.current&1|2),bt&&on(e,a.treeForkCount),e.child}t=t.sibling}a.tail!==null&&se()>ao&&(e.flags|=128,l=!0,Gl(a,!1),e.lanes=4194304)}else{if(!l)if(t=Ni(i),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Ii(e,t),Gl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!bt)return Ht(e),null}else 2*se()-a.renderingStartTime>ao&&n!==536870912&&(e.flags|=128,l=!0,Gl(a,!1),e.lanes=4194304);a.isBackwards?(i.sibling=e.child,e.child=i):(t=a.last,t!==null?t.sibling=i:e.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=se(),t.sibling=null,n=Kt.current,H(Kt,l?n&1|2:n&1),bt&&on(e,a.treeForkCount),t):(Ht(e),null);case 22:case 23:return Te(e),Ss(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(n&536870912)!==0&&(e.flags&128)===0&&(Ht(e),e.subtreeFlags&6&&(e.flags|=8192)):Ht(e),n=e.updateQueue,n!==null&&Ii(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==n&&(e.flags|=2048),t!==null&&k(oa),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),un(Vt),Ht(e),null;case 25:return null;case 30:return null}throw Error(c(156,e.tag))}function Mh(t,e){switch(os(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return un(Vt),Ut(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return ha(e),null;case 31:if(e.memoizedState!==null){if(Te(e),e.alternate===null)throw Error(c(340));aa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Te(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));aa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return k(Kt),null;case 4:return Ut(),null;case 10:return un(e.type),null;case 22:case 23:return Te(e),Ss(),t!==null&&k(oa),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return un(Vt),null;case 25:return null;default:return null}}function hf(t,e){switch(os(e),e.tag){case 3:un(Vt),Ut();break;case 26:case 27:case 5:ha(e);break;case 4:Ut();break;case 31:e.memoizedState!==null&&Te(e);break;case 13:Te(e);break;case 19:k(Kt);break;case 10:un(e.type);break;case 22:case 23:Te(e),Ss(),t!==null&&k(oa);break;case 24:un(Vt)}}function Yl(t,e){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&t)===t){a=void 0;var i=n.create,o=n.inst;a=i(),o.destroy=a}n=n.next}while(n!==l)}}catch(r){kt(e,e.return,r)}}function Bn(t,e,n){try{var a=e.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&t)===t){var o=a.inst,r=o.destroy;if(r!==void 0){o.destroy=void 0,l=e;var f=n,S=r;try{S()}catch(A){kt(l,f,A)}}}a=a.next}while(a!==i)}}catch(A){kt(e,e.return,A)}}function pf(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{lc(e,n)}catch(a){kt(t,t.return,a)}}}function gf(t,e,n){n.props=fa(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(a){kt(t,e,a)}}function Kl(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}typeof n=="function"?t.refCleanup=n(a):n.current=a}}catch(l){kt(t,e,l)}}function Qe(t,e){var n=t.ref,a=t.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){kt(t,e,l)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){kt(t,e,l)}else n.current=null}function vf(t){var e=t.type,n=t.memoizedProps,a=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break t;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){kt(t,t.return,l)}}function Ps(t,e,n){try{var a=t.stateNode;Jh(a,t.type,n,e),a[ne]=e}catch(l){kt(t,t.return,l)}}function yf(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Yn(t.type)||t.tag===4}function tu(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||yf(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Yn(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function eu(t,e,n){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=nn));else if(a!==4&&(a===27&&Yn(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(eu(t,e,n),t=t.sibling;t!==null;)eu(t,e,n),t=t.sibling}function Pi(t,e,n){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(a!==4&&(a===27&&Yn(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Pi(t,e,n),t=t.sibling;t!==null;)Pi(t,e,n),t=t.sibling}function bf(t){var e=t.stateNode,n=t.memoizedProps;try{for(var a=t.type,l=e.attributes;l.length;)e.removeAttributeNode(l[0]);oe(e,a,n),e[Qt]=t,e[ne]=n}catch(i){kt(t,t.return,i)}}var mn=!1,Wt=!1,nu=!1,xf=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function Ah(t,e){if(t=t.containerInfo,Eu=So,t=Or(t),Wo(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break t}var o=0,r=-1,f=-1,S=0,A=0,O=t,T=null;e:for(;;){for(var C;O!==n||l!==0&&O.nodeType!==3||(r=o+l),O!==i||a!==0&&O.nodeType!==3||(f=o+a),O.nodeType===3&&(o+=O.nodeValue.length),(C=O.firstChild)!==null;)T=O,O=C;for(;;){if(O===t)break e;if(T===n&&++S===l&&(r=o),T===i&&++A===a&&(f=o),(C=O.nextSibling)!==null)break;O=T,T=O.parentNode}O=C}n=r===-1||f===-1?null:{start:r,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Cu={focusedElem:t,selectionRange:n},So=!1,Pt=e;Pt!==null;)if(e=Pt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pt=t;else for(;Pt!==null;){switch(e=Pt,i=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n title"))),oe(i,a,n),i[Qt]=t,yt(i),a=i;break t;case"link":var o=Md("link","href",l).get(a+(n.href||""));if(o){for(var r=0;rwt&&(o=wt,wt=$,$=o);var g=_r(r,$),h=_r(r,wt);if(g&&h&&(C.rangeCount!==1||C.anchorNode!==g.node||C.anchorOffset!==g.offset||C.focusNode!==h.node||C.focusOffset!==h.offset)){var x=O.createRange();x.setStart(g.node,g.offset),C.removeAllRanges(),$>wt?(C.addRange(x),C.extend(h.node,h.offset)):(x.setEnd(h.node,h.offset),C.addRange(x))}}}}for(O=[],C=r;C=C.parentNode;)C.nodeType===1&&O.push({element:C,left:C.scrollLeft,top:C.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;rn?32:n,M.T=null,n=ru,ru=null;var i=Nn,o=yn;if(Ft=0,tl=Nn=null,yn=0,(Mt&6)!==0)throw Error(c(331));var r=Mt;if(Mt|=4,Of(i.current),jf(i,i.current,o,n),Mt=r,Wl(0,!1),ue&&typeof ue.onPostCommitFiberRoot=="function")try{ue.onPostCommitFiberRoot(ye,i)}catch{}return!0}finally{B.p=l,M.T=a,Wf(t,e)}}function $f(t,e,n){e=Oe(n,e),e=Ys(t.stateNode,e,2),t=Dn(t,e,2),t!==null&&(En(t,2),Ve(t))}function kt(t,e,n){if(t.tag===3)$f(t,t,n);else for(;e!==null;){if(e.tag===3){$f(e,t,n);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Hn===null||!Hn.has(a))){t=Oe(n,t),n=$c(2),a=Dn(e,n,2),a!==null&&(Ic(n,a,e,t),En(a,2),Ve(a));break}}e=e.return}}function mu(t,e,n){var a=t.pingCache;if(a===null){a=t.pingCache=new kh;var l=new Set;a.set(e,l)}else l=a.get(e),l===void 0&&(l=new Set,a.set(e,l));l.has(n)||(iu=!0,l.add(n),t=Bh.bind(null,t,e,n),e.then(t,t))}function Bh(t,e,n){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Bt===t&&(gt&n)===n&&(Yt===4||Yt===3&&(gt&62914560)===gt&&300>se()-no?(Mt&2)===0&&el(t,0):ou|=n,Pa===gt&&(Pa=0)),Ve(t)}function If(t,e){e===0&&(e=Ea()),t=ea(t,e),t!==null&&(En(t,e),Ve(t))}function Uh(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),If(t,n)}function Lh(t,e){var n=0;switch(t.tag){case 31:case 13:var a=t.stateNode,l=t.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(e),If(t,n)}function Hh(t,e){return fl(t,e)}var ro=null,al=null,hu=!1,co=!1,pu=!1,Gn=0;function Ve(t){t!==al&&t.next===null&&(al===null?ro=al=t:al=al.next=t),co=!0,hu||(hu=!0,qh())}function Wl(t,e){if(!pu&&co){pu=!0;do for(var n=!1,a=ro;a!==null;){if(t!==0){var l=a.pendingLanes;if(l===0)var i=0;else{var o=a.suspendedLanes,r=a.pingedLanes;i=(1<<31-ee(42|t)+1)-1,i&=l&~(o&~r),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,nd(a,i))}else i=gt,i=Ta(a,a===Bt?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Tn(a,i)||(n=!0,nd(a,i));a=a.next}while(n);pu=!1}}function Nh(){Pf()}function Pf(){co=hu=!1;var t=0;Gn!==0&&Fh()&&(t=Gn);for(var e=se(),n=null,a=ro;a!==null;){var l=a.next,i=td(a,e);i===0?(a.next=null,n===null?ro=l:n.next=l,l===null&&(al=n)):(n=a,(t!==0||(i&3)!==0)&&(co=!0)),a=l}Ft!==0&&Ft!==5||Wl(t),Gn!==0&&(Gn=0)}function td(t,e){for(var n=t.suspendedLanes,a=t.pingedLanes,l=t.expirationTimes,i=t.pendingLanes&-62914561;0r)break;var A=f.transferSize,O=f.initiatorType;A&&cd(O)&&(f=f.responseEnd,o+=A*(f"u"?null:document;function Td(t,e,n){var a=ll;if(a&&typeof e=="string"&&e){var l=_e(e);l='link[rel="'+t+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Sd.has(l)||(Sd.add(l),t={rel:t,crossOrigin:n,href:e},a.querySelector(l)===null&&(e=a.createElement("link"),oe(e,"link",t),yt(e),a.head.appendChild(e)))}}function ip(t){bn.D(t),Td("dns-prefetch",t,null)}function op(t,e){bn.C(t,e),Td("preconnect",t,e)}function sp(t,e,n){bn.L(t,e,n);var a=ll;if(a&&t&&e){var l='link[rel="preload"][as="'+_e(e)+'"]';e==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+_e(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+_e(n.imageSizes)+'"]')):l+='[href="'+_e(t)+'"]';var i=l;switch(e){case"style":i=il(t);break;case"script":i=ol(t)}Le.has(i)||(t=R({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Le.set(i,t),a.querySelector(l)!==null||e==="style"&&a.querySelector(Pl(i))||e==="script"&&a.querySelector(ti(i))||(e=a.createElement("link"),oe(e,"link",t),yt(e),a.head.appendChild(e)))}}function up(t,e){bn.m(t,e);var n=ll;if(n&&t){var a=e&&typeof e.as=="string"?e.as:"script",l='link[rel="modulepreload"][as="'+_e(a)+'"][href="'+_e(t)+'"]',i=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ol(t)}if(!Le.has(i)&&(t=R({rel:"modulepreload",href:t},e),Le.set(i,t),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ti(i)))return}a=n.createElement("link"),oe(a,"link",t),yt(a),n.head.appendChild(a)}}}function rp(t,e,n){bn.S(t,e,n);var a=ll;if(a&&t){var l=St(a).hoistableStyles,i=il(t);e=e||"default";var o=l.get(i);if(!o){var r={loading:0,preload:null};if(o=a.querySelector(Pl(i)))r.loading=5;else{t=R({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Le.get(i))&&Ou(t,n);var f=o=a.createElement("link");yt(f),oe(f,"link",t),f._p=new Promise(function(S,A){f.onload=S,f.onerror=A}),f.addEventListener("load",function(){r.loading|=1}),f.addEventListener("error",function(){r.loading|=2}),r.loading|=4,go(o,e,a)}o={type:"stylesheet",instance:o,count:1,state:r},l.set(i,o)}}}function cp(t,e){bn.X(t,e);var n=ll;if(n&&t){var a=St(n).hoistableScripts,l=ol(t),i=a.get(l);i||(i=n.querySelector(ti(l)),i||(t=R({src:t,async:!0},e),(e=Le.get(l))&&Du(t,e),i=n.createElement("script"),yt(i),oe(i,"link",t),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function fp(t,e){bn.M(t,e);var n=ll;if(n&&t){var a=St(n).hoistableScripts,l=ol(t),i=a.get(l);i||(i=n.querySelector(ti(l)),i||(t=R({src:t,async:!0,type:"module"},e),(e=Le.get(l))&&Du(t,e),i=n.createElement("script"),yt(i),oe(i,"link",t),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Ed(t,e,n,a){var l=(l=rt.current)?po(l):null;if(!l)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=il(n.href),n=St(l).hoistableStyles,a=n.get(e),a||(a={type:"style",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=il(n.href);var i=St(l).hoistableStyles,o=i.get(t);if(o||(l=l.ownerDocument||l,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,o),(i=l.querySelector(Pl(t)))&&!i._p&&(o.instance=i,o.state.loading=5),Le.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Le.set(t,n),i||dp(l,t,n,o.state))),e&&a===null)throw Error(c(528,""));return o}if(e&&a!==null)throw Error(c(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=ol(n),n=St(l).hoistableScripts,a=n.get(e),a||(a={type:"script",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function il(t){return'href="'+_e(t)+'"'}function Pl(t){return'link[rel="stylesheet"]['+t+"]"}function Cd(t){return R({},t,{"data-precedence":t.precedence,precedence:null})}function dp(t,e,n,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),oe(e,"link",n),yt(e),t.head.appendChild(e))}function ol(t){return'[src="'+_e(t)+'"]'}function ti(t){return"script[async]"+t}function zd(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+_e(n.href)+'"]');if(a)return e.instance=a,yt(a),a;var l=R({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),yt(a),oe(a,"style",l),go(a,n.precedence,t),e.instance=a;case"stylesheet":l=il(n.href);var i=t.querySelector(Pl(l));if(i)return e.state.loading|=4,e.instance=i,yt(i),i;a=Cd(n),(l=Le.get(l))&&Ou(a,l),i=(t.ownerDocument||t).createElement("link"),yt(i);var o=i;return o._p=new Promise(function(r,f){o.onload=r,o.onerror=f}),oe(i,"link",a),e.state.loading|=4,go(i,n.precedence,t),e.instance=i;case"script":return i=ol(n.src),(l=t.querySelector(ti(i)))?(e.instance=l,yt(l),l):(a=n,(l=Le.get(i))&&(a=R({},n),Du(a,l)),t=t.ownerDocument||t,l=t.createElement("script"),yt(l),oe(l,"link",a),t.head.appendChild(l),e.instance=l);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,go(a,n.precedence,t));return e.instance}function go(t,e,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,i=l,o=0;o title"):null)}function mp(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function jd(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function hp(t,e,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=il(a.href),i=e.querySelector(Pl(l));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=yo.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=i,yt(i);return}i=e.ownerDocument||e,a=Cd(a),(l=Le.get(l))&&Ou(a,l),i=i.createElement("link"),yt(i);var o=i;o._p=new Promise(function(r,f){o.onload=r,o.onerror=f}),oe(i,"link",a),n.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=yo.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var Ru=0;function pp(t,e){return t.stylesheets&&t.count===0&&xo(t,t.stylesheets),0Ru?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function yo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var bo=null;function xo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,bo=new Map,e.forEach(gp,t),bo=null,yo.call(t))}function gp(t,e){if(!(e.state.loading&4)){var n=bo.get(t);if(n)var a=n.get(null);else{n=new Map,bo.set(t,n);for(var l=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(p){console.error(p)}}return u(),Yu.exports=Rp(),Yu.exports}var Bp=wp();const Up="modulepreload",Lp=function(u){return"/"+u},Id={},qt=function(p,d,c){let v=Promise.resolve();if(d&&d.length>0){let j=function(y){return Promise.all(y.map(G=>Promise.resolve(G).then(R=>({status:"fulfilled",value:R}),R=>({status:"rejected",reason:R}))))};document.getElementsByTagName("link");const D=document.querySelector("meta[property=csp-nonce]"),z=(D==null?void 0:D.nonce)||(D==null?void 0:D.getAttribute("nonce"));v=j(d.map(y=>{if(y=Lp(y),y in Id)return;Id[y]=!0;const G=y.endsWith(".css"),R=G?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${R}`))return;const K=document.createElement("link");if(K.rel=G?"stylesheet":Up,G||(K.as="script"),K.crossOrigin="",K.href=y,z&&K.setAttribute("nonce",z),document.head.appendChild(K),G)return new Promise((nt,xt)=>{K.addEventListener("load",nt),K.addEventListener("error",()=>xt(new Error(`Unable to preload CSS for ${y}`)))})}))}function E(j){const D=new Event("vite:preloadError",{cancelable:!0});if(D.payload=j,window.dispatchEvent(D),!D.defaultPrevented)throw j}return v.then(j=>{for(const D of j||[])D.status==="rejected"&&E(D.reason);return p().catch(E)})},jo={amber:{dark:{bg:"#09090b",sf:"#111114",sfH:"#18181c",bd:"#1e1e24",tx:"#e4e4e7",tx2:"#a1a1aa",txM:"#919199",ac:"#e8a845",acD:"rgba(232,168,69,0.12)",acT:"#fbbf24",cdBg:"#0c0c0f",cdTx:"#c4c4cc",sbBg:"#0c0c0e",hdBg:"rgba(9,9,11,0.85)"},light:{bg:"#fafaf9",sf:"#ffffff",sfH:"#f5f5f4",bd:"#e7e5e4",tx:"#1c1917",tx2:"#57534e",txM:"#706b66",ac:"#96640a",acD:"rgba(150,100,10,0.08)",acT:"#7a5208",cdBg:"#f5f3f0",cdTx:"#2c2520",sbBg:"#f5f5f3",hdBg:"rgba(250,250,249,0.85)"},fonts:{heading:"Instrument Serif",body:"DM Sans",code:"JetBrains Mono"}},editorial:{dark:{bg:"#080c1f",sf:"#0e1333",sfH:"#141940",bd:"#1a2050",tx:"#e8e6f0",tx2:"#b5b1c8",txM:"#9490ae",ac:"#ff6b4a",acD:"rgba(255,107,74,0.1)",acT:"#ff8a70",cdBg:"#0a0e27",cdTx:"#b8b4cc",sbBg:"#0a0e27",hdBg:"rgba(8,12,31,0.9)"},light:{bg:"#f6f4f0",sf:"#ffffff",sfH:"#eeece6",bd:"#ddd9d0",tx:"#1a1716",tx2:"#4a443e",txM:"#706960",ac:"#b83d22",acD:"rgba(184,61,34,0.07)",acT:"#9c3019",cdBg:"#edeae4",cdTx:"#3a3530",sbBg:"#f0ede8",hdBg:"rgba(246,244,240,0.92)"},fonts:{heading:"Cormorant Garamond",body:"Bricolage Grotesque",code:"Fira Code"}},cipher:{dark:{bg:"#050508",sf:"#0c0c12",sfH:"#12121a",bd:"#1a1a25",tx:"#d4ff00",tx2:"#8a90a0",txM:"#6a7080",ac:"#6666ff",acD:"rgba(102,102,255,0.10)",acT:"#8080ff",cdBg:"#08080e",cdTx:"#b0c870",sbBg:"#08080d",hdBg:"rgba(5,5,8,0.88)"},light:{bg:"#f0f2f5",sf:"#ffffff",sfH:"#e8eaef",bd:"#d0d4db",tx:"#0f1219",tx2:"#4a5060",txM:"#6a7080",ac:"#2020cc",acD:"rgba(32,32,204,0.08)",acT:"#1a1aa8",cdBg:"#e6e9ef",cdTx:"#2a3520",sbBg:"#ebedf2",hdBg:"rgba(240,242,245,0.90)"},fonts:{heading:"Bodoni Moda",body:"Space Grotesk",code:"Source Code Pro"}},mint:{dark:{bg:"#0d1117",sf:"#161b22",sfH:"#1c2129",bd:"#21262d",tx:"#e6edf3",tx2:"#8b949e",txM:"#6e7681",ac:"#0ea371",acD:"rgba(14,163,113,0.10)",acT:"#2dd4a0",cdBg:"#0a0e14",cdTx:"#adbac7",sbBg:"#0d1117",hdBg:"rgba(13,17,23,0.88)"},light:{bg:"#ffffff",sf:"#f6f8fa",sfH:"#eef1f5",bd:"#d8dee4",tx:"#1f2328",tx2:"#59636e",txM:"#6e7681",ac:"#0a7b53",acD:"rgba(10,123,83,0.07)",acT:"#087a50",cdBg:"#f0f3f6",cdTx:"#24292f",sbBg:"#f6f8fa",hdBg:"rgba(255,255,255,0.90)"},fonts:{heading:"Inter",body:"Inter",code:"Fira Code"}}},Hp=()=>s.jsx("svg",{width:22,height:22,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),Np=()=>s.jsx("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M18 6L6 18M6 6l12 12"})}),qp=()=>s.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M22 2L11 13M22 2l-7 20-4-9-9-4z"})});function um(u){let p="You are a helpful documentation assistant. Answer questions accurately based on the documentation provided below. If the answer isn't in the documentation, say so clearly. Keep answers concise and reference specific sections when possible.";if(u){const d=u.length>1e5?u.slice(0,1e5)+` +`);for(a=l=0;la||f[l]!==S[a]){var A=` +`+f[l].replace(" at new "," at ");return t.displayName&&A.includes("")&&(A=A.replace("",t.displayName)),A}while(1<=l&&0<=a);break}}}finally{ca=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Je(n):""}function Oo(t,e){switch(t.tag){case 26:case 27:case 5:return Je(t.type);case 16:return Je("Lazy");case 13:return t.child!==e&&e!==null?Je("Suspense Fallback"):Je("Suspense");case 19:return Je("SuspenseList");case 0:case 15:return gl(t.type,!1);case 11:return gl(t.type.render,!1);case 1:return gl(t.type,!0);case 31:return Je("Activity");default:return""}}function We(t){try{var e="",n=null;do e+=Oo(t,n),n=t,t=t.return;while(t);return e}catch(l){return` +Error generating stack: `+l.message+` +`+l.stack}}var Fn=Object.prototype.hasOwnProperty,fa=u.unstable_scheduleCallback,vl=u.unstable_cancelCallback,Do=u.unstable_shouldYield,si=u.unstable_requestPaint,se=u.unstable_now,ui=u.unstable_getCurrentPriorityLevel,te=u.unstable_ImmediatePriority,yl=u.unstable_UserBlockingPriority,xn=u.unstable_NormalPriority,Sn=u.unstable_LowPriority,ri=u.unstable_IdlePriority,Pu=u.log,bl=u.unstable_setDisableYieldValue,ye=null,ue=null;function Ae(t){if(typeof Pu=="function"&&bl(t),ue&&typeof ue.setStrictMode=="function")try{ue.setStrictMode(ye,t)}catch{}}var ee=Math.clz32?Math.clz32:Sl,ci=Math.log,xl=Math.LN2;function Sl(t){return t>>>=0,t===0?32:31-(ci(t)/xl|0)|0}var Fe=256,$e=262144,Ie=4194304;function Pe(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Tl(t,e,n){var l=t.pendingLanes;if(l===0)return 0;var a=0,i=t.suspendedLanes,o=t.pingedLanes;t=t.warmLanes;var r=l&134217727;return r!==0?(l=r&~i,l!==0?a=Pe(l):(o&=r,o!==0?a=Pe(o):n||(n=r&~t,n!==0&&(a=Pe(n))))):(r=l&~i,r!==0?a=Pe(r):o!==0?a=Pe(o):n||(n=l&~t,n!==0&&(a=Pe(n)))),a===0?0:e!==0&&e!==a&&(e&i)===0&&(i=a&-a,n=e&-e,i>=n||i===32&&(n&4194048)!==0)?e:a}function Tn(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function He(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32: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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function El(){var t=Ie;return Ie<<=1,(Ie&62914560)===0&&(Ie=4194304),t}function zl(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function En(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function fi(t,e,n,l,a,i){var o=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var r=t.entanglements,f=t.expirationTimes,S=t.hiddenUpdates;for(n=o&~n;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var bm=/[\n"\\]/g;function ke(t){return t.replace(bm,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function wo(t,e,n,l,a,i,o,r){t.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.type=o:t.removeAttribute("type"),e!=null?o==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+je(e)):t.value!==""+je(e)&&(t.value=""+je(e)):o!=="submit"&&o!=="reset"||t.removeAttribute("value"),e!=null?Bo(t,o,je(e)):n!=null?Bo(t,o,je(n)):l!=null&&t.removeAttribute("value"),a==null&&i!=null&&(t.defaultChecked=!!i),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?t.name=""+je(r):t.removeAttribute("name")}function ar(t,e,n,l,a,i,o,r){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){Ro(t);return}n=n!=null?""+je(n):"",e=e!=null?""+je(e):n,r||e===t.value||(t.value=e),t.defaultValue=e}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=r?t.checked:!!l,t.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(t.name=o),Ro(t)}function Bo(t,e,n){e==="number"&&vi(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function kl(t,e,n,l){if(t=t.options,e){e={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qo=!1;if(ln)try{var ba={};Object.defineProperty(ba,"passive",{get:function(){qo=!0}}),window.addEventListener("test",ba,ba),window.removeEventListener("test",ba,ba)}catch{qo=!1}var Cn=null,Go=null,bi=null;function fr(){if(bi)return bi;var t,e=Go,n=e.length,l,a="value"in Cn?Cn.value:Cn.textContent,i=a.length;for(t=0;t=Ta),vr=" ",yr=!1;function br(t,e){switch(t){case"keyup":return Zm.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xr(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Rl=!1;function Wm(t,e){switch(t){case"compositionend":return xr(e);case"keypress":return e.which!==32?null:(yr=!0,vr);case"textInput":return t=e.data,t===vr&&yr?null:t;default:return null}}function Fm(t,e){if(Rl)return t==="compositionend"||!Vo&&br(t,e)?(t=fr(),bi=Go=Cn=null,Rl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=l}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=jr(n)}}function _r(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?_r(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Or(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=vi(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=vi(t.document)}return e}function Wo(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var ah=ln&&"documentMode"in document&&11>=document.documentMode,wl=null,Fo=null,Ma=null,$o=!1;function Dr(t,e,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$o||wl==null||wl!==vi(l)||(l=wl,"selectionStart"in l&&Wo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ma&&Ca(Ma,l)||(Ma=l,l=mo(Fo,"onSelect"),0>=o,a-=o,Ke=1<<32-ee(e)+a|n<ut?(vt=V,V=null):vt=V.sibling;var Ct=T(g,V,x[ut],k);if(Ct===null){V===null&&(V=vt);break}t&&V&&Ct.alternate===null&&e(g,V),h=i(Ct,h,ut),zt===null?F=Ct:zt.sibling=Ct,zt=Ct,V=vt}if(ut===x.length)return n(g,V),bt&&on(g,ut),F;if(V===null){for(;utut?(vt=V,V=null):vt=V.sibling;var Zn=T(g,V,Ct.value,k);if(Zn===null){V===null&&(V=vt);break}t&&V&&Zn.alternate===null&&e(g,V),h=i(Zn,h,ut),zt===null?F=Zn:zt.sibling=Zn,zt=Zn,V=vt}if(Ct.done)return n(g,V),bt&&on(g,ut),F;if(V===null){for(;!Ct.done;ut++,Ct=x.next())Ct=O(g,Ct.value,k),Ct!==null&&(h=i(Ct,h,ut),zt===null?F=Ct:zt.sibling=Ct,zt=Ct);return bt&&on(g,ut),F}for(V=l(V);!Ct.done;ut++,Ct=x.next())Ct=z(V,g,ut,Ct.value,k),Ct!==null&&(t&&Ct.alternate!==null&&V.delete(Ct.key===null?ut:Ct.key),h=i(Ct,h,ut),zt===null?F=Ct:zt.sibling=Ct,zt=Ct);return t&&V.forEach(function(zp){return e(g,zp)}),bt&&on(g,ut),F}function wt(g,h,x,k){if(typeof x=="object"&&x!==null&&x.type===Ot&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case nt:t:{for(var F=x.key;h!==null;){if(h.key===F){if(F=x.type,F===Ot){if(h.tag===7){n(g,h.sibling),k=a(h,x.props.children),k.return=g,g=k;break t}}else if(h.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===lt&&sl(F)===h.type){n(g,h.sibling),k=a(h,x.props),Da(k,x),k.return=g,g=k;break t}n(g,h);break}else e(g,h);h=h.sibling}x.type===Ot?(k=nl(x.props.children,g.mode,k,x.key),k.return=g,g=k):(k=ki(x.type,x.key,x.props,null,g.mode,k),Da(k,x),k.return=g,g=k)}return o(g);case xt:t:{for(F=x.key;h!==null;){if(h.key===F)if(h.tag===4&&h.stateNode.containerInfo===x.containerInfo&&h.stateNode.implementation===x.implementation){n(g,h.sibling),k=a(h,x.children||[]),k.return=g,g=k;break t}else{n(g,h);break}else e(g,h);h=h.sibling}k=as(x,g.mode,k),k.return=g,g=k}return o(g);case lt:return x=sl(x),wt(g,h,x,k)}if(ft(x))return X(g,h,x,k);if(tt(x)){if(F=tt(x),typeof F!="function")throw Error(c(150));return x=F.call(x),$(g,h,x,k)}if(typeof x.then=="function")return wt(g,h,Ui(x),k);if(x.$$typeof===ct)return wt(g,h,Di(g,x),k);Li(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,h!==null&&h.tag===6?(n(g,h.sibling),k=a(h,x),k.return=g,g=k):(n(g,h),k=ls(x,g.mode,k),k.return=g,g=k),o(g)):n(g,h)}return function(g,h,x,k){try{Oa=0;var F=wt(g,h,x,k);return Ql=null,F}catch(V){if(V===Xl||V===wi)throw V;var zt=xe(29,V,null,g.mode);return zt.lanes=k,zt.return=g,zt}finally{}}}var rl=ec(!0),nc=ec(!1),_n=!1;function gs(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vs(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function On(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Dn(t,e,n){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Mt&2)!==0){var a=l.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),l.pending=e,e=ji(t),Nr(t,null,n),e}return Ai(t,l,e,n),ji(t)}function Ra(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,ma(t,n)}}function ys(t,e){var n=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?a=i=e:i=i.next=e}else a=i=e;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var bs=!1;function wa(){if(bs){var t=Kl;if(t!==null)throw t}}function Ba(t,e,n,l){bs=!1;var a=t.updateQueue;_n=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,r=a.shared.pending;if(r!==null){a.shared.pending=null;var f=r,S=f.next;f.next=null,o===null?i=S:o.next=S,o=f;var A=t.alternate;A!==null&&(A=A.updateQueue,r=A.lastBaseUpdate,r!==o&&(r===null?A.firstBaseUpdate=S:r.next=S,A.lastBaseUpdate=f))}if(i!==null){var O=a.baseState;o=0,A=S=f=null,r=i;do{var T=r.lane&-536870913,z=T!==r.lane;if(z?(gt&T)===T:(l&T)===T){T!==0&&T===Yl&&(bs=!0),A!==null&&(A=A.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});t:{var X=t,$=r;T=e;var wt=n;switch($.tag){case 1:if(X=$.payload,typeof X=="function"){O=X.call(wt,O,T);break t}O=X;break t;case 3:X.flags=X.flags&-65537|128;case 0:if(X=$.payload,T=typeof X=="function"?X.call(wt,O,T):X,T==null)break t;O=R({},O,T);break t;case 2:_n=!0}}T=r.callback,T!==null&&(t.flags|=64,z&&(t.flags|=8192),z=a.callbacks,z===null?a.callbacks=[T]:z.push(T))}else z={lane:T,tag:r.tag,payload:r.payload,callback:r.callback,next:null},A===null?(S=A=z,f=O):A=A.next=z,o|=T;if(r=r.next,r===null){if(r=a.shared.pending,r===null)break;z=r,r=z.next,z.next=null,a.lastBaseUpdate=z,a.shared.pending=null}}while(!0);A===null&&(f=O),a.baseState=f,a.firstBaseUpdate=S,a.lastBaseUpdate=A,i===null&&(a.shared.lanes=0),Ln|=o,t.lanes=o,t.memoizedState=O}}function lc(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function ac(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;ti?i:8;var o=M.T,r={};M.T=r,Hs(t,!1,e,n);try{var f=a(),S=M.S;if(S!==null&&S(r,f),f!==null&&typeof f=="object"&&typeof f.then=="function"){var A=mh(f,l);Ha(t,e,A,Ce(t))}else Ha(t,e,l,Ce(t))}catch(O){Ha(t,e,{then:function(){},status:"rejected",reason:O},Ce())}finally{B.p=i,o!==null&&r.types!==null&&(o.types=r.types),M.T=o}}function bh(){}function Us(t,e,n,l){if(t.tag!==5)throw Error(c(476));var a=Uc(t).queue;Bc(t,a,e,Z,n===null?bh:function(){return Lc(t),n(l)})}function Uc(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:Z},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Lc(t){var e=Uc(t);e.next===null&&(e=t.alternate.memoizedState),Ha(t,e.next.queue,{},Ce())}function Ls(){return ae(ei)}function Hc(){return Xt().memoizedState}function Nc(){return Xt().memoizedState}function xh(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=Ce();t=On(n);var l=Dn(e,t,n);l!==null&&(ve(l,e,n),Ra(l,e,n)),e={cache:ds()},t.payload=e;return}e=e.return}}function Sh(t,e,n){var l=Ce();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zi(t)?Gc(e,n):(n=es(t,e,n,l),n!==null&&(ve(n,t,l),Yc(n,e,l)))}function qc(t,e,n){var l=Ce();Ha(t,e,n,l)}function Ha(t,e,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zi(t))Gc(e,a);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,r=i(o,n);if(a.hasEagerState=!0,a.eagerState=r,be(r,o))return Ai(t,e,a,0),Bt===null&&Mi(),!1}catch{}finally{}if(n=es(t,e,a,l),n!==null)return ve(n,t,l),Yc(n,e,l),!0}return!1}function Hs(t,e,n,l){if(l={lane:2,revertLane:gu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Zi(t)){if(e)throw Error(c(479))}else e=es(t,n,l,2),e!==null&&ve(e,t,2)}function Zi(t){var e=t.alternate;return t===st||e!==null&&e===st}function Gc(t,e){Zl=qi=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Yc(t,e,n){if((n&4194048)!==0){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,ma(t,n)}}var Na={readContext:ae,use:Ki,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};Na.useEffectEvent=Gt;var Kc={readContext:ae,use:Ki,useCallback:function(t,e){return fe().memoizedState=[t,e===void 0?null:e],t},useContext:ae,useEffect:Mc,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Qi(4194308,4,_c.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Qi(4194308,4,t,e)},useInsertionEffect:function(t,e){Qi(4,2,t,e)},useMemo:function(t,e){var n=fe();e=e===void 0?null:e;var l=t();if(cl){Ae(!0);try{t()}finally{Ae(!1)}}return n.memoizedState=[l,e],l},useReducer:function(t,e,n){var l=fe();if(n!==void 0){var a=n(e);if(cl){Ae(!0);try{n(e)}finally{Ae(!1)}}}else a=e;return l.memoizedState=l.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},l.queue=t,t=t.dispatch=Sh.bind(null,st,t),[l.memoizedState,t]},useRef:function(t){var e=fe();return t={current:t},e.memoizedState=t},useState:function(t){t=Os(t);var e=t.queue,n=qc.bind(null,st,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:ws,useDeferredValue:function(t,e){var n=fe();return Bs(n,t,e)},useTransition:function(){var t=Os(!1);return t=Bc.bind(null,st,t.queue,!0,!1),fe().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var l=st,a=fe();if(bt){if(n===void 0)throw Error(c(407));n=n()}else{if(n=e(),Bt===null)throw Error(c(349));(gt&127)!==0||cc(l,e,n)}a.memoizedState=n;var i={value:n,getSnapshot:e};return a.queue=i,Mc(dc.bind(null,l,i,t),[t]),l.flags|=2048,Wl(9,{destroy:void 0},fc.bind(null,l,i,n,e),null),n},useId:function(){var t=fe(),e=Bt.identifierPrefix;if(bt){var n=Xe,l=Ke;n=(l&~(1<<32-ee(l)-1)).toString(32)+n,e="_"+e+"R_"+n,n=Gi++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?o.createElement(a,{is:l.is}):o.createElement(a)}}i[Qt]=e,i[ne]=l;t:for(o=e.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break t;for(;o.sibling===null;){if(o.return===null||o.return===e)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}e.stateNode=i;t:switch(oe(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break t;case"img":l=!0;break t;default:l=!1}l&&dn(e)}}return Ht(e),Is(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&dn(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(c(166));if(t=rt.current,ql(e)){if(t=e.stateNode,n=e.memoizedProps,l=null,a=le,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}t[Qt]=e,t=!!(t.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||rd(t.nodeValue,n)),t||jn(e,!0)}else t=ho(t).createTextNode(l),t[Qt]=e,e.stateNode=t}return Ht(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(l=ql(e),n!==null){if(t===null){if(!l)throw Error(c(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(557));t[Qt]=e}else ll(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ht(e),t=!1}else n=us(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(Te(e),e):(Te(e),null);if((e.flags&128)!==0)throw Error(c(558))}return Ht(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=ql(e),l!==null&&l.dehydrated!==null){if(t===null){if(!a)throw Error(c(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[Qt]=e}else ll(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ht(e),a=!1}else a=us(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(Te(e),e):(Te(e),null)}return Te(e),(e.flags&128)!==0?(e.lanes=n,e):(n=l!==null,t=t!==null&&t.memoizedState!==null,n&&(l=e.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),Ii(e,e.updateQueue),Ht(e),null);case 4:return Ut(),t===null&&xu(e.stateNode.containerInfo),Ht(e),null;case 10:return un(e.type),Ht(e),null;case 19:if(_(Kt),l=e.memoizedState,l===null)return Ht(e),null;if(a=(e.flags&128)!==0,i=l.rendering,i===null)if(a)Ga(l,!1);else{if(Yt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=Ni(t),i!==null){for(e.flags|=128,Ga(l,!1),t=i.updateQueue,e.updateQueue=t,Ii(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)qr(n,t),n=n.sibling;return H(Kt,Kt.current&1|2),bt&&on(e,l.treeForkCount),e.child}t=t.sibling}l.tail!==null&&se()>lo&&(e.flags|=128,a=!0,Ga(l,!1),e.lanes=4194304)}else{if(!a)if(t=Ni(i),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,Ii(e,t),Ga(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!bt)return Ht(e),null}else 2*se()-l.renderingStartTime>lo&&n!==536870912&&(e.flags|=128,a=!0,Ga(l,!1),e.lanes=4194304);l.isBackwards?(i.sibling=e.child,e.child=i):(t=l.last,t!==null?t.sibling=i:e.child=i,l.last=i)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=se(),t.sibling=null,n=Kt.current,H(Kt,a?n&1|2:n&1),bt&&on(e,l.treeForkCount),t):(Ht(e),null);case 22:case 23:return Te(e),Ss(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?(n&536870912)!==0&&(e.flags&128)===0&&(Ht(e),e.subtreeFlags&6&&(e.flags|=8192)):Ht(e),n=e.updateQueue,n!==null&&Ii(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==n&&(e.flags|=2048),t!==null&&_(ol),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),un(Vt),Ht(e),null;case 25:return null;case 30:return null}throw Error(c(156,e.tag))}function Mh(t,e){switch(os(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return un(Vt),Ut(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return hl(e),null;case 31:if(e.memoizedState!==null){if(Te(e),e.alternate===null)throw Error(c(340));ll()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Te(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));ll()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _(Kt),null;case 4:return Ut(),null;case 10:return un(e.type),null;case 22:case 23:return Te(e),Ss(),t!==null&&_(ol),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return un(Vt),null;case 25:return null;default:return null}}function hf(t,e){switch(os(e),e.tag){case 3:un(Vt),Ut();break;case 26:case 27:case 5:hl(e);break;case 4:Ut();break;case 31:e.memoizedState!==null&&Te(e);break;case 13:Te(e);break;case 19:_(Kt);break;case 10:un(e.type);break;case 22:case 23:Te(e),Ss(),t!==null&&_(ol);break;case 24:un(Vt)}}function Ya(t,e){try{var n=e.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&t)===t){l=void 0;var i=n.create,o=n.inst;l=i(),o.destroy=l}n=n.next}while(n!==a)}}catch(r){_t(e,e.return,r)}}function Bn(t,e,n){try{var l=e.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&t)===t){var o=l.inst,r=o.destroy;if(r!==void 0){o.destroy=void 0,a=e;var f=n,S=r;try{S()}catch(A){_t(a,f,A)}}}l=l.next}while(l!==i)}}catch(A){_t(e,e.return,A)}}function pf(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{ac(e,n)}catch(l){_t(t,t.return,l)}}}function gf(t,e,n){n.props=fl(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(l){_t(t,e,l)}}function Ka(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof n=="function"?t.refCleanup=n(l):n.current=l}}catch(a){_t(t,e,a)}}function Qe(t,e){var n=t.ref,l=t.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){_t(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){_t(t,e,a)}else n.current=null}function vf(t){var e=t.type,n=t.memoizedProps,l=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break t;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){_t(t,t.return,a)}}function Ps(t,e,n){try{var l=t.stateNode;Jh(l,t.type,n,e),l[ne]=e}catch(a){_t(t,t.return,a)}}function yf(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Yn(t.type)||t.tag===4}function tu(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||yf(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Yn(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function eu(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=nn));else if(l!==4&&(l===27&&Yn(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(eu(t,e,n),t=t.sibling;t!==null;)eu(t,e,n),t=t.sibling}function Pi(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(l!==4&&(l===27&&Yn(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Pi(t,e,n),t=t.sibling;t!==null;)Pi(t,e,n),t=t.sibling}function bf(t){var e=t.stateNode,n=t.memoizedProps;try{for(var l=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);oe(e,l,n),e[Qt]=t,e[ne]=n}catch(i){_t(t,t.return,i)}}var mn=!1,Wt=!1,nu=!1,xf=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function Ah(t,e){if(t=t.containerInfo,Eu=So,t=Or(t),Wo(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break t}var o=0,r=-1,f=-1,S=0,A=0,O=t,T=null;e:for(;;){for(var z;O!==n||a!==0&&O.nodeType!==3||(r=o+a),O!==i||l!==0&&O.nodeType!==3||(f=o+l),O.nodeType===3&&(o+=O.nodeValue.length),(z=O.firstChild)!==null;)T=O,O=z;for(;;){if(O===t)break e;if(T===n&&++S===a&&(r=o),T===i&&++A===l&&(f=o),(z=O.nextSibling)!==null)break;O=T,T=O.parentNode}O=z}n=r===-1||f===-1?null:{start:r,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(zu={focusedElem:t,selectionRange:n},So=!1,Pt=e;Pt!==null;)if(e=Pt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pt=t;else for(;Pt!==null;){switch(e=Pt,i=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n title"))),oe(i,l,n),i[Qt]=t,yt(i),l=i;break t;case"link":var o=Md("link","href",a).get(l+(n.href||""));if(o){for(var r=0;rwt&&(o=wt,wt=$,$=o);var g=kr(r,$),h=kr(r,wt);if(g&&h&&(z.rangeCount!==1||z.anchorNode!==g.node||z.anchorOffset!==g.offset||z.focusNode!==h.node||z.focusOffset!==h.offset)){var x=O.createRange();x.setStart(g.node,g.offset),z.removeAllRanges(),$>wt?(z.addRange(x),z.extend(h.node,h.offset)):(x.setEnd(h.node,h.offset),z.addRange(x))}}}}for(O=[],z=r;z=z.parentNode;)z.nodeType===1&&O.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;rn?32:n,M.T=null,n=ru,ru=null;var i=Nn,o=yn;if(Ft=0,ta=Nn=null,yn=0,(Mt&6)!==0)throw Error(c(331));var r=Mt;if(Mt|=4,Of(i.current),jf(i,i.current,o,n),Mt=r,Wa(0,!1),ue&&typeof ue.onPostCommitFiberRoot=="function")try{ue.onPostCommitFiberRoot(ye,i)}catch{}return!0}finally{B.p=a,M.T=l,Wf(t,e)}}function $f(t,e,n){e=Oe(n,e),e=Ys(t.stateNode,e,2),t=Dn(t,e,2),t!==null&&(En(t,2),Ve(t))}function _t(t,e,n){if(t.tag===3)$f(t,t,n);else for(;e!==null;){if(e.tag===3){$f(e,t,n);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hn===null||!Hn.has(l))){t=Oe(n,t),n=$c(2),l=Dn(e,n,2),l!==null&&(Ic(n,l,e,t),En(l,2),Ve(l));break}}e=e.return}}function mu(t,e,n){var l=t.pingCache;if(l===null){l=t.pingCache=new _h;var a=new Set;l.set(e,a)}else a=l.get(e),a===void 0&&(a=new Set,l.set(e,a));a.has(n)||(iu=!0,a.add(n),t=Bh.bind(null,t,e,n),e.then(t,t))}function Bh(t,e,n){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Bt===t&&(gt&n)===n&&(Yt===4||Yt===3&&(gt&62914560)===gt&&300>se()-no?(Mt&2)===0&&ea(t,0):ou|=n,Pl===gt&&(Pl=0)),Ve(t)}function If(t,e){e===0&&(e=El()),t=el(t,e),t!==null&&(En(t,e),Ve(t))}function Uh(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),If(t,n)}function Lh(t,e){var n=0;switch(t.tag){case 31:case 13:var l=t.stateNode,a=t.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(e),If(t,n)}function Hh(t,e){return fa(t,e)}var ro=null,la=null,hu=!1,co=!1,pu=!1,Gn=0;function Ve(t){t!==la&&t.next===null&&(la===null?ro=la=t:la=la.next=t),co=!0,hu||(hu=!0,qh())}function Wa(t,e){if(!pu&&co){pu=!0;do for(var n=!1,l=ro;l!==null;){if(t!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var o=l.suspendedLanes,r=l.pingedLanes;i=(1<<31-ee(42|t)+1)-1,i&=a&~(o&~r),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,nd(l,i))}else i=gt,i=Tl(l,l===Bt?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Tn(l,i)||(n=!0,nd(l,i));l=l.next}while(n);pu=!1}}function Nh(){Pf()}function Pf(){co=hu=!1;var t=0;Gn!==0&&Fh()&&(t=Gn);for(var e=se(),n=null,l=ro;l!==null;){var a=l.next,i=td(l,e);i===0?(l.next=null,n===null?ro=a:n.next=a,a===null&&(la=n)):(n=l,(t!==0||(i&3)!==0)&&(co=!0)),l=a}Ft!==0&&Ft!==5||Wa(t),Gn!==0&&(Gn=0)}function td(t,e){for(var n=t.suspendedLanes,l=t.pingedLanes,a=t.expirationTimes,i=t.pendingLanes&-62914561;0r)break;var A=f.transferSize,O=f.initiatorType;A&&cd(O)&&(f=f.responseEnd,o+=A*(f"u"?null:document;function Td(t,e,n){var l=aa;if(l&&typeof e=="string"&&e){var a=ke(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Sd.has(a)||(Sd.add(a),t={rel:t,crossOrigin:n,href:e},l.querySelector(a)===null&&(e=l.createElement("link"),oe(e,"link",t),yt(e),l.head.appendChild(e)))}}function ip(t){bn.D(t),Td("dns-prefetch",t,null)}function op(t,e){bn.C(t,e),Td("preconnect",t,e)}function sp(t,e,n){bn.L(t,e,n);var l=aa;if(l&&t&&e){var a='link[rel="preload"][as="'+ke(e)+'"]';e==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+ke(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+ke(n.imageSizes)+'"]')):a+='[href="'+ke(t)+'"]';var i=a;switch(e){case"style":i=ia(t);break;case"script":i=oa(t)}Le.has(i)||(t=R({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Le.set(i,t),l.querySelector(a)!==null||e==="style"&&l.querySelector(Pa(i))||e==="script"&&l.querySelector(ti(i))||(e=l.createElement("link"),oe(e,"link",t),yt(e),l.head.appendChild(e)))}}function up(t,e){bn.m(t,e);var n=aa;if(n&&t){var l=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+ke(l)+'"][href="'+ke(t)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=oa(t)}if(!Le.has(i)&&(t=R({rel:"modulepreload",href:t},e),Le.set(i,t),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ti(i)))return}l=n.createElement("link"),oe(l,"link",t),yt(l),n.head.appendChild(l)}}}function rp(t,e,n){bn.S(t,e,n);var l=aa;if(l&&t){var a=St(l).hoistableStyles,i=ia(t);e=e||"default";var o=a.get(i);if(!o){var r={loading:0,preload:null};if(o=l.querySelector(Pa(i)))r.loading=5;else{t=R({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Le.get(i))&&Ou(t,n);var f=o=l.createElement("link");yt(f),oe(f,"link",t),f._p=new Promise(function(S,A){f.onload=S,f.onerror=A}),f.addEventListener("load",function(){r.loading|=1}),f.addEventListener("error",function(){r.loading|=2}),r.loading|=4,go(o,e,l)}o={type:"stylesheet",instance:o,count:1,state:r},a.set(i,o)}}}function cp(t,e){bn.X(t,e);var n=aa;if(n&&t){var l=St(n).hoistableScripts,a=oa(t),i=l.get(a);i||(i=n.querySelector(ti(a)),i||(t=R({src:t,async:!0},e),(e=Le.get(a))&&Du(t,e),i=n.createElement("script"),yt(i),oe(i,"link",t),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function fp(t,e){bn.M(t,e);var n=aa;if(n&&t){var l=St(n).hoistableScripts,a=oa(t),i=l.get(a);i||(i=n.querySelector(ti(a)),i||(t=R({src:t,async:!0,type:"module"},e),(e=Le.get(a))&&Du(t,e),i=n.createElement("script"),yt(i),oe(i,"link",t),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function Ed(t,e,n,l){var a=(a=rt.current)?po(a):null;if(!a)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=ia(n.href),n=St(a).hoistableStyles,l=n.get(e),l||(l={type:"style",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=ia(n.href);var i=St(a).hoistableStyles,o=i.get(t);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,o),(i=a.querySelector(Pa(t)))&&!i._p&&(o.instance=i,o.state.loading=5),Le.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Le.set(t,n),i||dp(a,t,n,o.state))),e&&l===null)throw Error(c(528,""));return o}if(e&&l!==null)throw Error(c(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=oa(n),n=St(a).hoistableScripts,l=n.get(e),l||(l={type:"script",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function ia(t){return'href="'+ke(t)+'"'}function Pa(t){return'link[rel="stylesheet"]['+t+"]"}function zd(t){return R({},t,{"data-precedence":t.precedence,precedence:null})}function dp(t,e,n,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),oe(e,"link",n),yt(e),t.head.appendChild(e))}function oa(t){return'[src="'+ke(t)+'"]'}function ti(t){return"script[async]"+t}function Cd(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+ke(n.href)+'"]');if(l)return e.instance=l,yt(l),l;var a=R({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),yt(l),oe(l,"style",a),go(l,n.precedence,t),e.instance=l;case"stylesheet":a=ia(n.href);var i=t.querySelector(Pa(a));if(i)return e.state.loading|=4,e.instance=i,yt(i),i;l=zd(n),(a=Le.get(a))&&Ou(l,a),i=(t.ownerDocument||t).createElement("link"),yt(i);var o=i;return o._p=new Promise(function(r,f){o.onload=r,o.onerror=f}),oe(i,"link",l),e.state.loading|=4,go(i,n.precedence,t),e.instance=i;case"script":return i=oa(n.src),(a=t.querySelector(ti(i)))?(e.instance=a,yt(a),a):(l=n,(a=Le.get(i))&&(l=R({},n),Du(l,a)),t=t.ownerDocument||t,a=t.createElement("script"),yt(a),oe(a,"link",l),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(l=e.instance,e.state.loading|=4,go(l,n.precedence,t));return e.instance}function go(t,e,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,o=0;o title"):null)}function mp(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function jd(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function hp(t,e,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=ia(l.href),i=e.querySelector(Pa(a));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=yo.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=i,yt(i);return}i=e.ownerDocument||e,l=zd(l),(a=Le.get(a))&&Ou(l,a),i=i.createElement("link"),yt(i);var o=i;o._p=new Promise(function(r,f){o.onload=r,o.onerror=f}),oe(i,"link",l),n.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=yo.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var Ru=0;function pp(t,e){return t.stylesheets&&t.count===0&&xo(t,t.stylesheets),0Ru?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function yo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var bo=null;function xo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,bo=new Map,e.forEach(gp,t),bo=null,yo.call(t))}function gp(t,e){if(!(e.state.loading&4)){var n=bo.get(t);if(n)var l=n.get(null);else{n=new Map,bo.set(t,n);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(p){console.error(p)}}return u(),Yu.exports=Rp(),Yu.exports}var Bp=wp();const Up="modulepreload",Lp=function(u){return"/"+u},Id={},qt=function(p,d,c){let v=Promise.resolve();if(d&&d.length>0){let j=function(y){return Promise.all(y.map(G=>Promise.resolve(G).then(R=>({status:"fulfilled",value:R}),R=>({status:"rejected",reason:R}))))};document.getElementsByTagName("link");const D=document.querySelector("meta[property=csp-nonce]"),C=(D==null?void 0:D.nonce)||(D==null?void 0:D.getAttribute("nonce"));v=j(d.map(y=>{if(y=Lp(y),y in Id)return;Id[y]=!0;const G=y.endsWith(".css"),R=G?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${R}`))return;const K=document.createElement("link");if(K.rel=G?"stylesheet":Up,G||(K.as="script"),K.crossOrigin="",K.href=y,C&&K.setAttribute("nonce",C),document.head.appendChild(K),G)return new Promise((nt,xt)=>{K.addEventListener("load",nt),K.addEventListener("error",()=>xt(new Error(`Unable to preload CSS for ${y}`)))})}))}function E(j){const D=new Event("vite:preloadError",{cancelable:!0});if(D.payload=j,window.dispatchEvent(D),!D.defaultPrevented)throw j}return v.then(j=>{for(const D of j||[])D.status==="rejected"&&E(D.reason);return p().catch(E)})},jo={amber:{dark:{bg:"#09090b",sf:"#111114",sfH:"#18181c",bd:"#1e1e24",tx:"#e4e4e7",tx2:"#a1a1aa",txM:"#919199",ac:"#e8a845",acD:"rgba(232,168,69,0.12)",acT:"#fbbf24",cdBg:"#0c0c0f",cdTx:"#c4c4cc",sbBg:"#0c0c0e",hdBg:"rgba(9,9,11,0.85)"},light:{bg:"#fafaf9",sf:"#ffffff",sfH:"#f5f5f4",bd:"#e7e5e4",tx:"#1c1917",tx2:"#57534e",txM:"#706b66",ac:"#96640a",acD:"rgba(150,100,10,0.08)",acT:"#7a5208",cdBg:"#f5f3f0",cdTx:"#2c2520",sbBg:"#f5f5f3",hdBg:"rgba(250,250,249,0.85)"},fonts:{heading:"Instrument Serif",body:"DM Sans",code:"JetBrains Mono"}},editorial:{dark:{bg:"#080c1f",sf:"#0e1333",sfH:"#141940",bd:"#1a2050",tx:"#e8e6f0",tx2:"#b5b1c8",txM:"#9490ae",ac:"#ff6b4a",acD:"rgba(255,107,74,0.1)",acT:"#ff8a70",cdBg:"#0a0e27",cdTx:"#b8b4cc",sbBg:"#0a0e27",hdBg:"rgba(8,12,31,0.9)"},light:{bg:"#f6f4f0",sf:"#ffffff",sfH:"#eeece6",bd:"#ddd9d0",tx:"#1a1716",tx2:"#4a443e",txM:"#706960",ac:"#b83d22",acD:"rgba(184,61,34,0.07)",acT:"#9c3019",cdBg:"#edeae4",cdTx:"#3a3530",sbBg:"#f0ede8",hdBg:"rgba(246,244,240,0.92)"},fonts:{heading:"Cormorant Garamond",body:"Bricolage Grotesque",code:"Fira Code"}},cipher:{dark:{bg:"#050508",sf:"#0c0c12",sfH:"#12121a",bd:"#1a1a25",tx:"#d4ff00",tx2:"#8a90a0",txM:"#6a7080",ac:"#6666ff",acD:"rgba(102,102,255,0.10)",acT:"#8080ff",cdBg:"#08080e",cdTx:"#b0c870",sbBg:"#08080d",hdBg:"rgba(5,5,8,0.88)"},light:{bg:"#f0f2f5",sf:"#ffffff",sfH:"#e8eaef",bd:"#d0d4db",tx:"#0f1219",tx2:"#4a5060",txM:"#6a7080",ac:"#2020cc",acD:"rgba(32,32,204,0.08)",acT:"#1a1aa8",cdBg:"#e6e9ef",cdTx:"#2a3520",sbBg:"#ebedf2",hdBg:"rgba(240,242,245,0.90)"},fonts:{heading:"Bodoni Moda",body:"Space Grotesk",code:"Source Code Pro"}},mint:{dark:{bg:"#0d1117",sf:"#161b22",sfH:"#1c2129",bd:"#21262d",tx:"#e6edf3",tx2:"#8b949e",txM:"#6e7681",ac:"#0ea371",acD:"rgba(14,163,113,0.10)",acT:"#2dd4a0",cdBg:"#0a0e14",cdTx:"#adbac7",sbBg:"#0d1117",hdBg:"rgba(13,17,23,0.88)"},light:{bg:"#ffffff",sf:"#f6f8fa",sfH:"#eef1f5",bd:"#d8dee4",tx:"#1f2328",tx2:"#59636e",txM:"#6e7681",ac:"#0a7b53",acD:"rgba(10,123,83,0.07)",acT:"#087a50",cdBg:"#f0f3f6",cdTx:"#24292f",sbBg:"#f6f8fa",hdBg:"rgba(255,255,255,0.90)"},fonts:{heading:"Inter",body:"Inter",code:"Fira Code"}}},Hp=()=>s.jsx("svg",{width:22,height:22,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),Np=()=>s.jsx("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M18 6L6 18M6 6l12 12"})}),qp=()=>s.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M22 2L11 13M22 2l-7 20-4-9-9-4z"})});function um(u){let p="You are a helpful documentation assistant. Answer questions accurately based on the documentation provided below. If the answer isn't in the documentation, say so clearly. Keep answers concise and reference specific sections when possible.";if(u){const d=u.length>1e5?u.slice(0,1e5)+` [Documentation truncated...]`:u;p+=` Documentation: -${d}`}return p}async function Gp(u,p,d,c){var j,D,z;const v=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${p}`},body:JSON.stringify({model:d,messages:[{role:"system",content:um(c)},...u.map(y=>({role:y.role,content:y.content}))]})});if(!v.ok){const y=await v.text();throw new Error(`OpenAI API error (${v.status}): ${y}`)}return((z=(D=(j=(await v.json()).choices)==null?void 0:j[0])==null?void 0:D.message)==null?void 0:z.content)||"No response."}async function Yp(u,p,d,c){var j,D;const v=await fetch("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":p,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify({model:d,max_tokens:1024,system:um(c),messages:u.map(z=>({role:z.role,content:z.content}))})});if(!v.ok){const z=await v.text();throw new Error(`Anthropic API error (${v.status}): ${z}`)}return((D=(j=(await v.json()).content)==null?void 0:j[0])==null?void 0:D.text)||"No response."}function Kp(u){return u==="openai"?"gpt-4o-mini":"claude-sonnet-4-20250514"}function Xp({provider:u,model:p,apiKey:d,context:c}){const[v,E]=w.useState(!1),[j,D]=w.useState([]),[z,y]=w.useState(""),[G,R]=w.useState(!1),[K,nt]=w.useState(null),xt=w.useRef(null),Ot=w.useRef(null),At=d||(typeof window<"u"?window.__TOME_AI_API_KEY__:void 0),W=p||Kp(u);w.useEffect(()=>{var Q;(Q=xt.current)==null||Q.scrollIntoView({behavior:"smooth"})},[j]),w.useEffect(()=>{v&&setTimeout(()=>{var Q;return(Q=Ot.current)==null?void 0:Q.focus()},100)},[v]);const I=w.useCallback(async()=>{const Q=z.trim();if(!Q||G||!At)return;const Y={role:"user",content:Q},L=[...j,Y];D(L),y(""),R(!0),nt(null);try{let U;u==="openai"?U=await Gp(L,At,W,c):U=await Yp(L,At,W,c),D(at=>[...at,{role:"assistant",content:U}])}catch(U){nt(U instanceof Error?U.message:"Failed to get response")}finally{R(!1)}},[z,G,j,u,At,W,c]),ct=w.useCallback(Q=>{Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),I())},[I]);return v?s.jsxs("div",{"data-testid":"ai-chat-panel",style:{position:"fixed",bottom:24,right:24,zIndex:900,width:380,maxWidth:"calc(100vw - 48px)",height:520,maxHeight:"calc(100vh - 48px)",background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,boxShadow:"0 16px 64px rgba(0,0,0,0.3)",display:"flex",flexDirection:"column",overflow:"hidden",fontFamily:"var(--font-body)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid var(--bd)",flexShrink:0},children:[s.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--tx)"},children:"Ask AI"}),s.jsx("button",{"data-testid":"ai-chat-close",onClick:()=>E(!1),"aria-label":"Close AI chat",style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex",padding:4},children:s.jsx(Np,{})})]}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:"12px 16px"},children:[!At&&s.jsxs("div",{"data-testid":"ai-chat-no-key",style:{textAlign:"center",color:"var(--txM)",fontSize:13,padding:"24px 8px",lineHeight:1.6},children:[s.jsx("p",{style:{marginBottom:8,fontWeight:500,color:"var(--tx)"},children:"AI not configured"}),s.jsxs("p",{style:{marginBottom:8},children:["To enable AI chat, set the ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"apiKeyEnv"})," in ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"tome.config.js"})," and provide the environment variable at build time."]}),s.jsxs("p",{style:{fontSize:11.5,color:"var(--txM)"},children:["Example: ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"TOME_AI_KEY=sk-... tome build"})]})]}),j.map((Q,Y)=>s.jsx("div",{"data-testid":`ai-chat-message-${Q.role}`,style:{marginBottom:12,display:"flex",justifyContent:Q.role==="user"?"flex-end":"flex-start"},children:s.jsx("div",{style:{maxWidth:"85%",padding:"8px 12px",borderRadius:10,fontSize:13,lineHeight:1.55,whiteSpace:"pre-wrap",wordBreak:"break-word",background:Q.role==="user"?"var(--ac)":"var(--cdBg)",color:Q.role==="user"?"#fff":"var(--tx)"},children:Q.content})},Y)),G&&s.jsx("div",{"data-testid":"ai-chat-loading",style:{display:"flex",justifyContent:"flex-start",marginBottom:12},children:s.jsx("div",{style:{padding:"8px 12px",borderRadius:10,fontSize:13,background:"var(--cdBg)",color:"var(--txM)"},children:"Thinking..."})}),K&&s.jsx("div",{"data-testid":"ai-chat-error",style:{padding:"8px 12px",borderRadius:8,fontSize:12,background:"rgba(220,50,50,0.1)",color:"#d44",marginBottom:12},children:K}),s.jsx("div",{ref:xt})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderTop:"1px solid var(--bd)",flexShrink:0},children:[s.jsx("input",{ref:Ot,"data-testid":"ai-chat-input",value:z,onChange:Q=>y(Q.target.value),onKeyDown:ct,placeholder:At?"Ask a question...":"API key required",disabled:!At,style:{flex:1,background:"var(--cdBg)",border:"1px solid var(--bd)",borderRadius:8,padding:"8px 12px",color:"var(--tx)",fontSize:13,fontFamily:"var(--font-body)",outline:"none"}}),s.jsx("button",{"data-testid":"ai-chat-send",onClick:I,disabled:!At||!z.trim()||G,"aria-label":"Send message",style:{width:34,height:34,borderRadius:8,background:At&&z.trim()?"var(--ac)":"var(--cdBg)",color:At&&z.trim()?"#fff":"var(--txM)",border:"none",cursor:At&&z.trim()?"pointer":"default",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:s.jsx(qp,{})})]})]}):s.jsx("button",{"data-testid":"ai-chat-button",onClick:()=>E(!0),"aria-label":"Open AI chat",style:{position:"fixed",bottom:24,right:24,zIndex:900,width:48,height:48,borderRadius:"50%",background:"var(--ac)",color:"#fff",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 16px rgba(0,0,0,0.25)",transition:"transform 0.15s"},children:s.jsx(Hp,{})})}function Qp(u){const p=/^#([0-9a-f]{6})$/i.exec(u.trim());if(!p)return null;const d=parseInt(p[1],16);return[d>>16&255,d>>8&255,d&255]}function Vp(u,p){const d=Qp(u);if(!d)return null;const[c,v,E]=d,j=`rgba(${c},${v},${E},${p?.12:.08})`,D=p?1.15:.85,z=Math.min(255,Math.round(c*D)),y=Math.min(255,Math.round(v*D)),G=Math.min(255,Math.round(E*D)),R=`rgb(${z},${y},${G})`;return{ac:u,acD:j,acT:R}}const Me=({d:u,size:p=16})=>s.jsx("svg",{width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:u})}),rm=()=>s.jsx(Me,{d:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21 21l-4.3-4.3"}),Pd=()=>s.jsx(Me,{d:"M9 18l6-6-6-6",size:14}),Vu=()=>s.jsx(Me,{d:"M6 9l6 6 6-6",size:14}),Zp=()=>s.jsx(Me,{d:"M3 12h18M3 6h18M3 18h18",size:20}),Jp=()=>s.jsx(Me,{d:"M18 6L6 18M6 6l12 12",size:18}),tm=()=>s.jsx(Me,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"}),em=()=>s.jsx(Me,{d:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0-4a1 1 0 0 1 1-1v-1a1 1 0 0 1-2 0v1a1 1 0 0 1 1 1Zm0 16a1 1 0 0 1 1 1v1a1 1 0 0 1-2 0v-1a1 1 0 0 1 1-1ZM4 12a1 1 0 0 1-1 1H2a1 1 0 0 1 0-2h1a1 1 0 0 1 1 1Zm18-1h-1a1 1 0 0 1 0 2h1a1 1 0 0 1 0-2ZM6.34 6.34a1 1 0 0 1-1.41 0l-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 1 0 1.41Zm12.73-2.12-.71.71a1 1 0 0 1-1.41-1.41l.71-.71a1 1 0 1 1 1.41 1.41ZM6.34 17.66l-.71.71a1 1 0 0 1-1.41-1.41l.71-.71a1 1 0 0 1 1.41 1.41Zm12.73 2.12-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 1-1.41 1.41Z"}),nm=()=>s.jsx(Me,{d:"M19 12H5M12 19l-7-7 7-7",size:14}),am=()=>s.jsx(Me,{d:"M5 12h14M12 5l7 7-7 7",size:14}),Wp=()=>s.jsx(Me,{d:"M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",size:13});function Fp(u){const p=new Date(u),c=new Date().getTime()-p.getTime();if(isNaN(c))return"";const v=Math.floor(c/1e3),E=Math.floor(v/60),j=Math.floor(E/60),D=Math.floor(j/24),z=Math.floor(D/30),y=Math.floor(D/365);return v<60?"just now":E<60?`${E} minute${E===1?"":"s"} ago`:j<24?`${j} hour${j===1?"":"s"} ago`:D<30?`${D} day${D===1?"":"s"} ago`:z<12?`${z} month${z===1?"":"s"} ago`:y>=1?`${y} year${y===1?"":"s"} ago`:p.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}let ul=null;const $p="/_pagefind/pagefind.js";async function Ip(){if(ul)return ul;try{return ul=await import($p),await ul.init(),ul}catch{return null}}let _o=null;function Pp(){return _o||(_o=qt(()=>import("./theme-BIHI7g3E.js"),[]).catch(()=>null),_o)}function t0({appId:u,apiKey:p,indexName:d,onNavigate:c,onClose:v,basePath:E=""}){const[j,D]=w.useState(null),[z,y]=w.useState(!1);w.useEffect(()=>{Pp().then(R=>{R&&R.DocSearch?D(()=>R.DocSearch):R&&R.default?D(()=>R.default):y(!0)})},[]);const G=w.useCallback(R=>{try{let nt=new URL(R,"http://localhost").pathname;if(E){const xt=E.replace(/\/$/,"");nt.startsWith(xt)&&(nt=nt.slice(xt.length))}return nt.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index"}catch{return"index"}},[E]);return z?s.jsx("div",{onClick:v,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"12vh"},children:s.jsx("div",{onClick:R=>R.stopPropagation(),style:{background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,width:"100%",maxWidth:520,boxShadow:"0 24px 80px rgba(0,0,0,0.4)",padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"Algolia DocSearch is not available. Install @docsearch/react to enable it."})}):j?s.jsx("div",{"data-testid":"algolia-search-modal",children:s.jsx(j,{appId:u,apiKey:p,indexName:d,navigator:{navigate({itemUrl:R}){const K=G(R);c(K)}},hitComponent:({hit:R,children:K})=>s.jsx("a",{href:R.url,onClick:nt=>{nt.preventDefault();const xt=G(R.url);c(xt)},children:K})})}):s.jsx("div",{onClick:v,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"12vh"},children:s.jsx("div",{style:{background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,width:"100%",maxWidth:520,boxShadow:"0 24px 80px rgba(0,0,0,0.4)",padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"Loading search..."})})}const e0=()=>s.jsx(Me,{d:"M12 8v4l3 3m6-3a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z",size:14}),n0=()=>s.jsx(Me,{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM3.6 9h16.8M3.6 15h16.8M12 3a15 15 0 0 1 4 9 15 15 0 0 1-4 9 15 15 0 0 1-4-9 15 15 0 0 1 4-9Z",size:14}),a0=()=>s.jsx(Me,{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3",size:11}),l0={github:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z",twitter:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865l8.875 11.633Z",discord:"M13.545 2.907a13.227 13.227 0 00-3.257-1.011.05.05 0 00-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 00-3.658 0 8.258 8.258 0 00-.412-.833.051.051 0 00-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 00-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 003.995 2.02.05.05 0 00.056-.019c.308-.42.582-.863.818-1.329a.05.05 0 00-.028-.07 8.735 8.735 0 01-1.248-.595.05.05 0 01-.005-.083c.084-.063.168-.129.248-.195a.05.05 0 01.051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 01.053.007c.08.066.164.132.248.195a.051.051 0 01-.004.085c-.399.232-.813.431-1.249.594a.05.05 0 00-.03.07c.24.465.515.909.817 1.329a.05.05 0 00.056.019 13.235 13.235 0 004.001-2.02.049.049 0 00.021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 00-.02-.019z",linkedin:"M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 01.016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z",youtube:"M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 011.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 01-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 01-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 010 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 011.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 017.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z",mastodon:"M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765 2.79.765.504 1.783.504 5.253c-.005.995-.01 2.19.013 3.44.075 4.21.56 8.354 3.383 9.386 1.302.476 2.418.576 3.317.507 1.628-.125 2.541-.8 2.541-.8l-.054-1.182s-1.163.366-2.47.322c-1.293-.044-2.658-.138-2.867-1.716a3.23 3.23 0 01-.028-.465s1.27.31 2.879.384c.984.045 1.905-.058 2.842-.17zM13 8.59V5.319c0-.67-.17-1.2-.507-1.592-.348-.4-.806-.605-1.373-.605-.656 0-1.154.252-1.486.756L9.2 4.595l-.434-.717c-.332-.504-.83-.756-1.486-.756-.567 0-1.025.204-1.373.605-.338.392-.507.923-.507 1.592V8.59h1.69V5.468c0-.67.285-1.012.855-1.012.63 0 .946.404.946 1.204V7.11h1.682V5.66c0-.8.316-1.204.946-1.204.57 0 .855.342.855 1.012V8.59H13z",bluesky:"M3.468 1.948C5.303 3.325 7.276 6.118 8 7.616c.724-1.498 2.697-4.29 4.532-5.668C13.855 1.013 16 .638 16 3.14c0 .5-.286 4.2-.454 4.8-.585 2.093-2.716 2.628-4.544 2.305 3.195.564 4.007 2.433 2.25 4.302-3.337 3.548-4.8-1.244-5.252-2.547 0 0-.116-.334-.166-.334h.332C8.166 11.666 8.05 12 8.05 12c-.452 1.303-1.916 6.095-5.252 2.547-1.756-1.869-.946-3.738 2.25-4.302-1.829.323-3.96-.212-4.544-2.305C.336 7.34.05 3.64.05 3.14.05.638 2.195 1.013 3.468 1.948z"},i0=({platform:u,customIcon:p})=>{const d=u==="custom"&&p?p:l0[u];return d?s.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",children:s.jsx("path",{d})}):null},o0={Added:"#22c55e",Changed:"#3b82f6",Deprecated:"#f59e0b",Removed:"#ef4444",Fixed:"#8b5cf6",Security:"#f97316"};function s0({entries:u}){const[p,d]=w.useState(u.length<=5),c=p?u:u.slice(0,5);return s.jsxs("div",{"data-testid":"changelog-timeline",style:{position:"relative"},children:[s.jsx("div",{style:{position:"absolute",left:15,top:8,bottom:8,width:2,background:"var(--bd)"}}),c.map((v,E)=>s.jsxs("div",{"data-testid":`changelog-entry-${v.version}`,style:{position:"relative",paddingLeft:44,paddingBottom:E{const D=o0[j.type]||"#6b7280";return s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginBottom:8},children:[s.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:D}}),s.jsx("span",{style:{fontSize:12,fontWeight:600,textTransform:"uppercase",letterSpacing:".06em",color:D,fontFamily:"var(--font-code, monospace)"},children:j.type})]}),s.jsx("ul",{style:{margin:0,paddingLeft:18,listStyleType:"disc",color:"var(--tx2)"},children:j.items.map((z,y)=>s.jsx("li",{style:{fontSize:14,lineHeight:1.7,color:"var(--tx2)",marginBottom:2},children:z},y))})]},j.type)})]},v.version)),!p&&u.length>5&&s.jsx("div",{style:{textAlign:"center",marginTop:24},children:s.jsxs("button",{"data-testid":"changelog-show-more",onClick:()=>d(!0),style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 20px",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body, inherit)",cursor:"pointer"},children:["Show all ",u.length," releases"]})})]})}function u0(u,p,d){if(p==="index")return[];for(const c of u)if(c.pages.find(E=>E.id===p)){const E=[],j=c.pages[0];return E.push({label:c.section,href:j?j.urlPath:null}),E.push({label:d,href:null}),E}return[]}function r0({config:u,navigation:p,currentPageId:d,pageHtml:c,pageComponent:v,mdxComponents:E,pageTitle:j,pageDescription:D,headings:z,tocEnabled:y=!0,editUrl:G,lastUpdated:R,changelogEntries:K,apiManifest:nt,apiBaseUrl:xt,apiPlayground:Ot,apiAuth:At,ApiReferenceComponent:W,onNavigate:I,allPages:ct,versioning:Q,currentVersion:Y,i18n:L,currentLocale:U,docContext:at,basePath:lt="",isDraft:P,dir:mt,overrides:tt}){var Ca,En,fi,dl,ml,hl,za,Ma,pl,gl,Ne,Qt,ne,tn,Aa,di,mi,vl,Cn;const jt=U||(L==null?void 0:L.defaultLocale)||"en",$t=mt||((Ca=L==null?void 0:L.localeDirs)==null?void 0:Ca[jt])||"ltr",ft=$t==="rtl",M=((En=u.theme)==null?void 0:En.mode)||"auto",[B,Z]=w.useState(()=>{var b;return M==="dark"?!0:M==="light"?!1:((b=window.matchMedia)==null?void 0:b.call(window,"(prefers-color-scheme: dark)").matches)??!1}),[J,Tt]=w.useState(()=>typeof window<"u"&&window.innerWidth<768),[m,k]=w.useState(()=>typeof window<"u"&&window.innerWidth>=768),[H,q]=w.useState(!1),[it,rt]=w.useState(!1),[Et,It]=w.useState(!1),[Ut,Ze]=w.useState(null),[ha,pa]=w.useState({}),[rl,Je]=w.useState(()=>{var b;if(!((b=u.banner)!=null&&b.text))return!0;try{const N=Array.from(u.banner.text).reduce((et,dt)=>(et<<5)-et+dt.charCodeAt(0)|0,0).toString(36);return localStorage.getItem("tome-banner-dismissed")===N}catch{return!1}}),cl=Q&&Y&&Y!==Q.current,[ga,Oo]=w.useState(p.map(b=>b.section)),We=w.useRef(null),Fn=w.useRef(null),fl=w.useRef(""),[va,Do]=w.useState(()=>typeof window<"u"&&window.innerWidth>1100),si=((fi=u.theme)==null?void 0:fi.preset)||"amber",se=((dl=jo[si])==null?void 0:dl[B?"dark":"light"])||jo.amber.dark,ui=(ml=u.theme)!=null&&ml.accent?Vp(u.theme.accent,B):null,te=ui?{...se,...ui}:se,ya=((hl=jo[si])==null?void 0:hl.fonts)||jo.amber.fonts,xn={heading:((Ma=(za=u.theme)==null?void 0:za.fonts)==null?void 0:Ma.heading)||ya.heading,body:((gl=(pl=u.theme)==null?void 0:pl.fonts)==null?void 0:gl.body)||ya.body,code:((Qt=(Ne=u.theme)==null?void 0:Ne.fonts)==null?void 0:Qt.code)||ya.code};w.useEffect(()=>{if(M!=="auto")return;const b=window.matchMedia("(prefers-color-scheme: dark)"),N=et=>Z(et.matches);return b.addEventListener("change",N),()=>b.removeEventListener("change",N)},[M]),w.useEffect(()=>{document.documentElement.classList.toggle("dark",B)},[B]),w.useEffect(()=>{const b=()=>{const N=window.innerWidth;Do(N>1100),Tt(N<768)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),w.useEffect(()=>{if(J&&m)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[J,m]),w.useEffect(()=>{var b;(b=We.current)==null||b.scrollTo(0,0)},[d]),w.useEffect(()=>{const b=We.current;if(!b)return;const N=et=>{const dt=et.target;dt.tagName==="IMG"&&dt.closest(".tome-content")&&Ze(dt.src)};return b.addEventListener("click",N),()=>b.removeEventListener("click",N)},[]),w.useEffect(()=>{const b=We.current;if(!b)return;const N=et=>{const dt=et.target.closest("a");if(!dt)return;const St=dt.getAttribute("href");if(!St||St.startsWith("http://")||St.startsWith("https://")||St.startsWith("mailto:")||St.startsWith("tel:")||St.startsWith("//")||St.startsWith("#"))return;et.preventDefault();let yt=St.replace(/^\.\//,"").replace(/^\//,"").replace(/\.mdx?$/,"").replace(/\/$/,"");if(lt){const ce=lt.replace(/^\//,"").replace(/\/$/,"");ce&&yt.startsWith(ce+"/")?yt=yt.slice(ce.length+1):ce&&yt===ce&&(yt="index")}yt||(yt="index"),I(yt)};return b.addEventListener("click",N),()=>b.removeEventListener("click",N)},[I,lt]),w.useEffect(()=>{if(!Ut)return;const b=N=>{N.key==="Escape"&&Ze(null)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[Ut]);const Sn=u.toc,ri=(Sn==null?void 0:Sn.depth)??3,ba=(Sn==null?void 0:Sn.enabled)!==!1&&y,ye=z.filter(b=>b.depth<=ri),[ue,Ae]=w.useState("");w.useEffect(()=>{if(!ba||ye.length<2)return;const b=We.current;if(!b)return;const N=setTimeout(()=>{const et=[];for(const St of ye){const yt=b.querySelector(`#${CSS.escape(St.id)}`);yt&&et.push(yt)}if(et.length===0)return;const dt=new IntersectionObserver(St=>{const yt=St.filter(ce=>ce.isIntersecting).sort((ce,hi)=>ce.boundingClientRect.top-hi.boundingClientRect.top);yt.length>0&&Ae(yt[0].target.id)},{root:b,rootMargin:"0px 0px -80% 0px",threshold:0});for(const St of et)dt.observe(St);ee.current=dt},100);return()=>{var et;clearTimeout(N),(et=ee.current)==null||et.disconnect(),ee.current=null}},[d,ba,ye.map(b=>b.id).join(",")]);const ee=w.useRef(null);w.useEffect(()=>{Ae("")},[d]),w.useLayoutEffect(()=>{if(!Fn.current||!c)return;const b=c.replace(/]*>[\s\S]*?<\/h1>\s*/,"");Fn.current.innerHTML=b,fl.current=b},[c,d]);const ci=w.useCallback((b,N)=>{b.preventDefault();const et=We.current;if(!et)return;const dt=et.querySelector(`#${CSS.escape(N)}`);dt&&(dt.scrollIntoView({behavior:"smooth",block:"start"}),Ae(N))},[]);w.useEffect(()=>{const b=N=>{(N.metaKey||N.ctrlKey)&&N.key==="k"&&(N.preventDefault(),q(!0)),N.key==="Escape"&&q(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[]);const xa=p.flatMap(b=>b.pages),Sa=xa.findIndex(b=>b.id===d),Fe=Sa>0?xa[Sa-1]:null,$e=SaOo(N=>N.includes(b)?N.filter(et=>et!==b):[...N,b]),Ta={"--bg":te.bg,"--sf":te.sf,"--sfH":te.sfH,"--bd":te.bd,"--tx":te.tx,"--tx2":te.tx2,"--txM":te.txM,"--ac":te.ac,"--acD":te.acD,"--acT":te.acT,"--cdBg":te.cdBg,"--cdTx":te.cdTx,"--sbBg":te.sbBg,"--hdBg":te.hdBg,"--font-heading":`"${xn.heading}", serif`,"--font-body":`"${xn.body}", sans-serif`,"--font-code":`"${xn.code}", monospace`},Tn=v,He=(ne=u.banner)==null?void 0:ne.link,Ea=He?He.startsWith("#")||lt&&He.startsWith(lt+"/"):!1;return s.jsxs("div",{dir:$t,className:"tome-grain",style:{...Ta,color:"var(--tx)",background:"var(--bg)",fontFamily:"var(--font-body)",height:"100vh",overflow:"clip"},children:[((tn=u.banner)==null?void 0:tn.text)&&!rl&&s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:12,background:"var(--ac)",color:"#fff",padding:"8px 16px",fontSize:13,fontFamily:"var(--font-body)",fontWeight:500,textAlign:"center",width:"100vw",boxSizing:"border-box"},children:[u.banner.link?s.jsx("a",{href:Ea&&He.startsWith("#")?lt+"/"+He.slice(1):He,...Ea?{}:{target:"_blank",rel:"noopener noreferrer"},style:{color:"#fff",textDecoration:"underline"},onClick:Ea?b=>{b.preventDefault();const N=lt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),et=He.startsWith("#")?He.slice(1):He.replace(new RegExp("^"+N+"/?"),"");I(et||"index")}:void 0,children:u.banner.text}):s.jsx("span",{children:u.banner.text}),u.banner.dismissible!==!1&&s.jsx("button",{onClick:()=>{Je(!0);try{const b=Array.from(u.banner.text).reduce((N,et)=>(N<<5)-N+et.charCodeAt(0)|0,0).toString(36);localStorage.setItem("tome-banner-dismissed",b)}catch{}},"aria-label":"Dismiss banner",style:{background:"none",border:"none",color:"#fff",cursor:"pointer",fontSize:16,lineHeight:1,padding:0,opacity:.8},children:"×"})]}),H&&((Aa=u.search)==null?void 0:Aa.provider)==="algolia"&&u.search.appId&&u.search.apiKey&&u.search.indexName?s.jsx(t0,{appId:u.search.appId,apiKey:u.search.apiKey,indexName:u.search.indexName,onNavigate:b=>{I(b),q(!1)},onClose:()=>q(!1),basePath:lt}):H?s.jsx(c0,{allPages:ct,onNavigate:b=>{I(b),q(!1)},onClose:()=>q(!1),mobile:J}):null,s.jsxs("div",{style:{display:"flex",flexDirection:ft?"row-reverse":"row",flex:1,height:(di=u.banner)!=null&&di.text&&!rl?"calc(100vh - 32px)":"100vh"},children:[J&&m&&s.jsx("div",{onClick:()=>k(!1),style:{position:"fixed",inset:0,zIndex:200,background:"rgba(0,0,0,0.4)",backdropFilter:"blur(2px)"}}),tt!=null&&tt.Sidebar?s.jsx(tt.Sidebar,{config:u,navigation:p,currentPageId:d,onNavigate:I,mobile:J,sbOpen:m,setSbOpen:k,versioning:Q,currentVersion:Y}):s.jsxs("aside",{style:{width:m?270:0,minWidth:m?270:0,background:"var(--sbBg)",[ft?"borderLeft":"borderRight"]:"1px solid var(--bd)",display:"flex",flexDirection:"column",transition:"width .2s, min-width .2s",overflow:"hidden",...J?{position:"fixed",top:0,[ft?"right":"left"]:0,bottom:0,zIndex:201}:{}},children:[s.jsxs("a",{href:"/",style:{padding:"18px 20px",display:"flex",alignItems:"baseline",gap:6,borderBottom:"1px solid var(--bd)",textDecoration:"none",color:"inherit"},children:[s.jsx("span",{style:{fontFamily:"var(--font-heading)",fontSize:22,fontWeight:700,fontStyle:"italic"},children:u.name}),s.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"var(--ac)",display:"inline-block"}})]}),s.jsx("div",{style:{padding:"12px 14px"},children:s.jsxs("button",{onClick:()=>{q(!0),J&&k(!1)},style:{display:"flex",alignItems:"center",gap:8,width:"100%",background:"var(--cdBg)",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 12px",cursor:"pointer",color:"var(--txM)",fontSize:12.5,fontFamily:"var(--font-body)"},children:[s.jsx(rm,{}),s.jsx("span",{style:{flex:1,textAlign:ft?"right":"left"},children:"Search..."}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:9,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"2px 6px"},children:"⌘K"})]})}),s.jsx("nav",{style:{flex:1,overflow:"auto",padding:"4px 10px 20px"},children:p.map(b=>s.jsxs("div",{style:{marginBottom:8},children:[s.jsxs("button",{onClick:()=>Pe(b.section),style:{display:"flex",alignItems:"center",gap:6,width:"100%",background:"none",border:"none",padding:"8px 10px",cursor:"pointer",borderRadius:2,color:"var(--txM)",fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:".1em",fontFamily:"var(--font-code)"},children:[ga.includes(b.section)?s.jsx(Vu,{}):s.jsx(Pd,{}),b.section]}),ga.includes(b.section)&&s.jsx("div",{style:{[ft?"marginRight":"marginLeft"]:8,[ft?"borderRight":"borderLeft"]:"1px solid var(--bd)",[ft?"paddingRight":"paddingLeft"]:0},children:b.pages.map(N=>{const et=d===N.id;return s.jsxs("button",{onClick:()=>{I(N.id),J&&k(!1)},style:{display:"flex",alignItems:"center",gap:10,width:"100%",textAlign:ft?"right":"left",background:"none",border:"none",borderRadius:0,[ft?"borderRight":"borderLeft"]:et?"2px solid var(--ac)":"2px solid transparent",padding:"7px 14px",cursor:"pointer",color:et?"var(--ac)":"var(--tx2)",fontSize:13,fontWeight:et?500:400,fontFamily:"var(--font-body)",transition:"all .12s"},children:[N.title,N.badge&&(()=>{const dt={default:{bg:"var(--sf)",text:"var(--tx2)"},info:{bg:"rgba(59,130,246,0.15)",text:"rgb(59,130,246)"},success:{bg:"rgba(34,197,94,0.15)",text:"rgb(34,197,94)"},warning:{bg:"rgba(234,179,8,0.15)",text:"rgb(202,138,4)"},danger:{bg:"rgba(239,68,68,0.15)",text:"rgb(239,68,68)"}},St=dt[N.badge.variant||"default"]||dt.default;return s.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 6px",borderRadius:4,marginLeft:6,whiteSpace:"nowrap",background:St.bg,color:St.text},children:N.badge.text})})()]},N.id)})})]},b.section))}),Q&&J&&s.jsx("div",{style:{padding:"8px 16px",borderTop:"1px solid var(--bd)",display:"flex",gap:6},children:Q.versions.map(b=>s.jsxs("button",{onClick:()=>{const N=b===Q.current?"index":`${b}/index`;I(N)},style:{flex:1,padding:"3px 0",textAlign:"center",background:b===(Y||Q.current)?"var(--acD)":"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,cursor:"pointer",color:b===(Y||Q.current)?"var(--ac)":"var(--tx2)",fontSize:11,fontFamily:"var(--font-code)",fontWeight:b===Q.current?600:400},children:[b,b===Q.current?" (latest)":""]},b))}),s.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--bd)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[M==="auto"?s.jsx("button",{"aria-label":B?"Switch to light mode":"Switch to dark mode",onClick:()=>Z(b=>!b),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex"},children:B?s.jsx(em,{}):s.jsx(tm,{})}):s.jsx("div",{}),s.jsxs("span",{style:{fontSize:11,color:"var(--txM)",letterSpacing:.2},children:["Built with ","♡"," by Tome"]}),s.jsx("span",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)"},children:"v0.5.0"})]})]}),s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[tt!=null&&tt.Header?s.jsx(tt.Header,{config:u,navigation:p,currentPageId:d,onNavigate:I,mobile:J,sbOpen:m,setSbOpen:k,isDark:B,setDark:Z,versioning:Q,currentVersion:Y,i18n:L,currentLocale:U,onSearchOpen:()=>q(!0),basePath:lt}):s.jsxs("header",{style:{display:"flex",alignItems:"center",gap:J?8:12,padding:J?"8px 12px":"10px 24px",borderBottom:"1px solid var(--bd)",background:"var(--hdBg)",backdropFilter:"blur(12px)",maxWidth:"100vw",overflow:"visible",position:"relative",zIndex:200},children:[s.jsx("button",{"aria-label":m?"Close sidebar":"Open sidebar",onClick:()=>k(!m),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex"},children:m?s.jsx(Jp,{}):s.jsx(Zp,{})}),J?s.jsx("span",{style:{fontSize:13,color:"var(--ac)",fontFamily:"var(--font-code)",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:((mi=p.flatMap(b=>b.pages).find(b=>b.id===d))==null?void 0:mi.title)||""}):s.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--font-code)",fontSize:11,color:"var(--txM)",letterSpacing:".03em",flex:1},children:p.map(b=>{const N=b.pages.find(et=>et.id===d);return N?s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("span",{children:b.section}),s.jsx(Pd,{}),s.jsx("span",{style:{color:"var(--ac)"},children:N.title})]},b.section):null})}),u.topNav&&u.topNav.length>0&&!J&&s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[u.topNav.map(b=>{const N=b.href.startsWith("#")||lt&&b.href.startsWith(lt+"/"),et=!N;return s.jsxs("a",{href:N&&b.href.startsWith("#")?lt+"/"+b.href.slice(1):b.href,...et?{target:"_blank",rel:"noopener noreferrer"}:{},onClick:N?dt=>{dt.preventDefault();const St=b.href.startsWith("#")?b.href.slice(1):b.href.replace(new RegExp("^"+lt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"/?"),"");I(St)}:void 0,style:{display:"flex",alignItems:"center",gap:4,color:"var(--txM)",textDecoration:"none",fontSize:12,fontFamily:"var(--font-body)",fontWeight:500,transition:"color .15s"},onMouseOver:dt=>dt.currentTarget.style.color="var(--ac)",onMouseOut:dt=>dt.currentTarget.style.color="var(--txM)",children:[b.label,et&&s.jsx(a0,{})]},b.label)}),s.jsx("span",{style:{width:1,height:16,background:"var(--bd)"}})]}),u.socialLinks&&u.socialLinks.length>0&&!J&&s.jsx("div",{style:{display:"flex",alignItems:"center",gap:8},children:u.socialLinks.map(b=>s.jsx("a",{href:b.url,target:"_blank",rel:"noopener noreferrer","aria-label":b.label||b.platform,"data-testid":`social-link-${b.platform}`,style:{display:"flex",alignItems:"center",justifyContent:"center",color:"var(--tx2)",cursor:"pointer",transition:"color .15s"},onMouseOver:N=>N.currentTarget.style.color="var(--tx)",onMouseOut:N=>N.currentTarget.style.color="var(--tx2)",children:s.jsx(i0,{platform:b.platform,customIcon:b.icon})},b.url))}),J&&M==="auto"&&s.jsx("button",{"aria-label":B?"Switch to light mode":"Switch to dark mode",onClick:()=>Z(b=>!b),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex",flexShrink:0},children:B?s.jsx(em,{}):s.jsx(tm,{})}),Q&&!J&&s.jsxs("div",{style:{position:"relative"},children:[s.jsxs("button",{"data-testid":"version-switcher",onClick:()=>rt(b=>!b),style:{display:"flex",alignItems:"center",gap:6,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"5px 10px",cursor:"pointer",color:"var(--tx2)",fontSize:12,fontFamily:"var(--font-code)"},children:[s.jsx(e0,{}),Y||Q.current,s.jsx(Vu,{})]}),it&&s.jsx("div",{"data-testid":"version-dropdown",style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,boxShadow:"0 8px 32px rgba(0,0,0,0.2)",overflow:"hidden",zIndex:100,minWidth:120},children:Q.versions.map(b=>s.jsxs("button",{onClick:()=>{rt(!1);const N=b===Q.current?"index":`${b}/index`;I(N)},style:{display:"block",width:"100%",textAlign:"left",background:b===(Y||Q.current)?"var(--acD)":"none",border:"none",padding:"8px 14px",cursor:"pointer",color:b===(Y||Q.current)?"var(--ac)":"var(--tx2)",fontSize:12,fontFamily:"var(--font-code)",fontWeight:b===Q.current?600:400},children:[b,b===Q.current?" (latest)":""]},b))})]}),L&&L.locales.length>1&&!J&&s.jsxs("div",{style:{position:"relative"},children:[s.jsxs("button",{"data-testid":"language-switcher",onClick:()=>It(b=>!b),style:{display:"flex",alignItems:"center",gap:6,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"5px 10px",cursor:"pointer",color:"var(--tx2)",fontSize:12,fontFamily:"var(--font-body)"},children:[s.jsx(n0,{}),((vl=L.localeNames)==null?void 0:vl[U||L.defaultLocale])||U||L.defaultLocale,s.jsx(Vu,{})]}),Et&&s.jsx("div",{"data-testid":"language-dropdown",style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,boxShadow:"0 8px 32px rgba(0,0,0,0.2)",overflow:"hidden",zIndex:100,minWidth:120},children:L.locales.map(b=>{var ce;const N=b===(U||L.defaultLocale),et=((ce=L.localeNames)==null?void 0:ce[b])||b,dt=U||L.defaultLocale;let St=d;dt!==L.defaultLocale&&d.startsWith(`${dt}/`)&&(St=d.slice(dt.length+1));const yt=b===L.defaultLocale?St:`${b}/${St}`;return s.jsx("button",{onClick:()=>{It(!1),I(yt)},style:{display:"block",width:"100%",textAlign:"left",background:N?"var(--acD)":"none",border:"none",padding:"8px 14px",cursor:"pointer",color:N?"var(--ac)":"var(--tx2)",fontSize:12,fontFamily:"var(--font-body)",fontWeight:N?600:400},children:et},b)})})]})]}),cl&&s.jsxs("div",{"data-testid":"old-version-banner",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:"var(--acD)",borderBottom:"1px solid var(--bd)",padding:"8px 24px",fontSize:13,color:"var(--tx2)"},children:[s.jsxs("span",{children:["You're viewing docs for ",Y,"."]}),s.jsx("button",{onClick:()=>{I("index")},style:{background:"none",border:"none",color:"var(--ac)",cursor:"pointer",fontWeight:600,fontSize:13,fontFamily:"var(--font-body)",textDecoration:"underline"},children:"Switch to latest."})]}),s.jsxs("div",{ref:We,style:{flex:1,overflow:"auto",display:"flex"},children:[s.jsxs("main",{style:{flex:1,maxWidth:J?"100%":nt?1100:760,padding:J?"24px 16px 60px":"40px 48px 80px",margin:"0 auto",minWidth:0},children:[Ie.length>0&&s.jsx("nav",{"aria-label":"Breadcrumbs","data-testid":"breadcrumbs",style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:"var(--tx2)",marginBottom:8},children:Ie.map((b,N)=>s.jsxs(sm.Fragment,{children:[N>0&&s.jsx("span",{style:{color:"var(--tx2)",opacity:.5},children:"›"}),N{et.preventDefault();const dt=p.flatMap(St=>St.pages).find(St=>St.urlPath===b.href);dt&&I(dt.id)},style:{color:"var(--tx2)",textDecoration:"none",cursor:"pointer"},children:b.label}):s.jsx("span",{style:N===Ie.length-1?{color:"var(--tx)"}:void 0,children:b.label})]},N))}),s.jsx("h1",{style:{fontFamily:"var(--font-heading)",fontSize:J?26:38,fontWeight:400,fontStyle:"italic",lineHeight:1.15,marginBottom:8},children:j}),P&&s.jsx("div",{"data-testid":"draft-banner",style:{background:"#fef3c7",color:"#92400e",padding:"8px 16px",borderRadius:6,fontSize:13,marginBottom:16},children:"Draft — This page is only visible in development"}),D&&s.jsx("p",{style:{fontSize:16,color:"var(--tx2)",lineHeight:1.6,marginBottom:32},children:D}),s.jsx("div",{style:{borderTop:"1px solid var(--bd)",paddingTop:28},children:nt&&W?s.jsx(W,{manifest:nt,baseUrl:xt,showPlayground:Ot,playgroundAuth:At}):K&&K.length>0?s.jsx(s0,{entries:K}):Tn?s.jsx("div",{className:"tome-content",children:s.jsx(Tn,{components:E||{}})}):s.jsx("div",{className:"tome-content",ref:Fn},d)}),tt!=null&&tt.PageFooter?s.jsx(tt.PageFooter,{editUrl:G,lastUpdated:R,currentPageId:d,prev:Fe,next:$e,onNavigate:I,mobile:J}):s.jsxs(s.Fragment,{children:[(G||R)&&s.jsxs("div",{style:{marginTop:40,display:"flex",flexDirection:J?"column":"row",alignItems:J?"flex-start":"center",justifyContent:"space-between",gap:J?8:16},children:[G&&s.jsx("div",{"data-testid":"edit-page-link",children:s.jsxs("a",{href:G,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--txM)",textDecoration:"none",fontSize:13,fontFamily:"var(--font-body)",transition:"color .15s"},onMouseOver:b=>b.currentTarget.style.color="var(--ac)",onMouseOut:b=>b.currentTarget.style.color="var(--txM)",children:[s.jsx(Wp,{})," Edit this page on GitHub"]})}),R&&s.jsxs("div",{"data-testid":"last-updated",style:{fontSize:12,color:"var(--txM)",fontFamily:"var(--font-body)"},children:["Last updated ",Fp(R)]})]}),s.jsx("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:24,padding:"12px 0"},children:ha[d]?s.jsx("span",{style:{fontSize:13,color:"var(--txM)",fontFamily:"var(--font-body)"},children:"Thanks for your feedback!"}):s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{fontSize:13,color:"var(--txM)",fontFamily:"var(--font-body)"},children:"Was this helpful?"}),s.jsx("button",{onClick:()=>{pa(b=>({...b,[d]:!0}));try{localStorage.setItem(`tome-feedback-${d}`,"up")}catch{}},style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"4px 10px",cursor:"pointer",fontSize:13,color:"var(--txM)",transition:"border-color .15s"},children:"👍"}),s.jsx("button",{onClick:()=>{pa(b=>({...b,[d]:!0}));try{localStorage.setItem(`tome-feedback-${d}`,"down")}catch{}},style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"4px 10px",cursor:"pointer",fontSize:13,color:"var(--txM)",transition:"border-color .15s"},children:"👎"})]})}),s.jsxs("div",{style:{display:"flex",flexDirection:J?"column":"row",justifyContent:"space-between",marginTop:16,paddingTop:24,borderTop:"1px solid var(--bd)",gap:J?12:16},children:[Fe?s.jsxs("button",{onClick:()=>I(Fe.id),style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"10px 16px",cursor:"pointer",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body)",transition:"border-color .15s, color .15s"},children:[ft?s.jsx(am,{}):s.jsx(nm,{})," ",Fe.title]}):s.jsx("div",{}),$e?s.jsxs("button",{onClick:()=>I($e.id),style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"10px 16px",cursor:"pointer",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body)",transition:"border-color .15s, color .15s"},children:[$e.title," ",ft?s.jsx(nm,{}):s.jsx(am,{})]}):s.jsx("div",{})]})]})]}),tt!=null&&tt.Toc?ba&&ye.length>=2&&va&&s.jsx(tt.Toc,{headings:ye,activeHeadingId:ue,onScrollToHeading:ci}):ba&&ye.length>=2&&va&&s.jsxs("aside",{"data-testid":"toc-sidebar",style:{width:200,padding:ft?"40px 0 40px 16px":"40px 16px 40px 0",position:"sticky",top:0,alignSelf:"flex-start",flexShrink:0},children:[s.jsx("div",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:".1em",color:"var(--txM)",marginBottom:12,fontFamily:"var(--font-code)"},children:"On this page"}),s.jsx("nav",{"aria-label":"Table of contents",style:{[ft?"borderRight":"borderLeft"]:"1px solid var(--bd)",[ft?"paddingRight":"paddingLeft"]:0},children:ye.map((b,N)=>{const et=ue===b.id;return s.jsx("a",{href:`#${b.id}`,onClick:dt=>ci(dt,b.id),"data-testid":`toc-link-${b.id}`,style:{display:"block",fontSize:12,color:et?"var(--ac)":"var(--txM)",fontWeight:et?500:400,textDecoration:"none",padding:"4px 12px",[ft?"paddingRight":"paddingLeft"]:12+(b.depth-2)*12,lineHeight:1.4,transition:"color .15s, font-weight .15s",[ft?"borderRight":"borderLeft"]:et?"2px solid var(--ac)":"2px solid transparent",[ft?"marginRight":"marginLeft"]:-1},children:b.text},N)})})]})]})]})]}),(tt==null?void 0:tt.Footer)&&s.jsx(tt.Footer,{config:u,navigation:p,currentPageId:d,onNavigate:I}),((Cn=u.ai)==null?void 0:Cn.enabled)&&s.jsx(Xp,{provider:u.ai.provider||"anthropic",model:u.ai.model,apiKey:typeof __TOME_AI_API_KEY__<"u"&&__TOME_AI_API_KEY__?__TOME_AI_API_KEY__:void 0,context:(at==null?void 0:at.map(b=>`## ${b.title} +${d}`}return p}async function Gp(u,p,d,c){var j,D,C;const v=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${p}`},body:JSON.stringify({model:d,messages:[{role:"system",content:um(c)},...u.map(y=>({role:y.role,content:y.content}))]})});if(!v.ok){const y=await v.text();throw new Error(`OpenAI API error (${v.status}): ${y}`)}return((C=(D=(j=(await v.json()).choices)==null?void 0:j[0])==null?void 0:D.message)==null?void 0:C.content)||"No response."}async function Yp(u,p,d,c){var j,D;const v=await fetch("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":p,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify({model:d,max_tokens:1024,system:um(c),messages:u.map(C=>({role:C.role,content:C.content}))})});if(!v.ok){const C=await v.text();throw new Error(`Anthropic API error (${v.status}): ${C}`)}return((D=(j=(await v.json()).content)==null?void 0:j[0])==null?void 0:D.text)||"No response."}function Kp(u){return u==="openai"?"gpt-4o-mini":"claude-sonnet-4-20250514"}function Xp({provider:u,model:p,apiKey:d,context:c}){const[v,E]=w.useState(!1),[j,D]=w.useState([]),[C,y]=w.useState(""),[G,R]=w.useState(!1),[K,nt]=w.useState(null),xt=w.useRef(null),Ot=w.useRef(null),At=d||(typeof window<"u"?window.__TOME_AI_API_KEY__:void 0),W=p||Kp(u);w.useEffect(()=>{var Q;(Q=xt.current)==null||Q.scrollIntoView({behavior:"smooth"})},[j]),w.useEffect(()=>{v&&setTimeout(()=>{var Q;return(Q=Ot.current)==null?void 0:Q.focus()},100)},[v]);const I=w.useCallback(async()=>{const Q=C.trim();if(!Q||G||!At)return;const Y={role:"user",content:Q},L=[...j,Y];D(L),y(""),R(!0),nt(null);try{let U;u==="openai"?U=await Gp(L,At,W,c):U=await Yp(L,At,W,c),D(lt=>[...lt,{role:"assistant",content:U}])}catch(U){nt(U instanceof Error?U.message:"Failed to get response")}finally{R(!1)}},[C,G,j,u,At,W,c]),ct=w.useCallback(Q=>{Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),I())},[I]);return v?s.jsxs("div",{"data-testid":"ai-chat-panel",style:{position:"fixed",bottom:24,right:24,zIndex:900,width:380,maxWidth:"calc(100vw - 48px)",height:520,maxHeight:"calc(100vh - 48px)",background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,boxShadow:"0 16px 64px rgba(0,0,0,0.3)",display:"flex",flexDirection:"column",overflow:"hidden",fontFamily:"var(--font-body)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid var(--bd)",flexShrink:0},children:[s.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--tx)"},children:"Ask AI"}),s.jsx("button",{"data-testid":"ai-chat-close",onClick:()=>E(!1),"aria-label":"Close AI chat",style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex",padding:4},children:s.jsx(Np,{})})]}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:"12px 16px"},children:[!At&&s.jsxs("div",{"data-testid":"ai-chat-no-key",style:{textAlign:"center",color:"var(--txM)",fontSize:13,padding:"24px 8px",lineHeight:1.6},children:[s.jsx("p",{style:{marginBottom:8,fontWeight:500,color:"var(--tx)"},children:"AI not configured"}),s.jsxs("p",{style:{marginBottom:8},children:["To enable AI chat, set the ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"apiKeyEnv"})," in ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"tome.config.js"})," and provide the environment variable at build time."]}),s.jsxs("p",{style:{fontSize:11.5,color:"var(--txM)"},children:["Example: ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"TOME_AI_KEY=sk-... tome build"})]})]}),j.map((Q,Y)=>s.jsx("div",{"data-testid":`ai-chat-message-${Q.role}`,style:{marginBottom:12,display:"flex",justifyContent:Q.role==="user"?"flex-end":"flex-start"},children:s.jsx("div",{style:{maxWidth:"85%",padding:"8px 12px",borderRadius:10,fontSize:13,lineHeight:1.55,whiteSpace:"pre-wrap",wordBreak:"break-word",background:Q.role==="user"?"var(--ac)":"var(--cdBg)",color:Q.role==="user"?"#fff":"var(--tx)"},children:Q.content})},Y)),G&&s.jsx("div",{"data-testid":"ai-chat-loading",style:{display:"flex",justifyContent:"flex-start",marginBottom:12},children:s.jsx("div",{style:{padding:"8px 12px",borderRadius:10,fontSize:13,background:"var(--cdBg)",color:"var(--txM)"},children:"Thinking..."})}),K&&s.jsx("div",{"data-testid":"ai-chat-error",style:{padding:"8px 12px",borderRadius:8,fontSize:12,background:"rgba(220,50,50,0.1)",color:"#d44",marginBottom:12},children:K}),s.jsx("div",{ref:xt})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderTop:"1px solid var(--bd)",flexShrink:0},children:[s.jsx("input",{ref:Ot,"data-testid":"ai-chat-input",value:C,onChange:Q=>y(Q.target.value),onKeyDown:ct,placeholder:At?"Ask a question...":"API key required",disabled:!At,style:{flex:1,background:"var(--cdBg)",border:"1px solid var(--bd)",borderRadius:8,padding:"8px 12px",color:"var(--tx)",fontSize:13,fontFamily:"var(--font-body)",outline:"none"}}),s.jsx("button",{"data-testid":"ai-chat-send",onClick:I,disabled:!At||!C.trim()||G,"aria-label":"Send message",style:{width:34,height:34,borderRadius:8,background:At&&C.trim()?"var(--ac)":"var(--cdBg)",color:At&&C.trim()?"#fff":"var(--txM)",border:"none",cursor:At&&C.trim()?"pointer":"default",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:s.jsx(qp,{})})]})]}):s.jsx("button",{"data-testid":"ai-chat-button",onClick:()=>E(!0),"aria-label":"Open AI chat",style:{position:"fixed",bottom:24,right:24,zIndex:900,width:48,height:48,borderRadius:"50%",background:"var(--ac)",color:"#fff",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 16px rgba(0,0,0,0.25)",transition:"transform 0.15s"},children:s.jsx(Hp,{})})}function Qp(u){const p=/^#([0-9a-f]{6})$/i.exec(u.trim());if(!p)return null;const d=parseInt(p[1],16);return[d>>16&255,d>>8&255,d&255]}function Vp(u,p){const d=Qp(u);if(!d)return null;const[c,v,E]=d,j=`rgba(${c},${v},${E},${p?.12:.08})`,D=p?1.15:.85,C=Math.min(255,Math.round(c*D)),y=Math.min(255,Math.round(v*D)),G=Math.min(255,Math.round(E*D)),R=`rgb(${C},${y},${G})`;return{ac:u,acD:j,acT:R}}const Me=({d:u,size:p=16})=>s.jsx("svg",{width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:u})}),rm=()=>s.jsx(Me,{d:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21 21l-4.3-4.3"}),Pd=()=>s.jsx(Me,{d:"M9 18l6-6-6-6",size:14}),Vu=()=>s.jsx(Me,{d:"M6 9l6 6 6-6",size:14}),Zp=()=>s.jsx(Me,{d:"M3 12h18M3 6h18M3 18h18",size:20}),Jp=()=>s.jsx(Me,{d:"M18 6L6 18M6 6l12 12",size:18}),tm=()=>s.jsx(Me,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"}),em=()=>s.jsx(Me,{d:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0-4a1 1 0 0 1 1-1v-1a1 1 0 0 1-2 0v1a1 1 0 0 1 1 1Zm0 16a1 1 0 0 1 1 1v1a1 1 0 0 1-2 0v-1a1 1 0 0 1 1-1ZM4 12a1 1 0 0 1-1 1H2a1 1 0 0 1 0-2h1a1 1 0 0 1 1 1Zm18-1h-1a1 1 0 0 1 0 2h1a1 1 0 0 1 0-2ZM6.34 6.34a1 1 0 0 1-1.41 0l-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 1 0 1.41Zm12.73-2.12-.71.71a1 1 0 0 1-1.41-1.41l.71-.71a1 1 0 1 1 1.41 1.41ZM6.34 17.66l-.71.71a1 1 0 0 1-1.41-1.41l.71-.71a1 1 0 0 1 1.41 1.41Zm12.73 2.12-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 1-1.41 1.41Z"}),nm=()=>s.jsx(Me,{d:"M19 12H5M12 19l-7-7 7-7",size:14}),lm=()=>s.jsx(Me,{d:"M5 12h14M12 5l7 7-7 7",size:14}),Wp=()=>s.jsx(Me,{d:"M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",size:13});function Fp(u){const p=new Date(u),c=new Date().getTime()-p.getTime();if(isNaN(c))return"";const v=Math.floor(c/1e3),E=Math.floor(v/60),j=Math.floor(E/60),D=Math.floor(j/24),C=Math.floor(D/30),y=Math.floor(D/365);return v<60?"just now":E<60?`${E} minute${E===1?"":"s"} ago`:j<24?`${j} hour${j===1?"":"s"} ago`:D<30?`${D} day${D===1?"":"s"} ago`:C<12?`${C} month${C===1?"":"s"} ago`:y>=1?`${y} year${y===1?"":"s"} ago`:p.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}let ua=null;const $p="/_pagefind/pagefind.js";async function Ip(){if(ua)return ua;try{return ua=await import($p),await ua.init(),ua}catch{return null}}let ko=null;function Pp(){return ko||(ko=qt(()=>import("./theme-BIHI7g3E.js"),[]).catch(()=>null),ko)}function t0({appId:u,apiKey:p,indexName:d,onNavigate:c,onClose:v,basePath:E=""}){const[j,D]=w.useState(null),[C,y]=w.useState(!1);w.useEffect(()=>{Pp().then(R=>{R&&R.DocSearch?D(()=>R.DocSearch):R&&R.default?D(()=>R.default):y(!0)})},[]);const G=w.useCallback(R=>{try{let nt=new URL(R,"http://localhost").pathname;if(E){const xt=E.replace(/\/$/,"");nt.startsWith(xt)&&(nt=nt.slice(xt.length))}return nt.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index"}catch{return"index"}},[E]);return C?s.jsx("div",{onClick:v,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"12vh"},children:s.jsx("div",{onClick:R=>R.stopPropagation(),style:{background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,width:"100%",maxWidth:520,boxShadow:"0 24px 80px rgba(0,0,0,0.4)",padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"Algolia DocSearch is not available. Install @docsearch/react to enable it."})}):j?s.jsx("div",{"data-testid":"algolia-search-modal",children:s.jsx(j,{appId:u,apiKey:p,indexName:d,navigator:{navigate({itemUrl:R}){const K=G(R);c(K)}},hitComponent:({hit:R,children:K})=>s.jsx("a",{href:R.url,onClick:nt=>{nt.preventDefault();const xt=G(R.url);c(xt)},children:K})})}):s.jsx("div",{onClick:v,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"12vh"},children:s.jsx("div",{style:{background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,width:"100%",maxWidth:520,boxShadow:"0 24px 80px rgba(0,0,0,0.4)",padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"Loading search..."})})}const e0=()=>s.jsx(Me,{d:"M12 8v4l3 3m6-3a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z",size:14}),n0=()=>s.jsx(Me,{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM3.6 9h16.8M3.6 15h16.8M12 3a15 15 0 0 1 4 9 15 15 0 0 1-4 9 15 15 0 0 1-4-9 15 15 0 0 1 4-9Z",size:14}),l0=()=>s.jsx(Me,{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3",size:11}),a0={github:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z",twitter:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865l8.875 11.633Z",discord:"M13.545 2.907a13.227 13.227 0 00-3.257-1.011.05.05 0 00-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 00-3.658 0 8.258 8.258 0 00-.412-.833.051.051 0 00-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 00-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 003.995 2.02.05.05 0 00.056-.019c.308-.42.582-.863.818-1.329a.05.05 0 00-.028-.07 8.735 8.735 0 01-1.248-.595.05.05 0 01-.005-.083c.084-.063.168-.129.248-.195a.05.05 0 01.051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 01.053.007c.08.066.164.132.248.195a.051.051 0 01-.004.085c-.399.232-.813.431-1.249.594a.05.05 0 00-.03.07c.24.465.515.909.817 1.329a.05.05 0 00.056.019 13.235 13.235 0 004.001-2.02.049.049 0 00.021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 00-.02-.019z",linkedin:"M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 01.016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z",youtube:"M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 011.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 01-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 01-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 010 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 011.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 017.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z",mastodon:"M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765 2.79.765.504 1.783.504 5.253c-.005.995-.01 2.19.013 3.44.075 4.21.56 8.354 3.383 9.386 1.302.476 2.418.576 3.317.507 1.628-.125 2.541-.8 2.541-.8l-.054-1.182s-1.163.366-2.47.322c-1.293-.044-2.658-.138-2.867-1.716a3.23 3.23 0 01-.028-.465s1.27.31 2.879.384c.984.045 1.905-.058 2.842-.17zM13 8.59V5.319c0-.67-.17-1.2-.507-1.592-.348-.4-.806-.605-1.373-.605-.656 0-1.154.252-1.486.756L9.2 4.595l-.434-.717c-.332-.504-.83-.756-1.486-.756-.567 0-1.025.204-1.373.605-.338.392-.507.923-.507 1.592V8.59h1.69V5.468c0-.67.285-1.012.855-1.012.63 0 .946.404.946 1.204V7.11h1.682V5.66c0-.8.316-1.204.946-1.204.57 0 .855.342.855 1.012V8.59H13z",bluesky:"M3.468 1.948C5.303 3.325 7.276 6.118 8 7.616c.724-1.498 2.697-4.29 4.532-5.668C13.855 1.013 16 .638 16 3.14c0 .5-.286 4.2-.454 4.8-.585 2.093-2.716 2.628-4.544 2.305 3.195.564 4.007 2.433 2.25 4.302-3.337 3.548-4.8-1.244-5.252-2.547 0 0-.116-.334-.166-.334h.332C8.166 11.666 8.05 12 8.05 12c-.452 1.303-1.916 6.095-5.252 2.547-1.756-1.869-.946-3.738 2.25-4.302-1.829.323-3.96-.212-4.544-2.305C.336 7.34.05 3.64.05 3.14.05.638 2.195 1.013 3.468 1.948z"},i0=({platform:u,customIcon:p})=>{const d=u==="custom"&&p?p:a0[u];return d?s.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",children:s.jsx("path",{d})}):null},o0={Added:"#22c55e",Changed:"#3b82f6",Deprecated:"#f59e0b",Removed:"#ef4444",Fixed:"#8b5cf6",Security:"#f97316"};function s0({entries:u}){const[p,d]=w.useState(u.length<=5),c=p?u:u.slice(0,5);return s.jsxs("div",{"data-testid":"changelog-timeline",style:{position:"relative"},children:[s.jsx("div",{style:{position:"absolute",left:15,top:8,bottom:8,width:2,background:"var(--bd)"}}),c.map((v,E)=>s.jsxs("div",{"data-testid":`changelog-entry-${v.version}`,style:{position:"relative",paddingLeft:44,paddingBottom:E{const D=o0[j.type]||"#6b7280";return s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginBottom:8},children:[s.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:D}}),s.jsx("span",{style:{fontSize:12,fontWeight:600,textTransform:"uppercase",letterSpacing:".06em",color:D,fontFamily:"var(--font-code, monospace)"},children:j.type})]}),s.jsx("ul",{style:{margin:0,paddingLeft:18,listStyleType:"disc",color:"var(--tx2)"},children:j.items.map((C,y)=>s.jsx("li",{style:{fontSize:14,lineHeight:1.7,color:"var(--tx2)",marginBottom:2},children:C},y))})]},j.type)})]},v.version)),!p&&u.length>5&&s.jsx("div",{style:{textAlign:"center",marginTop:24},children:s.jsxs("button",{"data-testid":"changelog-show-more",onClick:()=>d(!0),style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 20px",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body, inherit)",cursor:"pointer"},children:["Show all ",u.length," releases"]})})]})}function u0(u,p,d){if(p==="index")return[];for(const c of u)if(c.pages.find(E=>E.id===p)){const E=[],j=c.pages[0];return E.push({label:c.section,href:j?j.urlPath:null}),E.push({label:d,href:null}),E}return[]}function r0({config:u,navigation:p,currentPageId:d,pageHtml:c,pageComponent:v,mdxComponents:E,pageTitle:j,pageDescription:D,headings:C,tocEnabled:y=!0,editUrl:G,lastUpdated:R,changelogEntries:K,apiManifest:nt,apiBaseUrl:xt,apiPlayground:Ot,apiAuth:At,ApiReferenceComponent:W,onNavigate:I,allPages:ct,versioning:Q,currentVersion:Y,i18n:L,currentLocale:U,docContext:lt,basePath:at="",isDraft:P,dir:mt,overrides:tt}){var zl,En,fi,da,ma,ha,Cl,Ml,pa,ga,Ne,Qt,ne,tn,Al,di,mi,va,zn;const jt=U||(L==null?void 0:L.defaultLocale)||"en",$t=mt||((zl=L==null?void 0:L.localeDirs)==null?void 0:zl[jt])||"ltr",ft=$t==="rtl",M=((En=u.theme)==null?void 0:En.mode)||"auto",[B,Z]=w.useState(()=>{var b;return M==="dark"?!0:M==="light"?!1:((b=window.matchMedia)==null?void 0:b.call(window,"(prefers-color-scheme: dark)").matches)??!1}),[J,Tt]=w.useState(()=>typeof window<"u"&&window.innerWidth<768),[m,_]=w.useState(()=>typeof window<"u"&&window.innerWidth>=768),[H,q]=w.useState(!1),[it,rt]=w.useState(!1),[Et,It]=w.useState(!1),[Ut,Ze]=w.useState(null),[hl,pl]=w.useState({}),[ra,Je]=w.useState(()=>{var b;if(!((b=u.banner)!=null&&b.text))return!0;try{const N=Array.from(u.banner.text).reduce((et,dt)=>(et<<5)-et+dt.charCodeAt(0)|0,0).toString(36);return localStorage.getItem("tome-banner-dismissed")===N}catch{return!1}}),ca=Q&&Y&&Y!==Q.current,[gl,Oo]=w.useState(p.map(b=>b.section)),We=w.useRef(null),Fn=w.useRef(null),fa=w.useRef(""),[vl,Do]=w.useState(()=>typeof window<"u"&&window.innerWidth>1100),si=((fi=u.theme)==null?void 0:fi.preset)||"amber",se=((da=jo[si])==null?void 0:da[B?"dark":"light"])||jo.amber.dark,ui=(ma=u.theme)!=null&&ma.accent?Vp(u.theme.accent,B):null,te=ui?{...se,...ui}:se,yl=((ha=jo[si])==null?void 0:ha.fonts)||jo.amber.fonts,xn={heading:((Ml=(Cl=u.theme)==null?void 0:Cl.fonts)==null?void 0:Ml.heading)||yl.heading,body:((ga=(pa=u.theme)==null?void 0:pa.fonts)==null?void 0:ga.body)||yl.body,code:((Qt=(Ne=u.theme)==null?void 0:Ne.fonts)==null?void 0:Qt.code)||yl.code};w.useEffect(()=>{if(M!=="auto")return;const b=window.matchMedia("(prefers-color-scheme: dark)"),N=et=>Z(et.matches);return b.addEventListener("change",N),()=>b.removeEventListener("change",N)},[M]),w.useEffect(()=>{document.documentElement.classList.toggle("dark",B)},[B]),w.useEffect(()=>{const b=()=>{const N=window.innerWidth;Do(N>1100),Tt(N<768)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),w.useEffect(()=>{if(J&&m)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[J,m]),w.useEffect(()=>{var b;(b=We.current)==null||b.scrollTo(0,0)},[d]),w.useEffect(()=>{const b=We.current;if(!b)return;const N=et=>{const dt=et.target;dt.tagName==="IMG"&&dt.closest(".tome-content")&&Ze(dt.src)};return b.addEventListener("click",N),()=>b.removeEventListener("click",N)},[]),w.useEffect(()=>{const b=We.current;if(!b)return;const N=et=>{const dt=et.target.closest("a");if(!dt)return;const St=dt.getAttribute("href");if(!St||St.startsWith("http://")||St.startsWith("https://")||St.startsWith("mailto:")||St.startsWith("tel:")||St.startsWith("//")||St.startsWith("#"))return;et.preventDefault();let yt=St.replace(/^\.\//,"").replace(/^\//,"").replace(/\.mdx?$/,"").replace(/\/$/,"");if(at){const ce=at.replace(/^\//,"").replace(/\/$/,"");ce&&yt.startsWith(ce+"/")?yt=yt.slice(ce.length+1):ce&&yt===ce&&(yt="index")}yt||(yt="index"),I(yt)};return b.addEventListener("click",N),()=>b.removeEventListener("click",N)},[I,at]),w.useEffect(()=>{if(!Ut)return;const b=N=>{N.key==="Escape"&&Ze(null)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[Ut]);const Sn=u.toc,ri=(Sn==null?void 0:Sn.depth)??3,bl=(Sn==null?void 0:Sn.enabled)!==!1&&y,ye=C.filter(b=>b.depth<=ri),[ue,Ae]=w.useState("");w.useEffect(()=>{if(!bl||ye.length<2)return;const b=We.current;if(!b)return;const N=setTimeout(()=>{const et=[];for(const St of ye){const yt=b.querySelector(`#${CSS.escape(St.id)}`);yt&&et.push(yt)}if(et.length===0)return;const dt=new IntersectionObserver(St=>{const yt=St.filter(ce=>ce.isIntersecting).sort((ce,hi)=>ce.boundingClientRect.top-hi.boundingClientRect.top);yt.length>0&&Ae(yt[0].target.id)},{root:b,rootMargin:"0px 0px -80% 0px",threshold:0});for(const St of et)dt.observe(St);ee.current=dt},100);return()=>{var et;clearTimeout(N),(et=ee.current)==null||et.disconnect(),ee.current=null}},[d,bl,ye.map(b=>b.id).join(",")]);const ee=w.useRef(null);w.useEffect(()=>{Ae("")},[d]),w.useLayoutEffect(()=>{if(!Fn.current||!c)return;const b=c.replace(/]*>[\s\S]*?<\/h1>\s*/,"");Fn.current.innerHTML=b,fa.current=b},[c,d]);const ci=w.useCallback((b,N)=>{b.preventDefault();const et=We.current;if(!et)return;const dt=et.querySelector(`#${CSS.escape(N)}`);dt&&(dt.scrollIntoView({behavior:"smooth",block:"start"}),Ae(N))},[]);w.useEffect(()=>{const b=N=>{(N.metaKey||N.ctrlKey)&&N.key==="k"&&(N.preventDefault(),q(!0)),N.key==="Escape"&&q(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[]);const xl=p.flatMap(b=>b.pages),Sl=xl.findIndex(b=>b.id===d),Fe=Sl>0?xl[Sl-1]:null,$e=SlOo(N=>N.includes(b)?N.filter(et=>et!==b):[...N,b]),Tl={"--bg":te.bg,"--sf":te.sf,"--sfH":te.sfH,"--bd":te.bd,"--tx":te.tx,"--tx2":te.tx2,"--txM":te.txM,"--ac":te.ac,"--acD":te.acD,"--acT":te.acT,"--cdBg":te.cdBg,"--cdTx":te.cdTx,"--sbBg":te.sbBg,"--hdBg":te.hdBg,"--font-heading":`"${xn.heading}", serif`,"--font-body":`"${xn.body}", sans-serif`,"--font-code":`"${xn.code}", monospace`},Tn=v,He=(ne=u.banner)==null?void 0:ne.link,El=He?He.startsWith("#")||at&&He.startsWith(at+"/"):!1;return s.jsxs("div",{dir:$t,className:"tome-grain",style:{...Tl,color:"var(--tx)",background:"var(--bg)",fontFamily:"var(--font-body)",height:"100vh",overflow:"clip"},children:[((tn=u.banner)==null?void 0:tn.text)&&!ra&&s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:12,background:"var(--ac)",color:"#fff",padding:"8px 16px",fontSize:13,fontFamily:"var(--font-body)",fontWeight:500,textAlign:"center",width:"100vw",boxSizing:"border-box"},children:[u.banner.link?s.jsx("a",{href:El&&He.startsWith("#")?at+"/"+He.slice(1):He,...El?{}:{target:"_blank",rel:"noopener noreferrer"},style:{color:"#fff",textDecoration:"underline"},onClick:El?b=>{b.preventDefault();const N=at.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),et=He.startsWith("#")?He.slice(1):He.replace(new RegExp("^"+N+"/?"),"");I(et||"index")}:void 0,children:u.banner.text}):s.jsx("span",{children:u.banner.text}),u.banner.dismissible!==!1&&s.jsx("button",{onClick:()=>{Je(!0);try{const b=Array.from(u.banner.text).reduce((N,et)=>(N<<5)-N+et.charCodeAt(0)|0,0).toString(36);localStorage.setItem("tome-banner-dismissed",b)}catch{}},"aria-label":"Dismiss banner",style:{background:"none",border:"none",color:"#fff",cursor:"pointer",fontSize:16,lineHeight:1,padding:0,opacity:.8},children:"×"})]}),H&&((Al=u.search)==null?void 0:Al.provider)==="algolia"&&u.search.appId&&u.search.apiKey&&u.search.indexName?s.jsx(t0,{appId:u.search.appId,apiKey:u.search.apiKey,indexName:u.search.indexName,onNavigate:b=>{I(b),q(!1)},onClose:()=>q(!1),basePath:at}):H?s.jsx(c0,{allPages:ct,onNavigate:b=>{I(b),q(!1)},onClose:()=>q(!1),mobile:J}):null,s.jsxs("div",{style:{display:"flex",flexDirection:ft?"row-reverse":"row",flex:1,height:(di=u.banner)!=null&&di.text&&!ra?"calc(100vh - 32px)":"100vh"},children:[J&&m&&s.jsx("div",{onClick:()=>_(!1),style:{position:"fixed",inset:0,zIndex:200,background:"rgba(0,0,0,0.4)",backdropFilter:"blur(2px)"}}),tt!=null&&tt.Sidebar?s.jsx(tt.Sidebar,{config:u,navigation:p,currentPageId:d,onNavigate:I,mobile:J,sbOpen:m,setSbOpen:_,versioning:Q,currentVersion:Y}):s.jsxs("aside",{style:{width:m?270:0,minWidth:m?270:0,background:"var(--sbBg)",[ft?"borderLeft":"borderRight"]:"1px solid var(--bd)",display:"flex",flexDirection:"column",transition:"width .2s, min-width .2s",overflow:"hidden",...J?{position:"fixed",top:0,[ft?"right":"left"]:0,bottom:0,zIndex:201}:{}},children:[s.jsxs("a",{href:"/",style:{padding:"18px 20px",display:"flex",alignItems:"baseline",gap:6,borderBottom:"1px solid var(--bd)",textDecoration:"none",color:"inherit"},children:[s.jsx("span",{style:{fontFamily:"var(--font-heading)",fontSize:22,fontWeight:700,fontStyle:"italic"},children:u.name}),s.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"var(--ac)",display:"inline-block"}})]}),s.jsx("div",{style:{padding:"12px 14px"},children:s.jsxs("button",{onClick:()=>{q(!0),J&&_(!1)},style:{display:"flex",alignItems:"center",gap:8,width:"100%",background:"var(--cdBg)",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 12px",cursor:"pointer",color:"var(--txM)",fontSize:12.5,fontFamily:"var(--font-body)"},children:[s.jsx(rm,{}),s.jsx("span",{style:{flex:1,textAlign:ft?"right":"left"},children:"Search..."}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:9,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"2px 6px"},children:"⌘K"})]})}),s.jsx("nav",{style:{flex:1,overflow:"auto",padding:"4px 10px 20px"},children:p.map(b=>s.jsxs("div",{style:{marginBottom:8},children:[s.jsxs("button",{onClick:()=>Pe(b.section),style:{display:"flex",alignItems:"center",gap:6,width:"100%",background:"none",border:"none",padding:"8px 10px",cursor:"pointer",borderRadius:2,color:"var(--txM)",fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:".1em",fontFamily:"var(--font-code)"},children:[gl.includes(b.section)?s.jsx(Vu,{}):s.jsx(Pd,{}),b.section]}),gl.includes(b.section)&&s.jsx("div",{style:{[ft?"marginRight":"marginLeft"]:8,[ft?"borderRight":"borderLeft"]:"1px solid var(--bd)",[ft?"paddingRight":"paddingLeft"]:0},children:b.pages.map(N=>{const et=d===N.id;return s.jsxs("button",{onClick:()=>{I(N.id),J&&_(!1)},style:{display:"flex",alignItems:"center",gap:10,width:"100%",textAlign:ft?"right":"left",background:"none",border:"none",borderRadius:0,[ft?"borderRight":"borderLeft"]:et?"2px solid var(--ac)":"2px solid transparent",padding:"7px 14px",cursor:"pointer",color:et?"var(--ac)":"var(--tx2)",fontSize:13,fontWeight:et?500:400,fontFamily:"var(--font-body)",transition:"all .12s"},children:[N.title,N.badge&&(()=>{const dt={default:{bg:"var(--sf)",text:"var(--tx2)"},info:{bg:"rgba(59,130,246,0.15)",text:"rgb(59,130,246)"},success:{bg:"rgba(34,197,94,0.15)",text:"rgb(34,197,94)"},warning:{bg:"rgba(234,179,8,0.15)",text:"rgb(202,138,4)"},danger:{bg:"rgba(239,68,68,0.15)",text:"rgb(239,68,68)"}},St=dt[N.badge.variant||"default"]||dt.default;return s.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 6px",borderRadius:4,marginLeft:6,whiteSpace:"nowrap",background:St.bg,color:St.text},children:N.badge.text})})()]},N.id)})})]},b.section))}),Q&&J&&s.jsx("div",{style:{padding:"8px 16px",borderTop:"1px solid var(--bd)",display:"flex",gap:6},children:Q.versions.map(b=>s.jsxs("button",{onClick:()=>{const N=b===Q.current?"index":`${b}/index`;I(N)},style:{flex:1,padding:"3px 0",textAlign:"center",background:b===(Y||Q.current)?"var(--acD)":"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,cursor:"pointer",color:b===(Y||Q.current)?"var(--ac)":"var(--tx2)",fontSize:11,fontFamily:"var(--font-code)",fontWeight:b===Q.current?600:400},children:[b,b===Q.current?" (latest)":""]},b))}),s.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--bd)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[M==="auto"?s.jsx("button",{"aria-label":B?"Switch to light mode":"Switch to dark mode",onClick:()=>Z(b=>!b),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex"},children:B?s.jsx(em,{}):s.jsx(tm,{})}):s.jsx("div",{}),s.jsxs("span",{style:{fontSize:11,color:"var(--txM)",letterSpacing:.2},children:["Built with ","♡"," by Tome"]}),s.jsx("span",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)"},children:"v0.5.0"})]})]}),s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[tt!=null&&tt.Header?s.jsx(tt.Header,{config:u,navigation:p,currentPageId:d,onNavigate:I,mobile:J,sbOpen:m,setSbOpen:_,isDark:B,setDark:Z,versioning:Q,currentVersion:Y,i18n:L,currentLocale:U,onSearchOpen:()=>q(!0),basePath:at}):s.jsxs("header",{style:{display:"flex",alignItems:"center",gap:J?8:12,padding:J?"8px 12px":"10px 24px",borderBottom:"1px solid var(--bd)",background:"var(--hdBg)",backdropFilter:"blur(12px)",maxWidth:"100vw",overflow:"visible",position:"relative",zIndex:200},children:[s.jsx("button",{"aria-label":m?"Close sidebar":"Open sidebar",onClick:()=>_(!m),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex"},children:m?s.jsx(Jp,{}):s.jsx(Zp,{})}),J?s.jsx("span",{style:{fontSize:13,color:"var(--ac)",fontFamily:"var(--font-code)",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:((mi=p.flatMap(b=>b.pages).find(b=>b.id===d))==null?void 0:mi.title)||""}):s.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--font-code)",fontSize:11,color:"var(--txM)",letterSpacing:".03em",flex:1},children:p.map(b=>{const N=b.pages.find(et=>et.id===d);return N?s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("span",{children:b.section}),s.jsx(Pd,{}),s.jsx("span",{style:{color:"var(--ac)"},children:N.title})]},b.section):null})}),u.topNav&&u.topNav.length>0&&!J&&s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[u.topNav.map(b=>{const N=b.href.startsWith("#")||at&&b.href.startsWith(at+"/"),et=!N;return s.jsxs("a",{href:N&&b.href.startsWith("#")?at+"/"+b.href.slice(1):b.href,...et?{target:"_blank",rel:"noopener noreferrer"}:{},onClick:N?dt=>{dt.preventDefault();const St=b.href.startsWith("#")?b.href.slice(1):b.href.replace(new RegExp("^"+at.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"/?"),"");I(St)}:void 0,style:{display:"flex",alignItems:"center",gap:4,color:"var(--txM)",textDecoration:"none",fontSize:12,fontFamily:"var(--font-body)",fontWeight:500,transition:"color .15s"},onMouseOver:dt=>dt.currentTarget.style.color="var(--ac)",onMouseOut:dt=>dt.currentTarget.style.color="var(--txM)",children:[b.label,et&&s.jsx(l0,{})]},b.label)}),s.jsx("span",{style:{width:1,height:16,background:"var(--bd)"}})]}),u.socialLinks&&u.socialLinks.length>0&&!J&&s.jsx("div",{style:{display:"flex",alignItems:"center",gap:8},children:u.socialLinks.map(b=>s.jsx("a",{href:b.url,target:"_blank",rel:"noopener noreferrer","aria-label":b.label||b.platform,"data-testid":`social-link-${b.platform}`,style:{display:"flex",alignItems:"center",justifyContent:"center",color:"var(--tx2)",cursor:"pointer",transition:"color .15s"},onMouseOver:N=>N.currentTarget.style.color="var(--tx)",onMouseOut:N=>N.currentTarget.style.color="var(--tx2)",children:s.jsx(i0,{platform:b.platform,customIcon:b.icon})},b.url))}),J&&M==="auto"&&s.jsx("button",{"aria-label":B?"Switch to light mode":"Switch to dark mode",onClick:()=>Z(b=>!b),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex",flexShrink:0},children:B?s.jsx(em,{}):s.jsx(tm,{})}),Q&&!J&&s.jsxs("div",{style:{position:"relative"},children:[s.jsxs("button",{"data-testid":"version-switcher",onClick:()=>rt(b=>!b),style:{display:"flex",alignItems:"center",gap:6,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"5px 10px",cursor:"pointer",color:"var(--tx2)",fontSize:12,fontFamily:"var(--font-code)"},children:[s.jsx(e0,{}),Y||Q.current,s.jsx(Vu,{})]}),it&&s.jsx("div",{"data-testid":"version-dropdown",style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,boxShadow:"0 8px 32px rgba(0,0,0,0.2)",overflow:"hidden",zIndex:100,minWidth:120},children:Q.versions.map(b=>s.jsxs("button",{onClick:()=>{rt(!1);const N=b===Q.current?"index":`${b}/index`;I(N)},style:{display:"block",width:"100%",textAlign:"left",background:b===(Y||Q.current)?"var(--acD)":"none",border:"none",padding:"8px 14px",cursor:"pointer",color:b===(Y||Q.current)?"var(--ac)":"var(--tx2)",fontSize:12,fontFamily:"var(--font-code)",fontWeight:b===Q.current?600:400},children:[b,b===Q.current?" (latest)":""]},b))})]}),L&&L.locales.length>1&&!J&&s.jsxs("div",{style:{position:"relative"},children:[s.jsxs("button",{"data-testid":"language-switcher",onClick:()=>It(b=>!b),style:{display:"flex",alignItems:"center",gap:6,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"5px 10px",cursor:"pointer",color:"var(--tx2)",fontSize:12,fontFamily:"var(--font-body)"},children:[s.jsx(n0,{}),((va=L.localeNames)==null?void 0:va[U||L.defaultLocale])||U||L.defaultLocale,s.jsx(Vu,{})]}),Et&&s.jsx("div",{"data-testid":"language-dropdown",style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,boxShadow:"0 8px 32px rgba(0,0,0,0.2)",overflow:"hidden",zIndex:100,minWidth:120},children:L.locales.map(b=>{var ce;const N=b===(U||L.defaultLocale),et=((ce=L.localeNames)==null?void 0:ce[b])||b,dt=U||L.defaultLocale;let St=d;dt!==L.defaultLocale&&d.startsWith(`${dt}/`)&&(St=d.slice(dt.length+1));const yt=b===L.defaultLocale?St:`${b}/${St}`;return s.jsx("button",{onClick:()=>{It(!1),I(yt)},style:{display:"block",width:"100%",textAlign:"left",background:N?"var(--acD)":"none",border:"none",padding:"8px 14px",cursor:"pointer",color:N?"var(--ac)":"var(--tx2)",fontSize:12,fontFamily:"var(--font-body)",fontWeight:N?600:400},children:et},b)})})]})]}),ca&&s.jsxs("div",{"data-testid":"old-version-banner",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:"var(--acD)",borderBottom:"1px solid var(--bd)",padding:"8px 24px",fontSize:13,color:"var(--tx2)"},children:[s.jsxs("span",{children:["You're viewing docs for ",Y,"."]}),s.jsx("button",{onClick:()=>{I("index")},style:{background:"none",border:"none",color:"var(--ac)",cursor:"pointer",fontWeight:600,fontSize:13,fontFamily:"var(--font-body)",textDecoration:"underline"},children:"Switch to latest."})]}),s.jsxs("div",{ref:We,style:{flex:1,overflow:"auto",display:"flex"},children:[s.jsxs("main",{style:{flex:1,maxWidth:J?"100%":nt?1100:760,padding:J?"24px 16px 60px":"40px 48px 80px",margin:"0 auto",minWidth:0},children:[Ie.length>0&&s.jsx("nav",{"aria-label":"Breadcrumbs","data-testid":"breadcrumbs",style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:"var(--tx2)",marginBottom:8},children:Ie.map((b,N)=>s.jsxs(sm.Fragment,{children:[N>0&&s.jsx("span",{style:{color:"var(--tx2)",opacity:.5},children:"›"}),N{et.preventDefault();const dt=p.flatMap(St=>St.pages).find(St=>St.urlPath===b.href);dt&&I(dt.id)},style:{color:"var(--tx2)",textDecoration:"none",cursor:"pointer"},children:b.label}):s.jsx("span",{style:N===Ie.length-1?{color:"var(--tx)"}:void 0,children:b.label})]},N))}),s.jsx("h1",{style:{fontFamily:"var(--font-heading)",fontSize:J?26:38,fontWeight:400,fontStyle:"italic",lineHeight:1.15,marginBottom:8},children:j}),P&&s.jsx("div",{"data-testid":"draft-banner",style:{background:"#fef3c7",color:"#92400e",padding:"8px 16px",borderRadius:6,fontSize:13,marginBottom:16},children:"Draft — This page is only visible in development"}),D&&s.jsx("p",{style:{fontSize:16,color:"var(--tx2)",lineHeight:1.6,marginBottom:32},children:D}),s.jsx("div",{style:{borderTop:"1px solid var(--bd)",paddingTop:28},children:nt&&W?s.jsx(W,{manifest:nt,baseUrl:xt,showPlayground:Ot,playgroundAuth:At}):K&&K.length>0?s.jsx(s0,{entries:K}):Tn?s.jsx("div",{className:"tome-content",children:s.jsx(Tn,{components:E||{}})}):s.jsx("div",{className:"tome-content",ref:Fn},d)}),tt!=null&&tt.PageFooter?s.jsx(tt.PageFooter,{editUrl:G,lastUpdated:R,currentPageId:d,prev:Fe,next:$e,onNavigate:I,mobile:J}):s.jsxs(s.Fragment,{children:[(G||R)&&s.jsxs("div",{style:{marginTop:40,display:"flex",flexDirection:J?"column":"row",alignItems:J?"flex-start":"center",justifyContent:"space-between",gap:J?8:16},children:[G&&s.jsx("div",{"data-testid":"edit-page-link",children:s.jsxs("a",{href:G,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--txM)",textDecoration:"none",fontSize:13,fontFamily:"var(--font-body)",transition:"color .15s"},onMouseOver:b=>b.currentTarget.style.color="var(--ac)",onMouseOut:b=>b.currentTarget.style.color="var(--txM)",children:[s.jsx(Wp,{})," Edit this page on GitHub"]})}),R&&s.jsxs("div",{"data-testid":"last-updated",style:{fontSize:12,color:"var(--txM)",fontFamily:"var(--font-body)"},children:["Last updated ",Fp(R)]})]}),s.jsx("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:24,padding:"12px 0"},children:hl[d]?s.jsx("span",{style:{fontSize:13,color:"var(--txM)",fontFamily:"var(--font-body)"},children:"Thanks for your feedback!"}):s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{fontSize:13,color:"var(--txM)",fontFamily:"var(--font-body)"},children:"Was this helpful?"}),s.jsx("button",{onClick:()=>{pl(b=>({...b,[d]:!0}));try{localStorage.setItem(`tome-feedback-${d}`,"up")}catch{}},style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"4px 10px",cursor:"pointer",fontSize:13,color:"var(--txM)",transition:"border-color .15s"},children:"👍"}),s.jsx("button",{onClick:()=>{pl(b=>({...b,[d]:!0}));try{localStorage.setItem(`tome-feedback-${d}`,"down")}catch{}},style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"4px 10px",cursor:"pointer",fontSize:13,color:"var(--txM)",transition:"border-color .15s"},children:"👎"})]})}),s.jsxs("div",{style:{display:"flex",flexDirection:J?"column":"row",justifyContent:"space-between",marginTop:16,paddingTop:24,borderTop:"1px solid var(--bd)",gap:J?12:16},children:[Fe?s.jsxs("button",{onClick:()=>I(Fe.id),style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"10px 16px",cursor:"pointer",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body)",transition:"border-color .15s, color .15s"},children:[ft?s.jsx(lm,{}):s.jsx(nm,{})," ",Fe.title]}):s.jsx("div",{}),$e?s.jsxs("button",{onClick:()=>I($e.id),style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"10px 16px",cursor:"pointer",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body)",transition:"border-color .15s, color .15s"},children:[$e.title," ",ft?s.jsx(nm,{}):s.jsx(lm,{})]}):s.jsx("div",{})]})]})]}),tt!=null&&tt.Toc?bl&&ye.length>=2&&vl&&s.jsx(tt.Toc,{headings:ye,activeHeadingId:ue,onScrollToHeading:ci}):bl&&ye.length>=2&&vl&&s.jsxs("aside",{"data-testid":"toc-sidebar",style:{width:200,padding:ft?"40px 0 40px 16px":"40px 16px 40px 0",position:"sticky",top:0,alignSelf:"flex-start",flexShrink:0},children:[s.jsx("div",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:".1em",color:"var(--txM)",marginBottom:12,fontFamily:"var(--font-code)"},children:"On this page"}),s.jsx("nav",{"aria-label":"Table of contents",style:{[ft?"borderRight":"borderLeft"]:"1px solid var(--bd)",[ft?"paddingRight":"paddingLeft"]:0},children:ye.map((b,N)=>{const et=ue===b.id;return s.jsx("a",{href:`#${b.id}`,onClick:dt=>ci(dt,b.id),"data-testid":`toc-link-${b.id}`,style:{display:"block",fontSize:12,color:et?"var(--ac)":"var(--txM)",fontWeight:et?500:400,textDecoration:"none",padding:"4px 12px",[ft?"paddingRight":"paddingLeft"]:12+(b.depth-2)*12,lineHeight:1.4,transition:"color .15s, font-weight .15s",[ft?"borderRight":"borderLeft"]:et?"2px solid var(--ac)":"2px solid transparent",[ft?"marginRight":"marginLeft"]:-1},children:b.text},N)})})]})]})]})]}),(tt==null?void 0:tt.Footer)&&s.jsx(tt.Footer,{config:u,navigation:p,currentPageId:d,onNavigate:I}),((zn=u.ai)==null?void 0:zn.enabled)&&s.jsx(Xp,{provider:u.ai.provider||"anthropic",model:u.ai.model,apiKey:typeof __TOME_AI_API_KEY__<"u"&&__TOME_AI_API_KEY__?__TOME_AI_API_KEY__:void 0,context:(lt==null?void 0:lt.map(b=>`## ${b.title} ${b.content}`).join(` `))??ct.map(b=>`- ${b.title}${b.description?": "+b.description:""}`).join(` -`)}),Ut&&s.jsx("div",{onClick:()=>Ze(null),style:{position:"fixed",inset:0,zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.7)",backdropFilter:"blur(8px)",cursor:"zoom-out"},children:s.jsx("img",{src:Ut,alt:"",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4,boxShadow:"0 16px 64px rgba(0,0,0,0.4)"}})})]})}function c0({allPages:u,onNavigate:p,onClose:d,mobile:c}){const[v,E]=w.useState(""),[j,D]=w.useState([]),[z,y]=w.useState(0),[G,R]=w.useState(null),K=w.useRef(null),nt=w.useRef(void 0);w.useEffect(()=>{Ip().then(W=>R(!!W)),setTimeout(()=>{var W;return(W=K.current)==null?void 0:W.focus()},50)},[]);const xt=w.useCallback(W=>{if(!W.trim())return[];const I=W.toLowerCase();return u.filter(ct=>ct.title.toLowerCase().includes(I)||(ct.description||"").toLowerCase().includes(I)).slice(0,8).map(ct=>({id:ct.id,title:ct.title,excerpt:ct.description}))},[u]),Ot=w.useCallback(async W=>{var ct;if(!W.trim()){D([]),y(0);return}const I=ul;if(I)try{const Q=await I.search(W),Y=[];for(const L of Q.results.slice(0,8)){const U=await L.data(),lt=(U.url||"").replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index";Y.push({id:lt,title:((ct=U.meta)==null?void 0:ct.title)||lt,excerpt:U.excerpt||void 0})}D(Y),y(0);return}catch{}D(xt(W)),y(0)},[xt]);w.useEffect(()=>(nt.current&&clearTimeout(nt.current),nt.current=setTimeout(()=>Ot(v),120),()=>{nt.current&&clearTimeout(nt.current)}),[v,Ot]);const At=w.useCallback(W=>{W.key==="ArrowDown"?(W.preventDefault(),y(I=>Math.min(I+1,j.length-1))):W.key==="ArrowUp"?(W.preventDefault(),y(I=>Math.max(I-1,0))):W.key==="Enter"&&j.length>0&&(W.preventDefault(),p(j[z].id))},[j,z,p]);return s.jsx("div",{onClick:d,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:c?"stretch":"flex-start",justifyContent:"center",paddingTop:c?0:"12vh"},children:s.jsxs("div",{onClick:W=>W.stopPropagation(),style:{background:"var(--sf)",border:c?"none":"1px solid var(--bd)",borderRadius:c?0:2,width:"100%",maxWidth:c?"100%":520,boxShadow:c?"none":"0 24px 80px rgba(0,0,0,0.4)",overflow:"hidden",display:"flex",flexDirection:"column",...c?{height:"100%"}:{}},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--bd)"},children:[s.jsx(rm,{}),s.jsx("input",{ref:K,value:v,onChange:W=>E(W.target.value),onKeyDown:At,placeholder:"Search documentation...",style:{flex:1,background:"none",border:"none",outline:"none",color:"var(--tx)",fontSize:15,fontFamily:"var(--font-body)"}}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)",background:"var(--cdBg)",padding:"2px 6px",borderRadius:2,border:"1px solid var(--bd)"},children:"ESC"})]}),j.length>0&&s.jsx("div",{style:{padding:6,maxHeight:c?"none":360,overflow:"auto",flex:c?1:void 0},children:j.map((W,I)=>s.jsxs("button",{onClick:()=>p(W.id),style:{display:"block",width:"100%",textAlign:"left",background:I===z?"var(--acD)":"none",border:"none",borderRadius:2,padding:"10px 14px",cursor:"pointer",color:"var(--tx)",fontFamily:"var(--font-body)"},onMouseEnter:()=>y(I),children:[s.jsx("div",{style:{fontWeight:500,fontSize:14,marginBottom:2},children:W.title}),W.excerpt&&s.jsx("div",{style:{fontSize:12,color:"var(--txM)",lineHeight:1.3},dangerouslySetInnerHTML:{__html:W.excerpt}})]},W.id+I))}),v&&!j.length&&s.jsx("div",{style:{padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No results found"}),G===!1&&v&&j.length>0&&s.jsx("div",{style:{padding:"6px 18px 10px",fontSize:11,color:"var(--txM)",textAlign:"center"},children:"Showing title matches. Build your site for full-text search."})]})})}function cm(u,p,d){let c=u;p&&c.startsWith(p)&&(c=c.slice(p.length));const v=c.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"").replace(/\/$/,"")||"index";return d.find(j=>j.id===v)?v:null}function f0(u,p,d){const c=d.find(v=>v.id===u);return c?p+c.urlPath:p+"/"+u}class d0 extends Error{constructor(p){super(`Page not found: ${p}`),this.code="PAGE_NOT_FOUND",this.name="PageNotFoundError"}}class m0 extends Error{constructor(p,d){super(`Failed to load page: ${p}`),this.code="PAGE_LOAD_ERROR",this.name="PageLoadError",d&&(this.cause=d)}}function h0(u,p){if(!u||!p)return;const{repo:d,branch:c="main",dir:v=""}=u,E=v?`${v.replace(/\/$/,"")}/`:"";return`https://github.com/${d}/edit/${c}/${E}${p}`}function p0(u,p,d,c,v){var D;const E=v(u,c,d);if(E)return E;const j=p.startsWith("#")?p.slice(1):p;return j&&d.some(z=>z.id===j)?j:((D=d[0])==null?void 0:D.id)||"index"}async function fm(u,p,d){const c=p.find(E=>E.id===u);let v;try{v=await d(u)}catch(E){throw new m0(u,E)}if(c!=null&&c.isMdx&&v.meta)return{isMdx:!0,component:v.default,frontmatter:v.meta.frontmatter,headings:v.meta.headings};if(!v.default)throw new d0(u);return v.isApiReference&&v.apiManifest?{isMdx:!1,isApiReference:!0,...v.default,apiManifest:v.apiManifest}:v.isChangelog&&v.changelogEntries?{isMdx:!1,...v.default,changelogEntries:v.changelogEntries}:{isMdx:!1,...v.default}}function g0(u,p){return(u==null?void 0:u.version)||void 0}const Jn={name:"Kit",logo:"/logo.jpg",favicon:"/logo.jpg",baseUrl:"https://go-kit.dev",theme:{preset:"cipher",accent:"#e03030",mode:"dark",fonts:{heading:"Space Grotesk",body:"Space Grotesk",code:"Source Code Pro"}},navigation:[{group:"Getting Started",pages:["index","installation","quick-start"]},{group:"Configuration",pages:["configuration","providers","themes"]},{group:"CLI Reference",pages:["cli/flags","cli/commands"]},{group:"Extensions",pages:["extensions/overview","extensions/capabilities","extensions/examples","extensions/loading","extensions/testing"]},{group:"Sessions",pages:["sessions"]},{group:"Go SDK",pages:["sdk/overview","sdk/options","sdk/callbacks","sdk/sessions"]},{group:"Advanced",pages:["advanced/subagents","advanced/json-output","advanced/testing"]},{group:"Development",pages:["development"]}],search:{provider:"local"},toc:{enabled:!0,depth:3},math:!1,strictLinks:!1,lastUpdated:!0,redirects:[],socialLinks:[{platform:"github",url:"https://github.com/mark3labs/kit"},{platform:"discord",url:"https://discord.gg/RqSS2NQVsY"}]},Wn=[{id:"advanced/json-output",filePath:"advanced/json-output.md",urlPath:"/advanced/json-output",frontmatter:{title:"JSON Output",description:"Machine-readable JSON output for scripting and automation.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"advanced/subagents",filePath:"advanced/subagents.md",urlPath:"/advanced/subagents",frontmatter:{title:"Subagents",description:"Multi-agent orchestration with Kit subagents.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"advanced/testing",filePath:"advanced/testing.md",urlPath:"/advanced/testing",frontmatter:{title:"Testing with tmux",description:"Test Kit's TUI non-interactively using tmux.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"cli/commands",filePath:"cli/commands.md",urlPath:"/cli/commands",frontmatter:{title:"Commands",description:"Complete reference for all Kit CLI subcommands.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"cli/flags",filePath:"cli/flags.md",urlPath:"/cli/flags",frontmatter:{title:"Global Flags",description:"Complete reference for all Kit CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"configuration",filePath:"configuration.md",urlPath:"/configuration",frontmatter:{title:"Configuration",description:"Configure Kit using config files, environment variables, and CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"development",filePath:"development.md",urlPath:"/development",frontmatter:{title:"Development",description:"Build, test, and contribute to Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"extensions/capabilities",filePath:"extensions/capabilities.md",urlPath:"/extensions/capabilities",frontmatter:{title:"Capabilities",description:"All extension capabilities — lifecycle events, tools, commands, widgets, and more.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"extensions/examples",filePath:"extensions/examples.md",urlPath:"/extensions/examples",frontmatter:{title:"Examples",description:"Catalog of example extensions included with Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"extensions/loading",filePath:"extensions/loading.md",urlPath:"/extensions/loading",frontmatter:{title:"Loading Extensions",description:"How Kit discovers and loads extensions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"extensions/overview",filePath:"extensions/overview.md",urlPath:"/extensions/overview",frontmatter:{title:"Extension System",description:"Overview of Kit's Go-based extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"extensions/testing",filePath:"extensions/testing.md",urlPath:"/extensions/testing",frontmatter:{title:"Testing Extensions",description:"Write unit tests for your Kit extensions using the test package.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"index",filePath:"index.md",urlPath:"/",frontmatter:{title:"Kit",description:"Kit is a powerful, extensible AI coding agent CLI with multi-provider support, built-in tools, and a rich extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"installation",filePath:"installation.md",urlPath:"/installation",frontmatter:{title:"Installation",description:"Install Kit using npm, bun, pnpm, Go, or build from source.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"providers",filePath:"providers.md",urlPath:"/providers",frontmatter:{title:"Providers",description:"Supported LLM providers and model configuration.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"quick-start",filePath:"quick-start.md",urlPath:"/quick-start",frontmatter:{title:"Quick Start",description:"Get up and running with Kit in minutes.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"sdk/callbacks",filePath:"sdk/callbacks.md",urlPath:"/sdk/callbacks",frontmatter:{title:"Callbacks",description:"Monitor tool calls and streaming output with the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"sdk/options",filePath:"sdk/options.md",urlPath:"/sdk/options",frontmatter:{title:"SDK Options",description:"Configuration options for the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"sdk/overview",filePath:"sdk/overview.md",urlPath:"/sdk/overview",frontmatter:{title:"Go SDK",description:"Embed Kit in your Go applications.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"sdk/sessions",filePath:"sdk/sessions.md",urlPath:"/sdk/sessions",frontmatter:{title:"SDK Sessions",description:"Session management in the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"sessions",filePath:"sessions.md",urlPath:"/sessions",frontmatter:{title:"Session Management",description:"How Kit persists and manages conversation sessions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"},{id:"themes",filePath:"themes.md",urlPath:"/themes",frontmatter:{title:"Themes",description:"Customize Kit's appearance with built-in themes, custom theme files, and the extension theme API.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-11T16:13:18+03:00"}],v0=[{section:"Getting Started",pages:[{title:"Kit",id:"index",urlPath:"/"},{title:"Installation",id:"installation",urlPath:"/installation"},{title:"Quick Start",id:"quick-start",urlPath:"/quick-start"}]},{section:"Configuration",pages:[{title:"Configuration",id:"configuration",urlPath:"/configuration"},{title:"Providers",id:"providers",urlPath:"/providers"},{title:"Themes",id:"themes",urlPath:"/themes"}]},{section:"CLI Reference",pages:[{title:"Global Flags",id:"cli/flags",urlPath:"/cli/flags"},{title:"Commands",id:"cli/commands",urlPath:"/cli/commands"}]},{section:"Extensions",pages:[{title:"Extension System",id:"extensions/overview",urlPath:"/extensions/overview"},{title:"Capabilities",id:"extensions/capabilities",urlPath:"/extensions/capabilities"},{title:"Examples",id:"extensions/examples",urlPath:"/extensions/examples"},{title:"Loading Extensions",id:"extensions/loading",urlPath:"/extensions/loading"},{title:"Testing Extensions",id:"extensions/testing",urlPath:"/extensions/testing"}]},{section:"Sessions",pages:[{title:"Session Management",id:"sessions",urlPath:"/sessions"}]},{section:"Go SDK",pages:[{title:"Go SDK",id:"sdk/overview",urlPath:"/sdk/overview"},{title:"SDK Options",id:"sdk/options",urlPath:"/sdk/options"},{title:"Callbacks",id:"sdk/callbacks",urlPath:"/sdk/callbacks"},{title:"SDK Sessions",id:"sdk/sessions",urlPath:"/sdk/sessions"}]},{section:"Advanced",pages:[{title:"Subagents",id:"advanced/subagents",urlPath:"/advanced/subagents"},{title:"JSON Output",id:"advanced/json-output",urlPath:"/advanced/json-output"},{title:"Testing with tmux",id:"advanced/testing",urlPath:"/advanced/testing"}]},{section:"Development",pages:[{title:"Development",id:"development",urlPath:"/development"}]}],Zu=null,y0={"advanced/json-output":()=>qt(()=>import("./json-output-BiSiIPM0.js"),[]),"advanced/subagents":()=>qt(()=>import("./subagents-lghAXYlk.js"),[]),"advanced/testing":()=>qt(()=>import("./testing-COLNxuKj.js"),[]),"cli/commands":()=>qt(()=>import("./commands-UPFOPOAU.js"),[]),"cli/flags":()=>qt(()=>import("./flags-DBc7n5J6.js"),[]),configuration:()=>qt(()=>import("./configuration-BOyO9N_c.js"),[]),development:()=>qt(()=>import("./development-E-EC7CAm.js"),[]),"extensions/capabilities":()=>qt(()=>import("./capabilities-B2sSx0dd.js"),[]),"extensions/examples":()=>qt(()=>import("./examples-jcdOTY9d.js"),[]),"extensions/loading":()=>qt(()=>import("./loading-CfdMbwrl.js"),[]),"extensions/overview":()=>qt(()=>import("./overview-BXMEI4t1.js"),[]),"extensions/testing":()=>qt(()=>import("./testing-BjX63Hnw.js"),[]),index:()=>qt(()=>import("./index-DjkHYQxg.js"),[]),installation:()=>qt(()=>import("./installation-CkjlJXwY.js"),[]),providers:()=>qt(()=>import("./providers-_pAg-zft.js"),[]),"quick-start":()=>qt(()=>import("./quick-start-YzNijQyU.js"),[]),"sdk/callbacks":()=>qt(()=>import("./callbacks-DurHXbkP.js"),[]),"sdk/options":()=>qt(()=>import("./options-C2ZyqtaF.js"),[]),"sdk/overview":()=>qt(()=>import("./overview-C9sBcRua.js"),[]),"sdk/sessions":()=>qt(()=>import("./sessions-CeADaXnR.js"),[]),sessions:()=>qt(()=>import("./sessions-BR7Y7dXm.js"),[]),themes:()=>qt(()=>import("./themes-Chyvu6J4.js"),[])};function dm(u){const p=y0[u];if(!p)throw new Error("Unknown page: "+u);return p()}const b0=[{id:"advanced/json-output",title:"JSON Output",content:` +`)}),Ut&&s.jsx("div",{onClick:()=>Ze(null),style:{position:"fixed",inset:0,zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.7)",backdropFilter:"blur(8px)",cursor:"zoom-out"},children:s.jsx("img",{src:Ut,alt:"",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4,boxShadow:"0 16px 64px rgba(0,0,0,0.4)"}})})]})}function c0({allPages:u,onNavigate:p,onClose:d,mobile:c}){const[v,E]=w.useState(""),[j,D]=w.useState([]),[C,y]=w.useState(0),[G,R]=w.useState(null),K=w.useRef(null),nt=w.useRef(void 0);w.useEffect(()=>{Ip().then(W=>R(!!W)),setTimeout(()=>{var W;return(W=K.current)==null?void 0:W.focus()},50)},[]);const xt=w.useCallback(W=>{if(!W.trim())return[];const I=W.toLowerCase();return u.filter(ct=>ct.title.toLowerCase().includes(I)||(ct.description||"").toLowerCase().includes(I)).slice(0,8).map(ct=>({id:ct.id,title:ct.title,excerpt:ct.description}))},[u]),Ot=w.useCallback(async W=>{var ct;if(!W.trim()){D([]),y(0);return}const I=ua;if(I)try{const Q=await I.search(W),Y=[];for(const L of Q.results.slice(0,8)){const U=await L.data(),at=(U.url||"").replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index";Y.push({id:at,title:((ct=U.meta)==null?void 0:ct.title)||at,excerpt:U.excerpt||void 0})}D(Y),y(0);return}catch{}D(xt(W)),y(0)},[xt]);w.useEffect(()=>(nt.current&&clearTimeout(nt.current),nt.current=setTimeout(()=>Ot(v),120),()=>{nt.current&&clearTimeout(nt.current)}),[v,Ot]);const At=w.useCallback(W=>{W.key==="ArrowDown"?(W.preventDefault(),y(I=>Math.min(I+1,j.length-1))):W.key==="ArrowUp"?(W.preventDefault(),y(I=>Math.max(I-1,0))):W.key==="Enter"&&j.length>0&&(W.preventDefault(),p(j[C].id))},[j,C,p]);return s.jsx("div",{onClick:d,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:c?"stretch":"flex-start",justifyContent:"center",paddingTop:c?0:"12vh"},children:s.jsxs("div",{onClick:W=>W.stopPropagation(),style:{background:"var(--sf)",border:c?"none":"1px solid var(--bd)",borderRadius:c?0:2,width:"100%",maxWidth:c?"100%":520,boxShadow:c?"none":"0 24px 80px rgba(0,0,0,0.4)",overflow:"hidden",display:"flex",flexDirection:"column",...c?{height:"100%"}:{}},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--bd)"},children:[s.jsx(rm,{}),s.jsx("input",{ref:K,value:v,onChange:W=>E(W.target.value),onKeyDown:At,placeholder:"Search documentation...",style:{flex:1,background:"none",border:"none",outline:"none",color:"var(--tx)",fontSize:15,fontFamily:"var(--font-body)"}}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)",background:"var(--cdBg)",padding:"2px 6px",borderRadius:2,border:"1px solid var(--bd)"},children:"ESC"})]}),j.length>0&&s.jsx("div",{style:{padding:6,maxHeight:c?"none":360,overflow:"auto",flex:c?1:void 0},children:j.map((W,I)=>s.jsxs("button",{onClick:()=>p(W.id),style:{display:"block",width:"100%",textAlign:"left",background:I===C?"var(--acD)":"none",border:"none",borderRadius:2,padding:"10px 14px",cursor:"pointer",color:"var(--tx)",fontFamily:"var(--font-body)"},onMouseEnter:()=>y(I),children:[s.jsx("div",{style:{fontWeight:500,fontSize:14,marginBottom:2},children:W.title}),W.excerpt&&s.jsx("div",{style:{fontSize:12,color:"var(--txM)",lineHeight:1.3},dangerouslySetInnerHTML:{__html:W.excerpt}})]},W.id+I))}),v&&!j.length&&s.jsx("div",{style:{padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No results found"}),G===!1&&v&&j.length>0&&s.jsx("div",{style:{padding:"6px 18px 10px",fontSize:11,color:"var(--txM)",textAlign:"center"},children:"Showing title matches. Build your site for full-text search."})]})})}function cm(u,p,d){let c=u;p&&c.startsWith(p)&&(c=c.slice(p.length));const v=c.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"").replace(/\/$/,"")||"index";return d.find(j=>j.id===v)?v:null}function f0(u,p,d){const c=d.find(v=>v.id===u);return c?p+c.urlPath:p+"/"+u}class d0 extends Error{constructor(p){super(`Page not found: ${p}`),this.code="PAGE_NOT_FOUND",this.name="PageNotFoundError"}}class m0 extends Error{constructor(p,d){super(`Failed to load page: ${p}`),this.code="PAGE_LOAD_ERROR",this.name="PageLoadError",d&&(this.cause=d)}}function h0(u,p){if(!u||!p)return;const{repo:d,branch:c="main",dir:v=""}=u,E=v?`${v.replace(/\/$/,"")}/`:"";return`https://github.com/${d}/edit/${c}/${E}${p}`}function p0(u,p,d,c,v){var D;const E=v(u,c,d);if(E)return E;const j=p.startsWith("#")?p.slice(1):p;return j&&d.some(C=>C.id===j)?j:((D=d[0])==null?void 0:D.id)||"index"}async function fm(u,p,d){const c=p.find(E=>E.id===u);let v;try{v=await d(u)}catch(E){throw new m0(u,E)}if(c!=null&&c.isMdx&&v.meta)return{isMdx:!0,component:v.default,frontmatter:v.meta.frontmatter,headings:v.meta.headings};if(!v.default)throw new d0(u);return v.isApiReference&&v.apiManifest?{isMdx:!1,isApiReference:!0,...v.default,apiManifest:v.apiManifest}:v.isChangelog&&v.changelogEntries?{isMdx:!1,...v.default,changelogEntries:v.changelogEntries}:{isMdx:!1,...v.default}}function g0(u,p){return(u==null?void 0:u.version)||void 0}const Jn={name:"Kit",logo:"/logo.jpg",favicon:"/logo.jpg",baseUrl:"https://go-kit.dev",theme:{preset:"cipher",accent:"#e03030",mode:"dark",fonts:{heading:"Space Grotesk",body:"Space Grotesk",code:"Source Code Pro"}},navigation:[{group:"Getting Started",pages:["index","installation","quick-start"]},{group:"Configuration",pages:["configuration","providers","themes"]},{group:"CLI Reference",pages:["cli/flags","cli/commands"]},{group:"Extensions",pages:["extensions/overview","extensions/capabilities","extensions/examples","extensions/loading","extensions/testing"]},{group:"Sessions",pages:["sessions"]},{group:"Go SDK",pages:["sdk/overview","sdk/options","sdk/callbacks","sdk/sessions"]},{group:"Advanced",pages:["advanced/subagents","advanced/json-output","advanced/testing"]},{group:"Development",pages:["development"]}],search:{provider:"local"},toc:{enabled:!0,depth:3},math:!1,strictLinks:!1,lastUpdated:!0,redirects:[],socialLinks:[{platform:"github",url:"https://github.com/mark3labs/kit"},{platform:"discord",url:"https://discord.gg/RqSS2NQVsY"}]},Wn=[{id:"advanced/json-output",filePath:"advanced/json-output.md",urlPath:"/advanced/json-output",frontmatter:{title:"JSON Output",description:"Machine-readable JSON output for scripting and automation.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"advanced/subagents",filePath:"advanced/subagents.md",urlPath:"/advanced/subagents",frontmatter:{title:"Subagents",description:"Multi-agent orchestration with Kit subagents.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"advanced/testing",filePath:"advanced/testing.md",urlPath:"/advanced/testing",frontmatter:{title:"Testing with tmux",description:"Test Kit's TUI non-interactively using tmux.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"cli/commands",filePath:"cli/commands.md",urlPath:"/cli/commands",frontmatter:{title:"Commands",description:"Complete reference for all Kit CLI subcommands.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"cli/flags",filePath:"cli/flags.md",urlPath:"/cli/flags",frontmatter:{title:"Global Flags",description:"Complete reference for all Kit CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"configuration",filePath:"configuration.md",urlPath:"/configuration",frontmatter:{title:"Configuration",description:"Configure Kit using config files, environment variables, and CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"development",filePath:"development.md",urlPath:"/development",frontmatter:{title:"Development",description:"Build, test, and contribute to Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"extensions/capabilities",filePath:"extensions/capabilities.md",urlPath:"/extensions/capabilities",frontmatter:{title:"Capabilities",description:"All extension capabilities — lifecycle events, tools, commands, widgets, and more.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"extensions/examples",filePath:"extensions/examples.md",urlPath:"/extensions/examples",frontmatter:{title:"Examples",description:"Catalog of example extensions included with Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"extensions/loading",filePath:"extensions/loading.md",urlPath:"/extensions/loading",frontmatter:{title:"Loading Extensions",description:"How Kit discovers and loads extensions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"extensions/overview",filePath:"extensions/overview.md",urlPath:"/extensions/overview",frontmatter:{title:"Extension System",description:"Overview of Kit's Go-based extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"extensions/testing",filePath:"extensions/testing.md",urlPath:"/extensions/testing",frontmatter:{title:"Testing Extensions",description:"Write unit tests for your Kit extensions using the test package.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"index",filePath:"index.md",urlPath:"/",frontmatter:{title:"Kit",description:"Kit is a powerful, extensible AI coding agent CLI with multi-provider support, built-in tools, and a rich extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"installation",filePath:"installation.md",urlPath:"/installation",frontmatter:{title:"Installation",description:"Install Kit using npm, bun, pnpm, Go, or build from source.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"providers",filePath:"providers.md",urlPath:"/providers",frontmatter:{title:"Providers",description:"Supported LLM providers and model configuration.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"quick-start",filePath:"quick-start.md",urlPath:"/quick-start",frontmatter:{title:"Quick Start",description:"Get up and running with Kit in minutes.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"sdk/callbacks",filePath:"sdk/callbacks.md",urlPath:"/sdk/callbacks",frontmatter:{title:"Callbacks",description:"Monitor tool calls and streaming output with the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"sdk/options",filePath:"sdk/options.md",urlPath:"/sdk/options",frontmatter:{title:"SDK Options",description:"Configuration options for the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"sdk/overview",filePath:"sdk/overview.md",urlPath:"/sdk/overview",frontmatter:{title:"Go SDK",description:"Embed Kit in your Go applications.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"sdk/sessions",filePath:"sdk/sessions.md",urlPath:"/sdk/sessions",frontmatter:{title:"SDK Sessions",description:"Session management in the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"sessions",filePath:"sessions.md",urlPath:"/sessions",frontmatter:{title:"Session Management",description:"How Kit persists and manages conversation sessions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"},{id:"themes",filePath:"themes.md",urlPath:"/themes",frontmatter:{title:"Themes",description:"Customize Kit's appearance with built-in themes, custom theme files, and the extension theme API.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-12T16:23:17+03:00"}],v0=[{section:"Getting Started",pages:[{title:"Kit",id:"index",urlPath:"/"},{title:"Installation",id:"installation",urlPath:"/installation"},{title:"Quick Start",id:"quick-start",urlPath:"/quick-start"}]},{section:"Configuration",pages:[{title:"Configuration",id:"configuration",urlPath:"/configuration"},{title:"Providers",id:"providers",urlPath:"/providers"},{title:"Themes",id:"themes",urlPath:"/themes"}]},{section:"CLI Reference",pages:[{title:"Global Flags",id:"cli/flags",urlPath:"/cli/flags"},{title:"Commands",id:"cli/commands",urlPath:"/cli/commands"}]},{section:"Extensions",pages:[{title:"Extension System",id:"extensions/overview",urlPath:"/extensions/overview"},{title:"Capabilities",id:"extensions/capabilities",urlPath:"/extensions/capabilities"},{title:"Examples",id:"extensions/examples",urlPath:"/extensions/examples"},{title:"Loading Extensions",id:"extensions/loading",urlPath:"/extensions/loading"},{title:"Testing Extensions",id:"extensions/testing",urlPath:"/extensions/testing"}]},{section:"Sessions",pages:[{title:"Session Management",id:"sessions",urlPath:"/sessions"}]},{section:"Go SDK",pages:[{title:"Go SDK",id:"sdk/overview",urlPath:"/sdk/overview"},{title:"SDK Options",id:"sdk/options",urlPath:"/sdk/options"},{title:"Callbacks",id:"sdk/callbacks",urlPath:"/sdk/callbacks"},{title:"SDK Sessions",id:"sdk/sessions",urlPath:"/sdk/sessions"}]},{section:"Advanced",pages:[{title:"Subagents",id:"advanced/subagents",urlPath:"/advanced/subagents"},{title:"JSON Output",id:"advanced/json-output",urlPath:"/advanced/json-output"},{title:"Testing with tmux",id:"advanced/testing",urlPath:"/advanced/testing"}]},{section:"Development",pages:[{title:"Development",id:"development",urlPath:"/development"}]}],Zu=null,y0={"advanced/json-output":()=>qt(()=>import("./json-output-BiSiIPM0.js"),[]),"advanced/subagents":()=>qt(()=>import("./subagents-lghAXYlk.js"),[]),"advanced/testing":()=>qt(()=>import("./testing-COLNxuKj.js"),[]),"cli/commands":()=>qt(()=>import("./commands-BkbgH-ZH.js"),[]),"cli/flags":()=>qt(()=>import("./flags-BA8a7myk.js"),[]),configuration:()=>qt(()=>import("./configuration-wkiRfTFi.js"),[]),development:()=>qt(()=>import("./development-E-EC7CAm.js"),[]),"extensions/capabilities":()=>qt(()=>import("./capabilities-B2sSx0dd.js"),[]),"extensions/examples":()=>qt(()=>import("./examples-jcdOTY9d.js"),[]),"extensions/loading":()=>qt(()=>import("./loading-CfdMbwrl.js"),[]),"extensions/overview":()=>qt(()=>import("./overview-BXMEI4t1.js"),[]),"extensions/testing":()=>qt(()=>import("./testing-BjX63Hnw.js"),[]),index:()=>qt(()=>import("./index-DjkHYQxg.js"),[]),installation:()=>qt(()=>import("./installation-CkjlJXwY.js"),[]),providers:()=>qt(()=>import("./providers-_pAg-zft.js"),[]),"quick-start":()=>qt(()=>import("./quick-start-YzNijQyU.js"),[]),"sdk/callbacks":()=>qt(()=>import("./callbacks-DurHXbkP.js"),[]),"sdk/options":()=>qt(()=>import("./options-C2ZyqtaF.js"),[]),"sdk/overview":()=>qt(()=>import("./overview-C9sBcRua.js"),[]),"sdk/sessions":()=>qt(()=>import("./sessions-CeADaXnR.js"),[]),sessions:()=>qt(()=>import("./sessions-BR7Y7dXm.js"),[]),themes:()=>qt(()=>import("./themes-Chyvu6J4.js"),[])};function dm(u){const p=y0[u];if(!p)throw new Error("Unknown page: "+u);return p()}const b0=[{id:"advanced/json-output",title:"JSON Output",content:` # JSON Output Use the \`--json\` flag to get structured output for scripting and automation: @@ -437,6 +437,26 @@ kit install --all # Install all extensions without prompting kit skill # Install the Kit extensions skill via skills.sh \`\`\` +### Skills CLI flags + +Control which skills are loaded at startup: + +\`\`\`bash +# Load a specific skill file +kit --skill path/to/skill.md "prompt" + +# Load multiple skill files or directories (flag is repeatable) +kit --skill ./skill1.md --skill ./skill2.md "prompt" + +# Load all skills from a custom directory instead of the default locations +kit --skills-dir /path/to/skills "prompt" + +# Disable all skill loading (auto-discovery and explicit) +kit --no-skills "prompt" +\`\`\` + +Skills are auto-discovered from \`~/.config/kit/skills/\`, \`.kit/skills/\`, and \`.agents/skills/\` by default. Use \`--skills-dir\` to override the project-local search root, or \`--skill\` to load files explicitly (which disables auto-discovery). \`--no-skills\` suppresses all skill loading regardless of other flags. + ## Interactive slash commands These commands are available inside the Kit TUI during an interactive session: @@ -562,7 +582,7 @@ Run Kit as an [ACP (Agent Client Protocol)](https://agentclientprotocol.com) age kit acp # Start as ACP agent kit acp --debug # With debug logging to stderr \`\`\` -`},{id:"cli/flags",title:"Global Flags",content:"\n# Global Flags\n\nAll flags can be passed to the root `kit` command.\n\n## Model and provider\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--model` | `-m` | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `--provider-api-key` | — | — | API key for the provider |\n| `--provider-url` | — | — | Base URL for provider API |\n| `--tls-skip-verify` | — | `false` | Skip TLS certificate verification |\n\n## Session management\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--session` | `-s` | — | Open specific JSONL session file |\n| `--continue` | `-c` | `false` | Resume most recent session for current directory |\n| `--resume` | `-r` | `false` | Interactive session picker |\n| `--no-session` | — | `false` | Ephemeral mode, no persistence |\n\n## Behavior\n\nThese flags control Kit's behavior. When a prompt is passed as a positional argument, Kit runs in non-interactive mode.\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--quiet` | — | `false` | Suppress all output (non-interactive only) |\n| `--json` | — | `false` | Output response as JSON (non-interactive only) |\n| `--no-exit` | — | `false` | Enter interactive mode after prompt completes |\n| `--max-steps` | — | `0` | Maximum agent steps (0 for unlimited) |\n| `--stream` | — | `true` | Enable streaming output |\n| `--compact` | — | `false` | Enable compact output mode |\n| `--auto-compact` | — | `false` | Auto-compact conversation near context limit |\n\n## Extensions\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--extension` | `-e` | — | Load additional extension file(s) (repeatable) |\n| `--no-extensions` | — | `false` | Disable all extensions |\n| `--prompt-template` | — | — | Load a specific prompt template by name |\n| `--no-prompt-templates` | — | `false` | Disable prompt template loading |\n\n## Generation parameters\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--max-tokens` | — | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model's catalog ceiling is higher and no explicit value is set. |\n| `--temperature` | — | `0.7` | Randomness 0.0–1.0 |\n| `--top-p` | — | `0.95` | Nucleus sampling 0.0–1.0 |\n| `--top-k` | — | `40` | Limit top K tokens |\n| `--stop-sequences` | — | — | Custom stop sequences (comma-separated) |\n| `--frequency-penalty` | — | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `--presence-penalty` | — | `0.0` | Penalize present tokens (0.0–2.0) |\n| `--thinking-level` | — | `off` | Extended thinking level: off, none, minimal, low, medium, high |\n\n## System\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--config` | — | `~/.kit.yml` | Config file path |\n| `--system-prompt` | — | — | System prompt text or file path |\n| `--debug` | — | `false` | Enable debug logging |\n"},{id:"configuration",title:"Configuration",content:'\n# Configuration\n\nKit looks for configuration in the following locations, in order of priority:\n\n1. CLI flags\n2. Environment variables (with `KIT_` prefix)\n3. `./.kit.yml` / `./.kit.yaml` / `./.kit.json` (project-local)\n4. `~/.kit.yml` / `~/.kit.yaml` / `~/.kit.json` (global)\n\n## Basic configuration\n\nCreate `~/.kit.yml`:\n\n```yaml\nmodel: anthropic/claude-sonnet-latest\nmax-tokens: 8192\ntemperature: 0.7\nstream: true\n```\n\n## All configuration keys\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `model` | string | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `max-tokens` | int | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model\'s catalog ceiling is higher and no explicit value is set. Use [`modelSettings[provider/model].maxTokens`](#per-model-settings) to override per-model. |\n| `temperature` | float | `0.7` | Randomness 0.0–1.0 |\n| `top-p` | float | `0.95` | Nucleus sampling 0.0–1.0 |\n| `top-k` | int | `40` | Limit top K tokens |\n| `stream` | bool | `true` | Enable streaming output |\n| `debug` | bool | `false` | Enable debug logging |\n| `compact` | bool | `false` | Enable compact output mode |\n| `system-prompt` | string | — | System prompt text or file path |\n| `max-steps` | int | `0` | Maximum agent steps (0 = unlimited) |\n| `thinking-level` | string | `off` | Extended thinking: off, none, minimal, low, medium, high |\n| `provider-api-key` | string | — | API key for the provider |\n| `provider-url` | string | — | Base URL for provider API |\n| `tls-skip-verify` | bool | `false` | Skip TLS certificate verification |\n| `frequency-penalty` | float | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `presence-penalty` | float | `0.0` | Penalize present tokens (0.0–2.0) |\n| `stop-sequences` | list | — | Custom stop sequences |\n| `theme` | object or string | — | UI theme ([inline overrides or file path](/themes)) |\n| `prompt-templates` | bool | `true` | Enable prompt template loading |\n| `prompt-template` | string | — | Specific template to load by name |\n\n## Environment variables\n\nAny configuration key can be set via environment variable with the `KIT_` prefix. Hyphens become underscores:\n\n```bash\nexport KIT_MODEL="openai/gpt-4o"\nexport KIT_MAX_TOKENS="8192"\nexport KIT_TEMPERATURE="0.5"\n```\n\nProvider API keys use their own environment variables:\n\n```bash\nexport ANTHROPIC_API_KEY="sk-..."\nexport OPENAI_API_KEY="sk-..."\nexport GOOGLE_API_KEY="..."\n```\n\n## MCP server configuration\n\nAdd external MCP servers to your `.kit.yml`:\n\n```yaml\nmcpServers:\n filesystem:\n type: local\n command: ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed"]\n environment:\n LOG_LEVEL: "info"\n allowedTools: ["read_file", "write_file"]\n excludedTools: ["delete_file"]\n\n search:\n type: remote\n url: "https://mcp.example.com/search"\n\n pubmed:\n type: remote\n url: "https://pubmed.mcp.example.com"\n noOAuth: true # skip OAuth for public servers\n headers:\n - "ApiKey: ${env://API_KEY}" # required env var\n - "X-Tenant: ${env://TENANT_ID:-default}" # with fallback default\n\n builds:\n type: remote\n url: "https://builds.mcp.example.com"\n tasksMode: always # always run tools/call as async tasks (Phase 1 MVP)\n```\n\n### MCP server fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `type` | string | `local` (stdio) or `remote` (streamable HTTP) |\n| `command` | list | Command and args for local servers |\n| `environment` | map | Environment variables for the server process |\n| `url` | string | URL for remote servers |\n| `allowedTools` | list | Whitelist of tool names to expose |\n| `excludedTools` | list | Blacklist of tool names to hide |\n| `noOAuth` | bool | Skip OAuth for this server (for public servers that don\'t require auth) |\n| `headers` | list of strings | HTTP headers to attach to every request, each as a `"Key: Value"` string. Values support env-substitution: `${env://VAR}` or `${env://VAR:-default}`. |\n| `tasksMode` | string | When to augment `tools/call` with MCP task metadata: `auto` (default — only when the server advertises task support), `never`, or `always`. See [MCP tasks](#mcp-tasks-long-running-tools). |\n\nA legacy format with `transport`, `args`, and `env` fields is also supported; `headers` works in both the current and legacy formats.\n\n### MCP tasks (long-running tools)\n\nKit advertises [MCP task support](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks)\nduring `initialize` so servers can respond to `tools/call` with a\n`CreateTaskResult` (a task ID + `working` status) instead of blocking until\nthe operation finishes. Kit then polls `tasks/get` / `tasks/result` until the\ntask reaches a terminal state, and best-effort `tasks/cancel`s on context\ncancellation.\n\nThis avoids HTTP/SSE proxy timeouts on long builds, deploys, and batch jobs,\nand lets the user/agent abort cleanly with Ctrl-C.\n\n**Per-server `tasksMode`:**\n\n| Value | Behaviour |\n|-------|-----------|\n| `auto` (default) | Augment `tools/call` with task metadata only when the server advertised `tasks/toolCalls` capability. Servers that don\'t advertise it run synchronously, exactly as before. |\n| `never` | Always issue `tools/call` synchronously, regardless of server capability. |\n| `always` | Always opt into task augmentation, even when the server didn\'t advertise the capability. The server may still respond synchronously — this just expresses client intent unconditionally. |\n\nDefaults are safe: any existing MCP server keeps its previous behaviour\nbit-for-bit. SDK consumers can also override the mode programmatically and\nplug in a progress callback — see [SDK options](/sdk/options#mcp-tasks).\n\n## Custom models\n\nDefine custom models in your `.kit.yml` for use with the `custom` provider. This is useful for self-hosted models or API endpoints not in the built-in database:\n\n```yaml\ncustomModels:\n my-model:\n name: "My Custom Model"\n baseUrl: "http://localhost:8080/v1"\n apiKey: "my-secret-key"\n reasoning: true\n temperature: true\n cost:\n input: 0.002\n output: 0.004\n limit:\n context: 128000\n output: 32000\n```\n\n### Custom model fields\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `name` | string | Yes | Display name for the model |\n| `baseUrl` | string | No | Per-model base URL override; when set, `--provider-url` is not required |\n| `apiKey` | string | No | Per-model API key override |\n| `reasoning` | bool | No | Whether the model supports reasoning/thinking |\n| `temperature` | bool | No | Whether the model supports temperature adjustment |\n| `cost.input` | float | No | Cost per 1K input tokens |\n| `cost.output` | float | No | Cost per 1K output tokens |\n| `limit.context` | int | Yes | Maximum context window in tokens |\n| `limit.output` | int | No | Maximum output tokens |\n\nUse with a per-model `baseUrl` (no `--provider-url` needed):\n\n```bash\nkit --model custom/my-model "Hello"\n```\n\nOr override the base URL at runtime:\n\n```bash\nkit --provider-url "http://localhost:8080/v1" --model custom/my-model "Hello"\n```\n\nWhen `--provider-url` is specified without `--model`, Kit defaults to `custom/custom` which has zero cost tracking and a 262K context window.\n\n## Per-model settings\n\nOverride generation parameters and system prompt on a per-model basis using `modelSettings`:\n\n```yaml\nmodelSettings:\n anthropic/claude-sonnet-4-5-20250929:\n temperature: 0.3\n maxTokens: 8192\n systemPrompt: "You are a concise coding assistant."\n openai/gpt-4o:\n temperature: 0.7\n frequencyPenalty: 0.5\n```\n\n### Per-model fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `temperature` | float | Temperature override for this model |\n| `maxTokens` | int | Max output tokens override |\n| `topP` | float | Top-p override |\n| `topK` | int | Top-k override |\n| `frequencyPenalty` | float | Frequency penalty override |\n| `presencePenalty` | float | Presence penalty override |\n| `stopSequences` | list | Stop sequences override |\n| `thinkingLevel` | string | Thinking level override |\n| `systemPrompt` | string | Per-model system prompt (used when no explicit prompt is set) |\n\nSettings from `modelSettings` and `customModels.params` act as model-level defaults — explicit CLI flags, `KIT_*` environment variables, global config values, and SDK `Options.*` fields all take precedence over them.\n\nWhen switching models via `/model` or `SetModel()`, if the new model has a per-model system prompt and no custom global prompt was set, the per-model prompt automatically replaces the previous one.\n\n### Precedence summary\n\nFor the generation and provider parameters documented above, the resolved value at runtime comes from the first source that sets it:\n\n1. CLI flag (e.g. `--max-tokens`, `--temperature`, `--provider-api-key`)\n2. SDK `Options.X` when embedding Kit as a library (`kit.Options.MaxTokens`, `Temperature`, `ProviderAPIKey`, etc.)\n3. `KIT_*` environment variable (`KIT_MAX_TOKENS`, `KIT_TEMPERATURE`, ...)\n4. `.kit.yml` / `.kit.yaml` / `.kit.json` (project-local, then global)\n5. Per-model defaults (`modelSettings[provider/model]` / `customModels[...].params`)\n6. Provider-level defaults (e.g. Anthropic\'s own temperature default)\n7. SDK last-resort floor — currently an 8192 output-token ceiling matching the CLI `--max-tokens` default, auto-raised per-model up to 32768 when the model\'s catalog ceiling is higher\n\nSee the [SDK options reference](/sdk/options) for the full list of `kit.Options` fields that map to these keys.\n\n## Theme configuration\n\n```yaml\n# Inline partial overrides (unspecified fields inherit from default)\ntheme:\n primary:\n light: "#8839ef"\n dark: "#cba6f7"\n error:\n dark: "#FF0000"\n```\n\n```yaml\n# Reference external theme file\ntheme: "./themes/my-custom-theme.yml"\n```\n\nSee [Themes](/themes) for the full theme file format, built-in themes, and the extension theme API.\n\n## Preferences persistence\n\nKit automatically saves your UI preferences across sessions to `~/.config/kit/preferences.yml`:\n\n- **Theme** — Set via `/theme ` or `ctx.SetTheme()`\n- **Model** — Set via `/model ` or the model selector\n- **Thinking level** — Set via `/thinking ` or Shift+Tab cycling\n\nThese preferences are restored on next launch. Precedence (highest to lowest):\n1. CLI flags (`--model`, `--thinking-level`)\n2. Config file (`model:`, `thinking-level:`)\n3. Saved preferences (`~/.config/kit/preferences.yml`)\n4. Default values\n'},{id:"development",title:"Development",content:` +`},{id:"cli/flags",title:"Global Flags",content:"\n# Global Flags\n\nAll flags can be passed to the root `kit` command.\n\n## Model and provider\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--model` | `-m` | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `--provider-api-key` | — | — | API key for the provider |\n| `--provider-url` | — | — | Base URL for provider API |\n| `--tls-skip-verify` | — | `false` | Skip TLS certificate verification |\n\n## Session management\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--session` | `-s` | — | Open specific JSONL session file |\n| `--continue` | `-c` | `false` | Resume most recent session for current directory |\n| `--resume` | `-r` | `false` | Interactive session picker |\n| `--no-session` | — | `false` | Ephemeral mode, no persistence |\n\n## Behavior\n\nThese flags control Kit's behavior. When a prompt is passed as a positional argument, Kit runs in non-interactive mode.\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--quiet` | — | `false` | Suppress all output (non-interactive only) |\n| `--json` | — | `false` | Output response as JSON (non-interactive only) |\n| `--no-exit` | — | `false` | Enter interactive mode after prompt completes |\n| `--max-steps` | — | `0` | Maximum agent steps (0 for unlimited) |\n| `--stream` | — | `true` | Enable streaming output |\n| `--compact` | — | `false` | Enable compact output mode |\n| `--auto-compact` | — | `false` | Auto-compact conversation near context limit |\n\n## Extensions\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--extension` | `-e` | — | Load additional extension file(s) (repeatable) |\n| `--no-extensions` | — | `false` | Disable all extensions |\n| `--prompt-template` | — | — | Load a specific prompt template by name |\n| `--no-prompt-templates` | — | `false` | Disable prompt template loading |\n\n## Skills\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--skill` | — | — | Load skill file or directory (repeatable) |\n| `--skills-dir` | — | — | Override the project-local skills directory for auto-discovery |\n| `--no-skills` | — | `false` | Disable skill loading (auto-discovery and explicit) |\n\n## Generation parameters\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--max-tokens` | — | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model's catalog ceiling is higher and no explicit value is set. |\n| `--temperature` | — | `0.7` | Randomness 0.0–1.0 |\n| `--top-p` | — | `0.95` | Nucleus sampling 0.0–1.0 |\n| `--top-k` | — | `40` | Limit top K tokens |\n| `--stop-sequences` | — | — | Custom stop sequences (comma-separated) |\n| `--frequency-penalty` | — | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `--presence-penalty` | — | `0.0` | Penalize present tokens (0.0–2.0) |\n| `--thinking-level` | — | `off` | Extended thinking level: off, none, minimal, low, medium, high |\n\n## System\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--config` | — | `~/.kit.yml` | Config file path |\n| `--system-prompt` | — | — | System prompt text or file path |\n| `--debug` | — | `false` | Enable debug logging |\n"},{id:"configuration",title:"Configuration",content:'\n# Configuration\n\nKit looks for configuration in the following locations, in order of priority:\n\n1. CLI flags\n2. Environment variables (with `KIT_` prefix)\n3. `./.kit.yml` / `./.kit.yaml` / `./.kit.json` (project-local)\n4. `~/.kit.yml` / `~/.kit.yaml` / `~/.kit.json` (global)\n\n## Basic configuration\n\nCreate `~/.kit.yml`:\n\n```yaml\nmodel: anthropic/claude-sonnet-latest\nmax-tokens: 8192\ntemperature: 0.7\nstream: true\n```\n\n## All configuration keys\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `model` | string | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `max-tokens` | int | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model\'s catalog ceiling is higher and no explicit value is set. Use [`modelSettings[provider/model].maxTokens`](#per-model-settings) to override per-model. |\n| `temperature` | float | `0.7` | Randomness 0.0–1.0 |\n| `top-p` | float | `0.95` | Nucleus sampling 0.0–1.0 |\n| `top-k` | int | `40` | Limit top K tokens |\n| `stream` | bool | `true` | Enable streaming output |\n| `debug` | bool | `false` | Enable debug logging |\n| `compact` | bool | `false` | Enable compact output mode |\n| `system-prompt` | string | — | System prompt text or file path |\n| `max-steps` | int | `0` | Maximum agent steps (0 = unlimited) |\n| `thinking-level` | string | `off` | Extended thinking: off, none, minimal, low, medium, high |\n| `provider-api-key` | string | — | API key for the provider |\n| `provider-url` | string | — | Base URL for provider API |\n| `tls-skip-verify` | bool | `false` | Skip TLS certificate verification |\n| `frequency-penalty` | float | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `presence-penalty` | float | `0.0` | Penalize present tokens (0.0–2.0) |\n| `stop-sequences` | list | — | Custom stop sequences |\n| `theme` | object or string | — | UI theme ([inline overrides or file path](/themes)) |\n| `prompt-templates` | bool | `true` | Enable prompt template loading |\n| `prompt-template` | string | — | Specific template to load by name |\n| `no-skills` | bool | `false` | Disable skill loading (auto-discovery and explicit) |\n| `skill` | list | — | Explicit skill files or directories to load (disables auto-discovery) |\n| `skills-dir` | string | — | Override the project-local directory used for skill auto-discovery |\n\n## Environment variables\n\nAny configuration key can be set via environment variable with the `KIT_` prefix. Hyphens become underscores:\n\n```bash\nexport KIT_MODEL="openai/gpt-4o"\nexport KIT_MAX_TOKENS="8192"\nexport KIT_TEMPERATURE="0.5"\n```\n\nProvider API keys use their own environment variables:\n\n```bash\nexport ANTHROPIC_API_KEY="sk-..."\nexport OPENAI_API_KEY="sk-..."\nexport GOOGLE_API_KEY="..."\n```\n\n## MCP server configuration\n\nAdd external MCP servers to your `.kit.yml`:\n\n```yaml\nmcpServers:\n filesystem:\n type: local\n command: ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed"]\n environment:\n LOG_LEVEL: "info"\n allowedTools: ["read_file", "write_file"]\n excludedTools: ["delete_file"]\n\n search:\n type: remote\n url: "https://mcp.example.com/search"\n\n pubmed:\n type: remote\n url: "https://pubmed.mcp.example.com"\n noOAuth: true # skip OAuth for public servers\n headers:\n - "ApiKey: ${env://API_KEY}" # required env var\n - "X-Tenant: ${env://TENANT_ID:-default}" # with fallback default\n\n builds:\n type: remote\n url: "https://builds.mcp.example.com"\n tasksMode: always # always run tools/call as async tasks (Phase 1 MVP)\n```\n\n### MCP server fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `type` | string | `local` (stdio) or `remote` (streamable HTTP) |\n| `command` | list | Command and args for local servers |\n| `environment` | map | Environment variables for the server process |\n| `url` | string | URL for remote servers |\n| `allowedTools` | list | Whitelist of tool names to expose |\n| `excludedTools` | list | Blacklist of tool names to hide |\n| `noOAuth` | bool | Skip OAuth for this server (for public servers that don\'t require auth) |\n| `headers` | list of strings | HTTP headers to attach to every request, each as a `"Key: Value"` string. Values support env-substitution: `${env://VAR}` or `${env://VAR:-default}`. |\n| `tasksMode` | string | When to augment `tools/call` with MCP task metadata: `auto` (default — only when the server advertises task support), `never`, or `always`. See [MCP tasks](#mcp-tasks-long-running-tools). |\n\nA legacy format with `transport`, `args`, and `env` fields is also supported; `headers` works in both the current and legacy formats.\n\n### MCP tasks (long-running tools)\n\nKit advertises [MCP task support](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks)\nduring `initialize` so servers can respond to `tools/call` with a\n`CreateTaskResult` (a task ID + `working` status) instead of blocking until\nthe operation finishes. Kit then polls `tasks/get` / `tasks/result` until the\ntask reaches a terminal state, and best-effort `tasks/cancel`s on context\ncancellation.\n\nThis avoids HTTP/SSE proxy timeouts on long builds, deploys, and batch jobs,\nand lets the user/agent abort cleanly with Ctrl-C.\n\n**Per-server `tasksMode`:**\n\n| Value | Behaviour |\n|-------|-----------|\n| `auto` (default) | Augment `tools/call` with task metadata only when the server advertised `tasks/toolCalls` capability. Servers that don\'t advertise it run synchronously, exactly as before. |\n| `never` | Always issue `tools/call` synchronously, regardless of server capability. |\n| `always` | Always opt into task augmentation, even when the server didn\'t advertise the capability. The server may still respond synchronously — this just expresses client intent unconditionally. |\n\nDefaults are safe: any existing MCP server keeps its previous behaviour\nbit-for-bit. SDK consumers can also override the mode programmatically and\nplug in a progress callback — see [SDK options](/sdk/options#mcp-tasks).\n\n## Custom models\n\nDefine custom models in your `.kit.yml` for use with the `custom` provider. This is useful for self-hosted models or API endpoints not in the built-in database:\n\n```yaml\ncustomModels:\n my-model:\n name: "My Custom Model"\n baseUrl: "http://localhost:8080/v1"\n apiKey: "my-secret-key"\n reasoning: true\n temperature: true\n cost:\n input: 0.002\n output: 0.004\n limit:\n context: 128000\n output: 32000\n```\n\n### Custom model fields\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `name` | string | Yes | Display name for the model |\n| `baseUrl` | string | No | Per-model base URL override; when set, `--provider-url` is not required |\n| `apiKey` | string | No | Per-model API key override |\n| `reasoning` | bool | No | Whether the model supports reasoning/thinking |\n| `temperature` | bool | No | Whether the model supports temperature adjustment |\n| `cost.input` | float | No | Cost per 1K input tokens |\n| `cost.output` | float | No | Cost per 1K output tokens |\n| `limit.context` | int | Yes | Maximum context window in tokens |\n| `limit.output` | int | No | Maximum output tokens |\n\nUse with a per-model `baseUrl` (no `--provider-url` needed):\n\n```bash\nkit --model custom/my-model "Hello"\n```\n\nOr override the base URL at runtime:\n\n```bash\nkit --provider-url "http://localhost:8080/v1" --model custom/my-model "Hello"\n```\n\nWhen `--provider-url` is specified without `--model`, Kit defaults to `custom/custom` which has zero cost tracking and a 262K context window.\n\n## Per-model settings\n\nOverride generation parameters and system prompt on a per-model basis using `modelSettings`:\n\n```yaml\nmodelSettings:\n anthropic/claude-sonnet-4-5-20250929:\n temperature: 0.3\n maxTokens: 8192\n systemPrompt: "You are a concise coding assistant."\n openai/gpt-4o:\n temperature: 0.7\n frequencyPenalty: 0.5\n```\n\n### Per-model fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `temperature` | float | Temperature override for this model |\n| `maxTokens` | int | Max output tokens override |\n| `topP` | float | Top-p override |\n| `topK` | int | Top-k override |\n| `frequencyPenalty` | float | Frequency penalty override |\n| `presencePenalty` | float | Presence penalty override |\n| `stopSequences` | list | Stop sequences override |\n| `thinkingLevel` | string | Thinking level override |\n| `systemPrompt` | string | Per-model system prompt (used when no explicit prompt is set) |\n\nSettings from `modelSettings` and `customModels.params` act as model-level defaults — explicit CLI flags, `KIT_*` environment variables, global config values, and SDK `Options.*` fields all take precedence over them.\n\nWhen switching models via `/model` or `SetModel()`, if the new model has a per-model system prompt and no custom global prompt was set, the per-model prompt automatically replaces the previous one.\n\n### Precedence summary\n\nFor the generation and provider parameters documented above, the resolved value at runtime comes from the first source that sets it:\n\n1. CLI flag (e.g. `--max-tokens`, `--temperature`, `--provider-api-key`)\n2. SDK `Options.X` when embedding Kit as a library (`kit.Options.MaxTokens`, `Temperature`, `ProviderAPIKey`, etc.)\n3. `KIT_*` environment variable (`KIT_MAX_TOKENS`, `KIT_TEMPERATURE`, ...)\n4. `.kit.yml` / `.kit.yaml` / `.kit.json` (project-local, then global)\n5. Per-model defaults (`modelSettings[provider/model]` / `customModels[...].params`)\n6. Provider-level defaults (e.g. Anthropic\'s own temperature default)\n7. SDK last-resort floor — currently an 8192 output-token ceiling matching the CLI `--max-tokens` default, auto-raised per-model up to 32768 when the model\'s catalog ceiling is higher\n\nSee the [SDK options reference](/sdk/options) for the full list of `kit.Options` fields that map to these keys.\n\n## Theme configuration\n\n```yaml\n# Inline partial overrides (unspecified fields inherit from default)\ntheme:\n primary:\n light: "#8839ef"\n dark: "#cba6f7"\n error:\n dark: "#FF0000"\n```\n\n```yaml\n# Reference external theme file\ntheme: "./themes/my-custom-theme.yml"\n```\n\nSee [Themes](/themes) for the full theme file format, built-in themes, and the extension theme API.\n\n## Preferences persistence\n\nKit automatically saves your UI preferences across sessions to `~/.config/kit/preferences.yml`:\n\n- **Theme** — Set via `/theme ` or `ctx.SetTheme()`\n- **Model** — Set via `/model ` or the model selector\n- **Thinking level** — Set via `/thinking ` or Shift+Tab cycling\n\nThese preferences are restored on next launch. Precedence (highest to lowest):\n1. CLI flags (`--model`, `--thinking-level`)\n2. Config file (`model:`, `thinking-level:`)\n3. Saved preferences (`~/.config/kit/preferences.yml`)\n4. Default values\n'},{id:"development",title:"Development",content:` # Development ## Build and test @@ -1130,56 +1150,18 @@ result := ctx.ParseArguments("deploy staging --loop 5", pattern) // result.Vars["target"] = "staging" // result.Flags["--loop"] = "5" -// Simple positional argument parsing ($1, $2, $@) -args := ctx.SimpleParseArguments("deploy staging --force", 2) -// args[0] = "deploy staging --force" (full input) -// args[1] = "deploy" ($1) -// args[2] = "staging" ($2) -// args[3] = "--force" ($@) - -// Evaluate model conditionals with wildcards -matches := ctx.EvaluateModelConditional("claude-*") // bool -// Patterns: * matches any, ? matches single char, comma = OR - -// Render content with conditionals -content := \`Hi ClaudeHi there\` -rendered := ctx.RenderWithModelConditionals(content) // based on current model -\`\`\` - -### Model Resolution - -Resolve model fallback chains and query capabilities: - -\`\`\`go -// Resolve a chain of model preferences (tries each until available) -result := ctx.ResolveModelChain([]string{ - "anthropic/claude-opus-4", - "anthropic/claude-sonnet-4", - "openai/gpt-4o", -}) -// result.Model (selected), result.Capabilities, result.Attempted, result.Error - -// Get capabilities for a specific model -caps, err := ctx.GetModelCapabilities("anthropic/claude-sonnet-4") -// caps.Provider, caps.ModelID, caps.ContextLimit, caps.Reasoning, caps.Streaming - -// Check if a model is available (provider exists) -available := ctx.CheckModelAvailable("anthropic/claude-sonnet-4") // bool - -// Get current provider/model ID -provider := ctx.GetCurrentProvider() // "anthropic" -modelID := ctx.GetCurrentModel`}],x0={};function S0(u){return u>=200&&u<300?"#22c55e":u>=400&&u<500?"#f59e0b":u>=500?"#ef4444":"#6b7280"}function T0(u,p,d,c){let v=p;for(const[j,D]of Object.entries(d))v=v.replace(`{${j}}`,encodeURIComponent(D));const E=new URL(v,u);for(const[j,D]of Object.entries(c))D&&E.searchParams.set(j,D);return E.toString()}function E0(u){return u==="bearer"?"Authorization":"X-API-Key"}const Fu={width:"100%",padding:"6px 10px",border:"1px solid var(--bd)",borderRadius:4,background:"var(--bg)",color:"var(--tx)",fontSize:13,fontFamily:"var(--font-code, monospace)",boxSizing:"border-box"};function Ju({param:u,value:p,onChange:d}){return s.jsxs("div",{style:{marginBottom:10},children:[s.jsxs("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:[u.name,u.required&&s.jsx("span",{style:{color:"#ef4444",marginLeft:2},children:"*"}),s.jsxs("span",{style:{fontWeight:400,color:"var(--txM)",marginLeft:6,fontSize:11},children:[u.in," · ",u.type]})]}),s.jsx("input",{"data-testid":`param-input-${u.name}`,style:Fu,placeholder:u.description||u.name,value:p,onChange:c=>d(c.target.value)})]})}function C0({endpoint:u,baseUrl:p,auth:d}){var lt;const[c,v]=w.useState(!1),[E,j]=w.useState({}),[D,z]=w.useState((lt=u.requestBody)!=null&<.schema?JSON.stringify(u.requestBody.schema,null,2):""),[y,G]=w.useState(""),[R,K]=w.useState(!1),[nt,xt]=w.useState(null),[Ot,At]=w.useState(null),[W,I]=w.useState(!1),ct=(P,mt)=>j(tt=>({...tt,[P]:mt})),Q=u.parameters.filter(P=>P.in==="path"),Y=u.parameters.filter(P=>P.in==="query"),L=u.parameters.filter(P=>P.in==="header"),U=u.requestBody!=null,at=async()=>{K(!0),xt(null),At(null);const P={};for(const jt of Q)P[jt.name]=E[jt.name]||"";const mt={};for(const jt of Y)E[jt.name]&&(mt[jt.name]=E[jt.name]);const tt={};for(const jt of L)E[jt.name]&&(tt[jt.name]=E[jt.name]);if(U&&(tt["Content-Type"]="application/json"),d&&y){const jt=d.header||E0(d.type);tt[jt]=d.type==="bearer"?`Bearer ${y}`:y}try{const jt=T0(p,u.path,P,mt),$t=Date.now(),ft=await fetch(jt,{method:u.method.toUpperCase(),headers:tt,body:U&&D?D:void 0}),M=Date.now()-$t,B={};ft.headers.forEach((Tt,m)=>{B[m]=Tt});let Z;if((ft.headers.get("content-type")||"").includes("json")){const Tt=await ft.json();Z=JSON.stringify(Tt,null,2)}else Z=await ft.text();xt({status:ft.status,statusText:ft.statusText,headers:B,body:Z,time:M})}catch(jt){At(jt instanceof Error?jt.message:"Network error")}finally{K(!1)}};return s.jsxs("div",{"data-testid":"api-playground",style:{border:"1px solid var(--bd)",borderRadius:6,overflow:"hidden",marginTop:8},children:[s.jsxs("button",{"data-testid":"playground-toggle",onClick:()=>v(!c),style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"10px 14px",background:"var(--sf)",border:"none",cursor:"pointer",fontFamily:"inherit",fontSize:13,fontWeight:600,color:"var(--ac)"},children:[s.jsx("span",{style:{fontSize:14},children:c?"▼":"▶"}),"Try it out"]}),c&&s.jsxs("div",{style:{padding:"14px 16px",borderTop:"1px solid var(--bd)"},children:[d&&s.jsxs("div",{style:{marginBottom:12},children:[s.jsx("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:d.type==="bearer"?"Bearer Token":"API Key"}),s.jsx("input",{"data-testid":"auth-input",type:"password",style:Fu,placeholder:d.type==="bearer"?"Enter bearer token":"Enter API key",value:y,onChange:P=>G(P.target.value)})]}),Q.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Path Parameters"}),Q.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),Y.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Query Parameters"}),Y.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),L.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Header Parameters"}),L.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),U&&s.jsxs("div",{style:{marginBottom:12},children:[s.jsx("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:"Request Body"}),s.jsx("textarea",{"data-testid":"request-body",style:{...Fu,minHeight:100,resize:"vertical",lineHeight:1.5},value:D,onChange:P=>z(P.target.value)})]}),s.jsx("button",{"data-testid":"send-request",onClick:at,disabled:R,style:{padding:"8px 20px",borderRadius:4,border:"none",background:"var(--ac)",color:"#fff",fontWeight:600,fontSize:13,cursor:R?"wait":"pointer",opacity:R?.7:1,fontFamily:"inherit"},children:R?"Sending...":"Send Request"}),Ot&&s.jsx("div",{"data-testid":"playground-error",style:{marginTop:12,padding:"10px 14px",borderRadius:4,background:"#ef444418",border:"1px solid #ef444444",color:"#ef4444",fontSize:13},children:Ot}),nt&&s.jsxs("div",{"data-testid":"playground-response",style:{marginTop:12},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[s.jsxs("span",{"data-testid":"response-status",style:{padding:"2px 10px",borderRadius:4,fontSize:13,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:"#fff",background:S0(nt.status)},children:[nt.status," ",nt.statusText]}),s.jsxs("span",{style:{fontSize:12,color:"var(--txM)"},children:[nt.time,"ms"]})]}),s.jsxs("button",{"data-testid":"toggle-headers",onClick:()=>I(!W),style:{display:"flex",alignItems:"center",gap:4,background:"none",border:"none",cursor:"pointer",fontSize:12,color:"var(--txM)",padding:"4px 0",fontFamily:"inherit",marginBottom:4},children:[s.jsx("span",{style:{transform:W?"rotate(90deg)":"rotate(0)",transition:"transform 0.15s"},children:"▶"}),"Response Headers"]}),W&&s.jsx("pre",{style:{background:"var(--sf)",padding:10,borderRadius:4,fontSize:11,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.5,marginBottom:8,color:"var(--tx2)",margin:"0 0 8px 0"},children:Object.entries(nt.headers).map(([P,mt])=>`${P}: ${mt}`).join(` -`)}),s.jsx("pre",{"data-testid":"response-body",style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:14,borderRadius:6,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0,maxHeight:400},children:nt.body})]})]})]})}function mm({samples:u}){var c;const[p,d]=w.useState(0);return u.length===0?null:s.jsxs("div",{"data-testid":"code-samples",style:{border:"1px solid var(--bd)",borderRadius:8,overflow:"hidden"},children:[s.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--bd)",background:"var(--sf)",overflowX:"auto",WebkitOverflowScrolling:"touch"},children:u.map((v,E)=>s.jsx("button",{onClick:()=>d(E),style:{padding:"8px 16px",fontSize:13,fontWeight:500,background:E===p?"var(--cdBg)":"transparent",color:E===p?"var(--tx)":"var(--tx2)",border:"none",borderBottom:E===p?"2px solid var(--ac)":"2px solid transparent",cursor:"pointer",fontFamily:"var(--font-body)",whiteSpace:"nowrap"},children:v.label},v.language))}),s.jsx("pre",{style:{margin:0,padding:16,background:"var(--cdBg)",overflow:"auto"},children:s.jsx("code",{style:{fontSize:13,fontFamily:"var(--font-code)"},children:(c=u[p])==null?void 0:c.code})})]})}const hm={get:"#22c55e",post:"#3b82f6",put:"#f59e0b",delete:"#ef4444",patch:"#a78bfa",head:"#6b7280",options:"#6b7280"};function z0({method:u}){const p=hm[u.toLowerCase()]||"#6b7280";return s.jsx("span",{"data-testid":"method-badge",style:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-code, monospace)",textTransform:"uppercase",color:"#fff",background:p,letterSpacing:"0.05em"},children:u.toUpperCase()})}function M0({parameters:u}){return u.length===0?null:s.jsx("div",{style:{overflowX:"auto",marginBottom:16},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,lineHeight:1.5},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{borderBottom:"2px solid var(--bd)",textAlign:"left"},children:[s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Name"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Type"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"In"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Required"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Description"})]})}),s.jsx("tbody",{children:u.map((p,d)=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--bd)"},children:[s.jsx("td",{style:{padding:"8px 12px",fontFamily:"var(--font-code, monospace)",fontWeight:500,color:p.in==="path"?"var(--ac)":"var(--tx)"},children:p.name}),s.jsx("td",{style:{padding:"8px 12px",fontFamily:"var(--font-code, monospace)",color:"var(--tx2)"},children:p.type}),s.jsx("td",{style:{padding:"8px 12px",color:"var(--txM)"},children:s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:11,background:p.in==="path"?"var(--ac)22":"var(--sf)",color:p.in==="path"?"var(--ac)":"var(--txM)"},children:p.in})}),s.jsx("td",{style:{padding:"8px 12px"},children:p.required?s.jsx("span",{"data-testid":"required-badge",style:{padding:"1px 6px",borderRadius:3,fontSize:11,fontWeight:600,background:"#ef444422",color:"#ef4444"},children:"required"}):s.jsx("span",{style:{color:"var(--txM)",fontSize:12},children:"optional"})}),s.jsx("td",{style:{padding:"8px 12px",color:"var(--tx2)"},children:p.description||"—"})]},`${p.name}-${d}`))})]})})}function A0({requestBody:u}){return s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[s.jsx("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:11,fontFamily:"var(--font-code, monospace)",background:"var(--sf)",color:"var(--tx2)"},children:u.contentType}),u.required&&s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:11,fontWeight:600,background:"#ef444422",color:"#ef4444"},children:"required"})]}),u.description&&s.jsx("p",{style:{fontSize:13,color:"var(--tx2)",marginBottom:8,marginTop:0},children:u.description}),u.schema&&s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:16,borderRadius:6,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0},children:JSON.stringify(u.schema,null,2)})]})}function j0(u){return u.startsWith("2")?"#22c55e":u.startsWith("4")?"#f59e0b":u.startsWith("5")?"#ef4444":"#6b7280"}function _0({responses:u}){return u.length===0?null:s.jsx("div",{style:{marginBottom:16},children:u.map((p,d)=>{const c=j0(p.statusCode);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 14px",background:"var(--sf)"},children:[s.jsx("span",{"data-testid":"status-badge",style:{padding:"2px 8px",borderRadius:4,fontSize:12,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:"#fff",background:c},children:p.statusCode}),s.jsx("span",{style:{fontSize:13,color:"var(--tx2)"},children:p.description})]}),p.schema&&s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:14,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0,borderTop:"1px solid var(--bd)"},children:JSON.stringify(p.schema,null,2)})]},`${p.statusCode}-${d}`)})})}function k0(u,p){const d=p+u.path,c=[`curl -X ${u.method.toUpperCase()} "${d}"`],v=u.parameters.filter(E=>E.in==="header");for(const E of v)c.push(` -H "${E.name}: "`);return u.requestBody&&(c.push(` -H "Content-Type: ${u.requestBody.contentType}"`),u.requestBody.schema&&c.push(` -d '${JSON.stringify(u.requestBody.schema,null,2)}'`)),c.join(` \\ +// Simple positional a`}],x0={};function S0(u){return u>=200&&u<300?"#22c55e":u>=400&&u<500?"#f59e0b":u>=500?"#ef4444":"#6b7280"}function T0(u,p,d,c){let v=p;for(const[j,D]of Object.entries(d))v=v.replace(`{${j}}`,encodeURIComponent(D));const E=new URL(v,u);for(const[j,D]of Object.entries(c))D&&E.searchParams.set(j,D);return E.toString()}function E0(u){return u==="bearer"?"Authorization":"X-API-Key"}const Fu={width:"100%",padding:"6px 10px",border:"1px solid var(--bd)",borderRadius:4,background:"var(--bg)",color:"var(--tx)",fontSize:13,fontFamily:"var(--font-code, monospace)",boxSizing:"border-box"};function Ju({param:u,value:p,onChange:d}){return s.jsxs("div",{style:{marginBottom:10},children:[s.jsxs("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:[u.name,u.required&&s.jsx("span",{style:{color:"#ef4444",marginLeft:2},children:"*"}),s.jsxs("span",{style:{fontWeight:400,color:"var(--txM)",marginLeft:6,fontSize:11},children:[u.in," · ",u.type]})]}),s.jsx("input",{"data-testid":`param-input-${u.name}`,style:Fu,placeholder:u.description||u.name,value:p,onChange:c=>d(c.target.value)})]})}function z0({endpoint:u,baseUrl:p,auth:d}){var at;const[c,v]=w.useState(!1),[E,j]=w.useState({}),[D,C]=w.useState((at=u.requestBody)!=null&&at.schema?JSON.stringify(u.requestBody.schema,null,2):""),[y,G]=w.useState(""),[R,K]=w.useState(!1),[nt,xt]=w.useState(null),[Ot,At]=w.useState(null),[W,I]=w.useState(!1),ct=(P,mt)=>j(tt=>({...tt,[P]:mt})),Q=u.parameters.filter(P=>P.in==="path"),Y=u.parameters.filter(P=>P.in==="query"),L=u.parameters.filter(P=>P.in==="header"),U=u.requestBody!=null,lt=async()=>{K(!0),xt(null),At(null);const P={};for(const jt of Q)P[jt.name]=E[jt.name]||"";const mt={};for(const jt of Y)E[jt.name]&&(mt[jt.name]=E[jt.name]);const tt={};for(const jt of L)E[jt.name]&&(tt[jt.name]=E[jt.name]);if(U&&(tt["Content-Type"]="application/json"),d&&y){const jt=d.header||E0(d.type);tt[jt]=d.type==="bearer"?`Bearer ${y}`:y}try{const jt=T0(p,u.path,P,mt),$t=Date.now(),ft=await fetch(jt,{method:u.method.toUpperCase(),headers:tt,body:U&&D?D:void 0}),M=Date.now()-$t,B={};ft.headers.forEach((Tt,m)=>{B[m]=Tt});let Z;if((ft.headers.get("content-type")||"").includes("json")){const Tt=await ft.json();Z=JSON.stringify(Tt,null,2)}else Z=await ft.text();xt({status:ft.status,statusText:ft.statusText,headers:B,body:Z,time:M})}catch(jt){At(jt instanceof Error?jt.message:"Network error")}finally{K(!1)}};return s.jsxs("div",{"data-testid":"api-playground",style:{border:"1px solid var(--bd)",borderRadius:6,overflow:"hidden",marginTop:8},children:[s.jsxs("button",{"data-testid":"playground-toggle",onClick:()=>v(!c),style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"10px 14px",background:"var(--sf)",border:"none",cursor:"pointer",fontFamily:"inherit",fontSize:13,fontWeight:600,color:"var(--ac)"},children:[s.jsx("span",{style:{fontSize:14},children:c?"▼":"▶"}),"Try it out"]}),c&&s.jsxs("div",{style:{padding:"14px 16px",borderTop:"1px solid var(--bd)"},children:[d&&s.jsxs("div",{style:{marginBottom:12},children:[s.jsx("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:d.type==="bearer"?"Bearer Token":"API Key"}),s.jsx("input",{"data-testid":"auth-input",type:"password",style:Fu,placeholder:d.type==="bearer"?"Enter bearer token":"Enter API key",value:y,onChange:P=>G(P.target.value)})]}),Q.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Path Parameters"}),Q.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),Y.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Query Parameters"}),Y.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),L.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Header Parameters"}),L.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),U&&s.jsxs("div",{style:{marginBottom:12},children:[s.jsx("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:"Request Body"}),s.jsx("textarea",{"data-testid":"request-body",style:{...Fu,minHeight:100,resize:"vertical",lineHeight:1.5},value:D,onChange:P=>C(P.target.value)})]}),s.jsx("button",{"data-testid":"send-request",onClick:lt,disabled:R,style:{padding:"8px 20px",borderRadius:4,border:"none",background:"var(--ac)",color:"#fff",fontWeight:600,fontSize:13,cursor:R?"wait":"pointer",opacity:R?.7:1,fontFamily:"inherit"},children:R?"Sending...":"Send Request"}),Ot&&s.jsx("div",{"data-testid":"playground-error",style:{marginTop:12,padding:"10px 14px",borderRadius:4,background:"#ef444418",border:"1px solid #ef444444",color:"#ef4444",fontSize:13},children:Ot}),nt&&s.jsxs("div",{"data-testid":"playground-response",style:{marginTop:12},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[s.jsxs("span",{"data-testid":"response-status",style:{padding:"2px 10px",borderRadius:4,fontSize:13,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:"#fff",background:S0(nt.status)},children:[nt.status," ",nt.statusText]}),s.jsxs("span",{style:{fontSize:12,color:"var(--txM)"},children:[nt.time,"ms"]})]}),s.jsxs("button",{"data-testid":"toggle-headers",onClick:()=>I(!W),style:{display:"flex",alignItems:"center",gap:4,background:"none",border:"none",cursor:"pointer",fontSize:12,color:"var(--txM)",padding:"4px 0",fontFamily:"inherit",marginBottom:4},children:[s.jsx("span",{style:{transform:W?"rotate(90deg)":"rotate(0)",transition:"transform 0.15s"},children:"▶"}),"Response Headers"]}),W&&s.jsx("pre",{style:{background:"var(--sf)",padding:10,borderRadius:4,fontSize:11,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.5,marginBottom:8,color:"var(--tx2)",margin:"0 0 8px 0"},children:Object.entries(nt.headers).map(([P,mt])=>`${P}: ${mt}`).join(` +`)}),s.jsx("pre",{"data-testid":"response-body",style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:14,borderRadius:6,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0,maxHeight:400},children:nt.body})]})]})]})}function mm({samples:u}){var c;const[p,d]=w.useState(0);return u.length===0?null:s.jsxs("div",{"data-testid":"code-samples",style:{border:"1px solid var(--bd)",borderRadius:8,overflow:"hidden"},children:[s.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--bd)",background:"var(--sf)",overflowX:"auto",WebkitOverflowScrolling:"touch"},children:u.map((v,E)=>s.jsx("button",{onClick:()=>d(E),style:{padding:"8px 16px",fontSize:13,fontWeight:500,background:E===p?"var(--cdBg)":"transparent",color:E===p?"var(--tx)":"var(--tx2)",border:"none",borderBottom:E===p?"2px solid var(--ac)":"2px solid transparent",cursor:"pointer",fontFamily:"var(--font-body)",whiteSpace:"nowrap"},children:v.label},v.language))}),s.jsx("pre",{style:{margin:0,padding:16,background:"var(--cdBg)",overflow:"auto"},children:s.jsx("code",{style:{fontSize:13,fontFamily:"var(--font-code)"},children:(c=u[p])==null?void 0:c.code})})]})}const hm={get:"#22c55e",post:"#3b82f6",put:"#f59e0b",delete:"#ef4444",patch:"#a78bfa",head:"#6b7280",options:"#6b7280"};function C0({method:u}){const p=hm[u.toLowerCase()]||"#6b7280";return s.jsx("span",{"data-testid":"method-badge",style:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-code, monospace)",textTransform:"uppercase",color:"#fff",background:p,letterSpacing:"0.05em"},children:u.toUpperCase()})}function M0({parameters:u}){return u.length===0?null:s.jsx("div",{style:{overflowX:"auto",marginBottom:16},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,lineHeight:1.5},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{borderBottom:"2px solid var(--bd)",textAlign:"left"},children:[s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Name"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Type"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"In"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Required"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Description"})]})}),s.jsx("tbody",{children:u.map((p,d)=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--bd)"},children:[s.jsx("td",{style:{padding:"8px 12px",fontFamily:"var(--font-code, monospace)",fontWeight:500,color:p.in==="path"?"var(--ac)":"var(--tx)"},children:p.name}),s.jsx("td",{style:{padding:"8px 12px",fontFamily:"var(--font-code, monospace)",color:"var(--tx2)"},children:p.type}),s.jsx("td",{style:{padding:"8px 12px",color:"var(--txM)"},children:s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:11,background:p.in==="path"?"var(--ac)22":"var(--sf)",color:p.in==="path"?"var(--ac)":"var(--txM)"},children:p.in})}),s.jsx("td",{style:{padding:"8px 12px"},children:p.required?s.jsx("span",{"data-testid":"required-badge",style:{padding:"1px 6px",borderRadius:3,fontSize:11,fontWeight:600,background:"#ef444422",color:"#ef4444"},children:"required"}):s.jsx("span",{style:{color:"var(--txM)",fontSize:12},children:"optional"})}),s.jsx("td",{style:{padding:"8px 12px",color:"var(--tx2)"},children:p.description||"—"})]},`${p.name}-${d}`))})]})})}function A0({requestBody:u}){return s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[s.jsx("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:11,fontFamily:"var(--font-code, monospace)",background:"var(--sf)",color:"var(--tx2)"},children:u.contentType}),u.required&&s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:11,fontWeight:600,background:"#ef444422",color:"#ef4444"},children:"required"})]}),u.description&&s.jsx("p",{style:{fontSize:13,color:"var(--tx2)",marginBottom:8,marginTop:0},children:u.description}),u.schema&&s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:16,borderRadius:6,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0},children:JSON.stringify(u.schema,null,2)})]})}function j0(u){return u.startsWith("2")?"#22c55e":u.startsWith("4")?"#f59e0b":u.startsWith("5")?"#ef4444":"#6b7280"}function k0({responses:u}){return u.length===0?null:s.jsx("div",{style:{marginBottom:16},children:u.map((p,d)=>{const c=j0(p.statusCode);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 14px",background:"var(--sf)"},children:[s.jsx("span",{"data-testid":"status-badge",style:{padding:"2px 8px",borderRadius:4,fontSize:12,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:"#fff",background:c},children:p.statusCode}),s.jsx("span",{style:{fontSize:13,color:"var(--tx2)"},children:p.description})]}),p.schema&&s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:14,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0,borderTop:"1px solid var(--bd)"},children:JSON.stringify(p.schema,null,2)})]},`${p.statusCode}-${d}`)})})}function _0(u,p){const d=p+u.path,c=[`curl -X ${u.method.toUpperCase()} "${d}"`],v=u.parameters.filter(E=>E.in==="header");for(const E of v)c.push(` -H "${E.name}: "`);return u.requestBody&&(c.push(` -H "Content-Type: ${u.requestBody.contentType}"`),u.requestBody.schema&&c.push(` -d '${JSON.stringify(u.requestBody.schema,null,2)}'`)),c.join(` \\ `)}function O0(u,p){var j;const d=p+u.path,c=[];c.push(` method: "${u.method.toUpperCase()}",`);const v={},E=u.parameters.filter(D=>D.in==="header");for(const D of E)v[D.name]="";return u.requestBody&&(v["Content-Type"]=u.requestBody.contentType),Object.keys(v).length>0&&c.push(` headers: ${JSON.stringify(v,null,4).replace(/\n/g,` `)},`),(j=u.requestBody)!=null&&j.schema&&c.push(` body: JSON.stringify(${JSON.stringify(u.requestBody.schema,null,4).replace(/\n/g,` `)}),`),`fetch("${d}", { ${c.join(` `)} -});`}function D0(u,p){var D,z;const d=p+u.path,c=["import requests",""],v={},E=u.parameters.filter(y=>y.in==="header");for(const y of E)v[y.name]="";u.requestBody&&(v["Content-Type"]=u.requestBody.contentType),Object.keys(v).length>0&&(c.push(`headers = ${JSON.stringify(v,null,4)}`),c.push("")),(D=u.requestBody)!=null&&D.schema&&(c.push(`data = ${JSON.stringify(u.requestBody.schema,null,4)}`),c.push(""));const j=[`"${d}"`];return Object.keys(v).length>0&&j.push("headers=headers"),(z=u.requestBody)!=null&&z.schema&&j.push("json=data"),c.push(`response = requests.${u.method}(${j.join(", ")})`),c.push("print(response.json())"),c.join(` +});`}function D0(u,p){var D,C;const d=p+u.path,c=["import requests",""],v={},E=u.parameters.filter(y=>y.in==="header");for(const y of E)v[y.name]="";u.requestBody&&(v["Content-Type"]=u.requestBody.contentType),Object.keys(v).length>0&&(c.push(`headers = ${JSON.stringify(v,null,4)}`),c.push("")),(D=u.requestBody)!=null&&D.schema&&(c.push(`data = ${JSON.stringify(u.requestBody.schema,null,4)}`),c.push(""));const j=[`"${d}"`];return Object.keys(v).length>0&&j.push("headers=headers"),(C=u.requestBody)!=null&&C.schema&&j.push("json=data"),c.push(`response = requests.${u.method}(${j.join(", ")})`),c.push("print(response.json())"),c.join(` `)}function R0(u,p){var E,j;const d=p+u.path,c=["package main","","import (",' "fmt"',' "net/http"'];(E=u.requestBody)!=null&&E.schema&&c.push(' "bytes"',' "encoding/json"'),c.push(' "io"',")",""),c.push("func main() {"),(j=u.requestBody)!=null&&j.schema?(c.push(` body, _ := json.Marshal(${JSON.stringify(u.requestBody.schema)})`),c.push(` req, _ := http.NewRequest("${u.method.toUpperCase()}", "${d}", bytes.NewBuffer(body))`)):c.push(` req, _ := http.NewRequest("${u.method.toUpperCase()}", "${d}", nil)`);const v=u.parameters.filter(D=>D.in==="header");for(const D of v)c.push(` req.Header.Set("${D.name}", "")`);return u.requestBody&&c.push(` req.Header.Set("Content-Type", "${u.requestBody.contentType}")`),c.push(" resp, _ := http.DefaultClient.Do(req)"),c.push(" defer resp.Body.Close()"),c.push(" data, _ := io.ReadAll(resp.Body)"),c.push(" fmt.Println(string(data))"),c.push("}"),c.join(` `)}function w0(u,p){var E;const d=p+u.path,c=["import java.net.http.*;","import java.net.URI;","","var client = HttpClient.newHttpClient();"];(E=u.requestBody)!=null&&E.schema?(c.push(`var body = ${JSON.stringify(JSON.stringify(u.requestBody.schema))};`),c.push("var request = HttpRequest.newBuilder()"),c.push(` .uri(URI.create("${d}"))`),c.push(` .method("${u.method.toUpperCase()}", HttpRequest.BodyPublishers.ofString(body))`)):(c.push("var request = HttpRequest.newBuilder()"),c.push(` .uri(URI.create("${d}"))`),c.push(` .method("${u.method.toUpperCase()}", HttpRequest.BodyPublishers.noBody())`));const v=u.parameters.filter(j=>j.in==="header");for(const j of v)c.push(` .header("${j.name}", "")`);return u.requestBody&&c.push(` .header("Content-Type", "${u.requestBody.contentType}")`),c.push(" .build();"),c.push(""),c.push("var response = client.send(request, HttpResponse.BodyHandlers.ofString());"),c.push("System.out.println(response.body());"),c.join(` `)}function B0(u,p){var E;const d=p+u.path,c=["using var client = new HttpClient();","",`var request = new HttpRequestMessage(HttpMethod.${u.method.charAt(0).toUpperCase()+u.method.slice(1)}, "${d}");`],v=u.parameters.filter(j=>j.in==="header");for(const j of v)c.push(`request.Headers.Add("${j.name}", "");`);return(E=u.requestBody)!=null&&E.schema&&(c.push("request.Content = new StringContent("),c.push(` ${JSON.stringify(JSON.stringify(u.requestBody.schema))},`),c.push(" System.Text.Encoding.UTF8,"),c.push(` "${u.requestBody.contentType}");`)),c.push(""),c.push("var response = await client.SendAsync(request);"),c.push("var body = await response.Content.ReadAsStringAsync();"),c.push("Console.WriteLine(body);"),c.join(` -`)}function U0({endpoint:u,baseUrl:p="https://api.example.com"}){const[d,c]=w.useState(0),v=["cURL","JavaScript","Python","Go","Java","C#"],E=[k0(u,p),O0(u,p),D0(u,p),R0(u,p),w0(u,p),B0(u,p)];return s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--bd)",overflowX:"auto",WebkitOverflowScrolling:"touch"},children:v.map((j,D)=>s.jsx("button",{onClick:()=>c(D),style:{padding:"6px 14px",background:"none",border:"none",borderBottom:d===D?"2px solid var(--ac)":"2px solid transparent",color:d===D?"var(--ac)":"var(--txM)",fontWeight:d===D?600:400,fontSize:12,cursor:"pointer",fontFamily:"inherit",whiteSpace:"nowrap"},children:j},j))}),s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:16,borderRadius:"0 0 6px 6px",fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0},children:E[d]})]})}function L0({endpoint:u,baseUrl:p,defaultExpanded:d=!1,showPlayground:c,playgroundAuth:v}){const[E,j]=w.useState(d),D=(u.operationId||`${u.method}-${u.path}`).toLowerCase().replace(/[^a-z0-9]+/g,"-"),z=u.parameters.length>0||u.requestBody!=null||u.responses.length>0;return s.jsxs("div",{id:D,style:{border:"1px solid var(--bd)",borderRadius:8,marginBottom:12,overflow:"hidden",scrollMarginTop:24},children:[s.jsxs("button",{onClick:()=>z&&j(!E),style:{display:"flex",alignItems:"center",gap:10,width:"100%",padding:"14px 18px",background:"var(--sf)",border:"none",cursor:z?"pointer":"default",textAlign:"left",fontFamily:"inherit",color:"var(--tx)"},children:[s.jsx(z0,{method:u.method}),s.jsx("span",{style:{fontFamily:"var(--font-code, monospace)",fontSize:14,fontWeight:500},children:u.path}),u.deprecated&&s.jsx("span",{"data-testid":"deprecated-badge",style:{padding:"1px 6px",borderRadius:3,fontSize:10,fontWeight:700,background:"#f59e0b33",color:"#f59e0b",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Deprecated"}),u.tags.map(y=>s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:10,background:"var(--bd)",color:"var(--txM)"},children:y},y)),s.jsx("span",{style:{flex:1}}),u.summary&&s.jsx("span",{style:{fontSize:13,color:"var(--tx2)",marginRight:8},children:u.summary}),z&&s.jsx("span",{style:{transform:E?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s",fontSize:12,color:"var(--txM)"},children:"▾"})]}),E&&s.jsxs("div",{style:{padding:"16px 18px",borderTop:"1px solid var(--bd)"},children:[u.description&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0,marginBottom:16},children:u.description}),u.parameters.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Parameters"}),s.jsx(M0,{parameters:u.parameters})]}),u.requestBody&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Request Body"}),s.jsx(A0,{requestBody:u.requestBody})]}),u.responses.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Responses"}),s.jsx(_0,{responses:u.responses})]}),s.jsxs("div",{children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Code Examples"}),u.codeSamples&&u.codeSamples.length>0?s.jsx(mm,{samples:u.codeSamples}):s.jsx(U0,{endpoint:u,baseUrl:p})]}),c&&s.jsx("div",{style:{marginTop:16},children:s.jsx(C0,{endpoint:u,baseUrl:p||"https://api.example.com",auth:v})})]})]})}function H0({manifest:u,baseUrl:p,showPlayground:d,playgroundAuth:c}){const v=p||(u.servers.length>0?u.servers[0].url:"https://api.example.com"),E=new Map;for(const z of u.endpoints){const y=z.tags.length>0?z.tags[0]:"Other";E.has(y)||E.set(y,[]),E.get(y).push(z)}const j=[];for(const z of u.tags)E.has(z.name)&&j.push(z.name);for(const z of E.keys())j.includes(z)||j.push(z);const D=new Map;for(const z of u.tags)D.set(z.name,z.description);return s.jsxs("div",{style:{display:"flex",gap:32},children:[s.jsxs("nav",{"data-testid":"api-toc",style:{width:200,flexShrink:0,position:"sticky",top:24,alignSelf:"flex-start",maxHeight:"calc(100vh - 48px)",overflowY:"auto"},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:12,letterSpacing:"0.05em"},children:"Endpoints"}),j.map(z=>{const y=z.toLowerCase().replace(/\s+/g,"-");return s.jsxs("div",{style:{marginBottom:14},children:[s.jsx("a",{href:`#${y}`,onClick:G=>{var R;G.preventDefault(),(R=document.getElementById(y))==null||R.scrollIntoView({behavior:"smooth",block:"start"})},style:{display:"block",fontSize:13,fontWeight:600,color:"var(--tx)",textDecoration:"none",marginBottom:4},children:z}),(E.get(z)||[]).map(G=>{const R=(G.operationId||`${G.method}-${G.path}`).toLowerCase().replace(/[^a-z0-9]+/g,"-");return s.jsxs("a",{href:`#${R}`,onClick:K=>{var nt;K.preventDefault(),(nt=document.getElementById(R))==null||nt.scrollIntoView({behavior:"smooth",block:"start"})},style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--tx2)",textDecoration:"none",padding:"3px 0"},children:[s.jsx("span",{style:{fontSize:9,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:hm[G.method]||"#6b7280",width:36,textTransform:"uppercase"},children:G.method}),s.jsx("span",{style:{fontFamily:"var(--font-code, monospace)"},children:G.path})]},`${G.method}-${G.path}`)})]},z)})]}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsxs("div",{style:{marginBottom:32},children:[s.jsx("h1",{style:{fontSize:28,fontWeight:700,marginBottom:4},children:u.title}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[s.jsxs("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,background:"var(--sf)",color:"var(--txM)"},children:["v",u.version]}),u.servers.length>0&&s.jsx("span",{style:{fontSize:12,fontFamily:"var(--font-code, monospace)",color:"var(--tx2)"},children:u.servers[0].url})]}),u.description&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0},children:u.description})]}),j.map(z=>s.jsxs("section",{id:z.toLowerCase().replace(/\s+/g,"-"),"data-testid":"tag-section",style:{marginBottom:40},children:[s.jsx("h2",{style:{fontSize:20,fontWeight:700,marginBottom:4},children:z}),D.get(z)&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0,marginBottom:16},children:D.get(z)}),(E.get(z)||[]).map(y=>s.jsx(L0,{endpoint:y,baseUrl:v,showPlayground:d,playgroundAuth:c},`${y.method}-${y.path}`))]},z))]})]})}function N0({href:u,title:p,description:d,icon:c,external:v}){const E=v??u.startsWith("http");return s.jsxs("a",{href:u,target:E?"_blank":void 0,rel:E?"noopener noreferrer":void 0,style:{display:"block",padding:"16px 20px",border:"1px solid var(--bd)",borderRadius:8,textDecoration:"none",color:"inherit",background:"var(--sf)",transition:"border-color 0.15s, background 0.15s",cursor:"pointer"},onMouseEnter:j=>{j.currentTarget.style.borderColor="var(--ac)",j.currentTarget.style.background="var(--sfH)"},onMouseLeave:j=>{j.currentTarget.style.borderColor="var(--bd)",j.currentTarget.style.background="var(--sf)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[c&&s.jsx("span",{style:{fontSize:18},children:c}),s.jsx("span",{style:{fontWeight:600,fontSize:15,color:"var(--tx)"},children:p}),s.jsx("span",{style:{marginLeft:"auto",color:"var(--tx2)",fontSize:14},children:E?"↗":"→"})]}),d&&s.jsx("p",{style:{margin:"6px 0 0",fontSize:13,color:"var(--tx2)",lineHeight:1.5},children:d})]})}function q0({columns:u=2,children:p}){return s.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gap:12,marginTop:16,marginBottom:16},children:p})}const G0={Added:"#22c55e",Changed:"#3b82f6",Deprecated:"#f59e0b",Removed:"#ef4444",Fixed:"#8b5cf6",Security:"#f97316"};function lm(u){return G0[u]||"#6b7280"}function Y0({entries:u,initialLimit:p}){const[d,c]=w.useState(!p),v=d?u:u.slice(0,p||u.length);return u.length===0?s.jsx("div",{"data-testid":"changelog-empty",style:{padding:"40px 0",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No changelog entries found."}):s.jsxs("div",{"data-testid":"changelog-timeline",style:{position:"relative"},children:[s.jsx("div",{style:{position:"absolute",left:15,top:8,bottom:8,width:2,background:"var(--bd)"}}),v.map((E,j)=>s.jsxs("div",{"data-testid":`changelog-entry-${E.version}`,style:{position:"relative",paddingLeft:44,paddingBottom:js.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginBottom:8},children:[s.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:lm(D.type)}}),s.jsx("span",{style:{fontSize:12,fontWeight:600,textTransform:"uppercase",letterSpacing:".06em",color:lm(D.type),fontFamily:"var(--font-code, monospace)"},children:D.type})]}),s.jsx("ul",{style:{margin:0,paddingLeft:18,listStyleType:"disc",color:"var(--tx2)"},children:D.items.map((z,y)=>s.jsx("li",{style:{fontSize:14,lineHeight:1.7,color:"var(--tx2)",marginBottom:2},children:z},y))})]},D.type))]},E.version)),!d&&u.length>(p||0)&&s.jsx("div",{style:{textAlign:"center",marginTop:24},children:s.jsxs("button",{"data-testid":"changelog-show-more",onClick:()=>c(!0),style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 20px",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body, inherit)",cursor:"pointer",transition:"border-color .15s, color .15s"},children:["Show all ",u.length," releases"]})})]})}const im={info:{color:"#3b82f6",label:"INFO"},warning:{color:"#f59e0b",label:"WARNING"},tip:{color:"var(--ac, #a78bfa)",label:"TIP"},danger:{color:"#ef4444",label:"DANGER"}};function K0({type:u="info",title:p,children:d}){const c=im[u]||im.info;return s.jsxs("div",{style:{borderLeft:`3px solid ${c.color}`,background:`${c.color}11`,borderRadius:"0 2px 2px 0",padding:"14px 18px",marginBottom:20},children:[p?s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[s.jsx("span",{style:{fontWeight:700,fontSize:10,letterSpacing:".08em",color:c.color,fontFamily:"var(--font-code, monospace)"},children:c.label}),s.jsx("span",{style:{fontWeight:600,fontSize:13,color:c.color},children:p})]}):s.jsx("div",{style:{marginBottom:4},children:s.jsx("span",{style:{fontWeight:700,fontSize:10,letterSpacing:".08em",color:c.color,fontFamily:"var(--font-code, monospace)"},children:c.label})}),s.jsx("div",{style:{fontSize:14,lineHeight:1.65,color:"var(--tx2)"},children:d})]})}function X0({items:u,children:p}){const[d,c]=w.useState(0);return s.jsxs("div",{style:{marginBottom:20},children:[s.jsx("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--bd)"},children:u.map((v,E)=>s.jsx("button",{onClick:()=>c(E),style:{padding:"8px 16px",background:"none",border:"none",borderBottom:d===E?"2px solid var(--ac)":"2px solid transparent",color:d===E?"var(--ac)":"var(--txM)",fontWeight:d===E?600:400,fontSize:13,cursor:"pointer",fontFamily:"inherit"},children:v},E))}),s.jsx("div",{style:{padding:"16px 0"},children:p[d]})]})}function Q0({title:u,icon:p,href:d,children:c}){const v=s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,padding:"20px",transition:"border-color 0.15s",cursor:d?"pointer":"default"},children:[p&&s.jsx("span",{style:{fontSize:24,marginBottom:8,display:"block"},children:p}),s.jsx("div",{style:{fontWeight:600,fontSize:14,marginBottom:4},children:u}),c&&s.jsx("div",{style:{fontSize:13,color:"var(--txM)",lineHeight:1.5},children:c})]});return d?s.jsx("a",{href:d,style:{textDecoration:"none",color:"inherit"},children:v}):v}function V0({cols:u=2,children:p}){return s.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gap:12,marginBottom:20},children:p})}function Z0({children:u}){return s.jsx("div",{style:{paddingLeft:24,borderLeft:"2px solid var(--bd)",marginBottom:20},children:sm.Children.map(u,(p,d)=>s.jsxs("div",{style:{position:"relative",paddingBottom:20},children:[s.jsx("div",{style:{position:"absolute",left:-33,top:0,width:20,height:20,borderRadius:"50%",background:"var(--ac)",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700},children:d+1}),s.jsx("div",{style:{paddingLeft:8},children:p})]}))})}function J0({title:u,children:p}){const[d,c]=w.useState(!1);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,marginBottom:8,overflow:"hidden"},children:[s.jsxs("button",{onClick:()=>c(!d),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"12px 16px",background:"var(--sf)",border:"none",cursor:"pointer",fontWeight:500,fontSize:14,color:"var(--tx)",fontFamily:"inherit"},children:[u,s.jsx("span",{style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s"},children:"▾"})]}),d&&s.jsx("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--bd)",fontSize:14,color:"var(--tx2)",lineHeight:1.65},children:p})]})}const W0={install:{npm:"npm install",yarn:"yarn add",pnpm:"pnpm add",bun:"bun add"},"install -D":{npm:"npm install -D",yarn:"yarn add -D",pnpm:"pnpm add -D",bun:"bun add -d"},uninstall:{npm:"npm uninstall",yarn:"yarn remove",pnpm:"pnpm remove",bun:"bun remove"},run:{npm:"npm run",yarn:"yarn",pnpm:"pnpm",bun:"bun run"},exec:{npm:"npx",yarn:"yarn dlx",pnpm:"pnpm dlx",bun:"bunx"},init:{npm:"npm init",yarn:"yarn init",pnpm:"pnpm init",bun:"bun init"},create:{npm:"npm create",yarn:"yarn create",pnpm:"pnpm create",bun:"bun create"}};function F0(u,p){for(const[d,c]of Object.entries(W0))if(u.startsWith(d+" ")||u===d){const v=u.slice(d.length);return(c[p]||d)+v}return`${p} ${u}`}function $0({command:u}){const[p,d]=w.useState(0),[c,v]=w.useState(!1),E=["npm","yarn","pnpm","bun"],j=F0(u,E[p]);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,marginBottom:16,overflow:"hidden"},children:[s.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--bd)",background:"var(--sf)",overflowX:"auto"},children:E.map((D,z)=>s.jsx("button",{onClick:()=>{d(z),v(!1)},style:{padding:"8px 14px",background:"none",border:"none",cursor:"pointer",fontSize:12,fontFamily:"var(--font-code)",fontWeight:z===p?600:400,color:z===p?"var(--ac)":"var(--txM)",borderBottom:z===p?"2px solid var(--ac)":"2px solid transparent",whiteSpace:"nowrap"},children:D},D))}),s.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"10px 14px",background:"var(--cdBg)",gap:8},children:[s.jsx("code",{style:{flex:1,fontFamily:"var(--font-code)",fontSize:13,color:"var(--cdTx)",whiteSpace:"pre",overflowX:"auto"},children:j}),s.jsx("button",{onClick:()=>{var D;(D=navigator.clipboard)==null||D.writeText(j),v(!0),setTimeout(()=>v(!1),2e3)},style:{background:"none",border:"none",cursor:"pointer",color:"var(--txM)",fontSize:12,fontFamily:"var(--font-code)",flexShrink:0},children:c?"✓":"Copy"})]})]})}function I0({name:u,fields:p}){return s.jsxs("div",{style:{marginBottom:16},children:[u&&s.jsx("h4",{style:{fontFamily:"var(--font-code)",fontSize:15,marginBottom:8,color:"var(--tx)"},children:u}),s.jsx("div",{style:{overflowX:"auto",WebkitOverflowScrolling:"touch"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,fontFamily:"var(--font-body)"},children:[s.jsx("thead",{children:s.jsx("tr",{style:{borderBottom:"2px solid var(--bd)"},children:["Property","Type","Required","Default","Description"].map(d=>s.jsx("th",{style:{textAlign:"left",padding:"8px 10px",color:"var(--txM)",fontWeight:600,fontSize:11,textTransform:"uppercase",letterSpacing:".05em",whiteSpace:"nowrap"},children:d},d))})}),s.jsx("tbody",{children:p.map(d=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--bd)"},children:[s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontWeight:500,color:"var(--tx)"},children:d.name}),s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontSize:12,color:"var(--ac)"},children:d.type}),s.jsx("td",{style:{padding:"8px 10px"},children:d.required&&s.jsx("span",{style:{fontSize:10,fontWeight:600,color:"#e04040",background:"rgba(224,64,64,0.1)",padding:"2px 6px",borderRadius:2},children:"required"})}),s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontSize:12,color:"var(--txM)"},children:d.default||"—"}),s.jsx("td",{style:{padding:"8px 10px",color:"var(--tx2)"},children:d.description||""})]},d.name))})]})})]})}function P0({name:u}){return s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0",fontFamily:"var(--font-code)",fontSize:13,color:"var(--tx2)"},children:[s.jsx("span",{style:{opacity:.6},children:"📄"})," ",u]})}function tg({name:u,defaultOpen:p,children:d}){const[c,v]=w.useState(p??!1);return s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>v(!c),style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0",background:"none",border:"none",cursor:"pointer",fontFamily:"var(--font-code)",fontSize:13,color:"var(--tx)",fontWeight:500},children:[s.jsx("span",{children:c?"📂":"📁"})," ",u]}),c&&s.jsx("div",{style:{paddingLeft:18,borderLeft:"1px solid var(--bd)",marginLeft:8},children:d})]})}function Iu({children:u}){return s.jsx("div",{style:{border:"1px solid var(--bd)",borderRadius:2,padding:"12px 16px",background:"var(--cdBg)",marginBottom:16},children:u})}Iu.File=P0;Iu.Folder=tg;const eg={Callout:K0,Tabs:X0,Card:Q0,CardGroup:V0,Steps:Z0,Accordion:J0,ChangelogTimeline:Y0,PackageManager:$0,TypeTable:I0,FileTree:Iu,CodeSamples:mm,LinkCard:N0,CardGrid:q0},ng=` +`)}function U0({endpoint:u,baseUrl:p="https://api.example.com"}){const[d,c]=w.useState(0),v=["cURL","JavaScript","Python","Go","Java","C#"],E=[_0(u,p),O0(u,p),D0(u,p),R0(u,p),w0(u,p),B0(u,p)];return s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--bd)",overflowX:"auto",WebkitOverflowScrolling:"touch"},children:v.map((j,D)=>s.jsx("button",{onClick:()=>c(D),style:{padding:"6px 14px",background:"none",border:"none",borderBottom:d===D?"2px solid var(--ac)":"2px solid transparent",color:d===D?"var(--ac)":"var(--txM)",fontWeight:d===D?600:400,fontSize:12,cursor:"pointer",fontFamily:"inherit",whiteSpace:"nowrap"},children:j},j))}),s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:16,borderRadius:"0 0 6px 6px",fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0},children:E[d]})]})}function L0({endpoint:u,baseUrl:p,defaultExpanded:d=!1,showPlayground:c,playgroundAuth:v}){const[E,j]=w.useState(d),D=(u.operationId||`${u.method}-${u.path}`).toLowerCase().replace(/[^a-z0-9]+/g,"-"),C=u.parameters.length>0||u.requestBody!=null||u.responses.length>0;return s.jsxs("div",{id:D,style:{border:"1px solid var(--bd)",borderRadius:8,marginBottom:12,overflow:"hidden",scrollMarginTop:24},children:[s.jsxs("button",{onClick:()=>C&&j(!E),style:{display:"flex",alignItems:"center",gap:10,width:"100%",padding:"14px 18px",background:"var(--sf)",border:"none",cursor:C?"pointer":"default",textAlign:"left",fontFamily:"inherit",color:"var(--tx)"},children:[s.jsx(C0,{method:u.method}),s.jsx("span",{style:{fontFamily:"var(--font-code, monospace)",fontSize:14,fontWeight:500},children:u.path}),u.deprecated&&s.jsx("span",{"data-testid":"deprecated-badge",style:{padding:"1px 6px",borderRadius:3,fontSize:10,fontWeight:700,background:"#f59e0b33",color:"#f59e0b",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Deprecated"}),u.tags.map(y=>s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:10,background:"var(--bd)",color:"var(--txM)"},children:y},y)),s.jsx("span",{style:{flex:1}}),u.summary&&s.jsx("span",{style:{fontSize:13,color:"var(--tx2)",marginRight:8},children:u.summary}),C&&s.jsx("span",{style:{transform:E?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s",fontSize:12,color:"var(--txM)"},children:"▾"})]}),E&&s.jsxs("div",{style:{padding:"16px 18px",borderTop:"1px solid var(--bd)"},children:[u.description&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0,marginBottom:16},children:u.description}),u.parameters.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Parameters"}),s.jsx(M0,{parameters:u.parameters})]}),u.requestBody&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Request Body"}),s.jsx(A0,{requestBody:u.requestBody})]}),u.responses.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Responses"}),s.jsx(k0,{responses:u.responses})]}),s.jsxs("div",{children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Code Examples"}),u.codeSamples&&u.codeSamples.length>0?s.jsx(mm,{samples:u.codeSamples}):s.jsx(U0,{endpoint:u,baseUrl:p})]}),c&&s.jsx("div",{style:{marginTop:16},children:s.jsx(z0,{endpoint:u,baseUrl:p||"https://api.example.com",auth:v})})]})]})}function H0({manifest:u,baseUrl:p,showPlayground:d,playgroundAuth:c}){const v=p||(u.servers.length>0?u.servers[0].url:"https://api.example.com"),E=new Map;for(const C of u.endpoints){const y=C.tags.length>0?C.tags[0]:"Other";E.has(y)||E.set(y,[]),E.get(y).push(C)}const j=[];for(const C of u.tags)E.has(C.name)&&j.push(C.name);for(const C of E.keys())j.includes(C)||j.push(C);const D=new Map;for(const C of u.tags)D.set(C.name,C.description);return s.jsxs("div",{style:{display:"flex",gap:32},children:[s.jsxs("nav",{"data-testid":"api-toc",style:{width:200,flexShrink:0,position:"sticky",top:24,alignSelf:"flex-start",maxHeight:"calc(100vh - 48px)",overflowY:"auto"},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:12,letterSpacing:"0.05em"},children:"Endpoints"}),j.map(C=>{const y=C.toLowerCase().replace(/\s+/g,"-");return s.jsxs("div",{style:{marginBottom:14},children:[s.jsx("a",{href:`#${y}`,onClick:G=>{var R;G.preventDefault(),(R=document.getElementById(y))==null||R.scrollIntoView({behavior:"smooth",block:"start"})},style:{display:"block",fontSize:13,fontWeight:600,color:"var(--tx)",textDecoration:"none",marginBottom:4},children:C}),(E.get(C)||[]).map(G=>{const R=(G.operationId||`${G.method}-${G.path}`).toLowerCase().replace(/[^a-z0-9]+/g,"-");return s.jsxs("a",{href:`#${R}`,onClick:K=>{var nt;K.preventDefault(),(nt=document.getElementById(R))==null||nt.scrollIntoView({behavior:"smooth",block:"start"})},style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--tx2)",textDecoration:"none",padding:"3px 0"},children:[s.jsx("span",{style:{fontSize:9,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:hm[G.method]||"#6b7280",width:36,textTransform:"uppercase"},children:G.method}),s.jsx("span",{style:{fontFamily:"var(--font-code, monospace)"},children:G.path})]},`${G.method}-${G.path}`)})]},C)})]}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsxs("div",{style:{marginBottom:32},children:[s.jsx("h1",{style:{fontSize:28,fontWeight:700,marginBottom:4},children:u.title}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[s.jsxs("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,background:"var(--sf)",color:"var(--txM)"},children:["v",u.version]}),u.servers.length>0&&s.jsx("span",{style:{fontSize:12,fontFamily:"var(--font-code, monospace)",color:"var(--tx2)"},children:u.servers[0].url})]}),u.description&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0},children:u.description})]}),j.map(C=>s.jsxs("section",{id:C.toLowerCase().replace(/\s+/g,"-"),"data-testid":"tag-section",style:{marginBottom:40},children:[s.jsx("h2",{style:{fontSize:20,fontWeight:700,marginBottom:4},children:C}),D.get(C)&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0,marginBottom:16},children:D.get(C)}),(E.get(C)||[]).map(y=>s.jsx(L0,{endpoint:y,baseUrl:v,showPlayground:d,playgroundAuth:c},`${y.method}-${y.path}`))]},C))]})]})}function N0({href:u,title:p,description:d,icon:c,external:v}){const E=v??u.startsWith("http");return s.jsxs("a",{href:u,target:E?"_blank":void 0,rel:E?"noopener noreferrer":void 0,style:{display:"block",padding:"16px 20px",border:"1px solid var(--bd)",borderRadius:8,textDecoration:"none",color:"inherit",background:"var(--sf)",transition:"border-color 0.15s, background 0.15s",cursor:"pointer"},onMouseEnter:j=>{j.currentTarget.style.borderColor="var(--ac)",j.currentTarget.style.background="var(--sfH)"},onMouseLeave:j=>{j.currentTarget.style.borderColor="var(--bd)",j.currentTarget.style.background="var(--sf)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[c&&s.jsx("span",{style:{fontSize:18},children:c}),s.jsx("span",{style:{fontWeight:600,fontSize:15,color:"var(--tx)"},children:p}),s.jsx("span",{style:{marginLeft:"auto",color:"var(--tx2)",fontSize:14},children:E?"↗":"→"})]}),d&&s.jsx("p",{style:{margin:"6px 0 0",fontSize:13,color:"var(--tx2)",lineHeight:1.5},children:d})]})}function q0({columns:u=2,children:p}){return s.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gap:12,marginTop:16,marginBottom:16},children:p})}const G0={Added:"#22c55e",Changed:"#3b82f6",Deprecated:"#f59e0b",Removed:"#ef4444",Fixed:"#8b5cf6",Security:"#f97316"};function am(u){return G0[u]||"#6b7280"}function Y0({entries:u,initialLimit:p}){const[d,c]=w.useState(!p),v=d?u:u.slice(0,p||u.length);return u.length===0?s.jsx("div",{"data-testid":"changelog-empty",style:{padding:"40px 0",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No changelog entries found."}):s.jsxs("div",{"data-testid":"changelog-timeline",style:{position:"relative"},children:[s.jsx("div",{style:{position:"absolute",left:15,top:8,bottom:8,width:2,background:"var(--bd)"}}),v.map((E,j)=>s.jsxs("div",{"data-testid":`changelog-entry-${E.version}`,style:{position:"relative",paddingLeft:44,paddingBottom:js.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginBottom:8},children:[s.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:am(D.type)}}),s.jsx("span",{style:{fontSize:12,fontWeight:600,textTransform:"uppercase",letterSpacing:".06em",color:am(D.type),fontFamily:"var(--font-code, monospace)"},children:D.type})]}),s.jsx("ul",{style:{margin:0,paddingLeft:18,listStyleType:"disc",color:"var(--tx2)"},children:D.items.map((C,y)=>s.jsx("li",{style:{fontSize:14,lineHeight:1.7,color:"var(--tx2)",marginBottom:2},children:C},y))})]},D.type))]},E.version)),!d&&u.length>(p||0)&&s.jsx("div",{style:{textAlign:"center",marginTop:24},children:s.jsxs("button",{"data-testid":"changelog-show-more",onClick:()=>c(!0),style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 20px",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body, inherit)",cursor:"pointer",transition:"border-color .15s, color .15s"},children:["Show all ",u.length," releases"]})})]})}const im={info:{color:"#3b82f6",label:"INFO"},warning:{color:"#f59e0b",label:"WARNING"},tip:{color:"var(--ac, #a78bfa)",label:"TIP"},danger:{color:"#ef4444",label:"DANGER"}};function K0({type:u="info",title:p,children:d}){const c=im[u]||im.info;return s.jsxs("div",{style:{borderLeft:`3px solid ${c.color}`,background:`${c.color}11`,borderRadius:"0 2px 2px 0",padding:"14px 18px",marginBottom:20},children:[p?s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[s.jsx("span",{style:{fontWeight:700,fontSize:10,letterSpacing:".08em",color:c.color,fontFamily:"var(--font-code, monospace)"},children:c.label}),s.jsx("span",{style:{fontWeight:600,fontSize:13,color:c.color},children:p})]}):s.jsx("div",{style:{marginBottom:4},children:s.jsx("span",{style:{fontWeight:700,fontSize:10,letterSpacing:".08em",color:c.color,fontFamily:"var(--font-code, monospace)"},children:c.label})}),s.jsx("div",{style:{fontSize:14,lineHeight:1.65,color:"var(--tx2)"},children:d})]})}function X0({items:u,children:p}){const[d,c]=w.useState(0);return s.jsxs("div",{style:{marginBottom:20},children:[s.jsx("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--bd)"},children:u.map((v,E)=>s.jsx("button",{onClick:()=>c(E),style:{padding:"8px 16px",background:"none",border:"none",borderBottom:d===E?"2px solid var(--ac)":"2px solid transparent",color:d===E?"var(--ac)":"var(--txM)",fontWeight:d===E?600:400,fontSize:13,cursor:"pointer",fontFamily:"inherit"},children:v},E))}),s.jsx("div",{style:{padding:"16px 0"},children:p[d]})]})}function Q0({title:u,icon:p,href:d,children:c}){const v=s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,padding:"20px",transition:"border-color 0.15s",cursor:d?"pointer":"default"},children:[p&&s.jsx("span",{style:{fontSize:24,marginBottom:8,display:"block"},children:p}),s.jsx("div",{style:{fontWeight:600,fontSize:14,marginBottom:4},children:u}),c&&s.jsx("div",{style:{fontSize:13,color:"var(--txM)",lineHeight:1.5},children:c})]});return d?s.jsx("a",{href:d,style:{textDecoration:"none",color:"inherit"},children:v}):v}function V0({cols:u=2,children:p}){return s.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gap:12,marginBottom:20},children:p})}function Z0({children:u}){return s.jsx("div",{style:{paddingLeft:24,borderLeft:"2px solid var(--bd)",marginBottom:20},children:sm.Children.map(u,(p,d)=>s.jsxs("div",{style:{position:"relative",paddingBottom:20},children:[s.jsx("div",{style:{position:"absolute",left:-33,top:0,width:20,height:20,borderRadius:"50%",background:"var(--ac)",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700},children:d+1}),s.jsx("div",{style:{paddingLeft:8},children:p})]}))})}function J0({title:u,children:p}){const[d,c]=w.useState(!1);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,marginBottom:8,overflow:"hidden"},children:[s.jsxs("button",{onClick:()=>c(!d),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"12px 16px",background:"var(--sf)",border:"none",cursor:"pointer",fontWeight:500,fontSize:14,color:"var(--tx)",fontFamily:"inherit"},children:[u,s.jsx("span",{style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s"},children:"▾"})]}),d&&s.jsx("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--bd)",fontSize:14,color:"var(--tx2)",lineHeight:1.65},children:p})]})}const W0={install:{npm:"npm install",yarn:"yarn add",pnpm:"pnpm add",bun:"bun add"},"install -D":{npm:"npm install -D",yarn:"yarn add -D",pnpm:"pnpm add -D",bun:"bun add -d"},uninstall:{npm:"npm uninstall",yarn:"yarn remove",pnpm:"pnpm remove",bun:"bun remove"},run:{npm:"npm run",yarn:"yarn",pnpm:"pnpm",bun:"bun run"},exec:{npm:"npx",yarn:"yarn dlx",pnpm:"pnpm dlx",bun:"bunx"},init:{npm:"npm init",yarn:"yarn init",pnpm:"pnpm init",bun:"bun init"},create:{npm:"npm create",yarn:"yarn create",pnpm:"pnpm create",bun:"bun create"}};function F0(u,p){for(const[d,c]of Object.entries(W0))if(u.startsWith(d+" ")||u===d){const v=u.slice(d.length);return(c[p]||d)+v}return`${p} ${u}`}function $0({command:u}){const[p,d]=w.useState(0),[c,v]=w.useState(!1),E=["npm","yarn","pnpm","bun"],j=F0(u,E[p]);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,marginBottom:16,overflow:"hidden"},children:[s.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--bd)",background:"var(--sf)",overflowX:"auto"},children:E.map((D,C)=>s.jsx("button",{onClick:()=>{d(C),v(!1)},style:{padding:"8px 14px",background:"none",border:"none",cursor:"pointer",fontSize:12,fontFamily:"var(--font-code)",fontWeight:C===p?600:400,color:C===p?"var(--ac)":"var(--txM)",borderBottom:C===p?"2px solid var(--ac)":"2px solid transparent",whiteSpace:"nowrap"},children:D},D))}),s.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"10px 14px",background:"var(--cdBg)",gap:8},children:[s.jsx("code",{style:{flex:1,fontFamily:"var(--font-code)",fontSize:13,color:"var(--cdTx)",whiteSpace:"pre",overflowX:"auto"},children:j}),s.jsx("button",{onClick:()=>{var D;(D=navigator.clipboard)==null||D.writeText(j),v(!0),setTimeout(()=>v(!1),2e3)},style:{background:"none",border:"none",cursor:"pointer",color:"var(--txM)",fontSize:12,fontFamily:"var(--font-code)",flexShrink:0},children:c?"✓":"Copy"})]})]})}function I0({name:u,fields:p}){return s.jsxs("div",{style:{marginBottom:16},children:[u&&s.jsx("h4",{style:{fontFamily:"var(--font-code)",fontSize:15,marginBottom:8,color:"var(--tx)"},children:u}),s.jsx("div",{style:{overflowX:"auto",WebkitOverflowScrolling:"touch"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,fontFamily:"var(--font-body)"},children:[s.jsx("thead",{children:s.jsx("tr",{style:{borderBottom:"2px solid var(--bd)"},children:["Property","Type","Required","Default","Description"].map(d=>s.jsx("th",{style:{textAlign:"left",padding:"8px 10px",color:"var(--txM)",fontWeight:600,fontSize:11,textTransform:"uppercase",letterSpacing:".05em",whiteSpace:"nowrap"},children:d},d))})}),s.jsx("tbody",{children:p.map(d=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--bd)"},children:[s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontWeight:500,color:"var(--tx)"},children:d.name}),s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontSize:12,color:"var(--ac)"},children:d.type}),s.jsx("td",{style:{padding:"8px 10px"},children:d.required&&s.jsx("span",{style:{fontSize:10,fontWeight:600,color:"#e04040",background:"rgba(224,64,64,0.1)",padding:"2px 6px",borderRadius:2},children:"required"})}),s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontSize:12,color:"var(--txM)"},children:d.default||"—"}),s.jsx("td",{style:{padding:"8px 10px",color:"var(--tx2)"},children:d.description||""})]},d.name))})]})})]})}function P0({name:u}){return s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0",fontFamily:"var(--font-code)",fontSize:13,color:"var(--tx2)"},children:[s.jsx("span",{style:{opacity:.6},children:"📄"})," ",u]})}function tg({name:u,defaultOpen:p,children:d}){const[c,v]=w.useState(p??!1);return s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>v(!c),style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0",background:"none",border:"none",cursor:"pointer",fontFamily:"var(--font-code)",fontSize:13,color:"var(--tx)",fontWeight:500},children:[s.jsx("span",{children:c?"📂":"📁"})," ",u]}),c&&s.jsx("div",{style:{paddingLeft:18,borderLeft:"1px solid var(--bd)",marginLeft:8},children:d})]})}function Iu({children:u}){return s.jsx("div",{style:{border:"1px solid var(--bd)",borderRadius:2,padding:"12px 16px",background:"var(--cdBg)",marginBottom:16},children:u})}Iu.File=P0;Iu.Folder=tg;const eg={Callout:K0,Tabs:X0,Card:Q0,CardGroup:V0,Steps:Z0,Accordion:J0,ChangelogTimeline:Y0,PackageManager:$0,TypeTable:I0,FileTree:Iu,CodeSamples:mm,LinkCard:N0,CardGrid:q0},ng=` @import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Bricolage+Grotesque:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,700&family=Fira+Code:wght@400;500;600&family=Bodoni+Moda:ital,wght@0,400;0,700;0,900;1,400&family=Space+Grotesk:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap'); html, body { margin: 0; padding: 0; height: 100%; overflow: clip; } @@ -1395,4 +1377,4 @@ ${c.join(` border-color: var(--bd); box-shadow: 0 4px 12px rgba(0,0,0,0.3); } -`,ko=(Jn.basePath||"/").replace(/\/$/,"");function ag(u){return cm(u,ko,Wn)}function Wu(u){return f0(u,ko,Wn)}const pm=p0(window.location.pathname,window.location.hash,Wn,ko,cm),lg=fm(pm,Wn,dm);function ig(){var W,I,ct,Q;const[u,p]=w.useState(pm),[d,c]=w.useState(null),[v,E]=w.useState(!0),j=w.useRef(0),D=w.useCallback(async(Y,L)=>{const U=++j.current;E(!0);let at;try{at=await fm(Y,Wn,dm)}catch(P){if(j.current!==U)return;console.error(`[tome] Navigation failed for page: ${Y}`,P),at=null}if(j.current!==U)return;const lt=Wu(Y);if(L!=null&&L.replace?window.history.replaceState(null,"",lt):window.history.pushState(null,"",lt),p(Y),c(at),E(!1),!(L!=null&&L.skipScroll)){const P=window.location.hash.slice(1);P?requestAnimationFrame(()=>{const mt=document.getElementById(P);mt&&mt.scrollIntoView({behavior:"smooth",block:"start"})}):window.scrollTo(0,0)}},[]);w.useEffect(()=>{const Y=window.location.hash.slice(1);if(Y&&Wn.some(L=>L.id===Y)){const L=Wu(Y);window.history.replaceState(null,"",L),D(Y,{replace:!0})}else{const L=Wu(u);window.history.replaceState(null,"",L),lg.then(U=>{c(U),E(!1)})}},[]),w.useEffect(()=>{const Y=()=>{const L=ag(window.location.pathname);L&&L!==u&&D(L,{replace:!0,skipScroll:!0})};return window.addEventListener("popstate",Y),()=>window.removeEventListener("popstate",Y)},[u,D]);const z=w.useRef(null),[y,G]=w.useState(()=>{var L,U;if(typeof document>"u")return"light";if(document.documentElement.classList.contains("dark"))return"dark";const Y=((L=Jn.theme)==null?void 0:L.mode)||"auto";return Y==="dark"?"dark":Y==="light"?"light":(U=window.matchMedia)!=null&&U.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"});w.useEffect(()=>{const Y=new MutationObserver(()=>{const L=document.documentElement.classList.contains("dark");G(L?"dark":"light")});return Y.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>Y.disconnect()},[]),w.useEffect(()=>{const Y=document.querySelectorAll(".tome-mermaid[data-mermaid]");if(Y.length===0)return;let L=!1;const U="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs";return(async()=>{try{z.current||(z.current=(await import(U)).default);const at=z.current;if(L)return;const lt=y==="dark",P=getComputedStyle(document.documentElement).getPropertyValue("--font-body").trim()||"sans-serif";at.initialize({startOnLoad:!1,theme:lt?"dark":"default",fontFamily:P,flowchart:{padding:15,nodeSpacing:30,rankSpacing:40}});for(let mt=0;mt{lt.textContent="Failed to load diagram renderer",lt.style.cssText="padding:16px;color:var(--txM);font-size:13px;border:1px dashed var(--bd);border-radius:2px;text-align:center;"})}})(),()=>{L=!0}},[d,v,y]),w.useEffect(()=>{if(v)return;const Y=document.querySelectorAll(".tome-content pre"),L=[];return Y.forEach(U=>{if(U.querySelector(".tome-copy-btn"))return;const at=document.createElement("button");at.className="tome-copy-btn",at.textContent="Copy",at.addEventListener("click",async()=>{const lt=U.querySelector("code");if(lt)try{await navigator.clipboard.writeText(lt.textContent||""),at.textContent="Copied!",setTimeout(()=>{at.textContent="Copy"},2e3)}catch{at.textContent="Failed",setTimeout(()=>{at.textContent="Copy"},2e3)}}),U.appendChild(at),L.push(at)}),()=>{L.forEach(U=>U.remove())}},[d,v]);const R=Wn.map(Y=>({id:Y.id,title:Y.frontmatter.title,description:Y.frontmatter.description})),K=Wn.find(Y=>Y.id===u),nt=g0(K),xt=h0(Jn.editLink,K==null?void 0:K.filePath),Ot=(K==null?void 0:K.locale)||(Zu==null?void 0:Zu.defaultLocale)||"en",At="ltr";return w.useEffect(()=>{const Y=document.querySelectorAll(".tome-math[data-math]").length>0;if(!Jn.math&&!Y)return;const L="tome-katex-css";if(document.getElementById(L))return;const U=document.createElement("link");U.id=L,U.rel="stylesheet",U.href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css",U.crossOrigin="anonymous",document.head.appendChild(U)},[d,v]),w.useEffect(()=>{const Y=document.querySelectorAll(".tome-math[data-math]");if(Y.length===0)return;let L=!1;const U="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.mjs";return(async()=>{try{const at=(await import(U)).default;if(L)return;for(const lt of Y){const P=lt.getAttribute("data-math");if(P)try{const mt=atob(P),tt=lt.classList.contains("tome-math-block");at.render(mt,lt,{displayMode:tt,throwOnError:!1})}catch(mt){console.warn("[tome] KaTeX render failed:",mt)}}}catch(at){console.warn("[tome] Failed to load KaTeX from CDN:",at)}})(),()=>{L=!0}},[d,v]),s.jsxs(s.Fragment,{children:[s.jsx("style",{children:ng}),s.jsx(r0,{config:Jn,navigation:v0,currentPageId:u,pageHtml:d!=null&&d.isMdx?void 0:v?"":(d==null?void 0:d.html)||"

    Page not found

    ",pageComponent:d!=null&&d.isMdx?d.component:void 0,mdxComponents:eg,pageTitle:(d==null?void 0:d.frontmatter.title)||(v?"":"Not Found"),pageDescription:d==null?void 0:d.frontmatter.description,headings:(d==null?void 0:d.headings)||[],tocEnabled:(d==null?void 0:d.frontmatter.toc)!==!1,editUrl:xt,lastUpdated:K==null?void 0:K.lastUpdated,changelogEntries:d!=null&&d.isMdx||d==null?void 0:d.changelogEntries,apiManifest:!(d!=null&&d.isMdx)&&(d!=null&&d.isApiReference)?d.apiManifest:void 0,apiBaseUrl:(W=Jn.api)==null?void 0:W.baseUrl,apiPlayground:(I=Jn.api)==null?void 0:I.playground,apiAuth:(ct=Jn.api)==null?void 0:ct.auth,ApiReferenceComponent:H0,onNavigate:D,allPages:R,docContext:b0,versioning:void 0,currentVersion:nt,basePath:ko,isDraft:((Q=K==null?void 0:K.frontmatter)==null?void 0:Q.draft)===!0,dir:At,i18n:void 0,currentLocale:Ot,overrides:x0})]})}const om=document.getElementById("tome-root");om&&Bp.createRoot(om).render(s.jsx(ig,{})); +`,_o=(Jn.basePath||"/").replace(/\/$/,"");function lg(u){return cm(u,_o,Wn)}function Wu(u){return f0(u,_o,Wn)}const pm=p0(window.location.pathname,window.location.hash,Wn,_o,cm),ag=fm(pm,Wn,dm);function ig(){var W,I,ct,Q;const[u,p]=w.useState(pm),[d,c]=w.useState(null),[v,E]=w.useState(!0),j=w.useRef(0),D=w.useCallback(async(Y,L)=>{const U=++j.current;E(!0);let lt;try{lt=await fm(Y,Wn,dm)}catch(P){if(j.current!==U)return;console.error(`[tome] Navigation failed for page: ${Y}`,P),lt=null}if(j.current!==U)return;const at=Wu(Y);if(L!=null&&L.replace?window.history.replaceState(null,"",at):window.history.pushState(null,"",at),p(Y),c(lt),E(!1),!(L!=null&&L.skipScroll)){const P=window.location.hash.slice(1);P?requestAnimationFrame(()=>{const mt=document.getElementById(P);mt&&mt.scrollIntoView({behavior:"smooth",block:"start"})}):window.scrollTo(0,0)}},[]);w.useEffect(()=>{const Y=window.location.hash.slice(1);if(Y&&Wn.some(L=>L.id===Y)){const L=Wu(Y);window.history.replaceState(null,"",L),D(Y,{replace:!0})}else{const L=Wu(u);window.history.replaceState(null,"",L),ag.then(U=>{c(U),E(!1)})}},[]),w.useEffect(()=>{const Y=()=>{const L=lg(window.location.pathname);L&&L!==u&&D(L,{replace:!0,skipScroll:!0})};return window.addEventListener("popstate",Y),()=>window.removeEventListener("popstate",Y)},[u,D]);const C=w.useRef(null),[y,G]=w.useState(()=>{var L,U;if(typeof document>"u")return"light";if(document.documentElement.classList.contains("dark"))return"dark";const Y=((L=Jn.theme)==null?void 0:L.mode)||"auto";return Y==="dark"?"dark":Y==="light"?"light":(U=window.matchMedia)!=null&&U.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"});w.useEffect(()=>{const Y=new MutationObserver(()=>{const L=document.documentElement.classList.contains("dark");G(L?"dark":"light")});return Y.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>Y.disconnect()},[]),w.useEffect(()=>{const Y=document.querySelectorAll(".tome-mermaid[data-mermaid]");if(Y.length===0)return;let L=!1;const U="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs";return(async()=>{try{C.current||(C.current=(await import(U)).default);const lt=C.current;if(L)return;const at=y==="dark",P=getComputedStyle(document.documentElement).getPropertyValue("--font-body").trim()||"sans-serif";lt.initialize({startOnLoad:!1,theme:at?"dark":"default",fontFamily:P,flowchart:{padding:15,nodeSpacing:30,rankSpacing:40}});for(let mt=0;mt{at.textContent="Failed to load diagram renderer",at.style.cssText="padding:16px;color:var(--txM);font-size:13px;border:1px dashed var(--bd);border-radius:2px;text-align:center;"})}})(),()=>{L=!0}},[d,v,y]),w.useEffect(()=>{if(v)return;const Y=document.querySelectorAll(".tome-content pre"),L=[];return Y.forEach(U=>{if(U.querySelector(".tome-copy-btn"))return;const lt=document.createElement("button");lt.className="tome-copy-btn",lt.textContent="Copy",lt.addEventListener("click",async()=>{const at=U.querySelector("code");if(at)try{await navigator.clipboard.writeText(at.textContent||""),lt.textContent="Copied!",setTimeout(()=>{lt.textContent="Copy"},2e3)}catch{lt.textContent="Failed",setTimeout(()=>{lt.textContent="Copy"},2e3)}}),U.appendChild(lt),L.push(lt)}),()=>{L.forEach(U=>U.remove())}},[d,v]);const R=Wn.map(Y=>({id:Y.id,title:Y.frontmatter.title,description:Y.frontmatter.description})),K=Wn.find(Y=>Y.id===u),nt=g0(K),xt=h0(Jn.editLink,K==null?void 0:K.filePath),Ot=(K==null?void 0:K.locale)||(Zu==null?void 0:Zu.defaultLocale)||"en",At="ltr";return w.useEffect(()=>{const Y=document.querySelectorAll(".tome-math[data-math]").length>0;if(!Jn.math&&!Y)return;const L="tome-katex-css";if(document.getElementById(L))return;const U=document.createElement("link");U.id=L,U.rel="stylesheet",U.href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css",U.crossOrigin="anonymous",document.head.appendChild(U)},[d,v]),w.useEffect(()=>{const Y=document.querySelectorAll(".tome-math[data-math]");if(Y.length===0)return;let L=!1;const U="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.mjs";return(async()=>{try{const lt=(await import(U)).default;if(L)return;for(const at of Y){const P=at.getAttribute("data-math");if(P)try{const mt=atob(P),tt=at.classList.contains("tome-math-block");lt.render(mt,at,{displayMode:tt,throwOnError:!1})}catch(mt){console.warn("[tome] KaTeX render failed:",mt)}}}catch(lt){console.warn("[tome] Failed to load KaTeX from CDN:",lt)}})(),()=>{L=!0}},[d,v]),s.jsxs(s.Fragment,{children:[s.jsx("style",{children:ng}),s.jsx(r0,{config:Jn,navigation:v0,currentPageId:u,pageHtml:d!=null&&d.isMdx?void 0:v?"":(d==null?void 0:d.html)||"

    Page not found

    ",pageComponent:d!=null&&d.isMdx?d.component:void 0,mdxComponents:eg,pageTitle:(d==null?void 0:d.frontmatter.title)||(v?"":"Not Found"),pageDescription:d==null?void 0:d.frontmatter.description,headings:(d==null?void 0:d.headings)||[],tocEnabled:(d==null?void 0:d.frontmatter.toc)!==!1,editUrl:xt,lastUpdated:K==null?void 0:K.lastUpdated,changelogEntries:d!=null&&d.isMdx||d==null?void 0:d.changelogEntries,apiManifest:!(d!=null&&d.isMdx)&&(d!=null&&d.isApiReference)?d.apiManifest:void 0,apiBaseUrl:(W=Jn.api)==null?void 0:W.baseUrl,apiPlayground:(I=Jn.api)==null?void 0:I.playground,apiAuth:(ct=Jn.api)==null?void 0:ct.auth,ApiReferenceComponent:H0,onNavigate:D,allPages:R,docContext:b0,versioning:void 0,currentVersion:nt,basePath:_o,isDraft:((Q=K==null?void 0:K.frontmatter)==null?void 0:Q.draft)===!0,dir:At,i18n:void 0,currentLocale:Ot,overrides:x0})]})}const om=document.getElementById("tome-root");om&&Bp.createRoot(om).render(s.jsx(ig,{})); diff --git a/cli/commands/index.html b/cli/commands/index.html index 489254c1..6d639578 100644 --- a/cli/commands/index.html +++ b/cli/commands/index.html @@ -7,7 +7,7 @@ - + @@ -66,6 +66,26 @@ kit install --all # Install all extensions without prompting kit skill # Install the Kit extensions skill via skills.sh ``` +### Skills CLI flags + +Control which skills are loaded at startup: + +```bash +# Load a specific skill file +kit --skill path/to/skill.md "prompt" + +# Load multiple skill files or directories (flag is repeatable) +kit --skill ./skill1.md --skill ./skill2.md "prompt" + +# Load all skills from a custom directory instead of the default locations +kit --skills-dir /path/to/skills "prompt" + +# Disable all skill loading (auto-discovery and explicit) +kit --no-skills "prompt" +``` + +Skills are auto-discovered from `~/.config/kit/skills/`, `.kit/skills/`, and `.agents/skills/` by default. Use `--skills-dir` to override the project-local search root, or `--skill` to load files explicitly (which disables auto-discovery). `--no-skills` suppresses all skill loading regardless of other flags. + ## Interactive slash commands These commands are available inside the Kit TUI during an interactive session: diff --git a/cli/flags/index.html b/cli/flags/index.html index 2b62058c..1533ec73 100644 --- a/cli/flags/index.html +++ b/cli/flags/index.html @@ -7,7 +7,7 @@ - + @@ -58,6 +58,14 @@ These flags control Kit's behavior. When a prompt is passed as a positional argu | `--prompt-template` | — | — | Load a specific prompt template by name | | `--no-prompt-templates` | — | `false` | Disable prompt template loading | +## Skills + +| Flag | Short | Default | Description | +|------|-------|---------|-------------| +| `--skill` | — | — | Load skill file or directory (repeatable) | +| `--skills-dir` | — | — | Override the project-local skills directory for auto-discovery | +| `--no-skills` | — | `false` | Disable skill loading (auto-discovery and explicit) | + ## Generation parameters | Flag | Short | Default | Description | diff --git a/configuration/index.html b/configuration/index.html index 4040cabf..107841e6 100644 --- a/configuration/index.html +++ b/configuration/index.html @@ -7,7 +7,7 @@ - + @@ -57,6 +57,9 @@ stream: true | `theme` | object or string | — | UI theme ([inline overrides or file path](/themes)) | | `prompt-templates` | bool | `true` | Enable prompt template loading | | `prompt-template` | string | — | Specific template to load by name | +| `no-skills` | bool | `false` | Disable skill loading (auto-discovery and explicit) | +| `skill` | list | — | Explicit skill files or directories to load (disables auto-discovery) | +| `skills-dir` | string | — | Override the project-local directory used for skill auto-discovery | ## Environment variables diff --git a/development/index.html b/development/index.html index 5da7afb4..0202ff95 100644 --- a/development/index.html +++ b/development/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/capabilities/index.html b/extensions/capabilities/index.html index 72ade0d0..2152d955 100644 --- a/extensions/capabilities/index.html +++ b/extensions/capabilities/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/examples/index.html b/extensions/examples/index.html index ca0a6c71..ab67409e 100644 --- a/extensions/examples/index.html +++ b/extensions/examples/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/loading/index.html b/extensions/loading/index.html index 6ad8d83e..656bb550 100644 --- a/extensions/loading/index.html +++ b/extensions/loading/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/overview/index.html b/extensions/overview/index.html index 3681e22b..4e6ad493 100644 --- a/extensions/overview/index.html +++ b/extensions/overview/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/testing/index.html b/extensions/testing/index.html index 52742a3f..93a1c176 100644 --- a/extensions/testing/index.html +++ b/extensions/testing/index.html @@ -7,7 +7,7 @@ - + diff --git a/index.html b/index.html index 50653384..d71b4f2e 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; } - + diff --git a/installation/index.html b/installation/index.html index debacc75..0b1af8bf 100644 --- a/installation/index.html +++ b/installation/index.html @@ -7,7 +7,7 @@ - + diff --git a/llms-full.txt b/llms-full.txt index fafb7c88..2dd5fe7b 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -397,6 +397,26 @@ kit install --all # Install all extensions without prompting kit skill # Install the Kit extensions skill via skills.sh ``` +### Skills CLI flags + +Control which skills are loaded at startup: + +```bash +# Load a specific skill file +kit --skill path/to/skill.md "prompt" + +# Load multiple skill files or directories (flag is repeatable) +kit --skill ./skill1.md --skill ./skill2.md "prompt" + +# Load all skills from a custom directory instead of the default locations +kit --skills-dir /path/to/skills "prompt" + +# Disable all skill loading (auto-discovery and explicit) +kit --no-skills "prompt" +``` + +Skills are auto-discovered from `~/.config/kit/skills/`, `.kit/skills/`, and `.agents/skills/` by default. Use `--skills-dir` to override the project-local search root, or `--skill` to load files explicitly (which disables auto-discovery). `--no-skills` suppresses all skill loading regardless of other flags. + ## Interactive slash commands These commands are available inside the Kit TUI during an interactive session: @@ -572,6 +592,14 @@ These flags control Kit's behavior. When a prompt is passed as a positional argu | `--prompt-template` | — | — | Load a specific prompt template by name | | `--no-prompt-templates` | — | `false` | Disable prompt template loading | +## Skills + +| Flag | Short | Default | Description | +|------|-------|---------|-------------| +| `--skill` | — | — | Load skill file or directory (repeatable) | +| `--skills-dir` | — | — | Override the project-local skills directory for auto-discovery | +| `--no-skills` | — | `false` | Disable skill loading (auto-discovery and explicit) | + ## Generation parameters | Flag | Short | Default | Description | @@ -641,6 +669,9 @@ stream: true | `theme` | object or string | — | UI theme ([inline overrides or file path](/themes)) | | `prompt-templates` | bool | `true` | Enable prompt template loading | | `prompt-template` | string | — | Specific template to load by name | +| `no-skills` | bool | `false` | Disable skill loading (auto-discovery and explicit) | +| `skill` | list | — | Explicit skill files or directories to load (disables auto-discovery) | +| `skills-dir` | string | — | Override the project-local directory used for skill auto-discovery | ## Environment variables diff --git a/mcp.json b/mcp.json index 3534c58d..164e1eaf 100644 --- a/mcp.json +++ b/mcp.json @@ -56,6 +56,7 @@ "Extension management", "Installing extensions from git", "Skills", + "Skills CLI flags", "Interactive slash commands", "Prompt history", "Cancelling operations", @@ -70,7 +71,7 @@ "ACP server" ], "tags": [], - "content": "\n# Commands\n\n## Authentication\n\nFor OAuth-enabled providers like Anthropic.\n\n```bash\nkit auth login [provider] # Start OAuth flow (e.g., anthropic)\nkit auth login [provider] --set-default # Set provider's default model as system default\nkit auth logout [provider] # Remove credentials for provider\nkit auth status # Check authentication status\n```\n\n## Model database\n\nManage the local model database that maps provider names to API configurations.\n\n```bash\nkit models [provider] # List available models (optionally filter by provider)\nkit models --all # Show all providers (not just LLM-compatible)\nkit update-models [source] # Update model database\n```\n\nThe `update-models` command accepts an optional source argument:\n- *(none)* — update from [models.dev](https://models.dev)\n- A URL — fetch from a custom endpoint\n- A file path — load from a local file\n- `embedded` — reset to the bundled database\n\n## Extension management\n\n```bash\nkit extensions list # List discovered extensions\nkit extensions validate # Validate extension files\nkit extensions init # Generate example extension template\n```\n\n### Installing extensions from git\n\n```bash\nkit install # Install extensions from git repositories\nkit install -l # Install to project-local .kit/git/ directory\nkit install -u # Update an already-installed package\nkit install --uninstall # Remove an installed package\nkit install --all # Install all extensions without prompting\n```\n\n## Skills\n\n```bash\nkit skill # Install the Kit extensions skill via skills.sh\n```\n\n## Interactive slash commands\n\nThese commands are available inside the Kit TUI during an interactive session:\n\n| Command | Description |\n|---------|-------------|\n| `/help` | Show available commands |\n| `/tools` | List available MCP tools |\n| `/servers` | Show connected MCP servers |\n| `/model [name]` | Switch model or open model selector |\n| `/theme [name]` | Switch color theme or list available themes |\n| `/thinking [level]` | Set thinking level (off, none, minimal, low, medium, high) |\n| `/compact [focus]` | Summarize older messages to free context |\n| `/clear` | Clear conversation |\n| `/clear-queue` | Clear queued messages |\n| `/usage` | Show token usage |\n| `/reset-usage` | Reset usage statistics |\n| `/tree` | Navigate session tree |\n| `/fork` | Fork to new session from an earlier message |\n| `/new` | Start a new session (creates new session file) |\n| `/name [name]` | Set or show session display name |\n| `/resume` | Open session picker to switch sessions (alias: `/r`) |\n| `/session` | Show session info |\n| `/export [path]` | Export session as JSONL (default: auto-generated path) |\n| `/import ` | Import a session from a JSONL file |\n| `/share` | Upload session to GitHub Gist and get a shareable viewer URL |\n| `/quit` | Exit Kit |\n\n### Prompt history\n\nUse **↑** and **↓** arrow keys to navigate through previously submitted prompts. Kit keeps the last 100 entries. Consecutive duplicates are skipped.\n\n### Cancelling operations\n\nPress **ESC twice** to cancel the current operation:\n- During a tool call: rolls back the entire turn to maintain API message pairing\n- During streaming: stops the response generation\n\nThis ensures that `tool_use` and `tool_result` messages are always sent to the API as matched pairs, avoiding errors from orphaned tool calls.\n\n### External editor\n\nPress **Ctrl+X e** to open your `$VISUAL` or `$EDITOR` in a temporary file pre-populated with the current input text. On save and quit, the edited content replaces the input textarea. On error exit (e.g., `:cq` in Vim), the original input is preserved.\n\n### Mid-turn steering\n\nPress **Ctrl+X s** during streaming to inject a system-level instruction mid-turn. This allows you to steer the conversation direction without waiting for the model to finish:\n\n- Works during streaming output\n- Sends a steering instruction as a system message\n- Model continues from the interruption point with the new guidance\n\nExample: While the model is writing code, press Ctrl+X s and type \"Use async/await instead\" to change the implementation approach.\n\n### Image attachments\n\nAttach images to your next prompt straight from the clipboard:\n\n- Copy an image (e.g. a screenshot) to the system clipboard, then press **Ctrl+V** in the input to attach it.\n- Press **Ctrl+U** to clear all pending image attachments.\n- Attachments are sent alongside your text when you submit, and cleared afterward.\n\nWhen a terminal supports color, Kit renders a small low-resolution **thumbnail preview** of each pending image directly in the input, below the `[N image(s) attached]` indicator, so you can confirm the right image was attached before sending.\n\nThe preview is drawn with Unicode half-block characters and ordinary terminal colors — not a graphics protocol — so it renders correctly inside terminal multiplexers like **tmux** and **zellij**. Thumbnails are capped to a small cell box for a glanceable, low-res look.\n\n- Best fidelity needs a **truecolor** terminal (`COLORTERM=truecolor`); Kit degrades to 256-color where truecolor is unavailable.\n- On terminals with neither, the preview is skipped and the `[N image(s) attached]` text indicator is shown alone.\n\nYou can also attach image files by referencing them with `@path/to/image.png` — binary files are auto-detected by MIME type. See [Quick Start](/quick-start) for the `@` attachment syntax.\n\n## Prompt templates\n\n### Creating templates\n\nTemplates use YAML frontmatter for metadata and support argument placeholders:\n\n```markdown\n---\ndescription: Review code for issues\n---\nReview the following code for bugs and security issues.\nFocus on $1 specifically.\n```\n\nSave to `~/.kit/prompts/review.md` or `.kit/prompts/review.md`.\n\n### Using templates\n\nTemplates appear as slash commands:\n\n```\n/review error handling\n```\n\n### Argument placeholders\n\n| Placeholder | Description |\n|-------------|-------------|\n| `$1`, `$2`, etc. | Individual arguments by position |\n| `$@`, `$ARGUMENTS` | All arguments joined with spaces (zero or more) |\n| `$+` | All arguments joined with spaces (one or more required) |\n| `${@:N}` | Arguments from position N onwards |\n| `${@:N:L}` | L arguments starting at position N |\n\nPlaceholders inside fenced code blocks (`` ``` ``) and inline code spans are ignored, so documentation examples won't be substituted.\n\n### CLI flags\n\n```bash\n# Load a specific template by name\nkit --prompt-template review\n\n# Disable template loading\nkit --no-prompt-templates\n```\n\n## ACP server\n\nRun Kit as an [ACP (Agent Client Protocol)](https://agentclientprotocol.com) agent server. ACP-compatible clients communicate with Kit over JSON-RPC 2.0 on stdin/stdout.\n\n```bash\nkit acp # Start as ACP agent\nkit acp --debug # With debug logging to stderr\n```\n" + "content": "\n# Commands\n\n## Authentication\n\nFor OAuth-enabled providers like Anthropic.\n\n```bash\nkit auth login [provider] # Start OAuth flow (e.g., anthropic)\nkit auth login [provider] --set-default # Set provider's default model as system default\nkit auth logout [provider] # Remove credentials for provider\nkit auth status # Check authentication status\n```\n\n## Model database\n\nManage the local model database that maps provider names to API configurations.\n\n```bash\nkit models [provider] # List available models (optionally filter by provider)\nkit models --all # Show all providers (not just LLM-compatible)\nkit update-models [source] # Update model database\n```\n\nThe `update-models` command accepts an optional source argument:\n- *(none)* — update from [models.dev](https://models.dev)\n- A URL — fetch from a custom endpoint\n- A file path — load from a local file\n- `embedded` — reset to the bundled database\n\n## Extension management\n\n```bash\nkit extensions list # List discovered extensions\nkit extensions validate # Validate extension files\nkit extensions init # Generate example extension template\n```\n\n### Installing extensions from git\n\n```bash\nkit install # Install extensions from git repositories\nkit install -l # Install to project-local .kit/git/ directory\nkit install -u # Update an already-installed package\nkit install --uninstall # Remove an installed package\nkit install --all # Install all extensions without prompting\n```\n\n## Skills\n\n```bash\nkit skill # Install the Kit extensions skill via skills.sh\n```\n\n### Skills CLI flags\n\nControl which skills are loaded at startup:\n\n```bash\n# Load a specific skill file\nkit --skill path/to/skill.md \"prompt\"\n\n# Load multiple skill files or directories (flag is repeatable)\nkit --skill ./skill1.md --skill ./skill2.md \"prompt\"\n\n# Load all skills from a custom directory instead of the default locations\nkit --skills-dir /path/to/skills \"prompt\"\n\n# Disable all skill loading (auto-discovery and explicit)\nkit --no-skills \"prompt\"\n```\n\nSkills are auto-discovered from `~/.config/kit/skills/`, `.kit/skills/`, and `.agents/skills/` by default. Use `--skills-dir` to override the project-local search root, or `--skill` to load files explicitly (which disables auto-discovery). `--no-skills` suppresses all skill loading regardless of other flags.\n\n## Interactive slash commands\n\nThese commands are available inside the Kit TUI during an interactive session:\n\n| Command | Description |\n|---------|-------------|\n| `/help` | Show available commands |\n| `/tools` | List available MCP tools |\n| `/servers` | Show connected MCP servers |\n| `/model [name]` | Switch model or open model selector |\n| `/theme [name]` | Switch color theme or list available themes |\n| `/thinking [level]` | Set thinking level (off, none, minimal, low, medium, high) |\n| `/compact [focus]` | Summarize older messages to free context |\n| `/clear` | Clear conversation |\n| `/clear-queue` | Clear queued messages |\n| `/usage` | Show token usage |\n| `/reset-usage` | Reset usage statistics |\n| `/tree` | Navigate session tree |\n| `/fork` | Fork to new session from an earlier message |\n| `/new` | Start a new session (creates new session file) |\n| `/name [name]` | Set or show session display name |\n| `/resume` | Open session picker to switch sessions (alias: `/r`) |\n| `/session` | Show session info |\n| `/export [path]` | Export session as JSONL (default: auto-generated path) |\n| `/import ` | Import a session from a JSONL file |\n| `/share` | Upload session to GitHub Gist and get a shareable viewer URL |\n| `/quit` | Exit Kit |\n\n### Prompt history\n\nUse **↑** and **↓** arrow keys to navigate through previously submitted prompts. Kit keeps the last 100 entries. Consecutive duplicates are skipped.\n\n### Cancelling operations\n\nPress **ESC twice** to cancel the current operation:\n- During a tool call: rolls back the entire turn to maintain API message pairing\n- During streaming: stops the response generation\n\nThis ensures that `tool_use` and `tool_result` messages are always sent to the API as matched pairs, avoiding errors from orphaned tool calls.\n\n### External editor\n\nPress **Ctrl+X e** to open your `$VISUAL` or `$EDITOR` in a temporary file pre-populated with the current input text. On save and quit, the edited content replaces the input textarea. On error exit (e.g., `:cq` in Vim), the original input is preserved.\n\n### Mid-turn steering\n\nPress **Ctrl+X s** during streaming to inject a system-level instruction mid-turn. This allows you to steer the conversation direction without waiting for the model to finish:\n\n- Works during streaming output\n- Sends a steering instruction as a system message\n- Model continues from the interruption point with the new guidance\n\nExample: While the model is writing code, press Ctrl+X s and type \"Use async/await instead\" to change the implementation approach.\n\n### Image attachments\n\nAttach images to your next prompt straight from the clipboard:\n\n- Copy an image (e.g. a screenshot) to the system clipboard, then press **Ctrl+V** in the input to attach it.\n- Press **Ctrl+U** to clear all pending image attachments.\n- Attachments are sent alongside your text when you submit, and cleared afterward.\n\nWhen a terminal supports color, Kit renders a small low-resolution **thumbnail preview** of each pending image directly in the input, below the `[N image(s) attached]` indicator, so you can confirm the right image was attached before sending.\n\nThe preview is drawn with Unicode half-block characters and ordinary terminal colors — not a graphics protocol — so it renders correctly inside terminal multiplexers like **tmux** and **zellij**. Thumbnails are capped to a small cell box for a glanceable, low-res look.\n\n- Best fidelity needs a **truecolor** terminal (`COLORTERM=truecolor`); Kit degrades to 256-color where truecolor is unavailable.\n- On terminals with neither, the preview is skipped and the `[N image(s) attached]` text indicator is shown alone.\n\nYou can also attach image files by referencing them with `@path/to/image.png` — binary files are auto-detected by MIME type. See [Quick Start](/quick-start) for the `@` attachment syntax.\n\n## Prompt templates\n\n### Creating templates\n\nTemplates use YAML frontmatter for metadata and support argument placeholders:\n\n```markdown\n---\ndescription: Review code for issues\n---\nReview the following code for bugs and security issues.\nFocus on $1 specifically.\n```\n\nSave to `~/.kit/prompts/review.md` or `.kit/prompts/review.md`.\n\n### Using templates\n\nTemplates appear as slash commands:\n\n```\n/review error handling\n```\n\n### Argument placeholders\n\n| Placeholder | Description |\n|-------------|-------------|\n| `$1`, `$2`, etc. | Individual arguments by position |\n| `$@`, `$ARGUMENTS` | All arguments joined with spaces (zero or more) |\n| `$+` | All arguments joined with spaces (one or more required) |\n| `${@:N}` | Arguments from position N onwards |\n| `${@:N:L}` | L arguments starting at position N |\n\nPlaceholders inside fenced code blocks (`` ``` ``) and inline code spans are ignored, so documentation examples won't be substituted.\n\n### CLI flags\n\n```bash\n# Load a specific template by name\nkit --prompt-template review\n\n# Disable template loading\nkit --no-prompt-templates\n```\n\n## ACP server\n\nRun Kit as an [ACP (Agent Client Protocol)](https://agentclientprotocol.com) agent server. ACP-compatible clients communicate with Kit over JSON-RPC 2.0 on stdin/stdout.\n\n```bash\nkit acp # Start as ACP agent\nkit acp --debug # With debug logging to stderr\n```\n" }, { "url": "/cli/flags", @@ -81,11 +82,12 @@ "Session management", "Behavior", "Extensions", + "Skills", "Generation parameters", "System" ], "tags": [], - "content": "\n# Global Flags\n\nAll flags can be passed to the root `kit` command.\n\n## Model and provider\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--model` | `-m` | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `--provider-api-key` | — | — | API key for the provider |\n| `--provider-url` | — | — | Base URL for provider API |\n| `--tls-skip-verify` | — | `false` | Skip TLS certificate verification |\n\n## Session management\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--session` | `-s` | — | Open specific JSONL session file |\n| `--continue` | `-c` | `false` | Resume most recent session for current directory |\n| `--resume` | `-r` | `false` | Interactive session picker |\n| `--no-session` | — | `false` | Ephemeral mode, no persistence |\n\n## Behavior\n\nThese flags control Kit's behavior. When a prompt is passed as a positional argument, Kit runs in non-interactive mode.\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--quiet` | — | `false` | Suppress all output (non-interactive only) |\n| `--json` | — | `false` | Output response as JSON (non-interactive only) |\n| `--no-exit` | — | `false` | Enter interactive mode after prompt completes |\n| `--max-steps` | — | `0` | Maximum agent steps (0 for unlimited) |\n| `--stream` | — | `true` | Enable streaming output |\n| `--compact` | — | `false` | Enable compact output mode |\n| `--auto-compact` | — | `false` | Auto-compact conversation near context limit |\n\n## Extensions\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--extension` | `-e` | — | Load additional extension file(s) (repeatable) |\n| `--no-extensions` | — | `false` | Disable all extensions |\n| `--prompt-template` | — | — | Load a specific prompt template by name |\n| `--no-prompt-templates` | — | `false` | Disable prompt template loading |\n\n## Generation parameters\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--max-tokens` | — | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model's catalog ceiling is higher and no explicit value is set. |\n| `--temperature` | — | `0.7` | Randomness 0.0–1.0 |\n| `--top-p` | — | `0.95` | Nucleus sampling 0.0–1.0 |\n| `--top-k` | — | `40` | Limit top K tokens |\n| `--stop-sequences` | — | — | Custom stop sequences (comma-separated) |\n| `--frequency-penalty` | — | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `--presence-penalty` | — | `0.0` | Penalize present tokens (0.0–2.0) |\n| `--thinking-level` | — | `off` | Extended thinking level: off, none, minimal, low, medium, high |\n\n## System\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--config` | — | `~/.kit.yml` | Config file path |\n| `--system-prompt` | — | — | System prompt text or file path |\n| `--debug` | — | `false` | Enable debug logging |\n" + "content": "\n# Global Flags\n\nAll flags can be passed to the root `kit` command.\n\n## Model and provider\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--model` | `-m` | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `--provider-api-key` | — | — | API key for the provider |\n| `--provider-url` | — | — | Base URL for provider API |\n| `--tls-skip-verify` | — | `false` | Skip TLS certificate verification |\n\n## Session management\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--session` | `-s` | — | Open specific JSONL session file |\n| `--continue` | `-c` | `false` | Resume most recent session for current directory |\n| `--resume` | `-r` | `false` | Interactive session picker |\n| `--no-session` | — | `false` | Ephemeral mode, no persistence |\n\n## Behavior\n\nThese flags control Kit's behavior. When a prompt is passed as a positional argument, Kit runs in non-interactive mode.\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--quiet` | — | `false` | Suppress all output (non-interactive only) |\n| `--json` | — | `false` | Output response as JSON (non-interactive only) |\n| `--no-exit` | — | `false` | Enter interactive mode after prompt completes |\n| `--max-steps` | — | `0` | Maximum agent steps (0 for unlimited) |\n| `--stream` | — | `true` | Enable streaming output |\n| `--compact` | — | `false` | Enable compact output mode |\n| `--auto-compact` | — | `false` | Auto-compact conversation near context limit |\n\n## Extensions\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--extension` | `-e` | — | Load additional extension file(s) (repeatable) |\n| `--no-extensions` | — | `false` | Disable all extensions |\n| `--prompt-template` | — | — | Load a specific prompt template by name |\n| `--no-prompt-templates` | — | `false` | Disable prompt template loading |\n\n## Skills\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--skill` | — | — | Load skill file or directory (repeatable) |\n| `--skills-dir` | — | — | Override the project-local skills directory for auto-discovery |\n| `--no-skills` | — | `false` | Disable skill loading (auto-discovery and explicit) |\n\n## Generation parameters\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--max-tokens` | — | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model's catalog ceiling is higher and no explicit value is set. |\n| `--temperature` | — | `0.7` | Randomness 0.0–1.0 |\n| `--top-p` | — | `0.95` | Nucleus sampling 0.0–1.0 |\n| `--top-k` | — | `40` | Limit top K tokens |\n| `--stop-sequences` | — | — | Custom stop sequences (comma-separated) |\n| `--frequency-penalty` | — | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `--presence-penalty` | — | `0.0` | Penalize present tokens (0.0–2.0) |\n| `--thinking-level` | — | `off` | Extended thinking level: off, none, minimal, low, medium, high |\n\n## System\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--config` | — | `~/.kit.yml` | Config file path |\n| `--system-prompt` | — | — | System prompt text or file path |\n| `--debug` | — | `false` | Enable debug logging |\n" }, { "url": "/configuration", @@ -107,7 +109,7 @@ "Preferences persistence" ], "tags": [], - "content": "\n# Configuration\n\nKit looks for configuration in the following locations, in order of priority:\n\n1. CLI flags\n2. Environment variables (with `KIT_` prefix)\n3. `./.kit.yml` / `./.kit.yaml` / `./.kit.json` (project-local)\n4. `~/.kit.yml` / `~/.kit.yaml` / `~/.kit.json` (global)\n\n## Basic configuration\n\nCreate `~/.kit.yml`:\n\n```yaml\nmodel: anthropic/claude-sonnet-latest\nmax-tokens: 8192\ntemperature: 0.7\nstream: true\n```\n\n## All configuration keys\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `model` | string | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `max-tokens` | int | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model's catalog ceiling is higher and no explicit value is set. Use [`modelSettings[provider/model].maxTokens`](#per-model-settings) to override per-model. |\n| `temperature` | float | `0.7` | Randomness 0.0–1.0 |\n| `top-p` | float | `0.95` | Nucleus sampling 0.0–1.0 |\n| `top-k` | int | `40` | Limit top K tokens |\n| `stream` | bool | `true` | Enable streaming output |\n| `debug` | bool | `false` | Enable debug logging |\n| `compact` | bool | `false` | Enable compact output mode |\n| `system-prompt` | string | — | System prompt text or file path |\n| `max-steps` | int | `0` | Maximum agent steps (0 = unlimited) |\n| `thinking-level` | string | `off` | Extended thinking: off, none, minimal, low, medium, high |\n| `provider-api-key` | string | — | API key for the provider |\n| `provider-url` | string | — | Base URL for provider API |\n| `tls-skip-verify` | bool | `false` | Skip TLS certificate verification |\n| `frequency-penalty` | float | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `presence-penalty` | float | `0.0` | Penalize present tokens (0.0–2.0) |\n| `stop-sequences` | list | — | Custom stop sequences |\n| `theme` | object or string | — | UI theme ([inline overrides or file path](/themes)) |\n| `prompt-templates` | bool | `true` | Enable prompt template loading |\n| `prompt-template` | string | — | Specific template to load by name |\n\n## Environment variables\n\nAny configuration key can be set via environment variable with the `KIT_` prefix. Hyphens become underscores:\n\n```bash\nexport KIT_MODEL=\"openai/gpt-4o\"\nexport KIT_MAX_TOKENS=\"8192\"\nexport KIT_TEMPERATURE=\"0.5\"\n```\n\nProvider API keys use their own environment variables:\n\n```bash\nexport ANTHROPIC_API_KEY=\"sk-...\"\nexport OPENAI_API_KEY=\"sk-...\"\nexport GOOGLE_API_KEY=\"...\"\n```\n\n## MCP server configuration\n\nAdd external MCP servers to your `.kit.yml`:\n\n```yaml\nmcpServers:\n filesystem:\n type: local\n command: [\"npx\", \"-y\", \"@modelcontextprotocol/server-filesystem\", \"/path/to/allowed\"]\n environment:\n LOG_LEVEL: \"info\"\n allowedTools: [\"read_file\", \"write_file\"]\n excludedTools: [\"delete_file\"]\n\n search:\n type: remote\n url: \"https://mcp.example.com/search\"\n\n pubmed:\n type: remote\n url: \"https://pubmed.mcp.example.com\"\n noOAuth: true # skip OAuth for public servers\n headers:\n - \"ApiKey: ${env://API_KEY}\" # required env var\n - \"X-Tenant: ${env://TENANT_ID:-default}\" # with fallback default\n\n builds:\n type: remote\n url: \"https://builds.mcp.example.com\"\n tasksMode: always # always run tools/call as async tasks (Phase 1 MVP)\n```\n\n### MCP server fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `type` | string | `local` (stdio) or `remote` (streamable HTTP) |\n| `command` | list | Command and args for local servers |\n| `environment` | map | Environment variables for the server process |\n| `url` | string | URL for remote servers |\n| `allowedTools` | list | Whitelist of tool names to expose |\n| `excludedTools` | list | Blacklist of tool names to hide |\n| `noOAuth` | bool | Skip OAuth for this server (for public servers that don't require auth) |\n| `headers` | list of strings | HTTP headers to attach to every request, each as a `\"Key: Value\"` string. Values support env-substitution: `${env://VAR}` or `${env://VAR:-default}`. |\n| `tasksMode` | string | When to augment `tools/call` with MCP task metadata: `auto` (default — only when the server advertises task support), `never`, or `always`. See [MCP tasks](#mcp-tasks-long-running-tools). |\n\nA legacy format with `transport`, `args`, and `env` fields is also supported; `headers` works in both the current and legacy formats.\n\n### MCP tasks (long-running tools)\n\nKit advertises [MCP task support](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks)\nduring `initialize` so servers can respond to `tools/call` with a\n`CreateTaskResult` (a task ID + `working` status) instead of blocking until\nthe operation finishes. Kit then polls `tasks/get` / `tasks/result` until the\ntask reaches a terminal state, and best-effort `tasks/cancel`s on context\ncancellation.\n\nThis avoids HTTP/SSE proxy timeouts on long builds, deploys, and batch jobs,\nand lets the user/agent abort cleanly with Ctrl-C.\n\n**Per-server `tasksMode`:**\n\n| Value | Behaviour |\n|-------|-----------|\n| `auto` (default) | Augment `tools/call` with task metadata only when the server advertised `tasks/toolCalls` capability. Servers that don't advertise it run synchronously, exactly as before. |\n| `never` | Always issue `tools/call` synchronously, regardless of server capability. |\n| `always` | Always opt into task augmentation, even when the server didn't advertise the capability. The server may still respond synchronously — this just expresses client intent unconditionally. |\n\nDefaults are safe: any existing MCP server keeps its previous behaviour\nbit-for-bit. SDK consumers can also override the mode programmatically and\nplug in a progress callback — see [SDK options](/sdk/options#mcp-tasks).\n\n## Custom models\n\nDefine custom models in your `.kit.yml` for use with the `custom` provider. This is useful for self-hosted models or API endpoints not in the built-in database:\n\n```yaml\ncustomModels:\n my-model:\n name: \"My Custom Model\"\n baseUrl: \"http://localhost:8080/v1\"\n apiKey: \"my-secret-key\"\n reasoning: true\n temperature: true\n cost:\n input: 0.002\n output: 0.004\n limit:\n context: 128000\n output: 32000\n```\n\n### Custom model fields\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `name` | string | Yes | Display name for the model |\n| `baseUrl` | string | No | Per-model base URL override; when set, `--provider-url` is not required |\n| `apiKey` | string | No | Per-model API key override |\n| `reasoning` | bool | No | Whether the model supports reasoning/thinking |\n| `temperature` | bool | No | Whether the model supports temperature adjustment |\n| `cost.input` | float | No | Cost per 1K input tokens |\n| `cost.output` | float | No | Cost per 1K output tokens |\n| `limit.context` | int | Yes | Maximum context window in tokens |\n| `limit.output` | int | No | Maximum output tokens |\n\nUse with a per-model `baseUrl` (no `--provider-url` needed):\n\n```bash\nkit --model custom/my-model \"Hello\"\n```\n\nOr override the base URL at runtime:\n\n```bash\nkit --provider-url \"http://localhost:8080/v1\" --model custom/my-model \"Hello\"\n```\n\nWhen `--provider-url` is specified without `--model`, Kit defaults to `custom/custom` which has zero cost tracking and a 262K context window.\n\n## Per-model settings\n\nOverride generation parameters and system prompt on a per-model basis using `modelSettings`:\n\n```yaml\nmodelSettings:\n anthropic/claude-sonnet-4-5-20250929:\n temperature: 0.3\n maxTokens: 8192\n systemPrompt: \"You are a concise coding assistant.\"\n openai/gpt-4o:\n temperature: 0.7\n frequencyPenalty: 0.5\n```\n\n### Per-model fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `temperature` | float | Temperature override for this model |\n| `maxTokens` | int | Max output tokens override |\n| `topP` | float | Top-p override |\n| `topK` | int | Top-k override |\n| `frequencyPenalty` | float | Frequency penalty override |\n| `presencePenalty` | float | Presence penalty override |\n| `stopSequences` | list | Stop sequences override |\n| `thinkingLevel` | string | Thinking level override |\n| `systemPrompt` | string | Per-model system prompt (used when no explicit prompt is set) |\n\nSettings from `modelSettings` and `customModels.params` act as model-level defaults — explicit CLI flags, `KIT_*` environment variables, global config values, and SDK `Options.*` fields all take precedence over them.\n\nWhen switching models via `/model` or `SetModel()`, if the new model has a per-model system prompt and no custom global prompt was set, the per-model prompt automatically replaces the previous one.\n\n### Precedence summary\n\nFor the generation and provider parameters documented above, the resolved value at runtime comes from the first source that sets it:\n\n1. CLI flag (e.g. `--max-tokens`, `--temperature`, `--provider-api-key`)\n2. SDK `Options.X` when embedding Kit as a library (`kit.Options.MaxTokens`, `Temperature`, `ProviderAPIKey`, etc.)\n3. `KIT_*` environment variable (`KIT_MAX_TOKENS`, `KIT_TEMPERATURE`, ...)\n4. `.kit.yml` / `.kit.yaml` / `.kit.json` (project-local, then global)\n5. Per-model defaults (`modelSettings[provider/model]` / `customModels[...].params`)\n6. Provider-level defaults (e.g. Anthropic's own temperature default)\n7. SDK last-resort floor — currently an 8192 output-token ceiling matching the CLI `--max-tokens` default, auto-raised per-model up to 32768 when the model's catalog ceiling is higher\n\nSee the [SDK options reference](/sdk/options) for the full list of `kit.Options` fields that map to these keys.\n\n## Theme configuration\n\n```yaml\n# Inline partial overrides (unspecified fields inherit from default)\ntheme:\n primary:\n light: \"#8839ef\"\n dark: \"#cba6f7\"\n error:\n dark: \"#FF0000\"\n```\n\n```yaml\n# Reference external theme file\ntheme: \"./themes/my-custom-theme.yml\"\n```\n\nSee [Themes](/themes) for the full theme file format, built-in themes, and the extension theme API.\n\n## Preferences persistence\n\nKit automatically saves your UI preferences across sessions to `~/.config/kit/preferences.yml`:\n\n- **Theme** — Set via `/theme ` or `ctx.SetTheme()`\n- **Model** — Set via `/model ` or the model selector\n- **Thinking level** — Set via `/thinking ` or Shift+Tab cycling\n\nThese preferences are restored on next launch. Precedence (highest to lowest):\n1. CLI flags (`--model`, `--thinking-level`)\n2. Config file (`model:`, `thinking-level:`)\n3. Saved preferences (`~/.config/kit/preferences.yml`)\n4. Default values\n" + "content": "\n# Configuration\n\nKit looks for configuration in the following locations, in order of priority:\n\n1. CLI flags\n2. Environment variables (with `KIT_` prefix)\n3. `./.kit.yml` / `./.kit.yaml` / `./.kit.json` (project-local)\n4. `~/.kit.yml` / `~/.kit.yaml` / `~/.kit.json` (global)\n\n## Basic configuration\n\nCreate `~/.kit.yml`:\n\n```yaml\nmodel: anthropic/claude-sonnet-latest\nmax-tokens: 8192\ntemperature: 0.7\nstream: true\n```\n\n## All configuration keys\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `model` | string | `anthropic/claude-sonnet-latest` | Model to use (provider/model format) |\n| `max-tokens` | int | `8192` | Base cap for output tokens. Auto-raised per-model up to 32768 when the model's catalog ceiling is higher and no explicit value is set. Use [`modelSettings[provider/model].maxTokens`](#per-model-settings) to override per-model. |\n| `temperature` | float | `0.7` | Randomness 0.0–1.0 |\n| `top-p` | float | `0.95` | Nucleus sampling 0.0–1.0 |\n| `top-k` | int | `40` | Limit top K tokens |\n| `stream` | bool | `true` | Enable streaming output |\n| `debug` | bool | `false` | Enable debug logging |\n| `compact` | bool | `false` | Enable compact output mode |\n| `system-prompt` | string | — | System prompt text or file path |\n| `max-steps` | int | `0` | Maximum agent steps (0 = unlimited) |\n| `thinking-level` | string | `off` | Extended thinking: off, none, minimal, low, medium, high |\n| `provider-api-key` | string | — | API key for the provider |\n| `provider-url` | string | — | Base URL for provider API |\n| `tls-skip-verify` | bool | `false` | Skip TLS certificate verification |\n| `frequency-penalty` | float | `0.0` | Penalize frequent tokens (0.0–2.0) |\n| `presence-penalty` | float | `0.0` | Penalize present tokens (0.0–2.0) |\n| `stop-sequences` | list | — | Custom stop sequences |\n| `theme` | object or string | — | UI theme ([inline overrides or file path](/themes)) |\n| `prompt-templates` | bool | `true` | Enable prompt template loading |\n| `prompt-template` | string | — | Specific template to load by name |\n| `no-skills` | bool | `false` | Disable skill loading (auto-discovery and explicit) |\n| `skill` | list | — | Explicit skill files or directories to load (disables auto-discovery) |\n| `skills-dir` | string | — | Override the project-local directory used for skill auto-discovery |\n\n## Environment variables\n\nAny configuration key can be set via environment variable with the `KIT_` prefix. Hyphens become underscores:\n\n```bash\nexport KIT_MODEL=\"openai/gpt-4o\"\nexport KIT_MAX_TOKENS=\"8192\"\nexport KIT_TEMPERATURE=\"0.5\"\n```\n\nProvider API keys use their own environment variables:\n\n```bash\nexport ANTHROPIC_API_KEY=\"sk-...\"\nexport OPENAI_API_KEY=\"sk-...\"\nexport GOOGLE_API_KEY=\"...\"\n```\n\n## MCP server configuration\n\nAdd external MCP servers to your `.kit.yml`:\n\n```yaml\nmcpServers:\n filesystem:\n type: local\n command: [\"npx\", \"-y\", \"@modelcontextprotocol/server-filesystem\", \"/path/to/allowed\"]\n environment:\n LOG_LEVEL: \"info\"\n allowedTools: [\"read_file\", \"write_file\"]\n excludedTools: [\"delete_file\"]\n\n search:\n type: remote\n url: \"https://mcp.example.com/search\"\n\n pubmed:\n type: remote\n url: \"https://pubmed.mcp.example.com\"\n noOAuth: true # skip OAuth for public servers\n headers:\n - \"ApiKey: ${env://API_KEY}\" # required env var\n - \"X-Tenant: ${env://TENANT_ID:-default}\" # with fallback default\n\n builds:\n type: remote\n url: \"https://builds.mcp.example.com\"\n tasksMode: always # always run tools/call as async tasks (Phase 1 MVP)\n```\n\n### MCP server fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `type` | string | `local` (stdio) or `remote` (streamable HTTP) |\n| `command` | list | Command and args for local servers |\n| `environment` | map | Environment variables for the server process |\n| `url` | string | URL for remote servers |\n| `allowedTools` | list | Whitelist of tool names to expose |\n| `excludedTools` | list | Blacklist of tool names to hide |\n| `noOAuth` | bool | Skip OAuth for this server (for public servers that don't require auth) |\n| `headers` | list of strings | HTTP headers to attach to every request, each as a `\"Key: Value\"` string. Values support env-substitution: `${env://VAR}` or `${env://VAR:-default}`. |\n| `tasksMode` | string | When to augment `tools/call` with MCP task metadata: `auto` (default — only when the server advertises task support), `never`, or `always`. See [MCP tasks](#mcp-tasks-long-running-tools). |\n\nA legacy format with `transport`, `args`, and `env` fields is also supported; `headers` works in both the current and legacy formats.\n\n### MCP tasks (long-running tools)\n\nKit advertises [MCP task support](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks)\nduring `initialize` so servers can respond to `tools/call` with a\n`CreateTaskResult` (a task ID + `working` status) instead of blocking until\nthe operation finishes. Kit then polls `tasks/get` / `tasks/result` until the\ntask reaches a terminal state, and best-effort `tasks/cancel`s on context\ncancellation.\n\nThis avoids HTTP/SSE proxy timeouts on long builds, deploys, and batch jobs,\nand lets the user/agent abort cleanly with Ctrl-C.\n\n**Per-server `tasksMode`:**\n\n| Value | Behaviour |\n|-------|-----------|\n| `auto` (default) | Augment `tools/call` with task metadata only when the server advertised `tasks/toolCalls` capability. Servers that don't advertise it run synchronously, exactly as before. |\n| `never` | Always issue `tools/call` synchronously, regardless of server capability. |\n| `always` | Always opt into task augmentation, even when the server didn't advertise the capability. The server may still respond synchronously — this just expresses client intent unconditionally. |\n\nDefaults are safe: any existing MCP server keeps its previous behaviour\nbit-for-bit. SDK consumers can also override the mode programmatically and\nplug in a progress callback — see [SDK options](/sdk/options#mcp-tasks).\n\n## Custom models\n\nDefine custom models in your `.kit.yml` for use with the `custom` provider. This is useful for self-hosted models or API endpoints not in the built-in database:\n\n```yaml\ncustomModels:\n my-model:\n name: \"My Custom Model\"\n baseUrl: \"http://localhost:8080/v1\"\n apiKey: \"my-secret-key\"\n reasoning: true\n temperature: true\n cost:\n input: 0.002\n output: 0.004\n limit:\n context: 128000\n output: 32000\n```\n\n### Custom model fields\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `name` | string | Yes | Display name for the model |\n| `baseUrl` | string | No | Per-model base URL override; when set, `--provider-url` is not required |\n| `apiKey` | string | No | Per-model API key override |\n| `reasoning` | bool | No | Whether the model supports reasoning/thinking |\n| `temperature` | bool | No | Whether the model supports temperature adjustment |\n| `cost.input` | float | No | Cost per 1K input tokens |\n| `cost.output` | float | No | Cost per 1K output tokens |\n| `limit.context` | int | Yes | Maximum context window in tokens |\n| `limit.output` | int | No | Maximum output tokens |\n\nUse with a per-model `baseUrl` (no `--provider-url` needed):\n\n```bash\nkit --model custom/my-model \"Hello\"\n```\n\nOr override the base URL at runtime:\n\n```bash\nkit --provider-url \"http://localhost:8080/v1\" --model custom/my-model \"Hello\"\n```\n\nWhen `--provider-url` is specified without `--model`, Kit defaults to `custom/custom` which has zero cost tracking and a 262K context window.\n\n## Per-model settings\n\nOverride generation parameters and system prompt on a per-model basis using `modelSettings`:\n\n```yaml\nmodelSettings:\n anthropic/claude-sonnet-4-5-20250929:\n temperature: 0.3\n maxTokens: 8192\n systemPrompt: \"You are a concise coding assistant.\"\n openai/gpt-4o:\n temperature: 0.7\n frequencyPenalty: 0.5\n```\n\n### Per-model fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `temperature` | float | Temperature override for this model |\n| `maxTokens` | int | Max output tokens override |\n| `topP` | float | Top-p override |\n| `topK` | int | Top-k override |\n| `frequencyPenalty` | float | Frequency penalty override |\n| `presencePenalty` | float | Presence penalty override |\n| `stopSequences` | list | Stop sequences override |\n| `thinkingLevel` | string | Thinking level override |\n| `systemPrompt` | string | Per-model system prompt (used when no explicit prompt is set) |\n\nSettings from `modelSettings` and `customModels.params` act as model-level defaults — explicit CLI flags, `KIT_*` environment variables, global config values, and SDK `Options.*` fields all take precedence over them.\n\nWhen switching models via `/model` or `SetModel()`, if the new model has a per-model system prompt and no custom global prompt was set, the per-model prompt automatically replaces the previous one.\n\n### Precedence summary\n\nFor the generation and provider parameters documented above, the resolved value at runtime comes from the first source that sets it:\n\n1. CLI flag (e.g. `--max-tokens`, `--temperature`, `--provider-api-key`)\n2. SDK `Options.X` when embedding Kit as a library (`kit.Options.MaxTokens`, `Temperature`, `ProviderAPIKey`, etc.)\n3. `KIT_*` environment variable (`KIT_MAX_TOKENS`, `KIT_TEMPERATURE`, ...)\n4. `.kit.yml` / `.kit.yaml` / `.kit.json` (project-local, then global)\n5. Per-model defaults (`modelSettings[provider/model]` / `customModels[...].params`)\n6. Provider-level defaults (e.g. Anthropic's own temperature default)\n7. SDK last-resort floor — currently an 8192 output-token ceiling matching the CLI `--max-tokens` default, auto-raised per-model up to 32768 when the model's catalog ceiling is higher\n\nSee the [SDK options reference](/sdk/options) for the full list of `kit.Options` fields that map to these keys.\n\n## Theme configuration\n\n```yaml\n# Inline partial overrides (unspecified fields inherit from default)\ntheme:\n primary:\n light: \"#8839ef\"\n dark: \"#cba6f7\"\n error:\n dark: \"#FF0000\"\n```\n\n```yaml\n# Reference external theme file\ntheme: \"./themes/my-custom-theme.yml\"\n```\n\nSee [Themes](/themes) for the full theme file format, built-in themes, and the extension theme API.\n\n## Preferences persistence\n\nKit automatically saves your UI preferences across sessions to `~/.config/kit/preferences.yml`:\n\n- **Theme** — Set via `/theme ` or `ctx.SetTheme()`\n- **Model** — Set via `/model ` or the model selector\n- **Thinking level** — Set via `/thinking ` or Shift+Tab cycling\n\nThese preferences are restored on next launch. Precedence (highest to lowest):\n1. CLI flags (`--model`, `--thinking-level`)\n2. Config file (`model:`, `thinking-level:`)\n3. Saved preferences (`~/.config/kit/preferences.yml`)\n4. Default values\n" }, { "url": "/development", diff --git a/providers/index.html b/providers/index.html index a2743d2c..2b380ceb 100644 --- a/providers/index.html +++ b/providers/index.html @@ -7,7 +7,7 @@ - + diff --git a/quick-start/index.html b/quick-start/index.html index 231f7f9a..75a77667 100644 --- a/quick-start/index.html +++ b/quick-start/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/callbacks/index.html b/sdk/callbacks/index.html index 456bdba2..cade3630 100644 --- a/sdk/callbacks/index.html +++ b/sdk/callbacks/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/options/index.html b/sdk/options/index.html index 7e72018f..61239922 100644 --- a/sdk/options/index.html +++ b/sdk/options/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/overview/index.html b/sdk/overview/index.html index 577173a0..fd42236d 100644 --- a/sdk/overview/index.html +++ b/sdk/overview/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/sessions/index.html b/sdk/sessions/index.html index ec583fb4..650a76bb 100644 --- a/sdk/sessions/index.html +++ b/sdk/sessions/index.html @@ -7,7 +7,7 @@ - + diff --git a/search.json b/search.json index 923f60f7..c091caa6 100644 --- a/search.json +++ b/search.json @@ -63,6 +63,7 @@ "Extension management", "Installing extensions from git", "Skills", + "Skills CLI flags", "Interactive slash commands", "Prompt history", "Cancelling operations", @@ -77,7 +78,7 @@ "ACP server" ], "tags": [], - "wordCount": 1053 + "wordCount": 1156 }, { "id": "cli/flags", @@ -89,11 +90,12 @@ "Session management", "Behavior", "Extensions", + "Skills", "Generation parameters", "System" ], "tags": [], - "wordCount": 505 + "wordCount": 560 }, { "id": "configuration", @@ -116,7 +118,7 @@ "Preferences persistence" ], "tags": [], - "wordCount": 1492 + "wordCount": 1539 }, { "id": "development", diff --git a/sessions/index.html b/sessions/index.html index 2dffd70b..d149b8dd 100644 --- a/sessions/index.html +++ b/sessions/index.html @@ -7,7 +7,7 @@ - + diff --git a/themes/index.html b/themes/index.html index 85efec34..31c6f08d 100644 --- a/themes/index.html +++ b/themes/index.html @@ -7,7 +7,7 @@ - +