-
+
```yaml
model_list:
- # Responses API models
+ # OpenAI models
- model_name: codex-mini
- litellm_params:
+ litellm_params:
model: openai/codex-mini
api_key: os.environ/OPENAI_API_KEY
api_base: https://api.openai.com/v1
-
+
- model_name: o3-pro
litellm_params:
model: openai/o3-pro
api_key: os.environ/OPENAI_API_KEY
api_base: https://api.openai.com/v1
- # Standard models
- model_name: gpt-4o
litellm_params:
model: openai/gpt-4o
api_key: os.environ/OPENAI_API_KEY
+ api_base: https://api.openai.com/v1
- - model_name: claude-3-5-sonnet
+ # Anthropic models
+ - model_name: claude-3-5-sonnet-20241022
litellm_params:
model: anthropic/claude-3-5-sonnet-20241022
api_key: os.environ/ANTHROPIC_API_KEY
+
+ - model_name: claude-3-5-haiku-20241022
+ litellm_params:
+ model: anthropic/claude-3-5-haiku-20241022
+ api_key: os.environ/ANTHROPIC_API_KEY
+
+ # AWS Bedrock
+ - model_name: claude-bedrock
+ litellm_params:
+ model: bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
+ aws_access_key_id: os.environ/AWS_ACCESS_KEY_ID
+ aws_secret_access_key: os.environ/AWS_SECRET_ACCESS_KEY
+ aws_region_name: us-east-1
litellm_settings:
master_key: os.environ/LITELLM_MASTER_KEY
@@ -158,13 +196,14 @@ litellm_settings:
Switch between models seamlessly:
```bash
-# Use Responses API models for advanced reasoning
-claude --model o3-pro
-claude --model codex-mini
+# Use Claude for complex reasoning
+claude --model claude-3-5-sonnet-20241022
-# Use standard models for general tasks
-claude --model gpt-4o
-claude --model claude-3-5-sonnet
+# Use Haiku for fast responses
+claude --model claude-3-5-haiku-20241022
+
+# Use Bedrock deployment
+claude --model claude-bedrock
```
diff --git a/docs/my-website/docs/tutorials/scim_litellm.md b/docs/my-website/docs/tutorials/scim_litellm.md
index 851379610b0..f7168531f80 100644
--- a/docs/my-website/docs/tutorials/scim_litellm.md
+++ b/docs/my-website/docs/tutorials/scim_litellm.md
@@ -72,6 +72,7 @@ On the LiteLLM UI, Navigate to `Teams`, You should see the new team `Production
+> **Note:** When a user is removed from your organization via SCIM, all API keys and access tokens associated with that user will be automatically deleted from LiteLLM. This ensures that removed users lose all access immediately and securely.
diff --git a/docs/my-website/img/admin_settings_ui_theme.png b/docs/my-website/img/admin_settings_ui_theme.png
new file mode 100644
index 00000000000..81e6d761e17
Binary files /dev/null and b/docs/my-website/img/admin_settings_ui_theme.png differ
diff --git a/docs/my-website/img/admin_settings_ui_theme_logo.png b/docs/my-website/img/admin_settings_ui_theme_logo.png
new file mode 100644
index 00000000000..38f36e61602
Binary files /dev/null and b/docs/my-website/img/admin_settings_ui_theme_logo.png differ
diff --git a/docs/my-website/img/create_team_member_rate_limits.png b/docs/my-website/img/create_team_member_rate_limits.png
new file mode 100644
index 00000000000..0c5eba04461
Binary files /dev/null and b/docs/my-website/img/create_team_member_rate_limits.png differ
diff --git a/docs/my-website/img/release_notes/team_member_rate_limits.png b/docs/my-website/img/release_notes/team_member_rate_limits.png
new file mode 100644
index 00000000000..ec0affb1271
Binary files /dev/null and b/docs/my-website/img/release_notes/team_member_rate_limits.png differ
diff --git a/docs/my-website/release_notes/v1.74.15-stable/index.md b/docs/my-website/release_notes/v1.74.15-stable/index.md
index dd748f18ffa..9807a00b7e7 100644
--- a/docs/my-website/release_notes/v1.74.15-stable/index.md
+++ b/docs/my-website/release_notes/v1.74.15-stable/index.md
@@ -86,9 +86,9 @@ This is great to central AI Platform teams looking to track how they are helping
| Provider | Model | Context Window | Input ($/1M tokens) | Output ($/1M tokens) | Cost per Image |
| ----------- | -------------------------------------- | -------------- | ------------------- | -------------------- | -------------- |
| OpenRouter | `openrouter/x-ai/grok-4` | 256k | $3 | $15 | N/A |
-| Google AI Studio | `gemini/imagen-4.0-generate-preview-06-06` | N/A | N/A | N/A | $0.04 |
-| Google AI Studio | `gemini/imagen-4.0-ultra-generate-preview-06-06` | N/A | N/A | N/A | $0.06 |
-| Google AI Studio | `gemini/imagen-4.0-fast-generate-preview-06-06` | N/A | N/A | N/A | $0.02 |
+| Google AI Studio | `gemini/imagen-4.0-generate-001` | N/A | N/A | N/A | $0.04 |
+| Google AI Studio | `gemini/imagen-4.0-ultra-generate-001` | N/A | N/A | N/A | $0.06 |
+| Google AI Studio | `gemini/imagen-4.0-fast-generate-001` | N/A | N/A | N/A | $0.02 |
| Google AI Studio | `gemini/imagen-3.0-generate-002` | N/A | N/A | N/A | $0.04 |
| Google AI Studio | `gemini/imagen-3.0-generate-001` | N/A | N/A | N/A | $0.04 |
| Google AI Studio | `gemini/imagen-3.0-fast-generate-001` | N/A | N/A | N/A | $0.02 |
diff --git a/docs/my-website/release_notes/v1.74.7/index.md b/docs/my-website/release_notes/v1.74.7/index.md
index e3a2ac0aa00..7d7a568e13f 100644
--- a/docs/my-website/release_notes/v1.74.7/index.md
+++ b/docs/my-website/release_notes/v1.74.7/index.md
@@ -148,7 +148,6 @@ Starting with this release, you can run health endpoints on an isolated process
- New provider integration for v0.dev - [PR #12751](https://github.com/BerriAI/litellm/pull/12751), [Get Started](../../docs/providers/v0)
- **[OpenAI](../../docs/providers/openai)**
- Use OpenAI DeepResearch models with `litellm.completion` (`/chat/completions`) - [PR #12627](https://github.com/BerriAI/litellm/pull/12627) **DOC NEEDED**
- - Add `input_fidelity` parameter for OpenAI image generation - [PR #12662](https://github.com/BerriAI/litellm/pull/12662), [Get Started](../../docs/image_generation)
- **[Azure OpenAI](../../docs/providers/azure_openai)**
- Use Azure OpenAI DeepResearch models with `litellm.completion` (`/chat/completions`) - [PR #12627](https://github.com/BerriAI/litellm/pull/12627) **DOC NEEDED**
- Added `response_format` support for openai gpt-4.1 models - [PR #12745](https://github.com/BerriAI/litellm/pull/12745)
diff --git a/docs/my-website/release_notes/v1.75.8/index.md b/docs/my-website/release_notes/v1.75.8/index.md
index 2e90f26c3ad..d7d4f37c4ee 100644
--- a/docs/my-website/release_notes/v1.75.8/index.md
+++ b/docs/my-website/release_notes/v1.75.8/index.md
@@ -1,5 +1,5 @@
---
-title: "[PRE-RELEASE]v1.75.8"
+title: "v1.75.8-stable - Team Member Rate Limits"
slug: "v1-75-8"
date: 2025-08-16T10:00:00
authors:
@@ -28,7 +28,7 @@ import TabItem from '@theme/TabItem';
docker run \
-e STORE_MODEL_IN_DB=True \
-p 4000:4000 \
-ghcr.io/berriai/litellm:v1.75.8
+ghcr.io/berriai/litellm:v1.75.8-stable
```
@@ -52,6 +52,22 @@ pip install litellm==1.75.8
---
+## Team Member Rate Limits
+
+
+
+ LiteLLM MCP Architecture: Use MCP tools with all LiteLLM supported models
+
+
+
+This release adds support for setting rate limits on individual members (including machine users) within a team. Teams can now give each agent its own rate limits—so that heavy-traffic agents don’t impact other agents or human users.
+
+Agents can authenticate with LiteLLM using JWT and the same team role as human users, while still enforcing per-agent rate limits.
+
+
## New Models / Updated Models
#### New Model Support
diff --git a/docs/my-website/release_notes/v1.76.0-stable/index.md b/docs/my-website/release_notes/v1.76.0-stable/index.md
new file mode 100644
index 00000000000..660c8cbcf02
--- /dev/null
+++ b/docs/my-website/release_notes/v1.76.0-stable/index.md
@@ -0,0 +1,189 @@
+---
+title: "[PRE-RELEASE]v1.76.0-stable - RPS Improvements"
+slug: "v1-76-0"
+date: 2025-08-23T10:00:00
+authors:
+ - name: Krrish Dholakia
+ title: CEO, LiteLLM
+ url: https://www.linkedin.com/in/krish-d/
+ image_url: https://pbs.twimg.com/profile_images/1298587542745358340/DZv3Oj-h_400x400.jpg
+ - name: Ishaan Jaffer
+ title: CTO, LiteLLM
+ url: https://www.linkedin.com/in/reffajnaahsi/
+ image_url: https://pbs.twimg.com/profile_images/1613813310264340481/lz54oEiB_400x400.jpg
+
+hide_table_of_contents: false
+---
+
+import Image from '@theme/IdealImage';
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+:::info
+
+LiteLLM is hiring a **Founding Backend Engineer**, in San Francisco.
+
+[Apply here](https://www.ycombinator.com/companies/litellm/jobs/6uvoBp3-founding-backend-engineer) if you're interested!
+:::
+
+
+
+
+
+## Deploy this version
+
+:::info
+
+This release is not live yet.
+:::
+
+
+---
+
+## New Models / Updated Models
+
+#### Bugs
+- **[OpenAI](../../docs/providers/openai)**
+ - Gpt-5 chat: clarify does not support function calling [PR #13612](https://github.com/BerriAI/litellm/pull/13612), s/o @[superpoussin22](https://github.com/superpoussin22)
+- **[VertexAI](../../docs/providers/vertex)**
+ - fix vertexai batch file format by @[thiagosalvatore](https://github.com/thiagosalvatore) in [PR #13576](https://github.com/BerriAI/litellm/pull/13576)
+- **[LiteLLM Proxy](../../docs/providers/litellm_proxy)**
+ - Add support for calling image_edits + image_generations via SDK to Proxy - [PR #13735](https://github.com/BerriAI/litellm/pull/13735)
+- **[OpenRouter](../../docs/providers/openrouter)**
+ - Fix max_output_tokens value for anthropic Claude 4 - [PR #13526](https://github.com/BerriAI/litellm/pull/13526)
+- **[Gemini](../../docs/providers/gemini)**
+ - Fix prompt caching cost calculation - [PR #13742](https://github.com/BerriAI/litellm/pull/13742)
+- **[Azure](../../docs/providers/azure)**
+ - Support `../openai/v1/respones` api base - [PR #13526](https://github.com/BerriAI/litellm/pull/13526)
+ - Fix azure/gpt-5-chat max_input_tokens - [PR #13660](https://github.com/BerriAI/litellm/pull/13660)
+- **[Groq](../../docs/providers/groq)**
+ - streaming ASCII encoding issue - [PR #13675](https://github.com/BerriAI/litellm/pull/13675)
+- **[Baseten](../../docs/providers/baseten)**
+ - Refactored integration to use new openai-compatible endpoints - [PR #13783](https://github.com/BerriAI/litellm/pull/13783)
+- **[Bedrock](../../docs/providers/bedrock)**
+ - fix application inference profile for pass-through endpoints for bedrock - [PR #13881](https://github.com/BerriAI/litellm/pull/13881)
+- **[DataRobot](../../docs/providers/datarobot)**
+ - Updated URL handling for DataRobot provider URL - [PR #13880](https://github.com/BerriAI/litellm/pull/13880)
+
+#### Features
+- **[Together AI](../../docs/providers/together)**
+ - Added Qwen3, Deepseek R1 0528 Throughput, GLM 4.5 and GPT-OSS models cost tracking - [PR #13637](https://github.com/BerriAI/litellm/pull/13637), s/o @[Tasmay-Tibrewal](https://github.com/Tasmay-Tibrewal)
+- **[Fireworks AI](../../docs/providers/fireworks_ai)**
+ - add fireworks_ai/accounts/fireworks/models/deepseek-v3-0324 - [PR #13821](https://github.com/BerriAI/litellm/pull/13821)
+- **[VertexAI](../../docs/providers/vertex)**
+ - Add VertexAI qwen API Service - [PR #13828](https://github.com/BerriAI/litellm/pull/13828)
+ - Add new VertexAI image models vertex_ai/imagen-4.0-generate-001, vertex_ai/imagen-4.0-ultra-generate-001, vertex_ai/imagen-4.0-fast-generate-001 - [PR #13874](https://github.com/BerriAI/litellm/pull/13874)
+- **[Anthropic](../../docs/providers/anthropic)**
+ - Add long context support w/ cost tracking - [PR #13759](https://github.com/BerriAI/litellm/pull/13759)
+- **[DeepInfra](../../docs/providers/deepinfra)**
+ - Add rerank endpoint support for deepinfra - [PR #13820](https://github.com/BerriAI/litellm/pull/13820)
+ - Add new models for cost tracking - [PR #13883](https://github.com/BerriAI/litellm/pull/13883), s/o @[Toy-97](https://github.com/Toy-97)
+- **[Bedrock](../../docs/providers/bedrock)**
+ - Add tool prompt caching on async calls - [PR #13803](https://github.com/BerriAI/litellm/pull/13803), s/o @[UlookEE](https://github.com/UlookEE)
+ - role chaining and session name with webauthentication for aws bedrock - [PR #13753](https://github.com/BerriAI/litellm/pull/13753), s/o @[RichardoC](https://github.com/RichardoC)
+- **[Ollama](../../docs/providers/ollama)**
+ - Handle Ollama null response when using tool calling with non-tool trained models - [PR #13902](https://github.com/BerriAI/litellm/pull/13902)
+- **[OpenRouter](../../docs/providers/openrouter)**
+ - Add deepseek/deepseek-chat-v3.1 support - [PR #13897](https://github.com/BerriAI/litellm/pull/13897)
+- **[Mistral](../../docs/providers/mistral)**
+ - Add support for calling mistral files via chat completions - [PR #13866](https://github.com/BerriAI/litellm/pull/13866), s/o @[jinskjoy](https://github.com/jinskjoy)
+ - Handle empty assistant content - [PR #13671](https://github.com/BerriAI/litellm/pull/13671)
+ - Support new ‘thinking’ response block - [PR #13671](https://github.com/BerriAI/litellm/pull/13671)
+- **[Databricks](../../docs/providers/databricks)**
+ - remove deprecated dbrx models (dbrx-instruct, llama 3.1) - [PR #13843](https://github.com/BerriAI/litellm/pull/13843)
+- **[AI/ML API](../../docs/providers/ai_ml_api)**
+ - Image gen api support - [PR #13893](https://github.com/BerriAI/litellm/pull/13893)
+
+
+## LLM API Endpoints
+#### Bugs
+- **[Responses API](../../docs/response_api)**
+ - add default api version for openai responses api calls - [PR #13526](https://github.com/BerriAI/litellm/pull/13526)
+ - support allowed_openai_params - [PR #13671](https://github.com/BerriAI/litellm/pull/13671)
+
+
+## MCP Gateway
+#### Bugs
+- fix StreamableHTTPSessionManager .run() error - [PR #13666](https://github.com/BerriAI/litellm/pull/13666)
+
+## Vector Stores
+#### Bugs
+- **[Bedrock](../../docs/providers/bedrock)**
+ - Using LiteLLM Managed Credentials for Query - [PR #13787](https://github.com/BerriAI/litellm/pull/13787)
+
+## Management Endpoints / UI
+#### Bugs
+- **[Passthrough](../../docs/pass_through/intro)**
+ - Fix query passthrough deletion - [PR #13622](https://github.com/BerriAI/litellm/pull/13622)
+
+#### Features
+- **Models**
+ - Add Search Functionality for Public Model Names in Model Dashboard - [PR #13687](https://github.com/BerriAI/litellm/pull/13687)
+ - Auto-Add `azure/` to deployment Name in UI - [PR #13685](https://github.com/BerriAI/litellm/pull/13685)
+ - Models page row UI restructure - [PR #13771](https://github.com/BerriAI/litellm/pull/13771)
+- **Notifications**
+ - Add new notifications toast UI everywhere - [PR #13813](https://github.com/BerriAI/litellm/pull/13813)
+- **Keys**
+ - Fix key edit settings after regenerating a key - [PR #13815](https://github.com/BerriAI/litellm/pull/13815)
+ - Require team_id when creating service account keys - [PR #13873](https://github.com/BerriAI/litellm/pull/13873)
+ - Filter - show all options on filter option click - [PR #13858](https://github.com/BerriAI/litellm/pull/13858)
+- **Usage**
+ - Fix ‘Cannot read properties of undefined’ exception on user agent activity tab - [PR #13892](https://github.com/BerriAI/litellm/pull/13892)
+- **SSO**
+ - Free SSO usage for up to 5 users - [PR #13843](https://github.com/BerriAI/litellm/pull/13843)
+
+## Logging / Guardrail Integrations
+#### Bugs
+- **[Bedrock Guardrails](../../docs/proxy/guardrails/bedrock)**
+ - Add bedrock api key support - [PR #13835](https://github.com/BerriAI/litellm/pull/13835)
+#### Features
+- **[Datadog LLM Observability](../../docs/integrations/datadog)**
+ - Add support for Failure Logging [PR #13726](https://github.com/BerriAI/litellm/pull/13726)
+ - Add time to first token, litellm overhead, guardrail overhead latency metrics - [PR #13734](https://github.com/BerriAI/litellm/pull/13734)
+ - Add support for tracing guardrail input/output - [PR #13767](https://github.com/BerriAI/litellm/pull/13767)
+- **[Langfuse OTEL](../../docs/integrations/langfuse)**
+ - Allow using Key/Team Based Logging - [PR #13791](https://github.com/BerriAI/litellm/pull/13791)
+- **[AIM](../../docs/integrations/aim)**
+ - Migrate to new firewall API - [PR #13748](https://github.com/BerriAI/litellm/pull/13748)
+- **[OTEL](../../docs/observability/opentelemetry_integration)**
+ - Add OTEL tracing for actual LLM API call - [PR #13836](https://github.com/BerriAI/litellm/pull/13836)
+- **[MLFlow](../../docs/observability/mlflow_integration)**
+ - Include predicted output in MLflow tracing - [PR #13795](https://github.com/BerriAI/litellm/pull/13795), s/o @TomeHirata
+
+
+## Performance / Loadbalancing / Reliability improvements
+#### Bugs
+- **[Cooldowns](../../docs/routing#how-cooldowns-work)**
+ - don't return raw Azure Exceptions to client (can contain prompt leakage) - [PR #13529](https://github.com/BerriAI/litellm/pull/13529)
+- **[Auto-router](../../docs/proxy/auto_routing)**
+ - Ensures the relevant dependencies for auto router existing on LiteLLM Docker - [PR #13788](https://github.com/BerriAI/litellm/pull/13788)
+- **Model Alias**
+ - Fix calling key with access to model alias - [PR #13830](https://github.com/BerriAI/litellm/pull/13830)
+
+#### Features
+- **[S3 Caching](../../docs/proxy/caching)**
+ - Use namespace as prefix for s3 cache - [PR #13704](https://github.com/BerriAI/litellm/pull/13704)
+ - Async S3 Caching support (4x RPS improvement) - [PR #13852](https://github.com/BerriAI/litellm/pull/13852), s/o @[michal-otmianowski](https://github.com/michal-otmianowski)
+- **Model Group header forwarding**
+ - reuse same logic as global header forwarding - [PR #13741](https://github.com/BerriAI/litellm/pull/13741)
+ - add support for hosted_vllm on UI - [PR #13885](https://github.com/BerriAI/litellm/pull/13885)
+- **Performance**
+ - Improve LiteLLM Python SDK RPS by +200 RPS (braintrust import + aiohttp transport fixes) - [PR #13839](https://github.com/BerriAI/litellm/pull/13839)
+ - Use O(1) Set lookups for model routing - [PR #13879](https://github.com/BerriAI/litellm/pull/13879)
+ - Reduce Significant CPU overhead from litellm_logging.py - [PR #13895](https://github.com/BerriAI/litellm/pull/13895)
+ - Improvements for Async Success Handler (Logging Callbacks) - Approx +130 RPS - [PR #13905](https://github.com/BerriAI/litellm/pull/13905)
+
+
+## General Proxy Improvements
+#### Bugs
+
+- **SDK**
+ - Fix litellm compatibility with newest release of openAI (>v1.100.0) - [PR #13728](https://github.com/BerriAI/litellm/pull/13728)
+- **Helm**
+ - Add possibility to configure resources for migrations-job - [PR #13617](https://github.com/BerriAI/litellm/pull/13617)
+ - Ensure Helm chart auto generated master keys follow sk-xxxx format - [PR #13871](https://github.com/BerriAI/litellm/pull/13871)
+ - Enhance database configuration: add support for optional endpointKey - [PR #13763](https://github.com/BerriAI/litellm/pull/13763)
+- **Rate Limits**
+ - fixing descriptor/response size mismatch on parallel_request_limiter_v3 - [PR #13863](https://github.com/BerriAI/litellm/pull/13863), s/o @[luizrennocosta](https://github.com/luizrennocosta)
+- **Non-root**
+ - fix permission access on prisma migrate in non-root image - [PR #13848](https://github.com/BerriAI/litellm/pull/13848), s/o @[Ithanil](https://github.com/Ithanil)
\ No newline at end of file
diff --git a/docs/my-website/release_notes/v1.76.1-stable/index.md b/docs/my-website/release_notes/v1.76.1-stable/index.md
new file mode 100644
index 00000000000..4437b7f5799
--- /dev/null
+++ b/docs/my-website/release_notes/v1.76.1-stable/index.md
@@ -0,0 +1,269 @@
+---
+title: "v1.76.1-stable - Gemini 2.5 Flash Image"
+slug: "v1-76-1"
+date: 2025-08-30T10:00:00
+authors:
+ - name: Krrish Dholakia
+ title: CEO, LiteLLM
+ url: https://www.linkedin.com/in/krish-d/
+ image_url: https://pbs.twimg.com/profile_images/1298587542745358340/DZv3Oj-h_400x400.jpg
+ - name: Ishaan Jaffer
+ title: CTO, LiteLLM
+ url: https://www.linkedin.com/in/reffajnaahsi/
+ image_url: https://pbs.twimg.com/profile_images/1613813310264340481/lz54oEiB_400x400.jpg
+
+hide_table_of_contents: false
+---
+
+import Image from '@theme/IdealImage';
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+## Deploy this version
+
+
+
+
+``` showLineNumbers title="docker run litellm"
+docker run \
+-e STORE_MODEL_IN_DB=True \
+-p 4000:4000 \
+ghcr.io/berriai/litellm:v1.76.1
+```
+
+
+
+
+``` showLineNumbers title="pip install litellm"
+pip install litellm==1.76.1
+```
+
+
+
+
+---
+
+## Key Highlights
+
+- **Major Performance Improvements** - 6.5x faster LiteLLM Python SDK completion with fastuuid integration.
+- **New Model Support** - Gemini 2.5 Flash Image Preview, Grok Code Fast, and GPT Realtime models
+- **Enhanced Provider Support** - DeepSeek-v3.1 pricing on Fireworks AI, Vercel AI Gateway, and improved Anthropic/GitHub Copilot integration
+- **MCP Improvements** - Better connection testing and SSE MCP tools bug fixes
+
+## Major Changes
+- Added support for using Gemini 2.5 Flash Image Preview with /chat/completions. **🚨 Warning** If you were using `gemini-2.0-flash-exp-image-generation` please follow this migration guide.
+ [Gemini Image Generation Migration Guide](../../docs/extras/gemini_img_migration)
+---
+
+## Performance Improvements
+
+This release includes significant performance optimizations:
+
+- **6.5x faster LiteLLM Python SDK Completion** - Major performance boost for completion operations - [PR #13990](https://github.com/BerriAI/litellm/pull/13990)
+- **fastuuid Integration** - 2.1x faster UUID generation with +80 RPS improvement for /chat/completions and other LLM endpoints - [PR #13992](https://github.com/BerriAI/litellm/pull/13992), [PR #14016](https://github.com/BerriAI/litellm/pull/14016)
+- **Optimized Request Logging** - Don't print request params by default for +50 RPS improvement - [PR #14015](https://github.com/BerriAI/litellm/pull/14015)
+- **Cache Performance** - 21% speedup in InMemoryCache.evict_cache and 45% speedup in `_is_debugging_on` function - [PR #14012](https://github.com/BerriAI/litellm/pull/14012), [PR #13988](https://github.com/BerriAI/litellm/pull/13988)
+
+---
+
+## New Models / Updated Models
+
+#### New Model Support
+
+| Provider | Model | Context Window | Input ($/1M tokens) | Output ($/1M tokens) | Features |
+| ----------- | -------------------------------------- | -------------- | ------------------- | -------------------- | -------- |
+| Google | `gemini-2.5-flash-image-preview` | 1M | $0.30 | $2.50 | Chat completions + image generation ($0.039/image) |
+| X.AI | `xai/grok-code-fast` | 256K | $0.20 | $1.50 | Code generation |
+| OpenAI | `gpt-realtime` | 32K | $4.00 | $16.00 | Real-time conversation + audio |
+| Vercel AI Gateway | `vercel_ai_gateway/openai/o3` | 200K | $2.00 | $8.00 | Advanced reasoning |
+| Vercel AI Gateway | `vercel_ai_gateway/openai/o3-mini` | 200K | $1.10 | $4.40 | Efficient reasoning |
+| Vercel AI Gateway | `vercel_ai_gateway/openai/o4-mini` | 200K | $1.10 | $4.40 | Latest mini model |
+| DeepInfra | `deepinfra/zai-org/GLM-4.5` | 131K | $0.55 | $2.00 | Chat completions |
+| Perplexity | `perplexity/codellama-34b-instruct` | 16K | $0.35 | $1.40 | Code generation |
+| Fireworks AI | `fireworks_ai/accounts/fireworks/models/deepseek-v3p1` | 128K | $0.56 | $1.68 | Chat completions |
+
+**Additional Models Added:** Various other Vercel AI Gateway models were added too. See [models.litellm.ai](https://models.litellm.ai) for the full list.
+
+#### Features
+
+- **[Google Gemini](../../docs/providers/gemini)**
+ - Added support for `gemini-2.5-flash-image-preview` with image return capability - [PR #13979](https://github.com/BerriAI/litellm/pull/13979), [PR #13983](https://github.com/BerriAI/litellm/pull/13983)
+ - Support for requests with only system prompt - [PR #14010](https://github.com/BerriAI/litellm/pull/14010)
+ - Fixed invalid model name error for Gemini Imagen models - [PR #13991](https://github.com/BerriAI/litellm/pull/13991)
+- **[X.AI](../../docs/providers/xai)**
+ - Added `xai/grok-code-fast` model family support - [PR #14054](https://github.com/BerriAI/litellm/pull/14054)
+ - Fixed frequency_penalty parameter for grok-4 models - [PR #14078](https://github.com/BerriAI/litellm/pull/14078)
+- **[OpenAI](../../docs/providers/openai)**
+ - Added support for gpt-realtime models - [PR #14082](https://github.com/BerriAI/litellm/pull/14082)
+ - Support for reasoning and reasoning_effort parameters by default - [PR #12865](https://github.com/BerriAI/litellm/pull/12865)
+- **[Fireworks AI](../../docs/providers/fireworks_ai)**
+ - Added DeepSeek-v3.1 pricing - [PR #13958](https://github.com/BerriAI/litellm/pull/13958)
+- **[DeepInfra](../../docs/providers/deepinfra)**
+ - Fixed reasoning_effort setting for DeepSeek-V3.1 - [PR #14053](https://github.com/BerriAI/litellm/pull/14053)
+- **[GitHub Copilot](../../docs/providers/github_copilot)**
+ - Added support for thinking and reasoning_effort parameters - [PR #13691](https://github.com/BerriAI/litellm/pull/13691)
+ - Added image headers support - [PR #13955](https://github.com/BerriAI/litellm/pull/13955)
+- **[Anthropic](../../docs/providers/anthropic)**
+ - Support for custom Anthropic-compatible API endpoints - [PR #13945](https://github.com/BerriAI/litellm/pull/13945)
+ - Fixed /messages fallback from Anthropic API to Bedrock API - [PR #13946](https://github.com/BerriAI/litellm/pull/13946)
+- **[Nebius](../../docs/providers/nebius)**
+ - Expanded provider models and normalized model IDs - [PR #13965](https://github.com/BerriAI/litellm/pull/13965)
+- **[Vertex AI](../../docs/providers/vertex)**
+ - Fixed Vertex Mistral streaming issues - [PR #13952](https://github.com/BerriAI/litellm/pull/13952)
+ - Fixed anyOf corner cases for Gemini tool calls - [PR #12797](https://github.com/BerriAI/litellm/pull/12797)
+- **[Bedrock](../../docs/providers/bedrock)**
+ - Fixed structure output issues - [PR #14005](https://github.com/BerriAI/litellm/pull/14005)
+- **[OpenRouter](../../docs/providers/openrouter)**
+ - Added GPT-5 family models pricing - [PR #13536](https://github.com/BerriAI/litellm/pull/13536)
+
+#### New Provider Support
+
+- **[Vercel AI Gateway](../../docs/providers/vercel_ai_gateway)**
+ - New provider support added - [PR #13144](https://github.com/BerriAI/litellm/pull/13144)
+- **[DataRobot](../../docs/providers/datarobot)**
+ - Added provider documentation - [PR #14038](https://github.com/BerriAI/litellm/pull/14038), [PR #14074](https://github.com/BerriAI/litellm/pull/14074)
+
+---
+
+## LLM API Endpoints
+
+#### Features
+
+- **[Images API](../../docs/image_generation)**
+ - Support for multiple images in OpenAI images/edits endpoint - [PR #13916](https://github.com/BerriAI/litellm/pull/13916)
+ - Allow using dynamic `api_key` for image generation requests - [PR #14007](https://github.com/BerriAI/litellm/pull/14007)
+- **[Responses API](../../docs/response_api)**
+ - Fixed `/responses` endpoint ignoring extra_headers in GitHub Copilot - [PR #13775](https://github.com/BerriAI/litellm/pull/13775)
+ - Added support for new web_search tool - [PR #14083](https://github.com/BerriAI/litellm/pull/14083)
+- **[Azure Passthrough](../../docs/providers/azure/azure)**
+ - Fixed Azure Passthrough request with streaming - [PR #13831](https://github.com/BerriAI/litellm/pull/13831)
+
+#### Bugs
+
+- **General**
+ - Fixed handling of None metadata in batch requests - [PR #13996](https://github.com/BerriAI/litellm/pull/13996)
+ - Fixed token_counter with special token input - [PR #13374](https://github.com/BerriAI/litellm/pull/13374)
+ - Removed incorrect web search support for azure/gpt-4.1 family - [PR #13566](https://github.com/BerriAI/litellm/pull/13566)
+
+---
+
+## [MCP Gateway](../../docs/mcp)
+
+#### Features
+
+- **SSE MCP Tools**
+ - Bug fix for adding SSE MCP tools - improved connection testing when adding MCPs - [PR #14048](https://github.com/BerriAI/litellm/pull/14048)
+
+[Read More](../../docs/mcp)
+
+---
+
+## Management Endpoints / UI
+
+#### Features
+
+- **Team Management**
+ - Allow setting Team Member RPM/TPM limits when creating a team - [PR #13943](https://github.com/BerriAI/litellm/pull/13943)
+- **UI Improvements**
+ - Fixed Next.js Security Vulnerabilities in UI Dashboard - [PR #14084](https://github.com/BerriAI/litellm/pull/14084)
+ - Fixed collapsible navbar design - [PR #14075](https://github.com/BerriAI/litellm/pull/14075)
+
+#### Bugs
+
+- **Authentication**
+ - Fixed Virtual keys with llm_api type causing Internal Server Error for /anthropic/* and other LLM passthrough routes - [PR #14046](https://github.com/BerriAI/litellm/pull/14046)
+
+---
+
+## Logging / Guardrail Integrations
+
+#### Features
+
+- **[Langfuse OTEL](../../docs/proxy/logging#langfuse)**
+ - Allow using LANGFUSE_OTEL_HOST for configuring host - [PR #14013](https://github.com/BerriAI/litellm/pull/14013)
+- **[Braintrust](../../docs/proxy/logging#braintrust)**
+ - Added span name metadata feature - [PR #13573](https://github.com/BerriAI/litellm/pull/13573)
+ - Fixed tests to reference moved attributes in `braintrust_logging` module - [PR #13978](https://github.com/BerriAI/litellm/pull/13978)
+- **[OpenMeter](../../docs/proxy/logging#openmeter)**
+ - Set user from token user_id for OpenMeter integration - [PR #13152](https://github.com/BerriAI/litellm/pull/13152)
+
+#### New Guardrail Support
+
+- **[Noma Security](../../docs/proxy/guardrails)**
+ - Added Noma Security guardrail support - [PR #13572](https://github.com/BerriAI/litellm/pull/13572)
+- **[Pangea](../../docs/proxy/guardrails)**
+ - Updated Pangea Guardrail to support new AIDR endpoint - [PR #13160](https://github.com/BerriAI/litellm/pull/13160)
+
+---
+
+## Performance / Loadbalancing / Reliability improvements
+
+#### Features
+
+- **Caching**
+ - Verify if cache entry has expired prior to serving it to client - [PR #13933](https://github.com/BerriAI/litellm/pull/13933)
+ - Fixed error saving latency as timedelta on Redis - [PR #14040](https://github.com/BerriAI/litellm/pull/14040)
+- **Router**
+ - Refactored router to choose weights by 'weight', 'rpm', 'tpm' in one loop for simple_shuffle - [PR #13562](https://github.com/BerriAI/litellm/pull/13562)
+- **Logging**
+ - Fixed LoggingWorker graceful shutdown to prevent CancelledError warnings - [PR #14050](https://github.com/BerriAI/litellm/pull/14050)
+ - Enhanced logging for containers to log on files both with usual format and json format - [PR #13394](https://github.com/BerriAI/litellm/pull/13394)
+
+#### Bugs
+
+- **Dependencies**
+ - Bumped `orjson` version to "3.11.2" - [PR #13969](https://github.com/BerriAI/litellm/pull/13969)
+
+---
+
+## General Proxy Improvements
+
+#### Features
+
+- **AWS**
+ - Add support for AWS assume_role with a session token - [PR #13919](https://github.com/BerriAI/litellm/pull/13919)
+- **OCI Provider**
+ - Added oci_key_file as an optional_parameter - [PR #14036](https://github.com/BerriAI/litellm/pull/14036)
+- **Configuration**
+ - Allow configuration to set threshold before request entry in spend log gets truncated - [PR #14042](https://github.com/BerriAI/litellm/pull/14042)
+ - Enhanced proxy_config configuration: add support for existing configmap in Helm charts - [PR #14041](https://github.com/BerriAI/litellm/pull/14041)
+- **Docker**
+ - Added back supervisor to non-root image - [PR #13922](https://github.com/BerriAI/litellm/pull/13922)
+
+
+---
+
+## New Contributors
+* @ArthurRenault made their first contribution in [PR #13922](https://github.com/BerriAI/litellm/pull/13922)
+* @stevenmanton made their first contribution in [PR #13919](https://github.com/BerriAI/litellm/pull/13919)
+* @uc4w6c made their first contribution in [PR #13914](https://github.com/BerriAI/litellm/pull/13914)
+* @nielsbosma made their first contribution in [PR #13573](https://github.com/BerriAI/litellm/pull/13573)
+* @Yuki-Imajuku made their first contribution in [PR #13567](https://github.com/BerriAI/litellm/pull/13567)
+* @codeflash-ai[bot] made their first contribution in [PR #13988](https://github.com/BerriAI/litellm/pull/13988)
+* @ColeFrench made their first contribution in [PR #13978](https://github.com/BerriAI/litellm/pull/13978)
+* @dttran-glo made their first contribution in [PR #13969](https://github.com/BerriAI/litellm/pull/13969)
+* @manascb1344 made their first contribution in [PR #13965](https://github.com/BerriAI/litellm/pull/13965)
+* @DorZion made their first contribution in [PR #13572](https://github.com/BerriAI/litellm/pull/13572)
+* @edwardsamuel made their first contribution in [PR #13536](https://github.com/BerriAI/litellm/pull/13536)
+* @blahgeek made their first contribution in [PR #13374](https://github.com/BerriAI/litellm/pull/13374)
+* @Deviad made their first contribution in [PR #13394](https://github.com/BerriAI/litellm/pull/13394)
+* @XSAM made their first contribution in [PR #13775](https://github.com/BerriAI/litellm/pull/13775)
+* @KRRT7 made their first contribution in [PR #14012](https://github.com/BerriAI/litellm/pull/14012)
+* @ikaadil made their first contribution in [PR #13991](https://github.com/BerriAI/litellm/pull/13991)
+* @timelfrink made their first contribution in [PR #13691](https://github.com/BerriAI/litellm/pull/13691)
+* @qidu made their first contribution in [PR #13562](https://github.com/BerriAI/litellm/pull/13562)
+* @nagyv made their first contribution in [PR #13243](https://github.com/BerriAI/litellm/pull/13243)
+* @xywei made their first contribution in [PR #12885](https://github.com/BerriAI/litellm/pull/12885)
+* @ericgtkb made their first contribution in [PR #12797](https://github.com/BerriAI/litellm/pull/12797)
+* @NoWall57 made their first contribution in [PR #13945](https://github.com/BerriAI/litellm/pull/13945)
+* @lmwang9527 made their first contribution in [PR #14050](https://github.com/BerriAI/litellm/pull/14050)
+* @WilsonSunBritten made their first contribution in [PR #14042](https://github.com/BerriAI/litellm/pull/14042)
+* @Const-antine made their first contribution in [PR #14041](https://github.com/BerriAI/litellm/pull/14041)
+* @dmvieira made their first contribution in [PR #14040](https://github.com/BerriAI/litellm/pull/14040)
+* @gotsysdba made their first contribution in [PR #14036](https://github.com/BerriAI/litellm/pull/14036)
+* @moshemorad made their first contribution in [PR #14005](https://github.com/BerriAI/litellm/pull/14005)
+* @joshualipman123 made their first contribution in [PR #13144](https://github.com/BerriAI/litellm/pull/13144)
+
+---
+
+## **[Full Changelog](https://github.com/BerriAI/litellm/compare/v1.76.0-nightly...v1.76.1)**
diff --git a/docs/my-website/release_notes/v1.76.3-stable/index.md b/docs/my-website/release_notes/v1.76.3-stable/index.md
new file mode 100644
index 00000000000..6b40e4f5b35
--- /dev/null
+++ b/docs/my-website/release_notes/v1.76.3-stable/index.md
@@ -0,0 +1,289 @@
+---
+title: "v1.76.3-stable - Performance, Video Generation & CloudZero Integration"
+slug: "v1-76-3"
+date: 2025-09-06T10:00:00
+authors:
+ - name: Krrish Dholakia
+ title: CEO, LiteLLM
+ url: https://www.linkedin.com/in/krish-d/
+ image_url: https://pbs.twimg.com/profile_images/1298587542745358340/DZv3Oj-h_400x400.jpg
+ - name: Ishaan Jaffer
+ title: CTO, LiteLLM
+ url: https://www.linkedin.com/in/reffajnaahsi/
+ image_url: https://pbs.twimg.com/profile_images/1613813310264340481/lz54oEiB_400x400.jpg
+
+hide_table_of_contents: false
+---
+
+import Image from '@theme/IdealImage';
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+:::warning
+
+This release has a known issue where startup is leading to Out of Memory errors when deploying on Kubernetes. We recommend waiting before upgrading to this version.
+
+:::
+
+
+## Deploy this version
+
+
+
+
+``` showLineNumbers title="docker run litellm"
+docker run \
+-e STORE_MODEL_IN_DB=True \
+-p 4000:4000 \
+ghcr.io/berriai/litellm:v1.76.3
+```
+
+
+
+
+``` showLineNumbers title="pip install litellm"
+pip install litellm==1.76.3
+```
+
+
+
+
+---
+
+## Key Highlights
+
+- **Major Performance Improvements** +400 RPS when using correct amount of workers + CPU cores combination
+- **Video Generation Support** - Added Google AI Studio and Vertex AI Veo Video Generation through LiteLLM Pass through routes
+- **CloudZero Integration** - New cost tracking integration for exporting LiteLLM Usage and Spend data to CloudZero.
+
+## Major Changes
+- **Performance Optimization**: LiteLLM Proxy now achieves +400 RPS when using correct amount of CPU cores - [PR #14153](https://github.com/BerriAI/litellm/pull/14153), [PR #14242](https://github.com/BerriAI/litellm/pull/14242)
+
+ By default, LiteLLM will now use `num_workers = os.cpu_count()` to achieve optimal performance.
+
+ **Override Options:**
+
+ Set environment variable:
+ ```bash
+ DEFAULT_NUM_WORKERS_LITELLM_PROXY=1
+ ```
+
+ Or start LiteLLM Proxy with:
+ ```bash
+ litellm --num_workers 1
+ ```
+
+- **Security Fix**: Fixed memory_usage_in_mem_cache cache endpoint vulnerability - [PR #14229](https://github.com/BerriAI/litellm/pull/14229)
+
+---
+
+## Performance Improvements
+
+This release includes significant performance optimizations. On our internal benchmarks we saw 1 instance get +400 RPS when using correct amount of workers + CPU cores combination.
+
+- **+400 RPS Performance Boost** - LiteLLM Proxy now uses correct amount of CPU cores for optimal performance - [PR #14153](https://github.com/BerriAI/litellm/pull/14153)
+- **Default CPU Workers** - Changed DEFAULT_NUM_WORKERS_LITELLM_PROXY default to number of CPUs - [PR #14242](https://github.com/BerriAI/litellm/pull/14242)
+
+
+---
+
+## New Models / Updated Models
+
+#### New Model Support
+
+| Provider | Model | Context Window | Input ($/1M tokens) | Output ($/1M tokens) | Features |
+| ----------- | -------------------------------------- | -------------- | ------------------- | -------------------- | -------- |
+| OpenRouter | `openrouter/openai/gpt-4.1` | 1M | $2.00 | $8.00 | Chat completions with vision |
+| OpenRouter | `openrouter/openai/gpt-4.1-mini` | 1M | $0.40 | $1.60 | Efficient chat completions |
+| OpenRouter | `openrouter/openai/gpt-4.1-nano` | 1M | $0.10 | $0.40 | Ultra-efficient chat |
+| Vertex AI | `vertex_ai/openai/gpt-oss-20b-maas` | 131K | $0.075 | $0.30 | Reasoning support |
+| Vertex AI | `vertex_ai/openai/gpt-oss-120b-maas` | 131K | $0.15 | $0.60 | Advanced reasoning |
+| Gemini | `gemini/veo-3.0-generate-preview` | 1K | - | $0.75/sec | Video generation |
+| Gemini | `gemini/veo-3.0-fast-generate-preview` | 1K | - | $0.40/sec | Fast video generation |
+| Gemini | `gemini/veo-2.0-generate-001` | 1K | - | $0.35/sec | Video generation |
+| Volcengine | `doubao-embedding-large` | 4K | Free | Free | 2048-dim embeddings |
+| Together AI | `together_ai/deepseek-ai/DeepSeek-V3.1` | 128K | $0.60 | $1.70 | Reasoning support |
+
+#### Features
+
+- **[Google Gemini](../../docs/providers/gemini)**
+ - Added 'thoughtSignature' support via 'thinking_blocks' - [PR #14122](https://github.com/BerriAI/litellm/pull/14122)
+ - Added support for reasoning_effort='minimal' for Gemini models - [PR #14262](https://github.com/BerriAI/litellm/pull/14262)
+- **[OpenRouter](../../docs/providers/openrouter)**
+ - Added GPT-4.1 model family - [PR #14101](https://github.com/BerriAI/litellm/pull/14101)
+- **[Groq](../../docs/providers/groq)**
+ - Added support for reasoning_effort parameter - [PR #14207](https://github.com/BerriAI/litellm/pull/14207)
+- **[X.AI](../../docs/providers/xai)**
+ - Fixed XAI cost calculation - [PR #14127](https://github.com/BerriAI/litellm/pull/14127)
+- **[Vertex AI](../../docs/providers/vertex)**
+ - Added support for GPT-OSS models on Vertex AI - [PR #14184](https://github.com/BerriAI/litellm/pull/14184)
+ - Added additionalProperties to Vertex AI Schema definition - [PR #14252](https://github.com/BerriAI/litellm/pull/14252)
+- **[VLLM](../../docs/providers/vllm)**
+ - Handle output parsing responses API output - [PR #14121](https://github.com/BerriAI/litellm/pull/14121)
+- **[Ollama](../../docs/providers/ollama)**
+ - Added unified 'thinking' param support via `reasoning_content` - [PR #14121](https://github.com/BerriAI/litellm/pull/14121)
+- **[Anthropic](../../docs/providers/anthropic)**
+ - Added supported text field to anthropic citation response - [PR #14126](https://github.com/BerriAI/litellm/pull/14126)
+- **[OCI Provider](../../docs/providers/oci)**
+ - Handle assistant messages with both content and tool_calls - [PR #14171](https://github.com/BerriAI/litellm/pull/14171)
+- **[Bedrock](../../docs/providers/bedrock)**
+ - Fixed structure output - [PR #14130](https://github.com/BerriAI/litellm/pull/14130)
+ - Added initial support for Bedrock Batches API - [PR #14190](https://github.com/BerriAI/litellm/pull/14190)
+- **[Databricks](../../docs/providers/databricks)**
+ - Added support for anthropic citation API in Databricks - [PR #14077](https://github.com/BerriAI/litellm/pull/14077)
+
+### Bug Fixes
+- **[Google Gemini (Google AI Studio + Vertex AI)](../../docs/providers/gemini)**
+ - Fixed Gemini 2.5 Pro schema validation with OpenAI-style type arrays in tools - [PR #14154](https://github.com/BerriAI/litellm/pull/14154)
+ - Fixed Gemini Tool Calling empty enum property - [PR #14155](https://github.com/BerriAI/litellm/pull/14155)
+
+#### New Provider Support
+
+- **[Volcengine](../../docs/providers/volcengine)**
+ - Added Volcengine embedding module with handler and transformation logic - [PR #14028](https://github.com/BerriAI/litellm/pull/14028)
+
+---
+
+## LLM API Endpoints
+
+#### Features
+
+- **[Images API](../../docs/image_generation)**
+ - Added pass through image generation and image editing on OpenAI - [PR #14292](https://github.com/BerriAI/litellm/pull/14292)
+ - Support extra_body parameter for image generation - [PR #14211](https://github.com/BerriAI/litellm/pull/14211)
+- **[Responses API](../../docs/response_api)**
+ - Fixed response API for reasoning item in input for litellm proxy - [PR #14200](https://github.com/BerriAI/litellm/pull/14200)
+ - Added structured output for SDK - [PR #14206](https://github.com/BerriAI/litellm/pull/14206)
+- **[Bedrock Passthrough](../../docs/pass_through/bedrock)**
+ - Support AWS_BEDROCK_RUNTIME_ENDPOINT on bedrock passthrough - [PR #14156](https://github.com/BerriAI/litellm/pull/14156)
+- **[Google AI Studio Passthrough](../../docs/pass_through/google_ai_studio)**
+ - Allow using Veo Video Generation through LiteLLM Pass through routes - [PR #14228](https://github.com/BerriAI/litellm/pull/14228)
+- **General**
+ - Added support for safety_identifier parameter in chat.completions.create - [PR #14174](https://github.com/BerriAI/litellm/pull/14174)
+ - Fixed misclassified 500 error on invalid image_url in /chat/completions request - [PR #14149](https://github.com/BerriAI/litellm/pull/14149)
+ - Fixed token count error for Gemini CLI - [PR #14133](https://github.com/BerriAI/litellm/pull/14133)
+
+#### Bugs
+
+- **General**
+ - Remove "/" or ":" from model name when being used as h11 header name - [PR #14191](https://github.com/BerriAI/litellm/pull/14191)
+ - Bug fix for openai.gpt-oss when using reasoning_effort parameter - [PR #14300](https://github.com/BerriAI/litellm/pull/14300)
+
+---
+
+## Spend Tracking, Budgets and Rate Limiting
+
+### Features
+ - Added header support for spend_logs_metadata - [PR #14186](https://github.com/BerriAI/litellm/pull/14186)
+ - Litellm passthrough cost tracking for chat completion - [PR #14256](https://github.com/BerriAI/litellm/pull/14256)
+
+### Bug Fixes
+ - Fixed TPM Rate Limit Bug - [PR #14237](https://github.com/BerriAI/litellm/pull/14237)
+ - Fixed Key Budget not resets at expectable times - [PR #14241](https://github.com/BerriAI/litellm/pull/14241)
+
+
+
+## Management Endpoints / UI
+
+#### Features
+
+- **UI Improvements**
+ - Logs page screen size fixed - [PR #14135](https://github.com/BerriAI/litellm/pull/14135)
+ - Create Organization Tooltip added on Success - [PR #14132](https://github.com/BerriAI/litellm/pull/14132)
+ - Back to Keys should say Back to Logs - [PR #14134](https://github.com/BerriAI/litellm/pull/14134)
+ - Add client side pagination on All Models table - [PR #14136](https://github.com/BerriAI/litellm/pull/14136)
+ - Model Filters UI improvement - [PR #14131](https://github.com/BerriAI/litellm/pull/14131)
+ - Remove table filter on user info page - [PR #14169](https://github.com/BerriAI/litellm/pull/14169)
+ - Team name badge added on the User Details - [PR #14003](https://github.com/BerriAI/litellm/pull/14003)
+ - Fix: Log page parameter passing error - [PR #14193](https://github.com/BerriAI/litellm/pull/14193)
+- **Authentication & Authorization**
+ - Support for ES256/ES384/ES512 and EdDSA JWT verification - [PR #14118](https://github.com/BerriAI/litellm/pull/14118)
+ - Ensure `team_id` is a required field for generating service account keys - [PR #14270](https://github.com/BerriAI/litellm/pull/14270)
+
+#### Bugs
+
+- **General**
+ - Validate store model in db setting - [PR #14269](https://github.com/BerriAI/litellm/pull/14269)
+
+---
+
+## Logging / Guardrail Integrations
+
+#### Features
+
+- **[Datadog](../../docs/proxy/logging#datadog)**
+ - Ensure `apm_id` is set on DD LLM Observability traces - [PR #14272](https://github.com/BerriAI/litellm/pull/14272)
+- **[Braintrust](../../docs/proxy/logging#braintrust)**
+ - Fix logging when OTEL is enabled - [PR #14122](https://github.com/BerriAI/litellm/pull/14122)
+- **[OTEL](../../docs/proxy/logging#otel)**
+ - Optional Metrics and Logs following semantic conventions - [PR #14179](https://github.com/BerriAI/litellm/pull/14179)
+- **[Slack Alerting](../../docs/proxy/alerting)**
+ - Added alert type to alert message to slack for easier handling - [PR #14176](https://github.com/BerriAI/litellm/pull/14176)
+
+#### Guardrails
+ - Added guardrail to the Anthropic API endpoint - [PR #14107](https://github.com/BerriAI/litellm/pull/14107)
+
+#### New Integration
+
+- **[CloudZero](../../docs/proxy/cost_tracking)**
+ - LiteLLM x CloudZero Integration for Cost Tracking - [PR #14296](https://github.com/BerriAI/litellm/pull/14296)
+
+---
+
+## Performance / Loadbalancing / Reliability improvements
+
+#### Features
+
+- **Performance**
+ - LiteLLM Proxy: +400 RPS when using correct amount of CPU cores - [PR #14153](https://github.com/BerriAI/litellm/pull/14153)
+ - Allow using `x-litellm-stream-timeout` header for stream timeout in requests - [PR #14147](https://github.com/BerriAI/litellm/pull/14147)
+ - Change DEFAULT_NUM_WORKERS_LITELLM_PROXY default to number CPUs - [PR #14242](https://github.com/BerriAI/litellm/pull/14242)
+- **Monitoring**
+ - Added Prometheus missing metrics - [PR #14139](https://github.com/BerriAI/litellm/pull/14139)
+- **Timeout**
+ - **Stream Timeout Control** - Allow using `x-litellm-stream-timeout` header for stream timeout in requests - [PR #14147](https://github.com/BerriAI/litellm/pull/14147)
+- **Routing**
+ - Fixed x-litellm-tags not routing with Responses API - [PR #14289](https://github.com/BerriAI/litellm/pull/14289)
+
+#### Bugs
+
+- **Security**
+ - Fixed memory_usage_in_mem_cache cache endpoint vulnerability - [PR #14229](https://github.com/BerriAI/litellm/pull/14229)
+
+---
+
+## General Proxy Improvements
+
+#### Features
+
+- **SCIM Support**
+ - Added better SCIM debugging - [PR #14221](https://github.com/BerriAI/litellm/pull/14221)
+ - Bug fixes for handling SCIM Group Memberships - [PR #14226](https://github.com/BerriAI/litellm/pull/14226)
+- **Kubernetes**
+ - Added optional PodDisruptionBudget for litellm proxy - [PR #14093](https://github.com/BerriAI/litellm/pull/14093)
+- **Error Handling**
+ - Add model to azure error message - [PR #14294](https://github.com/BerriAI/litellm/pull/14294)
+
+---
+
+## New Contributors
+* @iabhi4 made their first contribution in [PR #14093](https://github.com/BerriAI/litellm/pull/14093)
+* @zainhas made their first contribution in [PR #14087](https://github.com/BerriAI/litellm/pull/14087)
+* @LifeDJIK made their first contribution in [PR #14146](https://github.com/BerriAI/litellm/pull/14146)
+* @retanoj made their first contribution in [PR #14133](https://github.com/BerriAI/litellm/pull/14133)
+* @zhxlp made their first contribution in [PR #14193](https://github.com/BerriAI/litellm/pull/14193)
+* @kayoch1n made their first contribution in [PR #14191](https://github.com/BerriAI/litellm/pull/14191)
+* @kutsushitaneko made their first contribution in [PR #14171](https://github.com/BerriAI/litellm/pull/14171)
+* @mjmendo made their first contribution in [PR #14176](https://github.com/BerriAI/litellm/pull/14176)
+* @HarshavardhanK made their first contribution in [PR #14213](https://github.com/BerriAI/litellm/pull/14213)
+* @eycjur made their first contribution in [PR #14207](https://github.com/BerriAI/litellm/pull/14207)
+* @22mSqRi made their first contribution in [PR #14241](https://github.com/BerriAI/litellm/pull/14241)
+* @onlylhf made their first contribution in [PR #14028](https://github.com/BerriAI/litellm/pull/14028)
+* @btpemercier made their first contribution in [PR #11319](https://github.com/BerriAI/litellm/pull/11319)
+* @tremlin made their first contribution in [PR #14287](https://github.com/BerriAI/litellm/pull/14287)
+* @TobiMayr made their first contribution in [PR #14262](https://github.com/BerriAI/litellm/pull/14262)
+* @Eitan1112 made their first contribution in [PR #14252](https://github.com/BerriAI/litellm/pull/14252)
+
+---
+
+## **[Full Changelog](https://github.com/BerriAI/litellm/compare/v1.76.1-nightly...v1.76.3-nightly)**
diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js
index f81ecda3916..72b38596433 100644
--- a/docs/my-website/sidebars.js
+++ b/docs/my-website/sidebars.js
@@ -40,6 +40,7 @@ const sidebars = {
"proxy/guardrails/guardrails_ai",
"proxy/guardrails/lakera_ai",
"proxy/guardrails/model_armor",
+ "proxy/guardrails/noma_security",
"proxy/guardrails/openai_moderation",
"proxy/guardrails/pangea",
"proxy/guardrails/pillar_security",
@@ -108,6 +109,7 @@ const sidebars = {
type: "category",
label: "Setup & Deployment",
items: [
+ "proxy/quick_start",
"proxy/deploy",
"proxy/prod",
"proxy/cli",
@@ -259,6 +261,7 @@ const sidebars = {
"completion/input",
"completion/output",
"completion/usage",
+ "completion/http_handler_config",
],
},
"response_api",
@@ -462,6 +465,7 @@ const sidebars = {
"providers/replicate",
"providers/togetherai",
"providers/v0",
+ "providers/vercel_ai_gateway",
"providers/morph",
"providers/lambda_ai",
"providers/novita",
@@ -479,7 +483,9 @@ const sidebars = {
"providers/nebius",
"providers/dashscope",
"providers/bytez",
+ "providers/heroku",
"providers/oci",
+ "providers/datarobot",
],
},
{
@@ -491,6 +497,7 @@ const sidebars = {
"guides/finetuned_models",
"guides/security_settings",
"completion/audio",
+ "completion/image_generation_chat",
"completion/web_search",
"completion/document_understanding",
"completion/vision",
diff --git a/enterprise/litellm_enterprise/enterprise_callbacks/llm_guard.py b/enterprise/litellm_enterprise/enterprise_callbacks/llm_guard.py
index 6735998960b..e290013248d 100644
--- a/enterprise/litellm_enterprise/enterprise_callbacks/llm_guard.py
+++ b/enterprise/litellm_enterprise/enterprise_callbacks/llm_guard.py
@@ -63,7 +63,7 @@ class _ENTERPRISE_LLMGuard(CustomLogger):
analyze_url, json=analyze_payload
) as response:
redacted_text = await response.json()
- verbose_proxy_logger.info(
+ verbose_proxy_logger.debug(
f"LLM Guard: Received response - {redacted_text}"
)
if redacted_text is not None:
diff --git a/enterprise/litellm_enterprise/integrations/prometheus.py b/enterprise/litellm_enterprise/integrations/prometheus.py
index a2d781fa1c4..efee1a7783e 100644
--- a/enterprise/litellm_enterprise/integrations/prometheus.py
+++ b/enterprise/litellm_enterprise/integrations/prometheus.py
@@ -95,13 +95,14 @@ class PrometheusLogger(CustomLogger):
self.litellm_llm_api_time_to_first_token_metric = self._histogram_factory(
"litellm_llm_api_time_to_first_token_metric",
"Time to first token for a models LLM API call",
- labelnames=[
- "model",
- "hashed_api_key",
- "api_key_alias",
- "team",
- "team_alias",
- ],
+ # labelnames=[
+ # "model",
+ # "hashed_api_key",
+ # "api_key_alias",
+ # "team",
+ # "team_alias",
+ # ],
+ labelnames=self.get_labels_for_metric("litellm_llm_api_time_to_first_token_metric"),
buckets=LATENCY_BUCKETS,
)
@@ -109,15 +110,7 @@ class PrometheusLogger(CustomLogger):
self.litellm_spend_metric = self._counter_factory(
"litellm_spend_metric",
"Total spend on LLM requests",
- labelnames=[
- "end_user",
- "hashed_api_key",
- "api_key_alias",
- "model",
- "team",
- "team_alias",
- "user",
- ],
+ labelnames=self.get_labels_for_metric("litellm_spend_metric"),
)
# Counter for total_output_tokens
@@ -243,25 +236,18 @@ class PrometheusLogger(CustomLogger):
labelnames=["api_provider"],
)
- # Get all keys
- _logged_llm_labels = [
- UserAPIKeyLabelNames.v2_LITELLM_MODEL_NAME.value,
- UserAPIKeyLabelNames.MODEL_ID.value,
- UserAPIKeyLabelNames.API_BASE.value,
- UserAPIKeyLabelNames.API_PROVIDER.value,
- ]
-
# Metric for deployment state
self.litellm_deployment_state = self._gauge_factory(
"litellm_deployment_state",
"LLM Deployment Analytics - The state of the deployment: 0 = healthy, 1 = partial outage, 2 = complete outage",
- labelnames=_logged_llm_labels,
+ labelnames=self.get_labels_for_metric("litellm_deployment_state")
)
self.litellm_deployment_cooled_down = self._counter_factory(
"litellm_deployment_cooled_down",
"LLM Deployment Analytics - Number of times a deployment has been cooled down by LiteLLM load balancing logic. exception_status is the status of the exception that caused the deployment to be cooled down",
- labelnames=_logged_llm_labels + [EXCEPTION_STATUS],
+ # labelnames=_logged_llm_labels + [EXCEPTION_STATUS],
+ labelnames=self.get_labels_for_metric("litellm_deployment_cooled_down")
)
self.litellm_deployment_success_responses = self._counter_factory(
@@ -327,6 +313,7 @@ class PrometheusLogger(CustomLogger):
documentation="deprecated - use litellm_proxy_total_requests_metric. Total number of LLM calls to litellm - track total per API Key, team, user",
labelnames=self.get_labels_for_metric("litellm_requests_metric"),
)
+
except Exception as e:
print_verbose(f"Got exception on init prometheus client {str(e)}")
raise e
diff --git a/enterprise/litellm_enterprise/proxy/management_endpoints/internal_user_endpoints.py b/enterprise/litellm_enterprise/proxy/management_endpoints/internal_user_endpoints.py
index d17946171bb..e60b4d69905 100644
--- a/enterprise/litellm_enterprise/proxy/management_endpoints/internal_user_endpoints.py
+++ b/enterprise/litellm_enterprise/proxy/management_endpoints/internal_user_endpoints.py
@@ -2,6 +2,8 @@
Enterprise internal user management endpoints
"""
+import os
+
from fastapi import APIRouter, Depends, HTTPException
from litellm.proxy._types import UserAPIKeyAuth
@@ -21,7 +23,7 @@ async def available_enterprise_users(
"""
For keys with `max_users` set, return the list of users that are allowed to use the key.
"""
- from litellm.proxy._types import CommonProxyErrors
+ from litellm.proxy._types import CommonProxyErrors, EnterpriseLicenseData
from litellm.proxy.proxy_server import (
premium_user,
premium_user_data,
@@ -34,10 +36,14 @@ async def available_enterprise_users(
detail={"error": CommonProxyErrors.db_not_connected_error.value},
)
- if premium_user is None:
- raise HTTPException(
- status_code=500, detail={"error": CommonProxyErrors.not_premium_user.value}
- )
+ if not premium_user:
+ # check if SSO is enabled - show 5 user limit
+ from litellm.proxy.auth.auth_utils import _has_user_setup_sso
+
+ if _has_user_setup_sso():
+ premium_user_data = EnterpriseLicenseData(
+ max_users=5,
+ )
# Count number of rows in LiteLLM_UserTable
user_count = await prisma_client.db.litellm_usertable.count()
diff --git a/litellm-proxy-extras/dist/litellm_proxy_extras-0.2.18-py3-none-any.whl b/litellm-proxy-extras/dist/litellm_proxy_extras-0.2.18-py3-none-any.whl
new file mode 100644
index 00000000000..fca66b532ff
Binary files /dev/null and b/litellm-proxy-extras/dist/litellm_proxy_extras-0.2.18-py3-none-any.whl differ
diff --git a/litellm-proxy-extras/dist/litellm_proxy_extras-0.2.18.tar.gz b/litellm-proxy-extras/dist/litellm_proxy_extras-0.2.18.tar.gz
new file mode 100644
index 00000000000..ddd00e8439e
Binary files /dev/null and b/litellm-proxy-extras/dist/litellm_proxy_extras-0.2.18.tar.gz differ
diff --git a/litellm-proxy-extras/pyproject.toml b/litellm-proxy-extras/pyproject.toml
index b1de9c566a7..0cb9c35fa62 100644
--- a/litellm-proxy-extras/pyproject.toml
+++ b/litellm-proxy-extras/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "litellm-proxy-extras"
-version = "0.2.17"
+version = "0.2.18"
description = "Additional files for the LiteLLM Proxy. Reduces the size of the main litellm package."
authors = ["BerriAI"]
readme = "README.md"
@@ -22,7 +22,7 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.commitizen]
-version = "0.2.17"
+version = "0.2.18"
version_files = [
"pyproject.toml:version",
"../requirements.txt:litellm-proxy-extras==",
diff --git a/litellm/__init__.py b/litellm/__init__.py
index b30e9758d45..f6be2bc6f00 100644
--- a/litellm/__init__.py
+++ b/litellm/__init__.py
@@ -67,6 +67,7 @@ from litellm.constants import (
bedrock_embedding_models,
known_tokenizer_config,
BEDROCK_INVOKE_PROVIDERS_LITERAL,
+ BEDROCK_CONVERSE_MODELS,
DEFAULT_MAX_TOKENS,
DEFAULT_SOFT_BUDGET,
DEFAULT_ALLOWED_FAILS,
@@ -145,7 +146,11 @@ _custom_logger_compatible_callbacks_literal = Literal[
"aws_sqs",
"vector_store_pre_call_hook",
"dotprompt",
+ "cloudzero",
]
+configured_cold_storage_logger: Optional[
+ _custom_logger_compatible_callbacks_literal
+] = None
logged_real_time_event_types: Optional[Union[List[str], Literal["*"]]] = None
_known_custom_logger_compatible_callbacks: List = list(
get_args(_custom_logger_compatible_callbacks_literal)
@@ -225,6 +230,7 @@ vertex_location: Optional[str] = None
predibase_tenant_id: Optional[str] = None
togetherai_api_key: Optional[str] = None
cloudflare_api_key: Optional[str] = None
+vercel_ai_gateway_key: Optional[str] = None
baseten_key: Optional[str] = None
llama_api_key: Optional[str] = None
aleph_alpha_key: Optional[str] = None
@@ -233,6 +239,7 @@ novita_api_key: Optional[str] = None
snowflake_key: Optional[str] = None
gradient_ai_api_key: Optional[str] = None
nebius_key: Optional[str] = None
+heroku_key: Optional[str] = None
cometapi_key: Optional[str] = None
common_cloud_provider_auth_params: dict = {
"params": ["project", "region_name", "token"],
@@ -303,7 +310,6 @@ default_in_memory_ttl: Optional[float] = None
default_redis_ttl: Optional[float] = None
default_redis_batch_cache_expiry: Optional[float] = None
model_alias_map: Dict[str, str] = {}
-model_group_alias_map: Dict[str, str] = {}
model_group_settings: Optional["ModelGroupSettings"] = None
max_budget: float = 0.0 # set the max budget across all providers
budget_duration: Optional[str] = (
@@ -431,43 +437,10 @@ organization = None
project = None
config_path = None
vertex_ai_safety_settings: Optional[dict] = None
-BEDROCK_CONVERSE_MODELS = [
- "openai.gpt-oss-20b-1:0",
- "openai.gpt-oss-120b-1:0",
- "anthropic.claude-opus-4-1-20250805-v1:0",
- "anthropic.claude-opus-4-20250514-v1:0",
- "anthropic.claude-sonnet-4-20250514-v1:0",
- "anthropic.claude-3-7-sonnet-20250219-v1:0",
- "anthropic.claude-3-5-haiku-20241022-v1:0",
- "anthropic.claude-3-5-sonnet-20241022-v2:0",
- "anthropic.claude-3-5-sonnet-20240620-v1:0",
- "anthropic.claude-3-opus-20240229-v1:0",
- "anthropic.claude-3-sonnet-20240229-v1:0",
- "anthropic.claude-3-haiku-20240307-v1:0",
- "anthropic.claude-v2",
- "anthropic.claude-v2:1",
- "anthropic.claude-v1",
- "anthropic.claude-instant-v1",
- "ai21.jamba-instruct-v1:0",
- "ai21.jamba-1-5-mini-v1:0",
- "ai21.jamba-1-5-large-v1:0",
- "meta.llama3-70b-instruct-v1:0",
- "meta.llama3-8b-instruct-v1:0",
- "meta.llama3-1-8b-instruct-v1:0",
- "meta.llama3-1-70b-instruct-v1:0",
- "meta.llama3-1-405b-instruct-v1:0",
- "meta.llama3-70b-instruct-v1:0",
- "mistral.mistral-large-2407-v1:0",
- "mistral.mistral-large-2402-v1:0",
- "mistral.mistral-small-2402-v1:0",
- "meta.llama3-2-1b-instruct-v1:0",
- "meta.llama3-2-3b-instruct-v1:0",
- "meta.llama3-2-11b-instruct-v1:0",
- "meta.llama3-2-90b-instruct-v1:0",
-]
####### COMPLETION MODELS ###################
-from typing import Set
+from typing import Set
+
open_ai_chat_completion_models: Set = set()
open_ai_text_completion_models: Set = set()
cohere_models: Set = set()
@@ -482,6 +455,7 @@ vertex_vision_models: Set = set()
vertex_chat_models: Set = set()
vertex_code_chat_models: Set = set()
vertex_ai_image_models: Set = set()
+vertex_ai_video_models: Set = set()
vertex_text_models: Set = set()
vertex_code_text_models: Set = set()
vertex_embedding_models: Set = set()
@@ -490,6 +464,7 @@ vertex_llama3_models: Set = set()
vertex_deepseek_models: Set = set()
vertex_ai_ai21_models: Set = set()
vertex_mistral_models: Set = set()
+vertex_openai_models: Set = set()
ai21_models: Set = set()
ai21_chat_models: Set = set()
nlp_cloud_models: Set = set()
@@ -508,6 +483,7 @@ azure_ai_models: Set = set()
jina_ai_models: Set = set()
voyage_models: Set = set()
infinity_models: Set = set()
+heroku_models: Set = set()
databricks_models: Set = set()
cloudflare_models: Set = set()
codestral_models: Set = set()
@@ -530,6 +506,7 @@ llama_models: Set = set()
nscale_models: Set = set()
nebius_models: Set = set()
nebius_embedding_models: Set = set()
+aiml_models: Set = set()
deepgram_models: Set = set()
elevenlabs_models: Set = set()
dashscope_models: Set = set()
@@ -541,6 +518,8 @@ hyperbolic_models: Set = set()
recraft_models: Set = set()
cometapi_models: Set = set()
oci_models: Set = set()
+vercel_ai_gateway_models: Set = set()
+volcengine_models: Set = set()
def is_bedrock_pricing_only_model(key: str) -> bool:
@@ -598,6 +577,8 @@ def add_known_models():
empower_models.add(key)
elif value.get("litellm_provider") == "openrouter":
openrouter_models.add(key)
+ elif value.get("litellm_provider") == "vercel_ai_gateway":
+ vercel_ai_gateway_models.add(key)
elif value.get("litellm_provider") == "datarobot":
datarobot_models.add(key)
elif value.get("litellm_provider") == "vertex_ai-text-models":
@@ -632,6 +613,12 @@ def add_known_models():
elif value.get("litellm_provider") == "vertex_ai-image-models":
key = key.replace("vertex_ai/", "")
vertex_ai_image_models.add(key)
+ elif value.get("litellm_provider") == "vertex_ai-video-models":
+ key = key.replace("vertex_ai/", "")
+ vertex_ai_video_models.add(key)
+ elif value.get("litellm_provider") == "vertex_ai-openai_models":
+ key = key.replace("vertex_ai/", "")
+ vertex_openai_models.add(key)
elif value.get("litellm_provider") == "ai21":
if value.get("mode") == "chat":
ai21_chat_models.add(key)
@@ -709,6 +696,8 @@ def add_known_models():
nebius_models.add(key)
elif value.get("litellm_provider") == "nebius-embedding-models":
nebius_embedding_models.add(key)
+ elif value.get("litellm_provider") == "aiml":
+ aiml_models.add(key)
elif value.get("litellm_provider") == "assemblyai":
assemblyai_models.add(key)
elif value.get("litellm_provider") == "jina_ai":
@@ -723,6 +712,8 @@ def add_known_models():
deepgram_models.add(key)
elif value.get("litellm_provider") == "elevenlabs":
elevenlabs_models.add(key)
+ elif value.get("litellm_provider") == "heroku":
+ heroku_models.add(key)
elif value.get("litellm_provider") == "dashscope":
dashscope_models.add(key)
elif value.get("litellm_provider") == "moonshot":
@@ -741,6 +732,8 @@ def add_known_models():
cometapi_models.add(key)
elif value.get("litellm_provider") == "oci":
oci_models.add(key)
+ elif value.get("litellm_provider") == "volcengine":
+ volcengine_models.add(key)
add_known_models()
@@ -832,6 +825,9 @@ model_list = list(
| recraft_models
| cometapi_models
| oci_models
+ | heroku_models
+ | vercel_ai_gateway_models
+ | volcengine_models
)
model_list_set = set(model_list)
@@ -850,8 +846,14 @@ models_by_provider: dict = {
"together_ai": together_ai_models,
"baseten": baseten_models,
"openrouter": openrouter_models,
+ "vercel_ai_gateway": vercel_ai_gateway_models,
"datarobot": datarobot_models,
- "vertex_ai": vertex_chat_models | vertex_text_models | vertex_anthropic_models | vertex_vision_models | vertex_language_models | vertex_deepseek_models,
+ "vertex_ai": vertex_chat_models
+ | vertex_text_models
+ | vertex_anthropic_models
+ | vertex_vision_models
+ | vertex_language_models
+ | vertex_deepseek_models,
"ai21": ai21_models,
"bedrock": bedrock_models | bedrock_converse_models,
"petals": petals_models,
@@ -886,6 +888,7 @@ models_by_provider: dict = {
"sambanova": sambanova_models | sambanova_embedding_models,
"novita": novita_models,
"nebius": nebius_models | nebius_embedding_models,
+ "aiml": aiml_models,
"assemblyai": assemblyai_models,
"jina_ai": jina_ai_models,
"snowflake": snowflake_models,
@@ -895,6 +898,7 @@ models_by_provider: dict = {
"featherless_ai": featherless_ai_models,
"deepgram": deepgram_models,
"elevenlabs": elevenlabs_models,
+ "heroku": heroku_models,
"dashscope": dashscope_models,
"moonshot": moonshot_models,
"v0": v0_models,
@@ -904,6 +908,7 @@ models_by_provider: dict = {
"recraft": recraft_models,
"cometapi": cometapi_models,
"oci": oci_models,
+ "volcengine": volcengine_models,
}
# mapping for those models which have larger equivalents
@@ -1147,13 +1152,17 @@ from .llms.topaz.image_variations.transformation import TopazImageVariationConfi
from litellm.llms.openai.completion.transformation import OpenAITextCompletionConfig
from .llms.groq.chat.transformation import GroqChatConfig
from .llms.voyage.embedding.transformation import VoyageEmbeddingConfig
-from .llms.voyage.embedding.transformation_contextual import VoyageContextualEmbeddingConfig
+from .llms.voyage.embedding.transformation_contextual import (
+ VoyageContextualEmbeddingConfig,
+)
from .llms.infinity.embedding.transformation import InfinityEmbeddingConfig
from .llms.azure_ai.chat.transformation import AzureAIStudioConfig
from .llms.mistral.chat.transformation import MistralConfig
from .llms.openai.responses.transformation import OpenAIResponsesAPIConfig
from .llms.azure.responses.transformation import AzureOpenAIResponsesAPIConfig
-from .llms.azure.responses.o_series_transformation import AzureOpenAIOSeriesResponsesAPIConfig
+from .llms.azure.responses.o_series_transformation import (
+ AzureOpenAIOSeriesResponsesAPIConfig,
+)
from .llms.openai.chat.o_series_transformation import (
OpenAIOSeriesConfig as OpenAIO1Config, # maintain backwards compatibility
OpenAIOSeriesConfig,
@@ -1161,6 +1170,7 @@ from .llms.openai.chat.o_series_transformation import (
from .llms.snowflake.chat.transformation import SnowflakeConfig
from .llms.gradient_ai.chat.transformation import GradientAIConfig
+
openaiOSeriesConfig = OpenAIOSeriesConfig()
from .llms.openai.chat.gpt_transformation import (
OpenAIGPTConfig,
@@ -1207,12 +1217,16 @@ from .llms.friendliai.chat.transformation import FriendliaiChatConfig
from .llms.jina_ai.embedding.transformation import JinaAIEmbeddingConfig
from .llms.xai.chat.transformation import XAIChatConfig
from .llms.xai.common_utils import XAIModelInfo
-from .llms.volcengine import VolcEngineConfig
+from .llms.aiml.chat.transformation import AIMLChatConfig
+from .llms.volcengine.chat.transformation import (
+ VolcEngineChatConfig as VolcEngineConfig,
+)
from .llms.codestral.completion.transformation import CodestralTextCompletionConfig
from .llms.azure.azure import (
AzureOpenAIError,
AzureOpenAIAssistantsAPIConfig,
)
+from .llms.heroku.chat.transformation import HerokuChatConfig
from .llms.cometapi.chat.transformation import CometAPIConfig
from .llms.azure.chat.gpt_transformation import AzureOpenAIConfig
from .llms.azure.chat.gpt_5_transformation import AzureOpenAIGPT5Config
@@ -1239,6 +1253,7 @@ from .llms.oci.chat.transformation import OCIChatConfig
from .llms.morph.chat.transformation import MorphChatConfig
from .llms.lambda_ai.chat.transformation import LambdaAIChatConfig
from .llms.hyperbolic.chat.transformation import HyperbolicChatConfig
+from .llms.vercel_ai_gateway.chat.transformation import VercelAIGatewayConfig
from .main import * # type: ignore
from .integrations import *
from .llms.custom_httpx.async_client_cleanup import close_litellm_async_clients
@@ -1246,6 +1261,7 @@ from .exceptions import (
AuthenticationError,
InvalidRequestError,
BadRequestError,
+ ImageFetchError,
NotFoundError,
RateLimitError,
ServiceUnavailableError,
@@ -1270,7 +1286,6 @@ from .router import Router
from .assistants.main import *
from .batches.main import *
from .images.main import *
-from .vector_stores import *
from .batch_completion.main import * # type: ignore
from .rerank_api.main import *
from .llms.anthropic.experimental_pass_through.messages.handler import *
diff --git a/litellm/_logging.py b/litellm/_logging.py
index 8c23994f92a..73902d2fc5a 100644
--- a/litellm/_logging.py
+++ b/litellm/_logging.py
@@ -108,6 +108,7 @@ verbose_router_logger.addHandler(handler)
verbose_proxy_logger.addHandler(handler)
verbose_logger.addHandler(handler)
+
def _suppress_loggers():
"""Suppress noisy loggers at INFO level"""
# Suppress httpx request logging at INFO level
@@ -120,6 +121,7 @@ def _suppress_loggers():
apscheduler_scheduler_logger = logging.getLogger("apscheduler.scheduler")
apscheduler_scheduler_logger.setLevel(logging.WARNING)
+
# Call the suppression function
_suppress_loggers()
@@ -187,6 +189,4 @@ def _is_debugging_on() -> bool:
"""
Returns True if debugging is on
"""
- if verbose_logger.isEnabledFor(logging.DEBUG) or set_verbose is True:
- return True
- return False
+ return verbose_logger.isEnabledFor(logging.DEBUG) or set_verbose is True
diff --git a/litellm/_redis.py b/litellm/_redis.py
index 8371ef5bbc7..bcb305985fc 100644
--- a/litellm/_redis.py
+++ b/litellm/_redis.py
@@ -142,7 +142,10 @@ def create_gcp_iam_redis_connect_func(
"""
def iam_connect(self):
"""Initialize the connection and authenticate using GCP IAM"""
- from redis.exceptions import AuthenticationError, AuthenticationWrongNumberOfArgsError
+ from redis.exceptions import (
+ AuthenticationError,
+ AuthenticationWrongNumberOfArgsError,
+ )
from redis.utils import str_if_bytes
self._parser.on_connect(self)
@@ -395,7 +398,7 @@ def get_redis_async_client(
# Handle GCP IAM authentication for async clusters
redis_connect_func = cluster_kwargs.pop("redis_connect_func", None)
from litellm import get_secret_str
-
+
# Get GCP service account - first try from redis_connect_func, then from environment
gcp_service_account = None
if redis_connect_func and hasattr(redis_connect_func, '_gcp_service_account'):
@@ -403,22 +406,22 @@ def get_redis_async_client(
else:
gcp_service_account = redis_kwargs.get("gcp_service_account") or get_secret_str("REDIS_GCP_SERVICE_ACCOUNT")
- verbose_logger.info(f"DEBUG: Redis cluster kwargs: redis_connect_func={redis_connect_func is not None}, gcp_service_account_provided={gcp_service_account is not None}")
+ verbose_logger.debug(f"DEBUG: Redis cluster kwargs: redis_connect_func={redis_connect_func is not None}, gcp_service_account_provided={gcp_service_account is not None}")
# If GCP IAM is configured (indicated by redis_connect_func), generate access token and use as password
if redis_connect_func and gcp_service_account:
- verbose_logger.info("DEBUG: Generating IAM token for service account (value not logged for security reasons)")
+ verbose_logger.debug("DEBUG: Generating IAM token for service account (value not logged for security reasons)")
try:
# Generate IAM access token using the helper function
access_token = _generate_gcp_iam_access_token(gcp_service_account)
cluster_kwargs["password"] = access_token
- verbose_logger.info("DEBUG: Successfully generated GCP IAM access token for async Redis cluster")
+ verbose_logger.debug("DEBUG: Successfully generated GCP IAM access token for async Redis cluster")
except Exception as e:
verbose_logger.error(f"Failed to generate GCP IAM access token: {e}")
from redis.exceptions import AuthenticationError
raise AuthenticationError("Failed to generate GCP IAM access token")
else:
- verbose_logger.info(f"DEBUG: Not using GCP IAM auth - redis_connect_func={redis_connect_func is not None}, gcp_service_account={gcp_service_account}")
+ verbose_logger.debug(f"DEBUG: Not using GCP IAM auth - redis_connect_func={redis_connect_func is not None}, gcp_service_account_provided={gcp_service_account is not None}")
new_startup_nodes: List[ClusterNode] = []
diff --git a/litellm/batches/main.py b/litellm/batches/main.py
index 3ea0f95157f..0d250779da3 100644
--- a/litellm/batches/main.py
+++ b/litellm/batches/main.py
@@ -14,13 +14,15 @@ import asyncio
import contextvars
import os
from functools import partial
-from typing import Any, Coroutine, Dict, Literal, Optional, Union
+from typing import Any, Coroutine, Dict, Literal, Optional, Union, cast
import httpx
import litellm
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
from litellm.llms.azure.batches.handler import AzureBatchesAPI
+from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
+from litellm.llms.custom_httpx.llm_http_handler import BaseLLMHTTPHandler
from litellm.llms.openai.openai import OpenAIBatchesAPI
from litellm.llms.vertex_ai.batches.handler import VertexAIBatchPrediction
from litellm.secret_managers.main import get_secret_str
@@ -31,13 +33,19 @@ from litellm.types.llms.openai import (
RetrieveBatchRequest,
)
from litellm.types.router import GenericLiteLLMParams
-from litellm.types.utils import LiteLLMBatch
-from litellm.utils import client, get_litellm_params, supports_httpx_timeout
+from litellm.types.utils import LiteLLMBatch, LlmProviders
+from litellm.utils import (
+ ProviderConfigManager,
+ client,
+ get_litellm_params,
+ supports_httpx_timeout,
+)
####### ENVIRONMENT VARIABLES ###################
openai_batches_instance = OpenAIBatchesAPI()
azure_batches_instance = AzureBatchesAPI()
vertex_ai_batches_instance = VertexAIBatchPrediction(gcs_bucket_name="")
+base_llm_http_handler = BaseLLMHTTPHandler()
#################################################
@@ -46,7 +54,7 @@ async def acreate_batch(
completion_window: Literal["24h"],
endpoint: Literal["/v1/chat/completions", "/v1/embeddings", "/v1/completions"],
input_file_id: str,
- custom_llm_provider: Literal["openai", "azure", "vertex_ai"] = "openai",
+ custom_llm_provider: Literal["openai", "azure", "vertex_ai", "bedrock"] = "openai",
metadata: Optional[Dict[str, str]] = None,
extra_headers: Optional[Dict[str, str]] = None,
extra_body: Optional[Dict[str, str]] = None,
@@ -94,7 +102,7 @@ def create_batch(
completion_window: Literal["24h"],
endpoint: Literal["/v1/chat/completions", "/v1/embeddings", "/v1/completions"],
input_file_id: str,
- custom_llm_provider: Literal["openai", "azure", "vertex_ai"] = "openai",
+ custom_llm_provider: Literal["openai", "azure", "vertex_ai", "bedrock"] = "openai",
metadata: Optional[Dict[str, str]] = None,
extra_headers: Optional[Dict[str, str]] = None,
extra_body: Optional[Dict[str, str]] = None,
@@ -111,8 +119,8 @@ def create_batch(
proxy_server_request = kwargs.get("proxy_server_request", None)
model_info = kwargs.get("model_info", None)
_is_async = kwargs.pop("acreate_batch", False) is True
- litellm_params = get_litellm_params(**kwargs)
- litellm_logging_obj: LiteLLMLoggingObj = kwargs.get("litellm_logging_obj", None)
+ litellm_params = dict(GenericLiteLLMParams(**kwargs))
+ litellm_logging_obj: LiteLLMLoggingObj = cast(LiteLLMLoggingObj, kwargs.get("litellm_logging_obj", None))
### TIMEOUT LOGIC ###
timeout = optional_params.timeout or kwargs.get("request_timeout", 600) or 600
litellm_logging_obj.update_environment_variables(
@@ -142,6 +150,7 @@ def create_batch(
timeout = float(timeout) # type: ignore
elif timeout is None:
timeout = 600.0
+
_create_batch_request = CreateBatchRequest(
completion_window=completion_window,
@@ -151,6 +160,27 @@ def create_batch(
extra_headers=extra_headers,
extra_body=extra_body,
)
+ provider_config = ProviderConfigManager.get_provider_batches_config(
+ model="",
+ provider=LlmProviders(custom_llm_provider),
+ )
+ if provider_config is not None:
+ response = base_llm_http_handler.create_batch(
+ provider_config=provider_config,
+ litellm_params=litellm_params,
+ create_batch_data=_create_batch_request,
+ headers=extra_headers or {},
+ api_base=optional_params.api_base,
+ api_key=optional_params.api_key,
+ logging_obj=litellm_logging_obj,
+ _is_async=_is_async,
+ client=client
+ if client is not None
+ and isinstance(client, (HTTPHandler, AsyncHTTPHandler))
+ else None,
+ timeout=timeout,
+ )
+ return response
api_base: Optional[str] = None
if custom_llm_provider == "openai":
# for deepinfra/perplexity/anyscale/groq we check in get_llm_provider and pass in the api base from there
@@ -322,20 +352,21 @@ def retrieve_batch(
"""
try:
optional_params = GenericLiteLLMParams(**kwargs)
- litellm_logging_obj: LiteLLMLoggingObj = kwargs.get("litellm_logging_obj", None)
+ litellm_logging_obj: Optional[LiteLLMLoggingObj] = kwargs.get("litellm_logging_obj", None)
### TIMEOUT LOGIC ###
timeout = optional_params.timeout or kwargs.get("request_timeout", 600) or 600
litellm_params = get_litellm_params(
custom_llm_provider=custom_llm_provider,
**kwargs,
)
- litellm_logging_obj.update_environment_variables(
- model=None,
- user=None,
- optional_params=optional_params.model_dump(),
- litellm_params=litellm_params,
- custom_llm_provider=custom_llm_provider,
- )
+ if litellm_logging_obj is not None:
+ litellm_logging_obj.update_environment_variables(
+ model=None,
+ user=None,
+ optional_params=optional_params.model_dump(),
+ litellm_params=litellm_params,
+ custom_llm_provider=custom_llm_provider,
+ )
if (
timeout is not None
diff --git a/litellm/caching/caching_handler.py b/litellm/caching/caching_handler.py
index 1dcc0f1fdb2..9526c4a2f39 100644
--- a/litellm/caching/caching_handler.py
+++ b/litellm/caching/caching_handler.py
@@ -17,7 +17,6 @@ In each method it will call the appropriate method from caching.py
import asyncio
import datetime
import inspect
-import threading
from typing import (
TYPE_CHECKING,
Any,
@@ -301,10 +300,12 @@ class LLMCachingHandler:
is_async=False,
)
- threading.Thread(
- target=logging_obj.success_handler,
- args=(cached_result, start_time, end_time, cache_hit),
- ).start()
+ logging_obj.handle_sync_success_callbacks_for_async_calls(
+ result=cached_result,
+ start_time=start_time,
+ end_time=end_time,
+ cache_hit=cache_hit
+ )
cache_key = litellm.cache._get_preset_cache_key_from_kwargs(
**kwargs
)
@@ -530,15 +531,17 @@ class LLMCachingHandler:
end_time (datetime): The end time of the operation.
cache_hit (bool): Whether it was a cache hit.
"""
- asyncio.create_task(
- logging_obj.async_success_handler(
- cached_result, start_time, end_time, cache_hit
+ from litellm.litellm_core_utils.logging_worker import GLOBAL_LOGGING_WORKER
+
+ GLOBAL_LOGGING_WORKER.ensure_initialized_and_enqueue(
+ async_coroutine=logging_obj.async_success_handler(
+ result=cached_result, start_time=start_time, end_time=end_time, cache_hit=cache_hit
)
)
- threading.Thread(
- target=logging_obj.success_handler,
- args=(cached_result, start_time, end_time, cache_hit),
- ).start()
+
+ logging_obj.handle_sync_success_callbacks_for_async_calls(
+ result=cached_result, start_time=start_time, end_time=end_time, cache_hit=cache_hit
+ )
async def _retrieve_from_cache(
self, call_type: str, kwargs: Dict[str, Any], args: Tuple[Any, ...]
diff --git a/litellm/caching/in_memory_cache.py b/litellm/caching/in_memory_cache.py
index 47f911894a3..63869474d47 100644
--- a/litellm/caching/in_memory_cache.py
+++ b/litellm/caching/in_memory_cache.py
@@ -112,14 +112,15 @@ class InMemoryCache(BaseCache):
- 3. the size of in-memory cache is bounded
"""
- for key in list(self.ttl_dict.keys()):
- if self._is_key_expired(key):
- self._remove_key(key)
+ current_time = time.time()
+ expired_keys = [key for key, ttl in self.ttl_dict.items() if current_time > ttl]
+ for key in expired_keys:
+ self._remove_key(key)
- # de-reference the removed item
- # https://www.geeksforgeeks.org/diagnosing-and-fixing-memory-leaks-in-python/
- # One of the most common causes of memory leaks in Python is the retention of objects that are no longer being used.
- # This can occur when an object is referenced by another object, but the reference is never removed.
+ # de-reference the removed item
+ # https://www.geeksforgeeks.org/diagnosing-and-fixing-memory-leaks-in-python/
+ # One of the most common causes of memory leaks in Python is the retention of objects that are no longer being used.
+ # This can occur when an object is referenced by another object, but the reference is never removed.
def allow_ttl_override(self, key: str) -> bool:
"""
diff --git a/litellm/caching/s3_cache.py b/litellm/caching/s3_cache.py
index 15f7a5c1e16..180964605f6 100644
--- a/litellm/caching/s3_cache.py
+++ b/litellm/caching/s3_cache.py
@@ -13,6 +13,7 @@ import asyncio
import json
from functools import partial
from typing import Optional
+from datetime import datetime, timezone, timedelta
from litellm._logging import print_verbose, verbose_logger
@@ -69,11 +70,9 @@ class S3Cache(BaseCache):
if ttl is not None:
cache_control = f"immutable, max-age={ttl}, s-maxage={ttl}"
- import datetime
# Calculate expiration time
- expiration_time = datetime.datetime.now() + datetime.timedelta(seconds=ttl)
-
+ expiration_time = datetime.now(timezone.utc) + timedelta(seconds=ttl)
# Upload the data to S3 with the calculated expiration time
self.s3_client.put_object(
Bucket=self.bucket_name,
@@ -126,6 +125,13 @@ class S3Cache(BaseCache):
)
if cached_response is not None:
+ if "Expires" in cached_response:
+ expires_time = cached_response['Expires']
+ current_time = datetime.now(expires_time.tzinfo)
+
+ if current_time > expires_time:
+ return None
+
# cached_response is in `b{} convert it to ModelResponse
cached_response = (
cached_response["Body"].read().decode("utf-8")
diff --git a/litellm/constants.py b/litellm/constants.py
index 365dfa84510..75c25d9ea9e 100644
--- a/litellm/constants.py
+++ b/litellm/constants.py
@@ -14,6 +14,9 @@ DEFAULT_S3_BATCH_SIZE = int(os.getenv("DEFAULT_S3_BATCH_SIZE", 512))
DEFAULT_SQS_FLUSH_INTERVAL_SECONDS = int(
os.getenv("DEFAULT_SQS_FLUSH_INTERVAL_SECONDS", 10)
)
+DEFAULT_NUM_WORKERS_LITELLM_PROXY = int(
+ os.getenv("DEFAULT_NUM_WORKERS_LITELLM_PROXY", os.cpu_count() or 4)
+)
DEFAULT_SQS_BATCH_SIZE = int(os.getenv("DEFAULT_SQS_BATCH_SIZE", 512))
SQS_SEND_MESSAGE_ACTION = "SendMessage"
SQS_API_VERSION = "2012-11-05"
@@ -48,6 +51,23 @@ SINGLE_DEPLOYMENT_TRAFFIC_FAILURE_THRESHOLD = int(
DEFAULT_REASONING_EFFORT_DISABLE_THINKING_BUDGET = int(
os.getenv("DEFAULT_REASONING_EFFORT_DISABLE_THINKING_BUDGET", 0)
)
+
+# Gemini model-specific minimal thinking budget constants
+DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_FLASH = int(
+ os.getenv("DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_FLASH", 1)
+)
+DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_PRO = int(
+ os.getenv("DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_PRO", 128)
+)
+DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_FLASH_LITE = int(
+ os.getenv("DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_FLASH_LITE", 512)
+)
+
+# Generic fallback for unknown models
+DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET = int(
+ os.getenv("DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET", 128)
+)
+
DEFAULT_REASONING_EFFORT_LOW_THINKING_BUDGET = int(
os.getenv("DEFAULT_REASONING_EFFORT_LOW_THINKING_BUDGET", 1024)
)
@@ -157,6 +177,7 @@ NON_LLM_CONNECTION_TIMEOUT = int(
os.getenv("NON_LLM_CONNECTION_TIMEOUT", 15)
) # timeout for adjacent services (e.g. jwt auth)
MAX_EXCEPTION_MESSAGE_LENGTH = int(os.getenv("MAX_EXCEPTION_MESSAGE_LENGTH", 2000))
+MAX_STRING_LENGTH_PROMPT_IN_DB = int(os.getenv("MAX_STRING_LENGTH_PROMPT_IN_DB", 1000))
BEDROCK_MAX_POLICY_SIZE = int(os.getenv("BEDROCK_MAX_POLICY_SIZE", 75))
REPLICATE_POLLING_DELAY_SECONDS = float(
os.getenv("REPLICATE_POLLING_DELAY_SECONDS", 0.5)
@@ -285,9 +306,11 @@ LITELLM_CHAT_PROVIDERS = [
"dashscope",
"moonshot",
"v0",
+ "heroku",
"oci",
"morph",
"lambda_ai",
+ "vercel_ai_gateway",
]
LITELLM_EMBEDDING_PROVIDERS_SUPPORTING_INPUT_ARRAY_OF_TOKENS = [
@@ -392,6 +415,7 @@ DEFAULT_CHAT_COMPLETION_PARAM_VALUES = {
"reasoning_effort": None,
"thinking": None,
"web_search_options": None,
+ "safety_identifier": None,
}
openai_compatible_endpoints: List = [
@@ -420,6 +444,7 @@ openai_compatible_endpoints: List = [
"https://api.morphllm.com/v1",
"https://api.lambda.ai/v1",
"https://api.hyperbolic.xyz/v1",
+ "https://ai-gateway.vercel.sh/v1",
]
@@ -462,6 +487,8 @@ openai_compatible_providers: List = [
"morph",
"lambda_ai",
"hyperbolic",
+ "vercel_ai_gateway",
+ "aiml",
]
openai_text_completion_compatible_providers: List = (
[ # providers that support `/v1/completions`
@@ -485,190 +512,247 @@ _openai_like_providers: List = [
"watsonx",
] # private helper. similar to openai but require some custom auth / endpoint handling, so can't use the openai sdk
# well supported replicate llms
-replicate_models: set = set([
- # llama replicate supported LLMs
- "replicate/llama-2-70b-chat:2796ee9483c3fd7aa2e171d38f4ca12251a30609463dcfd4cd76703f22e96cdf",
- "a16z-infra/llama-2-13b-chat:2a7f981751ec7fdf87b5b91ad4db53683a98082e9ff7bfd12c8cd5ea85980a52",
- "meta/codellama-13b:1c914d844307b0588599b8393480a3ba917b660c7e9dfae681542b5325f228db",
- # Vicuna
- "replicate/vicuna-13b:6282abe6a492de4145d7bb601023762212f9ddbbe78278bd6771c8b3b2f2a13b",
- "joehoover/instructblip-vicuna13b:c4c54e3c8c97cd50c2d2fec9be3b6065563ccf7d43787fb99f84151b867178fe",
- # Flan T-5
- "daanelson/flan-t5-large:ce962b3f6792a57074a601d3979db5839697add2e4e02696b3ced4c022d4767f",
- # Others
- "replicate/dolly-v2-12b:ef0e1aefc61f8e096ebe4db6b2bacc297daf2ef6899f0f7e001ec445893500e5",
- "replit/replit-code-v1-3b:b84f4c074b807211cd75e3e8b1589b6399052125b4c27106e43d47189e8415ad",
-])
+replicate_models: set = set(
+ [
+ # llama replicate supported LLMs
+ "replicate/llama-2-70b-chat:2796ee9483c3fd7aa2e171d38f4ca12251a30609463dcfd4cd76703f22e96cdf",
+ "a16z-infra/llama-2-13b-chat:2a7f981751ec7fdf87b5b91ad4db53683a98082e9ff7bfd12c8cd5ea85980a52",
+ "meta/codellama-13b:1c914d844307b0588599b8393480a3ba917b660c7e9dfae681542b5325f228db",
+ # Vicuna
+ "replicate/vicuna-13b:6282abe6a492de4145d7bb601023762212f9ddbbe78278bd6771c8b3b2f2a13b",
+ "joehoover/instructblip-vicuna13b:c4c54e3c8c97cd50c2d2fec9be3b6065563ccf7d43787fb99f84151b867178fe",
+ # Flan T-5
+ "daanelson/flan-t5-large:ce962b3f6792a57074a601d3979db5839697add2e4e02696b3ced4c022d4767f",
+ # Others
+ "replicate/dolly-v2-12b:ef0e1aefc61f8e096ebe4db6b2bacc297daf2ef6899f0f7e001ec445893500e5",
+ "replit/replit-code-v1-3b:b84f4c074b807211cd75e3e8b1589b6399052125b4c27106e43d47189e8415ad",
+ ]
+)
-clarifai_models: set = set([
- "clarifai/meta.Llama-3.Llama-3-8B-Instruct",
- "clarifai/gcp.generate.gemma-1_1-7b-it",
- "clarifai/mistralai.completion.mixtral-8x22B",
- "clarifai/cohere.generate.command-r-plus",
- "clarifai/databricks.drbx.dbrx-instruct",
- "clarifai/mistralai.completion.mistral-large",
- "clarifai/mistralai.completion.mistral-medium",
- "clarifai/mistralai.completion.mistral-small",
- "clarifai/mistralai.completion.mixtral-8x7B-Instruct-v0_1",
- "clarifai/gcp.generate.gemma-2b-it",
- "clarifai/gcp.generate.gemma-7b-it",
- "clarifai/deci.decilm.deciLM-7B-instruct",
- "clarifai/mistralai.completion.mistral-7B-Instruct",
- "clarifai/gcp.generate.gemini-pro",
- "clarifai/anthropic.completion.claude-v1",
- "clarifai/anthropic.completion.claude-instant-1_2",
- "clarifai/anthropic.completion.claude-instant",
- "clarifai/anthropic.completion.claude-v2",
- "clarifai/anthropic.completion.claude-2_1",
- "clarifai/meta.Llama-2.codeLlama-70b-Python",
- "clarifai/meta.Llama-2.codeLlama-70b-Instruct",
- "clarifai/openai.completion.gpt-3_5-turbo-instruct",
- "clarifai/meta.Llama-2.llama2-7b-chat",
- "clarifai/meta.Llama-2.llama2-13b-chat",
- "clarifai/meta.Llama-2.llama2-70b-chat",
- "clarifai/openai.chat-completion.gpt-4-turbo",
- "clarifai/microsoft.text-generation.phi-2",
- "clarifai/meta.Llama-2.llama2-7b-chat-vllm",
- "clarifai/upstage.solar.solar-10_7b-instruct",
- "clarifai/openchat.openchat.openchat-3_5-1210",
- "clarifai/togethercomputer.stripedHyena.stripedHyena-Nous-7B",
- "clarifai/gcp.generate.text-bison",
- "clarifai/meta.Llama-2.llamaGuard-7b",
- "clarifai/fblgit.una-cybertron.una-cybertron-7b-v2",
- "clarifai/openai.chat-completion.GPT-4",
- "clarifai/openai.chat-completion.GPT-3_5-turbo",
- "clarifai/ai21.complete.Jurassic2-Grande",
- "clarifai/ai21.complete.Jurassic2-Grande-Instruct",
- "clarifai/ai21.complete.Jurassic2-Jumbo-Instruct",
- "clarifai/ai21.complete.Jurassic2-Jumbo",
- "clarifai/ai21.complete.Jurassic2-Large",
- "clarifai/cohere.generate.cohere-generate-command",
- "clarifai/wizardlm.generate.wizardCoder-Python-34B",
- "clarifai/wizardlm.generate.wizardLM-70B",
- "clarifai/tiiuae.falcon.falcon-40b-instruct",
- "clarifai/togethercomputer.RedPajama.RedPajama-INCITE-7B-Chat",
- "clarifai/gcp.generate.code-gecko",
- "clarifai/gcp.generate.code-bison",
- "clarifai/mistralai.completion.mistral-7B-OpenOrca",
- "clarifai/mistralai.completion.openHermes-2-mistral-7B",
- "clarifai/wizardlm.generate.wizardLM-13B",
- "clarifai/huggingface-research.zephyr.zephyr-7B-alpha",
- "clarifai/wizardlm.generate.wizardCoder-15B",
- "clarifai/microsoft.text-generation.phi-1_5",
- "clarifai/databricks.Dolly-v2.dolly-v2-12b",
- "clarifai/bigcode.code.StarCoder",
- "clarifai/salesforce.xgen.xgen-7b-8k-instruct",
- "clarifai/mosaicml.mpt.mpt-7b-instruct",
- "clarifai/anthropic.completion.claude-3-opus",
- "clarifai/anthropic.completion.claude-3-sonnet",
- "clarifai/gcp.generate.gemini-1_5-pro",
- "clarifai/gcp.generate.imagen-2",
- "clarifai/salesforce.blip.general-english-image-caption-blip-2",
-])
+clarifai_models: set = set(
+ [
+ "clarifai/meta.Llama-3.Llama-3-8B-Instruct",
+ "clarifai/gcp.generate.gemma-1_1-7b-it",
+ "clarifai/mistralai.completion.mixtral-8x22B",
+ "clarifai/cohere.generate.command-r-plus",
+ "clarifai/databricks.drbx.dbrx-instruct",
+ "clarifai/mistralai.completion.mistral-large",
+ "clarifai/mistralai.completion.mistral-medium",
+ "clarifai/mistralai.completion.mistral-small",
+ "clarifai/mistralai.completion.mixtral-8x7B-Instruct-v0_1",
+ "clarifai/gcp.generate.gemma-2b-it",
+ "clarifai/gcp.generate.gemma-7b-it",
+ "clarifai/deci.decilm.deciLM-7B-instruct",
+ "clarifai/mistralai.completion.mistral-7B-Instruct",
+ "clarifai/gcp.generate.gemini-pro",
+ "clarifai/anthropic.completion.claude-v1",
+ "clarifai/anthropic.completion.claude-instant-1_2",
+ "clarifai/anthropic.completion.claude-instant",
+ "clarifai/anthropic.completion.claude-v2",
+ "clarifai/anthropic.completion.claude-2_1",
+ "clarifai/meta.Llama-2.codeLlama-70b-Python",
+ "clarifai/meta.Llama-2.codeLlama-70b-Instruct",
+ "clarifai/openai.completion.gpt-3_5-turbo-instruct",
+ "clarifai/meta.Llama-2.llama2-7b-chat",
+ "clarifai/meta.Llama-2.llama2-13b-chat",
+ "clarifai/meta.Llama-2.llama2-70b-chat",
+ "clarifai/openai.chat-completion.gpt-4-turbo",
+ "clarifai/microsoft.text-generation.phi-2",
+ "clarifai/meta.Llama-2.llama2-7b-chat-vllm",
+ "clarifai/upstage.solar.solar-10_7b-instruct",
+ "clarifai/openchat.openchat.openchat-3_5-1210",
+ "clarifai/togethercomputer.stripedHyena.stripedHyena-Nous-7B",
+ "clarifai/gcp.generate.text-bison",
+ "clarifai/meta.Llama-2.llamaGuard-7b",
+ "clarifai/fblgit.una-cybertron.una-cybertron-7b-v2",
+ "clarifai/openai.chat-completion.GPT-4",
+ "clarifai/openai.chat-completion.GPT-3_5-turbo",
+ "clarifai/ai21.complete.Jurassic2-Grande",
+ "clarifai/ai21.complete.Jurassic2-Grande-Instruct",
+ "clarifai/ai21.complete.Jurassic2-Jumbo-Instruct",
+ "clarifai/ai21.complete.Jurassic2-Jumbo",
+ "clarifai/ai21.complete.Jurassic2-Large",
+ "clarifai/cohere.generate.cohere-generate-command",
+ "clarifai/wizardlm.generate.wizardCoder-Python-34B",
+ "clarifai/wizardlm.generate.wizardLM-70B",
+ "clarifai/tiiuae.falcon.falcon-40b-instruct",
+ "clarifai/togethercomputer.RedPajama.RedPajama-INCITE-7B-Chat",
+ "clarifai/gcp.generate.code-gecko",
+ "clarifai/gcp.generate.code-bison",
+ "clarifai/mistralai.completion.mistral-7B-OpenOrca",
+ "clarifai/mistralai.completion.openHermes-2-mistral-7B",
+ "clarifai/wizardlm.generate.wizardLM-13B",
+ "clarifai/huggingface-research.zephyr.zephyr-7B-alpha",
+ "clarifai/wizardlm.generate.wizardCoder-15B",
+ "clarifai/microsoft.text-generation.phi-1_5",
+ "clarifai/databricks.Dolly-v2.dolly-v2-12b",
+ "clarifai/bigcode.code.StarCoder",
+ "clarifai/salesforce.xgen.xgen-7b-8k-instruct",
+ "clarifai/mosaicml.mpt.mpt-7b-instruct",
+ "clarifai/anthropic.completion.claude-3-opus",
+ "clarifai/anthropic.completion.claude-3-sonnet",
+ "clarifai/gcp.generate.gemini-1_5-pro",
+ "clarifai/gcp.generate.imagen-2",
+ "clarifai/salesforce.blip.general-english-image-caption-blip-2",
+ ]
+)
-huggingface_models: set = set([
- "meta-llama/Llama-2-7b-hf",
- "meta-llama/Llama-2-7b-chat-hf",
- "meta-llama/Llama-2-13b-hf",
- "meta-llama/Llama-2-13b-chat-hf",
- "meta-llama/Llama-2-70b-hf",
- "meta-llama/Llama-2-70b-chat-hf",
- "meta-llama/Llama-2-7b",
- "meta-llama/Llama-2-7b-chat",
- "meta-llama/Llama-2-13b",
- "meta-llama/Llama-2-13b-chat",
- "meta-llama/Llama-2-70b",
- "meta-llama/Llama-2-70b-chat",
-]) # these have been tested on extensively. But by default all text2text-generation and text-generation models are supported by liteLLM. - https://docs.litellm.ai/docs/providers
-empower_models = set([
- "empower/empower-functions",
- "empower/empower-functions-small",
-])
+huggingface_models: set = set(
+ [
+ "meta-llama/Llama-2-7b-hf",
+ "meta-llama/Llama-2-7b-chat-hf",
+ "meta-llama/Llama-2-13b-hf",
+ "meta-llama/Llama-2-13b-chat-hf",
+ "meta-llama/Llama-2-70b-hf",
+ "meta-llama/Llama-2-70b-chat-hf",
+ "meta-llama/Llama-2-7b",
+ "meta-llama/Llama-2-7b-chat",
+ "meta-llama/Llama-2-13b",
+ "meta-llama/Llama-2-13b-chat",
+ "meta-llama/Llama-2-70b",
+ "meta-llama/Llama-2-70b-chat",
+ ]
+) # these have been tested on extensively. But by default all text2text-generation and text-generation models are supported by liteLLM. - https://docs.litellm.ai/docs/providers
+empower_models = set(
+ [
+ "empower/empower-functions",
+ "empower/empower-functions-small",
+ ]
+)
-together_ai_models: set = set([
- # llama llms - chat
- "togethercomputer/llama-2-70b-chat",
- # llama llms - language / instruct
- "togethercomputer/llama-2-70b",
- "togethercomputer/LLaMA-2-7B-32K",
- "togethercomputer/Llama-2-7B-32K-Instruct",
- "togethercomputer/llama-2-7b",
- # falcon llms
- "togethercomputer/falcon-40b-instruct",
- "togethercomputer/falcon-7b-instruct",
- # alpaca
- "togethercomputer/alpaca-7b",
- # chat llms
- "HuggingFaceH4/starchat-alpha",
- # code llms
- "togethercomputer/CodeLlama-34b",
- "togethercomputer/CodeLlama-34b-Instruct",
- "togethercomputer/CodeLlama-34b-Python",
- "defog/sqlcoder",
- "NumbersStation/nsql-llama-2-7B",
- "WizardLM/WizardCoder-15B-V1.0",
- "WizardLM/WizardCoder-Python-34B-V1.0",
- # language llms
- "NousResearch/Nous-Hermes-Llama2-13b",
- "Austism/chronos-hermes-13b",
- "upstage/SOLAR-0-70b-16bit",
- "WizardLM/WizardLM-70B-V1.0",
-])
- # supports all together ai models, just pass in the model id e.g. completion(model="together_computer/replit_code_3b",...)
+together_ai_models: set = set(
+ [
+ # llama llms - chat
+ "togethercomputer/llama-2-70b-chat",
+ # llama llms - language / instruct
+ "togethercomputer/llama-2-70b",
+ "togethercomputer/LLaMA-2-7B-32K",
+ "togethercomputer/Llama-2-7B-32K-Instruct",
+ "togethercomputer/llama-2-7b",
+ # falcon llms
+ "togethercomputer/falcon-40b-instruct",
+ "togethercomputer/falcon-7b-instruct",
+ # alpaca
+ "togethercomputer/alpaca-7b",
+ # chat llms
+ "HuggingFaceH4/starchat-alpha",
+ # code llms
+ "togethercomputer/CodeLlama-34b",
+ "togethercomputer/CodeLlama-34b-Instruct",
+ "togethercomputer/CodeLlama-34b-Python",
+ "defog/sqlcoder",
+ "NumbersStation/nsql-llama-2-7B",
+ "WizardLM/WizardCoder-15B-V1.0",
+ "WizardLM/WizardCoder-Python-34B-V1.0",
+ # language llms
+ "NousResearch/Nous-Hermes-Llama2-13b",
+ "Austism/chronos-hermes-13b",
+ "upstage/SOLAR-0-70b-16bit",
+ "WizardLM/WizardLM-70B-V1.0",
+ ]
+)
+# supports all together ai models, just pass in the model id e.g. completion(model="together_computer/replit_code_3b",...)
-baseten_models: set = set([
- "qvv0xeq",
- "q841o8w",
- "31dxrj3",
-]) # FALCON 7B # WizardLM # Mosaic ML
+baseten_models: set = set(
+ [
+ "qvv0xeq",
+ "q841o8w",
+ "31dxrj3",
+ ]
+) # FALCON 7B # WizardLM # Mosaic ML
-featherless_ai_models: set = set([
- "featherless-ai/Qwerky-72B",
- "featherless-ai/Qwerky-QwQ-32B",
- "Qwen/Qwen2.5-72B-Instruct",
- "all-hands/openhands-lm-32b-v0.1",
- "Qwen/Qwen2.5-Coder-32B-Instruct",
- "deepseek-ai/DeepSeek-V3-0324",
- "mistralai/Mistral-Small-24B-Instruct-2501",
- "mistralai/Mistral-Nemo-Instruct-2407",
- "ProdeusUnity/Stellar-Odyssey-12b-v0.0",
-])
+featherless_ai_models: set = set(
+ [
+ "featherless-ai/Qwerky-72B",
+ "featherless-ai/Qwerky-QwQ-32B",
+ "Qwen/Qwen2.5-72B-Instruct",
+ "all-hands/openhands-lm-32b-v0.1",
+ "Qwen/Qwen2.5-Coder-32B-Instruct",
+ "deepseek-ai/DeepSeek-V3-0324",
+ "mistralai/Mistral-Small-24B-Instruct-2501",
+ "mistralai/Mistral-Nemo-Instruct-2407",
+ "ProdeusUnity/Stellar-Odyssey-12b-v0.0",
+ ]
+)
-nebius_models: set = set([
- "Qwen/Qwen3-235B-A22B",
- "Qwen/Qwen3-30B-A3B-fast",
- "Qwen/Qwen3-32B",
- "Qwen/Qwen3-14B",
- "nvidia/Llama-3_1-Nemotron-Ultra-253B-v1",
- "deepseek-ai/DeepSeek-V3-0324",
- "deepseek-ai/DeepSeek-V3-0324-fast",
- "deepseek-ai/DeepSeek-R1",
- "deepseek-ai/DeepSeek-R1-fast",
- "meta-llama/Llama-3.3-70B-Instruct-fast",
- "Qwen/Qwen2.5-32B-Instruct-fast",
- "Qwen/Qwen2.5-Coder-32B-Instruct-fast",
-])
+nebius_models: set = set(
+ [
+ # deepseek models
+ "deepseek-ai/DeepSeek-R1-0528",
+ "deepseek-ai/DeepSeek-V3-0324",
+ "deepseek-ai/DeepSeek-V3",
+ "deepseek-ai/DeepSeek-R1",
+ "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
+ # google models
+ "google/gemma-2-2b-it",
+ "google/gemma-2-9b-it-fast",
+ # llama models
+ "meta-llama/Llama-3.3-70B-Instruct",
+ "meta-llama/Meta-Llama-3.1-70B-Instruct",
+ "meta-llama/Meta-Llama-3.1-8B-Instruct",
+ "meta-llama/Meta-Llama-3.1-405B-Instruct",
+ "NousResearch/Hermes-3-Llama-405B",
+ # microsoft models
+ "microsoft/phi-4",
+ # mistral models
+ "mistralai/Mistral-Nemo-Instruct-2407",
+ "mistralai/Devstral-Small-2505",
+ # moonshot models
+ "moonshotai/Kimi-K2-Instruct",
+ # nvidia models
+ "nvidia/Llama-3_1-Nemotron-Ultra-253B-v1",
+ "nvidia/Llama-3_3-Nemotron-Super-49B-v1",
+ # openai models
+ "openai/gpt-oss-120b",
+ "openai/gpt-oss-20b",
+ # qwen models
+ "Qwen/Qwen3-Coder-480B-A35B-Instruct",
+ "Qwen/Qwen3-235B-A22B-Instruct-2507",
+ "Qwen/Qwen3-235B-A22B",
+ "Qwen/Qwen3-30B-A3B",
+ "Qwen/Qwen3-32B",
+ "Qwen/Qwen3-14B",
+ "Qwen/Qwen3-4B-fast",
+ "Qwen/Qwen2.5-Coder-7B",
+ "Qwen/Qwen2.5-Coder-32B-Instruct",
+ "Qwen/Qwen2.5-72B-Instruct",
+ "Qwen/QwQ-32B",
+ "Qwen/Qwen3-30B-A3B-Thinking-2507",
+ "Qwen/Qwen3-30B-A3B-Instruct-2507",
+ # zai models
+ "zai-org/GLM-4.5",
+ "zai-org/GLM-4.5-Air",
+ # other models
+ "aaditya/Llama3-OpenBioLLM-70B",
+ "ProdeusUnity/Stellar-Odyssey-12b-v0.0",
+ "all-hands/openhands-lm-32b-v0.1",
+ ]
+)
-dashscope_models: set = set([
- "qwen-turbo",
- "qwen-plus",
- "qwen-max",
- "qwen-turbo-latest",
- "qwen-plus-latest",
- "qwen-max-latest",
- "qwq-32b",
- "qwen3-235b-a22b",
- "qwen3-32b",
- "qwen3-30b-a3b",
-])
+dashscope_models: set = set(
+ [
+ "qwen-turbo",
+ "qwen-plus",
+ "qwen-max",
+ "qwen-turbo-latest",
+ "qwen-plus-latest",
+ "qwen-max-latest",
+ "qwq-32b",
+ "qwen3-235b-a22b",
+ "qwen3-32b",
+ "qwen3-30b-a3b",
+ ]
+)
-nebius_embedding_models: set = set([
- "BAAI/bge-en-icl",
- "BAAI/bge-multilingual-gemma2",
- "intfloat/e5-mistral-7b-instruct",
-])
+nebius_embedding_models: set = set(
+ [
+ "BAAI/bge-en-icl",
+ "BAAI/bge-multilingual-gemma2",
+ "intfloat/e5-mistral-7b-instruct",
+ ]
+)
BEDROCK_INVOKE_PROVIDERS_LITERAL = Literal[
"cohere",
@@ -682,21 +766,61 @@ BEDROCK_INVOKE_PROVIDERS_LITERAL = Literal[
"deepseek_r1",
]
+BEDROCK_CONVERSE_MODELS = [
+ "openai.gpt-oss-20b-1:0",
+ "openai.gpt-oss-120b-1:0",
+ "anthropic.claude-opus-4-1-20250805-v1:0",
+ "anthropic.claude-opus-4-20250514-v1:0",
+ "anthropic.claude-sonnet-4-20250514-v1:0",
+ "anthropic.claude-3-7-sonnet-20250219-v1:0",
+ "anthropic.claude-3-5-haiku-20241022-v1:0",
+ "anthropic.claude-3-5-sonnet-20241022-v2:0",
+ "anthropic.claude-3-5-sonnet-20240620-v1:0",
+ "anthropic.claude-3-opus-20240229-v1:0",
+ "anthropic.claude-3-sonnet-20240229-v1:0",
+ "anthropic.claude-3-haiku-20240307-v1:0",
+ "anthropic.claude-v2",
+ "anthropic.claude-v2:1",
+ "anthropic.claude-v1",
+ "anthropic.claude-instant-v1",
+ "ai21.jamba-instruct-v1:0",
+ "ai21.jamba-1-5-mini-v1:0",
+ "ai21.jamba-1-5-large-v1:0",
+ "meta.llama3-70b-instruct-v1:0",
+ "meta.llama3-8b-instruct-v1:0",
+ "meta.llama3-1-8b-instruct-v1:0",
+ "meta.llama3-1-70b-instruct-v1:0",
+ "meta.llama3-1-405b-instruct-v1:0",
+ "meta.llama3-70b-instruct-v1:0",
+ "mistral.mistral-large-2407-v1:0",
+ "mistral.mistral-large-2402-v1:0",
+ "mistral.mistral-small-2402-v1:0",
+ "meta.llama3-2-1b-instruct-v1:0",
+ "meta.llama3-2-3b-instruct-v1:0",
+ "meta.llama3-2-11b-instruct-v1:0",
+ "meta.llama3-2-90b-instruct-v1:0",
+]
+
+
open_ai_embedding_models: set = set(["text-embedding-ada-002"])
-cohere_embedding_models: set = set([
- "embed-v4.0",
- "embed-english-v3.0",
- "embed-english-light-v3.0",
- "embed-multilingual-v3.0",
- "embed-english-v2.0",
- "embed-english-light-v2.0",
- "embed-multilingual-v2.0",
-])
-bedrock_embedding_models: set = set([
- "amazon.titan-embed-text-v1",
- "cohere.embed-english-v3",
- "cohere.embed-multilingual-v3",
-])
+cohere_embedding_models: set = set(
+ [
+ "embed-v4.0",
+ "embed-english-v3.0",
+ "embed-english-light-v3.0",
+ "embed-multilingual-v3.0",
+ "embed-english-v2.0",
+ "embed-english-light-v2.0",
+ "embed-multilingual-v2.0",
+ ]
+)
+bedrock_embedding_models: set = set(
+ [
+ "amazon.titan-embed-text-v1",
+ "cohere.embed-english-v3",
+ "cohere.embed-multilingual-v3",
+ ]
+)
known_tokenizer_config = {
"mistralai/Mistral-7B-Instruct-v0.1": {
@@ -767,6 +891,9 @@ AZURE_STORAGE_MSFT_VERSION = "2019-07-07"
PROMETHEUS_BUDGET_METRICS_REFRESH_INTERVAL_MINUTES = int(
os.getenv("PROMETHEUS_BUDGET_METRICS_REFRESH_INTERVAL_MINUTES", 5)
)
+CLOUDZERO_EXPORT_INTERVAL_MINUTES = int(
+ os.getenv("CLOUDZERO_EXPORT_INTERVAL_MINUTES", 60)
+)
MCP_TOOL_NAME_PREFIX = "mcp_tool"
MAXIMUM_TRACEBACK_LINES_TO_LOG = int(os.getenv("MAXIMUM_TRACEBACK_LINES_TO_LOG", 100))
@@ -821,6 +948,8 @@ LITELLM_CLI_SESSION_TOKEN_PREFIX = "litellm-session-token"
########################### DB CRON JOB NAMES ###########################
DB_SPEND_UPDATE_JOB_NAME = "db_spend_update_job"
PROMETHEUS_EMIT_BUDGET_METRICS_JOB_NAME = "prometheus_emit_budget_metrics"
+CLOUDZERO_EXPORT_USAGE_DATA_JOB_NAME = "cloudzero_export_usage_data"
+CLOUDZERO_MAX_FETCHED_DATA_RECORDS = int(os.getenv("CLOUDZERO_MAX_FETCHED_DATA_RECORDS", 50000))
SPEND_LOG_CLEANUP_JOB_NAME = "spend_log_cleanup"
SPEND_LOG_RUN_LOOPS = int(os.getenv("SPEND_LOG_RUN_LOOPS", 500))
SPEND_LOG_CLEANUP_BATCH_SIZE = int(os.getenv("SPEND_LOG_CLEANUP_BATCH_SIZE", 1000))
diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py
index 6c6a09cd73e..01f3e2472f8 100644
--- a/litellm/cost_calculator.py
+++ b/litellm/cost_calculator.py
@@ -57,6 +57,7 @@ from litellm.llms.vertex_ai.cost_calculator import (
cost_per_token as google_cost_per_token,
)
from litellm.llms.vertex_ai.cost_calculator import cost_router as google_cost_router
+from litellm.llms.xai.cost_calculator import cost_per_token as xai_cost_per_token
from litellm.responses.utils import ResponseAPILoggingUtils
from litellm.types.llms.openai import (
HttpxBinaryResponseContent,
@@ -341,6 +342,8 @@ def cost_per_token( # noqa: PLR0915
return deepseek_cost_per_token(model=model, usage=usage_block)
elif custom_llm_provider == "perplexity":
return perplexity_cost_per_token(model=model, usage=usage_block)
+ elif custom_llm_provider == "xai":
+ return xai_cost_per_token(model=model, usage=usage_block)
else:
model_info = _cached_get_model_info_helper(
model=model, custom_llm_provider=custom_llm_provider
@@ -675,9 +678,9 @@ def completion_cost( # noqa: PLR0915
or isinstance(completion_response, dict)
): # tts returns a custom class
if isinstance(completion_response, dict):
- usage_obj: Optional[Union[dict, Usage]] = (
- completion_response.get("usage", {})
- )
+ usage_obj: Optional[
+ Union[dict, Usage]
+ ] = completion_response.get("usage", {})
else:
usage_obj = getattr(completion_response, "usage", {})
if isinstance(usage_obj, BaseModel) and not _is_known_usage_objects(
@@ -1279,7 +1282,9 @@ class BaseTokenUsageProcessor:
not hasattr(combined, "completion_tokens_details")
or not combined.completion_tokens_details
):
- combined.completion_tokens_details = CompletionTokensDetailsWrapper()
+ combined.completion_tokens_details = (
+ CompletionTokensDetailsWrapper()
+ )
# Check what keys exist in the model's completion_tokens_details
for attr in usage.completion_tokens_details.model_fields:
diff --git a/litellm/exceptions.py b/litellm/exceptions.py
index 153230518cc..77fb9c1faef 100644
--- a/litellm/exceptions.py
+++ b/litellm/exceptions.py
@@ -153,6 +153,29 @@ class BadRequestError(openai.BadRequestError): # type: ignore
_message += f", LiteLLM Max Retries: {self.max_retries}"
return _message
+class ImageFetchError(BadRequestError):
+ def __init__(
+ self,
+ message,
+ model=None,
+ llm_provider=None,
+ response: Optional[httpx.Response] = None,
+ litellm_debug_info: Optional[str] = None,
+ max_retries: Optional[int] = None,
+ num_retries: Optional[int] = None,
+ body: Optional[dict] = None,
+ ):
+ super().__init__(
+ message=message,
+ model=model,
+ llm_provider=llm_provider,
+ response=response,
+ litellm_debug_info=litellm_debug_info,
+ max_retries=max_retries,
+ num_retries=num_retries,
+ body=body,
+ )
+
class UnprocessableEntityError(openai.UnprocessableEntityError): # type: ignore
def __init__(
diff --git a/litellm/experimental_mcp_client/client.py b/litellm/experimental_mcp_client/client.py
index 185fe34a3fb..c97da6624ac 100644
--- a/litellm/experimental_mcp_client/client.py
+++ b/litellm/experimental_mcp_client/client.py
@@ -193,6 +193,8 @@ class MCPClient:
headers["Authorization"] = f"Basic {self._mcp_auth_value}"
elif self.auth_type == MCPAuth.api_key:
headers["X-API-Key"] = self._mcp_auth_value
+ elif self.auth_type == MCPAuth.authorization:
+ headers["Authorization"] = self._mcp_auth_value
# Handle protocol version - it might be a string or enum
if hasattr(self.protocol_version, 'value'):
diff --git a/litellm/files/main.py b/litellm/files/main.py
index 5d0dc05771a..299e52895bf 100644
--- a/litellm/files/main.py
+++ b/litellm/files/main.py
@@ -50,7 +50,7 @@ vertex_ai_files_instance = VertexAIFilesHandler()
async def acreate_file(
file: FileTypes,
purpose: Literal["assistants", "batch", "fine-tune"],
- custom_llm_provider: Literal["openai", "azure", "vertex_ai"] = "openai",
+ custom_llm_provider: Literal["openai", "azure", "vertex_ai", "bedrock"] = "openai",
extra_headers: Optional[Dict[str, str]] = None,
extra_body: Optional[Dict[str, str]] = None,
**kwargs,
@@ -94,7 +94,7 @@ async def acreate_file(
def create_file(
file: FileTypes,
purpose: Literal["assistants", "batch", "fine-tune"],
- custom_llm_provider: Optional[Literal["openai", "azure", "vertex_ai"]] = None,
+ custom_llm_provider: Optional[Literal["openai", "azure", "vertex_ai", "bedrock"]] = None,
extra_headers: Optional[Dict[str, str]] = None,
extra_body: Optional[Dict[str, str]] = None,
**kwargs,
@@ -109,7 +109,7 @@ def create_file(
try:
_is_async = kwargs.pop("acreate_file", False) is True
optional_params = GenericLiteLLMParams(**kwargs)
- litellm_params_dict = get_litellm_params(**kwargs)
+ litellm_params_dict = dict(**kwargs)
logging_obj = cast(
Optional[LiteLLMLoggingObj], kwargs.get("litellm_logging_obj")
)
diff --git a/litellm/google_genai/adapters/handler.py b/litellm/google_genai/adapters/handler.py
index 1f575f27591..dcf707ebd51 100644
--- a/litellm/google_genai/adapters/handler.py
+++ b/litellm/google_genai/adapters/handler.py
@@ -37,6 +37,10 @@ class GenerateContentToCompletionHandler:
completion_kwargs: Dict[str, Any] = dict(completion_request)
+ # feed metadata for custom callback
+ if extra_kwargs is not None and "metadata" in extra_kwargs:
+ completion_kwargs["metadata"] = extra_kwargs["metadata"]
+
if stream:
completion_kwargs["stream"] = stream
diff --git a/litellm/images/main.py b/litellm/images/main.py
index 70d9eb41ddd..2a8b62bce24 100644
--- a/litellm/images/main.py
+++ b/litellm/images/main.py
@@ -1,7 +1,7 @@
import asyncio
import contextvars
from functools import partial
-from typing import Any, Coroutine, Dict, Literal, Optional, Union, cast, overload
+from typing import Any, Coroutine, Dict, List, Literal, Optional, Union, cast, overload
import httpx
@@ -90,12 +90,12 @@ async def aimage_generation(*args, **kwargs) -> ImageResponse:
response = init_response
elif asyncio.iscoroutine(init_response):
response = await init_response # type: ignore
-
+
if response is None:
raise ValueError(
"Unable to get Image Response. Please pass a valid llm_provider."
)
-
+
return response
except Exception as e:
custom_llm_provider = custom_llm_provider or "openai"
@@ -108,6 +108,8 @@ async def aimage_generation(*args, **kwargs) -> ImageResponse:
)
+# fmt: off
+
# Overload for when aimg_generation=True (returns Coroutine)
@overload
def image_generation(
@@ -119,7 +121,6 @@ def image_generation(
size: Optional[str] = None,
style: Optional[str] = None,
user: Optional[str] = None,
- input_fidelity: Optional[str] = None,
timeout=600, # default to 10 minutes
api_key: Optional[str] = None,
api_base: Optional[str] = None,
@@ -128,10 +129,11 @@ def image_generation(
*,
aimg_generation: Literal[True],
**kwargs,
-) -> Coroutine[Any, Any, ImageResponse]:
+) -> Coroutine[Any, Any, ImageResponse]:
...
+
# Overload for when aimg_generation=False or not specified (returns ImageResponse)
@overload
def image_generation(
@@ -143,7 +145,6 @@ def image_generation(
size: Optional[str] = None,
style: Optional[str] = None,
user: Optional[str] = None,
- input_fidelity: Optional[str] = None,
timeout=600, # default to 10 minutes
api_key: Optional[str] = None,
api_base: Optional[str] = None,
@@ -152,9 +153,11 @@ def image_generation(
*,
aimg_generation: Literal[False] = False,
**kwargs,
-) -> ImageResponse:
+) -> ImageResponse:
...
+# fmt: on
+
@client
def image_generation( # noqa: PLR0915
@@ -166,7 +169,6 @@ def image_generation( # noqa: PLR0915
size: Optional[str] = None,
style: Optional[str] = None,
user: Optional[str] = None,
- input_fidelity: Optional[str] = None,
timeout=600, # default to 10 minutes
api_key: Optional[str] = None,
api_base: Optional[str] = None,
@@ -174,9 +176,9 @@ def image_generation( # noqa: PLR0915
custom_llm_provider=None,
**kwargs,
) -> Union[
- ImageResponse,
- Coroutine[Any, Any, ImageResponse],
- ]:
+ ImageResponse,
+ Coroutine[Any, Any, ImageResponse],
+]:
"""
Maps the https://api.openai.com/v1/images/generations endpoint.
@@ -227,7 +229,6 @@ def image_generation( # noqa: PLR0915
"quality",
"size",
"style",
- "input_fidelity",
]
litellm_params = all_litellm_params
default_params = openai_params + litellm_params
@@ -255,7 +256,6 @@ def image_generation( # noqa: PLR0915
size=size,
style=style,
user=user,
- input_fidelity=input_fidelity,
custom_llm_provider=custom_llm_provider,
provider_config=image_generation_config,
**non_default_params,
@@ -335,8 +335,34 @@ def image_generation( # noqa: PLR0915
headers=headers,
litellm_params=litellm_params_dict,
)
+ #########################################################
+ # Providers using llm_http_handler
+ #########################################################
+ elif custom_llm_provider in (
+ litellm.LlmProviders.RECRAFT,
+ litellm.LlmProviders.AIML,
+ litellm.LlmProviders.GEMINI,
+ ):
+ if image_generation_config is None:
+ raise ValueError(
+ f"image generation config is not supported for {custom_llm_provider}"
+ )
+
+ return llm_http_handler.image_generation_handler(
+ api_key=api_key,
+ model=model,
+ prompt=prompt,
+ image_generation_provider_config=image_generation_config,
+ image_generation_optional_request_params=optional_params,
+ custom_llm_provider=custom_llm_provider,
+ litellm_params=litellm_params_dict,
+ logging_obj=litellm_logging_obj,
+ timeout=timeout,
+ client=client,
+ )
elif custom_llm_provider == "azure_ai":
from litellm.llms.azure_ai.common_utils import AzureFoundryModelInfo
+
api_base = AzureFoundryModelInfo.get_api_base(api_base)
api_key = AzureFoundryModelInfo.get_api_key(api_key)
if extra_headers is not None:
@@ -397,7 +423,7 @@ def image_generation( # noqa: PLR0915
aimg_generation=aimg_generation,
client=client,
api_base=api_base,
- api_key=api_key
+ api_key=api_key,
)
elif custom_llm_provider == "vertex_ai":
vertex_ai_project = (
@@ -439,27 +465,6 @@ def image_generation( # noqa: PLR0915
api_base=api_base,
client=client,
)
- #########################################################
- # Providers using llm_http_handler
- #########################################################
- elif custom_llm_provider in (
- litellm.LlmProviders.RECRAFT,
- litellm.LlmProviders.GEMINI,
- ):
- if image_generation_config is None:
- raise ValueError(f"image generation config is not supported for {custom_llm_provider}")
-
- return llm_http_handler.image_generation_handler(
- model=model,
- prompt=prompt,
- image_generation_provider_config=image_generation_config,
- image_generation_optional_request_params=optional_params,
- custom_llm_provider=custom_llm_provider,
- litellm_params=litellm_params_dict,
- logging_obj=litellm_logging_obj,
- timeout=timeout,
- client=client,
- )
elif (
custom_llm_provider in litellm._custom_providers
): # Assume custom LLM provider
@@ -675,7 +680,7 @@ def image_variation(
@client
def image_edit(
- image: FileTypes,
+ image: Union[FileTypes, List[FileTypes]],
prompt: str,
model: Optional[str] = None,
mask: Optional[str] = None,
@@ -703,6 +708,9 @@ def image_edit(
litellm_call_id: Optional[str] = kwargs.get("litellm_call_id", None)
_is_async = kwargs.pop("async_call", False) is True
+ # add images / or return a single image
+ images = image if isinstance(image, list) else [image]
+
# get llm provider logic
litellm_params = GenericLiteLLMParams(**kwargs)
model, custom_llm_provider, _, _ = get_llm_provider(
@@ -711,11 +719,11 @@ def image_edit(
)
# get provider config
- image_edit_provider_config: Optional[
- BaseImageEditConfig
- ] = ProviderConfigManager.get_provider_image_edit_config(
- model=model,
- provider=litellm.LlmProviders(custom_llm_provider),
+ image_edit_provider_config: Optional[BaseImageEditConfig] = (
+ ProviderConfigManager.get_provider_image_edit_config(
+ model=model,
+ provider=litellm.LlmProviders(custom_llm_provider),
+ )
)
if image_edit_provider_config is None:
@@ -751,7 +759,7 @@ def image_edit(
# Call the handler with _is_async flag instead of directly calling the async handler
return base_llm_http_handler.image_edit_handler(
model=model,
- image=image,
+ image=images,
prompt=prompt,
image_edit_provider_config=image_edit_provider_config,
image_edit_optional_request_params=image_edit_request_params,
@@ -777,7 +785,7 @@ def image_edit(
@client
async def aimage_edit(
- image: FileTypes,
+ image: Union[FileTypes, List[FileTypes]],
model: str,
prompt: str,
mask: Optional[str] = None,
@@ -817,9 +825,11 @@ async def aimage_edit(
model=model, api_base=local_vars.get("base_url", None)
)
+ images = image if isinstance(image, list) else [image]
+
func = partial(
image_edit,
- image=image,
+ image=images,
prompt=prompt,
mask=mask,
model=model,
diff --git a/litellm/integrations/SlackAlerting/slack_alerting.py b/litellm/integrations/SlackAlerting/slack_alerting.py
index 41db4a551bd..7da38e193b6 100644
--- a/litellm/integrations/SlackAlerting/slack_alerting.py
+++ b/litellm/integrations/SlackAlerting/slack_alerting.py
@@ -805,9 +805,9 @@ class SlackAlerting(CustomBatchLogger):
### UNIQUE CACHE KEY ###
cache_key = provider + region_name
- outage_value: Optional[ProviderRegionOutageModel] = (
- await self.internal_usage_cache.async_get_cache(key=cache_key)
- )
+ outage_value: Optional[
+ ProviderRegionOutageModel
+ ] = await self.internal_usage_cache.async_get_cache(key=cache_key)
if (
getattr(exception, "status_code", None) is None
@@ -1367,12 +1367,13 @@ Model Info:
# Get the current timestamp
current_time = datetime.now().strftime("%H:%M:%S")
_proxy_base_url = os.getenv("PROXY_BASE_URL", None)
+ # Use .name if it's an enum, otherwise use as is
+ alert_type_name = getattr(alert_type, 'name', alert_type)
+ alert_type_formatted = f"Alert type: `{alert_type_name}`"
if alert_type == "daily_reports" or alert_type == "new_model_added":
- formatted_message = message
+ formatted_message = alert_type_formatted + message
else:
- formatted_message = (
- f"Level: `{level}`\nTimestamp: `{current_time}`\n\nMessage: {message}"
- )
+ formatted_message = f"{alert_type_formatted}\nLevel: `{level}`\nTimestamp: `{current_time}`\n\nMessage: {message}"
if kwargs:
for key, value in kwargs.items():
@@ -1388,9 +1389,9 @@ Model Info:
self.alert_to_webhook_url is not None
and alert_type in self.alert_to_webhook_url
):
- slack_webhook_url: Optional[Union[str, List[str]]] = (
- self.alert_to_webhook_url[alert_type]
- )
+ slack_webhook_url: Optional[
+ Union[str, List[str]]
+ ] = self.alert_to_webhook_url[alert_type]
elif self.default_webhook_url is not None:
slack_webhook_url = self.default_webhook_url
else:
diff --git a/litellm/integrations/braintrust_logging.py b/litellm/integrations/braintrust_logging.py
index 5cf403adee4..5bc6afb6dbc 100644
--- a/litellm/integrations/braintrust_logging.py
+++ b/litellm/integrations/braintrust_logging.py
@@ -1,13 +1,11 @@
# What is this?
## Log success + failure events to Braintrust
-import copy
import os
from datetime import datetime
from typing import Dict, Optional
import httpx
-from pydantic import BaseModel
import litellm
from litellm import verbose_logger
@@ -24,7 +22,6 @@ API_BASE = "https://api.braintrustdata.com/v1"
def get_utc_datetime():
import datetime as dt
- from datetime import datetime
if hasattr(dt, "UTC"):
return datetime.now(dt.UTC) # type: ignore
@@ -45,9 +42,9 @@ class BraintrustLogger(CustomLogger):
"Authorization": "Bearer " + self.api_key,
"Content-Type": "application/json",
}
- self._project_id_cache: Dict[
- str, str
- ] = {} # Cache mapping project names to IDs
+ self._project_id_cache: Dict[str, str] = (
+ {}
+ ) # Cache mapping project names to IDs
self.global_braintrust_http_handler = get_async_httpx_client(
llm_provider=httpxSpecialProvider.LoggingCallback
)
@@ -108,43 +105,6 @@ class BraintrustLogger(CustomLogger):
except httpx.HTTPStatusError as e:
raise Exception(f"Failed to register project: {e.response.text}")
- @staticmethod
- def add_metadata_from_header(litellm_params: dict, metadata: dict) -> dict:
- """
- Adds metadata from proxy request headers to Braintrust logging if keys start with "braintrust_"
- and overwrites litellm_params.metadata if already included.
-
- For example if you want to append your trace to an existing `trace_id` via header, send
- `headers: { ..., langfuse_existing_trace_id: your-existing-trace-id }` via proxy request.
- """
- if litellm_params is None:
- return metadata
-
- if litellm_params.get("proxy_server_request") is None:
- return metadata
-
- if metadata is None:
- metadata = {}
-
- proxy_headers = (
- litellm_params.get("proxy_server_request", {}).get("headers", {}) or {}
- )
-
- for metadata_param_key in proxy_headers:
- if metadata_param_key.startswith("braintrust"):
- trace_param_key = metadata_param_key.replace("braintrust", "", 1)
- if trace_param_key in metadata:
- verbose_logger.warning(
- f"Overwriting Braintrust `{trace_param_key}` from request header"
- )
- else:
- verbose_logger.debug(
- f"Found Braintrust `{trace_param_key}` in request header"
- )
- metadata[trace_param_key] = proxy_headers.get(metadata_param_key)
-
- return metadata
-
async def create_default_project_and_experiment(self):
project = await self.global_braintrust_http_handler.post(
f"{self.api_base}/project", headers=self.headers, json={"name": "litellm"}
@@ -169,7 +129,9 @@ class BraintrustLogger(CustomLogger):
verbose_logger.debug("REACHES BRAINTRUST SUCCESS")
try:
litellm_call_id = kwargs.get("litellm_call_id")
+ standard_logging_object = kwargs.get("standard_logging_object", {})
prompt = {"messages": kwargs.get("messages")}
+
output = None
choices = []
if response_obj is not None and (
@@ -192,33 +154,13 @@ class BraintrustLogger(CustomLogger):
):
output = response_obj["data"]
- litellm_params = kwargs.get("litellm_params", {})
- metadata = (
- litellm_params.get("metadata", {}) or {}
- ) # if litellm_params['metadata'] == None
- metadata = self.add_metadata_from_header(litellm_params, metadata)
- clean_metadata = {}
- try:
- metadata = copy.deepcopy(
- metadata
- ) # Avoid modifying the original metadata
- except Exception:
- new_metadata = {}
- for key, value in metadata.items():
- if (
- isinstance(value, list)
- or isinstance(value, dict)
- or isinstance(value, str)
- or isinstance(value, int)
- or isinstance(value, float)
- ):
- new_metadata[key] = copy.deepcopy(value)
- metadata = new_metadata
+ litellm_params = kwargs.get("litellm_params", {}) or {}
+ dynamic_metadata = litellm_params.get("metadata", {}) or {}
# Get project_id from metadata or create default if needed
- project_id = metadata.get("project_id")
+ project_id = dynamic_metadata.get("project_id")
if project_id is None:
- project_name = metadata.get("project_name")
+ project_name = dynamic_metadata.get("project_name")
project_id = (
self.get_project_id_sync(project_name) if project_name else None
)
@@ -229,8 +171,9 @@ class BraintrustLogger(CustomLogger):
project_id = self.default_project_id
tags = []
- if isinstance(metadata, dict):
- for key, value in metadata.items():
+
+ if isinstance(dynamic_metadata, dict):
+ for key, value in dynamic_metadata.items():
# generate langfuse tags - Default Tags sent to Langfuse from LiteLLM Proxy
if (
litellm.langfuse_default_tags is not None
@@ -239,25 +182,12 @@ class BraintrustLogger(CustomLogger):
):
tags.append(f"{key}:{value}")
- # clean litellm metadata before logging
- if key in [
- "headers",
- "endpoint",
- "caching_groups",
- "previous_models",
- ]:
- continue
- else:
- clean_metadata[key] = value
+ if (
+ isinstance(value, str) and key not in standard_logging_object
+ ): # support logging dynamic metadata to braintrust
+ standard_logging_object[key] = value
cost = kwargs.get("response_cost", None)
- if cost is not None:
- clean_metadata["litellm_response_cost"] = cost
-
- # metadata.model is required for braintrust to calculate the "Estimated cost" metric
- litellm_model = kwargs.get("model", None)
- if litellm_model is not None:
- clean_metadata["model"] = litellm_model
metrics: Optional[dict] = None
usage_obj = getattr(response_obj, "usage", None)
@@ -274,12 +204,15 @@ class BraintrustLogger(CustomLogger):
"end": end_time.timestamp(),
}
+ # Allow metadata override for span name
+ span_name = dynamic_metadata.get("span_name", "Chat Completion")
+
request_data = {
"id": litellm_call_id,
"input": prompt["messages"],
- "metadata": clean_metadata,
+ "metadata": standard_logging_object,
"tags": tags,
- "span_attributes": {"name": "Chat Completion", "type": "llm"},
+ "span_attributes": {"name": span_name, "type": "llm"},
}
if choices is not None:
request_data["output"] = [choice.dict() for choice in choices]
@@ -309,6 +242,7 @@ class BraintrustLogger(CustomLogger):
verbose_logger.debug("REACHES BRAINTRUST SUCCESS")
try:
litellm_call_id = kwargs.get("litellm_call_id")
+ standard_logging_object = kwargs.get("standard_logging_object", {})
prompt = {"messages": kwargs.get("messages")}
output = None
choices = []
@@ -333,32 +267,12 @@ class BraintrustLogger(CustomLogger):
output = response_obj["data"]
litellm_params = kwargs.get("litellm_params", {})
- metadata = (
- litellm_params.get("metadata", {}) or {}
- ) # if litellm_params['metadata'] == None
- metadata = self.add_metadata_from_header(litellm_params, metadata)
- clean_metadata = {}
- new_metadata = {}
- for key, value in metadata.items():
- if (
- isinstance(value, list)
- or isinstance(value, str)
- or isinstance(value, int)
- or isinstance(value, float)
- ):
- new_metadata[key] = value
- elif isinstance(value, BaseModel):
- new_metadata[key] = value.model_dump_json()
- elif isinstance(value, dict):
- for k, v in value.items():
- if isinstance(v, datetime):
- value[k] = v.isoformat()
- new_metadata[key] = value
+ dynamic_metadata = litellm_params.get("metadata", {}) or {}
# Get project_id from metadata or create default if needed
- project_id = metadata.get("project_id")
+ project_id = dynamic_metadata.get("project_id")
if project_id is None:
- project_name = metadata.get("project_name")
+ project_name = dynamic_metadata.get("project_name")
project_id = (
await self.get_project_id_async(project_name)
if project_name
@@ -371,8 +285,9 @@ class BraintrustLogger(CustomLogger):
project_id = self.default_project_id
tags = []
- if isinstance(metadata, dict):
- for key, value in metadata.items():
+
+ if isinstance(dynamic_metadata, dict):
+ for key, value in dynamic_metadata.items():
# generate langfuse tags - Default Tags sent to Langfuse from LiteLLM Proxy
if (
litellm.langfuse_default_tags is not None
@@ -381,25 +296,12 @@ class BraintrustLogger(CustomLogger):
):
tags.append(f"{key}:{value}")
- # clean litellm metadata before logging
- if key in [
- "headers",
- "endpoint",
- "caching_groups",
- "previous_models",
- ]:
- continue
- else:
- clean_metadata[key] = value
+ if (
+ isinstance(value, str) and key not in standard_logging_object
+ ): # support logging dynamic metadata to braintrust
+ standard_logging_object[key] = value
cost = kwargs.get("response_cost", None)
- if cost is not None:
- clean_metadata["litellm_response_cost"] = cost
-
- # metadata.model is required for braintrust to calculate the "Estimated cost" metric
- litellm_model = kwargs.get("model", None)
- if litellm_model is not None:
- clean_metadata["model"] = litellm_model
metrics: Optional[dict] = None
usage_obj = getattr(response_obj, "usage", None)
@@ -426,13 +328,16 @@ class BraintrustLogger(CustomLogger):
- api_call_start_time.timestamp()
)
+ # Allow metadata override for span name
+ span_name = dynamic_metadata.get("span_name", "Chat Completion")
+
request_data = {
"id": litellm_call_id,
"input": prompt["messages"],
"output": output,
- "metadata": clean_metadata,
+ "metadata": standard_logging_object,
"tags": tags,
- "span_attributes": {"name": "Chat Completion", "type": "llm"},
+ "span_attributes": {"name": span_name, "type": "llm"},
}
if choices is not None:
request_data["output"] = [choice.dict() for choice in choices]
diff --git a/litellm/integrations/cloudzero/cloudzero.py b/litellm/integrations/cloudzero/cloudzero.py
index 85aa1679732..ca15962b72a 100644
--- a/litellm/integrations/cloudzero/cloudzero.py
+++ b/litellm/integrations/cloudzero/cloudzero.py
@@ -1,14 +1,15 @@
-import asyncio
import os
-from datetime import datetime, timedelta
-from typing import Optional
+from datetime import datetime
+from typing import TYPE_CHECKING, Any, List, Optional, cast
+import litellm
from litellm._logging import verbose_logger
from litellm.integrations.custom_logger import CustomLogger
-from .cz_stream_api import CloudZeroStreamer
-from .database import LiteLLMDatabase
-from .transform import CBFTransformer
+if TYPE_CHECKING:
+ from apscheduler.schedulers.asyncio import AsyncIOScheduler
+else:
+ AsyncIOScheduler = Any
class CloudZeroLogger(CustomLogger):
@@ -29,20 +30,80 @@ class CloudZeroLogger(CustomLogger):
self.api_key = api_key or os.getenv("CLOUDZERO_API_KEY")
self.connection_id = connection_id or os.getenv("CLOUDZERO_CONNECTION_ID")
self.timezone = timezone or os.getenv("CLOUDZERO_TIMEZONE", "UTC")
+ verbose_logger.debug(f"CloudZero Logger initialized with connection ID: {self.connection_id}, timezone: {self.timezone}")
- async def export_usage_data(self, target_hour: datetime, limit: Optional[int] = 1000, operation: str = "replace_hourly"):
+ async def initialize_cloudzero_export_job(self):
"""
- Exports the usage data for a specific hour to CloudZero.
+ Handler for initializing CloudZero export job.
- - Reads spend logs from the DB for the specified hour
+ Runs when CloudZero logger starts up.
+
+ - If redis cache is available, we use the pod lock manager to acquire a lock and export the data.
+ - Ensures only one pod exports the data at a time.
+ - If redis cache is not available, we export the data directly.
+ """
+ from litellm.constants import (
+ CLOUDZERO_EXPORT_USAGE_DATA_JOB_NAME,
+ )
+ from litellm.proxy.proxy_server import proxy_logging_obj
+ pod_lock_manager = proxy_logging_obj.db_spend_update_writer.pod_lock_manager
+
+ # if using redis, ensure only one pod exports the data at a time
+ if pod_lock_manager and pod_lock_manager.redis_cache:
+ if await pod_lock_manager.acquire_lock(
+ cronjob_id=CLOUDZERO_EXPORT_USAGE_DATA_JOB_NAME
+ ):
+ try:
+ await self._hourly_usage_data_export()
+ finally:
+ await pod_lock_manager.release_lock(
+ cronjob_id=CLOUDZERO_EXPORT_USAGE_DATA_JOB_NAME
+ )
+ else:
+ # if not using redis, export the data directly
+ await self._hourly_usage_data_export()
+
+ async def _hourly_usage_data_export(self):
+ """
+ Exports the hourly usage data to CloudZero.
+
+ Start time: 1 hour ago
+ End time: current time
+ """
+ from datetime import timedelta, timezone
+
+ from litellm.constants import CLOUDZERO_MAX_FETCHED_DATA_RECORDS
+ current_time_utc = datetime.now(timezone.utc)
+ one_hour_ago_utc = current_time_utc - timedelta(hours=1)
+ await self.export_usage_data(
+ limit=CLOUDZERO_MAX_FETCHED_DATA_RECORDS,
+ operation="replace_hourly",
+ start_time_utc=one_hour_ago_utc,
+ end_time_utc=current_time_utc
+ )
+
+
+ async def export_usage_data(
+ self,
+ limit: Optional[int] = None,
+ operation: str = "replace_hourly",
+ start_time_utc: Optional[datetime] = None,
+ end_time_utc: Optional[datetime] = None
+ ):
+ """
+ Exports the usage data to CloudZero.
+
+ - Reads data from the DB
- Transforms the data to the CloudZero format
- Sends the data to CloudZero
Args:
- target_hour: The specific hour to export data for
- limit: Optional limit on number of records to export (default: 1000)
+ limit: Optional limit on number of records to export
operation: CloudZero operation type ("replace_hourly" or "sum")
"""
+ from litellm.integrations.cloudzero.cz_stream_api import CloudZeroStreamer
+ from litellm.integrations.cloudzero.database import LiteLLMDatabase
+ from litellm.integrations.cloudzero.transform import CBFTransformer
try:
verbose_logger.debug("CloudZero Logger: Starting usage data export")
@@ -52,11 +113,27 @@ class CloudZeroLogger(CustomLogger):
"CloudZero configuration missing. Please set CLOUDZERO_API_KEY and CLOUDZERO_CONNECTION_ID environment variables."
)
- # Fetch and transform data using helper
- cbf_data = await self._fetch_cbf_data_for_hour(target_hour, limit)
+ # Initialize database connection and load data
+ database = LiteLLMDatabase()
+ verbose_logger.debug("CloudZero Logger: Loading usage data from database")
+ data = await database.get_usage_data(
+ limit=limit,
+ start_time_utc=start_time_utc,
+ end_time_utc=end_time_utc
+ )
+
+ if data.is_empty():
+ verbose_logger.debug("CloudZero Logger: No usage data found to export")
+ return
+
+ verbose_logger.debug(f"CloudZero Logger: Processing {len(data)} records")
+
+ # Transform data to CloudZero CBF format
+ transformer = CBFTransformer()
+ cbf_data = transformer.transform(data)
if cbf_data.is_empty():
- verbose_logger.info("CloudZero Logger: No usage data found to export")
+ verbose_logger.warning("CloudZero Logger: No valid data after transformation")
return
# Send data to CloudZero
@@ -69,65 +146,91 @@ class CloudZeroLogger(CustomLogger):
verbose_logger.debug(f"CloudZero Logger: Transmitting {len(cbf_data)} records to CloudZero")
streamer.send_batched(cbf_data, operation=operation)
- verbose_logger.info(f"CloudZero Logger: Successfully exported {len(cbf_data)} records to CloudZero")
+ verbose_logger.debug(f"CloudZero Logger: Successfully exported {len(cbf_data)} records to CloudZero")
except Exception as e:
verbose_logger.error(f"CloudZero Logger: Error exporting usage data: {str(e)}")
raise
- async def _fetch_cbf_data_for_hour(self, target_hour: datetime, limit: Optional[int] = 1000):
+ async def dry_run_export_usage_data(self, limit: Optional[int] = 10000):
"""
- Helper method to fetch usage data for a specific hour and transform it to CloudZero CBF format.
+ Returns the data that would be exported to CloudZero without actually sending it.
Args:
- target_hour: The specific hour to fetch data for
- limit: Optional limit on number of records to fetch (default: 1000)
+ limit: Limit number of records to display (default: 10000)
Returns:
- CBF formatted data ready for CloudZero ingestion
- """
- # Initialize database connection and load data
- database = LiteLLMDatabase()
- verbose_logger.debug(f"CloudZero Logger: Loading spend logs for hour {target_hour}")
- data = await database.get_usage_data_for_hour(target_hour=target_hour, limit=limit)
-
- if data.is_empty():
- verbose_logger.info("CloudZero Logger: No usage data found for the specified hour")
- return data # Return empty data
-
- verbose_logger.debug(f"CloudZero Logger: Processing {len(data)} records")
-
- # Transform data to CloudZero CBF format
- transformer = CBFTransformer()
- cbf_data = transformer.transform(data)
-
- if cbf_data.is_empty():
- verbose_logger.warning("CloudZero Logger: No valid data after transformation")
-
- return cbf_data
-
- async def dry_run_export_usage_data(self, target_hour: datetime, limit: Optional[int] = 1000):
- """
- Only prints the spend logs data for a specific hour that would be exported to CloudZero.
-
- Args:
- target_hour: The specific hour to export data for
- limit: Limit number of records to display (default: 1000)
+ dict: Contains usage_data, cbf_data, and summary statistics
"""
+ from litellm.integrations.cloudzero.database import LiteLLMDatabase
+ from litellm.integrations.cloudzero.transform import CBFTransformer
try:
verbose_logger.debug("CloudZero Logger: Starting dry run export")
- # Fetch and transform data using helper
- cbf_data = await self._fetch_cbf_data_for_hour(target_hour, limit)
+ # Initialize database connection and load data
+ database = LiteLLMDatabase()
+ verbose_logger.debug("CloudZero Logger: Loading usage data for dry run")
+ data = await database.get_usage_data(limit=limit)
+
+ if data.is_empty():
+ verbose_logger.warning("CloudZero Dry Run: No usage data found")
+ return {
+ "usage_data": [],
+ "cbf_data": [],
+ "summary": {
+ "total_records": 0,
+ "total_cost": 0,
+ "total_tokens": 0,
+ "unique_accounts": 0,
+ "unique_services": 0
+ }
+ }
+
+ verbose_logger.debug(f"CloudZero Dry Run: Processing {len(data)} records...")
+
+ # Convert usage data to dict format for response
+ usage_data_sample = data.head(50).to_dicts() # Return first 50 rows
+
+ # Transform data to CloudZero CBF format
+ transformer = CBFTransformer()
+ cbf_data = transformer.transform(data)
if cbf_data.is_empty():
- verbose_logger.warning("CloudZero Dry Run: No usage data found")
- return
+ verbose_logger.warning("CloudZero Dry Run: No valid data after transformation")
+ return {
+ "usage_data": usage_data_sample,
+ "cbf_data": [],
+ "summary": {
+ "total_records": len(usage_data_sample),
+ "total_cost": sum(row.get('spend', 0) for row in usage_data_sample),
+ "total_tokens": sum(row.get('prompt_tokens', 0) + row.get('completion_tokens', 0) for row in usage_data_sample),
+ "unique_accounts": 0,
+ "unique_services": 0
+ }
+ }
- # Display the transformed data on screen
- self._display_cbf_data_on_screen(cbf_data)
+ # Convert CBF data to dict format for response
+ cbf_data_dict = cbf_data.to_dicts()
- verbose_logger.info(f"CloudZero Logger: Dry run completed for {len(cbf_data)} records")
+ # Calculate summary statistics
+ total_cost = sum(record.get('cost/cost', 0) for record in cbf_data_dict)
+ unique_accounts = len(set(record.get('resource/account', '') for record in cbf_data_dict if record.get('resource/account')))
+ unique_services = len(set(record.get('resource/service', '') for record in cbf_data_dict if record.get('resource/service')))
+ total_tokens = sum(record.get('usage/amount', 0) for record in cbf_data_dict)
+
+ verbose_logger.debug(f"CloudZero Logger: Dry run completed for {len(cbf_data)} records")
+
+ return {
+ "usage_data": usage_data_sample,
+ "cbf_data": cbf_data_dict,
+ "summary": {
+ "total_records": len(cbf_data_dict),
+ "total_cost": total_cost,
+ "total_tokens": total_tokens,
+ "unique_accounts": unique_accounts,
+ "unique_services": unique_services
+ }
+ }
except Exception as e:
verbose_logger.error(f"CloudZero Logger: Error in dry run export: {str(e)}")
@@ -155,6 +258,11 @@ class CloudZeroLogger(CustomLogger):
cbf_table = Table(show_header=True, header_style="bold cyan", box=SIMPLE, padding=(0, 1))
cbf_table.add_column("time/usage_start", style="blue", no_wrap=False)
cbf_table.add_column("cost/cost", style="green", justify="right", no_wrap=False)
+ cbf_table.add_column("entity_type", style="magenta", justify="right", no_wrap=False)
+ cbf_table.add_column("entity_id", style="magenta", justify="right", no_wrap=False)
+ cbf_table.add_column("team_id", style="cyan", no_wrap=False)
+ cbf_table.add_column("team_alias", style="cyan", no_wrap=False)
+ cbf_table.add_column("api_key_alias", style="yellow", no_wrap=False)
cbf_table.add_column("usage/amount", style="yellow", justify="right", no_wrap=False)
cbf_table.add_column("resource/id", style="magenta", no_wrap=False)
cbf_table.add_column("resource/service", style="cyan", no_wrap=False)
@@ -170,10 +278,20 @@ class CloudZeroLogger(CustomLogger):
resource_service = str(record.get('resource/service', 'N/A'))
resource_account = str(record.get('resource/account', 'N/A'))
resource_region = str(record.get('resource/region', 'N/A'))
+ entity_type = str(record.get('entity_type', 'N/A'))
+ entity_id = str(record.get('entity_id', 'N/A'))
+ team_id = str(record.get('resource/tag:team_id', 'N/A'))
+ team_alias = str(record.get('resource/tag:team_alias', 'N/A'))
+ api_key_alias = str(record.get('resource/tag:api_key_alias', 'N/A'))
cbf_table.add_row(
time_usage_start,
cost_cost,
+ entity_type,
+ entity_id,
+ team_id,
+ team_alias,
+ api_key_alias,
usage_amount,
resource_id,
resource_service,
@@ -199,55 +317,33 @@ class CloudZeroLogger(CustomLogger):
console.print(f" Unique Services: {unique_services}")
console.print("\n[dim]💡 This is the CloudZero CBF format ready for AnyCost ingestion[/dim]")
+
+ @staticmethod
+ async def init_cloudzero_background_job(scheduler: AsyncIOScheduler):
+ """
+ Initialize the CloudZero background job.
- async def init_background_job(self, redis_cache=None):
+ Starts the background job that exports the usage data to CloudZero every hour.
"""
- Initialize a background job that exports usage data every hour.
- Uses PodLockManager to ensure only one instance runs the export at a time.
+ from litellm.constants import CLOUDZERO_EXPORT_INTERVAL_MINUTES
+ from litellm.integrations.custom_logger import CustomLogger
- Args:
- redis_cache: Redis cache instance for pod locking
- """
- from litellm.proxy.db.db_transaction_queue.pod_lock_manager import (
- PodLockManager,
+
+ prometheus_loggers: List[CustomLogger] = (
+ litellm.logging_callback_manager.get_custom_loggers_for_type(
+ callback_type=CloudZeroLogger
+ )
)
-
- lock_manager = PodLockManager(redis_cache=redis_cache)
- cronjob_id = "cloudzero_hourly_export"
-
- async def hourly_export_task():
- while True:
- try:
- # Calculate the previous completed hour
- now = datetime.utcnow()
- target_hour = now.replace(minute=0, second=0, microsecond=0)
- # Export data for the previous hour to ensure all data is available
- target_hour = target_hour - timedelta(hours=1)
-
- # Try to acquire lock
- lock_acquired = await lock_manager.acquire_lock(cronjob_id)
-
- if lock_acquired:
- try:
- verbose_logger.info(f"CloudZero Background Job: Starting export for hour {target_hour}")
- await self.export_usage_data(target_hour)
- verbose_logger.info(f"CloudZero Background Job: Completed export for hour {target_hour}")
- finally:
- # Always release the lock
- await lock_manager.release_lock(cronjob_id)
- else:
- verbose_logger.debug("CloudZero Background Job: Another instance is already running the export")
-
- # Wait until the next hour
- next_hour = (datetime.utcnow() + timedelta(hours=1)).replace(minute=0, second=0, microsecond=0)
- sleep_seconds = (next_hour - datetime.utcnow()).total_seconds()
- await asyncio.sleep(sleep_seconds)
-
- except Exception as e:
- verbose_logger.error(f"CloudZero Background Job: Error in hourly export task: {str(e)}")
- # Sleep for 5 minutes before retrying on error
- await asyncio.sleep(300)
-
- # Start the background task
- asyncio.create_task(hourly_export_task())
- verbose_logger.debug("CloudZero Background Job: Initialized hourly export task")
\ No newline at end of file
+ # we need to get the initialized prometheus logger instance(s) and call logger.initialize_remaining_budget_metrics() on them
+ verbose_logger.debug("found %s cloudzero loggers", len(prometheus_loggers))
+ if len(prometheus_loggers) > 0:
+ cloudzero_logger = cast(CloudZeroLogger, prometheus_loggers[0])
+ verbose_logger.debug(
+ "Initializing remaining budget metrics as a cron job executing every %s minutes"
+ % CLOUDZERO_EXPORT_INTERVAL_MINUTES
+ )
+ scheduler.add_job(
+ cloudzero_logger.initialize_cloudzero_export_job,
+ "interval",
+ minutes=CLOUDZERO_EXPORT_INTERVAL_MINUTES
+ )
\ No newline at end of file
diff --git a/litellm/integrations/cloudzero/cz_resource_names.py b/litellm/integrations/cloudzero/cz_resource_names.py
index 44147f9c210..f1098d20381 100644
--- a/litellm/integrations/cloudzero/cz_resource_names.py
+++ b/litellm/integrations/cloudzero/cz_resource_names.py
@@ -17,11 +17,16 @@
"""CloudZero Resource Names (CZRN) generation and validation for LiteLLM resources."""
import re
+from enum import Enum
from typing import Any, cast
import litellm
+class CZEntityType(str, Enum):
+ TEAM = "team"
+
+
class CZRNGenerator:
"""Generate CloudZero Resource Names (CZRNs) for LiteLLM resources."""
@@ -49,8 +54,8 @@ class CZRNGenerator:
region = 'cross-region'
# Use the actual entity_id (team_id or user_id) as the owner account
- entity_id = row.get('entity_id', 'unknown')
- owner_account_id = self._normalize_component(entity_id)
+ team_id = row.get('team_id', 'unknown')
+ owner_account_id = self._normalize_component(team_id)
resource_type = 'llm-usage'
diff --git a/litellm/integrations/cloudzero/database.py b/litellm/integrations/cloudzero/database.py
index 6d12c5cfbd9..71b4125ed75 100644
--- a/litellm/integrations/cloudzero/database.py
+++ b/litellm/integrations/cloudzero/database.py
@@ -12,14 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# CHANGELOG: 2025-07-23 - Added support for using LiteLLM_SpendLogs table for CBF mapping (ishaan-jaff)
# CHANGELOG: 2025-01-19 - Refactored to use daily spend tables for proper CBF mapping (erik.peterson)
# CHANGELOG: 2025-01-19 - Migrated from pandas to polars for database operations (erik.peterson)
# CHANGELOG: 2025-01-19 - Initial database module for LiteLLM data extraction (erik.peterson)
"""Database connection and data extraction for LiteLLM."""
-from datetime import datetime, timedelta
+from datetime import datetime
from typing import Any, Dict, Optional
import polars as pl
@@ -37,61 +36,88 @@ class LiteLLMDatabase:
)
return prisma_client
- async def get_usage_data_for_hour(self, target_hour: datetime, limit: Optional[int] = 1000) -> pl.DataFrame:
- """Retrieve spend logs for a specific hour from LiteLLM_SpendLogs table with batching."""
+ async def get_usage_data(
+ self,
+ limit: Optional[int] = None,
+ start_time_utc: Optional[datetime] = None,
+ end_time_utc: Optional[datetime] = None
+ ) -> pl.DataFrame:
+ """Retrieve usage data from LiteLLM daily user spend table."""
client = self._ensure_prisma_client()
- # Calculate hour range
- hour_start = target_hour.replace(minute=0, second=0, microsecond=0)
- hour_end = hour_start + timedelta(hours=1)
+ # Build WHERE clause for time filtering
+ where_conditions = []
+ if start_time_utc:
+ where_conditions.append(f"dus.created_at >= '{start_time_utc.isoformat()}'")
+ if end_time_utc:
+ where_conditions.append(f"dus.created_at <= '{end_time_utc.isoformat()}'")
- # Convert datetime objects to ISO format strings for PostgreSQL compatibility
- hour_start_str = hour_start.isoformat()
- hour_end_str = hour_end.isoformat()
+ where_clause = ""
+ if where_conditions:
+ where_clause = "WHERE " + " AND ".join(where_conditions)
- # Query to get spend logs for the specific hour
- query = """
- SELECT *
- FROM "LiteLLM_SpendLogs"
- WHERE "startTime" >= $1::timestamp
- AND "startTime" < $2::timestamp
- ORDER BY "startTime" ASC
+ # Query to get user spend data with team information
+ query = f"""
+ SELECT
+ dus.id,
+ dus.date,
+ dus.user_id,
+ dus.api_key,
+ dus.model,
+ dus.model_group,
+ dus.custom_llm_provider,
+ dus.prompt_tokens,
+ dus.completion_tokens,
+ dus.spend,
+ dus.api_requests,
+ dus.successful_requests,
+ dus.failed_requests,
+ dus.cache_creation_input_tokens,
+ dus.cache_read_input_tokens,
+ dus.created_at,
+ dus.updated_at,
+ vt.team_id,
+ vt.key_alias as api_key_alias,
+ tt.team_alias
+ FROM "LiteLLM_DailyUserSpend" dus
+ LEFT JOIN "LiteLLM_VerificationToken" vt ON dus.api_key = vt.token
+ LEFT JOIN "LiteLLM_TeamTable" tt ON vt.team_id = tt.team_id
+ {where_clause}
+ ORDER BY dus.date DESC, dus.created_at DESC
"""
if limit:
query += f" LIMIT {limit}"
try:
- db_response = await client.db.query_raw(query, hour_start_str, hour_end_str)
- # Convert the response to polars DataFrame
- return pl.DataFrame(db_response) if db_response else pl.DataFrame()
+ db_response = await client.db.query_raw(query)
+ # Convert the response to polars DataFrame with full schema inference
+ # This prevents schema mismatch errors when data types vary across rows
+ return pl.DataFrame(db_response, infer_schema_length=None)
except Exception as e:
- raise Exception(f"Error retrieving spend logs for hour {target_hour}: {str(e)}")
-
+ raise Exception(f"Error retrieving usage data: {str(e)}")
async def get_table_info(self) -> Dict[str, Any]:
- """Get information about the LiteLLM_SpendLogs table."""
+ """Get information about the daily user spend table."""
client = self._ensure_prisma_client()
try:
- # Get row count from SpendLogs table
- spend_logs_count = await self._get_table_row_count('LiteLLM_SpendLogs')
+ # Get row count from user spend table
+ user_count = await self._get_table_row_count('LiteLLM_DailyUserSpend')
- # Get column structure from spend logs table
+ # Get column structure from user spend table
query = """
SELECT column_name, data_type, is_nullable
FROM information_schema.columns
- WHERE table_name = 'LiteLLM_SpendLogs'
+ WHERE table_name = 'LiteLLM_DailyUserSpend'
ORDER BY ordinal_position;
"""
columns_response = await client.db.query_raw(query)
return {
'columns': columns_response,
- 'row_count': spend_logs_count,
- 'table_breakdown': {
- 'spend_logs': spend_logs_count
- }
+ 'row_count': user_count,
+ 'table_name': 'LiteLLM_DailyUserSpend'
}
except Exception as e:
raise Exception(f"Error getting table info: {str(e)}")
diff --git a/litellm/integrations/cloudzero/transform.py b/litellm/integrations/cloudzero/transform.py
index 7091ea26b95..e0263295388 100644
--- a/litellm/integrations/cloudzero/transform.py
+++ b/litellm/integrations/cloudzero/transform.py
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# CHANGELOG: 2025-01-19 - Updated CBF transformation for LiteLLM_SpendLogs with hourly aggregation and team_id focus (ishaan-jaff)
+# CHANGELOG: 2025-01-19 - Updated CBF transformation for daily spend tables and proper CloudZero mapping (erik.peterson)
# CHANGELOG: 2025-01-19 - Migrated from pandas to polars for data transformation (erik.peterson)
# CHANGELOG: 2025-01-19 - Initial CBF transformation module (erik.peterson)
@@ -24,7 +24,7 @@ from typing import Any, Optional
import polars as pl
from ...types.integrations.cloudzero import CBFRecord
-from .cz_resource_names import CZRNGenerator
+from .cz_resource_names import CZEntityType, CZRNGenerator
class CBFTransformer:
@@ -35,160 +35,99 @@ class CBFTransformer:
self.czrn_generator = CZRNGenerator()
def transform(self, data: pl.DataFrame) -> pl.DataFrame:
- """Transform LiteLLM SpendLogs data to hourly aggregated CBF format."""
+ """Transform LiteLLM data to CBF format, dropping records with zero successful_requests or invalid CZRNs."""
if data.is_empty():
return pl.DataFrame()
- # Filter out records with zero spend or invalid team_id
+ # Filter out records with zero successful_requests first
original_count = len(data)
- filtered_data = data.filter(
- (pl.col('spend') > 0) &
- (pl.col('team_id').is_not_null()) &
- (pl.col('team_id') != "")
- )
- filtered_count = len(filtered_data)
- zero_spend_dropped = original_count - filtered_count
+ if 'successful_requests' in data.columns:
+ filtered_data = data.filter(pl.col('successful_requests') > 0)
+ zero_requests_dropped = original_count - len(filtered_data)
+ else:
+ filtered_data = data
+ zero_requests_dropped = 0
- if filtered_data.is_empty():
- from rich.console import Console
- console = Console()
- console.print(f"[yellow]⚠️ Dropped all {original_count:,} records due to zero spend or missing team_id[/yellow]")
- return pl.DataFrame()
-
- # Aggregate data to hourly level
- hourly_aggregated = self._aggregate_to_hourly(filtered_data)
-
- # Transform aggregated data to CBF format
cbf_data = []
czrn_dropped_count = 0
-
- for row in hourly_aggregated.iter_rows(named=True):
+ filtered_count = len(filtered_data)
+
+ for row in filtered_data.iter_rows(named=True):
try:
cbf_record = self._create_cbf_record(row)
+ # Only include the record if CZRN generation was successful
cbf_data.append(cbf_record)
except Exception:
# Skip records that fail CZRN generation
czrn_dropped_count += 1
continue
- # Print summary of transformations
+ # Print summary of dropped records if any
from rich.console import Console
console = Console()
- if zero_spend_dropped > 0:
- console.print(f"[yellow]⚠️ Dropped {zero_spend_dropped:,} of {original_count:,} records with zero spend or missing team_id[/yellow]")
+ if zero_requests_dropped > 0:
+ console.print(f"[yellow]⚠️ Dropped {zero_requests_dropped:,} of {original_count:,} records with zero successful_requests[/yellow]")
if czrn_dropped_count > 0:
- console.print(f"[yellow]⚠️ Dropped {czrn_dropped_count:,} of {len(hourly_aggregated):,} aggregated records due to invalid CZRNs[/yellow]")
+ console.print(f"[yellow]⚠️ Dropped {czrn_dropped_count:,} of {filtered_count:,} filtered records due to invalid CZRNs[/yellow]")
if len(cbf_data) > 0:
- console.print(f"[green]✓ Successfully transformed {len(cbf_data):,} hourly aggregated records[/green]")
+ console.print(f"[green]✓ Successfully transformed {len(cbf_data):,} records[/green]")
return pl.DataFrame(cbf_data)
- def _aggregate_to_hourly(self, data: pl.DataFrame) -> pl.DataFrame:
- """Aggregate spend logs to hourly level by team_id, key_name, model, and tags."""
-
- # Extract hour from startTime, skip tags and metadata for now
- data_with_hour = data.with_columns([
- pl.col('startTime').str.to_datetime().dt.truncate('1h').alias('usage_hour'),
- pl.lit([]).cast(pl.List(pl.String)).alias('parsed_tags'), # Empty tags list for now
- pl.lit("").alias('key_name') # Empty key name for now
- ])
-
- # Skip tag explosion for now - just add a null tag column
- all_data = data_with_hour.with_columns([
- pl.lit(None, dtype=pl.String).alias('tag')
- ])
-
- # Group by hour, team_id, key_name, model, provider, and tag
- aggregated = all_data.group_by([
- 'usage_hour',
- 'team_id',
- 'key_name',
- 'model',
- 'model_group',
- 'custom_llm_provider',
- 'tag'
- ]).agg([
- pl.col('spend').sum().alias('total_spend'),
- pl.col('total_tokens').sum().alias('total_tokens'),
- pl.col('prompt_tokens').sum().alias('total_prompt_tokens'),
- pl.col('completion_tokens').sum().alias('total_completion_tokens'),
- pl.col('request_id').count().alias('request_count'),
- pl.col('api_key').first().alias('api_key_sample'), # Keep one for reference
- pl.col('status').filter(pl.col('status') == 'success').count().alias('successful_requests'),
- pl.col('status').filter(pl.col('status') != 'success').count().alias('failed_requests')
- ])
- return aggregated
-
-
def _create_cbf_record(self, row: dict[str, Any]) -> CBFRecord:
- """Create a single CBF record from aggregated hourly spend data."""
+ """Create a single CBF record from LiteLLM daily spend row."""
- # Helper function to extract scalar values from polars data
- def extract_scalar(value):
- if hasattr(value, 'item') and not isinstance(value, (str, int, float, bool)):
- return value.item() if value is not None else None
- return value
+ # Parse date (daily spend tables use date strings like '2025-04-19')
+ usage_date = self._parse_date(row.get('date'))
- # Use the aggregated hour as usage time
- usage_time = self._parse_datetime(extract_scalar(row.get('usage_hour')))
-
- # Use team_id as the primary entity_id
- entity_id = str(extract_scalar(row.get('team_id', '')))
- key_name = str(extract_scalar(row.get('key_name', '')))
- model = str(extract_scalar(row.get('model', '')))
- model_group = str(extract_scalar(row.get('model_group', '')))
- provider = str(extract_scalar(row.get('custom_llm_provider', '')))
- tag = extract_scalar(row.get('tag'))
-
- # Calculate aggregated metrics
- total_spend = float(extract_scalar(row.get('total_spend', 0.0)) or 0.0)
- total_tokens = int(extract_scalar(row.get('total_tokens', 0)) or 0)
- total_prompt_tokens = int(extract_scalar(row.get('total_prompt_tokens', 0)) or 0)
- total_completion_tokens = int(extract_scalar(row.get('total_completion_tokens', 0)) or 0)
- request_count = int(extract_scalar(row.get('request_count', 0)) or 0)
- successful_requests = int(extract_scalar(row.get('successful_requests', 0)) or 0)
- failed_requests = int(extract_scalar(row.get('failed_requests', 0)) or 0)
+ # Calculate total tokens
+ prompt_tokens = int(row.get('prompt_tokens', 0))
+ completion_tokens = int(row.get('completion_tokens', 0))
+ total_tokens = prompt_tokens + completion_tokens
# Create CloudZero Resource Name (CZRN) as resource_id
- # Create a mock row for CZRN generation with team_id as entity_id
- czrn_row = {
- 'entity_id': entity_id,
- 'entity_type': 'team',
- 'model': model,
- 'custom_llm_provider': provider,
- 'api_key': str(extract_scalar(row.get('api_key_sample', '')))
- }
- resource_id = self.czrn_generator.create_from_litellm_data(czrn_row)
+ resource_id = self.czrn_generator.create_from_litellm_data(row)
- # Build dimensions for CloudZero tracking
- dimensions = {
- 'entity_type': 'team',
- 'entity_id': entity_id,
- 'key_name': key_name,
- 'model': model,
- 'model_group': model_group,
- 'provider': provider,
- 'request_count': str(request_count),
- 'successful_requests': str(successful_requests),
- 'failed_requests': str(failed_requests),
- }
+ # Build dimensions for CloudZero
+ model = str(row.get('model', ''))
+ api_key_hash = str(row.get('api_key', ''))[:8] # First 8 chars for identification
- # Add tag if present
- if tag is not None and str(tag) not in ['', 'null', 'None']:
- dimensions['tag'] = str(tag)
+ # Handle team information with fallbacks
+ team_id = row.get('team_id')
+ team_alias = row.get('team_alias')
+
+ # Use team_alias if available, otherwise team_id, otherwise fallback to 'unknown'
+ entity_id = str(team_alias) if team_alias else (str(team_id) if team_id else 'unknown')
+
+ dimensions = {
+ 'entity_type': CZEntityType.TEAM.value,
+ 'entity_id': entity_id,
+ 'team_id': str(team_id) if team_id else 'unknown',
+ 'team_alias': str(team_alias) if team_alias else 'unknown',
+ 'model': model,
+ 'model_group': str(row.get('model_group', '')),
+ 'provider': str(row.get('custom_llm_provider', '')),
+ 'api_key_prefix': api_key_hash,
+ 'api_key_alias': str(row.get('api_key_alias', '')),
+ 'api_requests': str(row.get('api_requests', 0)),
+ 'successful_requests': str(row.get('successful_requests', 0)),
+ 'failed_requests': str(row.get('failed_requests', 0)),
+ 'cache_creation_tokens': str(row.get('cache_creation_input_tokens', 0)),
+ 'cache_read_tokens': str(row.get('cache_read_input_tokens', 0)),
+ }
# Extract CZRN components to populate corresponding CBF columns
czrn_components = self.czrn_generator.extract_components(resource_id)
- service_type, provider_czrn, region, owner_account_id, resource_type, cloud_local_id = czrn_components
+ service_type, provider, region, owner_account_id, resource_type, cloud_local_id = czrn_components
# CloudZero CBF format with proper column names
cbf_record = {
# Required CBF fields
- 'time/usage_start': usage_time.isoformat() if usage_time else None, # Required: ISO-formatted UTC datetime
- 'cost/cost': total_spend, # Required: billed cost
+ 'time/usage_start': usage_date.isoformat() if usage_date else None, # Required: ISO-formatted UTC datetime
+ 'cost/cost': float(row.get('spend', 0.0)), # Required: billed cost
'resource/id': resource_id, # Required when resource tags are present
# Usage metrics for token consumption
@@ -206,41 +145,42 @@ class CBFTransformer:
}
# Add CZRN components that don't have direct CBF column mappings as resource tags
- cbf_record['resource/tag:provider'] = provider_czrn # CZRN provider component
+ cbf_record['resource/tag:provider'] = provider # CZRN provider component
cbf_record['resource/tag:model'] = cloud_local_id # CZRN cloud-local-id component (model)
-
+
# Add resource tags for all dimensions (using resource/tag: format)
for key, value in dimensions.items():
- # Ensure value is a scalar and not empty
- if hasattr(value, 'item') and not isinstance(value, str):
- value = value.item() if value is not None else None
- if value is not None and str(value) not in ['', 'N/A', 'None', 'null']: # Only add non-empty tags
+ if value and value != 'N/A' and value != 'unknown': # Only add meaningful tags
cbf_record[f'resource/tag:{key}'] = str(value)
# Add token breakdown as resource tags for analysis
- if total_prompt_tokens > 0:
- cbf_record['resource/tag:prompt_tokens'] = str(total_prompt_tokens)
- if total_completion_tokens > 0:
- cbf_record['resource/tag:completion_tokens'] = str(total_completion_tokens)
+ if prompt_tokens > 0:
+ cbf_record['resource/tag:prompt_tokens'] = str(prompt_tokens)
+ if completion_tokens > 0:
+ cbf_record['resource/tag:completion_tokens'] = str(completion_tokens)
if total_tokens > 0:
cbf_record['resource/tag:total_tokens'] = str(total_tokens)
return CBFRecord(cbf_record)
- def _parse_datetime(self, datetime_obj) -> Optional[datetime]:
- """Parse datetime object to ensure proper format."""
- if datetime_obj is None:
+ def _parse_date(self, date_str) -> Optional[datetime]:
+ """Parse date string from daily spend tables (e.g., '2025-04-19')."""
+ if date_str is None:
return None
- if isinstance(datetime_obj, datetime):
- return datetime_obj
+ if isinstance(date_str, datetime):
+ return date_str
- if isinstance(datetime_obj, str):
+ if isinstance(date_str, str):
try:
- # Try to parse ISO format
- return pl.Series([datetime_obj]).str.to_datetime().item()
+ # Parse date string and set to midnight UTC for daily aggregation
+ return pl.Series([date_str]).str.to_datetime("%Y-%m-%d").item()
except Exception:
- return None
+ try:
+ # Fallback: try ISO format parsing
+ return pl.Series([date_str]).str.to_datetime().item()
+ except Exception:
+ return None
return None
diff --git a/litellm/integrations/custom_guardrail.py b/litellm/integrations/custom_guardrail.py
index 501185b207e..40d2137a7f1 100644
--- a/litellm/integrations/custom_guardrail.py
+++ b/litellm/integrations/custom_guardrail.py
@@ -119,11 +119,8 @@ class CustomGuardrail(CustomLogger):
"""
if "guardrails" in data:
return data["guardrails"]
- metadata = data.get("metadata") or {}
- requested_guardrails = metadata.get("guardrails") or []
- if requested_guardrails:
- return requested_guardrails
- return requested_guardrails
+ metadata = data.get("litellm_metadata") or data.get("metadata", {})
+ return metadata.get("guardrails") or []
def _guardrail_is_in_requested_guardrails(
self,
@@ -355,7 +352,7 @@ class CustomGuardrail(CustomLogger):
self,
guardrail_json_response: Union[Exception, str, dict, List[dict]],
request_data: dict,
- guardrail_status: Literal["success", "failure"],
+ guardrail_status: Literal["success", "failure", "blocked"],
start_time: Optional[float] = None,
end_time: Optional[float] = None,
duration: Optional[float] = None,
diff --git a/litellm/integrations/datadog/datadog_llm_obs.py b/litellm/integrations/datadog/datadog_llm_obs.py
index 4f9c6409770..200f2f283de 100644
--- a/litellm/integrations/datadog/datadog_llm_obs.py
+++ b/litellm/integrations/datadog/datadog_llm_obs.py
@@ -19,6 +19,7 @@ import litellm
from litellm._logging import verbose_logger
from litellm.integrations.custom_batch_logger import CustomBatchLogger
from litellm.integrations.datadog.datadog import DataDogLogger
+from litellm.litellm_core_utils.dd_tracing import tracer
from litellm.litellm_core_utils.prompt_templates.common_utils import (
handle_any_messages_to_chat_completion_str_messages_conversion,
)
@@ -216,7 +217,7 @@ class DataDogLLMObsLogger(DataDogLogger, CustomBatchLogger):
time_to_first_token=self._get_time_to_first_token_seconds(standard_logging_payload),
)
- return LLMObsPayload(
+ payload: LLMObsPayload = LLMObsPayload(
parent_id=metadata.get("parent_id", "undefined"),
trace_id=standard_logging_payload.get("trace_id", str(uuid.uuid4())),
span_id=metadata.get("span_id", str(uuid.uuid4())),
@@ -230,6 +231,26 @@ class DataDogLLMObsLogger(DataDogLogger, CustomBatchLogger):
self._get_datadog_tags(standard_logging_object=standard_logging_payload)
],
)
+
+ apm_trace_id = self._get_apm_trace_id()
+ if apm_trace_id is not None:
+ payload["apm_id"] = apm_trace_id
+
+ return payload
+
+ def _get_apm_trace_id(self) -> Optional[str]:
+ """Retrieve the current APM trace ID if available."""
+ try:
+ current_span_fn = getattr(tracer, "current_span", None)
+ if callable(current_span_fn):
+ current_span = current_span_fn()
+ if current_span is not None:
+ trace_id = getattr(current_span, "trace_id", None)
+ if trace_id is not None:
+ return str(trace_id)
+ except Exception:
+ pass
+ return None
def _assemble_error_info(self, standard_logging_payload: StandardLoggingPayload) -> Optional[DDLLMObsError]:
"""
diff --git a/litellm/integrations/langfuse/langfuse_otel.py b/litellm/integrations/langfuse/langfuse_otel.py
index 8b90e123371..fbe480be95f 100644
--- a/litellm/integrations/langfuse/langfuse_otel.py
+++ b/litellm/integrations/langfuse/langfuse_otel.py
@@ -141,6 +141,17 @@ class LangfuseOtelLogger(OpenTelemetry):
value = str(value)
safe_set_attribute(span, enum_attr.value, value)
+ @staticmethod
+ def _get_langfuse_otel_host() -> Optional[str]:
+ """
+ Returns the Langfuse OTEL host based on environment variables.
+
+ Returned in the following order of precedence:
+ 1. LANGFUSE_OTEL_HOST
+ 2. LANGFUSE_HOST
+ """
+ return os.environ.get("LANGFUSE_OTEL_HOST") or os.environ.get("LANGFUSE_HOST")
+
@staticmethod
def get_langfuse_otel_config() -> LangfuseOtelConfig:
"""
@@ -166,7 +177,7 @@ class LangfuseOtelLogger(OpenTelemetry):
)
# Determine endpoint - default to US cloud
- langfuse_host = os.environ.get("LANGFUSE_HOST", None)
+ langfuse_host = LangfuseOtelLogger._get_langfuse_otel_host()
if langfuse_host:
# If LANGFUSE_HOST is provided, construct OTEL endpoint from it
diff --git a/litellm/integrations/openmeter.py b/litellm/integrations/openmeter.py
index 19010daf831..b8fb64ec287 100644
--- a/litellm/integrations/openmeter.py
+++ b/litellm/integrations/openmeter.py
@@ -66,8 +66,18 @@ class OpenMeterLogger(CustomLogger):
}
user_param = kwargs.get("user", None) # end-user passed in via 'user' param
+
+ # If no user provided directly, try to get it from token user_id
if user_param is None:
- raise Exception("OpenMeter: user is required")
+ # Check if user_id is available from the API key metadata
+ litellm_params = kwargs.get("litellm_params", {})
+ metadata = litellm_params.get("metadata", {})
+ user_api_key_user_id = metadata.get("user_api_key_user_id", None)
+
+ if user_api_key_user_id is not None:
+ user_param = user_api_key_user_id
+ else:
+ raise Exception("OpenMeter: user is required")
# Ensure subject is always a string for OpenMeter API
subject = str(user_param)
diff --git a/litellm/integrations/opentelemetry.py b/litellm/integrations/opentelemetry.py
index 22ab3092901..e6f265ded58 100644
--- a/litellm/integrations/opentelemetry.py
+++ b/litellm/integrations/opentelemetry.py
@@ -15,6 +15,8 @@ from litellm.types.utils import (
StandardLoggingPayload,
)
+# OpenTelemetry imports moved to individual functions to avoid import errors when not installed
+
if TYPE_CHECKING:
from opentelemetry.sdk.trace.export import SpanExporter as _SpanExporter
from opentelemetry.trace import Context as _Context
@@ -41,6 +43,8 @@ else:
Context = Any
LITELLM_TRACER_NAME = os.getenv("OTEL_TRACER_NAME", "litellm")
+LITELLM_METER_NAME = os.getenv("LITELLM_METER_NAME", "litellm")
+LITELLM_LOGGER_NAME = os.getenv("LITELLM_LOGGER_NAME", "litellm")
# Remove the hardcoded LITELLM_RESOURCE dictionary - we'll create it properly later
RAW_REQUEST_SPAN_NAME = "raw_gen_ai_request"
LITELLM_REQUEST_SPAN_NAME = "litellm_request"
@@ -83,6 +87,8 @@ class OpenTelemetryConfig:
exporter: Union[str, SpanExporter] = "console"
endpoint: Optional[str] = None
headers: Optional[str] = None
+ enable_metrics: bool = False
+ enable_events: bool = False
@classmethod
def from_env(cls):
@@ -104,6 +110,14 @@ class OpenTelemetryConfig:
headers = os.getenv(
"OTEL_EXPORTER_OTLP_HEADERS", os.getenv("OTEL_HEADERS")
) # example: OTEL_HEADERS=x-honeycomb-team=B85YgLm96***"
+ enable_metrics: bool = (
+ os.getenv("LITELLM_OTEL_INTEGRATION_ENABLE_METRICS", "false").lower()
+ == "true"
+ )
+ enable_events: bool = (
+ os.getenv("LITELLM_OTEL_INTEGRATION_ENABLE_EVENTS", "false").lower()
+ == "true"
+ )
if exporter == "in_memory":
return cls(exporter=InMemorySpanExporter())
@@ -111,6 +125,8 @@ class OpenTelemetryConfig:
exporter=exporter,
endpoint=endpoint,
headers=headers, # example: OTEL_HEADERS=x-honeycomb-team=B85YgLm96***"
+ enable_metrics=enable_metrics,
+ enable_events=enable_events,
)
@@ -119,27 +135,22 @@ class OpenTelemetry(CustomLogger):
self,
config: Optional[OpenTelemetryConfig] = None,
callback_name: Optional[str] = None,
+ # injection points for testing
+ tracer_provider: Optional[Any] = None,
+ logger_provider: Optional[Any] = None,
+ meter_provider: Optional[Any] = None,
**kwargs,
):
- from opentelemetry import trace
- from opentelemetry.sdk.trace import TracerProvider
- from opentelemetry.trace import SpanKind
if config is None:
config = OpenTelemetryConfig.from_env()
self.config = config
+ self.callback_name = callback_name
self.OTEL_EXPORTER = self.config.exporter
self.OTEL_ENDPOINT = self.config.endpoint
self.OTEL_HEADERS = self.config.headers
- provider = TracerProvider(resource=_get_litellm_resource())
- provider.add_span_processor(self._get_span_processor())
- self.callback_name = callback_name
-
- trace.set_tracer_provider(provider)
- self.tracer = trace.get_tracer(LITELLM_TRACER_NAME)
-
- self.span_kind = SpanKind
+ self._init_tracing(tracer_provider)
_debug_otel = str(os.getenv("DEBUG_OTEL", "False")).lower()
@@ -156,6 +167,8 @@ class OpenTelemetry(CustomLogger):
# init CustomLogger params
super().__init__(**kwargs)
+ self._init_metrics(meter_provider)
+ self._init_logs(logger_provider)
self._init_otel_logger_on_litellm_proxy()
def _init_otel_logger_on_litellm_proxy(self):
@@ -178,14 +191,109 @@ class OpenTelemetry(CustomLogger):
litellm.service_callback.append("otel")
setattr(proxy_server, "open_telemetry_logger", self)
+ def _init_tracing(self, tracer_provider):
+ from opentelemetry import trace
+ from opentelemetry.sdk.trace import TracerProvider
+ from opentelemetry.trace import SpanKind
+
+ # use provided tracer or create a new one
+ if tracer_provider is None:
+ tracer_provider = TracerProvider(resource=_get_litellm_resource())
+ # Only add OTLP span processor if we created the tracer provider ourselves
+ tracer_provider.add_span_processor(self._get_span_processor())
+
+ # register global provider and grab our tracer
+ trace.set_tracer_provider(tracer_provider)
+ self.tracer = trace.get_tracer(LITELLM_TRACER_NAME)
+ self.span_kind = SpanKind
+
+ def _init_metrics(self, meter_provider):
+ if not self.config.enable_metrics:
+ self._operation_duration_histogram = None
+ self._token_usage_histogram = None
+ self._cost_histogram = None
+ return
+
+ from opentelemetry import metrics
+ from opentelemetry.sdk.metrics import Histogram, MeterProvider
+
+ # Only create OTLP infrastructure if no custom meter provider is provided
+ if meter_provider is None:
+ from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import (
+ OTLPMetricExporter,
+ )
+ from opentelemetry.sdk.metrics.export import (
+ AggregationTemporality,
+ PeriodicExportingMetricReader,
+ )
+
+ _metric_exporter = OTLPMetricExporter(
+ endpoint=self.config.endpoint,
+ headers=OpenTelemetry._get_headers_dictionary(self.config.headers),
+ preferred_temporality={Histogram: AggregationTemporality.DELTA},
+ )
+ _metric_reader = PeriodicExportingMetricReader(
+ _metric_exporter, export_interval_millis=10000
+ )
+
+ meter_provider = MeterProvider(
+ metric_readers=[_metric_reader], resource=_get_litellm_resource()
+ )
+ meter = meter_provider.get_meter(__name__)
+ else:
+ # Use the provided meter provider as-is, without creating additional OTLP infrastructure
+ meter = meter_provider.get_meter(__name__)
+
+ metrics.set_meter_provider(meter_provider)
+
+ self._operation_duration_histogram = meter.create_histogram(
+ name="gen_ai.client.operation.duration", # Replace with semconv constant in otel 1.38
+ description="GenAI operation duration",
+ unit="s",
+ )
+ self._token_usage_histogram = meter.create_histogram(
+ name="gen_ai.client.token.usage", # Replace with semconv constant in otel 1.38
+ description="GenAI token usage",
+ unit="{token}",
+ )
+ self._cost_histogram = meter.create_histogram(
+ name="gen_ai.client.token.cost",
+ description="GenAI request cost",
+ unit="USD",
+ )
+
+ def _init_logs(self, logger_provider):
+ # nothing to do if events disabled
+ if not self.config.enable_events:
+ return
+
+ from opentelemetry._logs import set_logger_provider
+ from opentelemetry.exporter.otlp.proto.grpc._log_exporter import OTLPLogExporter
+ from opentelemetry.sdk._logs import LoggerProvider as OTLoggerProvider
+ from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
+
+ # set up log pipeline
+ if logger_provider is None:
+ logger_provider = OTLoggerProvider()
+ # Only add OTLP exporter if we created the logger provider ourselves
+ logger_provider.add_log_record_processor(
+ BatchLogRecordProcessor(
+ OTLPLogExporter(
+ endpoint=self.config.endpoint,
+ headers=self._get_headers_dictionary(self.config.headers),
+ )
+ )
+ )
+ set_logger_provider(logger_provider)
+
def log_success_event(self, kwargs, response_obj, start_time, end_time):
- self._handle_sucess(kwargs, response_obj, start_time, end_time)
+ self._handle_success(kwargs, response_obj, start_time, end_time)
def log_failure_event(self, kwargs, response_obj, start_time, end_time):
self._handle_failure(kwargs, response_obj, start_time, end_time)
async def async_log_success_event(self, kwargs, response_obj, start_time, end_time):
- self._handle_sucess(kwargs, response_obj, start_time, end_time)
+ self._handle_success(kwargs, response_obj, start_time, end_time)
async def async_log_failure_event(self, kwargs, response_obj, start_time, end_time):
self._handle_failure(kwargs, response_obj, start_time, end_time)
@@ -372,9 +480,9 @@ class OpenTelemetry(CustomLogger):
def _get_dynamic_otel_headers_from_kwargs(self, kwargs) -> Optional[dict]:
"""Extract dynamic headers from kwargs if available."""
- standard_callback_dynamic_params: Optional[StandardCallbackDynamicParams] = (
- kwargs.get("standard_callback_dynamic_params")
- )
+ standard_callback_dynamic_params: Optional[
+ StandardCallbackDynamicParams
+ ] = kwargs.get("standard_callback_dynamic_params")
if not standard_callback_dynamic_params:
return None
@@ -414,50 +522,185 @@ class OpenTelemetry(CustomLogger):
# End of Team/Key Based Logging Control Flow
#########################################################
- def _handle_sucess(self, kwargs, response_obj, start_time, end_time):
- from opentelemetry import trace
- from opentelemetry.trace import Status, StatusCode
+ def _handle_success(self, kwargs, response_obj, start_time, end_time):
verbose_logger.debug(
"OpenTelemetry Logger: Logging kwargs: %s, OTEL config settings=%s",
kwargs,
self.config,
)
+ ctx, parent_span = self._get_span_context(kwargs)
+
+ # 1. Primary span
+ span = self._start_primary_span(kwargs, response_obj, start_time, end_time, ctx)
+
+ # 2. Raw‐request sub-span (if enabled)
+ self._maybe_log_raw_request(kwargs, response_obj, start_time, end_time, span)
+
+ # 3. Guardrail span
+ self._create_guardrail_span(kwargs=kwargs, context=ctx)
+
+ # 4. Metrics & cost recording
+ self._record_metrics(kwargs, response_obj, start_time, end_time)
+
+ # 5. Semantic logs.
+ if self.config.enable_events:
+ self._emit_semantic_logs(kwargs, response_obj, span)
+
+ # 6. End parent span
+ if parent_span is not None:
+ parent_span.end(end_time=self._to_ns(datetime.now()))
+
+ def _start_primary_span(self, kwargs, response_obj, start_time, end_time, context):
+ from opentelemetry.trace import Status, StatusCode
- _parent_context, parent_otel_span = self._get_span_context(kwargs)
- # Span 1: Request sent to litellm SDK
otel_tracer: Tracer = self.get_tracer_to_use_for_request(kwargs)
span = otel_tracer.start_span(
name=self._get_span_name(kwargs),
start_time=self._to_ns(start_time),
- context=_parent_context,
+ context=context,
)
span.set_status(Status(StatusCode.OK))
self.set_attributes(span, kwargs, response_obj)
+ span.end(end_time=self._to_ns(end_time))
+ return span
- if litellm.turn_off_message_logging is True:
- pass
- elif self.message_logging is not True:
- pass
- else:
- # Span 2: Raw Request / Response to LLM
- raw_request_span = otel_tracer.start_span(
- name=RAW_REQUEST_SPAN_NAME,
- start_time=self._to_ns(start_time),
- context=trace.set_span_in_context(span),
+ def _maybe_log_raw_request(
+ self, kwargs, response_obj, start_time, end_time, parent_span
+ ):
+ from opentelemetry import trace
+ from opentelemetry.trace import Status, StatusCode
+
+ # only log raw LLM request/response if message_logging is on and not globally turned off
+ if litellm.turn_off_message_logging or not self.message_logging:
+ return
+
+ otel_tracer: Tracer = self.get_tracer_to_use_for_request(kwargs)
+ raw_span = otel_tracer.start_span(
+ name=RAW_REQUEST_SPAN_NAME,
+ start_time=self._to_ns(start_time),
+ context=trace.set_span_in_context(parent_span),
+ )
+ raw_span.set_status(Status(StatusCode.OK))
+ self.set_raw_request_attributes(raw_span, kwargs, response_obj)
+ raw_span.end(end_time=self._to_ns(end_time))
+
+ def _record_metrics(self, kwargs, response_obj, start_time, end_time):
+ duration_s = (end_time - start_time).total_seconds()
+ params = kwargs.get("litellm_params") or {}
+ provider = params.get("custom_llm_provider", "Unknown")
+
+ common_attrs = {
+ "gen_ai.operation.name": "chat",
+ "gen_ai.system": provider,
+ "gen_ai.request.model": kwargs.get("model"),
+ "gen_ai.framework": "litellm",
+ }
+
+ std_log = kwargs.get("standard_logging_object")
+ md = getattr(std_log, "metadata", None) or (std_log or {}).get("metadata", {})
+ for key in [
+ "user_api_key_hash",
+ "user_api_key_alias",
+ "user_api_key_team_id",
+ "user_api_key_org_id",
+ "user_api_key_user_id",
+ "user_api_key_team_alias",
+ "user_api_key_user_email",
+ "spend_logs_metadata",
+ "requester_ip_address",
+ "requester_metadata",
+ "user_api_key_end_user_id",
+ "prompt_management_metadata",
+ "applied_guardrails",
+ "mcp_tool_call_metadata",
+ "vector_store_request_metadata",
+ ]:
+ if md.get(key) is not None:
+ common_attrs[f"metadata.{key}"] = str(md[key])
+
+ if self._operation_duration_histogram:
+ self._operation_duration_histogram.record(
+ duration_s, attributes=common_attrs
+ )
+ if (
+ response_obj
+ and (usage := response_obj.get("usage"))
+ and self._token_usage_histogram
+ ):
+ in_attrs = {**common_attrs, "gen_ai.token.type": "input"}
+ out_attrs = {**common_attrs, "gen_ai.token.type": "completion"}
+ self._token_usage_histogram.record(
+ usage.get("prompt_tokens", 0), attributes=in_attrs
+ )
+ self._token_usage_histogram.record(
+ usage.get("completion_tokens", 0), attributes=out_attrs
+ )
+
+ cost = kwargs.get("response_cost")
+ if self._cost_histogram and cost:
+ self._cost_histogram.record(cost, attributes=common_attrs)
+
+ def _emit_semantic_logs(self, kwargs, response_obj, span: Span):
+ if not self.config.enable_events:
+ return
+
+ from opentelemetry._logs import get_logger, LogRecord
+ otel_logger = get_logger(LITELLM_LOGGER_NAME)
+
+ parent_ctx = span.get_span_context()
+ provider = (kwargs.get("litellm_params") or {}).get(
+ "custom_llm_provider", "Unknown"
+ )
+
+ # per-message events
+ for msg in kwargs.get("messages", []):
+ role = msg.get("role", "user")
+ attrs = {"event_name": "gen_ai.content.prompt", "gen_ai.system": provider}
+ if role == "tool" and msg.get("id"):
+ attrs["id"] = msg["id"]
+ if self.message_logging and msg.get("content"):
+ attrs["gen_ai.prompt"] = msg["content"]
+
+ otel_logger.emit(
+ LogRecord(
+ attributes=attrs,
+ body=msg.copy(),
+ trace_id=parent_ctx.trace_id,
+ span_id=parent_ctx.span_id,
+ trace_flags=parent_ctx.trace_flags,
+ )
)
- raw_request_span.set_status(Status(StatusCode.OK))
- self.set_raw_request_attributes(raw_request_span, kwargs, response_obj)
- raw_request_span.end(end_time=self._to_ns(end_time))
+ # per-choice events
+ for idx, choice in enumerate(response_obj.get("choices", [])):
+ attrs = {
+ "event_name": "gen_ai.content.completion",
+ "gen_ai.system": provider,
+ "index": idx,
+ "finish_reason": choice.get("finish_reason"),
+ }
+ body_msg = choice.get("message", {})
+ if self.message_logging and body_msg.get("content"):
+ attrs["message.content"] = body_msg["content"]
+ body = {
+ "index": idx,
+ "finish_reason": choice.get("finish_reason"),
+ "message": {"role": body_msg.get("role", "assistant")},
+ }
+ if self.message_logging and body_msg.get("content"):
+ body["message"]["content"] = body_msg["content"]
- span.end(end_time=self._to_ns(end_time))
+ otel_logger.emit(
+ LogRecord(
+ attributes=attrs,
+ body=body,
+ trace_id=parent_ctx.trace_id,
+ span_id=parent_ctx.span_id,
+ trace_flags=parent_ctx.trace_flags,
+ )
+ )
- # Create span for guardrail information
- self._create_guardrail_span(kwargs=kwargs, context=_parent_context)
-
- if parent_otel_span is not None:
- parent_otel_span.end(end_time=self._to_ns(datetime.now()))
def _create_guardrail_span(
self, kwargs: Optional[dict], context: Optional[Context]
diff --git a/litellm/integrations/vector_store_integrations/vector_store_pre_call_hook.py b/litellm/integrations/vector_store_integrations/vector_store_pre_call_hook.py
index 59c378f8204..8ef160dd783 100644
--- a/litellm/integrations/vector_store_integrations/vector_store_pre_call_hook.py
+++ b/litellm/integrations/vector_store_integrations/vector_store_pre_call_hook.py
@@ -8,6 +8,7 @@ It searches the vector store for relevant context and appends it to the messages
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast
import litellm
+import litellm.vector_stores
from litellm._logging import verbose_logger
from litellm.integrations.custom_logger import CustomLogger
from litellm.types.llms.openai import AllMessageValues, ChatCompletionUserMessage
@@ -192,4 +193,4 @@ class VectorStorePreCallHook(CustomLogger):
modified_messages.insert(-1, cast(AllMessageValues, context_message))
return modified_messages
- return messages
\ No newline at end of file
+ return messages
diff --git a/litellm/integrations/weights_biases.py b/litellm/integrations/weights_biases.py
index 63d87c9bd90..0d011e26aef 100644
--- a/litellm/integrations/weights_biases.py
+++ b/litellm/integrations/weights_biases.py
@@ -44,7 +44,7 @@ try:
request, response, time_elapsed
)
else:
- logger.info(f"Unknown OpenAI response object: {response['object']}")
+ logger.debug(f"Unknown OpenAI response object: {response['object']}")
except Exception as e:
logger.warning(f"Failed to resolve request/response: {e}")
return None
diff --git a/litellm/litellm_core_utils/custom_logger_registry.py b/litellm/litellm_core_utils/custom_logger_registry.py
index fd82ecdf2b2..af51fe9ab79 100644
--- a/litellm/litellm_core_utils/custom_logger_registry.py
+++ b/litellm/litellm_core_utils/custom_logger_registry.py
@@ -38,6 +38,7 @@ try:
from litellm_enterprise.integrations.prometheus import PrometheusLogger
except Exception:
PrometheusLogger = None
+from litellm.integrations.cloudzero.cloudzero import CloudZeroLogger
from litellm.integrations.dotprompt import DotpromptManager
from litellm.integrations.s3_v2 import S3Logger
from litellm.integrations.sqs import SQSLogger
@@ -86,6 +87,7 @@ class CustomLoggerRegistry:
"dynamic_rate_limiter": _PROXY_DynamicRateLimitHandler,
"vector_store_pre_call_hook": VectorStorePreCallHook,
"dotprompt": DotpromptManager,
+ "cloudzero": CloudZeroLogger,
}
try:
diff --git a/litellm/litellm_core_utils/duration_parser.py b/litellm/litellm_core_utils/duration_parser.py
index 08f1d4c82d0..08e5323c30c 100644
--- a/litellm/litellm_core_utils/duration_parser.py
+++ b/litellm/litellm_core_utils/duration_parser.py
@@ -1,7 +1,7 @@
"""
Helper utilities for parsing durations - 1s, 1d, 10d, 30d, 1mo, 2mo
-duration_in_seconds is used in diff parts of the code base, example
+duration_in_seconds is used in diff parts of the code base, example
- Router - Provider budget routing
- Proxy - Key, Team Generation
"""
@@ -192,6 +192,10 @@ def _handle_day_reset(
current_time: datetime, base_midnight: datetime, value: int, timezone: timezone
) -> datetime:
"""Handle day-based reset times."""
+ # Handle zero value - immediate expiration
+ if value == 0:
+ return current_time
+
if value == 1: # Daily reset at midnight
return base_midnight + timedelta(days=1)
elif value == 7: # Weekly reset on Monday at midnight
@@ -234,6 +238,10 @@ def _handle_hour_reset(
current_time: datetime, base_midnight: datetime, value: int
) -> datetime:
"""Handle hour-based reset times."""
+ # Handle zero value - immediate expiration
+ if value == 0:
+ return current_time
+
current_hour = current_time.hour
current_minute = current_time.minute
current_second = current_time.second
@@ -266,6 +274,10 @@ def _handle_minute_reset(
current_time: datetime, base_midnight: datetime, value: int
) -> datetime:
"""Handle minute-based reset times."""
+ # Handle zero value - immediate expiration
+ if value == 0:
+ return current_time
+
current_hour = current_time.hour
current_minute = current_time.minute
current_second = current_time.second
@@ -306,6 +318,10 @@ def _handle_second_reset(
current_time: datetime, base_midnight: datetime, value: int
) -> datetime:
"""Handle second-based reset times."""
+ # Handle zero value - immediate expiration
+ if value == 0:
+ return current_time
+
current_hour = current_time.hour
current_minute = current_time.minute
current_second = current_time.second
diff --git a/litellm/litellm_core_utils/get_llm_provider_logic.py b/litellm/litellm_core_utils/get_llm_provider_logic.py
index 02b542ed165..d5009fb0ca6 100644
--- a/litellm/litellm_core_utils/get_llm_provider_logic.py
+++ b/litellm/litellm_core_utils/get_llm_provider_logic.py
@@ -249,6 +249,9 @@ def get_llm_provider( # noqa: PLR0915
elif endpoint == "https://api.hyperbolic.xyz/v1":
custom_llm_provider = "hyperbolic"
dynamic_api_key = get_secret_str("HYPERBOLIC_API_KEY")
+ elif endpoint == "https://ai-gateway.vercel.sh/v1":
+ custom_llm_provider = "vercel_ai_gateway"
+ dynamic_api_key = get_secret_str("VERCEL_AI_GATEWAY_API_KEY")
if api_base is not None and not isinstance(api_base, str):
raise Exception(
@@ -317,6 +320,7 @@ def get_llm_provider( # noqa: PLR0915
or model in litellm.vertex_embedding_models
or model in litellm.vertex_vision_models
or model in litellm.vertex_ai_image_models
+ or model in litellm.vertex_ai_video_models
):
custom_llm_provider = "vertex_ai"
## ai21
@@ -361,6 +365,8 @@ def get_llm_provider( # noqa: PLR0915
# bytez models
elif model.startswith("bytez/"):
custom_llm_provider = "bytez"
+ elif model.startswith("heroku/"):
+ custom_llm_provider = "heroku"
# cometapi models
elif model.startswith("cometapi/"):
custom_llm_provider = "cometapi"
@@ -486,7 +492,7 @@ def _get_openai_compatible_provider_info( # noqa: PLR0915
if api_base is None:
api_base = litellm.BasetenConfig.get_api_base_for_model(model)
else:
- api_base = api_base or get_secret("BASETEN_API_BASE") or "https://inference.baseten.co/v1"
+ api_base = api_base or get_secret_str("BASETEN_API_BASE") or "https://inference.baseten.co/v1"
dynamic_api_key = api_key or get_secret_str("BASETEN_API_KEY")
elif custom_llm_provider == "sambanova":
api_base = (
@@ -700,6 +706,13 @@ def _get_openai_compatible_provider_info( # noqa: PLR0915
) = litellm.NscaleConfig()._get_openai_compatible_provider_info(
api_base=api_base, api_key=api_key
)
+ elif custom_llm_provider == "heroku":
+ (
+ api_base,
+ dynamic_api_key,
+ ) = litellm.HerokuChatConfig()._get_openai_compatible_provider_info(
+ api_base, api_key
+ )
elif custom_llm_provider == "dashscope":
(
api_base,
@@ -742,6 +755,20 @@ def _get_openai_compatible_provider_info( # noqa: PLR0915
) = litellm.HyperbolicChatConfig()._get_openai_compatible_provider_info(
api_base, api_key
)
+ elif custom_llm_provider == "vercel_ai_gateway":
+ (
+ api_base,
+ dynamic_api_key,
+ ) = litellm.VercelAIGatewayConfig()._get_openai_compatible_provider_info(
+ api_base, api_key
+ )
+ elif custom_llm_provider == "aiml":
+ (
+ api_base,
+ dynamic_api_key,
+ ) = litellm.AIMLChatConfig()._get_openai_compatible_provider_info(
+ api_base, api_key
+ )
if api_base is not None and not isinstance(api_base, str):
raise Exception("api base needs to be a string. api_base={}".format(api_base))
diff --git a/litellm/litellm_core_utils/get_provider_specific_headers.py b/litellm/litellm_core_utils/get_provider_specific_headers.py
new file mode 100644
index 00000000000..cf9165cfda9
--- /dev/null
+++ b/litellm/litellm_core_utils/get_provider_specific_headers.py
@@ -0,0 +1,23 @@
+from typing import Dict, Optional
+
+from litellm.types.utils import ProviderSpecificHeader
+
+
+class ProviderSpecificHeaderUtils:
+ @staticmethod
+ def get_provider_specific_headers(
+ provider_specific_header: Optional[ProviderSpecificHeader],
+ custom_llm_provider: Optional[str],
+ ) -> Dict:
+ """
+ Get the provider specific headers for the given custom llm provider
+
+ Returns:
+ Optional[Dict]: The provider specific headers for the given custom llm provider
+ """
+ if (
+ provider_specific_header is not None
+ and provider_specific_header.get("custom_llm_provider") == custom_llm_provider
+ ):
+ return provider_specific_header.get("extra_headers", {})
+ return {}
\ No newline at end of file
diff --git a/litellm/litellm_core_utils/get_supported_openai_params.py b/litellm/litellm_core_utils/get_supported_openai_params.py
index 6584defe5b7..86535943762 100644
--- a/litellm/litellm_core_utils/get_supported_openai_params.py
+++ b/litellm/litellm_core_utils/get_supported_openai_params.py
@@ -131,6 +131,8 @@ def get_supported_openai_params( # noqa: PLR0915
return litellm.AzureOpenAIConfig().get_supported_openai_params(model=model)
elif custom_llm_provider == "openrouter":
return litellm.OpenrouterConfig().get_supported_openai_params(model=model)
+ elif custom_llm_provider == "vercel_ai_gateway":
+ return litellm.VercelAIGatewayConfig().get_supported_openai_params(model=model)
elif custom_llm_provider == "mistral" or custom_llm_provider == "codestral":
# mistal and codestral api have the exact same params
if request_type == "chat_completion":
@@ -268,10 +270,9 @@ def get_supported_openai_params( # noqa: PLR0915
from litellm.llms.elevenlabs.audio_transcription.transformation import (
ElevenLabsAudioTranscriptionConfig,
)
- return (
- ElevenLabsAudioTranscriptionConfig().get_supported_openai_params(
- model=model
- )
+
+ return ElevenLabsAudioTranscriptionConfig().get_supported_openai_params(
+ model=model
)
elif custom_llm_provider in litellm._custom_providers:
if request_type == "chat_completion":
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py
index 385df83c904..19d7c5512ba 100644
--- a/litellm/litellm_core_utils/litellm_logging.py
+++ b/litellm/litellm_core_utils/litellm_logging.py
@@ -10,7 +10,6 @@ import subprocess
import sys
import time
import traceback
-import uuid
from datetime import datetime as dt_object
from functools import lru_cache
from typing import (
@@ -27,6 +26,7 @@ from typing import (
cast,
)
+import fastuuid as uuid
from httpx import Response
from pydantic import BaseModel
@@ -1164,7 +1164,6 @@ class Logging(LiteLLMLoggingBaseClass):
used for consistent cost calculation across response headers + logging integrations.
"""
-
if isinstance(result, BaseModel) and hasattr(result, "_hidden_params"):
hidden_params = getattr(result, "_hidden_params", {})
if (
@@ -1715,9 +1714,12 @@ class Logging(LiteLLMLoggingBaseClass):
response_obj=result,
start_time=start_time,
end_time=end_time,
- litellm_call_id=litellm_params.get(
- "litellm_call_id", str(uuid.uuid4())
- ),
+ litellm_call_id=current_call_id
+ if (
+ current_call_id := litellm_params.get("litellm_call_id")
+ )
+ is not None
+ else str(uuid.uuid4()),
print_verbose=print_verbose,
)
if callback == "wandb" and weightsBiasesLogger is not None:
@@ -2775,6 +2777,7 @@ class Logging(LiteLLMLoggingBaseClass):
result: Any,
start_time: datetime.datetime,
end_time: datetime.datetime,
+ cache_hit: Optional[Any] = None,
) -> None:
"""
Handles calling success callbacks for Async calls.
@@ -2789,6 +2792,7 @@ class Logging(LiteLLMLoggingBaseClass):
result,
start_time,
end_time,
+ cache_hit,
)
def _should_run_sync_callbacks_for_async_calls(self) -> bool:
@@ -3361,7 +3365,14 @@ def _init_custom_logger_compatible_class( # noqa: PLR0915
galileo_logger = GalileoObserve()
_in_memory_loggers.append(galileo_logger)
return galileo_logger # type: ignore
-
+ elif logging_integration == "cloudzero":
+ from litellm.integrations.cloudzero.cloudzero import CloudZeroLogger
+ for callback in _in_memory_loggers:
+ if isinstance(callback, CloudZeroLogger):
+ return callback # type: ignore
+ cloudzero_logger = CloudZeroLogger()
+ _in_memory_loggers.append(cloudzero_logger)
+ return cloudzero_logger # type: ignore
elif logging_integration == "deepeval":
for callback in _in_memory_loggers:
if isinstance(callback, DeepEvalLogger):
@@ -3581,6 +3592,11 @@ def get_custom_logger_compatible_class( # noqa: PLR0915
for callback in _in_memory_loggers:
if isinstance(callback, GalileoObserve):
return callback
+ elif logging_integration == "cloudzero":
+ from litellm.integrations.cloudzero.cloudzero import CloudZeroLogger
+ for callback in _in_memory_loggers:
+ if isinstance(callback, CloudZeroLogger):
+ return callback
elif logging_integration == "deepeval":
for callback in _in_memory_loggers:
if isinstance(callback, DeepEvalLogger):
@@ -4106,18 +4122,9 @@ class StandardLoggingPayloadSetup:
"""
# Generate object key in same format as S3Logger
from litellm.integrations.s3 import get_s3_object_key
- from litellm.proxy.spend_tracking.cold_storage_handler import ColdStorageHandler
# Only generate object key if cold storage is configured
- try:
- configured_cold_storage_logger = (
- ColdStorageHandler._get_configured_cold_storage_custom_logger()
- )
- except Exception as e:
- verbose_logger.debug(f"Cold storage custom logger unavailable: {e}")
- return None
-
- if configured_cold_storage_logger is None:
+ if litellm.configured_cold_storage_logger is None:
return None
try:
@@ -4497,7 +4504,7 @@ def get_standard_logging_object_payload(
def emit_standard_logging_payload(payload: StandardLoggingPayload):
if os.getenv("LITELLM_PRINT_STANDARD_LOGGING_PAYLOAD"):
- verbose_logger.info(json.dumps(payload, indent=4))
+ print(json.dumps(payload, indent=4)) # noqa
def get_standard_logging_metadata(
diff --git a/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py b/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py
index 75bb699292e..21ff44ab082 100644
--- a/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py
+++ b/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py
@@ -580,7 +580,9 @@ class StandardBuiltInToolCostTracking:
return WebSearchOptions(**kwargs.get("web_search_options", {}))
tools = StandardBuiltInToolCostTracking._get_tools_from_kwargs(
- kwargs, "web_search_preview"
+ kwargs=kwargs, tool_type="web_search_preview"
+ ) or StandardBuiltInToolCostTracking._get_tools_from_kwargs(
+ kwargs=kwargs, tool_type="web_search"
)
if tools:
# Look for web search tool in the tools array
@@ -612,6 +614,8 @@ class StandardBuiltInToolCostTracking:
def _is_web_search_tool_call(tool: Dict) -> bool:
if tool.get("type", None) == "web_search_preview":
return True
+ if tool.get("type", None) == "web_search":
+ return True
if "search_context_size" in tool:
return True
return False
diff --git a/litellm/litellm_core_utils/llm_cost_calc/utils.py b/litellm/litellm_core_utils/llm_cost_calc/utils.py
index fe747788243..c851ec06a6b 100644
--- a/litellm/litellm_core_utils/llm_cost_calc/utils.py
+++ b/litellm/litellm_core_utils/llm_cost_calc/utils.py
@@ -454,6 +454,15 @@ class CostCalculatorUtils:
model=model,
image_response=completion_response,
)
+ elif custom_llm_provider == litellm.LlmProviders.AIML.value:
+ from litellm.llms.aiml.image_generation.cost_calculator import (
+ cost_calculator as aiml_image_cost_calculator,
+ )
+
+ return aiml_image_cost_calculator(
+ model=model,
+ image_response=completion_response,
+ )
elif custom_llm_provider == litellm.LlmProviders.GEMINI.value:
from litellm.llms.gemini.image_generation.cost_calculator import (
cost_calculator as gemini_image_cost_calculator,
diff --git a/litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py b/litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py
index 54adef9c958..8dc3061460a 100644
--- a/litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py
+++ b/litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py
@@ -43,13 +43,13 @@ from .get_headers import get_response_headers
def _safe_convert_created_field(created_value) -> int:
"""
Safely convert a 'created' field value to an integer.
-
- Some providers (like SambaNova) return the 'created' field as a float
+
+ Some providers (like SambaNova) return the 'created' field as a float
(Unix timestamp with fractional seconds), but LiteLLM expects an integer.
-
+
Args:
created_value: The value from response_object["created"]
-
+
Returns:
int: Unix timestamp as integer
"""
@@ -161,7 +161,9 @@ async def convert_to_streaming_response_async(response_object: Optional[dict] =
model_response_object.id = response_object["id"]
if "created" in response_object:
- model_response_object.created = _safe_convert_created_field(response_object["created"])
+ model_response_object.created = _safe_convert_created_field(
+ response_object["created"]
+ )
if "system_fingerprint" in response_object:
model_response_object.system_fingerprint = response_object["system_fingerprint"]
@@ -209,7 +211,9 @@ def convert_to_streaming_response(response_object: Optional[dict] = None):
model_response_object.id = response_object["id"]
if "created" in response_object:
- model_response_object.created = _safe_convert_created_field(response_object["created"])
+ model_response_object.created = _safe_convert_created_field(
+ response_object["created"]
+ )
if "system_fingerprint" in response_object:
model_response_object.system_fingerprint = response_object["system_fingerprint"]
@@ -557,9 +561,9 @@ def convert_to_model_response_object( # noqa: PLR0915
provider_specific_fields["thinking_blocks"] = thinking_blocks
if reasoning_content:
- provider_specific_fields[
- "reasoning_content"
- ] = reasoning_content
+ provider_specific_fields["reasoning_content"] = (
+ reasoning_content
+ )
message = Message(
content=content,
@@ -571,6 +575,7 @@ def convert_to_model_response_object( # noqa: PLR0915
reasoning_content=reasoning_content,
thinking_blocks=thinking_blocks,
annotations=choice["message"].get("annotations", None),
+ images=choice["message"].get("images", None),
)
finish_reason = choice.get("finish_reason", None)
if finish_reason is None:
@@ -606,7 +611,9 @@ def convert_to_model_response_object( # noqa: PLR0915
usage_object = litellm.Usage(**response_object["usage"])
setattr(model_response_object, "usage", usage_object)
if "created" in response_object:
- model_response_object.created = _safe_convert_created_field(response_object["created"])
+ model_response_object.created = _safe_convert_created_field(
+ response_object["created"]
+ )
if "id" in response_object:
model_response_object.id = response_object["id"] or str(uuid.uuid4())
diff --git a/litellm/litellm_core_utils/logging_worker.py b/litellm/litellm_core_utils/logging_worker.py
new file mode 100644
index 00000000000..3f83719dd32
--- /dev/null
+++ b/litellm/litellm_core_utils/logging_worker.py
@@ -0,0 +1,132 @@
+import asyncio
+import contextlib
+from typing import Coroutine, Optional
+
+from litellm._logging import verbose_logger
+
+
+class LoggingWorker:
+ """
+ A simple, async logging worker that processes log coroutines in the background.
+ Designed to be best-effort with bounded queues to prevent backpressure.
+
+ This leads to a +200 RPS performance improvement when using LiteLLM Python SDK or Proxy Server.
+ - Use this to queue coroutine tasks that are not critical to the main flow of the application. e.g Success/Error callbacks, logging, etc.
+ """
+ LOGGING_WORKER_MAX_QUEUE_SIZE = 50_000
+ LOGGING_WORKER_MAX_TIME_PER_COROUTINE = 20.0
+
+ MAX_ITERATIONS_TO_CLEAR_QUEUE = 200
+ MAX_TIME_TO_CLEAR_QUEUE = 5.0
+
+ def __init__(
+ self,
+ timeout: float = LOGGING_WORKER_MAX_TIME_PER_COROUTINE,
+ max_queue_size: int = LOGGING_WORKER_MAX_QUEUE_SIZE,
+ ):
+ self.timeout = timeout
+ self.max_queue_size = max_queue_size
+ self._queue: Optional[asyncio.Queue] = None
+ self._worker_task: Optional[asyncio.Task] = None
+
+ def _ensure_queue(self) -> None:
+ """Initialize the queue if it doesn't exist."""
+ if self._queue is None:
+ self._queue = asyncio.Queue(maxsize=self.max_queue_size)
+
+ def start(self) -> None:
+ """Start the logging worker. Idempotent - safe to call multiple times."""
+ self._ensure_queue()
+ if self._worker_task is None or self._worker_task.done():
+ self._worker_task = asyncio.create_task(self._worker_loop())
+
+ async def _worker_loop(self) -> None:
+ """Main worker loop that processes log coroutines sequentially."""
+ try:
+ if self._queue is None:
+ return
+
+ while True:
+ # Process one coroutine at a time to keep event loop load predictable
+ coroutine = await self._queue.get()
+ try:
+ await asyncio.wait_for(coroutine, timeout=self.timeout)
+ except Exception as e:
+ verbose_logger.exception(f"LoggingWorker error: {e}")
+ pass
+ finally:
+ self._queue.task_done()
+
+ except asyncio.CancelledError:
+ verbose_logger.debug("LoggingWorker cancelled during shutdown")
+ # Attempt to clear remaining items to prevent "never awaited" warnings
+ await self.clear_queue()
+
+ def enqueue(self, coroutine: Coroutine) -> None:
+ """
+ Add a coroutine to the logging queue.
+ Hot path: never blocks, drops logs if queue is full.
+ """
+ if self._queue is None:
+ return
+
+ try:
+ self._queue.put_nowait(coroutine)
+ except asyncio.QueueFull as e:
+ verbose_logger.exception(f"LoggingWorker queue is full: {e}")
+ # Drop logs on overload to protect request throughput
+ pass
+
+ def ensure_initialized_and_enqueue(self, async_coroutine: Coroutine):
+ """
+ Ensure the logging worker is initialized and enqueue the coroutine.
+ """
+ self.start()
+ self.enqueue(async_coroutine)
+
+ async def stop(self) -> None:
+ """Stop the logging worker and clean up resources."""
+ if self._worker_task:
+ self._worker_task.cancel()
+ with contextlib.suppress(Exception):
+ await self._worker_task
+ self._worker_task = None
+
+ async def flush(self) -> None:
+ """Flush the logging queue."""
+ if self._queue is None:
+ return
+ while not self._queue.empty():
+ await self._queue.join()
+
+ async def clear_queue(self):
+ """
+ Clear the queue with a maximum time limit.
+ """
+ if self._queue is None:
+ return
+
+ start_time = asyncio.get_event_loop().time()
+
+ for _ in range(self.MAX_ITERATIONS_TO_CLEAR_QUEUE):
+ # Check if we've exceeded the maximum time
+ if asyncio.get_event_loop().time() - start_time >= self.MAX_TIME_TO_CLEAR_QUEUE:
+ verbose_logger.warning(f"clear_queue exceeded max_time of {self.MAX_TIME_TO_CLEAR_QUEUE}s, stopping early")
+ break
+
+ try:
+ coroutine = self._queue.get_nowait()
+ # Await the coroutine to properly execute and avoid "never awaited" warnings
+ try:
+ await asyncio.wait_for(coroutine, timeout=self.timeout)
+ except Exception:
+ # Suppress errors during cleanup
+ pass
+ self._queue.task_done() # If you're using join() elsewhere
+ except asyncio.QueueEmpty:
+ break
+
+
+# Global instance for backward compatibility
+GLOBAL_LOGGING_WORKER = LoggingWorker()
+
diff --git a/litellm/litellm_core_utils/prompt_templates/factory.py b/litellm/litellm_core_utils/prompt_templates/factory.py
index 77cbe4c9a8e..2adddd52e74 100644
--- a/litellm/litellm_core_utils/prompt_templates/factory.py
+++ b/litellm/litellm_core_utils/prompt_templates/factory.py
@@ -3846,7 +3846,13 @@ def function_call_prompt(messages: list, functions: list):
function_added_to_prompt = False
for message in messages:
if "system" in message["role"]:
- message["content"] += f""" {function_prompt}"""
+ if isinstance(message["content"], str):
+ message["content"] += f""" {function_prompt}"""
+ else:
+ message["content"].append({
+ "type": "text",
+ "text": f""" {function_prompt}"""
+ })
function_added_to_prompt = True
if function_added_to_prompt is False:
diff --git a/litellm/litellm_core_utils/prompt_templates/image_handling.py b/litellm/litellm_core_utils/prompt_templates/image_handling.py
index a9ff14d6c82..4fa10e42111 100644
--- a/litellm/litellm_core_utils/prompt_templates/image_handling.py
+++ b/litellm/litellm_core_utils/prompt_templates/image_handling.py
@@ -17,7 +17,7 @@ in_memory_cache = InMemoryCache(max_size_in_memory=MAX_IMGS_IN_MEMORY)
def _process_image_response(response: Response, url: str) -> str:
if response.status_code != 200:
- raise Exception(
+ raise litellm.ImageFetchError(
f"Error: Unable to fetch image from URL. Status code: {response.status_code}, url={url}"
)
@@ -57,9 +57,11 @@ async def async_convert_url_to_base64(url: str) -> str:
try:
response = await client.get(url, follow_redirects=True)
return _process_image_response(response, url)
+ except litellm.ImageFetchError:
+ raise
except Exception:
pass
- raise Exception(
+ raise litellm.ImageFetchError(
f"Error: Unable to fetch image from URL after 3 attempts. url={url}"
)
@@ -74,10 +76,11 @@ def convert_url_to_base64(url: str) -> str:
try:
response = client.get(url, follow_redirects=True)
return _process_image_response(response, url)
+ except litellm.ImageFetchError:
+ raise
except Exception as e:
verbose_logger.exception(e)
- # print(e)
pass
- raise Exception(
- f"Error: Unable to fetch image from URL after 3 attempts. url={url}"
+ raise litellm.ImageFetchError(
+ f"Error: Unable to fetch image from URL after 3 attempts. url={url}",
)
diff --git a/litellm/litellm_core_utils/safe_json_dumps.py b/litellm/litellm_core_utils/safe_json_dumps.py
index 7ad0038ecb2..c714e36b5f9 100644
--- a/litellm/litellm_core_utils/safe_json_dumps.py
+++ b/litellm/litellm_core_utils/safe_json_dumps.py
@@ -1,5 +1,6 @@
import json
from typing import Any, Union
+
from litellm.constants import DEFAULT_MAX_RECURSE_DEPTH
diff --git a/litellm/litellm_core_utils/streaming_handler.py b/litellm/litellm_core_utils/streaming_handler.py
index b9433239271..83b4985b239 100644
--- a/litellm/litellm_core_utils/streaming_handler.py
+++ b/litellm/litellm_core_utils/streaming_handler.py
@@ -35,6 +35,12 @@ from .exception_mapping_utils import exception_type
from .llm_response_utils.get_api_base import get_api_base
from .rules import Rules
+# Constants for special delta attribute names
+AUDIO_ATTRIBUTE = "audio"
+IMAGE_ATTRIBUTE = "images"
+TOOL_CALLS_ATTRIBUTE = "tool_calls"
+FUNCTION_CALL_ATTRIBUTE = "function_call"
+
def is_async_iterable(obj: Any) -> bool:
"""
@@ -766,6 +772,83 @@ class CustomStreamWrapper:
model_response.choices[0].delta = Delta(**_initial_delta)
return model_response
+ def _has_special_delta_content(self, model_response: ModelResponseStream) -> bool:
+ """
+ Check if the delta contains special content types (tool_calls, function_call, audio, or image).
+ """
+ if len(model_response.choices) == 0:
+ return False
+
+ delta = model_response.choices[0].delta
+
+ # Check for tool_calls or function_call
+ if (
+ getattr(delta, TOOL_CALLS_ATTRIBUTE, None) is not None
+ or getattr(delta, FUNCTION_CALL_ATTRIBUTE, None) is not None
+ ):
+ return True
+
+ # Check for audio
+ if (
+ hasattr(delta, AUDIO_ATTRIBUTE)
+ and getattr(delta, AUDIO_ATTRIBUTE, None) is not None
+ ):
+ return True
+
+ # Check for image
+ if (
+ hasattr(delta, IMAGE_ATTRIBUTE)
+ and getattr(delta, IMAGE_ATTRIBUTE, None) is not None
+ ):
+ return True
+
+ return False
+
+ def _handle_special_delta_content(
+ self, model_response: ModelResponseStream
+ ) -> ModelResponseStream:
+ """
+ Handle special delta content types by stripping role and returning the response.
+ """
+ return self.strip_role_from_delta(model_response)
+
+ def _has_special_delta_attribute(self, delta, attribute_name: str) -> bool:
+ """
+ Check if delta has a specific attribute and it's not None.
+ """
+ return delta is not None and getattr(delta, attribute_name, None) is not None
+
+ def _copy_delta_attribute(
+ self, source_delta, target_delta, attribute_name: str
+ ) -> None:
+ """
+ Copy a specific attribute from source delta to target delta.
+ """
+ setattr(target_delta, attribute_name, getattr(source_delta, attribute_name))
+
+ def _has_any_special_delta_attributes(self, delta) -> bool:
+ """
+ Check if delta has any special attributes (audio, image).
+ """
+ special_attributes = [AUDIO_ATTRIBUTE, IMAGE_ATTRIBUTE]
+ for attribute in special_attributes:
+ if self._has_special_delta_attribute(delta, attribute):
+ return True
+ return False
+
+ def _handle_special_delta_attributes(
+ self, delta, model_response: "ModelResponseStream"
+ ) -> None:
+ """
+ Handle special delta attributes (audio, image) by copying them to model_response.
+ """
+ special_attributes = [AUDIO_ATTRIBUTE, IMAGE_ATTRIBUTE]
+ for attribute in special_attributes:
+ if self._has_special_delta_attribute(delta, attribute):
+ self._copy_delta_attribute(
+ delta, model_response.choices[0].delta, attribute
+ )
+
def return_processed_chunk_logic( # noqa
self,
completion_obj: Dict[str, Any],
@@ -888,20 +971,8 @@ class CustomStreamWrapper:
self.sent_last_chunk = True
return model_response
- elif (
- model_response.choices[0].delta.tool_calls is not None
- or model_response.choices[0].delta.function_call is not None
- ):
- model_response = self.strip_role_from_delta(model_response)
-
- return model_response
- elif (
- len(model_response.choices) > 0
- and hasattr(model_response.choices[0].delta, "audio")
- and model_response.choices[0].delta.audio is not None
- ):
- model_response = self.strip_role_from_delta(model_response)
- return model_response
+ elif self._has_special_delta_content(model_response):
+ return self._handle_special_delta_content(model_response)
else:
if hasattr(model_response, "usage"):
self.chunks.append(model_response)
@@ -1374,10 +1445,8 @@ class CustomStreamWrapper:
)
)
model_response.choices[0].delta = Delta()
- elif (
- delta is not None and getattr(delta, "audio", None) is not None
- ):
- model_response.choices[0].delta.audio = delta.audio
+ elif self._has_any_special_delta_attributes(delta):
+ self._handle_special_delta_attributes(delta, model_response)
else:
try:
delta = (
@@ -1868,7 +1937,7 @@ class CustomStreamWrapper:
)
## Map to OpenAI Exception
try:
- exception_type(
+ raise exception_type(
model=self.model,
custom_llm_provider=self.custom_llm_provider,
original_exception=e,
diff --git a/litellm/litellm_core_utils/token_counter.py b/litellm/litellm_core_utils/token_counter.py
index 4df944edbaa..fab2c1e76ee 100644
--- a/litellm/litellm_core_utils/token_counter.py
+++ b/litellm/litellm_core_utils/token_counter.py
@@ -529,7 +529,7 @@ def _get_count_function(
encoding = tiktoken.get_encoding("cl100k_base")
def count_tokens(text: str) -> int:
- return len(encoding.encode(text))
+ return len(encoding.encode(text, disallowed_special=()))
else:
raise ValueError("Unsupported tokenizer type")
diff --git a/litellm/llms/aiml/__init__.py b/litellm/llms/aiml/__init__.py
new file mode 100644
index 00000000000..42482760cda
--- /dev/null
+++ b/litellm/llms/aiml/__init__.py
@@ -0,0 +1,5 @@
+from .image_generation import get_aiml_image_generation_config
+
+__all__ = [
+ "get_aiml_image_generation_config",
+]
diff --git a/litellm/llms/aiml/chat/transformation.py b/litellm/llms/aiml/chat/transformation.py
new file mode 100644
index 00000000000..0f3e333343d
--- /dev/null
+++ b/litellm/llms/aiml/chat/transformation.py
@@ -0,0 +1,23 @@
+from typing import Optional, Tuple
+
+from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfig
+from litellm.secret_managers.main import get_secret_str
+
+
+class AIMLChatConfig(OpenAIGPTConfig):
+ @property
+ def custom_llm_provider(self) -> Optional[str]:
+ return "aiml"
+
+ def _get_openai_compatible_provider_info(
+ self, api_base: Optional[str], api_key: Optional[str]
+ ) -> Tuple[Optional[str], Optional[str]]:
+ # AIML is openai compatible, we just need to set the api_base
+ api_base = (
+ api_base
+ or get_secret_str("AIML_API_BASE")
+ or "https://api.aimlapi.com/v1" # Default AIML API base URL
+ ) # type: ignore
+ dynamic_api_key = api_key or get_secret_str("AIML_API_KEY")
+ return api_base, dynamic_api_key
+ pass
\ No newline at end of file
diff --git a/litellm/llms/aiml/image_generation/__init__.py b/litellm/llms/aiml/image_generation/__init__.py
new file mode 100644
index 00000000000..4548bd1b3f8
--- /dev/null
+++ b/litellm/llms/aiml/image_generation/__init__.py
@@ -0,0 +1,13 @@
+from litellm.llms.base_llm.image_generation.transformation import (
+ BaseImageGenerationConfig,
+)
+
+from .transformation import AimlImageGenerationConfig
+
+__all__ = [
+ "AimlImageGenerationConfig",
+]
+
+
+def get_aiml_image_generation_config(model: str) -> BaseImageGenerationConfig:
+ return AimlImageGenerationConfig()
diff --git a/litellm/llms/aiml/image_generation/cost_calculator.py b/litellm/llms/aiml/image_generation/cost_calculator.py
new file mode 100644
index 00000000000..1fecfb6a9a5
--- /dev/null
+++ b/litellm/llms/aiml/image_generation/cost_calculator.py
@@ -0,0 +1,25 @@
+from typing import Any
+
+import litellm
+from litellm.types.utils import ImageResponse
+
+
+def cost_calculator(
+ model: str,
+ image_response: Any,
+) -> float:
+ """
+ AI/ML flux image generation cost calculator
+ """
+ _model_info = litellm.get_model_info(
+ model=model,
+ custom_llm_provider=litellm.LlmProviders.AIML.value,
+ )
+ output_cost_per_image: float = _model_info.get("output_cost_per_image") or 0.0
+ num_images: int = 0
+ if isinstance(image_response, ImageResponse):
+ if image_response.data:
+ num_images = len(image_response.data)
+ return output_cost_per_image * num_images
+ else:
+ raise ValueError(f"image_response must be of type ImageResponse got type={type(image_response)}")
diff --git a/litellm/llms/aiml/image_generation/transformation.py b/litellm/llms/aiml/image_generation/transformation.py
new file mode 100644
index 00000000000..3b586689ea7
--- /dev/null
+++ b/litellm/llms/aiml/image_generation/transformation.py
@@ -0,0 +1,204 @@
+from typing import TYPE_CHECKING, Any, List, Optional
+
+import httpx
+
+from litellm.llms.base_llm.image_generation.transformation import (
+ BaseImageGenerationConfig,
+)
+from litellm.secret_managers.main import get_secret_str
+from litellm.types.llms.aiml import AimlImageGenerationRequestParams
+from litellm.types.llms.openai import (
+ AllMessageValues,
+ OpenAIImageGenerationOptionalParams,
+)
+from litellm.types.utils import ImageObject, ImageResponse
+
+if TYPE_CHECKING:
+ from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj
+
+ LiteLLMLoggingObj = _LiteLLMLoggingObj
+else:
+ LiteLLMLoggingObj = Any
+
+
+class AimlImageGenerationConfig(BaseImageGenerationConfig):
+ DEFAULT_BASE_URL: str = "https://api.aimlapi.com"
+ IMAGE_GENERATION_ENDPOINT: str = "v1/images/generations"
+
+ def get_supported_openai_params(
+ self, model: str
+ ) -> List[OpenAIImageGenerationOptionalParams]:
+ """
+ https://api.aimlapi.com/v1/images/generations
+ """
+ return [
+ "n",
+ "response_format",
+ "size"
+ ]
+
+ def map_openai_params(
+ self,
+ non_default_params: dict,
+ optional_params: dict,
+ model: str,
+ drop_params: bool,
+ ) -> dict:
+ supported_params = self.get_supported_openai_params(model)
+
+ for k in non_default_params.keys():
+ if k not in optional_params.keys():
+ if k in supported_params:
+ # Map OpenAI params to AI/ML params
+ if k == "n":
+ optional_params["num_images"] = non_default_params[k]
+ elif k == "response_format":
+ optional_params["output_format"] = non_default_params[k]
+ elif k == "size":
+ # Map OpenAI size format to AI/ML image_size
+ size_value = non_default_params[k]
+ if isinstance(size_value, str):
+ # Handle standard OpenAI sizes like "1024x1024"
+ if "x" in size_value:
+ width, height = map(int, size_value.split("x"))
+ optional_params["image_size"] = {"width": width, "height": height}
+ else:
+ # Pass through predefined sizes
+ optional_params["image_size"] = size_value
+ else:
+ optional_params["image_size"] = size_value
+ else:
+ optional_params[k] = non_default_params[k]
+ elif drop_params:
+ pass
+ else:
+ raise ValueError(
+ f"Parameter {k} is not supported for model {model}. Supported parameters are {supported_params}. Set drop_params=True to drop unsupported parameters."
+ )
+
+ return optional_params
+
+ def get_complete_url(
+ self,
+ api_base: Optional[str],
+ api_key: Optional[str],
+ model: str,
+ optional_params: dict,
+ litellm_params: dict,
+ stream: Optional[bool] = None,
+ ) -> str:
+ """
+ Get the complete url for the request
+ """
+ complete_url: str = (
+ api_base
+ or get_secret_str("AIML_API_BASE")
+ or self.DEFAULT_BASE_URL
+ )
+
+ complete_url = complete_url.rstrip("/")
+ complete_url = f"{complete_url}/{self.IMAGE_GENERATION_ENDPOINT}"
+ return complete_url
+
+ def validate_environment(
+ self,
+ headers: dict,
+ model: str,
+ messages: List[AllMessageValues],
+ optional_params: dict,
+ litellm_params: dict,
+ api_key: Optional[str] = None,
+ api_base: Optional[str] = None,
+ ) -> dict:
+ final_api_key: Optional[str] = (
+ api_key or
+ get_secret_str("AIML_API_KEY") or
+ get_secret_str("AIMLAPI_KEY") # Alternative name
+ )
+ if not final_api_key:
+ raise ValueError("AIML_API_KEY or AIMLAPI_KEY is not set")
+
+ headers["Authorization"] = f"Bearer {final_api_key}"
+ headers["Content-Type"] = "application/json"
+ return headers
+
+ def transform_image_generation_request(
+ self,
+ model: str,
+ prompt: str,
+ optional_params: dict,
+ litellm_params: dict,
+ headers: dict,
+ ) -> dict:
+ """
+ Transform the image generation request to the AI/ML flux image generation request body
+
+ https://api.aimlapi.com/v1/images/generations
+ """
+ aiml_image_generation_request_body: AimlImageGenerationRequestParams = AimlImageGenerationRequestParams(
+ prompt=prompt,
+ model=model,
+ **optional_params,
+ )
+ return dict(aiml_image_generation_request_body)
+
+ def transform_image_generation_response(
+ self,
+ model: str,
+ raw_response: httpx.Response,
+ model_response: ImageResponse,
+ logging_obj: LiteLLMLoggingObj,
+ request_data: dict,
+ optional_params: dict,
+ litellm_params: dict,
+ encoding: Any,
+ api_key: Optional[str] = None,
+ json_mode: Optional[bool] = None,
+ ) -> ImageResponse:
+ """
+ Transform the image generation response to the litellm image response
+
+ https://api.aimlapi.com/v1/images/generations
+ """
+ try:
+ response_data = raw_response.json()
+ except Exception as e:
+ raise self.get_error_class(
+ error_message=f"Error transforming image generation response: {e}",
+ status_code=raw_response.status_code,
+ headers=raw_response.headers,
+ )
+
+ if not model_response.data:
+ model_response.data = []
+
+ # AI/ML API can return images in two different formats:
+ # 1. output.choices array with image_base64
+ # 2. images array with url (and optional width, height, content_type)
+
+ if "output" in response_data and "choices" in response_data["output"]:
+ for choice in response_data["output"]["choices"]:
+ if "image_base64" in choice:
+ model_response.data.append(ImageObject(
+ b64_json=choice["image_base64"],
+ url=None, # AI/ML API returns base64, not URLs
+ ))
+ elif "url" in choice:
+ model_response.data.append(ImageObject(
+ b64_json=None,
+ url=choice["url"],
+ ))
+ elif "images" in response_data:
+ # Handle alternative format: {"images": [{"url": "...", "width": 1024, "height": 768, "content_type": "image/jpeg"}]}
+ for image in response_data["images"]:
+ if "url" in image:
+ model_response.data.append(ImageObject(
+ b64_json=None,
+ url=image["url"],
+ ))
+ elif "image_base64" in image:
+ model_response.data.append(ImageObject(
+ b64_json=image["image_base64"],
+ url=None,
+ ))
+ return model_response
diff --git a/litellm/llms/anthropic/common_utils.py b/litellm/llms/anthropic/common_utils.py
index 68b5341e954..06ebb5079d9 100644
--- a/litellm/llms/anthropic/common_utils.py
+++ b/litellm/llms/anthropic/common_utils.py
@@ -107,8 +107,10 @@ class AnthropicModelInfo(BaseLLMModelInfo):
user_anthropic_beta_headers: Optional[List[str]] = None,
) -> dict:
betas = set()
- if prompt_caching_set:
- betas.add("prompt-caching-2024-07-31")
+ # Note: prompt-caching-2024-07-31 header is no longer required for prompt caching
+ # as per current Anthropic documentation. It's now generally available.
+ # if prompt_caching_set:
+ # betas.add("prompt-caching-2024-07-31")
if computer_tool_used:
betas.add("computer-use-2024-10-22")
# if pdf_used:
@@ -176,6 +178,11 @@ class AnthropicModelInfo(BaseLLMModelInfo):
mcp_server_used=mcp_server_used,
)
+ # For Vertex AI requests, remove any user-provided anthropic-beta headers
+ # since Vertex AI rejects them and they're no longer required for prompt caching
+ if optional_params.get("is_vertex_request", False):
+ headers = {k: v for k, v in headers.items() if k != "anthropic-beta"}
+
headers = {**headers, **anthropic_headers}
return headers
diff --git a/litellm/llms/azure/responses/transformation.py b/litellm/llms/azure/responses/transformation.py
index 063d1af9c33..488a711669d 100644
--- a/litellm/llms/azure/responses/transformation.py
+++ b/litellm/llms/azure/responses/transformation.py
@@ -6,6 +6,7 @@ from litellm.llms.openai.responses.transformation import OpenAIResponsesAPIConfi
from litellm.types.llms.openai import *
from litellm.types.responses.main import *
from litellm.types.router import GenericLiteLLMParams
+from litellm.types.utils import LlmProviders
if TYPE_CHECKING:
from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj
@@ -16,6 +17,10 @@ else:
class AzureOpenAIResponsesAPIConfig(OpenAIResponsesAPIConfig):
+ @property
+ def custom_llm_provider(self) -> LlmProviders:
+ return LlmProviders.AZURE
+
def validate_environment(
self, headers: dict, model: str, litellm_params: Optional[GenericLiteLLMParams]
) -> dict:
diff --git a/litellm/llms/base_llm/__init__.py b/litellm/llms/base_llm/__init__.py
index 187c985fd67..665e242969c 100644
--- a/litellm/llms/base_llm/__init__.py
+++ b/litellm/llms/base_llm/__init__.py
@@ -1,5 +1,6 @@
from .anthropic_messages.transformation import BaseAnthropicMessagesConfig
from .audio_transcription.transformation import BaseAudioTranscriptionConfig
+from .batches.transformation import BaseBatchesConfig
from .chat.transformation import BaseConfig
from .embedding.transformation import BaseEmbeddingConfig
from .image_edit.transformation import BaseImageEditConfig
@@ -12,4 +13,5 @@ __all__ = [
"BaseAnthropicMessagesConfig",
"BaseEmbeddingConfig",
"BaseImageEditConfig",
+ "BaseBatchesConfig",
]
diff --git a/litellm/llms/base_llm/batches/transformation.py b/litellm/llms/base_llm/batches/transformation.py
new file mode 100644
index 00000000000..1d3e54fae67
--- /dev/null
+++ b/litellm/llms/base_llm/batches/transformation.py
@@ -0,0 +1,176 @@
+import types
+from abc import ABC, abstractmethod
+from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
+
+import httpx
+from httpx import Headers
+
+from litellm.types.llms.openai import (
+ AllMessageValues,
+ CreateBatchRequest,
+)
+from litellm.types.utils import LiteLLMBatch, LlmProviders
+
+if TYPE_CHECKING:
+ from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj
+
+ from ..chat.transformation import BaseLLMException as _BaseLLMException
+
+ LiteLLMLoggingObj = _LiteLLMLoggingObj
+ BaseLLMException = _BaseLLMException
+else:
+ LiteLLMLoggingObj = Any
+ BaseLLMException = Any
+
+
+class BaseBatchesConfig(ABC):
+ """
+ Abstract base class for batch processing configurations across different LLM providers.
+
+ This class defines the interface that all provider-specific batch configurations
+ must implement to work with LiteLLM's unified batch processing system.
+ """
+
+ def __init__(self):
+ pass
+
+ @property
+ @abstractmethod
+ def custom_llm_provider(self) -> LlmProviders:
+ """Return the LLM provider type for this configuration."""
+ pass
+
+ @classmethod
+ def get_config(cls):
+ """Get configuration dictionary for this class."""
+ return {
+ k: v
+ for k, v in cls.__dict__.items()
+ if not k.startswith("__")
+ and not k.startswith("_abc")
+ and not isinstance(
+ v,
+ (
+ types.FunctionType,
+ types.BuiltinFunctionType,
+ classmethod,
+ staticmethod,
+ ),
+ )
+ and v is not None
+ }
+
+ @abstractmethod
+ def validate_environment(
+ self,
+ headers: dict,
+ model: str,
+ messages: List[AllMessageValues],
+ optional_params: dict,
+ litellm_params: dict,
+ api_key: Optional[str] = None,
+ api_base: Optional[str] = None,
+ ) -> dict:
+ """
+ Validate and prepare environment-specific headers and parameters.
+
+ Args:
+ headers: HTTP headers dictionary
+ model: Model name
+ messages: List of messages
+ optional_params: Optional parameters
+ litellm_params: LiteLLM parameters
+ api_key: API key
+ api_base: API base URL
+
+ Returns:
+ Updated headers dictionary
+ """
+ pass
+
+ @abstractmethod
+ def get_complete_batch_url(
+ self,
+ api_base: Optional[str],
+ api_key: Optional[str],
+ model: str,
+ optional_params: Dict,
+ litellm_params: Dict,
+ data: CreateBatchRequest,
+ ) -> str:
+ """
+ Get the complete URL for batch creation request.
+
+ Args:
+ api_base: Base API URL
+ api_key: API key
+ model: Model name
+ optional_params: Optional parameters
+ litellm_params: LiteLLM parameters
+ data: Batch creation request data
+
+ Returns:
+ Complete URL for the batch request
+ """
+ pass
+
+ @abstractmethod
+ def transform_create_batch_request(
+ self,
+ model: str,
+ create_batch_data: CreateBatchRequest,
+ optional_params: dict,
+ litellm_params: dict,
+ ) -> Union[bytes, str, Dict[str, Any]]:
+ """
+ Transform the batch creation request to provider-specific format.
+
+ Args:
+ model: Model name
+ create_batch_data: Batch creation request data
+ optional_params: Optional parameters
+ litellm_params: LiteLLM parameters
+
+ Returns:
+ Transformed request data
+ """
+ pass
+
+ @abstractmethod
+ def transform_create_batch_response(
+ self,
+ model: Optional[str],
+ raw_response: httpx.Response,
+ logging_obj: LiteLLMLoggingObj,
+ litellm_params: dict,
+ ) -> LiteLLMBatch:
+ """
+ Transform provider-specific batch response to LiteLLM format.
+
+ Args:
+ model: Model name
+ raw_response: Raw HTTP response
+ logging_obj: Logging object
+ litellm_params: LiteLLM parameters
+
+ Returns:
+ LiteLLM batch object
+ """
+ pass
+
+ @abstractmethod
+ def get_error_class(
+ self, error_message: str, status_code: int, headers: Union[Dict, Headers]
+ ) -> "BaseLLMException":
+ """
+ Get the appropriate error class for this provider.
+
+ Args:
+ error_message: Error message
+ status_code: HTTP status code
+ headers: Response headers
+
+ Returns:
+ Provider-specific exception class
+ """
+ pass
diff --git a/litellm/llms/base_llm/files/transformation.py b/litellm/llms/base_llm/files/transformation.py
index 5c37a8b7547..35b76479cdc 100644
--- a/litellm/llms/base_llm/files/transformation.py
+++ b/litellm/llms/base_llm/files/transformation.py
@@ -35,6 +35,16 @@ class BaseFilesConfig(BaseConfig):
def custom_llm_provider(self) -> LlmProviders:
pass
+ @property
+ def file_upload_http_method(self) -> str:
+ """
+ HTTP method to use for file uploads.
+ Override this in provider configs if they need different methods.
+ Default is POST (used by most providers like OpenAI, Anthropic).
+ S3-based providers like Bedrock should return "PUT".
+ """
+ return "POST"
+
@abstractmethod
def get_supported_openai_params(
self, model: str
diff --git a/litellm/llms/base_llm/passthrough/transformation.py b/litellm/llms/base_llm/passthrough/transformation.py
index 60d89c1610f..f925e6819dc 100644
--- a/litellm/llms/base_llm/passthrough/transformation.py
+++ b/litellm/llms/base_llm/passthrough/transformation.py
@@ -31,30 +31,26 @@ class BasePassthroughConfig(BaseLLMModelInfo):
Args:
endpoint: str - the endpoint to add to the url
base_target_url: str - the base url to add the endpoint to
- request_query_params: dict - the query params to add to the url
+ request_query_params: Optional[dict] - the query params to add to the url
Returns:
- str - the formatted url
+ httpx.URL - the formatted url
"""
from urllib.parse import urlencode
import httpx
- encoded_endpoint = httpx.URL(endpoint).path
+ base = base_target_url.rstrip('/')
+ endpoint = endpoint.lstrip('/')
+ full_url = f"{base}/{endpoint}"
- # Ensure endpoint starts with '/' for proper URL construction
- if not encoded_endpoint.startswith("/"):
- encoded_endpoint = "/" + encoded_endpoint
-
- # Construct the full target URL using httpx
- base_url = httpx.URL(base_target_url)
- updated_url = base_url.copy_with(path=encoded_endpoint)
+ url = httpx.URL(full_url)
if request_query_params:
- # Create a new URL with the merged query params
- updated_url = updated_url.copy_with(
+ url = url.copy_with(
query=urlencode(request_query_params).encode("ascii")
)
- return updated_url
+
+ return url
@abstractmethod
def get_complete_url(
diff --git a/litellm/llms/base_llm/responses/transformation.py b/litellm/llms/base_llm/responses/transformation.py
index e2f89da5e86..4da4f7652e0 100644
--- a/litellm/llms/base_llm/responses/transformation.py
+++ b/litellm/llms/base_llm/responses/transformation.py
@@ -12,6 +12,7 @@ from litellm.types.llms.openai import (
)
from litellm.types.responses.main import *
from litellm.types.router import GenericLiteLLMParams
+from litellm.types.utils import LlmProviders
if TYPE_CHECKING:
from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj
@@ -29,6 +30,11 @@ class BaseResponsesAPIConfig(ABC):
def __init__(self):
pass
+ @property
+ @abstractmethod
+ def custom_llm_provider(self) -> LlmProviders:
+ pass
+
@classmethod
def get_config(cls):
return {
diff --git a/litellm/llms/bedrock/base_aws_llm.py b/litellm/llms/bedrock/base_aws_llm.py
index cc205e62dc9..ce196757f94 100644
--- a/litellm/llms/bedrock/base_aws_llm.py
+++ b/litellm/llms/bedrock/base_aws_llm.py
@@ -179,15 +179,33 @@ class BaseAWSLLM:
aws_sts_endpoint=aws_sts_endpoint,
)
elif aws_role_name is not None:
- # If aws_session_name is not provided, generate a default one
- if aws_session_name is None:
- aws_session_name = f"litellm-session-{int(datetime.now().timestamp())}"
- credentials, _cache_ttl = self._auth_with_aws_role(
- aws_access_key_id=aws_access_key_id,
- aws_secret_access_key=aws_secret_access_key,
- aws_role_name=aws_role_name,
- aws_session_name=aws_session_name,
- )
+ # Check if we're in IRSA and trying to assume the same role we already have
+ current_role_arn = os.getenv("AWS_ROLE_ARN")
+ web_identity_token_file = os.getenv("AWS_WEB_IDENTITY_TOKEN_FILE")
+
+ # In IRSA environments, we should skip role assumption if we're already running as the target role
+ # This is true when:
+ # 1. We have AWS_ROLE_ARN set (current role)
+ # 2. We have AWS_WEB_IDENTITY_TOKEN_FILE set (IRSA environment)
+ # 3. The current role matches the requested role
+ if (current_role_arn and web_identity_token_file and
+ current_role_arn == aws_role_name):
+ verbose_logger.debug("Using IRSA same-role optimization: calling _auth_with_env_vars")
+ # We're already running as this role via IRSA, no need to assume it again
+ # Use the default boto3 credentials (which will use the IRSA credentials)
+ credentials, _cache_ttl = self._auth_with_env_vars()
+ else:
+ verbose_logger.debug("Using role assumption: calling _auth_with_aws_role")
+ # If aws_session_name is not provided, generate a default one
+ if aws_session_name is None:
+ aws_session_name = f"litellm-session-{int(datetime.now().timestamp())}"
+ credentials, _cache_ttl = self._auth_with_aws_role(
+ aws_access_key_id=aws_access_key_id,
+ aws_secret_access_key=aws_secret_access_key,
+ aws_session_token=aws_session_token,
+ aws_role_name=aws_role_name,
+ aws_session_name=aws_session_name,
+ )
elif aws_profile_name is not None: ### CHECK SESSION ###
credentials, _cache_ttl = self._auth_with_aws_profile(aws_profile_name)
@@ -446,11 +464,98 @@ class BaseAWSLLM:
iam_creds = session.get_credentials()
return iam_creds, self._get_default_ttl_for_boto3_credentials()
+ def _handle_irsa_cross_account(self, irsa_role_arn: str, aws_role_name: str,
+ aws_session_name: str, region: str, web_identity_token_file: str) -> dict:
+ """Handle cross-account role assumption for IRSA."""
+ import boto3
+
+ verbose_logger.debug("Cross-account role assumption detected")
+
+ # Read the web identity token
+ with open(web_identity_token_file, 'r') as f:
+ web_identity_token = f.read().strip()
+
+ # Create an STS client without credentials
+ with tracer.trace("boto3.client(sts) for manual IRSA"):
+ sts_client = boto3.client('sts', region_name=region)
+
+ # Manually assume the IRSA role with the session name
+ verbose_logger.debug(f"Manually assuming IRSA role {irsa_role_arn} with session {aws_session_name}")
+ irsa_response = sts_client.assume_role_with_web_identity(
+ RoleArn=irsa_role_arn,
+ RoleSessionName=aws_session_name,
+ WebIdentityToken=web_identity_token
+ )
+
+ # Extract the credentials from the IRSA assumption
+ irsa_creds = irsa_response["Credentials"]
+
+ # Create a new STS client with the IRSA credentials
+ with tracer.trace("boto3.client(sts) with manual IRSA credentials"):
+ sts_client_with_creds = boto3.client(
+ 'sts',
+ region_name=region,
+ aws_access_key_id=irsa_creds["AccessKeyId"],
+ aws_secret_access_key=irsa_creds["SecretAccessKey"],
+ aws_session_token=irsa_creds["SessionToken"]
+ )
+
+ # Get current caller identity for debugging
+ try:
+ caller_identity = sts_client_with_creds.get_caller_identity()
+ verbose_logger.debug(f"Current identity after manual IRSA assumption: {caller_identity.get('Arn', 'unknown')}")
+ except Exception as e:
+ verbose_logger.debug(f"Failed to get caller identity: {e}")
+
+ # Now assume the target role
+ verbose_logger.debug(f"Attempting to assume target role: {aws_role_name} with session: {aws_session_name}")
+ return sts_client_with_creds.assume_role(
+ RoleArn=aws_role_name, RoleSessionName=aws_session_name
+ )
+
+ def _handle_irsa_same_account(self, aws_role_name: str, aws_session_name: str, region: str) -> dict:
+ """Handle same-account role assumption for IRSA."""
+ import boto3
+
+ verbose_logger.debug("Same account role assumption, using automatic IRSA")
+ with tracer.trace("boto3.client(sts) with automatic IRSA"):
+ sts_client = boto3.client("sts", region_name=region)
+
+ # Get current caller identity for debugging
+ try:
+ caller_identity = sts_client.get_caller_identity()
+ verbose_logger.debug(f"Current IRSA identity: {caller_identity.get('Arn', 'unknown')}")
+ except Exception as e:
+ verbose_logger.debug(f"Failed to get caller identity: {e}")
+
+ # Assume the role
+ verbose_logger.debug(f"Attempting to assume role: {aws_role_name} with session: {aws_session_name}")
+ return sts_client.assume_role(
+ RoleArn=aws_role_name, RoleSessionName=aws_session_name
+ )
+
+ def _extract_credentials_and_ttl(self, sts_response: dict) -> Tuple[Credentials, Optional[int]]:
+ """Extract credentials and TTL from STS response."""
+ from botocore.credentials import Credentials
+
+ sts_credentials = sts_response["Credentials"]
+ credentials = Credentials(
+ access_key=sts_credentials["AccessKeyId"],
+ secret_key=sts_credentials["SecretAccessKey"],
+ token=sts_credentials["SessionToken"],
+ )
+
+ expiration_time = sts_credentials["Expiration"]
+ ttl = int((expiration_time - datetime.now(expiration_time.tzinfo)).total_seconds())
+
+ return credentials, ttl
+
@tracer.wrap()
def _auth_with_aws_role(
self,
aws_access_key_id: Optional[str],
aws_secret_access_key: Optional[str],
+ aws_session_token: Optional[str],
aws_role_name: str,
aws_session_name: str,
) -> Tuple[Credentials, Optional[int]]:
@@ -460,12 +565,59 @@ class BaseAWSLLM:
import boto3
from botocore.credentials import Credentials
- with tracer.trace("boto3.client(sts)"):
- sts_client = boto3.client(
- "sts",
- aws_access_key_id=aws_access_key_id, # [OPTIONAL]
- aws_secret_access_key=aws_secret_access_key, # [OPTIONAL]
- )
+ # Check if we're in an EKS/IRSA environment
+ web_identity_token_file = os.getenv("AWS_WEB_IDENTITY_TOKEN_FILE")
+ irsa_role_arn = os.getenv("AWS_ROLE_ARN")
+
+ # If we have IRSA environment variables and no explicit credentials,
+ # we need to use the web identity token flow
+ if (web_identity_token_file and irsa_role_arn and
+ aws_access_key_id is None and aws_secret_access_key is None):
+ # For cross-account role assumption with specific session names,
+ # we need to manually assume the IRSA role first with the correct session name
+ verbose_logger.debug(f"IRSA detected: using web identity token from {web_identity_token_file}")
+
+ try:
+ # Get region from environment
+ region = os.getenv("AWS_REGION") or os.getenv("AWS_DEFAULT_REGION") or "us-east-1"
+
+ # Check if we need to do cross-account role assumption
+ if aws_role_name != irsa_role_arn:
+ sts_response = self._handle_irsa_cross_account(
+ irsa_role_arn, aws_role_name, aws_session_name, region, web_identity_token_file
+ )
+ else:
+ sts_response = self._handle_irsa_same_account(
+ aws_role_name, aws_session_name, region
+ )
+
+ return self._extract_credentials_and_ttl(sts_response)
+
+ except Exception as e:
+ verbose_logger.debug(f"Failed to assume role via IRSA: {e}")
+ if "AccessDenied" in str(e) and "is not authorized to perform: sts:AssumeRole" in str(e):
+ # Provide a more helpful error message for trust policy issues
+ verbose_logger.error(
+ f"Access denied when trying to assume role {aws_role_name}. "
+ f"Please ensure the trust policy of {aws_role_name} allows "
+ f"the current role to assume it. Current identity: check logs with verbose mode."
+ )
+ # Re-raise the exception instead of falling through
+ raise
+
+ # In EKS/IRSA environments, use ambient credentials (no explicit keys needed)
+ # This allows the web identity token to work automatically
+ if aws_access_key_id is None and aws_secret_access_key is None:
+ with tracer.trace("boto3.client(sts)"):
+ sts_client = boto3.client("sts")
+ else:
+ with tracer.trace("boto3.client(sts)"):
+ sts_client = boto3.client(
+ "sts",
+ aws_access_key_id=aws_access_key_id,
+ aws_secret_access_key=aws_secret_access_key,
+ aws_session_token=aws_session_token,
+ )
sts_response = sts_client.assume_role(
RoleArn=aws_role_name, RoleSessionName=aws_session_name
diff --git a/litellm/llms/bedrock/batches/transformation.py b/litellm/llms/bedrock/batches/transformation.py
new file mode 100644
index 00000000000..ce580ebc624
--- /dev/null
+++ b/litellm/llms/bedrock/batches/transformation.py
@@ -0,0 +1,254 @@
+import os
+import time
+from typing import Any, Dict, List, Literal, Optional, Union, cast
+
+from httpx import Headers, Response
+
+from litellm.llms.base_llm.batches.transformation import BaseBatchesConfig
+from litellm.llms.base_llm.chat.transformation import BaseLLMException
+from litellm.types.llms.bedrock import (
+ BedrockBatchJobStatus,
+ BedrockCreateBatchRequest,
+ BedrockCreateBatchResponse,
+ BedrockInputDataConfig,
+ BedrockOutputDataConfig,
+ BedrockS3InputDataConfig,
+ BedrockS3OutputDataConfig,
+)
+from litellm.types.llms.openai import (
+ AllMessageValues,
+ CreateBatchRequest,
+)
+from litellm.types.utils import LiteLLMBatch, LlmProviders
+
+from ..base_aws_llm import BaseAWSLLM
+from ..common_utils import CommonBatchFilesUtils
+
+
+class BedrockBatchesConfig(BaseAWSLLM, BaseBatchesConfig):
+ """
+ Config for Bedrock Batches - handles batch job creation and management for Bedrock
+ """
+
+ def __init__(self):
+ super().__init__()
+ self.common_utils = CommonBatchFilesUtils()
+
+ @property
+ def custom_llm_provider(self) -> LlmProviders:
+ return LlmProviders.BEDROCK
+
+ def validate_environment(
+ self,
+ headers: dict,
+ model: str,
+ messages: List[AllMessageValues],
+ optional_params: dict,
+ litellm_params: dict,
+ api_key: Optional[str] = None,
+ api_base: Optional[str] = None,
+ ) -> dict:
+ """
+ Validate and prepare environment for Bedrock batch requests.
+ AWS credentials are handled by BaseAWSLLM.
+ """
+ # Add any Bedrock-specific headers if needed
+ return headers
+
+ def get_complete_batch_url(
+ self,
+ api_base: Optional[str],
+ api_key: Optional[str],
+ model: str,
+ optional_params: Dict,
+ litellm_params: Dict,
+ data: CreateBatchRequest,
+ ) -> str:
+ """
+ Get the complete URL for Bedrock batch creation.
+ Bedrock batch jobs are created via the model invocation job API.
+ """
+ aws_region_name = self._get_aws_region_name(optional_params, model)
+
+ # Bedrock model invocation job endpoint
+ # Format: https://bedrock.{region}.amazonaws.com/model-invocation-job
+ bedrock_endpoint = f"https://bedrock.{aws_region_name}.amazonaws.com/model-invocation-job"
+
+ return bedrock_endpoint
+
+
+
+
+
+
+
+ def transform_create_batch_request(
+ self,
+ model: str,
+ create_batch_data: CreateBatchRequest,
+ optional_params: dict,
+ litellm_params: dict,
+ ) -> Dict[str, Any]:
+ """
+ Transform the batch creation request to Bedrock format.
+
+ Bedrock batch inference requires:
+ - modelId: The Bedrock model ID
+ - jobName: Unique name for the batch job
+ - inputDataConfig: Configuration for input data (S3 location)
+ - outputDataConfig: Configuration for output data (S3 location)
+ - roleArn: IAM role ARN for the batch job
+ """
+ # Get required parameters
+ input_file_id = create_batch_data.get("input_file_id")
+ if not input_file_id:
+ raise ValueError("input_file_id is required for Bedrock batch creation")
+
+ # Extract S3 information from file ID using common utility
+ input_bucket, input_key = self.common_utils.parse_s3_uri(input_file_id)
+
+ # Get output S3 configuration
+ output_bucket = litellm_params.get("s3_output_bucket_name") or os.getenv("AWS_S3_OUTPUT_BUCKET_NAME")
+ if not output_bucket:
+ # Use same bucket as input if no output bucket specified
+ output_bucket = input_bucket
+
+ # Get IAM role ARN
+ role_arn = (
+ litellm_params.get("aws_batch_role_arn")
+ or optional_params.get("aws_batch_role_arn")
+ or os.getenv("AWS_BATCH_ROLE_ARN")
+ )
+ if not role_arn:
+ raise ValueError(
+ "AWS IAM role ARN is required for Bedrock batch jobs. "
+ "Set 'aws_batch_role_arn' in litellm_params or AWS_BATCH_ROLE_ARN env var"
+ )
+
+ # Get the actual Bedrock model ID using common utility
+ bedrock_model_id = self.common_utils.extract_model_from_s3_file_path(input_file_id, optional_params)
+
+ if not bedrock_model_id:
+ raise ValueError("Could not determine Bedrock model ID. Ensure the model is specified in the input file or passed as a parameter.")
+
+ # Generate job name with the correct model ID using common utility
+ job_name = self.common_utils.generate_unique_job_name(bedrock_model_id, prefix="litellm")
+ output_key = f"litellm-batch-outputs/{job_name}/"
+
+ # Build input data config
+ input_data_config: BedrockInputDataConfig = {
+ "s3InputDataConfig": BedrockS3InputDataConfig(
+ s3Uri=f"s3://{input_bucket}/{input_key}"
+ )
+ }
+
+ # Build output data config
+ output_data_config: BedrockOutputDataConfig = {
+ "s3OutputDataConfig": BedrockS3OutputDataConfig(
+ s3Uri=f"s3://{output_bucket}/{output_key}"
+ )
+ }
+
+ # Create Bedrock batch request with proper typing
+ bedrock_request: BedrockCreateBatchRequest = {
+ "modelId": bedrock_model_id,
+ "jobName": job_name,
+ "inputDataConfig": input_data_config,
+ "outputDataConfig": output_data_config,
+ "roleArn": role_arn
+ }
+
+ # Add optional parameters if provided
+ completion_window = create_batch_data.get("completion_window")
+ if completion_window:
+ # Map OpenAI completion window to Bedrock timeout
+ # OpenAI uses "24h", Bedrock expects timeout in hours
+ if completion_window == "24h":
+ bedrock_request["timeoutDurationInHours"] = 24
+
+ # For Bedrock, we need to return a pre-signed request with AWS auth headers
+ # Use common utility for AWS signing
+ endpoint_url = f"https://bedrock.{self._get_aws_region_name(optional_params, model)}.amazonaws.com/model-invocation-job"
+ signed_headers, signed_data = self.common_utils.sign_aws_request(
+ service_name="bedrock",
+ data=bedrock_request,
+ endpoint_url=endpoint_url,
+ optional_params=optional_params,
+ method="POST"
+ )
+
+ # Return a pre-signed request format that the HTTP handler can use
+ return {
+ "method": "POST",
+ "url": endpoint_url,
+ "headers": signed_headers,
+ "data": signed_data.decode('utf-8')
+ }
+
+ def transform_create_batch_response(
+ self,
+ model: Optional[str],
+ raw_response: Response,
+ logging_obj: Any,
+ litellm_params: dict,
+ ) -> LiteLLMBatch:
+ """
+ Transform Bedrock batch creation response to LiteLLM format.
+ """
+ try:
+ response_data: BedrockCreateBatchResponse = raw_response.json()
+ except Exception as e:
+ raise ValueError(f"Failed to parse Bedrock batch response: {e}")
+
+ # Extract information from typed Bedrock response
+ job_arn = response_data.get("jobArn", "")
+ status: BedrockBatchJobStatus = response_data.get("status", "Submitted")
+
+ # Map Bedrock status to OpenAI-compatible status
+ status_mapping: Dict[BedrockBatchJobStatus, str] = {
+ "Submitted": "validating",
+ "InProgress": "in_progress",
+ "Completed": "completed",
+ "Failed": "failed",
+ "Stopping": "cancelling",
+ "Stopped": "cancelled"
+ }
+
+ openai_status = cast(Literal["validating", "failed", "in_progress", "finalizing", "completed", "expired", "cancelling", "cancelled"], status_mapping.get(status, "validating"))
+
+ # Get original request data from litellm_params if available
+ original_request = litellm_params.get("original_batch_request", {})
+
+ # Create LiteLLM batch object
+ return LiteLLMBatch(
+ id=job_arn, # Use ARN as the batch ID
+ object="batch",
+ endpoint=original_request.get("endpoint", "/v1/chat/completions"),
+ errors=None,
+ input_file_id=original_request.get("input_file_id", ""),
+ completion_window=original_request.get("completion_window", "24h"),
+ status=openai_status,
+ output_file_id=None, # Will be populated when job completes
+ error_file_id=None,
+ created_at=int(time.time()),
+ in_progress_at=int(time.time()) if status == "InProgress" else None,
+ expires_at=None,
+ finalizing_at=None,
+ completed_at=None,
+ failed_at=None,
+ expired_at=None,
+ cancelling_at=None,
+ cancelled_at=None,
+ request_counts=None,
+ metadata=original_request.get("metadata", {}),
+ )
+
+ def get_error_class(
+ self, error_message: str, status_code: int, headers: Union[Dict, Headers]
+ ) -> BaseLLMException:
+ """
+ Get Bedrock-specific error class using common utility.
+ """
+ return self.common_utils.get_error_class(error_message, status_code, headers)
+
+
diff --git a/litellm/llms/bedrock/chat/converse_transformation.py b/litellm/llms/bedrock/chat/converse_transformation.py
index b93ca94bed4..fda9220ff7d 100644
--- a/litellm/llms/bedrock/chat/converse_transformation.py
+++ b/litellm/llms/bedrock/chat/converse_transformation.py
@@ -10,6 +10,8 @@ from typing import List, Literal, Optional, Tuple, Union, cast, overload
import httpx
import litellm
+from litellm._logging import verbose_logger
+from litellm.constants import RESPONSE_FORMAT_TOOL_NAME
from litellm.litellm_core_utils.core_helpers import map_finish_reason
from litellm.litellm_core_utils.litellm_logging import Logging
from litellm.litellm_core_utils.llm_response_utils.convert_dict_to_response import (
@@ -48,14 +50,19 @@ from litellm.types.utils import (
)
from litellm.utils import add_dummy_tool, has_tool_call_blocks, supports_reasoning
-from ..common_utils import BedrockError, BedrockModelInfo, get_bedrock_tool_name, get_anthropic_beta_from_headers
+from ..common_utils import (
+ BedrockError,
+ BedrockModelInfo,
+ get_anthropic_beta_from_headers,
+ get_bedrock_tool_name,
+)
# Computer use tool prefixes supported by Bedrock
BEDROCK_COMPUTER_USE_TOOLS = [
"computer_use_preview",
"computer_",
"bash_",
- "text_editor_"
+ "text_editor_",
]
@@ -163,7 +170,9 @@ class AmazonConverseConfig(BaseConfig):
# only anthropic and mistral support tool choice config. otherwise (E.g. cohere) will fail the call - https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ToolChoice.html
supported_params.append("tool_choice")
- if (
+ if "gpt-oss" in model:
+ supported_params.append("reasoning_effort")
+ elif (
"claude-3-7" in model
or "claude-sonnet-4" in model
or "claude-opus-4" in model
@@ -233,7 +242,7 @@ class AmazonConverseConfig(BaseConfig):
"""Check if computer use tools are being used in the request."""
if tools is None:
return False
-
+
for tool in tools:
if "type" in tool:
tool_type = tool["type"]
@@ -247,17 +256,17 @@ class AmazonConverseConfig(BaseConfig):
) -> List[dict]:
"""Transform computer use tools to Bedrock format."""
transformed_tools: List[dict] = []
-
+
for tool in computer_use_tools:
tool_type = tool.get("type", "")
-
+
# Check if this is a computer use tool with the startswith method
is_computer_use_tool = False
for computer_use_prefix in BEDROCK_COMPUTER_USE_TOOLS:
if tool_type.startswith(computer_use_prefix):
is_computer_use_tool = True
break
-
+
transformed_tool: dict = {}
if is_computer_use_tool:
if tool_type.startswith("computer_") and "function" in tool:
@@ -266,7 +275,7 @@ class AmazonConverseConfig(BaseConfig):
transformed_tool = {
"type": tool_type,
"name": func.get("name", "computer"),
- **func.get("parameters", {})
+ **func.get("parameters", {}),
}
else:
# Direct tools - just need to ensure name is present
@@ -279,27 +288,29 @@ class AmazonConverseConfig(BaseConfig):
else:
# Pass through other tools as-is
transformed_tool = dict(tool)
-
+
transformed_tools.append(transformed_tool)
-
+
return transformed_tools
def _separate_computer_use_tools(
self, tools: List[OpenAIChatCompletionToolParam], model: str
- ) -> Tuple[List[OpenAIChatCompletionToolParam], List[OpenAIChatCompletionToolParam]]:
+ ) -> Tuple[
+ List[OpenAIChatCompletionToolParam], List[OpenAIChatCompletionToolParam]
+ ]:
"""
Separate computer use tools from regular function tools.
-
+
Args:
tools: List of tools to separate
model: The model name to check if it supports computer use
-
+
Returns:
Tuple of (computer_use_tools, regular_tools)
"""
computer_use_tools = []
regular_tools = []
-
+
for tool in tools:
if "type" in tool:
tool_type = tool["type"]
@@ -314,15 +325,12 @@ class AmazonConverseConfig(BaseConfig):
regular_tools.append(tool)
else:
regular_tools.append(tool)
-
+
return computer_use_tools, regular_tools
-
-
def _create_json_tool_call_for_response_format(
self,
json_schema: Optional[dict] = None,
- schema_name: str = "json_tool_call",
description: Optional[str] = None,
) -> ChatCompletionToolParam:
"""
@@ -344,10 +352,12 @@ class AmazonConverseConfig(BaseConfig):
"properties": {},
}
else:
+ # Use the schema as-is for Bedrock
+ # Bedrock requires the tool schema to be of type "object" and doesn't need unwrapping
_input_schema = json_schema
tool_param_function_chunk = ChatCompletionToolParamFunctionChunk(
- name=schema_name, parameters=_input_schema
+ name=RESPONSE_FORMAT_TOOL_NAME, parameters=_input_schema
)
if description:
tool_param_function_chunk["description"] = description
@@ -386,56 +396,9 @@ class AmazonConverseConfig(BaseConfig):
for param, value in non_default_params.items():
if param == "response_format" and isinstance(value, dict):
- ignore_response_format_types = ["text"]
- if value["type"] in ignore_response_format_types: # value is a no-op
- continue
-
- json_schema: Optional[dict] = None
- schema_name: str = ""
- description: Optional[str] = None
- if "response_schema" in value:
- json_schema = value["response_schema"]
- schema_name = "json_tool_call"
- elif "json_schema" in value:
- json_schema = value["json_schema"]["schema"]
- schema_name = value["json_schema"]["name"]
- description = value["json_schema"].get("description")
-
- if "type" in value and value["type"] == "text":
- continue
-
- """
- Follow similar approach to anthropic - translate to a single tool call.
-
- When using tools in this way: - https://docs.anthropic.com/en/docs/build-with-claude/tool-use#json-mode
- - You usually want to provide a single tool
- - You should set tool_choice (see Forcing tool use) to instruct the model to explicitly use that tool
- - Remember that the model will pass the input to the tool, so the name of the tool and description should be from the model’s perspective.
- """
- _tool = self._create_json_tool_call_for_response_format(
- json_schema=json_schema,
- schema_name=schema_name if schema_name != "" else "json_tool_call",
- description=description,
+ optional_params = self._translate_response_format_param(
+ value=value, model=model, optional_params=optional_params, non_default_params=non_default_params, is_thinking_enabled=is_thinking_enabled
)
- optional_params = self._add_tools_to_optional_params(
- optional_params=optional_params, tools=[_tool]
- )
-
- if (
- litellm.utils.supports_tool_choice(
- model=model, custom_llm_provider=self.custom_llm_provider
- )
- and not is_thinking_enabled
- ):
-
- optional_params["tool_choice"] = ToolChoiceValuesBlock(
- tool=SpecificToolChoiceBlock(
- name=schema_name if schema_name != "" else "json_tool_call"
- )
- )
- optional_params["json_mode"] = True
- if non_default_params.get("stream", False) is True:
- optional_params["fake_stream"] = True
if param == "max_tokens" or param == "max_completion_tokens":
optional_params["maxTokens"] = value
if param == "stream":
@@ -466,14 +429,82 @@ class AmazonConverseConfig(BaseConfig):
if param == "thinking":
optional_params["thinking"] = value
elif param == "reasoning_effort" and isinstance(value, str):
- optional_params["thinking"] = AnthropicConfig._map_reasoning_effort(
- value
- )
+ if "gpt-oss" in model:
+ # GPT-OSS models: keep reasoning_effort as-is
+ # It will be passed through to additionalModelRequestFields
+ optional_params["reasoning_effort"] = value
+ else:
+ # Anthropic and other models: convert to thinking parameter
+ optional_params["thinking"] = AnthropicConfig._map_reasoning_effort(
+ value
+ )
- self.update_optional_params_with_thinking_tokens(
- non_default_params=non_default_params, optional_params=optional_params
+ # Only update thinking tokens for non-GPT-OSS models
+ if "gpt-oss" not in model:
+ self.update_optional_params_with_thinking_tokens(
+ non_default_params=non_default_params, optional_params=optional_params
+ )
+
+ return optional_params
+
+ def _translate_response_format_param(
+ self,
+ value: dict,
+ model: str,
+ optional_params: dict,
+ non_default_params: dict,
+ is_thinking_enabled: bool,
+ ) -> dict:
+ """
+ Handles translation of response_format parameter to Bedrock format.
+
+ Returns `optional_params` with the translated response_format parameter.
+ """
+ ignore_response_format_types = ["text"]
+ if value["type"] in ignore_response_format_types: # value is a no-op
+ return optional_params
+
+ json_schema: Optional[dict] = None
+ description: Optional[str] = None
+ if "response_schema" in value:
+ json_schema = value["response_schema"]
+ elif "json_schema" in value:
+ json_schema = value["json_schema"]["schema"]
+ description = value["json_schema"].get("description")
+
+ if "type" in value and value["type"] == "text":
+ return optional_params
+
+ """
+ Follow similar approach to anthropic - translate to a single tool call.
+
+ When using tools in this way: - https://docs.anthropic.com/en/docs/build-with-claude/tool-use#json-mode
+ - You usually want to provide a single tool
+ - You should set tool_choice (see Forcing tool use) to instruct the model to explicitly use that tool
+ - Remember that the model will pass the input to the tool, so the name of the tool and description should be from the model’s perspective.
+ """
+ _tool = self._create_json_tool_call_for_response_format(
+ json_schema=json_schema,
+ description=description,
+ )
+ optional_params = self._add_tools_to_optional_params(
+ optional_params=optional_params, tools=[_tool]
)
+ if (
+ litellm.utils.supports_tool_choice(
+ model=model, custom_llm_provider=self.custom_llm_provider
+ )
+ and not is_thinking_enabled
+ ):
+
+ optional_params["tool_choice"] = ToolChoiceValuesBlock(
+ tool=SpecificToolChoiceBlock(name=RESPONSE_FORMAT_TOOL_NAME)
+ )
+ optional_params["json_mode"] = True
+ if non_default_params.get("stream", False) is True:
+ optional_params["fake_stream"] = True
+
return optional_params
def update_optional_params_with_thinking_tokens(
@@ -597,7 +628,6 @@ class AmazonConverseConfig(BaseConfig):
return {}
-
def _transform_request_helper(
self,
model: str,
@@ -653,36 +683,38 @@ class AmazonConverseConfig(BaseConfig):
)
original_tools = inference_params.pop("tools", [])
-
+
# Initialize bedrock_tools
bedrock_tools: List[ToolBlock] = []
-
+
# Collect anthropic_beta values from user headers
anthropic_beta_list = []
if headers:
user_betas = get_anthropic_beta_from_headers(headers)
anthropic_beta_list.extend(user_betas)
-
+
# Only separate tools if computer use tools are actually present
if original_tools and self.is_computer_use_tool_used(original_tools, model):
# Separate computer use tools from regular function tools
computer_use_tools, regular_tools = self._separate_computer_use_tools(
original_tools, model
)
-
+
# Process regular function tools using existing logic
bedrock_tools = _bedrock_tools_pt(regular_tools)
-
+
# Add computer use tools and anthropic_beta if needed (only when computer use tools are present)
if computer_use_tools:
anthropic_beta_list.append("computer-use-2024-10-22")
# Transform computer use tools to proper Bedrock format
- transformed_computer_tools = self._transform_computer_use_tools(computer_use_tools)
+ transformed_computer_tools = self._transform_computer_use_tools(
+ computer_use_tools
+ )
additional_request_params["tools"] = transformed_computer_tools
else:
# No computer use tools, process all tools as regular tools
bedrock_tools = _bedrock_tools_pt(original_tools)
-
+
# Set anthropic_beta in additional_request_params if we have any beta features
if anthropic_beta_list:
# Remove duplicates while preserving order
@@ -693,7 +725,7 @@ class AmazonConverseConfig(BaseConfig):
unique_betas.append(beta)
seen.add(beta)
additional_request_params["anthropic_beta"] = unique_betas
-
+
bedrock_tool_config: Optional[ToolConfigBlock] = None
if len(bedrock_tools) > 0:
tool_choice_values: ToolChoiceValuesBlock = inference_params.pop(
@@ -1119,10 +1151,37 @@ class AmazonConverseConfig(BaseConfig):
self._transform_thinking_blocks(reasoningContentBlocks)
)
chat_completion_message["content"] = content_str
- if json_mode is True and tools is not None and len(tools) == 1:
- # to support 'json_schema' logic on bedrock models
+ if (
+ json_mode is True
+ and tools is not None
+ and len(tools) == 1
+ and tools[0]["function"].get("name") == RESPONSE_FORMAT_TOOL_NAME
+ ):
+ verbose_logger.debug(
+ "Processing JSON tool call response for response_format"
+ )
json_mode_content_str: Optional[str] = tools[0]["function"].get("arguments")
if json_mode_content_str is not None:
+ import json
+
+ # Bedrock returns the response wrapped in a "properties" object
+ # We need to extract the actual content from this wrapper
+ try:
+
+ response_data = json.loads(json_mode_content_str)
+
+ # If Bedrock wrapped the response in "properties", extract the content
+ if (
+ isinstance(response_data, dict)
+ and "properties" in response_data
+ and len(response_data) == 1
+ ):
+ response_data = response_data["properties"]
+ json_mode_content_str = json.dumps(response_data)
+ except json.JSONDecodeError:
+ # If parsing fails, use the original response
+ pass
+
chat_completion_message["content"] = json_mode_content_str
else:
chat_completion_message["tool_calls"] = tools
@@ -1182,7 +1241,6 @@ class AmazonConverseConfig(BaseConfig):
if api_key:
headers["Authorization"] = f"Bearer {api_key}"
return headers
-
def should_fake_stream(
self,
diff --git a/litellm/llms/bedrock/common_utils.py b/litellm/llms/bedrock/common_utils.py
index c76fc0a80c3..831a6da93b3 100644
--- a/litellm/llms/bedrock/common_utils.py
+++ b/litellm/llms/bedrock/common_utils.py
@@ -6,6 +6,9 @@ import json
import os
from typing import TYPE_CHECKING, Dict, List, Literal, Optional, Union
+if TYPE_CHECKING:
+ from litellm.types.llms.bedrock import BedrockCreateBatchRequest
+
import httpx
import litellm
@@ -608,3 +611,218 @@ def get_anthropic_beta_from_headers(headers: dict) -> List[str]:
# Split comma-separated values and strip whitespace
return [beta.strip() for beta in anthropic_beta_header.split(",")]
+
+
+class CommonBatchFilesUtils:
+ """
+ Common utilities for Bedrock batch and file operations.
+ Provides shared functionality to reduce code duplication between batches and files.
+ """
+
+ def __init__(self):
+ # Import here to avoid circular imports
+ from .base_aws_llm import BaseAWSLLM
+ self._base_aws = BaseAWSLLM()
+
+ def get_bedrock_model_id_from_litellm_model(self, model: str) -> str:
+ """
+ Extract the actual Bedrock model ID from LiteLLM model name.
+
+ Args:
+ model: LiteLLM model name (e.g., "bedrock/anthropic.claude-3-sonnet-20240229-v1:0")
+
+ Returns:
+ Bedrock model ID (e.g., "anthropic.claude-3-sonnet-20240229-v1:0")
+ """
+ if model.startswith("bedrock/"):
+ return model[8:] # Remove "bedrock/" prefix
+ return model
+
+ def parse_s3_uri(self, s3_uri: str) -> tuple:
+ """
+ Parse S3 URI into bucket and key components.
+
+ Args:
+ s3_uri: S3 URI (e.g., "s3://bucket/key/path")
+
+ Returns:
+ Tuple of (bucket, key)
+
+ Raises:
+ ValueError: If URI format is invalid
+ """
+ if not s3_uri.startswith("s3://"):
+ raise ValueError(f"Invalid S3 URI format: {s3_uri}")
+
+ s3_parts = s3_uri[5:].split("/", 1) # Remove "s3://" and split on first "/"
+ if len(s3_parts) != 2:
+ raise ValueError(f"Invalid S3 URI format: {s3_uri}")
+
+ return s3_parts[0], s3_parts[1] # bucket, key
+
+ def extract_model_from_s3_file_path(self, s3_uri: str, optional_params: dict) -> str:
+ """
+ Extract model ID from S3 file path.
+
+ The Bedrock file transformation creates S3 objects with the model name embedded:
+ Format: s3://bucket/litellm-bedrock-files-{model}-{uuid}.jsonl
+ """
+ # Check if model is provided in optional_params first
+ if "model" in optional_params and optional_params["model"]:
+ return self.get_bedrock_model_id_from_litellm_model(optional_params["model"])
+
+ # Extract model from S3 URI path
+ # Expected format: s3://bucket/litellm-bedrock-files-{model}-{uuid}.jsonl
+ try:
+ bucket, object_key = self.parse_s3_uri(s3_uri)
+
+ # Extract model from object key if it follows our naming pattern
+ if object_key.startswith("litellm-bedrock-files-"):
+ # Remove prefix and suffix to get model part
+ model_part = object_key[22:] # Remove "litellm-bedrock-files-"
+ # Find the last dash before the UUID
+ parts = model_part.split("-")
+ if len(parts) > 1:
+ # Reconstruct model name (everything except the last UUID part and .jsonl)
+ model_name = "-".join(parts[:-1])
+ if model_name.endswith(".jsonl"):
+ model_name = model_name[:-6] # Remove .jsonl
+ return model_name
+ except Exception:
+ pass
+
+ # Fallback to default model
+ return "anthropic.claude-3-5-sonnet-20240620-v1:0"
+
+ def sign_aws_request(
+ self,
+ service_name: str,
+ data: Union[str, dict, "BedrockCreateBatchRequest"],
+ endpoint_url: str,
+ optional_params: dict,
+ method: str = "POST",
+ ) -> tuple:
+ """
+ Sign AWS request using Signature Version 4.
+
+ Args:
+ service_name: AWS service name ("bedrock" or "s3")
+ data: Request data (string or dict)
+ endpoint_url: Full endpoint URL
+ optional_params: Optional parameters containing AWS credentials
+ method: HTTP method (default: POST)
+
+ Returns:
+ Tuple of (signed_headers, signed_data)
+ """
+ try:
+ from botocore.auth import SigV4Auth
+ from botocore.awsrequest import AWSRequest
+ except ImportError:
+ raise ImportError("Missing boto3 to call bedrock. Run 'pip install boto3'.")
+
+ # Get AWS credentials using existing methods
+ aws_region_name = self._base_aws._get_aws_region_name(
+ optional_params=optional_params, model=""
+ )
+ credentials = self._base_aws.get_credentials(
+ aws_access_key_id=optional_params.get("aws_access_key_id"),
+ aws_secret_access_key=optional_params.get("aws_secret_access_key"),
+ aws_session_token=optional_params.get("aws_session_token"),
+ aws_region_name=aws_region_name,
+ aws_session_name=optional_params.get("aws_session_name"),
+ aws_profile_name=optional_params.get("aws_profile_name"),
+ aws_role_name=optional_params.get("aws_role_name"),
+ aws_web_identity_token=optional_params.get("aws_web_identity_token"),
+ aws_sts_endpoint=optional_params.get("aws_sts_endpoint"),
+ )
+
+ # Prepare the request data
+ if isinstance(data, dict):
+ import json
+ request_data = json.dumps(data)
+ else:
+ request_data = data
+
+ # Prepare headers
+ headers = {"Content-Type": "application/json"}
+
+ # Create AWS request and sign it
+ sigv4 = SigV4Auth(credentials, service_name, aws_region_name)
+ request = AWSRequest(
+ method=method.upper(), url=endpoint_url, data=request_data, headers=headers
+ )
+ sigv4.add_auth(request)
+ prepped = request.prepare()
+
+ return dict(prepped.headers), request_data.encode('utf-8') if isinstance(request_data, str) else request_data
+
+ def generate_unique_job_name(self, model: str, prefix: str = "litellm") -> str:
+ """
+ Generate a unique job name for AWS services.
+ AWS services often have length limits, so this creates a concise name.
+
+ Args:
+ model: Model name to include in the job name
+ prefix: Prefix for the job name
+
+ Returns:
+ Unique job name (≤ 63 characters for Bedrock compatibility)
+ """
+ import fastuuid as uuid
+ unique_id = str(uuid.uuid4())[:8]
+ # Format: {prefix}-batch-{model}-{uuid}
+ # Example: litellm-batch-claude-266c398e
+ job_name = f"{prefix}-batch-{unique_id}"
+
+ return job_name
+
+ def get_s3_bucket_and_key_from_config(
+ self,
+ litellm_params: dict,
+ optional_params: dict,
+ bucket_env_var: str = "AWS_S3_BUCKET_NAME",
+ key_prefix: str = "litellm"
+ ) -> tuple:
+ """
+ Get S3 bucket and generate a unique key from configuration.
+
+ Args:
+ litellm_params: LiteLLM parameters
+ optional_params: Optional parameters
+ bucket_env_var: Environment variable name for bucket
+ key_prefix: Prefix for the S3 key
+
+ Returns:
+ Tuple of (bucket_name, object_key)
+ """
+ import time
+ import uuid
+
+ # Get bucket name
+ bucket_name = (
+ litellm_params.get("s3_bucket_name")
+ or optional_params.get("s3_bucket_name")
+ or os.getenv(bucket_env_var)
+ )
+ if not bucket_name:
+ raise ValueError(f"S3 bucket name is required. Set 's3_bucket_name' parameter or {bucket_env_var} env var")
+
+ # Generate unique object key
+ timestamp = int(time.time())
+ unique_id = str(uuid.uuid4())[:8]
+ object_key = f"{key_prefix}-{timestamp}-{unique_id}"
+
+ return bucket_name, object_key
+
+ def get_error_class(
+ self, error_message: str, status_code: int, headers: Union[Dict, httpx.Headers]
+ ) -> BaseLLMException:
+ """
+ Get Bedrock-specific error class.
+ """
+ return BedrockError(
+ status_code=status_code,
+ message=error_message,
+ headers=headers
+ )
diff --git a/litellm/llms/bedrock/embed/embedding.py b/litellm/llms/bedrock/embed/embedding.py
index 91c71e86f1a..0824905f511 100644
--- a/litellm/llms/bedrock/embed/embedding.py
+++ b/litellm/llms/bedrock/embed/embedding.py
@@ -5,6 +5,7 @@ Handles embedding calls to Bedrock's `/invoke` endpoint
import copy
import json
from typing import Any, Callable, List, Optional, Tuple, Union
+import urllib.parse
import httpx
@@ -333,6 +334,16 @@ class BedrockEmbedding(BaseAWSLLM):
credentials, aws_region_name = self._load_credentials(optional_params)
### TRANSFORMATION ###
+ unencoded_model_id = (
+ optional_params.pop("model_id", None) or model
+ ) # default to model if not passed
+ modelId = urllib.parse.quote(unencoded_model_id, safe="")
+ aws_region_name = self._get_aws_region_name(
+ optional_params=optional_params,
+ model=model,
+ model_id=unencoded_model_id,
+ )
+
provider = model.split(".")[0]
inference_params = copy.deepcopy(optional_params)
inference_params = {
@@ -343,9 +354,6 @@ class BedrockEmbedding(BaseAWSLLM):
inference_params.pop(
"user", None
) # make sure user is not passed in for bedrock call
- modelId = (
- optional_params.pop("model_id", None) or model
- ) # default to model if not passed
data: Optional[CohereEmbeddingRequest] = None
batch_data: Optional[List] = None
diff --git a/litellm/llms/bedrock/files/transformation.py b/litellm/llms/bedrock/files/transformation.py
new file mode 100644
index 00000000000..83bbad7e1e8
--- /dev/null
+++ b/litellm/llms/bedrock/files/transformation.py
@@ -0,0 +1,607 @@
+import json
+import os
+import time
+import uuid
+from typing import Any, Dict, List, Optional, Tuple, Union
+
+from httpx import Headers, Response
+
+from litellm.litellm_core_utils.prompt_templates.common_utils import extract_file_data
+from litellm.llms.base_llm.chat.transformation import BaseLLMException
+from litellm.llms.base_llm.files.transformation import (
+ BaseFilesConfig,
+ LiteLLMLoggingObj,
+)
+from litellm.types.llms.openai import (
+ AllMessageValues,
+ CreateFileRequest,
+ FileTypes,
+ OpenAICreateFileRequestOptionalParams,
+ OpenAIFileObject,
+ PathLike,
+)
+from litellm.types.utils import ExtractedFileData, LlmProviders
+
+from ..base_aws_llm import BaseAWSLLM
+from ..common_utils import BedrockError
+
+
+class BedrockFilesConfig(BaseAWSLLM, BaseFilesConfig):
+ """
+ Config for Bedrock Files - handles S3 uploads for Bedrock batch processing
+ """
+
+ def __init__(self):
+ self.jsonl_transformation = BedrockJsonlFilesTransformation()
+ super().__init__()
+
+ @property
+ def custom_llm_provider(self) -> LlmProviders:
+ return LlmProviders.BEDROCK
+
+ @property
+ def file_upload_http_method(self) -> str:
+ """
+ Bedrock files are uploaded to S3, which requires PUT requests
+ """
+ return "PUT"
+
+ def validate_environment(
+ self,
+ headers: dict,
+ model: str,
+ messages: List[AllMessageValues],
+ optional_params: dict,
+ litellm_params: dict,
+ api_key: Optional[str] = None,
+ api_base: Optional[str] = None,
+ ) -> dict:
+ # No additional headers needed for S3 uploads - AWS credentials handled by BaseAWSLLM
+ return headers
+
+
+
+ def _get_content_from_openai_file(self, openai_file_content: FileTypes) -> str:
+ """
+ Helper to extract content from various OpenAI file types and return as string.
+
+ Handles:
+ - Direct content (str, bytes, IO[bytes])
+ - Tuple formats: (filename, content, [content_type], [headers])
+ - PathLike objects
+ """
+ content: Union[str, bytes] = b""
+ # Extract file content from tuple if necessary
+ if isinstance(openai_file_content, tuple):
+ # Take the second element which is always the file content
+ file_content = openai_file_content[1]
+ else:
+ file_content = openai_file_content
+
+ # Handle different file content types
+ if isinstance(file_content, str):
+ # String content can be used directly
+ content = file_content
+ elif isinstance(file_content, bytes):
+ # Bytes content can be decoded
+ content = file_content
+ elif isinstance(file_content, PathLike): # PathLike
+ with open(str(file_content), "rb") as f:
+ content = f.read()
+ elif hasattr(file_content, "read"): # IO[bytes]
+ # File-like objects need to be read
+ content = file_content.read()
+
+ # Ensure content is string
+ if isinstance(content, bytes):
+ content = content.decode("utf-8")
+
+ return content
+
+ def _get_s3_object_name_from_batch_jsonl(
+ self,
+ openai_jsonl_content: List[Dict[str, Any]],
+ ) -> str:
+ """
+ Gets a unique S3 object name for the Bedrock batch processing job
+
+ named as: litellm-bedrock-files/{model}/{uuid}
+ """
+ _model = openai_jsonl_content[0].get("body", {}).get("model", "")
+ # Remove bedrock/ prefix if present
+ if _model.startswith("bedrock/"):
+ _model = _model[8:]
+ object_name = f"litellm-bedrock-files-{_model}-{uuid.uuid4()}.jsonl"
+ return object_name
+
+ def get_object_name(
+ self, extracted_file_data: ExtractedFileData, purpose: str
+ ) -> str:
+ """
+ Get the object name for the request
+ """
+ extracted_file_data_content = extracted_file_data.get("content")
+
+ if extracted_file_data_content is None:
+ raise ValueError("file content is required")
+
+ if purpose == "batch":
+ ## 1. If jsonl, check if there's a model name
+ file_content = self._get_content_from_openai_file(
+ extracted_file_data_content
+ )
+
+ # Split into lines and parse each line as JSON
+ openai_jsonl_content = [
+ json.loads(line) for line in file_content.splitlines() if line.strip()
+ ]
+ if len(openai_jsonl_content) > 0:
+ return self._get_s3_object_name_from_batch_jsonl(openai_jsonl_content)
+
+ ## 2. If not jsonl, return the filename
+ filename = extracted_file_data.get("filename")
+ if filename:
+ return filename
+ ## 3. If no file name, return timestamp
+ return str(int(time.time()))
+
+ def get_complete_file_url(
+ self,
+ api_base: Optional[str],
+ api_key: Optional[str],
+ model: str,
+ optional_params: Dict,
+ litellm_params: Dict,
+ data: CreateFileRequest,
+ ) -> str:
+ """
+ Get the complete S3 URL for the file upload request
+ """
+ bucket_name = litellm_params.get("s3_bucket_name") or os.getenv("AWS_S3_BUCKET_NAME")
+ if not bucket_name:
+ raise ValueError("S3 bucket_name is required. Set 's3_bucket_name' in litellm_params or AWS_S3_BUCKET_NAME env var")
+
+ aws_region_name = self._get_aws_region_name(optional_params, model)
+
+ file_data = data.get("file")
+ purpose = data.get("purpose")
+ if file_data is None:
+ raise ValueError("file is required")
+ if purpose is None:
+ raise ValueError("purpose is required")
+ extracted_file_data = extract_file_data(file_data)
+ object_name = self.get_object_name(extracted_file_data, purpose)
+
+ # S3 endpoint URL format
+ s3_endpoint_url = optional_params.get("s3_endpoint_url") or f"https://s3.{aws_region_name}.amazonaws.com"
+
+ return f"{s3_endpoint_url}/{bucket_name}/{object_name}"
+
+ def get_supported_openai_params(
+ self, model: str
+ ) -> List[OpenAICreateFileRequestOptionalParams]:
+ return []
+
+ def map_openai_params(
+ self,
+ non_default_params: dict,
+ optional_params: dict,
+ model: str,
+ drop_params: bool,
+ ) -> dict:
+ return optional_params
+
+ def _get_bedrock_provider_from_model(self, model: str) -> Optional[str]:
+ """
+ Extract provider from Bedrock model name
+ """
+ if model.startswith("anthropic."):
+ return "anthropic"
+ elif model.startswith("cohere."):
+ return "cohere"
+ elif model.startswith("meta.") or model.startswith("llama"):
+ return "meta"
+ elif model.startswith("mistral."):
+ return "mistral"
+ elif model.startswith("ai21."):
+ return "ai21"
+ elif model.startswith("amazon."):
+ return "amazon"
+ else:
+ return None
+
+ def _map_openai_to_bedrock_params(
+ self,
+ openai_request_body: Dict[str, Any],
+ provider: Optional[str] = None,
+ ) -> Dict[str, Any]:
+ """
+ Transform OpenAI request body to Bedrock-compatible modelInput parameters using existing transformation logic
+ """
+ _model = openai_request_body.get("model", "")
+ messages = openai_request_body.get("messages", [])
+
+ # Use existing Anthropic transformation logic for Anthropic models
+ if provider == "anthropic":
+ from litellm.llms.bedrock.chat.invoke_transformations.anthropic_claude3_transformation import (
+ AmazonAnthropicClaudeConfig,
+ )
+
+ anthropic_config = AmazonAnthropicClaudeConfig()
+
+ # Extract optional params (everything except model and messages)
+ optional_params = {k: v for k, v in openai_request_body.items() if k not in ["model", "messages"]}
+
+ # Transform using existing Anthropic logic
+ bedrock_params = anthropic_config.transform_request(
+ model=_model,
+ messages=messages,
+ optional_params=optional_params,
+ litellm_params={},
+ headers={}
+ )
+
+ return bedrock_params
+ else:
+ # For other providers, use basic mapping
+ bedrock_params = {
+ "messages": messages,
+ **{k: v for k, v in openai_request_body.items() if k not in ["model", "messages"]}
+ }
+ return bedrock_params
+
+ def _transform_openai_jsonl_content_to_bedrock_jsonl_content(
+ self, openai_jsonl_content: List[Dict[str, Any]]
+ ) -> List[Dict[str, Any]]:
+ """
+ Transforms OpenAI JSONL content to Bedrock batch format
+
+ Bedrock batch format: { "recordId": "alphanumeric string", "modelInput": {JSON body} }
+ Example:
+ {
+ "recordId": "CALL0000001",
+ "modelInput": {
+ "anthropic_version": "bedrock-2023-05-31",
+ "max_tokens": 1024,
+ "messages": [
+ {
+ "role": "user",
+ "content": [{"type": "text", "text": "Hello"}]
+ }
+ ]
+ }
+ }
+ """
+
+ bedrock_jsonl_content = []
+ for idx, _openai_jsonl_content in enumerate(openai_jsonl_content):
+ # Extract the request body from OpenAI format
+ openai_body = _openai_jsonl_content.get("body", {})
+ model = openai_body.get("model", "")
+
+ # Determine provider from model name
+ provider = self._get_bedrock_provider_from_model(model)
+
+ # Transform to Bedrock modelInput format
+ model_input = self._map_openai_to_bedrock_params(
+ openai_request_body=openai_body,
+ provider=provider
+ )
+
+ # Create Bedrock batch record
+ record_id = _openai_jsonl_content.get("custom_id", f"CALL{str(idx).zfill(7)}")
+ bedrock_record = {
+ "recordId": record_id,
+ "modelInput": model_input
+ }
+
+ bedrock_jsonl_content.append(bedrock_record)
+ return bedrock_jsonl_content
+
+ def transform_create_file_request(
+ self,
+ model: str,
+ create_file_data: CreateFileRequest,
+ optional_params: dict,
+ litellm_params: dict,
+ ) -> Union[bytes, str, dict]:
+ """
+ Transform file request and return a pre-signed request for S3.
+ This keeps the HTTP handler clean by doing all the signing here.
+ """
+ file_data = create_file_data.get("file")
+ if file_data is None:
+ raise ValueError("file is required")
+ extracted_file_data = extract_file_data(file_data)
+ extracted_file_data_content = extracted_file_data.get("content")
+
+ # Get and transform the file content
+ if (
+ create_file_data.get("purpose") == "batch"
+ and extracted_file_data.get("content_type") == "application/jsonl"
+ and extracted_file_data_content is not None
+ ):
+ ## Transform JSONL content to Bedrock format
+ original_file_content = self._get_content_from_openai_file(
+ extracted_file_data_content
+ )
+ openai_jsonl_content = [
+ json.loads(line) for line in original_file_content.splitlines() if line.strip()
+ ]
+ bedrock_jsonl_content = (
+ self._transform_openai_jsonl_content_to_bedrock_jsonl_content(
+ openai_jsonl_content
+ )
+ )
+ file_content = "\n".join(json.dumps(item) for item in bedrock_jsonl_content)
+ elif isinstance(extracted_file_data_content, bytes):
+ file_content = extracted_file_data_content.decode('utf-8')
+ elif isinstance(extracted_file_data_content, str):
+ file_content = extracted_file_data_content
+ else:
+ raise ValueError("Unsupported file content type")
+
+ # Get the S3 URL for upload
+ api_base = self.get_complete_file_url(
+ api_base=None,
+ api_key=None,
+ model=model,
+ optional_params=optional_params,
+ litellm_params=litellm_params,
+ data=create_file_data,
+ )
+
+ # Sign the request and return a pre-signed request object
+ signed_headers, signed_body = self._sign_s3_request(
+ content=file_content,
+ api_base=api_base,
+ optional_params=optional_params,
+ )
+
+ # Return a dict that tells the HTTP handler exactly what to do
+ return {
+ "method": "PUT",
+ "url": api_base,
+ "headers": signed_headers,
+ "data": signed_body or file_content,
+ }
+
+ def _sign_s3_request(
+ self,
+ content: str,
+ api_base: str,
+ optional_params: dict,
+ ) -> Tuple[dict, str]:
+ """
+ Sign S3 PUT request using the same proven logic as S3Logger.
+ Reuses the exact pattern from litellm/integrations/s3_v2.py
+ """
+ try:
+ import hashlib
+
+ import requests
+ from botocore.auth import SigV4Auth
+ from botocore.awsrequest import AWSRequest
+ except ImportError:
+ raise ImportError("Missing boto3 to call bedrock. Run 'pip install boto3'.")
+
+ # Get AWS credentials using existing methods
+ aws_region_name = self._get_aws_region_name(
+ optional_params=optional_params, model=""
+ )
+ credentials = self.get_credentials(
+ aws_access_key_id=optional_params.get("aws_access_key_id"),
+ aws_secret_access_key=optional_params.get("aws_secret_access_key"),
+ aws_session_token=optional_params.get("aws_session_token"),
+ aws_region_name=aws_region_name,
+ aws_session_name=optional_params.get("aws_session_name"),
+ aws_profile_name=optional_params.get("aws_profile_name"),
+ aws_role_name=optional_params.get("aws_role_name"),
+ aws_web_identity_token=optional_params.get("aws_web_identity_token"),
+ aws_sts_endpoint=optional_params.get("aws_sts_endpoint"),
+ )
+
+ # Calculate SHA256 hash of the content (REQUIRED for S3)
+ content_hash = hashlib.sha256(content.encode("utf-8")).hexdigest()
+
+ # Prepare headers with required S3 headers (same as s3_v2.py)
+ request_headers = {
+ "Content-Type": "application/json", # JSONL files are JSON content
+ "x-amz-content-sha256": content_hash, # REQUIRED by S3
+ "Content-Language": "en",
+ "Cache-Control": "private, immutable, max-age=31536000, s-maxage=0",
+ }
+
+ # Use requests.Request to prepare the request (same pattern as s3_v2.py)
+ req = requests.Request("PUT", api_base, data=content, headers=request_headers)
+ prepped = req.prepare()
+
+ # Sign the request with S3 service
+ aws_request = AWSRequest(
+ method=prepped.method,
+ url=prepped.url,
+ data=prepped.body,
+ headers=prepped.headers,
+ )
+
+ # Get region name for non-LLM API calls (same as s3_v2.py)
+ signing_region = self.get_aws_region_name_for_non_llm_api_calls(
+ aws_region_name=aws_region_name
+ )
+
+ SigV4Auth(credentials, "s3", signing_region).add_auth(aws_request)
+
+ # Return signed headers and body
+ signed_body = aws_request.body
+ if isinstance(signed_body, bytes):
+ signed_body = signed_body.decode('utf-8')
+ elif signed_body is None:
+ signed_body = content # Fallback to original content
+
+ return dict(aws_request.headers), signed_body
+
+ def transform_create_file_response(
+ self,
+ model: Optional[str],
+ raw_response: Response,
+ logging_obj: LiteLLMLoggingObj,
+ litellm_params: dict,
+ ) -> OpenAIFileObject:
+ """
+ Transform S3 File upload response into OpenAI-style FileObject
+ """
+ # For S3 uploads, we typically get an ETag and other metadata
+ response_headers = raw_response.headers
+
+ # Extract S3 object information from the response
+ # S3 PUT object returns ETag and other metadata in headers
+ content_length = response_headers.get("Content-Length", "0")
+
+ # Extract bucket and key from the request URL or litellm_params
+ bucket_name = litellm_params.get("s3_bucket_name") or os.getenv("AWS_S3_BUCKET_NAME")
+
+ # Generate file ID in S3 format
+ object_key = getattr(logging_obj, 'object_key', None) or f"file-{int(time.time())}"
+ file_id = f"s3://{bucket_name}/{object_key}"
+
+ # Extract filename from object key
+ filename = object_key.split("/")[-1] if "/" in object_key else object_key
+
+ return OpenAIFileObject(
+ purpose="batch", # Default purpose for Bedrock files
+ id=file_id,
+ filename=filename,
+ created_at=int(time.time()), # Current timestamp
+ status="uploaded",
+ bytes=int(content_length) if content_length.isdigit() else 0,
+ object="file",
+ )
+
+ def get_error_class(
+ self, error_message: str, status_code: int, headers: Union[Dict, Headers]
+ ) -> BaseLLMException:
+ return BedrockError(
+ status_code=status_code, message=error_message, headers=headers
+ )
+
+
+class BedrockJsonlFilesTransformation:
+ """
+ Transforms OpenAI /v1/files/* requests to Bedrock S3 file uploads for batch processing
+ """
+
+ def transform_openai_file_content_to_bedrock_file_content(
+ self, openai_file_content: Optional[FileTypes] = None
+ ) -> Tuple[str, str]:
+ """
+ Transforms OpenAI FileContentRequest to Bedrock S3 file format
+ """
+
+ if openai_file_content is None:
+ raise ValueError("contents of file are None")
+ # Read the content of the file
+ file_content = self._get_content_from_openai_file(openai_file_content)
+
+ # Split into lines and parse each line as JSON
+ openai_jsonl_content = [
+ json.loads(line) for line in file_content.splitlines() if line.strip()
+ ]
+ bedrock_jsonl_content = (
+ self._transform_openai_jsonl_content_to_bedrock_jsonl_content(
+ openai_jsonl_content
+ )
+ )
+ bedrock_jsonl_string = "\n".join(
+ json.dumps(item) for item in bedrock_jsonl_content
+ )
+ object_name = self._get_s3_object_name(
+ openai_jsonl_content=openai_jsonl_content
+ )
+ return bedrock_jsonl_string, object_name
+
+ def _transform_openai_jsonl_content_to_bedrock_jsonl_content(
+ self, openai_jsonl_content: List[Dict[str, Any]]
+ ):
+ """
+ Delegate to the main BedrockFilesConfig transformation method
+ """
+ config = BedrockFilesConfig()
+ return config._transform_openai_jsonl_content_to_bedrock_jsonl_content(openai_jsonl_content)
+
+ def _get_s3_object_name(
+ self,
+ openai_jsonl_content: List[Dict[str, Any]],
+ ) -> str:
+ """
+ Gets a unique S3 object name for the Bedrock batch processing job
+
+ named as: litellm-bedrock-files-{model}-{uuid}
+ """
+ _model = openai_jsonl_content[0].get("body", {}).get("model", "")
+ # Remove bedrock/ prefix if present
+ if _model.startswith("bedrock/"):
+ _model = _model[8:]
+ object_name = f"litellm-bedrock-files-{_model}-{uuid.uuid4()}.jsonl"
+ return object_name
+
+
+
+ def _get_content_from_openai_file(self, openai_file_content: FileTypes) -> str:
+ """
+ Helper to extract content from various OpenAI file types and return as string.
+
+ Handles:
+ - Direct content (str, bytes, IO[bytes])
+ - Tuple formats: (filename, content, [content_type], [headers])
+ - PathLike objects
+ """
+ content: Union[str, bytes] = b""
+ # Extract file content from tuple if necessary
+ if isinstance(openai_file_content, tuple):
+ # Take the second element which is always the file content
+ file_content = openai_file_content[1]
+ else:
+ file_content = openai_file_content
+
+ # Handle different file content types
+ if isinstance(file_content, str):
+ # String content can be used directly
+ content = file_content
+ elif isinstance(file_content, bytes):
+ # Bytes content can be decoded
+ content = file_content
+ elif isinstance(file_content, PathLike): # PathLike
+ with open(str(file_content), "rb") as f:
+ content = f.read()
+ elif hasattr(file_content, "read"): # IO[bytes]
+ # File-like objects need to be read
+ content = file_content.read()
+
+ # Ensure content is string
+ if isinstance(content, bytes):
+ content = content.decode("utf-8")
+
+ return content
+
+ def transform_s3_bucket_response_to_openai_file_object(
+ self, create_file_data: CreateFileRequest, s3_upload_response: Dict[str, Any]
+ ) -> OpenAIFileObject:
+ """
+ Transforms S3 Bucket upload file response to OpenAI FileObject
+ """
+ # S3 response typically contains ETag, key, etc.
+ object_key = s3_upload_response.get("Key", "")
+ bucket_name = s3_upload_response.get("Bucket", "")
+
+ # Extract filename from object key
+ filename = object_key.split("/")[-1] if "/" in object_key else object_key
+
+ return OpenAIFileObject(
+ purpose=create_file_data.get("purpose", "batch"),
+ id=f"s3://{bucket_name}/{object_key}",
+ filename=filename,
+ created_at=int(time.time()), # Current timestamp
+ status="uploaded",
+ bytes=s3_upload_response.get("ContentLength", 0),
+ object="file",
+ )
diff --git a/litellm/llms/bedrock/passthrough/transformation.py b/litellm/llms/bedrock/passthrough/transformation.py
index d7221ff4b7a..5791bfb8013 100644
--- a/litellm/llms/bedrock/passthrough/transformation.py
+++ b/litellm/llms/bedrock/passthrough/transformation.py
@@ -41,9 +41,15 @@ class BedrockPassthroughConfig(
model_id=None,
)
- api_base = f"https://bedrock-runtime.{aws_region_name}.amazonaws.com"
+ aws_bedrock_runtime_endpoint = optional_params.get("aws_bedrock_runtime_endpoint")
+ endpoint_url, _ = self.get_runtime_endpoint(
+ api_base=api_base,
+ aws_bedrock_runtime_endpoint=aws_bedrock_runtime_endpoint,
+ aws_region_name=aws_region_name,
+ endpoint_type="runtime",
+ )
- return self.format_url(endpoint, api_base, request_query_params or {}), api_base
+ return self.format_url(endpoint, endpoint_url, request_query_params or {}), endpoint_url
def sign_request(
self,
diff --git a/litellm/llms/custom_httpx/aiohttp_handler.py b/litellm/llms/custom_httpx/aiohttp_handler.py
index d9fc85877c3..c7a04a49fc2 100644
--- a/litellm/llms/custom_httpx/aiohttp_handler.py
+++ b/litellm/llms/custom_httpx/aiohttp_handler.py
@@ -17,6 +17,7 @@ from litellm.llms.custom_httpx.http_handler import (
HTTPHandler,
_get_httpx_client,
)
+from litellm.llms.custom_httpx.aiohttp_transport import LiteLLMAiohttpTransport
from litellm.types.llms.openai import FileTypes
from litellm.types.utils import HttpHandlerRequestFields, ImageResponse, LlmProviders
from litellm.utils import CustomStreamWrapper, ModelResponse, ProviderConfigManager
@@ -32,8 +33,71 @@ DEFAULT_TIMEOUT = 600
class BaseLLMAIOHTTPHandler:
- def __init__(self):
- self.client_session: Optional[aiohttp.ClientSession] = None
+ def __init__(
+ self,
+ client_session: Optional[aiohttp.ClientSession] = None,
+ transport: Optional[LiteLLMAiohttpTransport] = None,
+ connector: Optional[aiohttp.BaseConnector] = None,
+ ):
+ self.client_session = client_session
+ self._owns_session = (
+ client_session is None
+ ) # Track if we own the session for cleanup
+
+ self.transport = transport
+ self._owns_transport = (
+ transport is None
+ ) # Track if we own the transport for cleanup
+
+ self.connector = connector
+ self._owns_connector = (
+ connector is None
+ ) # Track if we own the connector for cleanup
+
+ def _get_or_create_transport(self) -> Optional[LiteLLMAiohttpTransport]:
+ """Get existing transport or create a new one if needed."""
+ if self.transport:
+ return self.transport
+
+ # Create a transport using AsyncHTTPHandler's logic
+ try:
+ self.transport = AsyncHTTPHandler._create_aiohttp_transport()
+ self._owns_transport = True
+ return self.transport
+ except Exception:
+ # If transport creation fails, return None (will use direct session)
+ return None
+
+ def _get_connector(self) -> Optional[aiohttp.BaseConnector]:
+ """Get or create a connector for the client session."""
+ if self.connector:
+ return self.connector
+ elif self.transport and hasattr(self.transport, "client"):
+ # Extract connector from transport if available
+ client = self.transport.client
+ if callable(client):
+ # If client is a factory, we can't extract connector directly
+ return None
+ elif hasattr(client, "connector"):
+ return client.connector
+ return None
+
+ def _create_client_session_with_transport(self) -> ClientSession:
+ """Create a new client session using transport or connector configuration."""
+ connector = self._get_connector()
+
+ if self.transport and hasattr(self.transport, "_get_valid_client_session"):
+ # Use transport's session creation if available
+ session = self.transport._get_valid_client_session()
+ return session
+ elif connector:
+ # Use provided connector
+ session = aiohttp.ClientSession(connector=connector)
+ return session
+ else:
+ # Default session creation
+ session = aiohttp.ClientSession()
+ return session
def _get_async_client_session(
self, dynamic_client_session: Optional[ClientSession] = None
@@ -43,15 +107,33 @@ class BaseLLMAIOHTTPHandler:
elif self.client_session:
return self.client_session
else:
- # init client session, and then return new session
- self.client_session = aiohttp.ClientSession()
+ # Create client session using transport/connector if available
+ self.client_session = self._create_client_session_with_transport()
+ self._owns_session = True # We created this session, so we own it
return self.client_session
async def close(self):
- """Close the aiohttp client session if it exists."""
- if self.client_session and not self.client_session.closed:
+ """Close the aiohttp client session and transport if we own them."""
+ # Close client session if we own it
+ if (
+ self.client_session
+ and not self.client_session.closed
+ and self._owns_session
+ ):
await self.client_session.close()
+ # Close transport if we own it
+ if (
+ self.transport
+ and self._owns_transport
+ and hasattr(self.transport, "aclose")
+ ):
+ try:
+ await self.transport.aclose()
+ except Exception:
+ # Ignore errors during transport cleanup
+ pass
+
async def _make_common_async_call(
self,
async_client_session: Optional[ClientSession],
diff --git a/litellm/llms/custom_httpx/http_handler.py b/litellm/llms/custom_httpx/http_handler.py
index 4d8781fff2a..36b543086f5 100644
--- a/litellm/llms/custom_httpx/http_handler.py
+++ b/litellm/llms/custom_httpx/http_handler.py
@@ -212,6 +212,7 @@ class AsyncHTTPHandler:
verify=ssl_config,
cert=cert,
headers=headers,
+ follow_redirects=True,
)
async def close(self):
@@ -687,6 +688,7 @@ class HTTPHandler:
verify=ssl_config,
cert=cert,
headers=headers,
+ follow_redirects=True,
)
else:
self.client = client
diff --git a/litellm/llms/custom_httpx/llm_http_handler.py b/litellm/llms/custom_httpx/llm_http_handler.py
index c9d70088d04..13133a56aad 100644
--- a/litellm/llms/custom_httpx/llm_http_handler.py
+++ b/litellm/llms/custom_httpx/llm_http_handler.py
@@ -28,6 +28,7 @@ from litellm.llms.base_llm.audio_transcription.transformation import (
BaseAudioTranscriptionConfig,
)
from litellm.llms.base_llm.base_model_iterator import MockResponseIterator
+from litellm.llms.base_llm.batches.transformation import BaseBatchesConfig
from litellm.llms.base_llm.chat.transformation import BaseConfig
from litellm.llms.base_llm.embedding.transformation import BaseEmbeddingConfig
from litellm.llms.base_llm.files.transformation import BaseFilesConfig
@@ -58,6 +59,7 @@ from litellm.types.llms.anthropic_messages.anthropic_response import (
AnthropicMessagesResponse,
)
from litellm.types.llms.openai import (
+ CreateBatchRequest,
CreateFileRequest,
OpenAIFileObject,
ResponseInputParam,
@@ -66,7 +68,12 @@ from litellm.types.llms.openai import (
from litellm.types.rerank import OptionalRerankParams, RerankResponse
from litellm.types.responses.main import DeleteResponseResult
from litellm.types.router import GenericLiteLLMParams
-from litellm.types.utils import EmbeddingResponse, FileTypes, TranscriptionResponse
+from litellm.types.utils import (
+ EmbeddingResponse,
+ FileTypes,
+ LiteLLMBatch,
+ TranscriptionResponse,
+)
from litellm.types.vector_stores import (
VectorStoreCreateOptionalRequestParams,
VectorStoreCreateResponse,
@@ -1257,6 +1264,10 @@ class BaseLLMHTTPHandler:
stream: Optional[bool] = False,
kwargs: Optional[Dict[str, Any]] = None,
) -> Union[AnthropicMessagesResponse, AsyncIterator]:
+ from litellm.litellm_core_utils.get_provider_specific_headers import (
+ ProviderSpecificHeaderUtils,
+ )
+
if client is None or not isinstance(client, AsyncHTTPHandler):
async_httpx_client = get_async_httpx_client(
llm_provider=litellm.LlmProviders.ANTHROPIC
@@ -1270,10 +1281,9 @@ class BaseLLMHTTPHandler:
Optional[litellm.types.utils.ProviderSpecificHeader],
kwargs.get("provider_specific_header", None),
)
- extra_headers = (
- provider_specific_header.get("extra_headers", {})
- if provider_specific_header
- else {}
+ extra_headers = ProviderSpecificHeaderUtils.get_provider_specific_headers(
+ provider_specific_header=provider_specific_header,
+ custom_llm_provider=custom_llm_provider,
)
(
headers,
@@ -2209,15 +2219,38 @@ class BaseLLMHTTPHandler:
else:
sync_httpx_client = client
- if isinstance(transformed_request, str) or isinstance(
- transformed_request, bytes
- ):
- upload_response = sync_httpx_client.post(
- url=api_base,
- headers=headers,
- data=transformed_request,
+ if isinstance(transformed_request, dict) and "method" in transformed_request:
+ # Handle pre-signed requests (e.g., from Bedrock S3 uploads)
+ upload_response = getattr(sync_httpx_client, transformed_request["method"].lower())(
+ url=transformed_request["url"],
+ headers=transformed_request["headers"],
+ data=transformed_request["data"],
timeout=timeout,
)
+ elif isinstance(transformed_request, str) or isinstance(
+ transformed_request, bytes
+ ):
+ # Handle traditional file uploads
+ # Ensure transformed_request is a string for httpx compatibility
+ if isinstance(transformed_request, bytes):
+ transformed_request = transformed_request.decode('utf-8')
+
+ # Use the HTTP method specified by the provider config
+ http_method = provider_config.file_upload_http_method.upper()
+ if http_method == "PUT":
+ upload_response = sync_httpx_client.put(
+ url=api_base,
+ headers=headers,
+ data=transformed_request,
+ timeout=timeout,
+ )
+ else: # Default to POST
+ upload_response = sync_httpx_client.post(
+ url=api_base,
+ headers=headers,
+ data=transformed_request,
+ timeout=timeout,
+ )
else:
try:
# Step 1: Initial request to get upload URL
@@ -2277,16 +2310,52 @@ class BaseLLMHTTPHandler:
)
else:
async_httpx_client = client
+
+ #########################################################
+ # Debug Logging
+ #########################################################
+ logging_obj.pre_call(
+ input="",
+ api_key="",
+ additional_args={
+ "complete_input_dict": transformed_request,
+ "api_base": api_base,
+ "headers": headers,
+ },
+ )
- if isinstance(transformed_request, str) or isinstance(
- transformed_request, bytes
- ):
- upload_response = await async_httpx_client.post(
- url=api_base,
- headers=headers,
- data=transformed_request,
+ if isinstance(transformed_request, dict) and "method" in transformed_request:
+ # Handle pre-signed requests (e.g., from Bedrock S3 uploads)
+ upload_response = await getattr(async_httpx_client, transformed_request["method"].lower())(
+ url=transformed_request["url"],
+ headers=transformed_request["headers"],
+ data=transformed_request["data"],
timeout=timeout,
)
+ elif isinstance(transformed_request, str) or isinstance(
+ transformed_request, bytes
+ ):
+ # Handle traditional file uploads
+ # Ensure transformed_request is a string for httpx compatibility
+ if isinstance(transformed_request, bytes):
+ transformed_request = transformed_request.decode('utf-8')
+
+ # Use the HTTP method specified by the provider config
+ http_method = provider_config.file_upload_http_method.upper()
+ if http_method == "PUT":
+ upload_response = await async_httpx_client.put(
+ url=api_base,
+ headers=headers,
+ data=transformed_request,
+ timeout=timeout,
+ )
+ else: # Default to POST
+ upload_response = await async_httpx_client.post(
+ url=api_base,
+ headers=headers,
+ data=transformed_request,
+ timeout=timeout,
+ )
else:
try:
# Step 1: Initial request to get upload URL
@@ -2327,6 +2396,188 @@ class BaseLLMHTTPHandler:
litellm_params=litellm_params,
)
+ def create_batch(
+ self,
+ create_batch_data: "CreateBatchRequest",
+ litellm_params: dict,
+ provider_config: "BaseBatchesConfig",
+ headers: dict,
+ api_base: Optional[str],
+ api_key: Optional[str],
+ logging_obj: "LiteLLMLoggingObj",
+ _is_async: bool = False,
+ client: Optional[Union["HTTPHandler", "AsyncHTTPHandler"]] = None,
+ timeout: Optional[Union[float, httpx.Timeout]] = None,
+ ) -> Union["LiteLLMBatch", Coroutine[Any, Any, "LiteLLMBatch"]]:
+ """
+ Creates a batch using provider-specific batch creation process
+ """
+ # get config from model, custom llm provider
+ headers = provider_config.validate_environment(
+ api_key=api_key,
+ headers=headers,
+ model="",
+ messages=[],
+ optional_params={},
+ litellm_params=litellm_params,
+ )
+
+ api_base = provider_config.get_complete_batch_url(
+ api_base=api_base,
+ api_key=api_key,
+ model="",
+ optional_params={},
+ litellm_params=litellm_params,
+ data=create_batch_data,
+ )
+ if api_base is None:
+ raise ValueError("api_base is required for create_batch")
+
+ # Get the transformed request data
+ transformed_request = provider_config.transform_create_batch_request(
+ model="",
+ create_batch_data=create_batch_data,
+ litellm_params=litellm_params,
+ optional_params={},
+ )
+
+ if _is_async:
+ return self.async_create_batch(
+ transformed_request=transformed_request,
+ litellm_params=litellm_params,
+ provider_config=provider_config,
+ headers=headers,
+ api_base=api_base,
+ logging_obj=logging_obj,
+ client=client,
+ timeout=timeout,
+ create_batch_data=create_batch_data,
+ )
+
+ if client is None or not isinstance(client, HTTPHandler):
+ sync_httpx_client = _get_httpx_client()
+ else:
+ sync_httpx_client = client
+
+ try:
+ if isinstance(transformed_request, dict) and "method" in transformed_request:
+ # Handle pre-signed requests (e.g., from Bedrock with AWS auth)
+ batch_response = getattr(sync_httpx_client, transformed_request["method"].lower())(
+ url=transformed_request["url"],
+ headers=transformed_request["headers"],
+ data=transformed_request["data"],
+ timeout=timeout,
+ )
+ elif isinstance(transformed_request, dict):
+ # For other providers that use JSON requests
+ batch_response = sync_httpx_client.post(
+ url=api_base,
+ headers={**headers, "Content-Type": "application/json"},
+ json=transformed_request,
+ timeout=timeout,
+ )
+ else:
+ # Handle other request types if needed
+ batch_response = sync_httpx_client.post(
+ url=api_base,
+ headers=headers,
+ data=transformed_request,
+ timeout=timeout,
+ )
+ except Exception as e:
+ verbose_logger.exception(f"Error creating batch: {e}")
+ raise self._handle_error(
+ e=e,
+ provider_config=provider_config,
+ )
+
+ # Store original request for response transformation
+ litellm_params_with_request = {**litellm_params, "original_batch_request": create_batch_data}
+
+ return provider_config.transform_create_batch_response(
+ model=None,
+ raw_response=batch_response,
+ logging_obj=logging_obj,
+ litellm_params=litellm_params_with_request,
+ )
+
+ async def async_create_batch(
+ self,
+ transformed_request: Union[bytes, str, dict],
+ litellm_params: dict,
+ provider_config: "BaseBatchesConfig",
+ headers: dict,
+ api_base: str,
+ logging_obj: "LiteLLMLoggingObj",
+ client: Optional[Union["HTTPHandler", "AsyncHTTPHandler"]] = None,
+ timeout: Optional[Union[float, httpx.Timeout]] = None,
+ create_batch_data: Optional["CreateBatchRequest"] = None,
+ ):
+ """
+ Async version of create_batch
+ """
+ if client is None or not isinstance(client, AsyncHTTPHandler):
+ async_httpx_client = get_async_httpx_client(
+ llm_provider=provider_config.custom_llm_provider
+ )
+ else:
+ async_httpx_client = client
+
+ #########################################################
+ # Debug Logging
+ #########################################################
+ logging_obj.pre_call(
+ input="",
+ api_key="",
+ additional_args={
+ "complete_input_dict": transformed_request,
+ "api_base": api_base,
+ "headers": headers,
+ },
+ )
+
+ try:
+ if isinstance(transformed_request, dict) and "method" in transformed_request:
+ # Handle pre-signed requests (e.g., from Bedrock with AWS auth)
+ batch_response = await getattr(async_httpx_client, transformed_request["method"].lower())(
+ url=transformed_request["url"],
+ headers=transformed_request["headers"],
+ data=transformed_request["data"],
+ timeout=timeout,
+ )
+ elif isinstance(transformed_request, dict):
+ # For other providers that use JSON requests
+ batch_response = await async_httpx_client.post(
+ url=api_base,
+ headers={**headers, "Content-Type": "application/json"},
+ json=transformed_request,
+ timeout=timeout,
+ )
+ else:
+ # Handle other request types if needed
+ batch_response = await async_httpx_client.post(
+ url=api_base,
+ headers=headers,
+ data=transformed_request,
+ timeout=timeout,
+ )
+ except Exception as e:
+ verbose_logger.exception(f"Error creating batch: {e}")
+ raise self._handle_error(
+ e=e,
+ provider_config=provider_config,
+ )
+
+ # Store original request for response transformation (for async version)
+ litellm_params_with_request = {**litellm_params, "original_batch_request": create_batch_data or {}}
+
+ return provider_config.transform_create_batch_response(
+ model=None,
+ raw_response=batch_response,
+ logging_obj=logging_obj,
+ litellm_params=litellm_params_with_request,
+ )
+
def list_files(self):
"""
Lists all files
@@ -2378,6 +2629,7 @@ class BaseLLMHTTPHandler:
BaseVectorStoreConfig,
BaseGoogleGenAIGenerateContentConfig,
BaseAnthropicMessagesConfig,
+ BaseBatchesConfig,
"BasePassthroughConfig",
],
):
@@ -2678,6 +2930,7 @@ class BaseLLMHTTPHandler:
_is_async: bool = False,
fake_stream: bool = False,
litellm_metadata: Optional[Dict[str, Any]] = None,
+ api_key: Optional[str] = None,
) -> Union[
ImageResponse,
Coroutine[Any, Any, ImageResponse],
@@ -2702,6 +2955,7 @@ class BaseLLMHTTPHandler:
client=client if isinstance(client, AsyncHTTPHandler) else None,
fake_stream=fake_stream,
litellm_metadata=litellm_metadata,
+ api_key=api_key,
)
if client is None or not isinstance(client, HTTPHandler):
@@ -2712,7 +2966,7 @@ class BaseLLMHTTPHandler:
sync_httpx_client = client
headers = image_generation_provider_config.validate_environment(
- api_key=litellm_params.get("api_key", None),
+ api_key=api_key,
headers=image_generation_optional_request_params.get("extra_headers", {})
or {},
model=model,
@@ -2795,6 +3049,7 @@ class BaseLLMHTTPHandler:
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
fake_stream: bool = False,
litellm_metadata: Optional[Dict[str, Any]] = None,
+ api_key: Optional[str] = None,
) -> ImageResponse:
"""
Async version of the image generation handler.
@@ -2809,7 +3064,7 @@ class BaseLLMHTTPHandler:
async_httpx_client = client
headers = image_generation_provider_config.validate_environment(
- api_key=litellm_params.get("api_key", None),
+ api_key=api_key,
headers=image_generation_optional_request_params.get("extra_headers", {})
or {},
model=model,
diff --git a/litellm/llms/databricks/chat/transformation.py b/litellm/llms/databricks/chat/transformation.py
index 3963dd4505c..0f3530f85da 100644
--- a/litellm/llms/databricks/chat/transformation.py
+++ b/litellm/llms/databricks/chat/transformation.py
@@ -26,7 +26,6 @@ from litellm.litellm_core_utils.llm_response_utils.convert_dict_to_response impo
_should_convert_tool_call_to_json_mode,
)
from litellm.litellm_core_utils.prompt_templates.common_utils import (
- handle_messages_with_content_list_to_str_conversion,
strip_name_from_messages,
)
from litellm.llms.base_llm.base_model_iterator import BaseModelResponseIterator
@@ -306,7 +305,6 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig):
) -> Union[List[AllMessageValues], Coroutine[Any, Any, List[AllMessageValues]]]:
"""
Databricks does not support:
- - content in list format.
- 'name' in user message.
"""
new_messages = []
@@ -316,7 +314,6 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig):
else:
_message = message
new_messages.append(_message)
- new_messages = handle_messages_with_content_list_to_str_conversion(new_messages)
new_messages = strip_name_from_messages(new_messages)
if is_async:
@@ -384,6 +381,25 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig):
thinking_blocks.append(thinking_block)
return reasoning_content, thinking_blocks
+ @staticmethod
+ def extract_citations(
+ content: Optional[AllDatabricksContentValues],
+ ) -> Optional[List[Any]]:
+ if content is None:
+ return None
+ citations = []
+ if isinstance(content, list):
+ for item in content:
+ text = item.get("text", None)
+ if citations_item := item.get("citations"):
+ citations.append(
+ [
+ {**citation, "supported_text": text}
+ for citation in citations_item
+ ]
+ )
+ return citations or None
+
def _transform_dbrx_choices(
self, choices: List[DatabricksChoice], json_mode: Optional[bool] = None
) -> List[Choices]:
@@ -432,12 +448,19 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig):
choice["message"].get("content")
)
+ citations = DatabricksConfig.extract_citations(
+ choice["message"].get("content")
+ )
+
translated_message = Message(
role="assistant",
content=content_str,
reasoning_content=reasoning_content,
thinking_blocks=thinking_blocks,
tool_calls=choice["message"].get("tool_calls"),
+ provider_specific_fields={"citations": citations}
+ if citations is not None
+ else None,
)
if finish_reason is None:
@@ -566,6 +589,17 @@ class DatabricksChatResponseIterator(BaseModelResponseIterator):
for _tc in tool_calls:
if _tc.get("function", {}).get("arguments") == "{}":
_tc["function"]["arguments"] = "" # avoid invalid json
+ if isinstance(choice["delta"]["content"], list) and (
+ content := choice["delta"]["content"]
+ ):
+ if citations := content[0].get("citations"):
+ # TODO: Databricks delta does not include supported text or chunk type.
+ # Add either here once Databricks supports it to enable citation linkage.
+ choice["delta"].setdefault("provider_specific_fields", {})[
+ "citation"
+ ] = citations[
+ 0
+ ] # Databricks Content item always has citation as a list of list
# extract the content str
content_str = DatabricksConfig.extract_content_str(
choice["delta"].get("content")
diff --git a/litellm/llms/deepinfra/chat/transformation.py b/litellm/llms/deepinfra/chat/transformation.py
index 0d446d39b92..09cdabcdd82 100644
--- a/litellm/llms/deepinfra/chat/transformation.py
+++ b/litellm/llms/deepinfra/chat/transformation.py
@@ -12,6 +12,9 @@ class DeepInfraConfig(OpenAIGPTConfig):
The class `DeepInfra` provides configuration for the DeepInfra's Chat Completions API interface. Below are the parameters:
"""
+ @property
+ def custom_llm_provider(self) -> Optional[str]:
+ return "deepinfra"
frequency_penalty: Optional[int] = None
function_call: Optional[Union[str, dict]] = None
@@ -53,7 +56,7 @@ class DeepInfraConfig(OpenAIGPTConfig):
return super().get_config()
def get_supported_openai_params(self, model: str):
- return [
+ supported_openai_params = [
"stream",
"frequency_penalty",
"function_call",
@@ -68,9 +71,16 @@ class DeepInfraConfig(OpenAIGPTConfig):
"top_p",
"response_format",
"tools",
- "tool_choice",
+ "tool_choice"
]
+ if litellm.supports_reasoning(
+ model=model,
+ custom_llm_provider=self.custom_llm_provider,
+ ):
+ supported_openai_params.append("reasoning_effort")
+ return supported_openai_params
+
def map_openai_params(
self,
non_default_params: dict,
diff --git a/litellm/llms/github_copilot/chat/transformation.py b/litellm/llms/github_copilot/chat/transformation.py
index 4526e6247b4..66227ac21d8 100644
--- a/litellm/llms/github_copilot/chat/transformation.py
+++ b/litellm/llms/github_copilot/chat/transformation.py
@@ -75,8 +75,36 @@ class GithubCopilotConfig(OpenAIConfig):
initiator = self._determine_initiator(messages)
validated_headers["X-Initiator"] = initiator
+ # Add Copilot-Vision-Request header if request contains images
+ if self._has_vision_content(messages):
+ validated_headers["Copilot-Vision-Request"] = "true"
+
return validated_headers
+ def get_supported_openai_params(self, model: str) -> list:
+ """
+ Get supported OpenAI parameters for GitHub Copilot.
+
+ For Claude models that support extended thinking (Claude 4 family and Claude 3-7), includes thinking and reasoning_effort parameters.
+ For other models, returns standard OpenAI parameters (which may include reasoning_effort for o-series models).
+ """
+ from litellm.utils import supports_reasoning
+
+ # Get base OpenAI parameters
+ base_params = super().get_supported_openai_params(model)
+
+ # Add Claude-specific parameters for models that support extended thinking
+ if "claude" in model.lower() and supports_reasoning(
+ model=model.lower(),
+ ):
+ if "thinking" not in base_params:
+ base_params.append("thinking")
+ # reasoning_effort is not included by parent for Claude models, so add it
+ if "reasoning_effort" not in base_params:
+ base_params.append("reasoning_effort")
+
+ return base_params
+
def _determine_initiator(self, messages: List[AllMessageValues]) -> str:
"""
Determine if request is user or agent initiated based on message roles.
@@ -87,3 +115,27 @@ class GithubCopilotConfig(OpenAIConfig):
if role in ["tool", "assistant"]:
return "agent"
return "user"
+
+ def _has_vision_content(self, messages: List[AllMessageValues]) -> bool:
+ """
+ Check if any message contains vision content (images).
+ Returns True if any message has content with vision-related types, otherwise False.
+
+ Checks for:
+ - image_url content type (OpenAI format)
+ - Content items with type 'image_url'
+ """
+ for message in messages:
+ content = message.get("content")
+ if isinstance(content, list):
+ # Check if any content item indicates vision content
+ for content_item in content:
+ if isinstance(content_item, dict):
+ # Check for image_url field (direct image URL)
+ if "image_url" in content_item:
+ return True
+ # Check for type field indicating image content
+ content_type = content_item.get("type")
+ if content_type == "image_url":
+ return True
+ return False
diff --git a/litellm/llms/github_copilot/common_utils.py b/litellm/llms/github_copilot/common_utils.py
index 4c9a4b6dad0..86fbb706e52 100644
--- a/litellm/llms/github_copilot/common_utils.py
+++ b/litellm/llms/github_copilot/common_utils.py
@@ -28,7 +28,6 @@ class GithubCopilotError(BaseLLMException):
)
-
class GetDeviceCodeError(GithubCopilotError):
pass
diff --git a/litellm/llms/groq/chat/transformation.py b/litellm/llms/groq/chat/transformation.py
index 86fa323f9e3..165301efb5c 100644
--- a/litellm/llms/groq/chat/transformation.py
+++ b/litellm/llms/groq/chat/transformation.py
@@ -6,6 +6,8 @@ from typing import Any, Coroutine, List, Literal, Optional, Tuple, Union, cast,
import httpx
from pydantic import BaseModel
+import litellm
+from litellm._logging import verbose_logger
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
from litellm.secret_managers.main import get_secret_str
from litellm.types.llms.openai import (
@@ -55,6 +57,10 @@ class GroqChatConfig(OpenAILikeChatConfig):
if key != "self" and value is not None:
setattr(self.__class__, key, value)
+ @property
+ def custom_llm_provider(self) -> Optional[str]:
+ return "groq"
+
@classmethod
def get_config(cls):
return super().get_config()
@@ -65,6 +71,15 @@ class GroqChatConfig(OpenAILikeChatConfig):
base_params.remove("max_retries")
except ValueError:
pass
+
+ try:
+ if litellm.supports_reasoning(
+ model=model, custom_llm_provider=self.custom_llm_provider
+ ):
+ base_params.append("reasoning_effort")
+ except Exception as e:
+ verbose_logger.debug(f"Error checking if model supports reasoning: {e}")
+
return base_params
@overload
diff --git a/litellm/llms/heroku/chat/transformation.py b/litellm/llms/heroku/chat/transformation.py
new file mode 100644
index 00000000000..a64d8afe63a
--- /dev/null
+++ b/litellm/llms/heroku/chat/transformation.py
@@ -0,0 +1,67 @@
+"""
+Heroku Chat Completions API
+
+this is OpenAI compatible - no translation needed / occurs
+"""
+import os
+
+from typing import Optional, List, Tuple, Union, Coroutine, Any, Literal, overload
+from litellm.litellm_core_utils.prompt_templates.common_utils import (
+ handle_messages_with_content_list_to_str_conversion,
+)
+from litellm.types.llms.openai import AllMessageValues
+from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfig
+
+# Base error class for Heroku
+class HerokuError(Exception):
+ pass
+
+class HerokuChatConfig(OpenAIGPTConfig):
+ @overload
+ def _transform_messages(
+ self, messages: List[AllMessageValues], model: str, is_async: Literal[True]
+ ) -> Coroutine[Any, Any, List[AllMessageValues]]:
+ ...
+
+ @overload
+ def _transform_messages(
+ self,
+ messages: List[AllMessageValues],
+ model: str,
+ is_async: Literal[False] = False,
+ ) -> List[AllMessageValues]:
+ ...
+
+ def _transform_messages(
+ self, messages: List[AllMessageValues], model: str, is_async: bool = False
+ ) -> Union[List[AllMessageValues], Coroutine[Any, Any, List[AllMessageValues]]]:
+ """
+ Heroku does not support content in list format.
+ See: https://devcenter.heroku.com/articles/heroku-inference-api-v1-chat-completions#content-object
+ """
+ messages = handle_messages_with_content_list_to_str_conversion(messages)
+ if is_async:
+ return super()._transform_messages(
+ messages=messages, model=model, is_async=True
+ )
+ else:
+ return super()._transform_messages(
+ messages=messages, model=model, is_async=False
+ )
+
+ def _get_openai_compatible_provider_info(self, api_base: Optional[str], api_key: Optional[str]) -> Tuple[Optional[str], Optional[str]]:
+ api_base = api_base or os.getenv("HEROKU_API_BASE")
+ api_key = api_key or os.getenv("HEROKU_API_KEY")
+
+ return api_base, api_key
+
+ def get_complete_url(self, api_base: Optional[str], api_key: Optional[str], model: str, optional_params: dict, litellm_params: dict, stream: Optional[bool] = None) -> str:
+ api_base, _ = self._get_openai_compatible_provider_info(api_base, api_key)
+
+ if not api_base:
+ raise HerokuError("No api base was set. Please provide an api_base, or set the HEROKU_API_BASE environment variable.")
+
+ if not api_base.endswith("/v1/chat/completions"):
+ api_base = f"{api_base}/v1/chat/completions"
+
+ return api_base
\ No newline at end of file
diff --git a/litellm/llms/mistral/chat/transformation.py b/litellm/llms/mistral/chat/transformation.py
index b38a4982471..51fa65244a0 100644
--- a/litellm/llms/mistral/chat/transformation.py
+++ b/litellm/llms/mistral/chat/transformation.py
@@ -6,7 +6,18 @@ Why separate file? Make it easy to see how transformation works
Docs - https://docs.mistral.ai/api/
"""
-from typing import Any, Coroutine, List, Literal, Optional, Tuple, Union, cast, overload
+from typing import (
+ Any,
+ Coroutine,
+ List,
+ Literal,
+ Optional,
+ Tuple,
+ Union,
+ cast,
+ get_type_hints,
+ overload,
+)
import httpx
@@ -17,7 +28,7 @@ from litellm.litellm_core_utils.prompt_templates.common_utils import (
)
from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfig
from litellm.secret_managers.main import get_secret_str
-from litellm.types.llms.mistral import MistralToolCallMessage
+from litellm.types.llms.mistral import MistralThinkingBlock, MistralToolCallMessage
from litellm.types.llms.openai import AllMessageValues
from litellm.types.utils import ModelResponse
from litellm.utils import convert_to_model_response_object
@@ -145,7 +156,9 @@ class MistralConfig(OpenAIGPTConfig):
for param, value in non_default_params.items():
if param == "max_tokens":
optional_params["max_tokens"] = value
- if param == "max_completion_tokens": # max_completion_tokens should take priority
+ if (
+ param == "max_completion_tokens"
+ ): # max_completion_tokens should take priority
optional_params["max_tokens"] = value
if param == "tools":
# Clean tools to remove problematic schema fields for Mistral API
@@ -159,7 +172,9 @@ class MistralConfig(OpenAIGPTConfig):
if param == "stop":
optional_params["stop"] = value
if param == "tool_choice" and isinstance(value, str):
- optional_params["tool_choice"] = self._map_tool_choice(tool_choice=value)
+ optional_params["tool_choice"] = self._map_tool_choice(
+ tool_choice=value
+ )
if param == "seed":
optional_params["extra_body"] = {"random_seed": value}
if param == "response_format":
@@ -185,7 +200,9 @@ class MistralConfig(OpenAIGPTConfig):
) # type: ignore
# if api_base does not end with /v1 we add it
- if api_base is not None and not api_base.endswith("/v1"): # Mistral always needs a /v1 at the end
+ if api_base is not None and not api_base.endswith(
+ "/v1"
+ ): # Mistral always needs a /v1 at the end
api_base = api_base + "/v1"
dynamic_api_key = (
api_key
@@ -194,10 +211,12 @@ class MistralConfig(OpenAIGPTConfig):
)
return api_base, dynamic_api_key
+ # fmt: off
+
@overload
def _transform_messages(
self, messages: List[AllMessageValues], model: str, is_async: Literal[True]
- ) -> Coroutine[Any, Any, List[AllMessageValues]]:
+ ) -> Coroutine[Any, Any, List[AllMessageValues]]:
...
@overload
@@ -206,8 +225,9 @@ class MistralConfig(OpenAIGPTConfig):
messages: List[AllMessageValues],
model: str,
is_async: Literal[False] = False,
- ) -> List[AllMessageValues]:
+ ) -> List[AllMessageValues]:
...
+ # fmt: on
def _transform_messages(
self, messages: List[AllMessageValues], model: str, is_async: bool = False
@@ -218,18 +238,20 @@ class MistralConfig(OpenAIGPTConfig):
- if image passed in, then just return as is (user-intended)
- if `name` is passed, then drop it for mistral API: https://github.com/BerriAI/litellm/issues/6696
- Motivation: mistral api doesn't support content as a list
+ Motivation: mistral api doesn't support content as a list.
+ The above statement is not valid now. Need to plan to remove all the #1,2,3
+ Mistral API supports content as a list.
"""
- ## 1. If 'image_url' in content, then return as is
+ ## 1. If 'image_url' or 'file' in content, then transform with base class and mistral-specific handling
for m in messages:
_content_block = m.get("content")
if _content_block and isinstance(_content_block, list):
- for c in _content_block:
- if c.get("type") == "image_url":
- if is_async:
- return super()._transform_messages(messages, model, True)
- else:
- return super()._transform_messages(messages, model, False)
+ if any(c.get("type") in ["image_url", "file"] for c in _content_block):
+ if is_async:
+ return self._transform_messages_async(messages, model)
+ else:
+ messages = self._transform_messages_sync(messages, model)
+ return messages
## 2. If content is list, then convert to string
messages = handle_messages_with_content_list_to_str_conversion(messages)
@@ -239,6 +261,8 @@ class MistralConfig(OpenAIGPTConfig):
for m in messages:
m = MistralConfig._handle_name_in_message(m)
m = MistralConfig._handle_tool_call_message(m)
+ if MistralConfig._is_empty_assistant_message(m):
+ continue
m = strip_none_values_from_message(m) # prevents 'extra_forbidden' error
new_messages.append(m)
@@ -247,6 +271,51 @@ class MistralConfig(OpenAIGPTConfig):
else:
return super()._transform_messages(new_messages, model, False)
+ async def _transform_messages_async(self,
+ messages: List[AllMessageValues], model: str
+ ) -> List[AllMessageValues]:
+ """
+ Handle modification of messages for Mistral API in an async context.
+ """
+ # Call parent async method to handle basic transformations
+ # and then apply Mistral-specific handling for files
+ messages = await super()._transform_messages(messages, model, True)
+ messages = self._handle_message_with_file(messages)
+ return messages
+
+ def _transform_messages_sync(self,
+ messages: List[AllMessageValues], model: str
+ ) -> List[AllMessageValues]:
+ """ Handle modification of messages for Mistral API in a sync context.
+ """
+ # Call parent sync method to handle basic transformations
+ # and then apply Mistral-specific handling for files
+ # This is the sync version of the async method above
+ messages = super()._transform_messages(messages, model, False)
+ messages = self._handle_message_with_file(messages)
+ return messages
+
+ def _handle_message_with_file(
+ self,
+ messages: List[AllMessageValues]) -> List[AllMessageValues]:
+ """
+ Mistral API supports only 'file_id' in message content with type 'file'.
+ """
+ for m in messages:
+ _content_block = m.get("content")
+ if _content_block and isinstance(_content_block, list):
+ if any(c.get("type") == "file" for c in _content_block):
+ # If file content is present, we get file_id from 'file' attribute of content block
+ # then replace 'file' with 'file_id' and assign the value of 'file_id' attribute to it.
+ file_contents = [c for c in _content_block if c.get("type") == "file"]
+ for file_content in file_contents:
+ file_id = file_content.get("file", {}).get("file_id")
+ if file_id:
+ # Replace 'file' with 'file_id'
+ file_content["file_id"] = file_id # type: ignore
+ file_content.pop("file", None)
+ return messages
+
def _add_reasoning_system_prompt_if_needed(
self, messages: List[AllMessageValues], optional_params: dict
) -> List[AllMessageValues]:
@@ -269,20 +338,30 @@ class MistralConfig(OpenAIGPTConfig):
# Handle both string and list content, preserving original format
if isinstance(existing_content, str):
# String content - prepend reasoning prompt
- new_content: Union[str, list] = f"{reasoning_prompt}\n\n{existing_content}"
+ new_content: Union[str, list] = (
+ f"{reasoning_prompt}\n\n{existing_content}"
+ )
elif isinstance(existing_content, list):
# List content - prepend reasoning prompt as text block
- new_content = [{"type": "text", "text": reasoning_prompt + "\n\n"}] + existing_content
+ new_content = [
+ {"type": "text", "text": reasoning_prompt + "\n\n"}
+ ] + existing_content
else:
# Fallback for any other type - convert to string
new_content = f"{reasoning_prompt}\n\n{str(existing_content)}"
- messages[i] = cast(AllMessageValues, {**msg, "content": new_content})
+ messages[i] = cast(
+ AllMessageValues, {**msg, "content": new_content}
+ )
break
else:
# Add new system message with reasoning instructions
reasoning_message: AllMessageValues = cast(
- AllMessageValues, {"role": "system", "content": self._get_mistral_reasoning_system_prompt()}
+ AllMessageValues,
+ {
+ "role": "system",
+ "content": self._get_mistral_reasoning_system_prompt(),
+ },
)
messages = [reasoning_message] + messages
@@ -294,32 +373,34 @@ class MistralConfig(OpenAIGPTConfig):
def _clean_tool_schema_for_mistral(cls, tools: list) -> list:
"""
Clean tool schemas to remove fields that cause issues with Mistral API.
-
+
Removes:
- $id and $schema fields (cause grammar validation errors)
- additionalProperties=False (causes OpenAI API schema errors)
- strict field (not supported by Mistral)
-
+
Args:
tools: List of tool definitions
max_depth: Maximum recursion depth for schema cleaning (default: 10)
-
+
Returns:
Cleaned tools list
"""
if not tools:
return tools
-
+
import copy
from litellm.constants import DEFAULT_MAX_RECURSE_DEPTH
from litellm.utils import _remove_json_schema_refs
cleaned_tools = copy.deepcopy(tools)
-
+
# Apply all cleaning functions with max_depth protection
- cleaned_tools = _remove_json_schema_refs(cleaned_tools, max_depth=DEFAULT_MAX_RECURSE_DEPTH)
-
+ cleaned_tools = _remove_json_schema_refs(
+ cleaned_tools, max_depth=DEFAULT_MAX_RECURSE_DEPTH
+ )
+
return cleaned_tools
@classmethod
@@ -360,6 +441,25 @@ class MistralConfig(OpenAIGPTConfig):
message["tool_calls"] = mistral_tool_calls # type: ignore
return message
+ @classmethod
+ def _is_empty_assistant_message(cls, message: AllMessageValues) -> bool:
+ """
+ Mistral API does not support empty string in assistant content.
+ """
+ from litellm.types.llms.openai import ChatCompletionAssistantMessage
+
+ set_keys = get_type_hints(ChatCompletionAssistantMessage).keys()
+
+ all_expected_values_are_empty = True
+ for key in set_keys:
+ if key != "role" and message.get(key) is not None:
+ if key == "content" and message.get(key) == "":
+ continue
+ else:
+ all_expected_values_are_empty = False
+ break
+ return all_expected_values_are_empty
+
@staticmethod
def _handle_empty_content_response(response_data: dict) -> dict:
"""
@@ -380,6 +480,58 @@ class MistralConfig(OpenAIGPTConfig):
choice["message"]["content"] = None
return response_data
+ @staticmethod
+ def _convert_thinking_block_to_reasoning_content(
+ thinking_blocks: MistralThinkingBlock,
+ ) -> str:
+ """
+ Convert Mistral thinking blocks to reasoning content.
+ """
+ return "\n".join(
+ [block.get("text", "") for block in thinking_blocks["thinking"]]
+ )
+
+ @staticmethod
+ def _handle_content_list_to_str_conversion(response_data: dict) -> dict:
+ """
+ Handle Mistral's content list format and extract thinking content.
+
+ Map mistral's content list to string and extract thinking blocks:
+ - Thinking block -> reasoning_content field
+ - Text block -> content field
+ """
+
+ if response_data.get("choices") and len(response_data["choices"]) > 0:
+ for choice in response_data["choices"]:
+ if choice.get("message") and choice["message"].get("content"):
+ content = choice["message"]["content"]
+
+ # Only process if content is a list
+ if isinstance(content, list):
+ thinking_content = ""
+ text_content = ""
+
+ # Process each content block
+ for block in content:
+ if block.get("type") == "thinking":
+ thinking_blocks = block.get("thinking", [])
+ thinking_texts = []
+ for thinking_block in thinking_blocks:
+ if thinking_block.get("type") == "text":
+ thinking_texts.append(
+ thinking_block.get("text", "")
+ )
+ thinking_content = "\n".join(thinking_texts)
+ elif block.get("type") == "text":
+ text_content = block.get("text", "")
+
+ # Set the extracted content
+ choice["message"]["content"] = text_content
+ if thinking_content:
+ choice["message"]["reasoning_content"] = thinking_content
+
+ return response_data
+
def transform_request(
self,
model: str,
@@ -396,8 +548,12 @@ class MistralConfig(OpenAIGPTConfig):
dict: The transformed request. Sent as the body of the API call.
"""
# Add reasoning system prompt if needed (for magistral models)
- if "magistral" in model.lower() and optional_params.get("_add_reasoning_prompt", False):
- messages = self._add_reasoning_system_prompt_if_needed(messages, optional_params)
+ if "magistral" in model.lower() and optional_params.get(
+ "_add_reasoning_prompt", False
+ ):
+ messages = self._add_reasoning_system_prompt_if_needed(
+ messages, optional_params
+ )
# Call parent transform_request which handles _transform_messages
return super().transform_request(
@@ -424,14 +580,16 @@ class MistralConfig(OpenAIGPTConfig):
) -> ModelResponse:
"""
Transform the raw response from Mistral API.
- Handles Mistral-specific behavior like converting empty string content to None.
+ Handles Mistral-specific behavior like converting empty string content to None
+ and extracting thinking content from content lists.
"""
logging_obj.post_call(original_response=raw_response.text)
logging_obj.model_call_details["response_headers"] = raw_response.headers
- # Handle Mistral-specific empty string content conversion to None
+ # Handle Mistral-specific response transformations
response_data = raw_response.json()
response_data = self._handle_empty_content_response(response_data)
+ response_data = self._handle_content_list_to_str_conversion(response_data)
final_response_obj = cast(
ModelResponse,
diff --git a/litellm/llms/oci/chat/transformation.py b/litellm/llms/oci/chat/transformation.py
index 3e05473630d..3be373ca5e5 100644
--- a/litellm/llms/oci/chat/transformation.py
+++ b/litellm/llms/oci/chat/transformation.py
@@ -92,6 +92,22 @@ def load_private_key_from_str(key_str: str):
return key
+def load_private_key_from_file(file_path: str):
+ """Loads a private key from a file path"""
+ try:
+ with open(file_path, "r", encoding="utf-8") as f:
+ key_str = f.read().strip()
+ except FileNotFoundError:
+ raise FileNotFoundError(f"Private key file not found: {file_path}")
+ except OSError as e:
+ raise OSError(f"Failed to read private key file '{file_path}': {e}") from e
+
+ if not key_str:
+ raise ValueError(f"Private key file is empty: {file_path}")
+
+ return load_private_key_from_str(key_str)
+
+
def get_vendor_from_model(model: str) -> OCIVendors:
"""
Extracts the vendor from the model name.
@@ -237,10 +253,17 @@ class OCIChatConfig(BaseConfig):
oci_fingerprint = optional_params.get("oci_fingerprint")
oci_tenancy = optional_params.get("oci_tenancy")
oci_key = optional_params.get("oci_key")
+ oci_key_file = optional_params.get("oci_key_file")
- if not oci_user or not oci_fingerprint or not oci_tenancy or not oci_key:
+ if (
+ not oci_user
+ or not oci_fingerprint
+ or not oci_tenancy
+ or not (oci_key or oci_key_file)
+ ):
raise Exception(
- "Missing one of the following parameters: oci_user, oci_fingerprint, oci_tenancy, oci_key"
+ "Missing required parameters: oci_user, oci_fingerprint, oci_tenancy, "
+ "and at least one of oci_key or oci_key_file."
)
method = str(optional_params.get("method", "POST")).upper()
@@ -283,7 +306,17 @@ class OCIChatConfig(BaseConfig):
"Please install it with: pip install cryptography"
) from e
- private_key = load_private_key_from_str(oci_key)
+ private_key = (
+ load_private_key_from_str(oci_key)
+ if oci_key
+ else load_private_key_from_file(oci_key_file) if oci_key_file else None
+ )
+
+ if private_key is None:
+ raise Exception(
+ "Private key is required for OCI authentication. Please provide either oci_key or oci_key_file."
+ )
+
signature = private_key.sign(
signing_string.encode("utf-8"),
padding.PKCS1v15(),
@@ -334,17 +367,19 @@ class OCIChatConfig(BaseConfig):
oci_fingerprint = optional_params.get("oci_fingerprint")
oci_tenancy = optional_params.get("oci_tenancy")
oci_key = optional_params.get("oci_key")
+ oci_key_file = optional_params.get("oci_key_file")
oci_compartment_id = optional_params.get("oci_compartment_id")
if (
not oci_user
or not oci_fingerprint
or not oci_tenancy
- or not oci_key
+ or not (oci_key or oci_key_file)
or not oci_compartment_id
):
raise Exception(
- "Missing one of the following parameters: oci_user, oci_fingerprint, oci_tenancy, oci_key, oci_compartment_id"
+ "Missing required parameters: oci_user, oci_fingerprint, oci_tenancy, "
+ "and at least one of oci_key or oci_key_file."
)
if not api_base:
@@ -737,7 +772,14 @@ def adapt_messages_to_generic_oci_standard(
tool_calls = message.get("tool_calls")
tool_call_id = message.get("tool_call_id")
- if role in ["system", "user", "assistant"] and content is not None:
+ if role == "assistant" and tool_calls is not None:
+ if not isinstance(tool_calls, list):
+ raise Exception("Prop `tool_calls` must be a list of tool calls")
+ new_messages.append(
+ adapt_messages_to_generic_oci_standard_tool_call(role, tool_calls)
+ )
+
+ elif role in ["system", "user", "assistant"] and content is not None:
if not isinstance(content, (str, list)):
raise Exception(
"Prop `content` must be a string or a list of content items"
@@ -746,13 +788,6 @@ def adapt_messages_to_generic_oci_standard(
adapt_messages_to_generic_oci_standard_content_message(role, content)
)
- elif role == "assistant" and tool_calls is not None:
- if not isinstance(tool_calls, list):
- raise Exception("Prop `tool_calls` must be a list of tool calls")
- new_messages.append(
- adapt_messages_to_generic_oci_standard_tool_call(role, tool_calls)
- )
-
elif role == "tool":
if not isinstance(tool_call_id, str):
raise Exception("Prop `tool_call_id` is required and must be a string")
diff --git a/litellm/llms/ollama/chat/transformation.py b/litellm/llms/ollama/chat/transformation.py
index d4ce4052a7e..ee0d3acef70 100644
--- a/litellm/llms/ollama/chat/transformation.py
+++ b/litellm/llms/ollama/chat/transformation.py
@@ -137,6 +137,7 @@ class OllamaChatConfig(BaseConfig):
"tool_choice",
"functions",
"response_format",
+ "reasoning_effort",
]
def map_openai_params(
@@ -175,6 +176,8 @@ class OllamaChatConfig(BaseConfig):
if value.get("json_schema") and value["json_schema"].get("schema"):
optional_params["format"] = value["json_schema"]["schema"]
### FUNCTION CALLING LOGIC ###
+ if param == "reasoning_effort" and value is not None:
+ optional_params["think"] = True
if param == "tools":
## CHECK IF MODEL SUPPORTS TOOL CALLING ##
try:
@@ -212,9 +215,9 @@ class OllamaChatConfig(BaseConfig):
litellm.add_function_to_prompt = (
True # so that main.py adds the function call to the prompt
)
- optional_params[
- "functions_unsupported_model"
- ] = non_default_params.get("functions")
+ optional_params["functions_unsupported_model"] = (
+ non_default_params.get("functions")
+ )
non_default_params.pop("tool_choice", None) # causes ollama requests to hang
non_default_params.pop("functions", None) # causes ollama requests to hang
return optional_params
@@ -229,6 +232,8 @@ class OllamaChatConfig(BaseConfig):
api_key: Optional[str] = None,
api_base: Optional[str] = None,
) -> dict:
+ if api_key is not None and "Authorization" not in headers:
+ headers["Authorization"] = f"Bearer {api_key}"
return headers
def get_complete_url(
@@ -346,11 +351,31 @@ class OllamaChatConfig(BaseConfig):
## RESPONSE OBJECT
model_response.choices[0].finish_reason = "stop"
+ response_json_message = response_json.get("message")
+ if response_json_message is not None:
+ if "thinking" in response_json_message:
+ # remap 'thinking' to 'reasoning_content'
+ response_json_message["reasoning_content"] = response_json_message[
+ "thinking"
+ ]
+ del response_json_message["thinking"]
+ elif response_json_message.get("content") is not None:
+ # parse reasoning content from content
+ from litellm.litellm_core_utils.llm_response_utils.convert_dict_to_response import (
+ _parse_content_for_reasoning,
+ )
+
+ reasoning_content, content = _parse_content_for_reasoning(
+ response_json_message["content"]
+ )
+ response_json_message["reasoning_content"] = reasoning_content
+ response_json_message["content"] = content
+
if (
request_data.get("format", "") == "json"
and litellm_params.get("function_name") is not None
):
- function_call = json.loads(response_json["message"]["content"])
+ function_call = json.loads(response_json_message["content"])
message = litellm.Message(
content=None,
tool_calls=[
@@ -367,11 +392,13 @@ class OllamaChatConfig(BaseConfig):
"type": "function",
}
],
+ reasoning_content=response_json_message.get("reasoning_content"),
)
model_response.choices[0].message = message # type: ignore
model_response.choices[0].finish_reason = "tool_calls"
else:
- _message = litellm.Message(**response_json["message"])
+
+ _message = litellm.Message(**response_json_message)
model_response.choices[0].message = _message # type: ignore
model_response.created = int(time.time())
model_response.model = "ollama_chat/" + model
@@ -412,6 +439,9 @@ class OllamaChatConfig(BaseConfig):
class OllamaChatCompletionResponseIterator(BaseModelResponseIterator):
+ started_reasoning_content: bool = False
+ finished_reasoning_content: bool = False
+
def _is_function_call_complete(self, function_args: Union[str, dict]) -> bool:
if isinstance(function_args, dict):
return True
@@ -465,8 +495,38 @@ class OllamaChatCompletionResponseIterator(BaseModelResponseIterator):
if is_function_call_complete:
tool_call["id"] = str(uuid.uuid4())
+ # PROCESS REASONING CONTENT
+ reasoning_content: Optional[str] = None
+ content: Optional[str] = None
+ if chunk["message"].get("thinking") is not None:
+ if self.started_reasoning_content is False:
+ reasoning_content = chunk["message"].get("thinking")
+ self.started_reasoning_content = True
+ elif self.finished_reasoning_content is False:
+ reasoning_content = chunk["message"].get("thinking")
+ self.finished_reasoning_content = True
+ elif chunk["message"].get("content") is not None:
+ message_content = chunk["message"].get("content")
+ if "" in message_content:
+ message_content = message_content.replace("", "")
+
+ self.started_reasoning_content = True
+
+ if "" in message_content and self.started_reasoning_content:
+ message_content = message_content.replace("", "")
+ self.finished_reasoning_content = True
+
+ if (
+ self.started_reasoning_content
+ and not self.finished_reasoning_content
+ ):
+ reasoning_content = message_content
+ else:
+ content = message_content
+
delta = Delta(
- content=chunk["message"].get("content", ""),
+ content=content,
+ reasoning_content=reasoning_content,
tool_calls=tool_calls,
)
diff --git a/litellm/llms/ollama/common_utils.py b/litellm/llms/ollama/common_utils.py
index daff7a12065..166ceee27fc 100644
--- a/litellm/llms/ollama/common_utils.py
+++ b/litellm/llms/ollama/common_utils.py
@@ -57,8 +57,20 @@ class OllamaModelInfo(BaseLLMModelInfo):
"""
@staticmethod
- def get_api_key(api_key=None) -> None:
- return None # Ollama does not use an API key by default
+ def get_api_key(api_key=None) -> Optional[str]:
+ """Get API key from environment variables or litellm configuration"""
+ import os
+
+ import litellm
+ from litellm.secret_managers.main import get_secret_str
+
+ return (
+ os.environ.get("OLLAMA_API_KEY")
+ or litellm.api_key
+ or litellm.openai_key
+ or get_secret_str("OLLAMA_API_KEY")
+ )
+
@staticmethod
def get_api_base(api_base: Optional[str] = None) -> str:
@@ -73,9 +85,12 @@ class OllamaModelInfo(BaseLLMModelInfo):
"""
base = self.get_api_base(api_base)
+ api_key = self.get_api_key()
+ headers = { "Authorization": f"Bearer {api_key}" } if api_key else {}
+
names: set[str] = set()
try:
- resp = httpx.get(f"{base}/api/tags")
+ resp = httpx.get(f"{base}/api/tags", headers=headers)
resp.raise_for_status()
data = resp.json()
# Expecting a dict with a 'models' list
diff --git a/litellm/llms/ollama/completion/transformation.py b/litellm/llms/ollama/completion/transformation.py
index 3565f090b04..71bcf0bb3f7 100644
--- a/litellm/llms/ollama/completion/transformation.py
+++ b/litellm/llms/ollama/completion/transformation.py
@@ -19,13 +19,13 @@ from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExcepti
from litellm.secret_managers.main import get_secret_str
from litellm.types.llms.openai import AllMessageValues, ChatCompletionUsageBlock
from litellm.types.utils import (
+ Delta,
GenericStreamingChunk,
ModelInfoBase,
ModelResponse,
ModelResponseStream,
ProviderField,
StreamingChoices,
- Delta,
)
from ..common_utils import OllamaError, _convert_image
@@ -92,9 +92,9 @@ class OllamaConfig(BaseConfig):
repeat_penalty: Optional[float] = None
temperature: Optional[float] = None
seed: Optional[int] = None
- stop: Optional[
- list
- ] = None # stop is a list based on this - https://github.com/ollama/ollama/pull/442
+ stop: Optional[list] = (
+ None # stop is a list based on this - https://github.com/ollama/ollama/pull/442
+ )
tfs_z: Optional[float] = None
num_predict: Optional[int] = None
top_k: Optional[int] = None
@@ -154,6 +154,7 @@ class OllamaConfig(BaseConfig):
"stop",
"response_format",
"max_completion_tokens",
+ "reasoning_effort",
]
def map_openai_params(
@@ -166,19 +167,21 @@ class OllamaConfig(BaseConfig):
for param, value in non_default_params.items():
if param == "max_tokens" or param == "max_completion_tokens":
optional_params["num_predict"] = value
- if param == "stream":
+ elif param == "stream":
optional_params["stream"] = value
- if param == "temperature":
+ elif param == "temperature":
optional_params["temperature"] = value
- if param == "seed":
+ elif param == "seed":
optional_params["seed"] = value
- if param == "top_p":
+ elif param == "top_p":
optional_params["top_p"] = value
- if param == "frequency_penalty":
+ elif param == "frequency_penalty":
optional_params["frequency_penalty"] = value
- if param == "stop":
+ elif param == "stop":
optional_params["stop"] = value
- if param == "response_format" and isinstance(value, dict):
+ elif param == "reasoning_effort" and value is not None:
+ optional_params["think"] = True
+ elif param == "response_format" and isinstance(value, dict):
if value["type"] == "json_object":
optional_params["format"] = "json"
elif value["type"] == "json_schema":
@@ -201,6 +204,21 @@ class OllamaConfig(BaseConfig):
return v
return None
+ @staticmethod
+ def get_api_key() -> Optional[str]:
+ """Get API key from environment variables or litellm configuration"""
+ import os
+
+ import litellm
+ from litellm.secret_managers.main import get_secret_str
+
+ return (
+ os.environ.get("OLLAMA_API_KEY")
+ or litellm.api_key
+ or litellm.openai_key
+ or get_secret_str("OLLAMA_API_KEY")
+ )
+
def get_model_info(self, model: str) -> ModelInfoBase:
"""
curl http://localhost:11434/api/show -d '{
@@ -210,11 +228,14 @@ class OllamaConfig(BaseConfig):
if model.startswith("ollama/") or model.startswith("ollama_chat/"):
model = model.split("/", 1)[1]
api_base = get_secret_str("OLLAMA_API_BASE") or "http://localhost:11434"
+ api_key = self.get_api_key()
+ headers = { "Authorization": f"Bearer {api_key}" } if api_key else {}
try:
response = litellm.module_level_client.post(
url=f"{api_base}/api/show",
json={"name": model},
+ headers=headers,
)
except Exception as e:
raise Exception(
@@ -258,44 +279,82 @@ class OllamaConfig(BaseConfig):
api_key: Optional[str] = None,
json_mode: Optional[bool] = None,
) -> ModelResponse:
+ from litellm.litellm_core_utils.llm_response_utils.convert_dict_to_response import (
+ _parse_content_for_reasoning,
+ )
+
response_json = raw_response.json()
## RESPONSE OBJECT
model_response.choices[0].finish_reason = "stop"
if request_data.get("format", "") == "json":
- response_content = json.loads(response_json["response"])
+ # Check if response field exists and is not empty before parsing JSON
+ response_text = response_json.get("response", "")
- # Check if this is a function call format with name/arguments structure
- if (
- isinstance(response_content, dict)
- and "name" in response_content
- and "arguments" in response_content
- ):
- # Handle as function call (original behavior)
- function_call = response_content
- message = litellm.Message(
- content=None,
- tool_calls=[
- {
- "id": f"call_{str(uuid.uuid4())}",
- "function": {
- "name": function_call["name"],
- "arguments": json.dumps(function_call["arguments"]),
- },
- "type": "function",
- }
- ],
- )
- model_response.choices[0].message = message # type: ignore
- model_response.choices[0].finish_reason = "tool_calls"
- else:
- # Handle as regular JSON (new behavior)
- message = litellm.Message(
- content=json.dumps(response_content),
- )
+ if not response_text or not response_text.strip():
+ # Handle empty response gracefully - set empty content
+ message = litellm.Message(content="")
model_response.choices[0].message = message # type: ignore
model_response.choices[0].finish_reason = "stop"
+ else:
+ try:
+ response_content = json.loads(response_text)
+
+ # Check if this is a function call format with name/arguments structure
+ if (
+ isinstance(response_content, dict)
+ and "name" in response_content
+ and "arguments" in response_content
+ ):
+ # Handle as function call (original behavior)
+ function_call = response_content
+ message = litellm.Message(
+ content=None,
+ tool_calls=[
+ {
+ "id": f"call_{str(uuid.uuid4())}",
+ "function": {
+ "name": function_call["name"],
+ "arguments": json.dumps(
+ function_call["arguments"]
+ ),
+ },
+ "type": "function",
+ }
+ ],
+ )
+ model_response.choices[0].message = message # type: ignore
+ model_response.choices[0].finish_reason = "tool_calls"
+ else:
+ # Handle as regular JSON (new behavior)
+ message = litellm.Message(
+ content=json.dumps(response_content),
+ )
+ model_response.choices[0].message = message # type: ignore
+ model_response.choices[0].finish_reason = "stop"
+ except json.JSONDecodeError:
+ # If JSON parsing fails, treat as regular text response
+ ## output parse reasoning content from response_text
+ reasoning_content: Optional[str] = None
+ content: Optional[str] = None
+ if response_text is not None:
+ reasoning_content, content = _parse_content_for_reasoning(
+ response_text
+ )
+ message = litellm.Message(
+ content=content, reasoning_content=reasoning_content
+ )
+ model_response.choices[0].message = message # type: ignore
+ model_response.choices[0].finish_reason = "stop"
else:
- model_response.choices[0].message.content = response_json["response"] # type: ignore
+ response_text = response_json.get("response", "")
+ content = None
+ reasoning_content = None
+ if response_text is not None and isinstance(response_text, str):
+ reasoning_content, content = _parse_content_for_reasoning(response_text)
+ else:
+ content = response_text # type: ignore
+ model_response.choices[0].message.content = content # type: ignore
+ model_response.choices[0].message.reasoning_content = reasoning_content # type: ignore
model_response.created = int(time.time())
model_response.model = "ollama/" + model
_prompt = request_data.get("prompt", "")
@@ -420,12 +479,21 @@ class OllamaConfig(BaseConfig):
class OllamaTextCompletionResponseIterator(BaseModelResponseIterator):
+ def __init__(
+ self, streaming_response, sync_stream: bool, json_mode: Optional[bool] = False
+ ):
+ super().__init__(streaming_response, sync_stream, json_mode)
+ self.started_reasoning_content: bool = False
+ self.finished_reasoning_content: bool = False
+
def _handle_string_chunk(
self, str_line: str
) -> Union[GenericStreamingChunk, ModelResponseStream]:
return self.chunk_parser(json.loads(str_line))
- def chunk_parser(self, chunk: dict) -> Union[GenericStreamingChunk, ModelResponseStream]:
+ def chunk_parser(
+ self, chunk: dict
+ ) -> Union[GenericStreamingChunk, ModelResponseStream]:
try:
if "error" in chunk:
raise Exception(f"Ollama Error - {chunk}")
@@ -455,12 +523,42 @@ class OllamaTextCompletionResponseIterator(BaseModelResponseIterator):
)
elif chunk["response"]:
text = chunk["response"]
- return GenericStreamingChunk(
- text=text,
- is_finished=is_finished,
- finish_reason="stop",
+ reasoning_content: Optional[str] = None
+ content: Optional[str] = None
+ if text is not None:
+ if "" in text:
+ text = text.replace("", "")
+ self.started_reasoning_content = True
+ elif "" in text:
+ text = text.replace("", "")
+ self.finished_reasoning_content = True
+
+ if (
+ self.started_reasoning_content
+ and not self.finished_reasoning_content
+ ):
+ reasoning_content = text
+ else:
+ content = text
+
+ return ModelResponseStream(
+ choices=[
+ StreamingChoices(
+ index=0,
+ delta=Delta(
+ reasoning_content=reasoning_content, content=content
+ ),
+ )
+ ],
+ finish_reason=finish_reason,
usage=None,
)
+ # return GenericStreamingChunk(
+ # text=text,
+ # is_finished=is_finished,
+ # finish_reason="stop",
+ # usage=None,
+ # )
elif "thinking" in chunk and not chunk["response"]:
# Return reasoning content as ModelResponseStream so UIs can render it
thinking_content = chunk.get("thinking") or ""
diff --git a/litellm/llms/openai/chat/gpt_5_transformation.py b/litellm/llms/openai/chat/gpt_5_transformation.py
index 9a8bb74d447..3902304a3b4 100644
--- a/litellm/llms/openai/chat/gpt_5_transformation.py
+++ b/litellm/llms/openai/chat/gpt_5_transformation.py
@@ -28,7 +28,18 @@ class OpenAIGPT5Config(OpenAIGPTConfig):
base_gpt_series_params.extend(gpt_5_only_params)
if not supports_tool_choice(model=model):
base_gpt_series_params.remove("tool_choice")
- return base_gpt_series_params
+
+ non_supported_params = [
+ "logprobs",
+ "top_p",
+ "presence_penalty",
+ "frequency_penalty",
+ "top_logprobs",
+ ]
+
+ return [
+ param for param in base_gpt_series_params if param not in non_supported_params
+ ]
def map_openai_params(
self,
diff --git a/litellm/llms/openai/chat/gpt_transformation.py b/litellm/llms/openai/chat/gpt_transformation.py
index f043ef40521..204916e3a48 100644
--- a/litellm/llms/openai/chat/gpt_transformation.py
+++ b/litellm/llms/openai/chat/gpt_transformation.py
@@ -158,6 +158,7 @@ class OpenAIGPTConfig(BaseLLMModelInfo, BaseConfig):
"parallel_tool_calls",
"audio",
"web_search_options",
+ "safety_identifier",
] # works across all models
model_specific_params = []
@@ -348,6 +349,7 @@ class OpenAIGPTConfig(BaseLLMModelInfo, BaseConfig):
for message in messages:
message_content = message.get("content")
message_role = message.get("role")
+
if (
message_role == "user"
and message_content
diff --git a/litellm/llms/openai/image_edit/transformation.py b/litellm/llms/openai/image_edit/transformation.py
index c8a1e8f0e1c..be1aeb1b8a4 100644
--- a/litellm/llms/openai/image_edit/transformation.py
+++ b/litellm/llms/openai/image_edit/transformation.py
@@ -80,24 +80,49 @@ class OpenAIImageEditConfig(BaseImageEditConfig):
request_dict = cast(Dict, request)
#########################################################
- # Separate images as `files` and send other parameters as `data`
+ # Separate images and masks as `files` and send other parameters as `data`
#########################################################
- _images = request_dict.get("image") or []
- data_without_images = {k: v for k, v in request_dict.items() if k != "image"}
+ _image = request_dict.get("image")
+ _mask = request_dict.get("mask")
+ data_without_files = {
+ k: v for k, v in request_dict.items() if k not in ["image", "mask"]
+ }
files_list: List[Tuple[str, Any]] = []
- for _image in _images:
- image_content_type: str = ImageEditRequestUtils.get_image_content_type(
- _image
- )
- if isinstance(_image, BufferedReader):
- files_list.append(
- ("image[]", (_image.name, _image, image_content_type))
+
+ # Handle image parameter
+ if _image is not None:
+ # Handle case where image can be a list (extract first image)
+ if isinstance(_image, list):
+ _image = _image[0] if _image else None
+
+ if _image is not None:
+ image_content_type: str = ImageEditRequestUtils.get_image_content_type(
+ _image
)
- else:
- files_list.append(
- ("image[]", ("image.png", _image, image_content_type))
+ if isinstance(_image, BufferedReader):
+ files_list.append(
+ ("image", (_image.name, _image, image_content_type))
+ )
+ else:
+ files_list.append(
+ ("image", ("image.png", _image, image_content_type))
+ )
+
+ # Handle mask parameter if provided
+ if _mask is not None:
+ # Handle case where mask can be a list (extract first mask)
+ if isinstance(_mask, list):
+ _mask = _mask[0] if _mask else None
+
+ if _mask is not None:
+ mask_content_type: str = ImageEditRequestUtils.get_image_content_type(
+ _mask
)
- return data_without_images, files_list
+ if isinstance(_mask, BufferedReader):
+ files_list.append(("mask", (_mask.name, _mask, mask_content_type)))
+ else:
+ files_list.append(("mask", ("mask.png", _mask, mask_content_type)))
+ return data_without_files, files_list
def transform_image_edit_response(
self,
diff --git a/litellm/llms/openai/image_generation/gpt_transformation.py b/litellm/llms/openai/image_generation/gpt_transformation.py
index 150cffba21c..1cee13784e7 100644
--- a/litellm/llms/openai/image_generation/gpt_transformation.py
+++ b/litellm/llms/openai/image_generation/gpt_transformation.py
@@ -16,7 +16,6 @@ class GPTImageGenerationConfig(BaseImageGenerationConfig):
) -> List[OpenAIImageGenerationOptionalParams]:
return [
"background",
- "input_fidelity",
"moderation",
"n",
"output_compression",
diff --git a/litellm/llms/openai/responses/transformation.py b/litellm/llms/openai/responses/transformation.py
index 501941fdc59..392d47f9822 100644
--- a/litellm/llms/openai/responses/transformation.py
+++ b/litellm/llms/openai/responses/transformation.py
@@ -1,6 +1,15 @@
-from typing import TYPE_CHECKING, Any, Dict, Optional, Union, cast
+from typing import (
+ TYPE_CHECKING,
+ Any,
+ Dict,
+ Optional,
+ Union,
+ cast,
+ get_type_hints,
+)
import httpx
+from openai.types.responses import ResponseReasoningItem
from pydantic import BaseModel
import litellm
@@ -13,6 +22,7 @@ from litellm.secret_managers.main import get_secret_str
from litellm.types.llms.openai import *
from litellm.types.responses.main import *
from litellm.types.router import GenericLiteLLMParams
+from litellm.types.utils import LlmProviders
from ..common_utils import OpenAIError
@@ -25,38 +35,28 @@ else:
class OpenAIResponsesAPIConfig(BaseResponsesAPIConfig):
+ @property
+ def custom_llm_provider(self) -> LlmProviders:
+ return LlmProviders.OPENAI
+
def get_supported_openai_params(self, model: str) -> list:
"""
All OpenAI Responses API params are supported
"""
- return [
- "input",
- "model",
- "include",
- "instructions",
- "max_output_tokens",
- "metadata",
- "parallel_tool_calls",
- "previous_response_id",
- "reasoning",
- "store",
- "background",
- "stream",
- "prompt",
- "temperature",
- "text",
- "tool_choice",
- "tools",
- "top_p",
- "truncation",
- "user",
- "service_tier",
- "safety_identifier",
- "extra_headers",
- "extra_query",
- "extra_body",
- "timeout",
- ]
+ supported_params = get_type_hints(ResponsesAPIRequestParams).keys()
+ return list(
+ set(
+ [
+ "input",
+ "model",
+ "extra_headers",
+ "extra_query",
+ "extra_body",
+ "timeout",
+ ]
+ + list(supported_params)
+ )
+ )
def map_openai_params(
self,
@@ -85,8 +85,10 @@ class OpenAIResponsesAPIConfig(BaseResponsesAPIConfig):
)
return final_request_params
-
- def _validate_input_param(self, input: Union[str, ResponseInputParam]) -> Union[str, ResponseInputParam]:
+
+ def _validate_input_param(
+ self, input: Union[str, ResponseInputParam]
+ ) -> Union[str, ResponseInputParam]:
"""
Ensure all input fields if pydantic are converted to dict
@@ -99,12 +101,67 @@ class OpenAIResponsesAPIConfig(BaseResponsesAPIConfig):
# if it's pydantic, convert to dict
if isinstance(item, BaseModel):
validated_input.append(item.model_dump(exclude_none=True))
+ elif isinstance(item, dict):
+ # Handle reasoning items specifically to filter out status=None
+ verbose_logger.debug(f"Handling reasoning item: {item}")
+ if item.get("type") == "reasoning":
+ # Type assertion since we know it's a dict at this point
+ dict_item = cast(Dict[str, Any], item)
+ filtered_item = self._handle_reasoning_item(dict_item)
+ else:
+ # For other dict items, just pass through
+ filtered_item = cast(Dict[str, Any], item)
+ validated_input.append(filtered_item)
else:
validated_input.append(item)
- return validated_input
+ return validated_input # type: ignore
# Input is expected to be either str or List, no single BaseModel expected
return input
+ def _handle_reasoning_item(self, item: Dict[str, Any]) -> Dict[str, Any]:
+ """
+ Handle reasoning items specifically to filter out status=None using OpenAI's model.
+ Issue: https://github.com/BerriAI/litellm/issues/13484
+ OpenAI API does not accept ReasoningItem(status=None), so we need to:
+ 1. Check if the item is a reasoning type
+ 2. Create a ResponseReasoningItem object with the item data
+ 3. Convert it back to dict with exclude_none=True to filter None values
+ """
+ verbose_logger.debug(f"Handling reasoning item: {item}")
+ if item.get("type") == "reasoning":
+ try:
+ # Ensure required fields are present for ResponseReasoningItem
+ item_data = dict(item)
+ if "id" not in item_data:
+ item_data["id"] = f"reasoning_{hash(str(item_data))}"
+ if "summary" not in item_data:
+ item_data["summary"] = (
+ item_data.get("reasoning_content", "")[:100] + "..."
+ if len(item_data.get("reasoning_content", "")) > 100
+ else item_data.get("reasoning_content", "")
+ )
+
+ # Create ResponseReasoningItem object from the item data
+ reasoning_item = ResponseReasoningItem(**item_data)
+
+ # Convert back to dict with exclude_none=True to exclude None fields
+ dict_reasoning_item = reasoning_item.model_dump(exclude_none=True)
+
+ return dict_reasoning_item
+ except Exception as e:
+ verbose_logger.debug(
+ f"Failed to create ResponseReasoningItem, falling back to manual filtering: {e}"
+ )
+ # Fallback: manually filter out known None fields
+ filtered_item = {
+ k: v
+ for k, v in item.items()
+ if v is not None
+ or k not in {"status", "content", "encrypted_content"}
+ }
+ return filtered_item
+ return item
+
def transform_response_api_response(
self,
model: str,
@@ -114,7 +171,9 @@ class OpenAIResponsesAPIConfig(BaseResponsesAPIConfig):
"""No transform applied since outputs are in OpenAI spec already"""
try:
raw_response_json = raw_response.json()
- raw_response_json["created_at"] = _safe_convert_created_field(raw_response_json["created_at"])
+ raw_response_json["created_at"] = _safe_convert_created_field(
+ raw_response_json["created_at"]
+ )
except Exception:
raise OpenAIError(
message=raw_response.text, status_code=raw_response.status_code
diff --git a/litellm/llms/openai_like/chat/handler.py b/litellm/llms/openai_like/chat/handler.py
index ae0a3cc3551..821fc9b7f15 100644
--- a/litellm/llms/openai_like/chat/handler.py
+++ b/litellm/llms/openai_like/chat/handler.py
@@ -49,15 +49,8 @@ async def make_call(
model_response = ModelResponse(**response.json())
completion_stream = MockResponseIterator(model_response=model_response)
else:
- # Use aiter_text with explicit UTF-8 encoding to avoid ASCII encoding errors
- async def utf8_aiter_lines():
- async for line in response.aiter_text(encoding='utf-8'):
- for line_part in line.splitlines(keepends=True):
- if line_part.strip():
- yield line_part.rstrip('\r\n')
-
completion_stream = ModelResponseIterator(
- streaming_response=utf8_aiter_lines(), sync_stream=False
+ streaming_response=response.aiter_lines(), sync_stream=False
)
# LOGGING
logging_obj.post_call(
@@ -100,15 +93,8 @@ def make_sync_call(
model_response = ModelResponse(**response.json())
completion_stream = MockResponseIterator(model_response=model_response)
else:
- # Use iter_text with explicit UTF-8 encoding to avoid ASCII encoding errors
- def utf8_iter_lines():
- for line in response.iter_text(encoding='utf-8'):
- for line_part in line.splitlines(keepends=True):
- if line_part.strip():
- yield line_part.rstrip('\r\n')
-
completion_stream = ModelResponseIterator(
- streaming_response=utf8_iter_lines(), sync_stream=True
+ streaming_response=response.iter_lines(), sync_stream=True
)
# LOGGING
diff --git a/litellm/llms/vercel_ai_gateway/chat/transformation.py b/litellm/llms/vercel_ai_gateway/chat/transformation.py
new file mode 100644
index 00000000000..13a88377489
--- /dev/null
+++ b/litellm/llms/vercel_ai_gateway/chat/transformation.py
@@ -0,0 +1,112 @@
+"""
+Support for OpenAI's `/v1/chat/completions` endpoint.
+
+Calls done in OpenAI/openai.py as Vercel AI Gateway is openai-compatible.
+
+Docs: https://vercel.com/docs/ai-gateway
+"""
+
+from typing import List, Optional, Tuple, Union
+
+import httpx
+
+from litellm.llms.base_llm.chat.transformation import BaseLLMException
+from litellm.types.llms.openai import AllMessageValues
+from litellm.secret_managers.main import get_secret_str
+import litellm
+
+from ...openai.chat.gpt_transformation import OpenAIGPTConfig
+from ..common_utils import VercelAIGatewayException
+
+
+class VercelAIGatewayConfig(OpenAIGPTConfig):
+ @property
+ def custom_llm_provider(self) -> Optional[str]:
+ return "vercel_ai_gateway"
+
+ def get_supported_openai_params(self, model: str) -> list:
+ base_params = super().get_supported_openai_params(model)
+ if "extra_body" not in base_params:
+ base_params.append("extra_body")
+ return base_params
+
+ def _get_openai_compatible_provider_info(
+ self, api_base: Optional[str], api_key: Optional[str]
+ ) -> Tuple[Optional[str], Optional[str]]:
+
+ api_base = (
+ api_base
+ or get_secret_str("VERCEL_AI_GATEWAY_API_BASE")
+ or "https://ai-gateway.vercel.sh/v1"
+ )
+ user_api_key = (
+ api_key
+ or get_secret_str("VERCEL_AI_GATEWAY_API_KEY")
+ or get_secret_str("VERCEL_OIDC_TOKEN")
+ )
+ return api_base, user_api_key
+
+ def map_openai_params(
+ self,
+ non_default_params: dict,
+ optional_params: dict,
+ model: str,
+ drop_params: bool,
+ ) -> dict:
+ mapped_openai_params = super().map_openai_params(
+ non_default_params, optional_params, model, drop_params
+ )
+
+ # Vercel AI Gateway-only parameters
+ extra_body = {}
+ provider_options = non_default_params.pop("providerOptions", None)
+
+ if provider_options is not None:
+ extra_body["providerOptions"] = provider_options
+
+ mapped_openai_params["extra_body"] = extra_body # openai client supports `extra_body` param
+ return mapped_openai_params
+
+ def transform_request(
+ self,
+ model: str,
+ messages: List[AllMessageValues],
+ optional_params: dict,
+ litellm_params: dict,
+ headers: dict,
+ ) -> dict:
+ """
+ Transform the overall request to be sent to the API.
+
+ Returns:
+ dict: The transformed request. Sent as the body of the API call.
+ """
+ return super().transform_request(
+ model, messages, optional_params, litellm_params, headers
+ )
+
+ def get_error_class(
+ self, error_message: str, status_code: int, headers: Union[dict, httpx.Headers]
+ ) -> BaseLLMException:
+ return VercelAIGatewayException(
+ message=error_message,
+ status_code=status_code,
+ headers=headers,
+ )
+
+ def get_models(
+ self, api_key: Optional[str] = None, api_base: Optional[str] = None
+ ) -> List[str]:
+ api_base, _ = self._get_openai_compatible_provider_info(api_base, api_key)
+
+ if api_base is None:
+ api_base = "https://ai-gateway.vercel.sh/v1"
+
+ models_url = f"{api_base}/models"
+ response = litellm.module_level_client.get(url=models_url)
+
+ if response.status_code != 200:
+ raise Exception(f"Failed to get models: {response.text}")
+
+ models = response.json()["data"]
+ return [model["id"] for model in models]
diff --git a/litellm/llms/vercel_ai_gateway/common_utils.py b/litellm/llms/vercel_ai_gateway/common_utils.py
new file mode 100644
index 00000000000..93e792be05e
--- /dev/null
+++ b/litellm/llms/vercel_ai_gateway/common_utils.py
@@ -0,0 +1,5 @@
+from litellm.llms.base_llm.chat.transformation import BaseLLMException
+
+
+class VercelAIGatewayException(BaseLLMException):
+ pass
diff --git a/litellm/llms/vertex_ai/common_utils.py b/litellm/llms/vertex_ai/common_utils.py
index 4931631d75d..8588c3efa27 100644
--- a/litellm/llms/vertex_ai/common_utils.py
+++ b/litellm/llms/vertex_ai/common_utils.py
@@ -187,6 +187,25 @@ def _check_text_in_content(parts: List[PartType]) -> bool:
return has_text_param
+def _fix_enum_empty_strings(schema, depth=0):
+ """Fix empty strings in enum values by replacing them with None. Gemini doesn't accept empty strings in enums."""
+ if depth > DEFAULT_MAX_RECURSE_DEPTH:
+ raise ValueError(f"Max depth of {DEFAULT_MAX_RECURSE_DEPTH} exceeded while processing schema.")
+
+ if "enum" in schema and isinstance(schema["enum"], list):
+ schema["enum"] = [None if value == "" else value for value in schema["enum"]]
+
+ # Reuse existing recursion pattern from convert_anyof_null_to_nullable
+ properties = schema.get("properties", None)
+ if properties is not None:
+ for _, value in properties.items():
+ _fix_enum_empty_strings(value, depth=depth + 1)
+
+ items = schema.get("items", None)
+ if items is not None:
+ _fix_enum_empty_strings(items, depth=depth + 1)
+
+
def _build_vertex_schema(parameters: dict, add_property_ordering: bool = False):
"""
This is a modified version of https://github.com/google-gemini/generative-ai-python/blob/8f77cc6ac99937cd3a81299ecf79608b91b06bbb/google/generativeai/types/content_types.py#L419
@@ -215,6 +234,11 @@ def _build_vertex_schema(parameters: dict, add_property_ordering: bool = False):
# * https://github.com/pydantic/pydantic/discussions/4872
convert_anyof_null_to_nullable(parameters)
+ _convert_schema_types(parameters)
+
+ # Handle empty strings in enum values - Gemini doesn't accept empty strings in enums
+ _fix_enum_empty_strings(parameters)
+
# Handle empty items objects
process_items(parameters)
add_object_type(parameters)
@@ -254,9 +278,7 @@ def _filter_anyof_fields(schema_dict: Dict[str, Any]) -> Dict[str, Any]:
item["title"] = title
if description:
item["description"] = description
- return {"anyOf": any_of}
- else:
- return schema_dict
+ return {"anyOf": any_of}
return schema_dict
@@ -441,6 +463,47 @@ def _convert_vertex_datetime_to_openai_datetime(vertex_datetime: str) -> int:
return int(dt.timestamp())
+def _convert_schema_types(schema, depth=0):
+ """
+ Convert type arrays and lowercase types for Vertex AI compatibility.
+
+ Transforms OpenAI-style schemas to Vertex AI format by converting type arrays
+ like ["string", "number"] to anyOf format and converting all types to uppercase.
+ """
+ if depth > DEFAULT_MAX_RECURSE_DEPTH:
+ raise ValueError(
+ f"Max depth of {DEFAULT_MAX_RECURSE_DEPTH} exceeded while processing schema. Please check the schema for excessive nesting."
+ )
+
+ if not isinstance(schema, dict):
+ return
+
+
+ # Handle type field
+ if "type" in schema:
+ type_val = schema["type"]
+ if isinstance(type_val, list) and len(type_val) > 1:
+ # Convert ["string", "number"] -> {"anyOf": [{"type": "STRING"}, {"type": "NUMBER"}]}
+ schema["anyOf"] = [{"type": t} for t in type_val if isinstance(t, str)]
+ schema.pop("type")
+ elif isinstance(type_val, list) and len(type_val) == 1:
+ schema["type"] = type_val[0]
+ elif isinstance(type_val, str):
+ schema["type"] = type_val
+
+ # Recursively process nested properties, items, and anyOf
+ for key in ["properties", "items", "anyOf"]:
+ if key in schema:
+ value = schema[key]
+ if key == "properties" and isinstance(value, dict):
+ for prop_schema in value.values():
+ _convert_schema_types(prop_schema, depth + 1)
+ elif key == "items":
+ _convert_schema_types(value, depth + 1)
+ elif key == "anyOf" and isinstance(value, list):
+ for anyof_schema in value:
+ _convert_schema_types(anyof_schema, depth + 1)
+
def get_vertex_project_id_from_url(url: str) -> Optional[str]:
"""
Get the vertex project id from the url
diff --git a/litellm/llms/vertex_ai/gemini/transformation.py b/litellm/llms/vertex_ai/gemini/transformation.py
index 85e3f15364b..327b269d1d4 100644
--- a/litellm/llms/vertex_ai/gemini/transformation.py
+++ b/litellm/llms/vertex_ai/gemini/transformation.py
@@ -35,6 +35,7 @@ from litellm.types.llms.openai import (
ChatCompletionFileObject,
ChatCompletionImageObject,
ChatCompletionTextObject,
+ ChatCompletionUserMessage,
)
from litellm.types.llms.vertex_ai import *
from litellm.types.llms.vertex_ai import (
@@ -104,6 +105,64 @@ def _process_gemini_image(image_url: str, format: Optional[str] = None) -> PartT
raise e
+def _snake_to_camel(snake_str: str) -> str:
+ """Convert snake_case to camelCase"""
+ components = snake_str.split("_")
+ return components[0] + "".join(x.capitalize() for x in components[1:])
+
+
+def _camel_to_snake(camel_str: str) -> str:
+ """Convert camelCase to snake_case"""
+ import re
+
+ return re.sub(r"(? Optional[str]:
+ """
+ Get the equivalent key from available keys, checking both camelCase and snake_case variants
+ """
+ if key in available_keys:
+ return key
+
+ # Try camelCase version
+ camel_key = _snake_to_camel(key)
+ if camel_key in available_keys:
+ return camel_key
+
+ # Try snake_case version
+ snake_key = _camel_to_snake(key)
+ if snake_key in available_keys:
+ return snake_key
+
+ return None
+
+
+def check_if_part_exists_in_parts(
+ parts: List[PartType], part: PartType, excluded_keys: List[str] = []
+) -> bool:
+ """
+ Check if a part exists in a list of parts
+ Handles both camelCase and snake_case key variations (e.g., function_call vs functionCall)
+ """
+ keys_to_compare = set(part.keys()) - set(excluded_keys)
+ for p in parts:
+ p_keys = set(p.keys())
+ # Check if all keys in part have equivalent values in p
+ match_found = True
+ for key in keys_to_compare:
+ equivalent_key = _get_equivalent_key(key, p_keys)
+ if equivalent_key is None or p.get(equivalent_key, None) != part.get(
+ key, None
+ ):
+ match_found = False
+ break
+
+ if match_found:
+ return True
+ return False
+
+
def _gemini_convert_messages_with_history( # noqa: PLR0915
messages: List[AllMessageValues],
) -> List[ContentType]:
@@ -235,10 +294,33 @@ def _gemini_convert_messages_with_history( # noqa: PLR0915
assistant_msg = ChatCompletionAssistantMessage(**msg_dict) # type: ignore
_message_content = assistant_msg.get("content", None)
reasoning_content = assistant_msg.get("reasoning_content", None)
+ thinking_blocks = assistant_msg.get("thinking_blocks")
if reasoning_content is not None:
assistant_content.append(
PartType(thought=True, text=reasoning_content)
)
+ if thinking_blocks is not None:
+ for block in thinking_blocks:
+ block_thinking_str = block.get("thinking")
+ block_signature = block.get("signature")
+ if (
+ block_thinking_str is not None
+ and block_signature is not None
+ ):
+ try:
+ assistant_content.append(
+ PartType(
+ thoughtSignature=block_signature,
+ **json.loads(block_thinking_str),
+ )
+ )
+ except Exception:
+ assistant_content.append(
+ PartType(
+ thoughtSignature=block_signature,
+ text=block_thinking_str,
+ )
+ )
if _message_content is not None and isinstance(_message_content, list):
_parts = []
for element in _message_content:
@@ -261,9 +343,17 @@ def _gemini_convert_messages_with_history( # noqa: PLR0915
assistant_msg.get("tool_calls", []) is not None
or assistant_msg.get("function_call") is not None
): # support assistant tool invoke conversion
- assistant_content.extend(
- convert_to_gemini_tool_call_invoke(assistant_msg)
+ gemini_tool_call_parts = convert_to_gemini_tool_call_invoke(
+ assistant_msg
)
+ ## check if gemini_tool_call already exists in assistant_content
+ for gemini_tool_call_part in gemini_tool_call_parts:
+ if not check_if_part_exists_in_parts(
+ assistant_content,
+ gemini_tool_call_part,
+ excluded_keys=["thoughtSignature"],
+ ):
+ assistant_content.append(gemini_tool_call_part)
last_message_with_tool_calls = assistant_msg
msg_i += 1
@@ -297,6 +387,19 @@ def _gemini_convert_messages_with_history( # noqa: PLR0915
)
if len(tool_call_responses) > 0:
contents.append(ContentType(parts=tool_call_responses))
+
+ if len(contents) == 0:
+ verbose_logger.warning(
+ """
+ No contents in messages. Contents are required. See
+ https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.publishers.models/generateContent#request-body.
+ If the original request did not comply to OpenAI API requirements it should have failed by now,
+ but LiteLLM does not check for missing messages.
+ Setting an empty content to prevent an 400 error.
+ Relevant Issue - https://github.com/BerriAI/litellm/issues/9733
+ """
+ )
+ contents.append(ContentType(role="user", parts=[PartType(text=" ")]))
return contents
except Exception as e:
raise e
@@ -358,6 +461,17 @@ def _transform_request_body(
) # type: ignore
config_fields = GenerationConfig.__annotations__.keys()
+ # If the LiteLLM client sends Gemini-supported parameter "labels", add it
+ # as "labels" field to the request sent to the Gemini backend.
+ labels: Optional[dict[str, str]] = optional_params.pop("labels", None)
+ # If the LiteLLM client sends OpenAI-supported parameter "metadata", add it
+ # as "labels" field to the request sent to the Gemini backend.
+ if labels is None and "metadata" in litellm_params:
+ metadata = litellm_params["metadata"]
+ if metadata is not None and "requester_metadata" in metadata:
+ rm = metadata["requester_metadata"]
+ labels = {k: v for k, v in rm.items() if isinstance(v, str)}
+
filtered_params = {
k: v for k, v in optional_params.items() if k in config_fields
}
@@ -378,6 +492,8 @@ def _transform_request_body(
data["generationConfig"] = generation_config
if cached_content is not None:
data["cachedContent"] = cached_content
+ if labels is not None:
+ data["labels"] = labels
except Exception as e:
raise e
@@ -402,19 +518,21 @@ def sync_transform_request_body(
context_caching_endpoints = ContextCachingEndpoints()
if gemini_api_key is not None:
- messages, optional_params, cached_content = (
- context_caching_endpoints.check_and_create_cache(
- messages=messages,
- optional_params=optional_params,
- api_key=gemini_api_key,
- api_base=api_base,
- model=model,
- client=client,
- timeout=timeout,
- extra_headers=extra_headers,
- cached_content=optional_params.pop("cached_content", None),
- logging_obj=logging_obj,
- )
+ (
+ messages,
+ optional_params,
+ cached_content,
+ ) = context_caching_endpoints.check_and_create_cache(
+ messages=messages,
+ optional_params=optional_params,
+ api_key=gemini_api_key,
+ api_base=api_base,
+ model=model,
+ client=client,
+ timeout=timeout,
+ extra_headers=extra_headers,
+ cached_content=optional_params.pop("cached_content", None),
+ logging_obj=logging_obj,
)
else: # [TODO] implement context caching for gemini as well
cached_content = optional_params.pop("cached_content", None)
@@ -476,6 +594,15 @@ async def async_transform_request_body(
)
+def _default_user_message_when_system_message_passed() -> ChatCompletionUserMessage:
+ """
+ Returns a default user message when a "system" message is passed in gemini fails.
+
+ This adds a blank user message to the messages list, to ensure that gemini doesn't fail the request.
+ """
+ return ChatCompletionUserMessage(content=".", role="user")
+
+
def _transform_system_message(
supports_system_message: bool, messages: List[AllMessageValues]
) -> Tuple[Optional[SystemInstructions], List[AllMessageValues]]:
@@ -510,6 +637,13 @@ def _transform_system_message(
messages.pop(idx)
if len(system_content_blocks) > 0:
+ #########################################################
+ # If no messages are passed in, add a blank user message
+ # Relevant Issue - https://github.com/BerriAI/litellm/issues/13769
+ #########################################################
+ if len(messages) == 0:
+ messages.append(_default_user_message_when_system_message_passed())
+ #########################################################
return SystemInstructions(parts=system_content_blocks), messages
return None, messages
diff --git a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py
index c5c4f46c92f..9376b28cbec 100644
--- a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py
+++ b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py
@@ -30,6 +30,10 @@ from litellm.constants import (
DEFAULT_REASONING_EFFORT_HIGH_THINKING_BUDGET,
DEFAULT_REASONING_EFFORT_LOW_THINKING_BUDGET,
DEFAULT_REASONING_EFFORT_MEDIUM_THINKING_BUDGET,
+ DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET,
+ DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_FLASH,
+ DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_PRO,
+ DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_FLASH_LITE,
)
from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMException
from litellm.llms.custom_httpx.http_handler import (
@@ -43,9 +47,12 @@ from litellm.types.llms.gemini import BidiGenerateContentServerMessage
from litellm.types.llms.openai import (
AllMessageValues,
ChatCompletionResponseMessage,
+ ChatCompletionThinkingBlock,
ChatCompletionToolCallChunk,
ChatCompletionToolCallFunctionChunk,
ChatCompletionToolParamFunctionChunk,
+ ImageURLListItem,
+ ImageURLObject,
OpenAIChatCompletionFinishReason,
)
from litellm.types.llms.vertex_ai import (
@@ -89,11 +96,12 @@ from .transformation import (
if TYPE_CHECKING:
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
- from litellm.types.utils import ModelResponseStream
+ from litellm.types.utils import ModelResponseStream, StreamingChoices
LoggingClass = LiteLLMLoggingObj
else:
LoggingClass = Any
+ StreamingChoices = Any
class VertexAIBaseConfig:
@@ -419,8 +427,25 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
@staticmethod
def _map_reasoning_effort_to_thinking_budget(
reasoning_effort: str,
+ model: Optional[str] = None,
) -> GeminiThinkingConfig:
- if reasoning_effort == "low":
+ if reasoning_effort == "minimal":
+ # Use model-specific minimum thinking budget or fallback
+ # Check for exact matches first, then partial matches
+ if model and "gemini-2.5-flash-lite" in model.lower():
+ budget = DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_FLASH_LITE
+ elif model and "gemini-2.5-pro" in model.lower():
+ budget = DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_PRO
+ elif model and "gemini-2.5-flash" in model.lower():
+ budget = DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET_GEMINI_2_5_FLASH
+ else:
+ budget = DEFAULT_REASONING_EFFORT_MINIMAL_THINKING_BUDGET
+
+ return {
+ "thinkingBudget": budget,
+ "includeThoughts": True,
+ }
+ elif reasoning_effort == "low":
return {
"thinkingBudget": DEFAULT_REASONING_EFFORT_LOW_THINKING_BUDGET,
"includeThoughts": True,
@@ -461,7 +486,6 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
params["includeThoughts"] = True
if thinking_budget is not None and isinstance(thinking_budget, int):
params["thinkingBudget"] = thinking_budget
-
return params
def map_response_modalities(self, value: list) -> list:
@@ -598,7 +622,9 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
optional_params["seed"] = value
elif param == "reasoning_effort" and isinstance(value, str):
optional_params["thinkingConfig"] = (
- VertexGeminiConfig._map_reasoning_effort_to_thinking_budget(value)
+ VertexGeminiConfig._map_reasoning_effort_to_thinking_budget(
+ value, model
+ )
)
elif param == "thinking":
optional_params["thinkingConfig"] = (
@@ -774,8 +800,9 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
elif "inlineData" in part:
mime_type = part["inlineData"]["mimeType"]
data = part["inlineData"]["data"]
- # Check if inline data is audio - if so, exclude from text content
- if mime_type.startswith("audio/"):
+ # Check if inline data is audio or image - if so, exclude from text content
+ # Images and audio are now handled separately in their respective response fields
+ if mime_type.startswith("audio/") or mime_type.startswith("image/"):
continue
_content_str += "data:{};base64,{}".format(mime_type, data)
@@ -791,6 +818,45 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
return content_str, reasoning_content_str
+ def _extract_thinking_blocks_from_parts(
+ self, parts: List[HttpxPartType]
+ ) -> List[ChatCompletionThinkingBlock]:
+ """Extract thinking blocks from parts if present"""
+ thinking_blocks: List[ChatCompletionThinkingBlock] = []
+ for part in parts:
+ if "thoughtSignature" in part:
+ part_copy = part.copy()
+ part_copy.pop("thoughtSignature")
+ thinking_blocks.append(
+ ChatCompletionThinkingBlock(
+ type="thinking",
+ thinking=json.dumps(part_copy),
+ signature=part["thoughtSignature"],
+ )
+ )
+ return thinking_blocks
+
+ def _extract_image_response_from_parts(
+ self, parts: List[HttpxPartType]
+ ) -> Optional[List[ImageURLListItem]]:
+ """Extract image response from parts if present"""
+ images: List[ImageURLListItem] = []
+ for part in parts:
+ if "inlineData" in part:
+ mime_type = part["inlineData"]["mimeType"]
+ data = part["inlineData"]["data"]
+ if mime_type.startswith("image/"):
+ # Convert base64 data to data URI format
+ data_uri = f"data:{mime_type};base64,{data}"
+ images.append(
+ ImageURLListItem(
+ image_url=ImageURLObject(url=data_uri, detail="auto"),
+ index=0,
+ type="image_url",
+ )
+ )
+ return images
+
def _extract_audio_response_from_parts(
self, parts: List[HttpxPartType]
) -> Optional[ChatCompletionAudioResponse]:
@@ -1109,6 +1175,80 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
web_search_requests = len(grounding_metadata)
return web_search_requests
+ @staticmethod
+ def _create_streaming_choice(
+ chat_completion_message: ChatCompletionResponseMessage,
+ candidate: Candidates,
+ idx: int,
+ tools: Optional[List[ChatCompletionToolCallChunk]],
+ functions: Optional[ChatCompletionToolCallFunctionChunk],
+ chat_completion_logprobs: Optional[ChoiceLogprobs],
+ image_response: Optional[List[ImageURLListItem]],
+ ) -> StreamingChoices:
+ """
+ Helper method to create a streaming choice object for Vertex AI
+ """
+ from litellm.types.utils import Delta, StreamingChoices
+
+ # create a streaming choice object
+ choice = StreamingChoices(
+ finish_reason=VertexGeminiConfig._check_finish_reason(
+ chat_completion_message, candidate.get("finishReason")
+ ),
+ index=candidate.get("index", idx),
+ delta=Delta(
+ content=chat_completion_message.get("content"),
+ reasoning_content=chat_completion_message.get("reasoning_content"),
+ tool_calls=tools,
+ images=image_response,
+ function_call=functions,
+ ),
+ logprobs=chat_completion_logprobs,
+ enhancements=None,
+ )
+ return choice
+
+ @staticmethod
+ def _extract_candidate_metadata(
+ candidate: Candidates,
+ ) -> Tuple[List[dict], List[dict], List, List]:
+ """
+ Extract metadata from a single candidate response.
+
+ Returns:
+ grounding_metadata: List[dict]
+ url_context_metadata: List[dict]
+ safety_ratings: List
+ citation_metadata: List
+ """
+ grounding_metadata: List[dict] = []
+ url_context_metadata: List[dict] = []
+ safety_ratings: List = []
+ citation_metadata: List = []
+
+ if "groundingMetadata" in candidate:
+ if isinstance(candidate["groundingMetadata"], list):
+ grounding_metadata.extend(candidate["groundingMetadata"]) # type: ignore
+ else:
+ grounding_metadata.append(candidate["groundingMetadata"]) # type: ignore
+
+ if "safetyRatings" in candidate:
+ safety_ratings.append(candidate["safetyRatings"])
+
+ if "citationMetadata" in candidate:
+ citation_metadata.append(candidate["citationMetadata"])
+
+ if "urlContextMetadata" in candidate:
+ # Add URL context metadata to grounding metadata
+ url_context_metadata.append(cast(dict, candidate["urlContextMetadata"]))
+
+ return (
+ grounding_metadata,
+ url_context_metadata,
+ safety_ratings,
+ citation_metadata,
+ )
+
@staticmethod
def _process_candidates(
_candidates: List[Candidates],
@@ -1131,6 +1271,7 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
grounding_metadata: List[dict] = []
url_context_metadata: List[dict] = []
+ image_response: Optional[List[ImageURLListItem]] = None
safety_ratings: List = []
citation_metadata: List = []
chat_completion_message: ChatCompletionResponseMessage = {"role": "assistant"}
@@ -1138,26 +1279,24 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
tools: Optional[List[ChatCompletionToolCallChunk]] = []
functions: Optional[ChatCompletionToolCallFunctionChunk] = None
cumulative_tool_call_index: int = 0
+ thinking_blocks: Optional[List[ChatCompletionThinkingBlock]] = None
for idx, candidate in enumerate(_candidates):
if "content" not in candidate:
continue
- if "groundingMetadata" in candidate:
- if isinstance(candidate["groundingMetadata"], list):
- grounding_metadata.extend(candidate["groundingMetadata"]) # type: ignore
- else:
- grounding_metadata.append(candidate["groundingMetadata"]) # type: ignore
+ # Extract metadata using helper function
+ (
+ candidate_grounding_metadata,
+ candidate_url_context_metadata,
+ candidate_safety_ratings,
+ candidate_citation_metadata,
+ ) = VertexGeminiConfig._extract_candidate_metadata(candidate)
- if "safetyRatings" in candidate:
- safety_ratings.append(candidate["safetyRatings"])
-
- if "citationMetadata" in candidate:
- citation_metadata.append(candidate["citationMetadata"])
-
- if "urlContextMetadata" in candidate:
- # Add URL context metadata to grounding metadata
- url_context_metadata.append(cast(dict, candidate["urlContextMetadata"]))
+ grounding_metadata.extend(candidate_grounding_metadata)
+ url_context_metadata.extend(candidate_url_context_metadata)
+ safety_ratings.extend(candidate_safety_ratings)
+ citation_metadata.extend(candidate_citation_metadata)
if "parts" in candidate["content"]:
(
@@ -1172,18 +1311,33 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
parts=candidate["content"]["parts"]
)
)
+ image_response = (
+ VertexGeminiConfig()._extract_image_response_from_parts(
+ parts=candidate["content"]["parts"]
+ )
+ )
+
+ thinking_blocks = (
+ VertexGeminiConfig()._extract_thinking_blocks_from_parts(
+ parts=candidate["content"]["parts"]
+ )
+ )
if audio_response is not None:
cast(Dict[str, Any], chat_completion_message)[
"audio"
] = audio_response
chat_completion_message["content"] = None # OpenAI spec
- elif content is not None:
+ if image_response is not None:
+ # Handle image response - combine with text content into structured format
+ cast(Dict[str, Any], chat_completion_message)[
+ "images"
+ ] = image_response
+ if content is not None:
chat_completion_message["content"] = content
if reasoning_content is not None:
chat_completion_message["reasoning_content"] = reasoning_content
-
(
functions,
tools,
@@ -1205,25 +1359,18 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
if functions is not None:
chat_completion_message["function_call"] = functions
- if isinstance(model_response, ModelResponseStream):
- from litellm.types.utils import Delta, StreamingChoices
+ if thinking_blocks is not None:
+ chat_completion_message["thinking_blocks"] = thinking_blocks # type: ignore
- # create a streaming choice object
- choice = StreamingChoices(
- finish_reason=VertexGeminiConfig._check_finish_reason(
- chat_completion_message, candidate.get("finishReason")
- ),
- index=candidate.get("index", idx),
- delta=Delta(
- content=chat_completion_message.get("content"),
- reasoning_content=chat_completion_message.get(
- "reasoning_content"
- ),
- tool_calls=tools,
- function_call=functions,
- ),
- logprobs=chat_completion_logprobs,
- enhancements=None,
+ if isinstance(model_response, ModelResponseStream):
+ choice = VertexGeminiConfig._create_streaming_choice(
+ chat_completion_message=chat_completion_message,
+ candidate=candidate,
+ idx=idx,
+ tools=tools,
+ functions=functions,
+ chat_completion_logprobs=chat_completion_logprobs,
+ image_response=image_response,
)
model_response.choices.append(choice)
elif isinstance(model_response, ModelResponse):
diff --git a/litellm/llms/vertex_ai/vertex_ai_partner_models/gpt_oss/transformation.py b/litellm/llms/vertex_ai/vertex_ai_partner_models/gpt_oss/transformation.py
new file mode 100644
index 00000000000..86e36e802ed
--- /dev/null
+++ b/litellm/llms/vertex_ai/vertex_ai_partner_models/gpt_oss/transformation.py
@@ -0,0 +1,27 @@
+import litellm
+from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfig
+
+
+class VertexAIGPTOSSTransformation(OpenAIGPTConfig):
+ """
+ Transformation for GPT-OSS model from VertexAI
+
+ https://console.cloud.google.com/vertex-ai/publishers/openai/model-garden/gpt-oss-120b-maas?hl=id
+ """
+ def __init__(self):
+ super().__init__()
+
+ def get_supported_openai_params(self, model: str) -> list:
+ base_gpt_series_params = super().get_supported_openai_params(model=model)
+ gpt_oss_only_params = ["reasoning_effort"]
+ base_gpt_series_params.extend(gpt_oss_only_params)
+
+ #########################################################
+ # VertexAI - GPT-OSS does not support tool calls
+ #########################################################
+ if litellm.supports_function_calling(model=model) is False:
+ TOOL_CALLING_PARAMS_TO_REMOVE = ["tool", "tool_choice", "function_call", "functions"]
+ base_gpt_series_params = [param for param in base_gpt_series_params if param not in TOOL_CALLING_PARAMS_TO_REMOVE]
+
+ return base_gpt_series_params
+
diff --git a/litellm/llms/vertex_ai/vertex_ai_partner_models/llama3/transformation.py b/litellm/llms/vertex_ai/vertex_ai_partner_models/llama3/transformation.py
index 7e965313a0b..748a5f5fb40 100644
--- a/litellm/llms/vertex_ai/vertex_ai_partner_models/llama3/transformation.py
+++ b/litellm/llms/vertex_ai/vertex_ai_partner_models/llama3/transformation.py
@@ -113,10 +113,10 @@ class VertexAILlama3Config(OpenAIGPTConfig):
status_code=raw_response.status_code,
headers=response_headers,
)
- model_response.model = completion_response["model"]
- model_response.id = completion_response["id"]
- model_response.created = completion_response["created"]
- setattr(model_response, "usage", Usage(**completion_response["usage"]))
+ model_response.model = completion_response.get("model", model)
+ model_response.id = completion_response.get("id", "")
+ model_response.created = completion_response.get("created", 0)
+ setattr(model_response, "usage", Usage(**completion_response.get("usage", {})))
model_response.choices = self._transform_choices( # type: ignore
choices=completion_response["choices"],
diff --git a/litellm/llms/vertex_ai/vertex_ai_partner_models/main.py b/litellm/llms/vertex_ai/vertex_ai_partner_models/main.py
index f281cab3b58..ea29970f0aa 100644
--- a/litellm/llms/vertex_ai/vertex_ai_partner_models/main.py
+++ b/litellm/llms/vertex_ai/vertex_ai_partner_models/main.py
@@ -1,5 +1,6 @@
# What is this?
## API Handler for calling Vertex AI Partner Models
+from enum import Enum
from typing import Callable, Optional, Union
import httpx # type: ignore
@@ -27,6 +28,16 @@ class VertexAIError(Exception):
self.message
) # Call the base class constructor with the parameters it needs
+class PartnerModelPrefixes(str, Enum):
+ META_PREFIX = "meta/"
+ DEEPSEEK_PREFIX = "deepseek-ai"
+ MISTRAL_PREFIX = "mistral"
+ CODERESTAL_PREFIX = "codestral"
+ JAMBA_PREFIX = "jamba"
+ CLAUDE_PREFIX = "claude"
+ QWEN_PREFIX = "qwen"
+ GPT_OSS_PREFIX = "openai/gpt-oss-"
+
class VertexAIPartnerModels(VertexBase):
def __init__(self) -> None:
@@ -42,13 +53,14 @@ class VertexAIPartnerModels(VertexBase):
bool: True if the model string is a Vertex AI Partner Model, False otherwise
"""
if (
- model.startswith("meta/")
- or model.startswith("deepseek-ai")
- or model.startswith("mistral")
- or model.startswith("codestral")
- or model.startswith("jamba")
- or model.startswith("claude")
- or model.startswith("qwen")
+ model.startswith(PartnerModelPrefixes.META_PREFIX)
+ or model.startswith(PartnerModelPrefixes.DEEPSEEK_PREFIX)
+ or model.startswith(PartnerModelPrefixes.MISTRAL_PREFIX)
+ or model.startswith(PartnerModelPrefixes.CODERESTAL_PREFIX)
+ or model.startswith(PartnerModelPrefixes.JAMBA_PREFIX)
+ or model.startswith(PartnerModelPrefixes.CLAUDE_PREFIX)
+ or model.startswith(PartnerModelPrefixes.QWEN_PREFIX)
+ or model.startswith(PartnerModelPrefixes.GPT_OSS_PREFIX)
):
return True
return False
@@ -57,8 +69,9 @@ class VertexAIPartnerModels(VertexBase):
def should_use_openai_handler(model: str):
OPENAI_LIKE_VERTEX_PROVIDERS = [
"llama",
- "deepseek-ai",
- "qwen",
+ PartnerModelPrefixes.DEEPSEEK_PREFIX,
+ PartnerModelPrefixes.QWEN_PREFIX,
+ PartnerModelPrefixes.GPT_OSS_PREFIX,
]
if any(provider in model for provider in OPENAI_LIKE_VERTEX_PROVIDERS):
return True
diff --git a/litellm/llms/vertex_ai/vertex_llm_base.py b/litellm/llms/vertex_ai/vertex_llm_base.py
index ae43e1fd167..76998e76698 100644
--- a/litellm/llms/vertex_ai/vertex_llm_base.py
+++ b/litellm/llms/vertex_ai/vertex_llm_base.py
@@ -375,10 +375,60 @@ class VertexBase:
url=url,
)
+ def _handle_reauthentication(
+ self,
+ credentials: Optional[VERTEX_CREDENTIALS_TYPES],
+ project_id: Optional[str],
+ credential_cache_key: Tuple,
+ error: Exception,
+ ) -> Tuple[str, str]:
+ """
+ Handle reauthentication when credentials refresh fails.
+
+ This method clears the cached credentials and attempts to reload them once.
+ It should only be called when "Reauthentication is needed" error occurs.
+
+ Args:
+ credentials: The original credentials
+ project_id: The project ID
+ credential_cache_key: The cache key to clear
+ error: The original error that triggered reauthentication
+
+ Returns:
+ Tuple of (access_token, project_id)
+
+ Raises:
+ The original error if reauthentication fails
+ """
+ verbose_logger.debug(
+ f"Handling reauthentication for project_id: {project_id}. "
+ f"Clearing cache and retrying once."
+ )
+
+ # Clear the cached credentials
+ if credential_cache_key in self._credentials_project_mapping:
+ del self._credentials_project_mapping[credential_cache_key]
+
+ # Retry once with _retry_reauth=True to prevent infinite recursion
+ try:
+ return self.get_access_token(
+ credentials=credentials,
+ project_id=project_id,
+ _retry_reauth=True,
+ )
+ except Exception as retry_error:
+ verbose_logger.error(
+ f"Reauthentication retry failed for project_id: {project_id}. "
+ f"Original error: {str(error)}. Retry error: {str(retry_error)}"
+ )
+ # Re-raise the original error for better context
+ raise error
+
def get_access_token(
self,
credentials: Optional[VERTEX_CREDENTIALS_TYPES],
project_id: Optional[str],
+ _retry_reauth: bool = False,
) -> Tuple[str, str]:
"""
Get access token and project id
@@ -388,6 +438,14 @@ class VertexBase:
3. Check if loaded credentials have expired
4. If expired, refresh credentials
5. Return access token and project id
+
+ Args:
+ credentials: The credentials to use for authentication
+ project_id: The Google Cloud project ID
+ _retry_reauth: Internal flag to prevent infinite recursion during reauthentication
+
+ Returns:
+ Tuple of (access_token, project_id)
"""
# Convert dict credentials to string for caching
@@ -469,14 +527,26 @@ class VertexBase:
raise ValueError("Credentials are None after loading")
if _credentials.expired:
- verbose_logger.debug(
- f"Credentials expired, refreshing for project_id: {project_id}"
- )
- self.refresh_auth(_credentials)
- self._credentials_project_mapping[credential_cache_key] = (
- _credentials,
- credential_project_id,
- )
+ try:
+ verbose_logger.debug(
+ f"Credentials expired, refreshing for project_id: {project_id}"
+ )
+ self.refresh_auth(_credentials)
+ self._credentials_project_mapping[credential_cache_key] = (
+ _credentials,
+ credential_project_id,
+ )
+ except Exception as e:
+ # if refresh fails, it's possible the user has re-authenticated via `gcloud auth application-default login`
+ # in this case, we should try to reload the credentials by clearing the cache and retrying
+ if "Reauthentication is needed" in str(e) and not _retry_reauth:
+ return self._handle_reauthentication(
+ credentials=credentials,
+ project_id=project_id,
+ credential_cache_key=credential_cache_key,
+ error=e,
+ )
+ raise e
## VALIDATION STEP
if _credentials.token is None or not isinstance(_credentials.token, str):
diff --git a/litellm/llms/volcengine/__init__.py b/litellm/llms/volcengine/__init__.py
new file mode 100644
index 00000000000..0887937bed5
--- /dev/null
+++ b/litellm/llms/volcengine/__init__.py
@@ -0,0 +1,24 @@
+"""
+Volcengine LLM Provider
+Support for Volcengine (ByteDance) chat and embedding models
+"""
+
+from .chat.transformation import VolcEngineChatConfig
+from .common_utils import (
+ VolcEngineError,
+ get_volcengine_base_url,
+ get_volcengine_headers,
+)
+from .embedding import VolcEngineEmbeddingConfig
+
+# For backward compatibility, keep the old class name
+VolcEngineConfig = VolcEngineChatConfig
+
+__all__ = [
+ "VolcEngineChatConfig",
+ "VolcEngineConfig", # backward compatibility
+ "VolcEngineEmbeddingConfig",
+ "VolcEngineError",
+ "get_volcengine_base_url",
+ "get_volcengine_headers",
+]
diff --git a/litellm/llms/volcengine.py b/litellm/llms/volcengine/chat/transformation.py
similarity index 91%
rename from litellm/llms/volcengine.py
rename to litellm/llms/volcengine/chat/transformation.py
index c878aaf933c..216570a1aba 100644
--- a/litellm/llms/volcengine.py
+++ b/litellm/llms/volcengine/chat/transformation.py
@@ -3,7 +3,7 @@ from typing import Optional, Union
from litellm.llms.openai_like.chat.transformation import OpenAILikeChatConfig
-class VolcEngineConfig(OpenAILikeChatConfig):
+class VolcEngineChatConfig(OpenAILikeChatConfig):
frequency_penalty: Optional[int] = None
function_call: Optional[Union[str, dict]] = None
functions: Optional[list] = None
@@ -82,17 +82,19 @@ class VolcEngineConfig(OpenAILikeChatConfig):
if "thinking" in optional_params:
thinking_value = optional_params.pop("thinking")
-
+
# Handle disabled thinking case - don't add to extra_body if disabled
if (
- thinking_value is not None
- and isinstance(thinking_value, dict)
+ thinking_value is not None
+ and isinstance(thinking_value, dict)
and thinking_value.get("type") == "disabled"
):
# Skip adding thinking parameter when it's disabled
pass
else:
# Add thinking parameter to extra_body for all other cases
- optional_params.setdefault("extra_body", {})["thinking"] = thinking_value
+ optional_params.setdefault("extra_body", {})[
+ "thinking"
+ ] = thinking_value
return optional_params
diff --git a/litellm/llms/volcengine/common_utils.py b/litellm/llms/volcengine/common_utils.py
new file mode 100644
index 00000000000..0c8d3daebdc
--- /dev/null
+++ b/litellm/llms/volcengine/common_utils.py
@@ -0,0 +1,62 @@
+"""
+Common utilities for Volcengine LLM provider
+"""
+
+from typing import Optional
+
+import httpx
+
+from litellm.llms.base_llm.chat.transformation import BaseLLMException
+
+
+class VolcEngineError(BaseLLMException):
+ """
+ Custom exception class for Volcengine provider errors.
+ """
+
+ def __init__(
+ self, status_code: int, message: str, headers: Optional[httpx.Headers] = None
+ ):
+ self.status_code = status_code
+ self.message = message
+ self.headers = headers or httpx.Headers()
+ super().__init__(
+ status_code=status_code, message=message, headers=dict(self.headers)
+ )
+
+
+def get_volcengine_base_url(api_base: Optional[str] = None) -> str:
+ """
+ Get the base URL for Volcengine API calls.
+
+ Args:
+ api_base: Optional custom API base URL
+
+ Returns:
+ The base URL to use for API calls
+ """
+ if api_base:
+ return api_base
+ return "https://ark.cn-beijing.volces.com"
+
+
+def get_volcengine_headers(api_key: str, extra_headers: Optional[dict] = None) -> dict:
+ """
+ Get headers for Volcengine API calls.
+
+ Args:
+ api_key: The API key for authentication
+ extra_headers: Optional additional headers
+
+ Returns:
+ Dictionary of headers
+ """
+ headers = {
+ "Content-Type": "application/json",
+ "Authorization": f"Bearer {api_key}",
+ }
+
+ if extra_headers:
+ headers.update(extra_headers)
+
+ return headers
diff --git a/litellm/llms/volcengine/embedding/__init__.py b/litellm/llms/volcengine/embedding/__init__.py
new file mode 100644
index 00000000000..7b3efc4f961
--- /dev/null
+++ b/litellm/llms/volcengine/embedding/__init__.py
@@ -0,0 +1,7 @@
+"""
+Volcengine Embedding Module
+"""
+
+from .transformation import VolcEngineEmbeddingConfig
+
+__all__ = ["VolcEngineEmbeddingConfig"]
diff --git a/litellm/llms/volcengine/embedding/transformation.py b/litellm/llms/volcengine/embedding/transformation.py
new file mode 100644
index 00000000000..20747b76725
--- /dev/null
+++ b/litellm/llms/volcengine/embedding/transformation.py
@@ -0,0 +1,211 @@
+"""
+Volcengine Embedding Transformation
+Transforms OpenAI embedding requests to Volcengine format
+"""
+
+from typing import List, Optional, Union, Dict, Any
+import httpx
+from litellm.types.llms.openai import AllEmbeddingInputValues, AllMessageValues
+from litellm.types.utils import EmbeddingResponse
+from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
+from litellm.llms.base_llm.embedding.transformation import BaseEmbeddingConfig
+from litellm.llms.base_llm.chat.transformation import BaseLLMException
+from ..common_utils import get_volcengine_base_url, get_volcengine_headers
+
+
+class VolcEngineEmbeddingConfig(BaseEmbeddingConfig):
+ """
+ Configuration class for Volcengine embedding models.
+ Reference: https://ark.cn-beijing.volces.com/api/v3/embeddings
+ """
+
+ def __init__(
+ self,
+ encoding_format: Optional[str] = None,
+ ) -> None:
+ locals_ = locals().copy()
+ for key, value in locals_.items():
+ if key != "self" and value is not None:
+ setattr(self.__class__, key, value)
+
+ @classmethod
+ def get_config(cls):
+ return super().get_config()
+
+ def get_supported_openai_params(self, model: str) -> List[str]:
+ """
+ Get the list of OpenAI parameters supported by Volcengine embedding models.
+
+ Args:
+ model: The model name
+
+ Returns:
+ List of supported parameter names
+ """
+ return [
+ "encoding_format",
+ "user",
+ "extra_headers",
+ ]
+
+ def get_complete_url(
+ self,
+ api_base: Optional[str],
+ api_key: Optional[str],
+ model: str,
+ optional_params: dict,
+ litellm_params: dict,
+ stream: Optional[bool] = None,
+ ) -> str:
+ """
+ Get the complete URL for volcengine embedding API calls.
+
+ Args:
+ api_base: Optional custom API base URL
+ api_key: API key (not used for URL construction)
+ model: Model name (not used for URL construction)
+ optional_params: Optional parameters (not used for URL construction)
+ litellm_params: LiteLLM parameters (not used for URL construction)
+ stream: Stream parameter (not used for URL construction)
+
+ Returns:
+ Complete URL for the embedding API endpoint
+ """
+ base_url = get_volcengine_base_url(api_base)
+ # Construct the complete URL with /embeddings endpoint
+ if base_url.endswith("/api/v3"):
+ return f"{base_url}/embeddings"
+ else:
+ return f"{base_url}/api/v3/embeddings"
+
+ def map_openai_params(
+ self,
+ non_default_params: Dict[str, Any],
+ optional_params: Dict[str, Any],
+ model: str,
+ drop_params: bool,
+ ) -> Dict[str, Any]:
+ """
+ Map OpenAI embedding parameters to Volcengine format.
+
+ Args:
+ non_default_params: Parameters that are not default values
+ optional_params: Optional parameters dict to update
+ model: The model name
+ drop_params: Whether to drop unsupported parameters
+
+ Returns:
+ Updated optional_params dict
+ """
+ for param, value in non_default_params.items():
+ if param == "encoding_format":
+ # Volcengine supports: float, base64, null
+ if value in ["float", "base64", None]:
+ optional_params["encoding_format"] = value
+ else:
+ if not drop_params:
+ raise ValueError(
+ f"Unsupported encoding_format: {value}. Volcengine supports: float, base64, null"
+ )
+ elif param == "user":
+ # Keep user parameter as-is
+ optional_params["user"] = value
+ elif param in self.get_supported_openai_params(model):
+ optional_params[param] = value
+ elif not drop_params:
+ raise ValueError(f"Unsupported parameter for Volcengine: {param}")
+
+ return optional_params
+
+
+
+ def transform_embedding_request(
+ self,
+ model: str,
+ input: AllEmbeddingInputValues,
+ optional_params: dict,
+ headers: dict,
+ ) -> dict:
+ """Transform embedding request to Volcengine format"""
+ # Prepare request data (only the JSON body, not the full request)
+ data = {
+ "model": model,
+ "input": input if isinstance(input, list) else [input],
+ }
+
+ # Add optional parameters from optional_params
+ if "encoding_format" in optional_params:
+ encoding_format = optional_params["encoding_format"]
+ if encoding_format is not None:
+ data["encoding_format"] = encoding_format
+
+ if "user" in optional_params:
+ user = optional_params["user"]
+ if user is not None:
+ data["user"] = user
+
+ return data
+
+ def transform_embedding_response(
+ self,
+ model: str,
+ raw_response: httpx.Response,
+ model_response: EmbeddingResponse,
+ logging_obj: LiteLLMLoggingObj,
+ api_key: Optional[str],
+ request_data: dict,
+ optional_params: dict,
+ litellm_params: dict,
+ ) -> EmbeddingResponse:
+ """Transform Volcengine response to EmbeddingResponse"""
+ try:
+ response_json = raw_response.json()
+ except Exception as e:
+ raise ValueError(f"Failed to parse Volcengine response as JSON: {str(e)}")
+
+ # Volcengine response format matches OpenAI format closely
+ # Just need to ensure all required fields are present
+ transformed_response = {
+ "object": "list",
+ "data": response_json.get("data", []),
+ "model": response_json.get("model", model),
+ "usage": response_json.get("usage", {}),
+ }
+
+ # Add id if present
+ if "id" in response_json:
+ transformed_response["id"] = response_json["id"]
+
+ # Create EmbeddingResponse from transformed data
+ return EmbeddingResponse(**transformed_response)
+
+ def validate_environment(
+ self,
+ headers: dict,
+ model: str,
+ messages: List[AllMessageValues],
+ optional_params: dict,
+ litellm_params: dict,
+ api_key: Optional[str] = None,
+ api_base: Optional[str] = None,
+ ) -> dict:
+ """Validate environment and return headers"""
+ # Get Volcengine headers
+ if api_key is None:
+ raise ValueError("api_key is required for Volcengine authentication")
+ volcengine_headers = get_volcengine_headers(api_key)
+ return {**headers, **volcengine_headers}
+
+ def get_error_class(
+ self, error_message: str, status_code: int, headers: Union[dict, httpx.Headers]
+ ) -> BaseLLMException:
+ """Get error class for Volcengine errors"""
+ from ..common_utils import VolcEngineError
+ # Convert dict to httpx.Headers if needed
+ if isinstance(headers, dict):
+ headers = httpx.Headers(headers)
+ return VolcEngineError(
+ status_code=status_code,
+ message=error_message,
+ headers=headers,
+ )
diff --git a/litellm/llms/xai/chat/transformation.py b/litellm/llms/xai/chat/transformation.py
index 5a488876cd9..78c20ac5731 100644
--- a/litellm/llms/xai/chat/transformation.py
+++ b/litellm/llms/xai/chat/transformation.py
@@ -31,7 +31,6 @@ class XAIChatConfig(OpenAIGPTConfig):
def get_supported_openai_params(self, model: str) -> list:
base_openai_params = [
- "frequency_penalty",
"logit_bias",
"logprobs",
"max_tokens",
@@ -50,8 +49,22 @@ class XAIChatConfig(OpenAIGPTConfig):
"web_search_options",
]
# for some reason, grok-3-mini does not support stop tokens
+ #########################################################
+ # stop tokens check
+ #########################################################
if self._supports_stop_reason(model):
base_openai_params.append("stop")
+
+
+ #########################################################
+ # frequency penalty check
+ #########################################################
+ if self._supports_frequency_penalty(model):
+ base_openai_params.append("frequency_penalty")
+
+ #########################################################
+ # reasoning check
+ #########################################################
try:
if litellm.supports_reasoning(
model=model, custom_llm_provider=self.custom_llm_provider
@@ -68,6 +81,18 @@ class XAIChatConfig(OpenAIGPTConfig):
elif "grok-4" in model:
return False
return True
+
+ def _supports_frequency_penalty(self, model: str) -> bool:
+ """
+ From manual testing grok-4 does not support `frequency_penalty`
+
+ When sent the model fails from xAI API
+ """
+ if "grok-4" in model:
+ return False
+ if "grok-code-fast" in model:
+ return False
+ return True
def map_openai_params(
self,
diff --git a/litellm/llms/xai/cost_calculator.py b/litellm/llms/xai/cost_calculator.py
new file mode 100644
index 00000000000..62a48080d1c
--- /dev/null
+++ b/litellm/llms/xai/cost_calculator.py
@@ -0,0 +1,54 @@
+"""
+Helper util for handling XAI-specific cost calculation
+- e.g.: reasoning tokens for grok models
+"""
+
+from typing import Tuple, Union
+
+from litellm.types.utils import Usage
+from litellm.utils import get_model_info
+
+
+def cost_per_token(model: str, usage: Usage) -> Tuple[float, float]:
+ """
+ Calculates the cost per token for a given XAI model, prompt tokens, and completion tokens.
+
+ Input:
+ - model: str, the model name without provider prefix
+ - usage: LiteLLM Usage block, containing XAI-specific usage information
+
+ Returns:
+ Tuple[float, float] - prompt_cost_in_usd, completion_cost_in_usd
+ """
+ ## GET MODEL INFO
+ model_info = get_model_info(model=model, custom_llm_provider="xai")
+
+ def _safe_float_cast(
+ value: Union[str, int, float, None, object], default: float = 0.0
+ ) -> float:
+ """Safely cast a value to float with proper type handling for mypy."""
+ if value is None:
+ return default
+ try:
+ return float(value) # type: ignore
+ except (ValueError, TypeError):
+ return default
+
+ ## CALCULATE INPUT COST
+ input_cost_per_token = _safe_float_cast(model_info.get("input_cost_per_token"))
+ prompt_cost: float = (usage.prompt_tokens or 0) * input_cost_per_token
+
+ ## CALCULATE OUTPUT COST
+ output_cost_per_token = _safe_float_cast(model_info.get("output_cost_per_token"))
+
+ # For XAI models, completion is billed as (visible completion tokens + reasoning tokens)
+ completion_tokens = int(getattr(usage, "completion_tokens", 0) or 0)
+ reasoning_tokens = 0
+ if hasattr(usage, "completion_tokens_details") and usage.completion_tokens_details:
+ reasoning_tokens = int(
+ getattr(usage.completion_tokens_details, "reasoning_tokens", 0) or 0
+ )
+
+ completion_cost = (completion_tokens + reasoning_tokens) * output_cost_per_token
+
+ return prompt_cost, completion_cost
diff --git a/litellm/main.py b/litellm/main.py
index c8442d483e9..d7395eb1457 100644
--- a/litellm/main.py
+++ b/litellm/main.py
@@ -61,6 +61,9 @@ from litellm.exceptions import LiteLLMUnknownProvider
from litellm.integrations.custom_logger import CustomLogger
from litellm.litellm_core_utils.audio_utils.utils import get_audio_file_for_health_check
from litellm.litellm_core_utils.dd_tracing import tracer
+from litellm.litellm_core_utils.get_provider_specific_headers import (
+ ProviderSpecificHeaderUtils,
+)
from litellm.litellm_core_utils.health_check_utils import (
_create_health_check_response,
_filter_model_params,
@@ -147,8 +150,9 @@ from .llms.custom_httpx.llm_http_handler import BaseLLMHTTPHandler
from .llms.custom_llm import CustomLLM, custom_chat_llm_router
from .llms.databricks.embed.handler import DatabricksEmbeddingHandler
from .llms.deprecated_providers import aleph_alpha, palm
-from .llms.gemini.common_utils import get_api_key_from_env
from .llms.groq.chat.handler import GroqChatCompletion
+from .llms.heroku.chat.transformation import HerokuChatConfig
+from .llms.gemini.common_utils import get_api_key_from_env
from .llms.huggingface.embedding.handler import HuggingFaceEmbedding
from .llms.nlp_cloud.chat.handler import completion as nlp_cloud_chat_completion
from .llms.oci.chat.transformation import OCIChatConfig
@@ -253,6 +257,7 @@ base_llm_http_handler = BaseLLMHTTPHandler()
base_llm_aiohttp_handler = BaseLLMAIOHTTPHandler()
sagemaker_chat_completion = SagemakerChatHandler()
bytez_transformation = BytezChatConfig()
+heroku_transformation = HerokuChatConfig()
oci_transformation = OCIChatConfig()
####### COMPLETION ENDPOINTS ################
@@ -353,7 +358,8 @@ async def acompletion(
logprobs: Optional[bool] = None,
top_logprobs: Optional[int] = None,
deployment_id=None,
- reasoning_effort: Optional[Literal["minimal", "low", "medium", "high"]] = None,
+ reasoning_effort: Optional[Literal["none", "minimal", "low", "medium", "high", "default"]] = None,
+ safety_identifier: Optional[str] = None,
# set api_base, api_version, api_key
base_url: Optional[str] = None,
api_version: Optional[str] = None,
@@ -490,6 +496,7 @@ async def acompletion(
"api_key": api_key,
"model_list": model_list,
"reasoning_effort": reasoning_effort,
+ "safety_identifier": safety_identifier,
"extra_headers": extra_headers,
"acompletion": True, # assuming this is a required parameter
"thinking": thinking,
@@ -497,7 +504,7 @@ async def acompletion(
}
if custom_llm_provider is None:
_, custom_llm_provider, _, _ = get_llm_provider(
- model=model, api_base=completion_kwargs.get("base_url", None)
+ model=model, custom_llm_provider=custom_llm_provider, api_base=completion_kwargs.get("base_url", None)
)
fallbacks = fallbacks or litellm.model_fallbacks
@@ -892,7 +899,7 @@ def completion( # type: ignore # noqa: PLR0915
logit_bias: Optional[dict] = None,
user: Optional[str] = None,
# openai v1.0+ new params
- reasoning_effort: Optional[Literal["minimal", "low", "medium", "high"]] = None,
+ reasoning_effort: Optional[Literal["none", "minimal", "low", "medium", "high", "default"]] = None,
response_format: Optional[Union[dict, Type[BaseModel]]] = None,
seed: Optional[int] = None,
tools: Optional[List] = None,
@@ -903,6 +910,7 @@ def completion( # type: ignore # noqa: PLR0915
web_search_options: Optional[OpenAIWebSearchOptions] = None,
deployment_id=None,
extra_headers: Optional[dict] = None,
+ safety_identifier: Optional[str] = None,
# soon to be deprecated params by OpenAI
functions: Optional[List] = None,
function_call: Optional[str] = None,
@@ -1107,11 +1115,11 @@ def completion( # type: ignore # noqa: PLR0915
api_key=api_key,
)
- if (
- provider_specific_header is not None
- and provider_specific_header["custom_llm_provider"] == custom_llm_provider
- ):
- headers.update(provider_specific_header["extra_headers"])
+ if provider_specific_header is not None:
+ headers.update(ProviderSpecificHeaderUtils.get_provider_specific_headers(
+ provider_specific_header=provider_specific_header,
+ custom_llm_provider=custom_llm_provider,
+ ))
if model_response is not None and hasattr(model_response, "_hidden_params"):
model_response._hidden_params["custom_llm_provider"] = custom_llm_provider
@@ -1240,6 +1248,7 @@ def completion( # type: ignore # noqa: PLR0915
"reasoning_effort": reasoning_effort,
"thinking": thinking,
"web_search_options": web_search_options,
+ "safety_identifier": safety_identifier,
"allowed_openai_params": kwargs.get("allowed_openai_params"),
}
optional_params = get_optional_params(
@@ -1253,6 +1262,7 @@ def completion( # type: ignore # noqa: PLR0915
additional_drop_params=kwargs.get("additional_drop_params"),
remove_sensitive_keys=True,
add_provider_specific_params=True,
+ provider_config=provider_config,
)
if litellm.add_function_to_prompt and optional_params.get(
@@ -1765,6 +1775,35 @@ def completion( # type: ignore # noqa: PLR0915
additional_args={"headers": headers},
)
raise e
+ elif custom_llm_provider == "heroku":
+ try:
+ response = base_llm_http_handler.completion(
+ model=model,
+ messages=messages,
+ headers=headers,
+ model_response=model_response,
+ api_key=api_key,
+ api_base=api_base,
+ acompletion=acompletion,
+ logging_obj=logging,
+ optional_params=optional_params,
+ litellm_params=litellm_params,
+ timeout=timeout,
+ client=client,
+ custom_llm_provider=custom_llm_provider,
+ encoding=encoding,
+ stream=stream,
+ provider_config=provider_config,
+ )
+ except Exception as e:
+ logging.post_call(
+ input=messages,
+ api_key=api_key,
+ original_response=str(e),
+ additional_args={"headers": headers},
+ )
+ raise e
+
elif custom_llm_provider == "xai":
## COMPLETION CALL
try:
@@ -2169,8 +2208,18 @@ def completion( # type: ignore # noqa: PLR0915
or "https://api.anthropic.com/v1/complete"
)
- if api_base is not None and not api_base.endswith("/v1/complete"):
+ # Check if we should disable automatic URL suffix appending
+ disable_url_suffix = get_secret_bool("LITELLM_ANTHROPIC_DISABLE_URL_SUFFIX")
+ if (
+ api_base is not None
+ and not disable_url_suffix
+ and not api_base.endswith("/v1/complete")
+ ):
api_base += "/v1/complete"
+ elif disable_url_suffix:
+ verbose_logger.debug(
+ "LITELLM_ANTHROPIC_DISABLE_URL_SUFFIX is set, skipping /v1/complete suffix"
+ )
response = base_llm_http_handler.completion(
model=model,
@@ -2206,8 +2255,18 @@ def completion( # type: ignore # noqa: PLR0915
or "https://api.anthropic.com/v1/messages"
)
- if api_base is not None and not api_base.endswith("/v1/messages"):
+ # Check if we should disable automatic URL suffix appending
+ disable_url_suffix = get_secret_bool("LITELLM_ANTHROPIC_DISABLE_URL_SUFFIX")
+ if (
+ api_base is not None
+ and not disable_url_suffix
+ and not api_base.endswith("/v1/messages")
+ ):
api_base += "/v1/messages"
+ elif disable_url_suffix:
+ verbose_logger.debug(
+ "LITELLM_ANTHROPIC_DISABLE_URL_SUFFIX is set, skipping /v1/messages suffix"
+ )
response = anthropic_chat_completions.completion(
model=model,
@@ -2644,6 +2703,70 @@ def completion( # type: ignore # noqa: PLR0915
logging.post_call(
input=messages, api_key=openai.api_key, original_response=response
)
+ elif custom_llm_provider == "vercel_ai_gateway":
+ api_base = (
+ api_base
+ or litellm.api_base
+ or get_secret_str("VERCEL_AI_GATEWAY_API_BASE")
+ or "https://ai-gateway.vercel.sh/v1"
+ )
+
+ api_key = (
+ api_key
+ or litellm.api_key
+ or get_secret("VERCEL_AI_GATEWAY_API_KEY")
+ )
+
+ vercel_site_url = get_secret("VERCEL_SITE_URL") or "https://litellm.ai"
+ vercel_app_name = get_secret("VERCEL_APP_NAME") or "liteLLM"
+
+ vercel_headers = {
+ "http-referer": vercel_site_url,
+ "x-title": vercel_app_name,
+ }
+
+ _headers = headers or litellm.headers
+ if _headers:
+ vercel_headers.update(_headers)
+
+ headers = vercel_headers
+
+ ## Load Config
+ config = litellm.VercelAIGatewayConfig.get_config()
+ for k, v in config.items():
+ if k == "extra_body":
+ # we use openai 'extra_body' to pass vercel specific params - providerOptions
+ if "extra_body" in optional_params:
+ optional_params[k].update(v)
+ else:
+ optional_params[k] = v
+ elif k not in optional_params:
+ optional_params[k] = v
+
+ data = {"model": model, "messages": messages, **optional_params}
+
+ ## COMPLETION CALL
+ response = base_llm_http_handler.completion(
+ model=model,
+ stream=stream,
+ messages=messages,
+ acompletion=acompletion,
+ api_base=api_base,
+ model_response=model_response,
+ optional_params=optional_params,
+ litellm_params=litellm_params,
+ custom_llm_provider="vercel_ai_gateway",
+ timeout=timeout,
+ headers=headers,
+ encoding=encoding,
+ api_key=api_key,
+ logging_obj=logging, # model call logging done inside the class as we make need to modify I/O to fit aleph alpha's requirements
+ client=client,
+ )
+ ## LOGGING
+ logging.post_call(
+ input=messages, api_key=openai.api_key, original_response=response
+ )
elif (
custom_llm_provider == "together_ai"
or ("togethercomputer" in model)
@@ -3579,7 +3702,7 @@ async def aembedding(*args, **kwargs) -> EmbeddingResponse:
model = args[0] if len(args) > 0 else kwargs["model"]
### PASS ARGS TO Embedding ###
kwargs["aembedding"] = True
- custom_llm_provider = None
+ custom_llm_provider = kwargs.get("custom_llm_provider", None)
try:
# Use a partial function to pass your keyword arguments
func = partial(embedding, *args, **kwargs)
@@ -3589,7 +3712,7 @@ async def aembedding(*args, **kwargs) -> EmbeddingResponse:
func_with_context = partial(ctx.run, func)
_, custom_llm_provider, _, _ = get_llm_provider(
- model=model, api_base=kwargs.get("api_base", None)
+ model=model, custom_llm_provider=custom_llm_provider, api_base=kwargs.get("api_base", None)
)
# Await normally
@@ -3731,7 +3854,7 @@ def embedding( # noqa: PLR0915
max_retries = kwargs.get("max_retries", None)
litellm_logging_obj: LiteLLMLoggingObj = kwargs.get("litellm_logging_obj") # type: ignore
mock_response: Optional[List[float]] = kwargs.get("mock_response", None) # type: ignore
- azure_ad_token_provider = kwargs.pop("azure_ad_token_provider", None)
+ azure_ad_token_provider = kwargs.get("azure_ad_token_provider", None)
aembedding = kwargs.get("aembedding", None)
extra_headers = kwargs.get("extra_headers", None)
headers = kwargs.get("headers", None)
@@ -4411,6 +4534,36 @@ def embedding( # noqa: PLR0915
client=client,
aembedding=aembedding,
)
+ elif custom_llm_provider == "volcengine":
+ volcengine_key = (
+ api_key
+ or litellm.api_key
+ or get_secret_str("ARK_API_KEY")
+ or get_secret_str("VOLCENGINE_API_KEY")
+ )
+ if volcengine_key is None:
+ raise ValueError(
+ "Missing API key for Volcengine. Set ARK_API_KEY or VOLCENGINE_API_KEY environment variable or pass api_key parameter."
+ )
+ if extra_headers is not None and isinstance(extra_headers, dict):
+ headers = extra_headers
+ else:
+ headers = {}
+ response = base_llm_http_handler.embedding(
+ model=model,
+ input=input,
+ timeout=timeout,
+ custom_llm_provider=custom_llm_provider,
+ logging_obj=logging,
+ api_base=api_base,
+ optional_params=optional_params,
+ litellm_params={},
+ model_response=EmbeddingResponse(),
+ api_key=volcengine_key,
+ client=client,
+ aembedding=aembedding,
+ headers=headers,
+ )
elif custom_llm_provider in litellm._custom_providers:
custom_handler: Optional[CustomLLM] = None
for item in litellm.custom_provider_map:
@@ -5627,9 +5780,8 @@ async def ahealth_check(
input=input or ["test"],
),
"audio_speech": lambda: litellm.aspeech(
- **_filter_model_params(model_params),
+ **{**_filter_model_params(model_params), **({"voice": "alloy"} if "voice" not in _filter_model_params(model_params) else {})},
input=prompt or "test",
- voice="alloy",
),
"audio_transcription": lambda: litellm.atranscription(
**_filter_model_params(model_params),
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index 3768be31a29..168cbeeade0 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -1479,6 +1479,70 @@
"supports_system_messages": true,
"supports_tool_choice": true
},
+ "gpt-realtime": {
+ "max_tokens": 4096,
+ "max_input_tokens": 32000,
+ "max_output_tokens": 4096,
+ "input_cost_per_token": 4e-06,
+ "cache_read_input_token_cost": 0.4e-06,
+ "output_cost_per_token": 16e-06,
+ "input_cost_per_audio_token": 32e-06,
+ "output_cost_per_audio_token": 64e-06,
+ "cache_creation_input_audio_token_cost": 0.4e-06,
+ "input_cost_per_image": 5e-06,
+ "litellm_provider": "openai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_audio_input": true,
+ "supports_audio_output": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true,
+ "supported_endpoints": [
+ "/v1/realtime"
+ ],
+ "supported_modalities": [
+ "text",
+ "image",
+ "audio"
+ ],
+ "supported_output_modalities": [
+ "text",
+ "audio"
+ ]
+ },
+ "gpt-realtime-2025-08-28": {
+ "max_tokens": 4096,
+ "max_input_tokens": 32000,
+ "max_output_tokens": 4096,
+ "input_cost_per_token": 4e-06,
+ "cache_read_input_token_cost": 0.4e-06,
+ "output_cost_per_token": 16e-06,
+ "input_cost_per_audio_token": 32e-06,
+ "output_cost_per_audio_token": 64e-06,
+ "cache_creation_input_audio_token_cost": 0.4e-06,
+ "input_cost_per_image": 5e-06,
+ "litellm_provider": "openai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_audio_input": true,
+ "supports_audio_output": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true,
+ "supported_endpoints": [
+ "/v1/realtime"
+ ],
+ "supported_modalities": [
+ "text",
+ "image",
+ "audio"
+ ],
+ "supported_output_modalities": [
+ "text",
+ "audio"
+ ]
+ },
"gpt-4o-realtime-preview-2024-10-01": {
"max_tokens": 4096,
"max_input_tokens": 128000,
@@ -2658,12 +2722,7 @@
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_native_streaming": true,
- "supports_web_search": true,
- "search_context_cost_per_query": {
- "search_context_size_low": 0.03,
- "search_context_size_medium": 0.035,
- "search_context_size_high": 0.05
- }
+ "supports_web_search": false
},
"azure/gpt-4.1-2025-04-14": {
"max_tokens": 32768,
@@ -2696,12 +2755,7 @@
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_native_streaming": true,
- "supports_web_search": true,
- "search_context_cost_per_query": {
- "search_context_size_low": 0.03,
- "search_context_size_medium": 0.035,
- "search_context_size_high": 0.05
- }
+ "supports_web_search": false
},
"azure/gpt-4.1-mini": {
"max_tokens": 32768,
@@ -2734,12 +2788,7 @@
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_native_streaming": true,
- "supports_web_search": true,
- "search_context_cost_per_query": {
- "search_context_size_low": 0.025,
- "search_context_size_medium": 0.0275,
- "search_context_size_high": 0.03
- }
+ "supports_web_search": false
},
"azure/gpt-4.1-mini-2025-04-14": {
"max_tokens": 32768,
@@ -2772,12 +2821,7 @@
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_native_streaming": true,
- "supports_web_search": true,
- "search_context_cost_per_query": {
- "search_context_size_low": 0.025,
- "search_context_size_medium": 0.0275,
- "search_context_size_high": 0.03
- }
+ "supports_web_search": false
},
"azure/gpt-4.1-nano": {
"max_tokens": 32768,
@@ -5618,6 +5662,48 @@
"supports_tool_choice": true,
"supports_web_search": true
},
+ "xai/grok-code-fast-1": {
+ "max_tokens": 256000,
+ "max_input_tokens": 256000,
+ "max_output_tokens": 256000,
+ "input_cost_per_token": 0.2e-06,
+ "output_cost_per_token": 1.5e-06,
+ "cache_read_input_token_cost": 0.02e-06,
+ "litellm_provider": "xai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "source": "https://docs.x.ai/docs/models"
+ },
+ "xai/grok-code-fast": {
+ "max_tokens": 256000,
+ "max_input_tokens": 256000,
+ "max_output_tokens": 256000,
+ "input_cost_per_token": 0.2e-06,
+ "output_cost_per_token": 1.5e-06,
+ "cache_read_input_token_cost": 0.02e-06,
+ "litellm_provider": "xai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "source": "https://docs.x.ai/docs/models"
+ },
+ "xai/grok-code-fast-1-0825": {
+ "max_tokens": 256000,
+ "max_input_tokens": 256000,
+ "max_output_tokens": 256000,
+ "input_cost_per_token": 0.2e-06,
+ "output_cost_per_token": 1.5e-06,
+ "cache_read_input_token_cost": 0.02e-06,
+ "litellm_provider": "xai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "source": "https://docs.x.ai/docs/models"
+ },
"xai/grok-4": {
"max_tokens": 256000,
"max_input_tokens": 256000,
@@ -5731,16 +5817,6 @@
"supports_response_schema": true,
"supports_tool_choice": true
},
- "groq/llama3-8b-8192": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 5e-08,
- "output_cost_per_token": 8e-08,
- "litellm_provider": "groq",
- "mode": "chat",
- "supports_tool_choice": true
- },
"groq/llama-3.2-1b-preview": {
"max_tokens": 8192,
"max_input_tokens": 8192,
@@ -5821,17 +5897,6 @@
"supports_tool_choice": true,
"deprecation_date": "2025-04-14"
},
- "groq/llama3-70b-8192": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 5.9e-07,
- "output_cost_per_token": 7.9e-07,
- "litellm_provider": "groq",
- "mode": "chat",
- "supports_response_schema": true,
- "supports_tool_choice": true
- },
"groq/llama-3.1-8b-instant": {
"max_tokens": 8192,
"max_input_tokens": 128000,
@@ -6092,21 +6157,7 @@
"supports_tool_choice": true,
"source": "https://inference-docs.cerebras.ai/support/pricing"
},
- "cerebras/openai/gpt-oss-20b": {
- "max_tokens": 32768,
- "max_input_tokens": 131072,
- "max_output_tokens": 32768,
- "input_cost_per_token": 7e-08,
- "output_cost_per_token": 3e-07,
- "litellm_provider": "cerebras",
- "mode": "chat",
- "supports_function_calling": true,
- "supports_parallel_function_calling": true,
- "supports_response_schema": true,
- "supports_reasoning": true,
- "supports_tool_choice": true,
- "source": "https://inference-docs.cerebras.ai/support/pricing"
- },
+
"cerebras/openai/gpt-oss-120b": {
"max_tokens": 32768,
"max_input_tokens": 131072,
@@ -7929,6 +7980,54 @@
"cache_read_input_token_cost": 7.5e-08,
"supports_prompt_caching": true
},
+ "gemini/gemini-2.5-flash-image-preview": {
+ "max_tokens": 65535,
+ "max_input_tokens": 1048576,
+ "max_output_tokens": 65535,
+ "max_images_per_prompt": 3000,
+ "max_videos_per_prompt": 10,
+ "max_video_length": 1,
+ "max_audio_length_hours": 8.4,
+ "max_audio_per_prompt": 1,
+ "max_pdf_size_mb": 30,
+ "input_cost_per_audio_token": 1e-06,
+ "input_cost_per_token": 3e-07,
+ "output_cost_per_token": 3e-05,
+ "output_cost_per_reasoning_token": 3e-05,
+ "output_cost_per_image": 0.039,
+ "litellm_provider": "gemini",
+ "mode": "chat",
+ "supports_system_messages": true,
+ "supports_function_calling": true,
+ "supports_vision": true,
+ "supports_response_schema": true,
+ "supports_audio_output": false,
+ "supports_tool_choice": true,
+ "supported_endpoints": [
+ "/v1/chat/completions",
+ "/v1/completions",
+ "/v1/batch"
+ ],
+ "supported_modalities": [
+ "text",
+ "image",
+ "audio",
+ "video"
+ ],
+ "supported_output_modalities": [
+ "text",
+ "image"
+ ],
+ "source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
+ "supports_parallel_function_calling": true,
+ "supports_web_search": true,
+ "supports_url_context": true,
+ "tpm": 8000000,
+ "rpm": 100000,
+ "supports_pdf_input": true,
+ "cache_read_input_token_cost": 7.5e-08,
+ "supports_prompt_caching": true
+ },
"gemini-2.5-flash": {
"max_tokens": 65535,
"max_input_tokens": 1048576,
@@ -8245,6 +8344,54 @@
"cache_read_input_token_cost": 2.5e-08,
"supports_prompt_caching": true
},
+ "gemini-2.5-flash-image-preview": {
+ "max_tokens": 65535,
+ "max_input_tokens": 1048576,
+ "max_output_tokens": 65535,
+ "max_images_per_prompt": 3000,
+ "max_videos_per_prompt": 10,
+ "max_video_length": 1,
+ "max_audio_length_hours": 8.4,
+ "max_audio_per_prompt": 1,
+ "max_pdf_size_mb": 30,
+ "input_cost_per_audio_token": 1e-06,
+ "input_cost_per_token": 3e-07,
+ "output_cost_per_token": 3e-05,
+ "output_cost_per_reasoning_token": 3e-05,
+ "output_cost_per_image": 0.039,
+ "litellm_provider": "vertex_ai-language-models",
+ "mode": "chat",
+ "supports_system_messages": true,
+ "supports_function_calling": true,
+ "supports_vision": true,
+ "supports_response_schema": true,
+ "supports_audio_output": false,
+ "supports_tool_choice": true,
+ "supported_endpoints": [
+ "/v1/chat/completions",
+ "/v1/completions",
+ "/v1/batch"
+ ],
+ "supported_modalities": [
+ "text",
+ "image",
+ "audio",
+ "video"
+ ],
+ "supported_output_modalities": [
+ "text",
+ "image"
+ ],
+ "source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
+ "supports_parallel_function_calling": true,
+ "supports_web_search": true,
+ "supports_url_context": true,
+ "tpm": 8000000,
+ "rpm": 100000,
+ "supports_pdf_input": true,
+ "cache_read_input_token_cost": 7.5e-08,
+ "supports_prompt_caching": true
+ },
"gemini-2.5-flash-preview-05-20": {
"max_tokens": 65535,
"max_input_tokens": 1048576,
@@ -9337,6 +9484,48 @@
"source": "https://aistudio.google.com",
"supports_tool_choice": true
},
+ "gemini/veo-3.0-generate-preview": {
+ "max_tokens": 1024,
+ "max_input_tokens": 1024,
+ "output_cost_per_second": 0.75,
+ "litellm_provider": "gemini",
+ "mode": "video_generation",
+ "supported_modalities": [
+ "text"
+ ],
+ "supported_output_modalities": [
+ "video"
+ ],
+ "source": "https://ai.google.dev/gemini-api/docs/video"
+ },
+ "gemini/veo-3.0-fast-generate-preview": {
+ "max_tokens": 1024,
+ "max_input_tokens": 1024,
+ "output_cost_per_second": 0.40,
+ "litellm_provider": "gemini",
+ "mode": "video_generation",
+ "supported_modalities": [
+ "text"
+ ],
+ "supported_output_modalities": [
+ "video"
+ ],
+ "source": "https://ai.google.dev/gemini-api/docs/video"
+ },
+ "gemini/veo-2.0-generate-001": {
+ "max_tokens": 1024,
+ "max_input_tokens": 1024,
+ "output_cost_per_second": 0.35,
+ "litellm_provider": "gemini",
+ "mode": "video_generation",
+ "supported_modalities": [
+ "text"
+ ],
+ "supported_output_modalities": [
+ "video"
+ ],
+ "source": "https://ai.google.dev/gemini-api/docs/video"
+ },
"vertex_ai/claude-opus-4-1": {
"max_tokens": 4096,
"max_input_tokens": 200000,
@@ -9723,6 +9912,28 @@
"supports_tool_choice": true,
"supports_prompt_caching": true
},
+ "vertex_ai/openai/gpt-oss-20b-maas": {
+ "max_tokens": 32768,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 0.075e-06,
+ "output_cost_per_token": 0.30e-06,
+ "litellm_provider": "vertex_ai-openai_models",
+ "mode": "chat",
+ "supports_reasoning": true,
+ "source": "https://console.cloud.google.com/vertex-ai/publishers/openai/model-garden/gpt-oss-120b-maas"
+ },
+ "vertex_ai/openai/gpt-oss-120b-maas": {
+ "max_tokens": 32768,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 0.15e-06,
+ "output_cost_per_token": 0.60e-06,
+ "litellm_provider": "vertex_ai-openai_models",
+ "mode": "chat",
+ "supports_reasoning": true,
+ "source": "https://console.cloud.google.com/vertex-ai/publishers/openai/model-garden/gpt-oss-120b-maas"
+ },
"vertex_ai/qwen/qwen3-coder-480b-a35b-instruct-maas": {
"max_tokens": 32768,
"max_input_tokens": 262144,
@@ -10102,18 +10313,6 @@
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
},
- "vertex_ai/imagen-4.0-generate-preview-06-06": {
- "output_cost_per_image": 0.04,
- "litellm_provider": "vertex_ai-image-models",
- "mode": "image_generation",
- "source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
- "vertex_ai/imagen-4.0-ultra-generate-preview-06-06": {
- "output_cost_per_image": 0.06,
- "litellm_provider": "vertex_ai-image-models",
- "mode": "image_generation",
- "source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
"vertex_ai/imagen-4.0-ultra-generate-001": {
"output_cost_per_image": 0.06,
"litellm_provider": "vertex_ai-image-models",
@@ -10126,12 +10325,6 @@
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
},
- "vertex_ai/imagen-4.0-fast-generate-preview-06-06": {
- "output_cost_per_image": 0.02,
- "litellm_provider": "vertex_ai-image-models",
- "mode": "image_generation",
- "source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
"vertex_ai/imagen-3.0-generate-002": {
"output_cost_per_image": 0.04,
"litellm_provider": "vertex_ai-image-models",
@@ -10150,6 +10343,48 @@
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
},
+ "vertex_ai/veo-3.0-generate-preview": {
+ "max_tokens": 1024,
+ "max_input_tokens": 1024,
+ "output_cost_per_second": 0.75,
+ "litellm_provider": "vertex_ai-video-models",
+ "mode": "video_generation",
+ "supported_modalities": [
+ "text"
+ ],
+ "supported_output_modalities": [
+ "video"
+ ],
+ "source": "https://ai.google.dev/gemini-api/docs/video"
+ },
+ "vertex_ai/veo-3.0-fast-generate-preview": {
+ "max_tokens": 1024,
+ "max_input_tokens": 1024,
+ "output_cost_per_second": 0.40,
+ "litellm_provider": "vertex_ai-video-models",
+ "mode": "video_generation",
+ "supported_modalities": [
+ "text"
+ ],
+ "supported_output_modalities": [
+ "video"
+ ],
+ "source": "https://ai.google.dev/gemini-api/docs/video"
+ },
+ "vertex_ai/veo-2.0-generate-001": {
+ "max_tokens": 1024,
+ "max_input_tokens": 1024,
+ "output_cost_per_second": 0.35,
+ "litellm_provider": "vertex_ai-video-models",
+ "mode": "video_generation",
+ "supported_modalities": [
+ "text"
+ ],
+ "supported_output_modalities": [
+ "video"
+ ],
+ "source": "https://ai.google.dev/gemini-api/docs/video"
+ },
"text-embedding-004": {
"max_tokens": 2048,
"max_input_tokens": 2048,
@@ -10838,36 +11073,18 @@
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
},
- "gemini/imagen-4.0-generate-preview-06-06": {
- "output_cost_per_image": 0.04,
- "litellm_provider": "gemini",
- "mode": "image_generation",
- "source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
"gemini/imagen-4.0-ultra-generate-001": {
"output_cost_per_image": 0.06,
"litellm_provider": "gemini",
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
},
- "gemini/imagen-4.0-ultra-generate-preview-06-06": {
- "output_cost_per_image": 0.06,
- "litellm_provider": "gemini",
- "mode": "image_generation",
- "source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
"gemini/imagen-4.0-fast-generate-001": {
"output_cost_per_image": 0.02,
"litellm_provider": "gemini",
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
},
- "gemini/imagen-4.0-fast-generate-preview-06-06": {
- "output_cost_per_image": 0.02,
- "litellm_provider": "gemini",
- "mode": "image_generation",
- "source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
"gemini/imagen-3.0-generate-002": {
"output_cost_per_image": 0.04,
"litellm_provider": "gemini",
@@ -11236,6 +11453,21 @@
"supports_tool_choice": true,
"supports_prompt_caching": true
},
+ "openrouter/deepseek/deepseek-chat-v3.1": {
+ "max_tokens": 8192,
+ "max_input_tokens": 163840,
+ "max_output_tokens": 163840,
+ "input_cost_per_token": 2e-07,
+ "input_cost_per_token_cache_hit": 2e-08,
+ "output_cost_per_token": 8e-07,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_assistant_prefill": true,
+ "supports_reasoning": true,
+ "supports_tool_choice": true,
+ "supports_prompt_caching": true
+ },
"openrouter/x-ai/grok-4": {
"max_tokens": 256000,
"max_input_tokens": 256000,
@@ -11496,9 +11728,9 @@
},
"openrouter/anthropic/claude-3.7-sonnet": {
"supports_computer_use": true,
- "max_tokens": 8192,
+ "max_tokens": 128000,
"max_input_tokens": 200000,
- "max_output_tokens": 8192,
+ "max_output_tokens": 128000,
"input_cost_per_token": 3e-06,
"output_cost_per_token": 1.5e-05,
"input_cost_per_image": 0.0048,
@@ -11513,9 +11745,9 @@
},
"openrouter/anthropic/claude-3.7-sonnet:beta": {
"supports_computer_use": true,
- "max_tokens": 8192,
+ "max_tokens": 128000,
"max_input_tokens": 200000,
- "max_output_tokens": 8192,
+ "max_output_tokens": 128000,
"input_cost_per_token": 3e-06,
"output_cost_per_token": 1.5e-05,
"input_cost_per_image": 0.0048,
@@ -11555,6 +11787,40 @@
"supports_assistant_prefill": true,
"supports_tool_choice": true
},
+ "openrouter/anthropic/claude-opus-4": {
+ "max_tokens": 32000,
+ "max_input_tokens": 200000,
+ "max_output_tokens": 32000,
+ "input_cost_per_token": 1.5e-05,
+ "output_cost_per_token": 7.5e-05,
+ "input_cost_per_image": 0.0048,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_vision": true,
+ "tool_use_system_prompt_tokens": 159,
+ "supports_assistant_prefill": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "supports_computer_use": true
+ },
+ "openrouter/anthropic/claude-opus-4.1": {
+ "max_tokens": 32000,
+ "max_input_tokens": 200000,
+ "max_output_tokens": 32000,
+ "input_cost_per_token": 1.5e-05,
+ "output_cost_per_token": 7.5e-05,
+ "input_cost_per_image": 0.0048,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_vision": true,
+ "tool_use_system_prompt_tokens": 159,
+ "supports_assistant_prefill": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "supports_computer_use": true
+ },
"openrouter/mistralai/mistral-large": {
"max_tokens": 32000,
"input_cost_per_token": 8e-06,
@@ -11796,6 +12062,165 @@
"mode": "chat",
"supports_tool_choice": true
},
+ "openrouter/openai/gpt-4.1": {
+ "max_tokens": 32768,
+ "max_input_tokens": 1047576,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 8e-06,
+ "cache_read_input_token_cost": 5e-07,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "openrouter/openai/gpt-4.1-2025-04-14": {
+ "max_tokens": 32768,
+ "max_input_tokens": 1047576,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 8e-06,
+ "cache_read_input_token_cost": 5e-07,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "openrouter/openai/gpt-4.1-mini": {
+ "max_tokens": 32768,
+ "max_input_tokens": 1047576,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 4e-07,
+ "output_cost_per_token": 1.6e-06,
+ "cache_read_input_token_cost": 1e-07,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "openrouter/openai/gpt-4.1-mini-2025-04-14": {
+ "max_tokens": 32768,
+ "max_input_tokens": 1047576,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 4e-07,
+ "output_cost_per_token": 1.6e-06,
+ "cache_read_input_token_cost": 1e-07,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "openrouter/openai/gpt-4.1-nano": {
+ "max_tokens": 32768,
+ "max_input_tokens": 1047576,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 4e-07,
+ "cache_read_input_token_cost": 2.5e-08,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "openrouter/openai/gpt-4.1-nano-2025-04-14": {
+ "max_tokens": 32768,
+ "max_input_tokens": 1047576,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 4e-07,
+ "cache_read_input_token_cost": 2.5e-08,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "openrouter/openai/gpt-5-mini": {
+ "max_tokens": 128000,
+ "max_input_tokens": 400000,
+ "max_output_tokens": 128000,
+ "input_cost_per_token": 2.5e-07,
+ "output_cost_per_token": 2e-06,
+ "cache_read_input_token_cost": 2.5e-08,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supported_modalities": [
+ "text",
+ "image"
+ ],
+ "supported_output_modalities": [
+ "text"
+ ],
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
+ "openrouter/openai/gpt-5-nano": {
+ "max_tokens": 128000,
+ "max_input_tokens": 400000,
+ "max_output_tokens": 128000,
+ "input_cost_per_token": 5e-08,
+ "output_cost_per_token": 4e-07,
+ "cache_read_input_token_cost": 5e-09,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supported_modalities": [
+ "text",
+ "image"
+ ],
+ "supported_output_modalities": [
+ "text"
+ ],
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
+ "openrouter/openai/gpt-5-chat": {
+ "max_tokens": 128000,
+ "max_input_tokens": 400000,
+ "max_output_tokens": 128000,
+ "input_cost_per_token": 1.25e-06,
+ "output_cost_per_token": 1e-05,
+ "cache_read_input_token_cost": 1.25e-07,
+ "litellm_provider": "openrouter",
+ "mode": "chat",
+ "supported_modalities": [
+ "text",
+ "image"
+ ],
+ "supported_output_modalities": [
+ "text"
+ ],
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
"openrouter/openai/gpt-oss-20b": {
"max_tokens": 32768,
"max_input_tokens": 131072,
@@ -12698,6 +13123,7 @@
"mode": "chat",
"supports_response_schema": true,
"supports_tool_choice": true,
+ "supports_function_calling": true,
"supports_reasoning": true
},
"openai.gpt-oss-120b-1:0": {
@@ -12710,6 +13136,7 @@
"mode": "chat",
"supports_response_schema": true,
"supports_tool_choice": true,
+ "supports_function_calling": true,
"supports_reasoning": true
},
"anthropic.claude-opus-4-1-20250805-v1:0": {
@@ -13452,136 +13879,6 @@
"litellm_provider": "bedrock",
"mode": "chat"
},
- "anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_token": 8e-06,
- "output_cost_per_token": 2.4e-05,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/us-east-1/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_token": 8e-06,
- "output_cost_per_token": 2.4e-05,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/us-west-2/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_token": 8e-06,
- "output_cost_per_token": 2.4e-05,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/ap-northeast-1/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_token": 8e-06,
- "output_cost_per_token": 2.4e-05,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/ap-northeast-1/1-month-commitment/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_second": 0.0455,
- "output_cost_per_second": 0.0455,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/ap-northeast-1/6-month-commitment/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_second": 0.02527,
- "output_cost_per_second": 0.02527,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/eu-central-1/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_token": 8e-06,
- "output_cost_per_token": 2.4e-05,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/eu-central-1/1-month-commitment/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_second": 0.0415,
- "output_cost_per_second": 0.0415,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/eu-central-1/6-month-commitment/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_second": 0.02305,
- "output_cost_per_second": 0.02305,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/us-east-1/1-month-commitment/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_second": 0.0175,
- "output_cost_per_second": 0.0175,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/us-east-1/6-month-commitment/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_second": 0.00972,
- "output_cost_per_second": 0.00972,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/us-west-2/1-month-commitment/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_second": 0.0175,
- "output_cost_per_second": 0.0175,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "bedrock/us-west-2/6-month-commitment/anthropic.claude-v2": {
- "max_tokens": 8191,
- "max_input_tokens": 100000,
- "max_output_tokens": 8191,
- "input_cost_per_second": 0.00972,
- "output_cost_per_second": 0.00972,
- "litellm_provider": "bedrock",
- "mode": "chat",
- "supports_tool_choice": true
- },
"anthropic.claude-v2:1": {
"max_tokens": 8191,
"max_input_tokens": 100000,
@@ -14718,10 +15015,10 @@
"output_cost_per_token": 6e-06,
"max_input_tokens": 262000,
"litellm_provider": "together_ai",
- "supports_function_calling": false,
- "supports_parallel_function_calling": false,
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
"mode": "chat",
- "supports_tool_choice": false,
+ "supports_tool_choice": true,
"source": "https://www.together.ai/models/qwen3-235b-a22b-instruct-2507-fp8"
},
"together_ai/Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": {
@@ -14729,10 +15026,10 @@
"output_cost_per_token": 2e-06,
"max_input_tokens": 256000,
"litellm_provider": "together_ai",
- "supports_function_calling": false,
- "supports_parallel_function_calling": false,
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
"mode": "chat",
- "supports_tool_choice": false,
+ "supports_tool_choice": true,
"source": "https://www.together.ai/models/qwen3-coder-480b-a35b-instruct"
},
"together_ai/Qwen/Qwen3-235B-A22B-Thinking-2507": {
@@ -14740,10 +15037,10 @@
"output_cost_per_token": 3e-06,
"max_input_tokens": 256000,
"litellm_provider": "together_ai",
- "supports_function_calling": false,
- "supports_parallel_function_calling": false,
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
"mode": "chat",
- "supports_tool_choice": false,
+ "supports_tool_choice": true,
"source": "https://www.together.ai/models/qwen3-235b-a22b-thinking-2507"
},
"together_ai/Qwen/Qwen3-235B-A22B-fp8-tput": {
@@ -14786,10 +15083,10 @@
"output_cost_per_token": 2.19e-06,
"max_input_tokens": 128000,
"litellm_provider": "together_ai",
- "supports_function_calling": false,
- "supports_parallel_function_calling": false,
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
"mode": "chat",
- "supports_tool_choice": false,
+ "supports_tool_choice": true,
"source": "https://www.together.ai/models/deepseek-r1-0528-throughput"
},
"together_ai/mistralai/Mistral-Small-24B-Instruct-2501": {
@@ -14814,20 +15111,20 @@
"output_cost_per_token": 6e-07,
"max_input_tokens": 128000,
"litellm_provider": "together_ai",
- "supports_function_calling": false,
- "supports_tool_choice": false,
- "supports_parallel_function_calling": false,
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_parallel_function_calling": true,
"mode": "chat",
"source": "https://www.together.ai/models/gpt-oss-120b"
},
- "together_ai/OpenAI/gpt-oss-20B": {
+ "together_ai/openai/gpt-oss-20b": {
"input_cost_per_token": 5e-08,
"output_cost_per_token": 2e-07,
"max_input_tokens": 128000,
"litellm_provider": "together_ai",
- "supports_function_calling": false,
- "supports_tool_choice": false,
- "supports_parallel_function_calling": false,
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_parallel_function_calling": true,
"mode": "chat",
"source": "https://www.together.ai/models/gpt-oss-20b"
},
@@ -14836,12 +15133,24 @@
"output_cost_per_token": 1.1e-06,
"max_input_tokens": 128000,
"litellm_provider": "together_ai",
- "supports_function_calling": false,
- "supports_tool_choice": false,
- "supports_parallel_function_calling": false,
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_parallel_function_calling": true,
"mode": "chat",
"source": "https://www.together.ai/models/glm-4-5-air"
},
+ "together_ai/deepseek-ai/DeepSeek-V3.1": {
+ "input_cost_per_token": 0.6e-06,
+ "output_cost_per_token": 1.7e-06,
+ "max_tokens": 128000,
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_reasoning": true,
+ "mode": "chat",
+ "supports_tool_choice": true,
+ "source": "https://www.together.ai/models/deepseek-v3-1"
+ },
"ollama/codegemma": {
"max_tokens": 8192,
"max_input_tokens": 8192,
@@ -15080,236 +15389,16 @@
"litellm_provider": "ollama",
"mode": "completion"
},
- "deepinfra/deepseek-ai/DeepSeek-V3": {
- "max_tokens": 163840,
- "max_input_tokens": 163840,
- "max_output_tokens": 163840,
- "input_cost_per_token": 3.8e-07,
- "output_cost_per_token": 8.9e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Phind/Phind-CodeLlama-34B-v2": {
+ "deepinfra/Austism/chronos-hermes-13b-v2": {
"max_tokens": 4096,
"max_input_tokens": 4096,
"max_output_tokens": 4096,
- "input_cost_per_token": 6e-07,
- "output_cost_per_token": 6e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 1.5e-08,
- "output_cost_per_token": 2e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/google/gemma-2-9b-it": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 3e-08,
- "output_cost_per_token": 6e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/deepseek-ai/DeepSeek-R1-0528-Turbo": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 1e-06,
- "output_cost_per_token": 3e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Qwen/Qwen2-7B-Instruct": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 5.5e-08,
- "output_cost_per_token": 5.5e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Qwen/QVQ-72B-Preview": {
- "max_tokens": 32000,
- "max_input_tokens": 32000,
- "max_output_tokens": 32000,
- "input_cost_per_token": 2.5e-07,
- "output_cost_per_token": 5e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/meta-llama/Llama-3.3-70B-Instruct": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 2.3e-07,
- "output_cost_per_token": 4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/microsoft/Phi-4-multimodal-instruct": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 5e-08,
- "output_cost_per_token": 1e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/mistralai/Devstral-Small-2507": {
- "max_tokens": 128000,
- "max_input_tokens": 128000,
- "max_output_tokens": 128000,
- "input_cost_per_token": 7e-08,
- "output_cost_per_token": 2.8e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/microsoft/WizardLM-2-7B": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 5.5e-08,
- "output_cost_per_token": 5.5e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/meta-llama/Llama-3.2-90B-Vision-Instruct": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 3.5e-07,
- "output_cost_per_token": 4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/mistralai/Mistral-Small-3.2-24B-Instruct-2506": {
- "max_tokens": 128000,
- "max_input_tokens": 128000,
- "max_output_tokens": 128000,
- "input_cost_per_token": 5e-08,
- "output_cost_per_token": 1e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/deepseek-ai/DeepSeek-V3-0324": {
- "max_tokens": 163840,
- "max_input_tokens": 163840,
- "max_output_tokens": 163840,
- "input_cost_per_token": 2.8e-07,
- "output_cost_per_token": 8.8e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/mistralai/Mixtral-8x7B-Instruct-v0.1": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 8e-08,
- "output_cost_per_token": 2.4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/anthropic/claude-3-7-sonnet-latest": {
- "max_tokens": 200000,
- "max_input_tokens": 200000,
- "max_output_tokens": 200000,
- "input_cost_per_token": 3.3e-06,
- "output_cost_per_token": 1.65e-05,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/cognitivecomputations/dolphin-2.9.1-llama-3-70b": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 3.5e-07,
- "output_cost_per_token": 4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/Qwen/Qwen2.5-Coder-32B-Instruct": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 6e-08,
- "output_cost_per_token": 1.5e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/Qwen/Qwen3-235B-A22B": {
- "max_tokens": 40960,
- "max_input_tokens": 40960,
- "max_output_tokens": 40960,
"input_cost_per_token": 1.3e-07,
- "output_cost_per_token": 6e-07,
+ "output_cost_per_token": 1.3e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/deepseek-ai/DeepSeek-V3-0324-Turbo": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 1e-06,
- "output_cost_per_token": 3e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/microsoft/WizardLM-2-8x22B": {
- "max_tokens": 65536,
- "max_input_tokens": 65536,
- "max_output_tokens": 65536,
- "input_cost_per_token": 4.8e-07,
- "output_cost_per_token": 4.8e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/Sao10K/L3-8B-Lunaris-v1-Turbo": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 2e-08,
- "output_cost_per_token": 5e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/meta-llama/Llama-Guard-4-12B": {
- "max_tokens": 163840,
- "max_input_tokens": 163840,
- "max_output_tokens": 163840,
- "input_cost_per_token": 1.8e-07,
- "output_cost_per_token": 1.8e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
"deepinfra/Gryphe/MythoMax-L2-13b": {
"max_tokens": 4096,
"max_input_tokens": 4096,
@@ -15320,72 +15409,32 @@
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/meta-llama/Llama-3.2-1B-Instruct": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 5e-09,
- "output_cost_per_token": 1e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/google/gemma-2-27b-it": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 2.7e-07,
- "output_cost_per_token": 2.7e-07,
+ "deepinfra/Gryphe/MythoMax-L2-13b-turbo": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "max_output_tokens": 4096,
+ "input_cost_per_token": 1.3e-07,
+ "output_cost_per_token": 1.3e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": false
},
- "deepinfra/Qwen/Qwen2.5-VL-32B-Instruct": {
- "max_tokens": 128000,
- "max_input_tokens": 128000,
- "max_output_tokens": 128000,
- "input_cost_per_token": 2e-07,
- "output_cost_per_token": 6e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/nvidia/Llama-3.1-Nemotron-70B-Instruct": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 1.2e-07,
- "output_cost_per_token": 3e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/mistralai/Mixtral-8x22B-Instruct-v0.1": {
- "max_tokens": 65536,
- "max_input_tokens": 65536,
- "max_output_tokens": 65536,
- "input_cost_per_token": 6.5e-07,
- "output_cost_per_token": 6.5e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Qwen/Qwen2.5-7B-Instruct": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 4e-08,
+ "deepinfra/KoboldAI/LLaMA2-13B-Tiefighter": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "max_output_tokens": 4096,
+ "input_cost_per_token": 1e-07,
"output_cost_per_token": 1e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
- "supports_tool_choice": false
+ "supports_tool_choice": true
},
- "deepinfra/google/gemini-1.5-flash-8b": {
- "max_tokens": 1000000,
- "max_input_tokens": 1000000,
- "max_output_tokens": 1000000,
- "input_cost_per_token": 3.75e-08,
- "output_cost_per_token": 1.5e-07,
+ "deepinfra/NousResearch/Hermes-3-Llama-3.1-405B": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 7e-07,
+ "output_cost_per_token": 8e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
@@ -15400,6 +15449,380 @@
"mode": "chat",
"supports_tool_choice": true
},
+ "deepinfra/NovaSky-AI/Sky-T1-32B-Preview": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 1.2e-07,
+ "output_cost_per_token": 1.8e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Phind/Phind-CodeLlama-34B-v2": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "max_output_tokens": 4096,
+ "input_cost_per_token": 6e-07,
+ "output_cost_per_token": 6e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/QVQ-72B-Preview": {
+ "max_tokens": 32000,
+ "max_input_tokens": 32000,
+ "max_output_tokens": 32000,
+ "input_cost_per_token": 2.5e-07,
+ "output_cost_per_token": 5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Qwen/QwQ-32B": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 7.5e-08,
+ "output_cost_per_token": 1.5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/QwQ-32B-Preview": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 1.2e-07,
+ "output_cost_per_token": 1.8e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Qwen/Qwen2-72B-Instruct": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 3.5e-07,
+ "output_cost_per_token": 4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen2-7B-Instruct": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 5.5e-08,
+ "output_cost_per_token": 5.5e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen2.5-72B-Instruct": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 1.2e-07,
+ "output_cost_per_token": 3.9e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen2.5-7B-Instruct": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 4e-08,
+ "output_cost_per_token": 1e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Qwen/Qwen2.5-Coder-32B-Instruct": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 6e-08,
+ "output_cost_per_token": 1.5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Qwen/Qwen2.5-Coder-7B": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 2.5e-08,
+ "output_cost_per_token": 5e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Qwen/Qwen2.5-VL-32B-Instruct": {
+ "max_tokens": 128000,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 128000,
+ "input_cost_per_token": 2e-07,
+ "output_cost_per_token": 6e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen3-14B": {
+ "max_tokens": 40960,
+ "max_input_tokens": 40960,
+ "max_output_tokens": 40960,
+ "input_cost_per_token": 6e-08,
+ "output_cost_per_token": 2.4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen3-235B-A22B": {
+ "max_tokens": 40960,
+ "max_input_tokens": 40960,
+ "max_output_tokens": 40960,
+ "input_cost_per_token": 1.3e-07,
+ "output_cost_per_token": 6e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen3-235B-A22B-Instruct-2507": {
+ "max_tokens": 262144,
+ "max_input_tokens": 262144,
+ "max_output_tokens": 262144,
+ "input_cost_per_token": 1.3e-07,
+ "output_cost_per_token": 6e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen3-235B-A22B-Thinking-2507": {
+ "max_tokens": 262144,
+ "max_input_tokens": 262144,
+ "max_output_tokens": 262144,
+ "input_cost_per_token": 1.3e-07,
+ "output_cost_per_token": 6e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen3-30B-A3B": {
+ "max_tokens": 40960,
+ "max_input_tokens": 40960,
+ "max_output_tokens": 40960,
+ "input_cost_per_token": 8e-08,
+ "output_cost_per_token": 2.9e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen3-32B": {
+ "max_tokens": 40960,
+ "max_input_tokens": 40960,
+ "max_output_tokens": 40960,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 3e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen3-Coder-480B-A35B-Instruct": {
+ "max_tokens": 262144,
+ "max_input_tokens": 262144,
+ "max_output_tokens": 262144,
+ "input_cost_per_token": 4e-07,
+ "output_cost_per_token": 1.6e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo": {
+ "max_tokens": 262144,
+ "max_input_tokens": 262144,
+ "max_output_tokens": 262144,
+ "input_cost_per_token": 3e-07,
+ "output_cost_per_token": 1.2e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/Sao10K/L3-70B-Euryale-v2.1": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 7e-07,
+ "output_cost_per_token": 8e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Sao10K/L3-8B-Lunaris-v1": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 3e-08,
+ "output_cost_per_token": 6e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Sao10K/L3-8B-Lunaris-v1-Turbo": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 2e-08,
+ "output_cost_per_token": 5e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Sao10K/L3.1-70B-Euryale-v2.2": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 6.5e-07,
+ "output_cost_per_token": 7.5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/Sao10K/L3.3-70B-Euryale-v2.3": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 6.5e-07,
+ "output_cost_per_token": 7.5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/allenai/olmOCR-7B-0725-FP8": {
+ "max_tokens": 16384,
+ "max_input_tokens": 16384,
+ "max_output_tokens": 16384,
+ "input_cost_per_token": 2.7e-07,
+ "output_cost_per_token": 1.5e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/anthropic/claude-3-7-sonnet-latest": {
+ "max_tokens": 200000,
+ "max_input_tokens": 200000,
+ "max_output_tokens": 200000,
+ "input_cost_per_token": 3.3e-06,
+ "output_cost_per_token": 1.65e-05,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/anthropic/claude-4-opus": {
+ "max_tokens": 200000,
+ "max_input_tokens": 200000,
+ "max_output_tokens": 200000,
+ "input_cost_per_token": 1.65e-05,
+ "output_cost_per_token": 8.25e-05,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/anthropic/claude-4-sonnet": {
+ "max_tokens": 200000,
+ "max_input_tokens": 200000,
+ "max_output_tokens": 200000,
+ "input_cost_per_token": 3.3e-06,
+ "output_cost_per_token": 1.65e-05,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/bigcode/starcoder2-15b-instruct-v0.1": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "max_output_tokens": 4096,
+ "input_cost_per_token": 1.5e-07,
+ "output_cost_per_token": 1.5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/cognitivecomputations/dolphin-2.6-mixtral-8x7b": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 2.4e-07,
+ "output_cost_per_token": 2.4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/cognitivecomputations/dolphin-2.9.1-llama-3-70b": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 3.5e-07,
+ "output_cost_per_token": 4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/deepinfra/airoboros-70b": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "max_output_tokens": 4096,
+ "input_cost_per_token": 7e-07,
+ "output_cost_per_token": 9e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/deepseek-ai/DeepSeek-Prover-V2-671B": {
+ "max_tokens": 163840,
+ "max_input_tokens": 163840,
+ "max_output_tokens": 163840,
+ "input_cost_per_token": 5e-07,
+ "output_cost_per_token": 2.18e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false,
+ "supports_reasoning": true
+ },
+ "deepinfra/deepseek-ai/DeepSeek-R1": {
+ "max_tokens": 163840,
+ "max_input_tokens": 163840,
+ "max_output_tokens": 163840,
+ "input_cost_per_token": 4.5e-07,
+ "output_cost_per_token": 2.15e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
+ "deepinfra/deepseek-ai/DeepSeek-R1-0528": {
+ "max_tokens": 163840,
+ "max_input_tokens": 163840,
+ "max_output_tokens": 163840,
+ "input_cost_per_token": 5e-07,
+ "output_cost_per_token": 2.15e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
+ "deepinfra/deepseek-ai/DeepSeek-R1-0528-Turbo": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 1e-06,
+ "output_cost_per_token": 3e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
"deepinfra/deepseek-ai/DeepSeek-R1-Distill-Llama-70B": {
"max_tokens": 131072,
"max_input_tokens": 131072,
@@ -15408,24 +15831,191 @@
"output_cost_per_token": 4e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
- "supports_tool_choice": false
+ "supports_tool_choice": false,
+ "supports_reasoning": true
},
- "deepinfra/meta-llama/Llama-Guard-3-8B": {
+ "deepinfra/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B": {
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
- "input_cost_per_token": 5.5e-08,
- "output_cost_per_token": 5.5e-08,
+ "input_cost_per_token": 7.5e-08,
+ "output_cost_per_token": 1.5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
+ "deepinfra/deepseek-ai/DeepSeek-R1-Turbo": {
+ "max_tokens": 163840,
+ "max_input_tokens": 163840,
+ "max_output_tokens": 163840,
+ "input_cost_per_token": 1e-06,
+ "output_cost_per_token": 3e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
+ "deepinfra/deepseek-ai/DeepSeek-V3": {
+ "max_tokens": 163840,
+ "max_input_tokens": 163840,
+ "max_output_tokens": 163840,
+ "input_cost_per_token": 3.8e-07,
+ "output_cost_per_token": 8.9e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
+ "deepinfra/deepseek-ai/DeepSeek-V3-0324": {
+ "max_tokens": 163840,
+ "max_input_tokens": 163840,
+ "max_output_tokens": 163840,
+ "input_cost_per_token": 2.8e-07,
+ "output_cost_per_token": 8.8e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
+ "deepinfra/deepseek-ai/DeepSeek-V3-0324-Turbo": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 1e-06,
+ "output_cost_per_token": 3e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true,
+ "supports_reasoning": true
+ },
+ "deepinfra/deepseek-ai/DeepSeek-V3.1": {
+ "max_tokens": 163840,
+ "max_input_tokens": 163840,
+ "max_output_tokens": 163840,
+ "input_cost_per_token": 3e-07,
+ "output_cost_per_token": 1e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false,
+ "supports_reasoning": true
+ },
+ "deepinfra/google/codegemma-7b-it": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 7e-08,
+ "output_cost_per_token": 7e-08,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": false
},
- "deepinfra/mistralai/Mistral-Small-24B-Instruct-2501": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
+ "deepinfra/google/gemini-1.5-flash": {
+ "max_tokens": 1000000,
+ "max_input_tokens": 1000000,
+ "max_output_tokens": 1000000,
+ "input_cost_per_token": 7.5e-08,
+ "output_cost_per_token": 3e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/google/gemini-1.5-flash-8b": {
+ "max_tokens": 1000000,
+ "max_input_tokens": 1000000,
+ "max_output_tokens": 1000000,
+ "input_cost_per_token": 3.75e-08,
+ "output_cost_per_token": 1.5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/google/gemini-2.0-flash-001": {
+ "max_tokens": 1000000,
+ "max_input_tokens": 1000000,
+ "max_output_tokens": 1000000,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/google/gemini-2.5-flash": {
+ "max_tokens": 1000000,
+ "max_input_tokens": 1000000,
+ "max_output_tokens": 1000000,
+ "input_cost_per_token": 2.1e-07,
+ "output_cost_per_token": 1.75e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/google/gemini-2.5-pro": {
+ "max_tokens": 1000000,
+ "max_input_tokens": 1000000,
+ "max_output_tokens": 1000000,
+ "input_cost_per_token": 8.75e-07,
+ "output_cost_per_token": 7e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/google/gemma-1.1-7b-it": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 7e-08,
+ "output_cost_per_token": 7e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/google/gemma-2-27b-it": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 2.7e-07,
+ "output_cost_per_token": 2.7e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/google/gemma-2-9b-it": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 3e-08,
+ "output_cost_per_token": 6e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/google/gemma-3-12b-it": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
"input_cost_per_token": 5e-08,
- "output_cost_per_token": 8e-08,
+ "output_cost_per_token": 1e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/google/gemma-3-27b-it": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 9e-08,
+ "output_cost_per_token": 1.7e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/google/gemma-3-4b-it": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 2e-08,
+ "output_cost_per_token": 4e-08,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
@@ -15440,6 +16030,16 @@
"mode": "chat",
"supports_tool_choice": false
},
+ "deepinfra/mattshumer/Reflection-Llama-3.1-70B": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 3.5e-07,
+ "output_cost_per_token": 4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
"deepinfra/meta-llama/Llama-2-13b-chat-hf": {
"max_tokens": 4096,
"max_input_tokens": 4096,
@@ -15450,182 +16050,32 @@
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/anthropic/claude-4-opus": {
- "max_tokens": 200000,
- "max_input_tokens": 200000,
- "max_output_tokens": 200000,
- "input_cost_per_token": 1.65e-05,
- "output_cost_per_token": 8.25e-05,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/openchat/openchat-3.6-8b": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 5.5e-08,
- "output_cost_per_token": 5.5e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/google/gemma-3-27b-it": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 9e-08,
- "output_cost_per_token": 1.7e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Austism/chronos-hermes-13b-v2": {
+ "deepinfra/meta-llama/Llama-2-70b-chat-hf": {
"max_tokens": 4096,
"max_input_tokens": 4096,
"max_output_tokens": 4096,
- "input_cost_per_token": 1.3e-07,
- "output_cost_per_token": 1.3e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Sao10K/L3.1-70B-Euryale-v2.2": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 6.5e-07,
- "output_cost_per_token": 7.5e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/Qwen/QwQ-32B-Preview": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 1.2e-07,
- "output_cost_per_token": 1.8e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/anthropic/claude-4-sonnet": {
- "max_tokens": 200000,
- "max_input_tokens": 200000,
- "max_output_tokens": 200000,
- "input_cost_per_token": 3.3e-06,
- "output_cost_per_token": 1.65e-05,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/microsoft/Phi-3-medium-4k-instruct": {
- "max_tokens": 4096,
- "max_input_tokens": 4096,
- "max_output_tokens": 4096,
- "input_cost_per_token": 1.4e-07,
- "output_cost_per_token": 1.4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/mattshumer/Reflection-Llama-3.1-70B": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 3.5e-07,
- "output_cost_per_token": 4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/openchat/openchat_3.5": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 5.5e-08,
- "output_cost_per_token": 5.5e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Sao10K/L3.3-70B-Euryale-v2.3": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 6.5e-07,
- "output_cost_per_token": 7.5e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/meta-llama/Meta-Llama-3.1-70B-Instruct": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 2.3e-07,
- "output_cost_per_token": 4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/deepseek-ai/DeepSeek-V3.1": {
- "max_tokens": 163840,
- "max_input_tokens": 163840,
- "max_output_tokens": 163840,
- "input_cost_per_token": 3.2e-07,
- "output_cost_per_token": 1.15e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/Qwen/Qwen2.5-Coder-7B": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 2.5e-08,
- "output_cost_per_token": 5e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/cognitivecomputations/dolphin-2.6-mixtral-8x7b": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 2.4e-07,
- "output_cost_per_token": 2.4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/meta-llama/Meta-Llama-3.1-405B-Instruct": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 8e-07,
+ "input_cost_per_token": 6.4e-07,
"output_cost_per_token": 8e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/deepseek-ai/DeepSeek-Prover-V2-671B": {
- "max_tokens": 163840,
- "max_input_tokens": 163840,
- "max_output_tokens": 163840,
- "input_cost_per_token": 5e-07,
- "output_cost_per_token": 2.18e-06,
+ "deepinfra/meta-llama/Llama-3.2-11B-Vision-Instruct": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 4.9e-08,
+ "output_cost_per_token": 4.9e-08,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": false
},
- "deepinfra/zai-org/GLM-4.5": {
+ "deepinfra/meta-llama/Llama-3.2-1B-Instruct": {
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
- "input_cost_per_token": 5.5e-07,
- "output_cost_per_token": 2e-06,
+ "input_cost_per_token": 5e-09,
+ "output_cost_per_token": 1e-08,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
@@ -15640,276 +16090,36 @@
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/meta-llama/Meta-Llama-3-70B-Instruct": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 3e-07,
+ "deepinfra/meta-llama/Llama-3.2-90B-Vision-Instruct": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 3.5e-07,
+ "output_cost_per_token": 4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/meta-llama/Llama-3.3-70B-Instruct": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 2.3e-07,
"output_cost_per_token": 4e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/google/gemini-1.5-flash": {
- "max_tokens": 1000000,
- "max_input_tokens": 1000000,
- "max_output_tokens": 1000000,
- "input_cost_per_token": 7.5e-08,
- "output_cost_per_token": 3e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/KoboldAI/LLaMA2-13B-Tiefighter": {
- "max_tokens": 4096,
- "max_input_tokens": 4096,
- "max_output_tokens": 4096,
- "input_cost_per_token": 1e-07,
- "output_cost_per_token": 1e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/google/gemini-2.5-pro": {
- "max_tokens": 1000000,
- "max_input_tokens": 1000000,
- "max_output_tokens": 1000000,
- "input_cost_per_token": 8.75e-07,
- "output_cost_per_token": 7e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Qwen/Qwen3-30B-A3B": {
- "max_tokens": 40960,
- "max_input_tokens": 40960,
- "max_output_tokens": 40960,
- "input_cost_per_token": 8e-08,
- "output_cost_per_token": 2.9e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Qwen/QwQ-32B": {
+ "deepinfra/meta-llama/Llama-3.3-70B-Instruct-Turbo": {
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
- "input_cost_per_token": 7.5e-08,
- "output_cost_per_token": 1.5e-07,
+ "input_cost_per_token": 3.8e-08,
+ "output_cost_per_token": 1.2e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/moonshotai/Kimi-K2-Instruct": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 5e-07,
- "output_cost_per_token": 2e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Sao10K/L3-70B-Euryale-v2.1": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 7e-07,
- "output_cost_per_token": 8e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/microsoft/phi-4-reasoning-plus": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 7e-08,
- "output_cost_per_token": 3.5e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/google/gemma-3-12b-it": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 5e-08,
- "output_cost_per_token": 1e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/google/gemini-2.5-flash": {
- "max_tokens": 1000000,
- "max_input_tokens": 1000000,
- "max_output_tokens": 1000000,
- "input_cost_per_token": 2.1e-07,
- "output_cost_per_token": 1.75e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/deepseek-ai/DeepSeek-R1": {
- "max_tokens": 163840,
- "max_input_tokens": 163840,
- "max_output_tokens": 163840,
- "input_cost_per_token": 4.5e-07,
- "output_cost_per_token": 2.15e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/mistralai/Mistral-7B-Instruct-v0.3": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 2.8e-08,
- "output_cost_per_token": 5.4e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Qwen/Qwen2.5-72B-Instruct": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 1.2e-07,
- "output_cost_per_token": 3.9e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/Qwen/Qwen3-14B": {
- "max_tokens": 40960,
- "max_input_tokens": 40960,
- "max_output_tokens": 40960,
- "input_cost_per_token": 6e-08,
- "output_cost_per_token": 2.4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/allenai/olmOCR-7B-0725-FP8": {
- "max_tokens": 16384,
- "max_input_tokens": 16384,
- "max_output_tokens": 16384,
- "input_cost_per_token": 2.7e-07,
- "output_cost_per_token": 1.5e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/Qwen/Qwen3-Coder-480B-A35B-Instruct": {
- "max_tokens": 262144,
- "max_input_tokens": 262144,
- "max_output_tokens": 262144,
- "input_cost_per_token": 4e-07,
- "output_cost_per_token": 1.6e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/microsoft/phi-4": {
- "max_tokens": 16384,
- "max_input_tokens": 16384,
- "max_output_tokens": 16384,
- "input_cost_per_token": 7e-08,
- "output_cost_per_token": 1.4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/NousResearch/Hermes-3-Llama-3.1-405B": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 7e-07,
- "output_cost_per_token": 8e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/zai-org/GLM-4.5-Air": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 2e-07,
- "output_cost_per_token": 1.1e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 7.5e-08,
- "output_cost_per_token": 1.5e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/openai/gpt-oss-120b": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 9e-08,
- "output_cost_per_token": 4.5e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/google/codegemma-7b-it": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 7e-08,
- "output_cost_per_token": 7e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo": {
- "max_tokens": 262144,
- "max_input_tokens": 262144,
- "max_output_tokens": 262144,
- "input_cost_per_token": 3e-07,
- "output_cost_per_token": 1.2e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/mistralai/Mistral-Nemo-Instruct-2407": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 2e-08,
- "output_cost_per_token": 4e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/openbmb/MiniCPM-Llama3-V-2_5": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 3.4e-07,
- "output_cost_per_token": 3.4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/bigcode/starcoder2-15b-instruct-v0.1": {
- "max_tokens": 4096,
- "max_input_tokens": 4096,
- "max_output_tokens": 4096,
- "input_cost_per_token": 1.5e-07,
- "output_cost_per_token": 1.5e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
"deepinfra/meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
"max_tokens": 1048576,
"max_input_tokens": 1048576,
@@ -15920,6 +16130,16 @@
"mode": "chat",
"supports_tool_choice": true
},
+ "deepinfra/meta-llama/Llama-4-Maverick-17B-128E-Instruct-Turbo": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 5e-07,
+ "output_cost_per_token": 5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
"deepinfra/meta-llama/Llama-4-Scout-17B-16E-Instruct": {
"max_tokens": 327680,
"max_input_tokens": 327680,
@@ -15930,32 +16150,62 @@
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/google/gemini-2.0-flash-001": {
- "max_tokens": 1000000,
- "max_input_tokens": 1000000,
- "max_output_tokens": 1000000,
- "input_cost_per_token": 1e-07,
+ "deepinfra/meta-llama/Llama-Guard-3-8B": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 5.5e-08,
+ "output_cost_per_token": 5.5e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/meta-llama/Llama-Guard-4-12B": {
+ "max_tokens": 163840,
+ "max_input_tokens": 163840,
+ "max_output_tokens": 163840,
+ "input_cost_per_token": 1.8e-07,
+ "output_cost_per_token": 1.8e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/meta-llama/Meta-Llama-3-70B-Instruct": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 3e-07,
"output_cost_per_token": 4e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/Gryphe/MythoMax-L2-13b-turbo": {
- "max_tokens": 4096,
- "max_input_tokens": 4096,
- "max_output_tokens": 4096,
- "input_cost_per_token": 1.3e-07,
- "output_cost_per_token": 1.3e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/google/gemma-1.1-7b-it": {
+ "deepinfra/meta-llama/Meta-Llama-3-8B-Instruct": {
"max_tokens": 8192,
"max_input_tokens": 8192,
"max_output_tokens": 8192,
- "input_cost_per_token": 7e-08,
- "output_cost_per_token": 7e-08,
+ "input_cost_per_token": 3e-08,
+ "output_cost_per_token": 6e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/meta-llama/Meta-Llama-3.1-405B-Instruct": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 8e-07,
+ "output_cost_per_token": 8e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/meta-llama/Meta-Llama-3.1-70B-Instruct": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 2.3e-07,
+ "output_cost_per_token": 4e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
@@ -15980,97 +16230,37 @@
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/Qwen/Qwen3-32B": {
- "max_tokens": 40960,
- "max_input_tokens": 40960,
- "max_output_tokens": 40960,
- "input_cost_per_token": 1e-07,
- "output_cost_per_token": 3e-07,
+ "deepinfra/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 1.5e-08,
+ "output_cost_per_token": 2e-08,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/Qwen/Qwen3-235B-A22B-Thinking-2507": {
- "max_tokens": 262144,
- "max_input_tokens": 262144,
- "max_output_tokens": 262144,
- "input_cost_per_token": 1.3e-07,
- "output_cost_per_token": 6e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/meta-llama/Llama-2-70b-chat-hf": {
+ "deepinfra/microsoft/Phi-3-medium-4k-instruct": {
"max_tokens": 4096,
"max_input_tokens": 4096,
"max_output_tokens": 4096,
- "input_cost_per_token": 6.4e-07,
- "output_cost_per_token": 8e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/nvidia/Nemotron-4-340B-Instruct": {
- "max_tokens": 4096,
- "max_input_tokens": 4096,
- "max_output_tokens": 4096,
- "input_cost_per_token": 4.2e-06,
- "output_cost_per_token": 4.2e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/deepseek-ai/DeepSeek-R1-0528": {
- "max_tokens": 163840,
- "max_input_tokens": 163840,
- "max_output_tokens": 163840,
- "input_cost_per_token": 5e-07,
- "output_cost_per_token": 2.15e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/deepseek-ai/DeepSeek-R1-Turbo": {
- "max_tokens": 163840,
- "max_input_tokens": 163840,
- "max_output_tokens": 163840,
- "input_cost_per_token": 1e-06,
- "output_cost_per_token": 3e-06,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/NovaSky-AI/Sky-T1-32B-Preview": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 1.2e-07,
- "output_cost_per_token": 1.8e-07,
+ "input_cost_per_token": 1.4e-07,
+ "output_cost_per_token": 1.4e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": false
},
- "deepinfra/Qwen/Qwen3-235B-A22B-Instruct-2507": {
- "max_tokens": 262144,
- "max_input_tokens": 262144,
- "max_output_tokens": 262144,
- "input_cost_per_token": 1.3e-07,
- "output_cost_per_token": 6e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/mistralai/Mistral-Small-3.1-24B-Instruct-2503": {
- "max_tokens": 128000,
- "max_input_tokens": 128000,
- "max_output_tokens": 128000,
+ "deepinfra/microsoft/Phi-4-multimodal-instruct": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
"input_cost_per_token": 5e-08,
"output_cost_per_token": 1e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": false
},
- "deepinfra/mistralai/Mistral-7B-Instruct-v0.1": {
+ "deepinfra/microsoft/WizardLM-2-7B": {
"max_tokens": 32768,
"max_input_tokens": 32768,
"max_output_tokens": 32768,
@@ -16078,64 +16268,64 @@
"output_cost_per_token": 5.5e-08,
"litellm_provider": "deepinfra",
"mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/microsoft/WizardLM-2-8x22B": {
+ "max_tokens": 65536,
+ "max_input_tokens": 65536,
+ "max_output_tokens": 65536,
+ "input_cost_per_token": 4.8e-07,
+ "output_cost_per_token": 4.8e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/microsoft/phi-4": {
+ "max_tokens": 16384,
+ "max_input_tokens": 16384,
+ "max_output_tokens": 16384,
+ "input_cost_per_token": 7e-08,
+ "output_cost_per_token": 1.4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/Qwen/Qwen2-72B-Instruct": {
+ "deepinfra/microsoft/phi-4-reasoning-plus": {
"max_tokens": 32768,
"max_input_tokens": 32768,
"max_output_tokens": 32768,
- "input_cost_per_token": 3.5e-07,
- "output_cost_per_token": 4e-07,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": true
- },
- "deepinfra/meta-llama/Llama-4-Maverick-17B-128E-Instruct-Turbo": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 5e-07,
- "output_cost_per_token": 5e-07,
+ "input_cost_per_token": 7e-08,
+ "output_cost_per_token": 3.5e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": false
},
- "deepinfra/Sao10K/L3-8B-Lunaris-v1": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 3e-08,
- "output_cost_per_token": 6e-08,
- "litellm_provider": "deepinfra",
- "mode": "chat",
- "supports_tool_choice": false
- },
- "deepinfra/deepinfra/airoboros-70b": {
- "max_tokens": 4096,
- "max_input_tokens": 4096,
- "max_output_tokens": 4096,
- "input_cost_per_token": 7e-07,
- "output_cost_per_token": 9e-07,
+ "deepinfra/mistralai/Devstral-Small-2505": {
+ "max_tokens": 128000,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 128000,
+ "input_cost_per_token": 6e-08,
+ "output_cost_per_token": 1.2e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/google/gemma-3-4b-it": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 2e-08,
- "output_cost_per_token": 4e-08,
+ "deepinfra/mistralai/Devstral-Small-2507": {
+ "max_tokens": 128000,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 128000,
+ "input_cost_per_token": 7e-08,
+ "output_cost_per_token": 2.8e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/meta-llama/Meta-Llama-3-8B-Instruct": {
- "max_tokens": 8192,
- "max_input_tokens": 8192,
- "max_output_tokens": 8192,
- "input_cost_per_token": 3e-08,
- "output_cost_per_token": 6e-08,
+ "deepinfra/mistralai/Mistral-7B-Instruct-v0.1": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 5.5e-08,
+ "output_cost_per_token": 5.5e-08,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
@@ -16150,35 +16340,115 @@
"mode": "chat",
"supports_tool_choice": false
},
- "deepinfra/meta-llama/Llama-3.3-70B-Instruct-Turbo": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 3.8e-08,
- "output_cost_per_token": 1.2e-07,
+ "deepinfra/mistralai/Mistral-7B-Instruct-v0.3": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 2.8e-08,
+ "output_cost_per_token": 5.4e-08,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/mistralai/Devstral-Small-2505": {
+ "deepinfra/mistralai/Mistral-Nemo-Instruct-2407": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 2e-08,
+ "output_cost_per_token": 4e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/mistralai/Mistral-Small-24B-Instruct-2501": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 5e-08,
+ "output_cost_per_token": 8e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/mistralai/Mistral-Small-3.1-24B-Instruct-2503": {
"max_tokens": 128000,
"max_input_tokens": 128000,
"max_output_tokens": 128000,
- "input_cost_per_token": 6e-08,
- "output_cost_per_token": 1.2e-07,
+ "input_cost_per_token": 5e-08,
+ "output_cost_per_token": 1e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/mistralai/Mistral-Small-3.2-24B-Instruct-2506": {
+ "max_tokens": 128000,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 128000,
+ "input_cost_per_token": 5e-08,
+ "output_cost_per_token": 1e-07,
"litellm_provider": "deepinfra",
"mode": "chat",
"supports_tool_choice": true
},
- "deepinfra/meta-llama/Llama-3.2-11B-Vision-Instruct": {
+ "deepinfra/mistralai/Mixtral-8x22B-Instruct-v0.1": {
+ "max_tokens": 65536,
+ "max_input_tokens": 65536,
+ "max_output_tokens": 65536,
+ "input_cost_per_token": 6.5e-07,
+ "output_cost_per_token": 6.5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/mistralai/Mixtral-8x7B-Instruct-v0.1": {
+ "max_tokens": 32768,
+ "max_input_tokens": 32768,
+ "max_output_tokens": 32768,
+ "input_cost_per_token": 8e-08,
+ "output_cost_per_token": 2.4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/moonshotai/Kimi-K2-Instruct": {
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
- "input_cost_per_token": 4.9e-08,
- "output_cost_per_token": 4.9e-08,
+ "input_cost_per_token": 5e-07,
+ "output_cost_per_token": 2e-06,
"litellm_provider": "deepinfra",
"mode": "chat",
- "supports_tool_choice": false
+ "supports_tool_choice": true
+ },
+ "deepinfra/nvidia/Llama-3.1-Nemotron-70B-Instruct": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 1.2e-07,
+ "output_cost_per_token": 3e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/nvidia/Nemotron-4-340B-Instruct": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "max_output_tokens": 4096,
+ "input_cost_per_token": 4.2e-06,
+ "output_cost_per_token": 4.2e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/openai/gpt-oss-120b": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 9e-08,
+ "output_cost_per_token": 4.5e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
},
"deepinfra/openai/gpt-oss-20b": {
"max_tokens": 131072,
@@ -16190,6 +16460,56 @@
"mode": "chat",
"supports_tool_choice": true
},
+ "deepinfra/openbmb/MiniCPM-Llama3-V-2_5": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 3.4e-07,
+ "output_cost_per_token": 3.4e-07,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/openchat/openchat-3.6-8b": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 5.5e-08,
+ "output_cost_per_token": 5.5e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": false
+ },
+ "deepinfra/openchat/openchat_3.5": {
+ "max_tokens": 8192,
+ "max_input_tokens": 8192,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 5.5e-08,
+ "output_cost_per_token": 5.5e-08,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/zai-org/GLM-4.5": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 5.5e-07,
+ "output_cost_per_token": 2e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "deepinfra/zai-org/GLM-4.5-Air": {
+ "max_tokens": 131072,
+ "max_input_tokens": 131072,
+ "max_output_tokens": 131072,
+ "input_cost_per_token": 2e-07,
+ "output_cost_per_token": 1.1e-06,
+ "litellm_provider": "deepinfra",
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
"perplexity/codellama-34b-instruct": {
"max_tokens": 16384,
"max_input_tokens": 16384,
@@ -16659,6 +16979,18 @@
"supports_tool_choice": false,
"supports_response_schema": true
},
+ "fireworks_ai/accounts/fireworks/models/deepseek-v3p1": {
+ "max_tokens": 8192,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 8192,
+ "input_cost_per_token": 5.6e-07,
+ "output_cost_per_token": 1.68e-06,
+ "litellm_provider": "fireworks_ai",
+ "mode": "chat",
+ "supports_response_schema": true,
+ "source": "https://fireworks.ai/pricing",
+ "supports_tool_choice": true
+ },
"fireworks_ai/accounts/fireworks/models/kimi-k2-instruct": {
"max_tokens": 131072,
"max_input_tokens": 131072,
@@ -17676,22 +18008,6 @@
},
"supports_tool_choice": true
},
- "databricks/databricks-meta-llama-3-1-70b-instruct": {
- "max_tokens": 128000,
- "max_input_tokens": 128000,
- "max_output_tokens": 128000,
- "input_cost_per_token": 1.00002e-06,
- "input_dbu_cost_per_token": 1.4286e-05,
- "output_cost_per_token": 2.99999e-06,
- "output_dbu_cost_per_token": 4.2857e-05,
- "litellm_provider": "databricks",
- "mode": "chat",
- "source": "https://www.databricks.com/product/pricing/foundation-model-serving",
- "metadata": {
- "notes": "Input/output cost per token is dbu cost * $0.070, based on databricks Llama 3.1 70B conversion. Number provided for reference, '*_dbu_cost_per_token' used in actual calculation."
- },
- "supports_tool_choice": true
- },
"databricks/databricks-meta-llama-3-3-70b-instruct": {
"max_tokens": 128000,
"max_input_tokens": 128000,
@@ -17724,22 +18040,6 @@
},
"supports_tool_choice": true
},
- "databricks/databricks-dbrx-instruct": {
- "max_tokens": 32768,
- "max_input_tokens": 32768,
- "max_output_tokens": 32768,
- "input_cost_per_token": 7.4998e-07,
- "input_dbu_cost_per_token": 1.0714e-05,
- "output_cost_per_token": 2.24901e-06,
- "output_dbu_cost_per_token": 3.2143e-05,
- "litellm_provider": "databricks",
- "mode": "chat",
- "source": "https://www.databricks.com/product/pricing/foundation-model-serving",
- "metadata": {
- "notes": "Input/output cost per token is dbu cost * $0.070, based on databricks Llama 3.1 70B conversion. Number provided for reference, '*_dbu_cost_per_token' used in actual calculation."
- },
- "supports_tool_choice": true
- },
"databricks/databricks-meta-llama-3-70b-instruct": {
"max_tokens": 128000,
"max_input_tokens": 128000,
@@ -19530,6 +19830,880 @@
"supports_system_messages": true,
"supports_tool_choice": false
},
+ "heroku/claude-4-sonnet": {
+ "max_tokens": 8192,
+ "litellm_provider": "heroku",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "heroku/claude-3-7-sonnet": {
+ "max_tokens": 8192,
+ "litellm_provider": "heroku",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "heroku/claude-3-5-sonnet-latest": {
+ "max_tokens": 8192,
+ "litellm_provider": "heroku",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "heroku/claude-3-5-haiku": {
+ "max_tokens": 4096,
+ "litellm_provider": "heroku",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "vercel_ai_gateway/alibaba/qwen3-coder": {
+ "max_tokens": 262144,
+ "input_cost_per_token": 4e-07,
+ "output_cost_per_token": 1.6e-06,
+ "max_output_tokens": 66536,
+ "max_input_tokens": 262144,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/codestral-embed": {
+ "max_tokens": 0,
+ "input_cost_per_token": 1.5e-07,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/google/gemini-2.5-pro": {
+ "max_tokens": 1048576,
+ "input_cost_per_token": 2.5e-06,
+ "output_cost_per_token": 1e-05,
+ "max_output_tokens": 65536,
+ "max_input_tokens": 1048576,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/deepseek/deepseek-v3": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 9e-07,
+ "output_cost_per_token": 9e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/amazon/nova-lite": {
+ "max_tokens": 300000,
+ "input_cost_per_token": 6e-08,
+ "output_cost_per_token": 2.4e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 300000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-4-scout": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 3e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-3.2-1b": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 1e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/mistral-small": {
+ "max_tokens": 32000,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 3e-07,
+ "max_output_tokens": 4000,
+ "max_input_tokens": 32000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/google/gemini-2.5-flash": {
+ "max_tokens": 1000000,
+ "input_cost_per_token": 3e-07,
+ "output_cost_per_token": 2.5e-06,
+ "max_output_tokens": 65536,
+ "max_input_tokens": 1000000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/inception/mercury-coder-small": {
+ "max_tokens": 32000,
+ "input_cost_per_token": 2.5e-07,
+ "output_cost_per_token": 1e-06,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 32000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/text-embedding-3-small": {
+ "max_tokens": 0,
+ "input_cost_per_token": 2e-08,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "embedding"
+ },
+ "vercel_ai_gateway/xai/grok-2-vision": {
+ "max_tokens": 32768,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 1e-05,
+ "max_output_tokens": 32768,
+ "max_input_tokens": 32768,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/xai/grok-2": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 1e-05,
+ "max_output_tokens": 4000,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/deepseek/deepseek-r1-distill-llama-70b": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 7.5e-07,
+ "output_cost_per_token": 9.9e-07,
+ "max_output_tokens": 131072,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-3.1-70b": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 7.2e-07,
+ "output_cost_per_token": 7.2e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/xai/grok-3": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 3e-06,
+ "output_cost_per_token": 1.5e-05,
+ "max_output_tokens": 131072,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/alibaba/qwen-3-235b": {
+ "max_tokens": 40960,
+ "input_cost_per_token": 2e-07,
+ "output_cost_per_token": 6e-07,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 40960,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/xai/grok-3-fast": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 5e-06,
+ "output_cost_per_token": 2.5e-05,
+ "max_output_tokens": 131072,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/vercel/v0-1.5-md": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 3e-06,
+ "output_cost_per_token": 1.5e-05,
+ "max_output_tokens": 32768,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/o4-mini": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 1.1e-06,
+ "output_cost_per_token": 4.4e-06,
+ "max_output_tokens": 100000,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 2.75e-07,
+ "cache_creation_input_token_cost": 0.0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/magistral-medium": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 5e-06,
+ "max_output_tokens": 64000,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/amazon/titan-embed-text-v2": {
+ "max_tokens": 0,
+ "input_cost_per_token": 2e-08,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/alibaba/qwen-3-30b": {
+ "max_tokens": 40960,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 3e-07,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 40960,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/zai/glm-4.5-air": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 2e-07,
+ "output_cost_per_token": 1.1e-06,
+ "max_output_tokens": 96000,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/gpt-4-turbo": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 1e-05,
+ "output_cost_per_token": 3e-05,
+ "max_output_tokens": 4096,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/mistral-large": {
+ "max_tokens": 32000,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 6e-06,
+ "max_output_tokens": 4000,
+ "max_input_tokens": 32000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/perplexity/sonar-pro": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 3e-06,
+ "output_cost_per_token": 1.5e-05,
+ "max_output_tokens": 8000,
+ "max_input_tokens": 200000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-3.2-90b": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 7.2e-07,
+ "output_cost_per_token": 7.2e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-3-8b": {
+ "max_tokens": 8192,
+ "input_cost_per_token": 5e-08,
+ "output_cost_per_token": 8e-08,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 8192,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/google/text-embedding-005": {
+ "max_tokens": 0,
+ "input_cost_per_token": 2.5e-08,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "embedding"
+ },
+ "vercel_ai_gateway/mistral/pixtral-large": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 6e-06,
+ "max_output_tokens": 4000,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/anthropic/claude-3.5-sonnet": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 3e-06,
+ "output_cost_per_token": 1.5e-05,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 3e-07,
+ "cache_creation_input_token_cost": 3.75e-06,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/amazon/nova-micro": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 3.5e-08,
+ "output_cost_per_token": 1.4e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/cohere/command-r": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 1.5e-07,
+ "output_cost_per_token": 6e-07,
+ "max_output_tokens": 4096,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/morph/morph-v3-large": {
+ "max_tokens": 32768,
+ "input_cost_per_token": 9e-07,
+ "output_cost_per_token": 1.9e-06,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 32768,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/mixtral-8x22b-instruct": {
+ "max_tokens": 65536,
+ "input_cost_per_token": 1.2e-06,
+ "output_cost_per_token": 1.2e-06,
+ "max_output_tokens": 2048,
+ "max_input_tokens": 65536,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/xai/grok-4": {
+ "max_tokens": 256000,
+ "input_cost_per_token": 3e-06,
+ "output_cost_per_token": 1.5e-05,
+ "max_output_tokens": 256000,
+ "max_input_tokens": 256000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-3.1-8b": {
+ "max_tokens": 131000,
+ "input_cost_per_token": 5e-08,
+ "output_cost_per_token": 8e-08,
+ "max_output_tokens": 131072,
+ "max_input_tokens": 131000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/anthropic/claude-3-opus": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 1.5e-05,
+ "output_cost_per_token": 7.5e-05,
+ "max_output_tokens": 4096,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 1.5e-06,
+ "cache_creation_input_token_cost": 1.875e-05,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/zai/glm-4.5": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 6e-07,
+ "output_cost_per_token": 2.2e-06,
+ "max_output_tokens": 131072,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/gpt-4o": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 2.5e-06,
+ "output_cost_per_token": 1e-05,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 128000,
+ "cache_read_input_token_cost": 1.25e-06,
+ "cache_creation_input_token_cost": 0.0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/o3-mini": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 1.1e-06,
+ "output_cost_per_token": 4.4e-06,
+ "max_output_tokens": 100000,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 5.5e-07,
+ "cache_creation_input_token_cost": 0.0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/ministral-8b": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 1e-07,
+ "max_output_tokens": 4000,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/o3": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 8e-06,
+ "max_output_tokens": 100000,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 5e-07,
+ "cache_creation_input_token_cost": 0.0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/vercel/v0-1.0-md": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 3e-06,
+ "output_cost_per_token": 1.5e-05,
+ "max_output_tokens": 32000,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/google/text-multilingual-embedding-002": {
+ "max_tokens": 0,
+ "input_cost_per_token": 2.5e-08,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "embedding"
+ },
+ "vercel_ai_gateway/amazon/nova-pro": {
+ "max_tokens": 300000,
+ "input_cost_per_token": 8e-07,
+ "output_cost_per_token": 3.2e-06,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 300000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/morph/morph-v3-fast": {
+ "max_tokens": 32768,
+ "input_cost_per_token": 8e-07,
+ "output_cost_per_token": 1.2e-06,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 32768,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/gpt-3.5-turbo": {
+ "max_tokens": 16385,
+ "input_cost_per_token": 5e-07,
+ "output_cost_per_token": 1.5e-06,
+ "max_output_tokens": 4096,
+ "max_input_tokens": 16385,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/codestral": {
+ "max_tokens": 256000,
+ "input_cost_per_token": 3e-07,
+ "output_cost_per_token": 9e-07,
+ "max_output_tokens": 4000,
+ "max_input_tokens": 256000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-3.2-11b": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 1.6e-07,
+ "output_cost_per_token": 1.6e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-3-70b": {
+ "max_tokens": 8192,
+ "input_cost_per_token": 5.9e-07,
+ "output_cost_per_token": 7.9e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 8192,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/xai/grok-3-mini-fast": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 6e-07,
+ "output_cost_per_token": 4e-06,
+ "max_output_tokens": 131072,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/text-embedding-3-large": {
+ "max_tokens": 0,
+ "input_cost_per_token": 1.3e-07,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "embedding"
+ },
+ "vercel_ai_gateway/google/gemini-2.0-flash-lite": {
+ "max_tokens": 1048576,
+ "input_cost_per_token": 7.5e-08,
+ "output_cost_per_token": 3e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 1048576,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/ministral-3b": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 4e-08,
+ "output_cost_per_token": 4e-08,
+ "max_output_tokens": 4000,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/perplexity/sonar-reasoning-pro": {
+ "max_tokens": 127000,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 8e-06,
+ "max_output_tokens": 8000,
+ "max_input_tokens": 127000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/google/gemini-embedding-001": {
+ "max_tokens": 0,
+ "input_cost_per_token": 1.5e-07,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "embedding"
+ },
+ "vercel_ai_gateway/anthropic/claude-3-haiku": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 2.5e-07,
+ "output_cost_per_token": 1.25e-06,
+ "max_output_tokens": 4096,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 3e-08,
+ "cache_creation_input_token_cost": 3e-07,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/o1": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 1.5e-05,
+ "output_cost_per_token": 6e-05,
+ "max_output_tokens": 100000,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 7.5e-06,
+ "cache_creation_input_token_cost": 0.0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/deepseek/deepseek-r1": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 5.5e-07,
+ "output_cost_per_token": 2.19e-06,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/mistral-embed": {
+ "max_tokens": 0,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/gpt-4.1-mini": {
+ "max_tokens": 1047576,
+ "input_cost_per_token": 4e-07,
+ "output_cost_per_token": 1.6e-06,
+ "max_output_tokens": 32768,
+ "max_input_tokens": 1047576,
+ "cache_read_input_token_cost": 1e-07,
+ "cache_creation_input_token_cost": 0.0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/gpt-4o-mini": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 1.5e-07,
+ "output_cost_per_token": 6e-07,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 128000,
+ "cache_read_input_token_cost": 7.5e-08,
+ "cache_creation_input_token_cost": 0.0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/alibaba/qwen-3-14b": {
+ "max_tokens": 40960,
+ "input_cost_per_token": 8e-08,
+ "output_cost_per_token": 2.4e-07,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 40960,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/anthropic/claude-4-opus": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 1.5e-05,
+ "output_cost_per_token": 7.5e-05,
+ "max_output_tokens": 32000,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 1.5e-06,
+ "cache_creation_input_token_cost": 1.875e-05,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/mistral-saba-24b": {
+ "max_tokens": 32768,
+ "input_cost_per_token": 7.9e-07,
+ "output_cost_per_token": 7.9e-07,
+ "max_output_tokens": 32768,
+ "max_input_tokens": 32768,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/perplexity/sonar-reasoning": {
+ "max_tokens": 127000,
+ "input_cost_per_token": 1e-06,
+ "output_cost_per_token": 5e-06,
+ "max_output_tokens": 8000,
+ "max_input_tokens": 127000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/anthropic/claude-3.5-haiku": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 8e-07,
+ "output_cost_per_token": 4e-06,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 8e-08,
+ "cache_creation_input_token_cost": 1e-06,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/cohere/command-a": {
+ "max_tokens": 256000,
+ "input_cost_per_token": 2.5e-06,
+ "output_cost_per_token": 1e-05,
+ "max_output_tokens": 8000,
+ "max_input_tokens": 256000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/google/gemma-2-9b": {
+ "max_tokens": 8192,
+ "input_cost_per_token": 2e-07,
+ "output_cost_per_token": 2e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 8192,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-3.2-3b": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 1.5e-07,
+ "output_cost_per_token": 1.5e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/gpt-4.1-nano": {
+ "max_tokens": 1047576,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 4e-07,
+ "max_output_tokens": 32768,
+ "max_input_tokens": 1047576,
+ "cache_read_input_token_cost": 2.5e-08,
+ "cache_creation_input_token_cost": 0.0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/anthropic/claude-4-sonnet": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 3e-06,
+ "output_cost_per_token": 1.5e-05,
+ "max_output_tokens": 64000,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 3e-07,
+ "cache_creation_input_token_cost": 3.75e-06,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/perplexity/sonar": {
+ "max_tokens": 127000,
+ "input_cost_per_token": 1e-06,
+ "output_cost_per_token": 1e-06,
+ "max_output_tokens": 8000,
+ "max_input_tokens": 127000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-4-maverick": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 2e-07,
+ "output_cost_per_token": 6e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/text-embedding-ada-002": {
+ "max_tokens": 0,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "embedding"
+ },
+ "vercel_ai_gateway/xai/grok-3-mini": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 3e-07,
+ "output_cost_per_token": 5e-07,
+ "max_output_tokens": 131072,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/cohere/embed-v4.0": {
+ "max_tokens": 0,
+ "input_cost_per_token": 1.2e-07,
+ "output_cost_per_token": 0.0,
+ "max_output_tokens": 0,
+ "max_input_tokens": 0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/meta/llama-3.3-70b": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 7.2e-07,
+ "output_cost_per_token": 7.2e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/cohere/command-r-plus": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 2.5e-06,
+ "output_cost_per_token": 1e-05,
+ "max_output_tokens": 4096,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/gpt-3.5-turbo-instruct": {
+ "max_tokens": 8192,
+ "input_cost_per_token": 1.5e-06,
+ "output_cost_per_token": 2e-06,
+ "max_output_tokens": 4096,
+ "max_input_tokens": 8192,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/devstral-small": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 7e-08,
+ "output_cost_per_token": 2.8e-07,
+ "max_output_tokens": 128000,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/anthropic/claude-3.7-sonnet": {
+ "max_tokens": 200000,
+ "input_cost_per_token": 3e-06,
+ "output_cost_per_token": 1.5e-05,
+ "max_output_tokens": 64000,
+ "max_input_tokens": 200000,
+ "cache_read_input_token_cost": 3e-07,
+ "cache_creation_input_token_cost": 3.75e-06,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/google/gemini-2.0-flash": {
+ "max_tokens": 1048576,
+ "input_cost_per_token": 1.5e-07,
+ "output_cost_per_token": 6e-07,
+ "max_output_tokens": 8192,
+ "max_input_tokens": 1048576,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/pixtral-12b": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 1.5e-07,
+ "output_cost_per_token": 1.5e-07,
+ "max_output_tokens": 4000,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/mistral/magistral-small": {
+ "max_tokens": 128000,
+ "input_cost_per_token": 5e-07,
+ "output_cost_per_token": 1.5e-06,
+ "max_output_tokens": 64000,
+ "max_input_tokens": 128000,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/moonshotai/kimi-k2": {
+ "max_tokens": 131072,
+ "input_cost_per_token": 5.5e-07,
+ "output_cost_per_token": 2.2e-06,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 131072,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/alibaba/qwen-3-32b": {
+ "max_tokens": 40960,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 3e-07,
+ "max_output_tokens": 16384,
+ "max_input_tokens": 40960,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
+ "vercel_ai_gateway/openai/gpt-4.1": {
+ "max_tokens": 1047576,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 8e-06,
+ "max_output_tokens": 32768,
+ "max_input_tokens": 1047576,
+ "cache_read_input_token_cost": 5e-07,
+ "cache_creation_input_token_cost": 0.0,
+ "litellm_provider": "vercel_ai_gateway",
+ "mode": "chat"
+ },
"oci/meta.llama-4-maverick-17b-128e-instruct-fp8": {
"max_tokens": 512000,
"max_input_tokens": 512000,
@@ -19650,5 +20824,178 @@
"supports_function_calling": true,
"supports_response_schema": false,
"source": "https://www.oracle.com/artificial-intelligence/generative-ai/generative-ai-service/pricing"
+ },
+ "aiml/flux/kontext-pro/text-to-image":{
+ "output_cost_per_image": 0.042,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ],
+ "source": "https://docs.aimlapi.com/",
+ "metadata": {
+ "notes": "Flux Pro v1.1 - Enhanced version with improved capabilities and 6x faster inference speed"
+ }
+
+ },
+ "aiml/flux/kontext-max/text-to-image": {
+ "output_cost_per_image": 0.084,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ],
+ "source": "https://docs.aimlapi.com/",
+ "metadata": {
+ "notes": "Flux Pro v1.1 - Enhanced version with improved capabilities and 6x faster inference speed"
+ }
+ },
+ "aiml/flux-pro/v1.1-ultra": {
+ "output_cost_per_image": 0.063,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ]
+ },
+ "aiml/flux-pro/v1.1": {
+ "output_cost_per_image": 0.042,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ]
+ },
+ "aiml/flux-realism": {
+ "output_cost_per_image": 0.037,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ],
+ "source": "https://docs.aimlapi.com/",
+ "metadata": {
+ "notes": "Flux Pro - Professional-grade image generation model"
+ }
+ },
+ "aiml/flux/schnell": {
+ "output_cost_per_image": 0.003,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ],
+ "source": "https://docs.aimlapi.com/",
+ "metadata": {
+ "notes": "Flux Schnell - Fast generation model optimized for speed"
+ }
+ },
+ "aiml/flux/dev": {
+ "output_cost_per_image": 0.026,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ],
+ "source": "https://docs.aimlapi.com/",
+ "metadata": {
+ "notes": "Flux Dev - Development version optimized for experimentation"
+ }
+ },
+ "aiml/flux-pro": {
+ "output_cost_per_image": 0.053,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ],
+ "source": "https://docs.aimlapi.com/",
+ "metadata": {
+ "notes": "Flux Dev - Development version optimized for experimentation"
+ }
+ },
+ "aiml/dall-e-3": {
+ "output_cost_per_image": 0.042,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ],
+ "source": "https://docs.aimlapi.com/",
+ "metadata": {
+ "notes": "DALL-E 3 via AI/ML API - High-quality text-to-image generation"
+ }
+ },
+ "aiml/dall-e-2": {
+ "output_cost_per_image": 0.021,
+ "litellm_provider": "aiml",
+ "mode": "image_generation",
+ "supported_endpoints": [
+ "/v1/images/generations"
+ ],
+ "source": "https://docs.aimlapi.com/",
+ "metadata": {
+ "notes": "DALL-E 2 via AI/ML API - Reliable text-to-image generation"
+ }
+ },
+ "doubao-embedding-large": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "output_vector_size": 2048,
+ "input_cost_per_token": 0.0,
+ "output_cost_per_token": 0.0,
+ "litellm_provider": "volcengine",
+ "mode": "embedding",
+ "metadata": {
+ "notes": "Volcengine Doubao embedding model - large version with 2048 dimensions"
+ }
+ },
+ "doubao-embedding-large-text-250515": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "output_vector_size": 2048,
+ "input_cost_per_token": 0.0,
+ "output_cost_per_token": 0.0,
+ "litellm_provider": "volcengine",
+ "mode": "embedding",
+ "metadata": {
+ "notes": "Volcengine Doubao embedding model - text-250515 version with 2048 dimensions"
+ }
+ },
+ "doubao-embedding-large-text-240915": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "output_vector_size": 4096,
+ "input_cost_per_token": 0.0,
+ "output_cost_per_token": 0.0,
+ "litellm_provider": "volcengine",
+ "mode": "embedding",
+ "metadata": {
+ "notes": "Volcengine Doubao embedding model - text-240915 version with 4096 dimensions"
+ }
+ },
+ "doubao-embedding": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "output_vector_size": 2560,
+ "input_cost_per_token": 0.0,
+ "output_cost_per_token": 0.0,
+ "litellm_provider": "volcengine",
+ "mode": "embedding",
+ "metadata": {
+ "notes": "Volcengine Doubao embedding model - standard version with 2560 dimensions"
+ }
+ },
+ "doubao-embedding-text-240715": {
+ "max_tokens": 4096,
+ "max_input_tokens": 4096,
+ "output_vector_size": 2560,
+ "input_cost_per_token": 0.0,
+ "output_cost_per_token": 0.0,
+ "litellm_provider": "volcengine",
+ "mode": "embedding",
+ "metadata": {
+ "notes": "Volcengine Doubao embedding model - text-240715 version with 2560 dimensions"
+ }
}
-}
+}
\ No newline at end of file
diff --git a/litellm/passthrough/main.py b/litellm/passthrough/main.py
index 9bde9496d29..f4dc1ef6c84 100644
--- a/litellm/passthrough/main.py
+++ b/litellm/passthrough/main.py
@@ -24,8 +24,8 @@ import litellm
from litellm.litellm_core_utils.get_llm_provider_logic import get_llm_provider
from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
from litellm.llms.custom_httpx.llm_http_handler import BaseLLMHTTPHandler
+from litellm.passthrough.utils import CommonUtils
from litellm.utils import client
-from litellm.proxy.pass_through_endpoints.common_utils import encode_bedrock_runtime_modelid_arn
base_llm_http_handler = BaseLLMHTTPHandler()
from .utils import BasePassthroughUtils
@@ -245,7 +245,7 @@ def llm_passthrough_route(
# need to encode the id of application-inference-profile for bedrock
if custom_llm_provider == "bedrock" and "application-inference-profile" in endpoint:
- encoded_url_str = encode_bedrock_runtime_modelid_arn(str(updated_url))
+ encoded_url_str = CommonUtils.encode_bedrock_runtime_modelid_arn(str(updated_url))
updated_url = httpx.URL(encoded_url_str)
# Add or update query parameters
diff --git a/litellm/passthrough/utils.py b/litellm/passthrough/utils.py
index c52d0e3688d..4bf66d49881 100644
--- a/litellm/passthrough/utils.py
+++ b/litellm/passthrough/utils.py
@@ -37,3 +37,56 @@ class BasePassthroughUtils:
# Combine request headers with custom headers
headers = {**request_headers, **headers}
return headers
+
+class CommonUtils:
+ @staticmethod
+ def encode_bedrock_runtime_modelid_arn(endpoint: str) -> str:
+ """
+ Encodes any "/" found in the modelId of an AWS Bedrock Runtime Endpoint when arns are passed in.
+ - modelID value can be an ARN which contains slashes that SHOULD NOT be treated as path separators.
+ e.g endpoint: /model//invoke
+ containing arns with slashes need to be encoded from
+ arn:aws:bedrock:ap-southeast-1:123456789012:application-inference-profile/abdefg12334 =>
+ arn:aws:bedrock:ap-southeast-1:123456789012:application-inference-profile%2Fabdefg12334
+ so that it is treated as one part of the path.
+ Otherwise, the encoded endpoint will return 500 error when passed to Bedrock endpoint.
+
+ See the apis in https://docs.aws.amazon.com/bedrock/latest/APIReference/API_Operations_Amazon_Bedrock_Runtime.html
+ for more details on the regex patterns of modelId which we use in the regex logic below.
+
+ Args:
+ endpoint (str): The original endpoint string which may contain ARNs that contain slashes.
+
+ Returns:
+ str: The endpoint with properly encoded ARN slashes
+ """
+ import re
+
+ # Early exit: if no ARN detected, return unchanged
+ if 'arn:aws:' not in endpoint:
+ return endpoint
+
+ # Handle all patterns in one go - more efficient and cleaner
+ patterns = [
+ # Custom model with 2 slashes (order matters - do this first)
+ (r'(custom-model)/([a-z0-9.-]+)/([a-z0-9]+)', r'\1%2F\2%2F\3'),
+
+ # All other resource types with 1 slash
+ (r'(:application-inference-profile)/', r'\1%2F'),
+ (r'(:inference-profile)/', r'\1%2F'),
+ (r'(:foundation-model)/', r'\1%2F'),
+ (r'(:imported-model)/', r'\1%2F'),
+ (r'(:provisioned-model)/', r'\1%2F'),
+ (r'(:prompt)/', r'\1%2F'),
+ (r'(:endpoint)/', r'\1%2F'),
+ (r'(:prompt-router)/', r'\1%2F'),
+ (r'(:default-prompt-router)/', r'\1%2F'),
+ ]
+
+ for pattern, replacement in patterns:
+ # Check if pattern exists before applying regex (early exit optimization)
+ if re.search(pattern, endpoint):
+ endpoint = re.sub(pattern, replacement, endpoint)
+ break # Exit after first match since each ARN has only one resource type
+
+ return endpoint
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/mcp_server/rest_endpoints.py b/litellm/proxy/_experimental/mcp_server/rest_endpoints.py
index 6624eb7e64e..048b25fa35a 100644
--- a/litellm/proxy/_experimental/mcp_server/rest_endpoints.py
+++ b/litellm/proxy/_experimental/mcp_server/rest_endpoints.py
@@ -1,5 +1,5 @@
import importlib
-from typing import Optional, Dict
+from typing import Dict, List, Optional
from fastapi import APIRouter, Depends, Query, Request
@@ -21,9 +21,10 @@ router = APIRouter(
)
if MCP_AVAILABLE:
+ from litellm.experimental_mcp_client.client import MCPTool
from litellm.proxy._experimental.mcp_server.mcp_server_manager import (
- global_mcp_server_manager,
_convert_protocol_version_to_enum,
+ global_mcp_server_manager,
)
from litellm.proxy._experimental.mcp_server.server import (
ListMCPToolsRestAPIResponseObject,
@@ -100,7 +101,9 @@ if MCP_AVAILABLE:
"message": "Successfully retrieved tools"
}
"""
- from litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp import MCPRequestHandler
+ from litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp import (
+ MCPRequestHandler,
+ )
try:
# Extract auth headers from request
@@ -172,10 +175,11 @@ if MCP_AVAILABLE:
"""
REST API to call a specific MCP tool with the provided arguments
"""
- from litellm.proxy.proxy_server import add_litellm_data_to_request, proxy_config
- from litellm.exceptions import BlockedPiiEntityError, GuardrailRaisedException
from fastapi import HTTPException
+ from litellm.exceptions import BlockedPiiEntityError, GuardrailRaisedException
+ from litellm.proxy.proxy_server import add_litellm_data_to_request, proxy_config
+
try:
data = await request.json()
data = await add_litellm_data_to_request(
@@ -230,13 +234,19 @@ if MCP_AVAILABLE:
from litellm.proxy.management_endpoints.mcp_management_endpoints import (
NewMCPServerRequest,
)
- @router.post("/test/connection")
- async def test_connection(
- request: NewMCPServerRequest,
- ):
+
+ async def _execute_with_mcp_client(request: NewMCPServerRequest, operation):
"""
- Test if we can connect to the provided MCP server before adding it
+ Common helper to create MCP client, execute operation, and ensure proper cleanup.
+
+ Args:
+ request: MCP server configuration
+ operation: Async function that takes a client and returns the operation result
+
+ Returns:
+ Operation result or error response
"""
+ client = None
try:
client = global_mcp_server_manager._create_mcp_client(
server=MCPServer(
@@ -250,12 +260,31 @@ if MCP_AVAILABLE:
),
mcp_auth_header=None,
)
-
- await client.connect()
+
+ return await operation(client)
+
except Exception as e:
- verbose_logger.error(f"Error in test_connection: {e}", exc_info=True)
+ verbose_logger.error(f"Error in MCP operation: {e}", exc_info=True)
return {"status": "error", "message": "An internal error has occurred."}
- return {"status": "ok"}
+ finally:
+ # Ensure client is properly disconnected before response is sent
+ if client is not None:
+ try:
+ await client.disconnect()
+ except Exception as e:
+ verbose_logger.warning(f"Error disconnecting MCP client: {e}")
+ @router.post("/test/connection")
+ async def test_connection(
+ request: NewMCPServerRequest,
+ ):
+ """
+ Test if we can connect to the provided MCP server before adding it
+ """
+ async def _test_connection_operation(client):
+ await client.connect()
+ return {"status": "ok"}
+
+ return await _execute_with_mcp_client(request, _test_connection_operation)
@router.post("/test/tools/list")
@@ -266,25 +295,13 @@ if MCP_AVAILABLE:
"""
Preview tools available from MCP server before adding it
"""
- try:
- client = global_mcp_server_manager._create_mcp_client(
- server=MCPServer(
- server_id=request.server_id or "",
- name=request.alias or request.server_name or "",
- url=request.url,
- transport=request.transport,
- spec_version=_convert_protocol_version_to_enum(request.spec_version),
- auth_type=request.auth_type,
- mcp_info=request.mcp_info,
- ),
- mcp_auth_header=None,
- )
- list_tools_result = await client.list_tools()
- except Exception as e:
- verbose_logger.error(f"Error in test_tools_list: {e}", exc_info=True)
- return {"status": "error", "message": "An internal error has occurred."}
- return {
- "tools": list_tools_result,
- "error": None,
- "message": "Successfully retrieved tools"
- }
+ async def _list_tools_operation(client):
+ list_tools_result: List[MCPTool] = await client.list_tools()
+ model_dumped_tools: List[dict] = [tool.model_dump() for tool in list_tools_result]
+ return {
+ "tools": model_dumped_tools,
+ "error": None,
+ "message": "Successfully retrieved tools"
+ }
+
+ return await _execute_with_mcp_client(request, _list_tools_operation)
diff --git a/litellm/proxy/_experimental/mcp_server/server.py b/litellm/proxy/_experimental/mcp_server/server.py
index aa2a6ee1a75..38619112ccc 100644
--- a/litellm/proxy/_experimental/mcp_server/server.py
+++ b/litellm/proxy/_experimental/mcp_server/server.py
@@ -40,6 +40,7 @@ except ImportError as e:
# Global variables to track initialization
_SESSION_MANAGERS_INITIALIZED = False
+_INITIALIZATION_LOCK = asyncio.Lock()
if MCP_AVAILABLE:
from mcp.server import Server
@@ -113,21 +114,23 @@ if MCP_AVAILABLE:
"""Initialize the session managers. Can be called from main app lifespan."""
global _SESSION_MANAGERS_INITIALIZED, _session_manager_cm, _sse_session_manager_cm
- if _SESSION_MANAGERS_INITIALIZED:
- return
+ # Use async lock to prevent concurrent initialization
+ async with _INITIALIZATION_LOCK:
+ if _SESSION_MANAGERS_INITIALIZED:
+ return
- verbose_logger.info("Initializing MCP session managers...")
+ verbose_logger.info("Initializing MCP session managers...")
- # Start the session managers with context managers
- _session_manager_cm = session_manager.run()
- _sse_session_manager_cm = sse_session_manager.run()
+ # Start the session managers with context managers
+ _session_manager_cm = session_manager.run()
+ _sse_session_manager_cm = sse_session_manager.run()
- # Enter the context managers
- await _session_manager_cm.__aenter__()
- await _sse_session_manager_cm.__aenter__()
+ # Enter the context managers
+ await _session_manager_cm.__aenter__()
+ await _sse_session_manager_cm.__aenter__()
- _SESSION_MANAGERS_INITIALIZED = True
- verbose_logger.info("MCP Server started with StreamableHTTP and SSE session managers!")
+ _SESSION_MANAGERS_INITIALIZED = True
+ verbose_logger.info("MCP Server started with StreamableHTTP and SSE session managers!")
async def shutdown_session_managers():
"""Shutdown the session managers."""
diff --git a/litellm/proxy/_experimental/out/_next/static/cx_klKzFUqmg6FLvftwd4/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/0GF-OyXnYlAPMWfyPAZSs/_buildManifest.js
similarity index 100%
rename from litellm/proxy/_experimental/out/_next/static/cx_klKzFUqmg6FLvftwd4/_buildManifest.js
rename to litellm/proxy/_experimental/out/_next/static/0GF-OyXnYlAPMWfyPAZSs/_buildManifest.js
diff --git a/litellm/proxy/_experimental/out/_next/static/cx_klKzFUqmg6FLvftwd4/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/0GF-OyXnYlAPMWfyPAZSs/_ssgManifest.js
similarity index 100%
rename from litellm/proxy/_experimental/out/_next/static/cx_klKzFUqmg6FLvftwd4/_ssgManifest.js
rename to litellm/proxy/_experimental/out/_next/static/0GF-OyXnYlAPMWfyPAZSs/_ssgManifest.js
diff --git a/ui/litellm-dashboard/out/_next/static/chunks/117-a0da667066d322b6.js b/litellm/proxy/_experimental/out/_next/static/chunks/117-6a9f6a591033d4a0.js
similarity index 99%
rename from ui/litellm-dashboard/out/_next/static/chunks/117-a0da667066d322b6.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/117-6a9f6a591033d4a0.js
index 21cf536ca55..54b5be82634 100644
--- a/ui/litellm-dashboard/out/_next/static/chunks/117-a0da667066d322b6.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/117-6a9f6a591033d4a0.js
@@ -1,2 +1,2 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[117],{65157:function(e,t){"use strict";function n(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return n}})},91572:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},1634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return u}});let r=n(68498),o=n(33068);function u(e,t){return(0,o.normalizePathTrailingSlash)((0,r.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75266:function(e,t){"use strict";function n(e){var t,n;t=self.__next_s,n=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[n,r]=t;return e.then(()=>new Promise((e,t)=>{let o=document.createElement("script");if(r)for(let e in r)"children"!==e&&o.setAttribute(e,r[e]);n?(o.src=n,o.onload=()=>e(),o.onerror=t):r&&(o.innerHTML=r.children,setTimeout(e)),document.head.appendChild(o)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{n()}):n()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return n}}),window.next={version:"14.2.30",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},83079:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return o}});let r=n(12846);async function o(e,t){let n=(0,r.getServerActionDispatcher)();if(!n)throw Error("Invariant: missing action dispatcher.");return new Promise((r,o)=>{n({actionId:e,actionArgs:t,resolve:r,reject:o})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92304:function(e,t,n){"use strict";let r,o;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return x}});let u=n(47043),l=n(53099),a=n(57437);n(91572);let i=u._(n(34040)),c=l._(n(2265)),s=n(6671),f=n(48701),d=u._(n(61404)),p=n(83079),h=n(89721),y=n(2103);n(70647);let _=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),n=0;n{if((0,h.isNextRouterError)(e.error)){e.preventDefault();return}});let v=document,b=new TextEncoder,g=!1,m=!1,R=null;function P(e){if(0===e[0])r=[];else if(1===e[0]){if(!r)throw Error("Unexpected server data: missing bootstrap script.");o?o.enqueue(b.encode(e[1])):r.push(e[1])}else 2===e[0]&&(R=e[1])}let j=function(){o&&!m&&(o.close(),m=!0,r=void 0),g=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",j,!1):j();let O=self.__next_f=self.__next_f||[];O.forEach(P),O.push=P;let S=new ReadableStream({start(e){r&&(r.forEach(t=>{e.enqueue(b.encode(t))}),g&&!m&&(e.close(),m=!0,r=void 0)),o=e}}),E=(0,s.createFromReadableStream)(S,{callServer:p.callServer});function w(){return(0,c.use)(E)}let T=c.default.StrictMode;function M(e){let{children:t}=e;return t}function x(){let e=(0,y.createMutableActionQueue)(),t=(0,a.jsx)(T,{children:(0,a.jsx)(f.HeadManagerContext.Provider,{value:{appDir:!0},children:(0,a.jsx)(y.ActionQueueContext.Provider,{value:e,children:(0,a.jsx)(M,{children:(0,a.jsx)(w,{})})})})}),n=window.__next_root_layout_missing_tags,r=!!(null==n?void 0:n.length),o={onRecoverableError:d.default};"__next_error__"===document.documentElement.id||r?i.default.createRoot(v,o).render(t):c.default.startTransition(()=>i.default.hydrateRoot(v,t,{...o,formState:R}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54278:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(19506),(0,n(75266).appBootstrap)(()=>{let{hydrate:e}=n(92304);n(12846),n(4707),e()}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19506:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(65157);{let e=n.u;n.u=function(){for(var t=arguments.length,n=Array(t),r=0;r(l(function(){var e;let t=document.getElementsByName(u)[0];if(null==t?void 0:null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(u);e.style.cssText="position:absolute";let t=document.createElement("div");return t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal",e.attachShadow({mode:"open"}).appendChild(t),document.body.appendChild(e),t}}()),()=>{let e=document.getElementsByTagName(u)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}),[]);let[a,i]=(0,r.useState)(""),c=(0,r.useRef)();return(0,r.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==c.current&&c.current!==e&&i(e),c.current=e},[t]),n?(0,o.createPortal)(a,n):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6866:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION:function(){return r},FLIGHT_PARAMETERS:function(){return i},NEXT_DID_POSTPONE_HEADER:function(){return s},NEXT_ROUTER_PREFETCH_HEADER:function(){return u},NEXT_ROUTER_STATE_TREE:function(){return o},NEXT_RSC_UNION_QUERY:function(){return c},NEXT_URL:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return a},RSC_HEADER:function(){return n}});let n="RSC",r="Next-Action",o="Next-Router-State-Tree",u="Next-Router-Prefetch",l="Next-Url",a="text/x-component",i=[[n],[o],[u]],c="_rsc",s="x-nextjs-postponed";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},12846:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createEmptyCacheNode:function(){return C},default:function(){return I},getServerActionDispatcher:function(){return E},urlToUrlWithoutFlightMarker:function(){return T}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(61956),a=n(24673),i=n(33456),c=n(79060),s=n(47744),f=n(61060),d=n(82952),p=n(86146),h=n(1634),y=n(6495),_=n(4123),v=n(39320),b=n(38137),g=n(6866),m=n(35076),R=n(11283),P=n(84541),j="undefined"==typeof window,O=j?null:new Map,S=null;function E(){return S}let w={};function T(e){let t=new URL(e,location.origin);if(t.searchParams.delete(g.NEXT_RSC_UNION_QUERY),t.pathname.endsWith(".txt")){let{pathname:e}=t,n=e.endsWith("/index.txt")?10:4;t.pathname=e.slice(0,-n)}return t}function M(e){return e.origin!==window.location.origin}function x(e){let{appRouterState:t,sync:n}=e;return(0,u.useInsertionEffect)(()=>{let{tree:e,pushRef:r,canonicalUrl:o}=t,u={...r.preserveCustomHistoryState?window.history.state:{},__NA:!0,__PRIVATE_NEXTJS_INTERNALS_TREE:e};r.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==o?(r.pendingPush=!1,window.history.pushState(u,"",o)):window.history.replaceState(u,"",o),n(t)},[t,n]),null}function C(){return{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null}}function A(e){null==e&&(e={});let t=window.history.state,n=null==t?void 0:t.__NA;n&&(e.__NA=n);let r=null==t?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;return r&&(e.__PRIVATE_NEXTJS_INTERNALS_TREE=r),e}function N(e){let{headCacheNode:t}=e,n=null!==t?t.head:null,r=null!==t?t.prefetchHead:null,o=null!==r?r:n;return(0,u.useDeferredValue)(n,o)}function D(e){let t,{buildId:n,initialHead:r,initialTree:i,urlParts:f,initialSeedData:g,couldBeIntercepted:E,assetPrefix:T,missingSlots:C}=e,D=(0,u.useMemo)(()=>(0,d.createInitialRouterState)({buildId:n,initialSeedData:g,urlParts:f,initialTree:i,initialParallelRoutes:O,location:j?null:window.location,initialHead:r,couldBeIntercepted:E}),[n,g,f,i,r,E]),[I,U,k]=(0,s.useReducerWithReduxDevtools)(D);(0,u.useEffect)(()=>{O=null},[]);let{canonicalUrl:F}=(0,s.useUnwrapState)(I),{searchParams:L,pathname:H}=(0,u.useMemo)(()=>{let e=new URL(F,"undefined"==typeof window?"http://n":window.location.href);return{searchParams:e.searchParams,pathname:(0,R.hasBasePath)(e.pathname)?(0,m.removeBasePath)(e.pathname):e.pathname}},[F]),$=(0,u.useCallback)(e=>{let{previousTree:t,serverResponse:n}=e;(0,u.startTransition)(()=>{U({type:a.ACTION_SERVER_PATCH,previousTree:t,serverResponse:n})})},[U]),G=(0,u.useCallback)((e,t,n)=>{let r=new URL((0,h.addBasePath)(e),location.href);return U({type:a.ACTION_NAVIGATE,url:r,isExternalUrl:M(r),locationSearch:location.search,shouldScroll:null==n||n,navigateType:t})},[U]);S=(0,u.useCallback)(e=>{(0,u.startTransition)(()=>{U({...e,type:a.ACTION_SERVER_ACTION})})},[U]);let z=(0,u.useMemo)(()=>({back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{let n;if(!(0,p.isBot)(window.navigator.userAgent)){try{n=new URL((0,h.addBasePath)(e),window.location.href)}catch(t){throw Error("Cannot prefetch '"+e+"' because it cannot be converted to a URL.")}M(n)||(0,u.startTransition)(()=>{var e;U({type:a.ACTION_PREFETCH,url:n,kind:null!=(e=null==t?void 0:t.kind)?e:a.PrefetchKind.FULL})})}},replace:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;G(e,"replace",null==(n=t.scroll)||n)})},push:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;G(e,"push",null==(n=t.scroll)||n)})},refresh:()=>{(0,u.startTransition)(()=>{U({type:a.ACTION_REFRESH,origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}}),[U,G]);(0,u.useEffect)(()=>{window.next&&(window.next.router=z)},[z]),(0,u.useEffect)(()=>{function e(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE)&&(w.pendingMpaPath=void 0,U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE}))}return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[U]);let{pushRef:B}=(0,s.useUnwrapState)(I);if(B.mpaNavigation){if(w.pendingMpaPath!==F){let e=window.location;B.pendingPush?e.assign(F):e.replace(F),w.pendingMpaPath=F}(0,u.use)(b.unresolvedThenable)}(0,u.useEffect)(()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history),n=e=>{var t;let n=window.location.href,r=null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(null!=e?e:n,n),tree:r})})};window.history.pushState=function(t,r,o){return(null==t?void 0:t.__NA)||(null==t?void 0:t._N)||(t=A(t),o&&n(o)),e(t,r,o)},window.history.replaceState=function(e,r,o){return(null==e?void 0:e.__NA)||(null==e?void 0:e._N)||(e=A(e),o&&n(o)),t(e,r,o)};let r=e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:t.__PRIVATE_NEXTJS_INTERNALS_TREE})})}};return window.addEventListener("popstate",r),()=>{window.history.pushState=e,window.history.replaceState=t,window.removeEventListener("popstate",r)}},[U]);let{cache:W,tree:K,nextUrl:V,focusAndScrollRef:Y}=(0,s.useUnwrapState)(I),X=(0,u.useMemo)(()=>(0,v.findHeadInCache)(W,K[1]),[W,K]),q=(0,u.useMemo)(()=>(function e(t,n){for(let r of(void 0===n&&(n={}),Object.values(t[1]))){let t=r[0],o=Array.isArray(t),u=o?t[1]:t;!u||u.startsWith(P.PAGE_SEGMENT_KEY)||(o&&("c"===t[2]||"oc"===t[2])?n[t[0]]=t[1].split("/"):o&&(n[t[0]]=t[1]),n=e(r,n))}return n})(K),[K]);if(null!==X){let[e,n]=X;t=(0,o.jsx)(N,{headCacheNode:e},n)}else t=null;let J=(0,o.jsxs)(_.RedirectBoundary,{children:[t,W.rsc,(0,o.jsx)(y.AppRouterAnnouncer,{tree:K})]});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{appRouterState:(0,s.useUnwrapState)(I),sync:k}),(0,o.jsx)(c.PathParamsContext.Provider,{value:q,children:(0,o.jsx)(c.PathnameContext.Provider,{value:H,children:(0,o.jsx)(c.SearchParamsContext.Provider,{value:L,children:(0,o.jsx)(l.GlobalLayoutRouterContext.Provider,{value:{buildId:n,changeByServerResponse:$,tree:K,focusAndScrollRef:Y,nextUrl:V},children:(0,o.jsx)(l.AppRouterContext.Provider,{value:z,children:(0,o.jsx)(l.LayoutRouterContext.Provider,{value:{childNodes:W.parallelRoutes,tree:K,url:F,loading:W.loading},children:J})})})})})})]})}function I(e){let{globalErrorComponent:t,...n}=e;return(0,o.jsx)(f.ErrorBoundary,{errorComponent:t,children:(0,o.jsx)(D,{...n})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},96149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return u}});let r=n(18993),o=n(51845);function u(e){let t=o.staticGenerationAsyncStorage.getStore();if((null==t||!t.forceStatic)&&(null==t?void 0:t.isStaticGeneration))throw new r.BailoutToCSRError(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19107:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ClientPageRoot",{enumerable:!0,get:function(){return u}});let r=n(57437),o=n(54535);function u(e){let{Component:t,props:n}=e;return n.searchParams=(0,o.createDynamicallyTrackedSearchParams)(n.searchParams||{}),(0,r.jsx)(t,{...n})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},61060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ErrorBoundary:function(){return h},ErrorBoundaryHandler:function(){return f},GlobalError:function(){return d},default:function(){return p}});let r=n(47043),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(89721),i=n(51845),c={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};function s(e){let{error:t}=e,n=i.staticGenerationAsyncStorage.getStore();if((null==n?void 0:n.isRevalidate)||(null==n?void 0:n.isStaticGeneration))throw console.error(t),t;return null}class f extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,o.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}}function d(e){let{error:t}=e,n=null==t?void 0:t.digest;return(0,o.jsxs)("html",{id:"__next_error__",children:[(0,o.jsx)("head",{}),(0,o.jsxs)("body",{children:[(0,o.jsx)(s,{error:t}),(0,o.jsx)("div",{style:c.error,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{style:c.text,children:"Application error: a "+(n?"server":"client")+"-side exception has occurred (see the "+(n?"server logs":"browser console")+" for more information)."}),n?(0,o.jsx)("p",{style:c.text,children:"Digest: "+n}):null]})})]})]})}let p=d;function h(e){let{errorComponent:t,errorStyles:n,errorScripts:r,children:u}=e,a=(0,l.usePathname)();return t?(0,o.jsx)(f,{pathname:a,errorComponent:t,errorStyles:n,errorScripts:r,children:u}):(0,o.jsx)(o.Fragment,{children:u})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},46177:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DynamicServerError:function(){return r},isDynamicServerError:function(){return o}});let n="DYNAMIC_SERVER_USAGE";class r extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=n}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},89721:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return u}});let r=n(98200),o=n(88968);function u(e){return e&&e.digest&&((0,o.isRedirectError)(e)||(0,r.isNotFoundError)(e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});let r=n(47043),o=n(53099),u=n(57437),l=o._(n(2265)),a=r._(n(54887)),i=n(61956),c=n(44848),s=n(38137),f=n(61060),d=n(76015),p=n(7092),h=n(4123),y=n(80),_=n(73171),v=n(78505),b=n(28077),g=["bottom","height","left","right","top","width","x","y"];function m(e,t){let n=e.getBoundingClientRect();return n.top>=0&&n.top<=t}class R extends l.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){var n;if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,n)=>(0,d.matchSegment)(t,e[n]))))return;let r=null,o=e.hashFragment;if(o&&(r="top"===o?document.body:null!=(n=document.getElementById(o))?n:document.getElementsByName(o)[0]),r||(r="undefined"==typeof window?null:a.default.findDOMNode(this)),!(r instanceof Element))return;for(;!(r instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return g.every(e=>0===t[e])}(r);){if(null===r.nextElementSibling)return;r=r.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,p.handleSmoothScroll)(()=>{if(o){r.scrollIntoView();return}let e=document.documentElement,t=e.clientHeight;!m(r,t)&&(e.scrollTop=0,m(r,t)||r.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,r.focus()}}}}function P(e){let{segmentPath:t,children:n}=e,r=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,u.jsx)(R,{segmentPath:t,focusAndScrollRef:r.focusAndScrollRef,children:n})}function j(e){let{parallelRouterKey:t,url:n,childNodes:r,segmentPath:o,tree:a,cacheKey:f}=e,p=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!p)throw Error("invariant global layout router not mounted");let{buildId:h,changeByServerResponse:y,tree:_}=p,v=r.get(f);if(void 0===v){let e={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};v=e,r.set(f,e)}let g=null!==v.prefetchRsc?v.prefetchRsc:v.rsc,m=(0,l.useDeferredValue)(v.rsc,g),R="object"==typeof m&&null!==m&&"function"==typeof m.then?(0,l.use)(m):m;if(!R){let e=v.lazyData;if(null===e){let t=function e(t,n){if(t){let[r,o]=t,u=2===t.length;if((0,d.matchSegment)(n[0],r)&&n[1].hasOwnProperty(o)){if(u){let t=e(void 0,n[1][o]);return[n[0],{...n[1],[o]:[t[0],t[1],t[2],"refetch"]}]}return[n[0],{...n[1],[o]:e(t.slice(2),n[1][o])}]}}return n}(["",...o],_),r=(0,b.hasInterceptionRouteInCurrentTree)(_);v.lazyData=e=(0,c.fetchServerResponse)(new URL(n,location.origin),t,r?p.nextUrl:null,h),v.lazyDataResolved=!1}let t=(0,l.use)(e);v.lazyDataResolved||(setTimeout(()=>{(0,l.startTransition)(()=>{y({previousTree:_,serverResponse:t})})}),v.lazyDataResolved=!0),(0,l.use)(s.unresolvedThenable)}return(0,u.jsx)(i.LayoutRouterContext.Provider,{value:{tree:a[1][t],childNodes:v.parallelRoutes,url:n,loading:v.loading},children:R})}function O(e){let{children:t,hasLoading:n,loading:r,loadingStyles:o,loadingScripts:a}=e;return n?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsxs)(u.Fragment,{children:[o,a,r]}),children:t}):(0,u.jsx)(u.Fragment,{children:t})}function S(e){let{parallelRouterKey:t,segmentPath:n,error:r,errorStyles:o,errorScripts:a,templateStyles:c,templateScripts:s,template:d,notFound:p,notFoundStyles:b}=e,g=(0,l.useContext)(i.LayoutRouterContext);if(!g)throw Error("invariant expected layout router to be mounted");let{childNodes:m,tree:R,url:S,loading:E}=g,w=m.get(t);w||(w=new Map,m.set(t,w));let T=R[1][t][0],M=(0,_.getSegmentValue)(T),x=[T];return(0,u.jsx)(u.Fragment,{children:x.map(e=>{let l=(0,_.getSegmentValue)(e),g=(0,v.createRouterCacheKey)(e);return(0,u.jsxs)(i.TemplateContext.Provider,{value:(0,u.jsx)(P,{segmentPath:n,children:(0,u.jsx)(f.ErrorBoundary,{errorComponent:r,errorStyles:o,errorScripts:a,children:(0,u.jsx)(O,{hasLoading:!!E,loading:null==E?void 0:E[0],loadingStyles:null==E?void 0:E[1],loadingScripts:null==E?void 0:E[2],children:(0,u.jsx)(y.NotFoundBoundary,{notFound:p,notFoundStyles:b,children:(0,u.jsx)(h.RedirectBoundary,{children:(0,u.jsx)(j,{parallelRouterKey:t,url:S,tree:R,childNodes:w,segmentPath:n,cacheKey:g,isActive:M===l})})})})})}),children:[c,s,d]},(0,v.createRouterCacheKey)(e,!0))})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},76015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{canSegmentBeOverridden:function(){return u},matchSegment:function(){return o}});let r=n(87417),o=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1],u=(e,t)=>{var n;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(n=(0,r.getSegmentParam)(e))?void 0:n.param)===t[0]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return i.ReadonlyURLSearchParams},RedirectType:function(){return i.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return i.notFound},permanentRedirect:function(){return i.permanentRedirect},redirect:function(){return i.redirect},useParams:function(){return p},usePathname:function(){return f},useRouter:function(){return d},useSearchParams:function(){return s},useSelectedLayoutSegment:function(){return y},useSelectedLayoutSegments:function(){return h},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let r=n(2265),o=n(61956),u=n(79060),l=n(73171),a=n(84541),i=n(52646),c=n(55501);function s(){let e=(0,r.useContext)(u.SearchParamsContext),t=(0,r.useMemo)(()=>e?new i.ReadonlyURLSearchParams(e):null,[e]);if("undefined"==typeof window){let{bailoutToClientRendering:e}=n(96149);e("useSearchParams()")}return t}function f(){return(0,r.useContext)(u.PathnameContext)}function d(){let e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function p(){return(0,r.useContext)(u.PathParamsContext)}function h(e){void 0===e&&(e="children");let t=(0,r.useContext)(o.LayoutRouterContext);return t?function e(t,n,r,o){let u;if(void 0===r&&(r=!0),void 0===o&&(o=[]),r)u=t[1][n];else{var i;let e=t[1];u=null!=(i=e.children)?i:Object.values(e)[0]}if(!u)return o;let c=u[0],s=(0,l.getSegmentValue)(c);return!s||s.startsWith(a.PAGE_SEGMENT_KEY)?o:(o.push(s),e(u,n,!1,o))}(t.tree,e):null}function y(e){void 0===e&&(e="children");let t=h(e);if(!t||0===t.length)return null;let n="children"===e?t[0]:t[t.length-1];return n===a.DEFAULT_SEGMENT_KEY?null:n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return l},RedirectType:function(){return r.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return r.permanentRedirect},redirect:function(){return r.redirect}});let r=n(88968),o=n(98200);class u extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class l extends URLSearchParams{append(){throw new u}delete(){throw new u}set(){throw new u}sort(){throw new u}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return s}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(98200);n(31765);let i=n(61956);class c extends u.default.Component{componentDidCatch(){}static getDerivedStateFromError(e){if((0,a.isNotFoundError)(e))return{notFoundTriggered:!0};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.notFoundTriggered?{notFoundTriggered:!1,previousPathname:e.pathname}:{notFoundTriggered:t.notFoundTriggered,previousPathname:e.pathname}}render(){return this.state.notFoundTriggered?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{name:"robots",content:"noindex"}),!1,this.props.notFoundStyles,this.props.notFound]}):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}}function s(e){let{notFound:t,notFoundStyles:n,asNotFound:r,children:a}=e,s=(0,l.usePathname)(),f=(0,u.useContext)(i.MissingSlotContext);return t?(0,o.jsx)(c,{pathname:s,notFound:t,notFoundStyles:n,asNotFound:r,missingSlots:f,children:a}):(0,o.jsx)(o.Fragment,{children:a})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98200:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{isNotFoundError:function(){return o},notFound:function(){return r}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return c}});let r=n(2522),o=n(90675);var u=o._("_maxConcurrency"),l=o._("_runningCount"),a=o._("_queue"),i=o._("_processNext");class c{enqueue(e){let t,n;let o=new Promise((e,r)=>{t=e,n=r}),u=async()=>{try{r._(this,l)[l]++;let n=await e();t(n)}catch(e){n(e)}finally{r._(this,l)[l]--,r._(this,i)[i]()}};return r._(this,a)[a].push({promiseFn:o,task:u}),r._(this,i)[i](),o}bump(e){let t=r._(this,a)[a].findIndex(t=>t.promiseFn===e);if(t>-1){let e=r._(this,a)[a].splice(t,1)[0];r._(this,a)[a].unshift(e),r._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:s}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),r._(this,u)[u]=e,r._(this,l)[l]=0,r._(this,a)[a]=[]}}function s(e){if(void 0===e&&(e=!1),(r._(this,l)[l]0){var t;null==(t=r._(this,a)[a].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectBoundary:function(){return s},RedirectErrorBoundary:function(){return c}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(88968);function i(e){let{redirect:t,reset:n,redirectType:r}=e,o=(0,l.useRouter)();return(0,u.useEffect)(()=>{u.default.startTransition(()=>{r===a.RedirectType.push?o.push(t,{}):o.replace(t,{}),n()})},[t,r,n,o]),null}class c extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isRedirectError)(e))return{redirect:(0,a.getURLFromRedirectError)(e),redirectType:(0,a.getRedirectTypeFromError)(e)};throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,o.jsx)(i,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}}function s(e){let{children:t}=e,n=(0,l.useRouter)();return(0,o.jsx)(c,{router:n,children:t})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5001:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),(r=n||(n={}))[r.SeeOther=303]="SeeOther",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},88968:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return c},getRedirectStatusCodeFromError:function(){return y},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return p},isRedirectError:function(){return d},permanentRedirect:function(){return f},redirect:function(){return s}});let u=n(20544),l=n(90295),a=n(5001),i="NEXT_REDIRECT";function c(e,t,n){void 0===n&&(n=a.RedirectStatusCode.TemporaryRedirect);let r=Error(i);r.digest=i+";"+t+";"+e+";"+n+";";let o=u.requestAsyncStorage.getStore();return o&&(r.mutableCookies=o.mutableCookies),r}function s(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function f(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,n,r,o]=e.digest.split(";",4),u=Number(o);return t===i&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(u)&&u in a.RedirectStatusCode}function p(e){return d(e)?e.digest.split(";",3)[2]:null}function h(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function y(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(o=r||(r={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},36423:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(61956);function a(){let e=(0,u.useContext)(l.TemplateContext);return(0,o.jsx)(o.Fragment,{children:e})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},20544:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return r.requestAsyncStorage}});let r=n(25575);function o(e){let t=r.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},22356:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return u}});let r=n(27420),o=n(92576);function u(e,t,n,u){let[l,a,i]=n.slice(-3);if(null===a)return!1;if(3===n.length){let n=a[2],o=a[3];t.loading=o,t.rsc=n,t.prefetchRsc=null,(0,r.fillLazyItemsTillLeafWithHead)(t,e,l,a,i,u)}else t.rsc=e.rsc,t.prefetchRsc=e.prefetchRsc,t.parallelRoutes=new Map(e.parallelRoutes),t.loading=e.loading,(0,o.fillCacheWithNewSubTreeData)(t,e,n,u);return!0}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81935:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyRouterStatePatchToTree",{enumerable:!0,get:function(){return function e(t,n,r,a){let i;let[c,s,f,d,p]=n;if(1===t.length){let e=l(n,r,t);return(0,u.addRefreshMarkerToActiveParallelSegments)(e,a),e}let[h,y]=t;if(!(0,o.matchSegment)(h,c))return null;if(2===t.length)i=l(s[y],r,t);else if(null===(i=e(t.slice(2),s[y],r,a)))return null;let _=[t[0],{...s,[y]:i},f,d];return p&&(_[4]=!0),(0,u.addRefreshMarkerToActiveParallelSegments)(_,a),_}}});let r=n(84541),o=n(76015),u=n(50232);function l(e,t,n){let[u,a]=e,[i,c]=t;if(i===r.DEFAULT_SEGMENT_KEY&&u!==r.DEFAULT_SEGMENT_KEY)return e;if((0,o.matchSegment)(u,i)){let t={};for(let e in a)void 0!==c[e]?t[e]=l(a[e],c[e],n):t[e]=a[e];for(let e in c)t[e]||(t[e]=c[e]);let r=[u,t];return e[2]&&(r[2]=e[2]),e[3]&&(r[3]=e[3]),e[4]&&(r[4]=e[4]),r}return t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clearCacheNodeDataForSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l),s=t.parallelRoutes.get(l);s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s));let f=null==c?void 0:c.get(i),d=s.get(i);if(u){d&&d.lazyData&&d!==f||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}if(!d||!f){d||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}return d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved,loading:d.loading},s.set(i,d)),e(d,f,o.slice(2))}}});let r=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5410:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{computeChangedPath:function(){return s},extractPathFromFlightRouterState:function(){return c}});let r=n(91182),o=n(84541),u=n(76015),l=e=>"/"===e[0]?e.slice(1):e,a=e=>"string"==typeof e?"children"===e?"":e:e[1];function i(e){return e.reduce((e,t)=>""===(t=l(t))||(0,o.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function c(e){var t;let n=Array.isArray(e[0])?e[0][1]:e[0];if(n===o.DEFAULT_SEGMENT_KEY||r.INTERCEPTION_ROUTE_MARKERS.some(e=>n.startsWith(e)))return;if(n.startsWith(o.PAGE_SEGMENT_KEY))return"";let u=[a(n)],l=null!=(t=e[1])?t:{},s=l.children?c(l.children):void 0;if(void 0!==s)u.push(s);else for(let[e,t]of Object.entries(l)){if("children"===e)continue;let n=c(t);void 0!==n&&u.push(n)}return i(u)}function s(e,t){let n=function e(t,n){let[o,l]=t,[i,s]=n,f=a(o),d=a(i);if(r.INTERCEPTION_ROUTE_MARKERS.some(e=>f.startsWith(e)||d.startsWith(e)))return"";if(!(0,u.matchSegment)(o,i)){var p;return null!=(p=c(n))?p:""}for(let t in l)if(s[t]){let n=e(l[t],s[t]);if(null!==n)return a(i)+"/"+n}return null}(e,t);return null==n||"/"===n?n:i(n.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},33456:function(e,t){"use strict";function n(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82952:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return c}});let r=n(33456),o=n(27420),u=n(5410),l=n(60305),a=n(24673),i=n(50232);function c(e){var t;let{buildId:n,initialTree:c,initialSeedData:s,urlParts:f,initialParallelRoutes:d,location:p,initialHead:h,couldBeIntercepted:y}=e,_=f.join("/"),v=!p,b={lazyData:null,rsc:s[2],prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:v?new Map:d,lazyDataResolved:!1,loading:s[3]},g=p?(0,r.createHrefFromUrl)(p):_;(0,i.addRefreshMarkerToActiveParallelSegments)(c,g);let m=new Map;(null===d||0===d.size)&&(0,o.fillLazyItemsTillLeafWithHead)(b,void 0,c,s,h);let R={buildId:n,tree:c,cache:b,prefetchCache:m,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:g,nextUrl:null!=(t=(0,u.extractPathFromFlightRouterState)(c)||(null==p?void 0:p.pathname))?t:null};if(p){let e=new URL(""+p.pathname+p.search,p.origin),t=[["",c,null,null]];(0,l.createPrefetchCacheEntryForInitialLoad)({url:e,kind:a.PrefetchKind.AUTO,data:[t,void 0,!1,y],tree:R.tree,prefetchCache:R.prefetchCache,nextUrl:R.nextUrl})}return R}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},78505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return o}});let r=n(84541);function o(e,t){return(void 0===t&&(t=!1),Array.isArray(e))?e[0]+"|"+e[1]+"|"+e[2]:t&&e.startsWith(r.PAGE_SEGMENT_KEY)?r.PAGE_SEGMENT_KEY:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44848:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return s}});let r=n(6866),o=n(12846),u=n(83079),l=n(24673),a=n(37207),{createFromFetch:i}=n(6671);function c(e){return[(0,o.urlToUrlWithoutFlightMarker)(e).toString(),void 0,!1,!1]}async function s(e,t,n,s,f){let d={[r.RSC_HEADER]:"1",[r.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(t))};f===l.PrefetchKind.AUTO&&(d[r.NEXT_ROUTER_PREFETCH_HEADER]="1"),n&&(d[r.NEXT_URL]=n);let p=(0,a.hexHash)([d[r.NEXT_ROUTER_PREFETCH_HEADER]||"0",d[r.NEXT_ROUTER_STATE_TREE],d[r.NEXT_URL]].join(","));try{var h;let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="index.txt":t.pathname+=".txt",t.searchParams.set(r.NEXT_RSC_UNION_QUERY,p);let n=await fetch(t,{credentials:"same-origin",headers:d}),l=(0,o.urlToUrlWithoutFlightMarker)(n.url),a=n.redirected?l:void 0,f=n.headers.get("content-type")||"",y=!!n.headers.get(r.NEXT_DID_POSTPONE_HEADER),_=!!(null==(h=n.headers.get("vary"))?void 0:h.includes(r.NEXT_URL)),v=f===r.RSC_CONTENT_TYPE_HEADER;if(v||(v=f.startsWith("text/plain")),!v||!n.ok)return e.hash&&(l.hash=e.hash),c(l.toString());let[b,g]=await i(Promise.resolve(n),{callServer:u.callServer});if(s!==b)return c(n.url);return[g,a,y,_]}catch(t){return console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),[e.toString(),void 0,!1,!1]}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function e(t,n,l,a){let i=l.length<=5,[c,s]=l,f=(0,u.createRouterCacheKey)(s),d=n.parallelRoutes.get(c);if(!d)return;let p=t.parallelRoutes.get(c);p&&p!==d||(p=new Map(d),t.parallelRoutes.set(c,p));let h=d.get(f),y=p.get(f);if(i){if(!y||!y.lazyData||y===h){let e=l[3];y={lazyData:null,rsc:e[2],prefetchRsc:null,head:null,prefetchHead:null,loading:e[3],parallelRoutes:h?new Map(h.parallelRoutes):new Map,lazyDataResolved:!1},h&&(0,r.invalidateCacheByRouterState)(y,h,l[2]),(0,o.fillLazyItemsTillLeafWithHead)(y,h,l[2],e,l[4],a),p.set(f,y)}return}y&&h&&(y===h&&(y={lazyData:y.lazyData,rsc:y.rsc,prefetchRsc:y.prefetchRsc,head:y.head,prefetchHead:y.prefetchHead,parallelRoutes:new Map(y.parallelRoutes),lazyDataResolved:!1,loading:y.loading},p.set(f,y)),e(y,h,l.slice(2),a))}}});let r=n(94377),o=n(27420),u=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function e(t,n,u,l,a,i){if(0===Object.keys(u[1]).length){t.head=a;return}for(let c in u[1]){let s;let f=u[1][c],d=f[0],p=(0,r.createRouterCacheKey)(d),h=null!==l&&void 0!==l[1][c]?l[1][c]:null;if(n){let r=n.parallelRoutes.get(c);if(r){let n;let u=(null==i?void 0:i.kind)==="auto"&&i.status===o.PrefetchCacheEntryStatus.reusable,l=new Map(r),s=l.get(p);n=null!==h?{lazyData:null,rsc:h[2],prefetchRsc:null,head:null,prefetchHead:null,loading:h[3],parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1}:u&&s?{lazyData:s.lazyData,rsc:s.rsc,prefetchRsc:s.prefetchRsc,head:s.head,prefetchHead:s.prefetchHead,parallelRoutes:new Map(s.parallelRoutes),lazyDataResolved:s.lazyDataResolved,loading:s.loading}:{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1,loading:null},l.set(p,n),e(n,s,f,h||null,a,i),t.parallelRoutes.set(c,l);continue}}if(null!==h){let e=h[2],t=h[3];s={lazyData:null,rsc:e,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:t}}else s={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};let y=t.parallelRoutes.get(c);y?y.set(p,s):t.parallelRoutes.set(c,new Map([[p,s]])),e(s,void 0,f,h,a,i)}}}});let r=n(78505),o=n(24673);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44510:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleMutable",{enumerable:!0,get:function(){return u}});let r=n(5410);function o(e){return void 0!==e}function u(e,t){var n,u,l;let a=null==(u=t.shouldScroll)||u,i=e.nextUrl;if(o(t.patchedTree)){let n=(0,r.computeChangedPath)(e.tree,t.patchedTree);n?i=n:i||(i=e.canonicalUrl)}return{buildId:e.buildId,canonicalUrl:o(t.canonicalUrl)?t.canonicalUrl===e.canonicalUrl?e.canonicalUrl:t.canonicalUrl:e.canonicalUrl,pushRef:{pendingPush:o(t.pendingPush)?t.pendingPush:e.pushRef.pendingPush,mpaNavigation:o(t.mpaNavigation)?t.mpaNavigation:e.pushRef.mpaNavigation,preserveCustomHistoryState:o(t.preserveCustomHistoryState)?t.preserveCustomHistoryState:e.pushRef.preserveCustomHistoryState},focusAndScrollRef:{apply:!!a&&(!!o(null==t?void 0:t.scrollableSegments)||e.focusAndScrollRef.apply),onlyHashChange:!!t.hashFragment&&e.canonicalUrl.split("#",1)[0]===(null==(n=t.canonicalUrl)?void 0:n.split("#",1)[0]),hashFragment:a?t.hashFragment&&""!==t.hashFragment?decodeURIComponent(t.hashFragment.slice(1)):e.focusAndScrollRef.hashFragment:null,segmentPaths:a?null!=(l=null==t?void 0:t.scrollableSegments)?l:e.focusAndScrollRef.segmentPaths:[]},cache:t.cache?t.cache:e.cache,prefetchCache:t.prefetchCache?t.prefetchCache:e.prefetchCache,tree:o(t.patchedTree)?t.patchedTree:e.tree,nextUrl:i}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77831:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSegmentMismatch",{enumerable:!0,get:function(){return o}});let r=n(95967);function o(e,t,n){return(0,r.handleExternalUrl)(e,{},e.canonicalUrl,!0)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77058:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheBelowFlightSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l);if(!c)return;let s=t.parallelRoutes.get(l);if(s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s)),u){s.delete(i);return}let f=c.get(i),d=s.get(i);d&&f&&(d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved},s.set(i,d)),e(d,f,o.slice(2)))}}});let r=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},94377:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheByRouterState",{enumerable:!0,get:function(){return o}});let r=n(78505);function o(e,t,n){for(let o in n[1]){let u=n[1][o][0],l=(0,r.createRouterCacheKey)(u),a=t.parallelRoutes.get(o);if(a){let t=new Map(a);t.delete(l),e.parallelRoutes.set(o,t)}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63237:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNavigatingToNewRootLayout",{enumerable:!0,get:function(){return function e(t,n){let r=t[0],o=n[0];if(Array.isArray(r)&&Array.isArray(o)){if(r[0]!==o[0]||r[2]!==o[2])return!0}else if(r!==o)return!0;if(t[4])return!n[4];if(n[4])return!0;let u=Object.values(t[1])[0],l=Object.values(n[1])[0];return!u||!l||e(u,l)}}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},56118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{abortTask:function(){return c},listenForDynamicRequest:function(){return a},updateCacheNodeOnNavigation:function(){return function e(t,n,a,c,s){let f=n[1],d=a[1],p=c[1],h=t.parallelRoutes,y=new Map(h),_={},v=null;for(let t in d){let n;let a=d[t],c=f[t],b=h.get(t),g=p[t],m=a[0],R=(0,u.createRouterCacheKey)(m),P=void 0!==c?c[0]:void 0,j=void 0!==b?b.get(R):void 0;if(null!==(n=m===r.PAGE_SEGMENT_KEY?l(a,void 0!==g?g:null,s):m===r.DEFAULT_SEGMENT_KEY?void 0!==c?{route:c,node:null,children:null}:l(a,void 0!==g?g:null,s):void 0!==P&&(0,o.matchSegment)(m,P)&&void 0!==j&&void 0!==c?null!=g?e(j,c,a,g,s):function(e){let t=i(e,null,null);return{route:e,node:t,children:null}}(a):l(a,void 0!==g?g:null,s))){null===v&&(v=new Map),v.set(t,n);let e=n.node;if(null!==e){let n=new Map(b);n.set(R,e),y.set(t,n)}_[t]=n.route}else _[t]=a}if(null===v)return null;let b={lazyData:null,rsc:t.rsc,prefetchRsc:t.prefetchRsc,head:t.head,prefetchHead:t.prefetchHead,loading:t.loading,parallelRoutes:y,lazyDataResolved:!1};return{route:function(e,t){let n=[e[0],t];return 2 in e&&(n[2]=e[2]),3 in e&&(n[3]=e[3]),4 in e&&(n[4]=e[4]),n}(a,_),node:b,children:v}}},updateCacheNodeOnPopstateRestoration:function(){return function e(t,n){let r=n[1],o=t.parallelRoutes,l=new Map(o);for(let t in r){let n=r[t],a=n[0],i=(0,u.createRouterCacheKey)(a),c=o.get(t);if(void 0!==c){let r=c.get(i);if(void 0!==r){let o=e(r,n),u=new Map(c);u.set(i,o),l.set(t,u)}}}let a=t.rsc,i=d(a)&&"pending"===a.status;return{lazyData:null,rsc:a,head:t.head,prefetchHead:i?t.prefetchHead:null,prefetchRsc:i?t.prefetchRsc:null,loading:i?t.loading:null,parallelRoutes:l,lazyDataResolved:!1}}}});let r=n(84541),o=n(76015),u=n(78505);function l(e,t,n){let r=i(e,t,n);return{route:e,node:r,children:null}}function a(e,t){t.then(t=>{for(let n of t[0]){let t=n.slice(0,-3),r=n[n.length-3],l=n[n.length-2],a=n[n.length-1];"string"!=typeof t&&function(e,t,n,r,l){let a=e;for(let e=0;e{c(e,t)})}function i(e,t,n){let r=e[1],o=null!==t?t[1]:null,l=new Map;for(let e in r){let t=r[e],a=null!==o?o[e]:null,c=t[0],s=(0,u.createRouterCacheKey)(c),f=i(t,void 0===a?null:a,n),d=new Map;d.set(s,f),l.set(e,d)}let a=0===l.size,c=null!==t?t[2]:null,s=null!==t?t[3]:null;return{lazyData:null,parallelRoutes:l,prefetchRsc:void 0!==c?c:null,prefetchHead:a?n:null,loading:void 0!==s?s:null,rsc:p(),head:a?p():null,lazyDataResolved:!1}}function c(e,t){let n=e.node;if(null===n)return;let r=e.children;if(null===r)s(e.route,n,t);else for(let e of r.values())c(e,t);e.node=null}function s(e,t,n){let r=e[1],o=t.parallelRoutes;for(let e in r){let t=r[e],l=o.get(e);if(void 0===l)continue;let a=t[0],i=(0,u.createRouterCacheKey)(a),c=l.get(i);void 0!==c&&s(t,c,n)}let l=t.rsc;d(l)&&(null===n?l.resolve(null):l.reject(n));let a=t.head;d(a)&&a.resolve(null)}let f=Symbol();function d(e){return e&&e.tag===f}function p(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});return n.status="pending",n.resolve=t=>{"pending"===n.status&&(n.status="fulfilled",n.value=t,e(t))},n.reject=e=>{"pending"===n.status&&(n.status="rejected",n.reason=e,t(e))},n.tag=f,n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},60305:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createPrefetchCacheEntryForInitialLoad:function(){return c},getOrCreatePrefetchCacheEntry:function(){return i},prunePrefetchCache:function(){return f}});let r=n(33456),o=n(44848),u=n(24673),l=n(24819);function a(e,t){let n=(0,r.createHrefFromUrl)(e,!1);return t?t+"%"+n:n}function i(e){let t,{url:n,nextUrl:r,tree:o,buildId:l,prefetchCache:i,kind:c}=e,f=a(n,r),d=i.get(f);if(d)t=d;else{let e=a(n),r=i.get(e);r&&(t=r)}return t?(t.status=h(t),t.kind!==u.PrefetchKind.FULL&&c===u.PrefetchKind.FULL)?s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:null!=c?c:u.PrefetchKind.TEMPORARY}):(c&&t.kind===u.PrefetchKind.TEMPORARY&&(t.kind=c),t):s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:c||u.PrefetchKind.TEMPORARY})}function c(e){let{nextUrl:t,tree:n,prefetchCache:r,url:o,kind:l,data:i}=e,[,,,c]=i,s=c?a(o,t):a(o),f={treeAtTimeOfPrefetch:n,data:Promise.resolve(i),kind:l,prefetchTime:Date.now(),lastUsedTime:Date.now(),key:s,status:u.PrefetchCacheEntryStatus.fresh};return r.set(s,f),f}function s(e){let{url:t,kind:n,tree:r,nextUrl:i,buildId:c,prefetchCache:s}=e,f=a(t),d=l.prefetchQueue.enqueue(()=>(0,o.fetchServerResponse)(t,r,i,c,n).then(e=>{let[,,,n]=e;return n&&function(e){let{url:t,nextUrl:n,prefetchCache:r}=e,o=a(t),u=r.get(o);if(!u)return;let l=a(t,n);r.set(l,u),r.delete(o)}({url:t,nextUrl:i,prefetchCache:s}),e})),p={treeAtTimeOfPrefetch:r,data:d,kind:n,prefetchTime:Date.now(),lastUsedTime:null,key:f,status:u.PrefetchCacheEntryStatus.fresh};return s.set(f,p),p}function f(e){for(let[t,n]of e)h(n)===u.PrefetchCacheEntryStatus.expired&&e.delete(t)}let d=1e3*Number("30"),p=1e3*Number("300");function h(e){let{kind:t,prefetchTime:n,lastUsedTime:r}=e;return Date.now()<(null!=r?r:n)+d?r?u.PrefetchCacheEntryStatus.reusable:u.PrefetchCacheEntryStatus.fresh:"auto"===t&&Date.now(){let[n,f]=t,h=!1;if(S.lastUsedTime||(S.lastUsedTime=Date.now(),h=!0),"string"==typeof n)return _(e,R,n,O);if(document.getElementById("__next-page-redirect"))return _(e,R,j,O);let b=e.tree,g=e.cache,w=[];for(let t of n){let n=t.slice(0,-4),r=t.slice(-3)[0],c=["",...n],f=(0,u.applyRouterStatePatchToTree)(c,b,r,j);if(null===f&&(f=(0,u.applyRouterStatePatchToTree)(c,E,r,j)),null!==f){if((0,a.isNavigatingToNewRootLayout)(b,f))return _(e,R,j,O);let u=(0,d.createEmptyCacheNode)(),m=!1;for(let e of(S.status!==i.PrefetchCacheEntryStatus.stale||h?m=(0,s.applyFlightData)(g,u,t,S):(m=function(e,t,n,r){let o=!1;for(let u of(e.rsc=t.rsc,e.prefetchRsc=t.prefetchRsc,e.loading=t.loading,e.parallelRoutes=new Map(t.parallelRoutes),v(r).map(e=>[...n,...e])))(0,y.clearCacheNodeDataForSegmentPath)(e,t,u),o=!0;return o}(u,g,n,r),S.lastUsedTime=Date.now()),(0,l.shouldHardNavigate)(c,b)?(u.rsc=g.rsc,u.prefetchRsc=g.prefetchRsc,(0,o.invalidateCacheBelowFlightSegmentPath)(u,g,n),R.cache=u):m&&(R.cache=u,g=u),b=f,v(r))){let t=[...n,...e];t[t.length-1]!==p.DEFAULT_SEGMENT_KEY&&w.push(t)}}}return R.patchedTree=b,R.canonicalUrl=f?(0,r.createHrefFromUrl)(f):j,R.pendingPush=O,R.scrollableSegments=w,R.hashFragment=P,R.shouldScroll=m,(0,c.handleMutable)(e,R)},()=>e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24819:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{prefetchQueue:function(){return l},prefetchReducer:function(){return a}});let r=n(6866),o=n(29744),u=n(60305),l=new o.PromiseQueue(5);function a(e,t){(0,u.prunePrefetchCache)(e.prefetchCache);let{url:n}=t;return n.searchParams.delete(r.NEXT_RSC_UNION_QUERY),(0,u.getOrCreatePrefetchCacheEntry)({url:n,nextUrl:e.nextUrl,prefetchCache:e.prefetchCache,kind:t.kind,tree:e.tree,buildId:e.buildId}),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},99601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return h}});let r=n(44848),o=n(33456),u=n(81935),l=n(63237),a=n(95967),i=n(44510),c=n(27420),s=n(12846),f=n(77831),d=n(28077),p=n(50232);function h(e,t){let{origin:n}=t,h={},y=e.canonicalUrl,_=e.tree;h.preserveCustomHistoryState=!1;let v=(0,s.createEmptyCacheNode)(),b=(0,d.hasInterceptionRouteInCurrentTree)(e.tree);return v.lazyData=(0,r.fetchServerResponse)(new URL(y,n),[_[0],_[1],_[2],"refetch"],b?e.nextUrl:null,e.buildId),v.lazyData.then(async n=>{let[r,s]=n;if("string"==typeof r)return(0,a.handleExternalUrl)(e,h,r,e.pushRef.pendingPush);for(let n of(v.lazyData=null,r)){if(3!==n.length)return console.log("REFRESH FAILED"),e;let[r]=n,i=(0,u.applyRouterStatePatchToTree)([""],_,r,e.canonicalUrl);if(null===i)return(0,f.handleSegmentMismatch)(e,t,r);if((0,l.isNavigatingToNewRootLayout)(_,i))return(0,a.handleExternalUrl)(e,h,y,e.pushRef.pendingPush);let d=s?(0,o.createHrefFromUrl)(s):void 0;s&&(h.canonicalUrl=d);let[g,m]=n.slice(-2);if(null!==g){let e=g[2];v.rsc=e,v.prefetchRsc=null,(0,c.fillLazyItemsTillLeafWithHead)(v,void 0,r,g,m),h.prefetchCache=new Map}await (0,p.refreshInactiveParallelSegments)({state:e,updatedTree:i,updatedCache:v,includeNextUrl:b,canonicalUrl:h.canonicalUrl||e.canonicalUrl}),h.cache=v,h.patchedTree=i,h.canonicalUrl=y,_=i}return(0,i.handleMutable)(e,h)},()=>e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77784:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return u}});let r=n(33456),o=n(5410);function u(e,t){var n;let{url:u,tree:l}=t,a=(0,r.createHrefFromUrl)(u),i=l||e.tree,c=e.cache;return{buildId:e.buildId,canonicalUrl:a,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:e.focusAndScrollRef,cache:c,prefetchCache:e.prefetchCache,tree:i,nextUrl:null!=(n=(0,o.extractPathFromFlightRouterState)(i))?n:u.pathname}}n(56118),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13722:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return g}});let r=n(83079),o=n(6866),u=n(1634),l=n(33456),a=n(95967),i=n(81935),c=n(63237),s=n(44510),f=n(27420),d=n(12846),p=n(28077),h=n(77831),y=n(50232),{createFromFetch:_,encodeReply:v}=n(6671);async function b(e,t,n){let l,{actionId:a,actionArgs:i}=n,c=await v(i),s=await fetch("",{method:"POST",headers:{Accept:o.RSC_CONTENT_TYPE_HEADER,[o.ACTION]:a,[o.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(e.tree)),...t?{[o.NEXT_URL]:t}:{}},body:c}),f=s.headers.get("x-action-redirect");try{let e=JSON.parse(s.headers.get("x-action-revalidated")||"[[],0,0]");l={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){l={paths:[],tag:!1,cookie:!1}}let d=f?new URL((0,u.addBasePath)(f),new URL(e.canonicalUrl,window.location.href)):void 0;if(s.headers.get("content-type")===o.RSC_CONTENT_TYPE_HEADER){let e=await _(Promise.resolve(s),{callServer:r.callServer});if(f){let[,t]=null!=e?e:[];return{actionFlightData:t,redirectLocation:d,revalidatedParts:l}}let[t,[,n]]=null!=e?e:[];return{actionResult:t,actionFlightData:n,redirectLocation:d,revalidatedParts:l}}return{redirectLocation:d,revalidatedParts:l}}function g(e,t){let{resolve:n,reject:r}=t,o={},u=e.canonicalUrl,_=e.tree;o.preserveCustomHistoryState=!1;let v=e.nextUrl&&(0,p.hasInterceptionRouteInCurrentTree)(e.tree)?e.nextUrl:null;return o.inFlightServerAction=b(e,v,t),o.inFlightServerAction.then(async r=>{let{actionResult:p,actionFlightData:b,redirectLocation:g}=r;if(g&&(e.pushRef.pendingPush=!0,o.pendingPush=!0),!b)return(n(p),g)?(0,a.handleExternalUrl)(e,o,g.href,e.pushRef.pendingPush):e;if("string"==typeof b)return(0,a.handleExternalUrl)(e,o,b,e.pushRef.pendingPush);if(o.inFlightServerAction=null,g){let e=(0,l.createHrefFromUrl)(g,!1);o.canonicalUrl=e}for(let n of b){if(3!==n.length)return console.log("SERVER ACTION APPLY FAILED"),e;let[r]=n,s=(0,i.applyRouterStatePatchToTree)([""],_,r,g?(0,l.createHrefFromUrl)(g):e.canonicalUrl);if(null===s)return(0,h.handleSegmentMismatch)(e,t,r);if((0,c.isNavigatingToNewRootLayout)(_,s))return(0,a.handleExternalUrl)(e,o,u,e.pushRef.pendingPush);let[p,b]=n.slice(-2),m=null!==p?p[2]:null;if(null!==m){let t=(0,d.createEmptyCacheNode)();t.rsc=m,t.prefetchRsc=null,(0,f.fillLazyItemsTillLeafWithHead)(t,void 0,r,p,b),await (0,y.refreshInactiveParallelSegments)({state:e,updatedTree:s,updatedCache:t,includeNextUrl:!!v,canonicalUrl:o.canonicalUrl||e.canonicalUrl}),o.cache=t,o.prefetchCache=new Map}o.patchedTree=s,_=s}return n(p),(0,s.handleMutable)(e,o)},t=>(r(t),e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},68448:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return f}});let r=n(33456),o=n(81935),u=n(63237),l=n(95967),a=n(22356),i=n(44510),c=n(12846),s=n(77831);function f(e,t){let{serverResponse:n}=t,[f,d]=n,p={};if(p.preserveCustomHistoryState=!1,"string"==typeof f)return(0,l.handleExternalUrl)(e,p,f,e.pushRef.pendingPush);let h=e.tree,y=e.cache;for(let n of f){let i=n.slice(0,-4),[f]=n.slice(-3,-2),_=(0,o.applyRouterStatePatchToTree)(["",...i],h,f,e.canonicalUrl);if(null===_)return(0,s.handleSegmentMismatch)(e,t,f);if((0,u.isNavigatingToNewRootLayout)(h,_))return(0,l.handleExternalUrl)(e,p,e.canonicalUrl,e.pushRef.pendingPush);let v=d?(0,r.createHrefFromUrl)(d):void 0;v&&(p.canonicalUrl=v);let b=(0,c.createEmptyCacheNode)();(0,a.applyFlightData)(y,b,n),p.patchedTree=_,p.cache=b,y=b,h=_}return(0,i.handleMutable)(e,p)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},50232:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{addRefreshMarkerToActiveParallelSegments:function(){return function e(t,n){let[r,o,,l]=t;for(let a in r.includes(u.PAGE_SEGMENT_KEY)&&"refresh"!==l&&(t[2]=n,t[3]="refresh"),o)e(o[a],n)}},refreshInactiveParallelSegments:function(){return l}});let r=n(22356),o=n(44848),u=n(84541);async function l(e){let t=new Set;await a({...e,rootTree:e.updatedTree,fetchedSegments:t})}async function a(e){let{state:t,updatedTree:n,updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c=n,canonicalUrl:s}=e,[,f,d,p]=n,h=[];if(d&&d!==s&&"refresh"===p&&!i.has(d)){i.add(d);let e=(0,o.fetchServerResponse)(new URL(d,location.origin),[c[0],c[1],c[2],"refetch"],l?t.nextUrl:null,t.buildId).then(e=>{let t=e[0];if("string"!=typeof t)for(let e of t)(0,r.applyFlightData)(u,u,e)});h.push(e)}for(let e in f){let n=a({state:t,updatedTree:f[e],updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c,canonicalUrl:s});h.push(n)}await Promise.all(h)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24673:function(e,t){"use strict";var n,r,o,u;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_FAST_REFRESH:function(){return f},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return s},ACTION_REFRESH:function(){return l},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return r},PrefetchKind:function(){return n},isThenable:function(){return p}});let l="refresh",a="navigate",i="restore",c="server-patch",s="prefetch",f="fast-refresh",d="server-action";function p(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(o=n||(n={})).AUTO="auto",o.FULL="full",o.TEMPORARY="temporary",(u=r||(r={})).fresh="fresh",u.reusable="reusable",u.expired="expired",u.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},91450:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return f}});let r=n(24673),o=n(95967),u=n(68448),l=n(77784),a=n(99601),i=n(24819),c=n(44529),s=n(13722),f="undefined"==typeof window?function(e,t){return e}:function(e,t){switch(t.type){case r.ACTION_NAVIGATE:return(0,o.navigateReducer)(e,t);case r.ACTION_SERVER_PATCH:return(0,u.serverPatchReducer)(e,t);case r.ACTION_RESTORE:return(0,l.restoreReducer)(e,t);case r.ACTION_REFRESH:return(0,a.refreshReducer)(e,t);case r.ACTION_FAST_REFRESH:return(0,c.fastRefreshReducer)(e,t);case r.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case r.ACTION_SERVER_ACTION:return(0,s.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},53728:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function e(t,n){let[o,u]=n,[l,a]=t;return(0,r.matchSegment)(l,o)?!(t.length<=2)&&e(t.slice(2),u[a]):!!Array.isArray(l)}}});let r=n(76015);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54535:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createDynamicallyTrackedSearchParams:function(){return a},createUntrackedSearchParams:function(){return l}});let r=n(51845),o=n(86999),u=n(30650);function l(e){let t=r.staticGenerationAsyncStorage.getStore();return t&&t.forceStatic?{}:e}function a(e){let t=r.staticGenerationAsyncStorage.getStore();return t?t.forceStatic?{}:t.isStaticGeneration||t.dynamicShouldError?new Proxy({},{get:(e,n,r)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),u.ReflectAdapter.get(e,n,r)),has:(e,n)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),Reflect.has(e,n)),ownKeys:e=>((0,o.trackDynamicDataAccessed)(t,"searchParams"),Reflect.ownKeys(e))}):e:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},51845:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});let r=n(20030);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},36864:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{StaticGenBailoutError:function(){return r},isStaticGenBailoutError:function(){return o}});let n="NEXT_STATIC_GEN_BAILOUT";class r extends Error{constructor(...e){super(...e),this.code=n}}function o(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38137:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unresolvedThenable",{enumerable:!0,get:function(){return n}});let n={then:()=>{}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},47744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{useReducerWithReduxDevtools:function(){return i},useUnwrapState:function(){return a}});let r=n(53099)._(n(2265)),o=n(24673),u=n(2103);function l(e){if(e instanceof Map){let t={};for(let[n,r]of e.entries()){if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r._bundlerConfig){t[n]="FlightData";continue}}t[n]=l(r)}return t}if("object"==typeof e&&null!==e){let t={};for(let n in e){let r=e[n];if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r.hasOwnProperty("_bundlerConfig")){t[n]="FlightData";continue}}t[n]=l(r)}return t}return Array.isArray(e)?e.map(l):e}function a(e){return(0,o.isThenable)(e)?(0,r.use)(e):e}let i="undefined"!=typeof window?function(e){let[t,n]=r.default.useState(e),o=(0,r.useContext)(u.ActionQueueContext);if(!o)throw Error("Invariant: Missing ActionQueueContext");let a=(0,r.useRef)(),i=(0,r.useRef)();return(0,r.useEffect)(()=>{if(!a.current&&!1!==i.current){if(void 0===i.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){i.current=!1;return}return a.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),a.current&&(a.current.init(l(e)),o&&(o.devToolsInstance=a.current)),()=>{a.current=void 0}}},[e,o]),[t,(0,r.useCallback)(t=>{o.state||(o.state=e),o.dispatch(t,n)},[o,e]),(0,r.useCallback)(e=>{a.current&&a.current.send({type:"RENDER_SYNC"},l(e))},[])]}:function(e){return[e,()=>{},()=>{}]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},11283:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let r=n(10580);function o(e){return(0,r.pathHasPrefix)(e,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},33068:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return u}});let r=n(26674),o=n(63381),u=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:n,hash:u}=(0,o.parsePath)(e);return""+(0,r.removeTrailingSlash)(t)+n+u};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},61404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(18993);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,r.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35076:function(e,t,n){"use strict";function r(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return r}}),n(11283),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},12010:function(e,t){"use strict";function n(e,t){var n=e.length;for(e.push(t);0>>1,o=e[r];if(0>>1;ru(i,n))cu(s,i)?(e[r]=s,e[c]=n,r=c):(e[r]=i,e[a]=n,r=a);else if(cu(s,n))e[r]=s,e[c]=n,r=c;else break}}return t}function u(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var l,a=performance;t.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var s=[],f=[],d=1,p=null,h=3,y=!1,_=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function R(e){for(var t=r(f);null!==t;){if(null===t.callback)o(f);else if(t.startTime<=e)o(f),t.sortIndex=t.expirationTime,n(s,t);else break;t=r(f)}}function P(e){if(v=!1,R(e),!_){if(null!==r(s))_=!0,C();else{var t=r(f);null!==t&&A(P,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var j=!1,O=-1,S=5,E=-1;function w(){return!(t.unstable_now()-Ee&&w());){var a=p.callback;if("function"==typeof a){p.callback=null,h=p.priorityLevel;var i=a(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){p.callback=i,R(e),n=!0;break t}p===r(s)&&o(s),R(e)}else o(s);p=r(s)}if(null!==p)n=!0;else{var c=r(f);null!==c&&A(P,c.startTime-e),n=!1}}break e}finally{p=null,h=u,y=!1}n=void 0}}finally{n?l():j=!1}}}if("function"==typeof m)l=function(){m(T)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,x=M.port2;M.port1.onmessage=T,l=function(){x.postMessage(null)}}else l=function(){b(T,0)};function C(){j||(j=!0,l())}function A(e,n){O=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){_||y||(_=!0,C())},t.unstable_forceFrameRate=function(e){0>e||125l?(e.sortIndex=u,n(f,e),null===r(s)&&e===r(f)&&(v?(g(O),O=-1):v=!0,A(P,u-l))):(e.sortIndex=a,n(s,e),_||y||(_=!0,C())),e},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},71767:function(e,t,n){"use strict";e.exports=n(12010)},60934:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getPathname:function(){return r},isFullStringUrl:function(){return o},parseUrl:function(){return u}});let n="http://n";function r(e){return new URL(e,n).pathname}function o(e){return/https?:\/\//.test(e)}function u(e){let t;try{t=new URL(e,n)}catch{}return t}},86999:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{Postpone:function(){return d},createPostponedAbortSignal:function(){return b},createPrerenderState:function(){return c},formatDynamicAPIAccesses:function(){return _},markCurrentScopeAsDynamic:function(){return s},trackDynamicDataAccessed:function(){return f},trackDynamicFetch:function(){return p},usedDynamicAPIs:function(){return y}});let o=(r=n(2265))&&r.__esModule?r:{default:r},u=n(46177),l=n(36864),a=n(60934),i="function"==typeof o.default.unstable_postpone;function c(e){return{isDebugSkeleton:e,dynamicAccesses:[]}}function s(e,t){let n=(0,a.getPathname)(e.urlPathname);if(!e.isUnstableCacheCallback){if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}}function f(e,t){let n=(0,a.getPathname)(e.urlPathname);if(e.isUnstableCacheCallback)throw Error(`Route ${n} used "${t}" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "${t}" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`);if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}function d({reason:e,prerenderState:t,pathname:n}){h(t,e,n)}function p(e,t){e.prerenderState&&h(e.prerenderState,t,e.urlPathname)}function h(e,t,n){v();let r=`Route ${n} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;e.dynamicAccesses.push({stack:e.isDebugSkeleton?Error().stack:void 0,expression:t}),o.default.unstable_postpone(r)}function y(e){return e.dynamicAccesses.length>0}function _(e){return e.dynamicAccesses.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" ()")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}:
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[117],{65157:function(e,t){"use strict";function n(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return n}})},91572:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},1634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return u}});let r=n(68498),o=n(33068);function u(e,t){return(0,o.normalizePathTrailingSlash)((0,r.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75266:function(e,t){"use strict";function n(e){var t,n;t=self.__next_s,n=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[n,r]=t;return e.then(()=>new Promise((e,t)=>{let o=document.createElement("script");if(r)for(let e in r)"children"!==e&&o.setAttribute(e,r[e]);n?(o.src=n,o.onload=()=>e(),o.onerror=t):r&&(o.innerHTML=r.children,setTimeout(e)),document.head.appendChild(o)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{n()}):n()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return n}}),window.next={version:"14.2.32",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},83079:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return o}});let r=n(12846);async function o(e,t){let n=(0,r.getServerActionDispatcher)();if(!n)throw Error("Invariant: missing action dispatcher.");return new Promise((r,o)=>{n({actionId:e,actionArgs:t,resolve:r,reject:o})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92304:function(e,t,n){"use strict";let r,o;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return x}});let u=n(47043),l=n(53099),a=n(57437);n(91572);let i=u._(n(34040)),c=l._(n(2265)),s=n(6671),f=n(48701),d=u._(n(61404)),p=n(83079),h=n(89721),y=n(2103);n(70647);let _=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),n=0;n{if((0,h.isNextRouterError)(e.error)){e.preventDefault();return}});let v=document,b=new TextEncoder,g=!1,m=!1,R=null;function P(e){if(0===e[0])r=[];else if(1===e[0]){if(!r)throw Error("Unexpected server data: missing bootstrap script.");o?o.enqueue(b.encode(e[1])):r.push(e[1])}else 2===e[0]&&(R=e[1])}let j=function(){o&&!m&&(o.close(),m=!0,r=void 0),g=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",j,!1):j();let O=self.__next_f=self.__next_f||[];O.forEach(P),O.push=P;let S=new ReadableStream({start(e){r&&(r.forEach(t=>{e.enqueue(b.encode(t))}),g&&!m&&(e.close(),m=!0,r=void 0)),o=e}}),E=(0,s.createFromReadableStream)(S,{callServer:p.callServer});function w(){return(0,c.use)(E)}let T=c.default.StrictMode;function M(e){let{children:t}=e;return t}function x(){let e=(0,y.createMutableActionQueue)(),t=(0,a.jsx)(T,{children:(0,a.jsx)(f.HeadManagerContext.Provider,{value:{appDir:!0},children:(0,a.jsx)(y.ActionQueueContext.Provider,{value:e,children:(0,a.jsx)(M,{children:(0,a.jsx)(w,{})})})})}),n=window.__next_root_layout_missing_tags,r=!!(null==n?void 0:n.length),o={onRecoverableError:d.default};"__next_error__"===document.documentElement.id||r?i.default.createRoot(v,o).render(t):c.default.startTransition(()=>i.default.hydrateRoot(v,t,{...o,formState:R}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54278:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(19506),(0,n(75266).appBootstrap)(()=>{let{hydrate:e}=n(92304);n(12846),n(4707),e()}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19506:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(65157);{let e=n.u;n.u=function(){for(var t=arguments.length,n=Array(t),r=0;r(l(function(){var e;let t=document.getElementsByName(u)[0];if(null==t?void 0:null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(u);e.style.cssText="position:absolute";let t=document.createElement("div");return t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal",e.attachShadow({mode:"open"}).appendChild(t),document.body.appendChild(e),t}}()),()=>{let e=document.getElementsByTagName(u)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}),[]);let[a,i]=(0,r.useState)(""),c=(0,r.useRef)();return(0,r.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==c.current&&c.current!==e&&i(e),c.current=e},[t]),n?(0,o.createPortal)(a,n):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6866:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION:function(){return r},FLIGHT_PARAMETERS:function(){return i},NEXT_DID_POSTPONE_HEADER:function(){return s},NEXT_ROUTER_PREFETCH_HEADER:function(){return u},NEXT_ROUTER_STATE_TREE:function(){return o},NEXT_RSC_UNION_QUERY:function(){return c},NEXT_URL:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return a},RSC_HEADER:function(){return n}});let n="RSC",r="Next-Action",o="Next-Router-State-Tree",u="Next-Router-Prefetch",l="Next-Url",a="text/x-component",i=[[n],[o],[u]],c="_rsc",s="x-nextjs-postponed";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},12846:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createEmptyCacheNode:function(){return C},default:function(){return I},getServerActionDispatcher:function(){return E},urlToUrlWithoutFlightMarker:function(){return T}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(61956),a=n(24673),i=n(33456),c=n(79060),s=n(47744),f=n(61060),d=n(82952),p=n(86146),h=n(1634),y=n(6495),_=n(4123),v=n(39320),b=n(38137),g=n(6866),m=n(35076),R=n(11283),P=n(84541),j="undefined"==typeof window,O=j?null:new Map,S=null;function E(){return S}let w={};function T(e){let t=new URL(e,location.origin);if(t.searchParams.delete(g.NEXT_RSC_UNION_QUERY),t.pathname.endsWith(".txt")){let{pathname:e}=t,n=e.endsWith("/index.txt")?10:4;t.pathname=e.slice(0,-n)}return t}function M(e){return e.origin!==window.location.origin}function x(e){let{appRouterState:t,sync:n}=e;return(0,u.useInsertionEffect)(()=>{let{tree:e,pushRef:r,canonicalUrl:o}=t,u={...r.preserveCustomHistoryState?window.history.state:{},__NA:!0,__PRIVATE_NEXTJS_INTERNALS_TREE:e};r.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==o?(r.pendingPush=!1,window.history.pushState(u,"",o)):window.history.replaceState(u,"",o),n(t)},[t,n]),null}function C(){return{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null}}function A(e){null==e&&(e={});let t=window.history.state,n=null==t?void 0:t.__NA;n&&(e.__NA=n);let r=null==t?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;return r&&(e.__PRIVATE_NEXTJS_INTERNALS_TREE=r),e}function N(e){let{headCacheNode:t}=e,n=null!==t?t.head:null,r=null!==t?t.prefetchHead:null,o=null!==r?r:n;return(0,u.useDeferredValue)(n,o)}function D(e){let t,{buildId:n,initialHead:r,initialTree:i,urlParts:f,initialSeedData:g,couldBeIntercepted:E,assetPrefix:T,missingSlots:C}=e,D=(0,u.useMemo)(()=>(0,d.createInitialRouterState)({buildId:n,initialSeedData:g,urlParts:f,initialTree:i,initialParallelRoutes:O,location:j?null:window.location,initialHead:r,couldBeIntercepted:E}),[n,g,f,i,r,E]),[I,U,k]=(0,s.useReducerWithReduxDevtools)(D);(0,u.useEffect)(()=>{O=null},[]);let{canonicalUrl:F}=(0,s.useUnwrapState)(I),{searchParams:L,pathname:H}=(0,u.useMemo)(()=>{let e=new URL(F,"undefined"==typeof window?"http://n":window.location.href);return{searchParams:e.searchParams,pathname:(0,R.hasBasePath)(e.pathname)?(0,m.removeBasePath)(e.pathname):e.pathname}},[F]),$=(0,u.useCallback)(e=>{let{previousTree:t,serverResponse:n}=e;(0,u.startTransition)(()=>{U({type:a.ACTION_SERVER_PATCH,previousTree:t,serverResponse:n})})},[U]),G=(0,u.useCallback)((e,t,n)=>{let r=new URL((0,h.addBasePath)(e),location.href);return U({type:a.ACTION_NAVIGATE,url:r,isExternalUrl:M(r),locationSearch:location.search,shouldScroll:null==n||n,navigateType:t})},[U]);S=(0,u.useCallback)(e=>{(0,u.startTransition)(()=>{U({...e,type:a.ACTION_SERVER_ACTION})})},[U]);let z=(0,u.useMemo)(()=>({back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{let n;if(!(0,p.isBot)(window.navigator.userAgent)){try{n=new URL((0,h.addBasePath)(e),window.location.href)}catch(t){throw Error("Cannot prefetch '"+e+"' because it cannot be converted to a URL.")}M(n)||(0,u.startTransition)(()=>{var e;U({type:a.ACTION_PREFETCH,url:n,kind:null!=(e=null==t?void 0:t.kind)?e:a.PrefetchKind.FULL})})}},replace:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;G(e,"replace",null==(n=t.scroll)||n)})},push:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;G(e,"push",null==(n=t.scroll)||n)})},refresh:()=>{(0,u.startTransition)(()=>{U({type:a.ACTION_REFRESH,origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}}),[U,G]);(0,u.useEffect)(()=>{window.next&&(window.next.router=z)},[z]),(0,u.useEffect)(()=>{function e(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE)&&(w.pendingMpaPath=void 0,U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE}))}return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[U]);let{pushRef:B}=(0,s.useUnwrapState)(I);if(B.mpaNavigation){if(w.pendingMpaPath!==F){let e=window.location;B.pendingPush?e.assign(F):e.replace(F),w.pendingMpaPath=F}(0,u.use)(b.unresolvedThenable)}(0,u.useEffect)(()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history),n=e=>{var t;let n=window.location.href,r=null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(null!=e?e:n,n),tree:r})})};window.history.pushState=function(t,r,o){return(null==t?void 0:t.__NA)||(null==t?void 0:t._N)||(t=A(t),o&&n(o)),e(t,r,o)},window.history.replaceState=function(e,r,o){return(null==e?void 0:e.__NA)||(null==e?void 0:e._N)||(e=A(e),o&&n(o)),t(e,r,o)};let r=e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:t.__PRIVATE_NEXTJS_INTERNALS_TREE})})}};return window.addEventListener("popstate",r),()=>{window.history.pushState=e,window.history.replaceState=t,window.removeEventListener("popstate",r)}},[U]);let{cache:W,tree:K,nextUrl:V,focusAndScrollRef:Y}=(0,s.useUnwrapState)(I),X=(0,u.useMemo)(()=>(0,v.findHeadInCache)(W,K[1]),[W,K]),q=(0,u.useMemo)(()=>(function e(t,n){for(let r of(void 0===n&&(n={}),Object.values(t[1]))){let t=r[0],o=Array.isArray(t),u=o?t[1]:t;!u||u.startsWith(P.PAGE_SEGMENT_KEY)||(o&&("c"===t[2]||"oc"===t[2])?n[t[0]]=t[1].split("/"):o&&(n[t[0]]=t[1]),n=e(r,n))}return n})(K),[K]);if(null!==X){let[e,n]=X;t=(0,o.jsx)(N,{headCacheNode:e},n)}else t=null;let J=(0,o.jsxs)(_.RedirectBoundary,{children:[t,W.rsc,(0,o.jsx)(y.AppRouterAnnouncer,{tree:K})]});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{appRouterState:(0,s.useUnwrapState)(I),sync:k}),(0,o.jsx)(c.PathParamsContext.Provider,{value:q,children:(0,o.jsx)(c.PathnameContext.Provider,{value:H,children:(0,o.jsx)(c.SearchParamsContext.Provider,{value:L,children:(0,o.jsx)(l.GlobalLayoutRouterContext.Provider,{value:{buildId:n,changeByServerResponse:$,tree:K,focusAndScrollRef:Y,nextUrl:V},children:(0,o.jsx)(l.AppRouterContext.Provider,{value:z,children:(0,o.jsx)(l.LayoutRouterContext.Provider,{value:{childNodes:W.parallelRoutes,tree:K,url:F,loading:W.loading},children:J})})})})})})]})}function I(e){let{globalErrorComponent:t,...n}=e;return(0,o.jsx)(f.ErrorBoundary,{errorComponent:t,children:(0,o.jsx)(D,{...n})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},96149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return u}});let r=n(18993),o=n(51845);function u(e){let t=o.staticGenerationAsyncStorage.getStore();if((null==t||!t.forceStatic)&&(null==t?void 0:t.isStaticGeneration))throw new r.BailoutToCSRError(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19107:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ClientPageRoot",{enumerable:!0,get:function(){return u}});let r=n(57437),o=n(54535);function u(e){let{Component:t,props:n}=e;return n.searchParams=(0,o.createDynamicallyTrackedSearchParams)(n.searchParams||{}),(0,r.jsx)(t,{...n})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},61060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ErrorBoundary:function(){return h},ErrorBoundaryHandler:function(){return f},GlobalError:function(){return d},default:function(){return p}});let r=n(47043),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(89721),i=n(51845),c={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};function s(e){let{error:t}=e,n=i.staticGenerationAsyncStorage.getStore();if((null==n?void 0:n.isRevalidate)||(null==n?void 0:n.isStaticGeneration))throw console.error(t),t;return null}class f extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,o.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}}function d(e){let{error:t}=e,n=null==t?void 0:t.digest;return(0,o.jsxs)("html",{id:"__next_error__",children:[(0,o.jsx)("head",{}),(0,o.jsxs)("body",{children:[(0,o.jsx)(s,{error:t}),(0,o.jsx)("div",{style:c.error,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{style:c.text,children:"Application error: a "+(n?"server":"client")+"-side exception has occurred (see the "+(n?"server logs":"browser console")+" for more information)."}),n?(0,o.jsx)("p",{style:c.text,children:"Digest: "+n}):null]})})]})]})}let p=d;function h(e){let{errorComponent:t,errorStyles:n,errorScripts:r,children:u}=e,a=(0,l.usePathname)();return t?(0,o.jsx)(f,{pathname:a,errorComponent:t,errorStyles:n,errorScripts:r,children:u}):(0,o.jsx)(o.Fragment,{children:u})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},46177:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DynamicServerError:function(){return r},isDynamicServerError:function(){return o}});let n="DYNAMIC_SERVER_USAGE";class r extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=n}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},89721:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return u}});let r=n(98200),o=n(88968);function u(e){return e&&e.digest&&((0,o.isRedirectError)(e)||(0,r.isNotFoundError)(e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});let r=n(47043),o=n(53099),u=n(57437),l=o._(n(2265)),a=r._(n(54887)),i=n(61956),c=n(44848),s=n(38137),f=n(61060),d=n(76015),p=n(7092),h=n(4123),y=n(80),_=n(73171),v=n(78505),b=n(28077),g=["bottom","height","left","right","top","width","x","y"];function m(e,t){let n=e.getBoundingClientRect();return n.top>=0&&n.top<=t}class R extends l.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){var n;if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,n)=>(0,d.matchSegment)(t,e[n]))))return;let r=null,o=e.hashFragment;if(o&&(r="top"===o?document.body:null!=(n=document.getElementById(o))?n:document.getElementsByName(o)[0]),r||(r="undefined"==typeof window?null:a.default.findDOMNode(this)),!(r instanceof Element))return;for(;!(r instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return g.every(e=>0===t[e])}(r);){if(null===r.nextElementSibling)return;r=r.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,p.handleSmoothScroll)(()=>{if(o){r.scrollIntoView();return}let e=document.documentElement,t=e.clientHeight;!m(r,t)&&(e.scrollTop=0,m(r,t)||r.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,r.focus()}}}}function P(e){let{segmentPath:t,children:n}=e,r=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,u.jsx)(R,{segmentPath:t,focusAndScrollRef:r.focusAndScrollRef,children:n})}function j(e){let{parallelRouterKey:t,url:n,childNodes:r,segmentPath:o,tree:a,cacheKey:f}=e,p=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!p)throw Error("invariant global layout router not mounted");let{buildId:h,changeByServerResponse:y,tree:_}=p,v=r.get(f);if(void 0===v){let e={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};v=e,r.set(f,e)}let g=null!==v.prefetchRsc?v.prefetchRsc:v.rsc,m=(0,l.useDeferredValue)(v.rsc,g),R="object"==typeof m&&null!==m&&"function"==typeof m.then?(0,l.use)(m):m;if(!R){let e=v.lazyData;if(null===e){let t=function e(t,n){if(t){let[r,o]=t,u=2===t.length;if((0,d.matchSegment)(n[0],r)&&n[1].hasOwnProperty(o)){if(u){let t=e(void 0,n[1][o]);return[n[0],{...n[1],[o]:[t[0],t[1],t[2],"refetch"]}]}return[n[0],{...n[1],[o]:e(t.slice(2),n[1][o])}]}}return n}(["",...o],_),r=(0,b.hasInterceptionRouteInCurrentTree)(_);v.lazyData=e=(0,c.fetchServerResponse)(new URL(n,location.origin),t,r?p.nextUrl:null,h),v.lazyDataResolved=!1}let t=(0,l.use)(e);v.lazyDataResolved||(setTimeout(()=>{(0,l.startTransition)(()=>{y({previousTree:_,serverResponse:t})})}),v.lazyDataResolved=!0),(0,l.use)(s.unresolvedThenable)}return(0,u.jsx)(i.LayoutRouterContext.Provider,{value:{tree:a[1][t],childNodes:v.parallelRoutes,url:n,loading:v.loading},children:R})}function O(e){let{children:t,hasLoading:n,loading:r,loadingStyles:o,loadingScripts:a}=e;return n?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsxs)(u.Fragment,{children:[o,a,r]}),children:t}):(0,u.jsx)(u.Fragment,{children:t})}function S(e){let{parallelRouterKey:t,segmentPath:n,error:r,errorStyles:o,errorScripts:a,templateStyles:c,templateScripts:s,template:d,notFound:p,notFoundStyles:b}=e,g=(0,l.useContext)(i.LayoutRouterContext);if(!g)throw Error("invariant expected layout router to be mounted");let{childNodes:m,tree:R,url:S,loading:E}=g,w=m.get(t);w||(w=new Map,m.set(t,w));let T=R[1][t][0],M=(0,_.getSegmentValue)(T),x=[T];return(0,u.jsx)(u.Fragment,{children:x.map(e=>{let l=(0,_.getSegmentValue)(e),g=(0,v.createRouterCacheKey)(e);return(0,u.jsxs)(i.TemplateContext.Provider,{value:(0,u.jsx)(P,{segmentPath:n,children:(0,u.jsx)(f.ErrorBoundary,{errorComponent:r,errorStyles:o,errorScripts:a,children:(0,u.jsx)(O,{hasLoading:!!E,loading:null==E?void 0:E[0],loadingStyles:null==E?void 0:E[1],loadingScripts:null==E?void 0:E[2],children:(0,u.jsx)(y.NotFoundBoundary,{notFound:p,notFoundStyles:b,children:(0,u.jsx)(h.RedirectBoundary,{children:(0,u.jsx)(j,{parallelRouterKey:t,url:S,tree:R,childNodes:w,segmentPath:n,cacheKey:g,isActive:M===l})})})})})}),children:[c,s,d]},(0,v.createRouterCacheKey)(e,!0))})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},76015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{canSegmentBeOverridden:function(){return u},matchSegment:function(){return o}});let r=n(87417),o=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1],u=(e,t)=>{var n;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(n=(0,r.getSegmentParam)(e))?void 0:n.param)===t[0]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return i.ReadonlyURLSearchParams},RedirectType:function(){return i.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return i.notFound},permanentRedirect:function(){return i.permanentRedirect},redirect:function(){return i.redirect},useParams:function(){return p},usePathname:function(){return f},useRouter:function(){return d},useSearchParams:function(){return s},useSelectedLayoutSegment:function(){return y},useSelectedLayoutSegments:function(){return h},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let r=n(2265),o=n(61956),u=n(79060),l=n(73171),a=n(84541),i=n(52646),c=n(55501);function s(){let e=(0,r.useContext)(u.SearchParamsContext),t=(0,r.useMemo)(()=>e?new i.ReadonlyURLSearchParams(e):null,[e]);if("undefined"==typeof window){let{bailoutToClientRendering:e}=n(96149);e("useSearchParams()")}return t}function f(){return(0,r.useContext)(u.PathnameContext)}function d(){let e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function p(){return(0,r.useContext)(u.PathParamsContext)}function h(e){void 0===e&&(e="children");let t=(0,r.useContext)(o.LayoutRouterContext);return t?function e(t,n,r,o){let u;if(void 0===r&&(r=!0),void 0===o&&(o=[]),r)u=t[1][n];else{var i;let e=t[1];u=null!=(i=e.children)?i:Object.values(e)[0]}if(!u)return o;let c=u[0],s=(0,l.getSegmentValue)(c);return!s||s.startsWith(a.PAGE_SEGMENT_KEY)?o:(o.push(s),e(u,n,!1,o))}(t.tree,e):null}function y(e){void 0===e&&(e="children");let t=h(e);if(!t||0===t.length)return null;let n="children"===e?t[0]:t[t.length-1];return n===a.DEFAULT_SEGMENT_KEY?null:n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return l},RedirectType:function(){return r.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return r.permanentRedirect},redirect:function(){return r.redirect}});let r=n(88968),o=n(98200);class u extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class l extends URLSearchParams{append(){throw new u}delete(){throw new u}set(){throw new u}sort(){throw new u}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return s}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(98200);n(31765);let i=n(61956);class c extends u.default.Component{componentDidCatch(){}static getDerivedStateFromError(e){if((0,a.isNotFoundError)(e))return{notFoundTriggered:!0};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.notFoundTriggered?{notFoundTriggered:!1,previousPathname:e.pathname}:{notFoundTriggered:t.notFoundTriggered,previousPathname:e.pathname}}render(){return this.state.notFoundTriggered?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{name:"robots",content:"noindex"}),!1,this.props.notFoundStyles,this.props.notFound]}):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}}function s(e){let{notFound:t,notFoundStyles:n,asNotFound:r,children:a}=e,s=(0,l.usePathname)(),f=(0,u.useContext)(i.MissingSlotContext);return t?(0,o.jsx)(c,{pathname:s,notFound:t,notFoundStyles:n,asNotFound:r,missingSlots:f,children:a}):(0,o.jsx)(o.Fragment,{children:a})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98200:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{isNotFoundError:function(){return o},notFound:function(){return r}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return c}});let r=n(2522),o=n(90675);var u=o._("_maxConcurrency"),l=o._("_runningCount"),a=o._("_queue"),i=o._("_processNext");class c{enqueue(e){let t,n;let o=new Promise((e,r)=>{t=e,n=r}),u=async()=>{try{r._(this,l)[l]++;let n=await e();t(n)}catch(e){n(e)}finally{r._(this,l)[l]--,r._(this,i)[i]()}};return r._(this,a)[a].push({promiseFn:o,task:u}),r._(this,i)[i](),o}bump(e){let t=r._(this,a)[a].findIndex(t=>t.promiseFn===e);if(t>-1){let e=r._(this,a)[a].splice(t,1)[0];r._(this,a)[a].unshift(e),r._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:s}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),r._(this,u)[u]=e,r._(this,l)[l]=0,r._(this,a)[a]=[]}}function s(e){if(void 0===e&&(e=!1),(r._(this,l)[l]0){var t;null==(t=r._(this,a)[a].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectBoundary:function(){return s},RedirectErrorBoundary:function(){return c}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(88968);function i(e){let{redirect:t,reset:n,redirectType:r}=e,o=(0,l.useRouter)();return(0,u.useEffect)(()=>{u.default.startTransition(()=>{r===a.RedirectType.push?o.push(t,{}):o.replace(t,{}),n()})},[t,r,n,o]),null}class c extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isRedirectError)(e))return{redirect:(0,a.getURLFromRedirectError)(e),redirectType:(0,a.getRedirectTypeFromError)(e)};throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,o.jsx)(i,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}}function s(e){let{children:t}=e,n=(0,l.useRouter)();return(0,o.jsx)(c,{router:n,children:t})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5001:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),(r=n||(n={}))[r.SeeOther=303]="SeeOther",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},88968:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return c},getRedirectStatusCodeFromError:function(){return y},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return p},isRedirectError:function(){return d},permanentRedirect:function(){return f},redirect:function(){return s}});let u=n(20544),l=n(90295),a=n(5001),i="NEXT_REDIRECT";function c(e,t,n){void 0===n&&(n=a.RedirectStatusCode.TemporaryRedirect);let r=Error(i);r.digest=i+";"+t+";"+e+";"+n+";";let o=u.requestAsyncStorage.getStore();return o&&(r.mutableCookies=o.mutableCookies),r}function s(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function f(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,n,r,o]=e.digest.split(";",4),u=Number(o);return t===i&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(u)&&u in a.RedirectStatusCode}function p(e){return d(e)?e.digest.split(";",3)[2]:null}function h(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function y(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(o=r||(r={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},36423:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(61956);function a(){let e=(0,u.useContext)(l.TemplateContext);return(0,o.jsx)(o.Fragment,{children:e})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},20544:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return r.requestAsyncStorage}});let r=n(25575);function o(e){let t=r.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},22356:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return u}});let r=n(27420),o=n(92576);function u(e,t,n,u){let[l,a,i]=n.slice(-3);if(null===a)return!1;if(3===n.length){let n=a[2],o=a[3];t.loading=o,t.rsc=n,t.prefetchRsc=null,(0,r.fillLazyItemsTillLeafWithHead)(t,e,l,a,i,u)}else t.rsc=e.rsc,t.prefetchRsc=e.prefetchRsc,t.parallelRoutes=new Map(e.parallelRoutes),t.loading=e.loading,(0,o.fillCacheWithNewSubTreeData)(t,e,n,u);return!0}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81935:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyRouterStatePatchToTree",{enumerable:!0,get:function(){return function e(t,n,r,a){let i;let[c,s,f,d,p]=n;if(1===t.length){let e=l(n,r,t);return(0,u.addRefreshMarkerToActiveParallelSegments)(e,a),e}let[h,y]=t;if(!(0,o.matchSegment)(h,c))return null;if(2===t.length)i=l(s[y],r,t);else if(null===(i=e(t.slice(2),s[y],r,a)))return null;let _=[t[0],{...s,[y]:i},f,d];return p&&(_[4]=!0),(0,u.addRefreshMarkerToActiveParallelSegments)(_,a),_}}});let r=n(84541),o=n(76015),u=n(50232);function l(e,t,n){let[u,a]=e,[i,c]=t;if(i===r.DEFAULT_SEGMENT_KEY&&u!==r.DEFAULT_SEGMENT_KEY)return e;if((0,o.matchSegment)(u,i)){let t={};for(let e in a)void 0!==c[e]?t[e]=l(a[e],c[e],n):t[e]=a[e];for(let e in c)t[e]||(t[e]=c[e]);let r=[u,t];return e[2]&&(r[2]=e[2]),e[3]&&(r[3]=e[3]),e[4]&&(r[4]=e[4]),r}return t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clearCacheNodeDataForSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l),s=t.parallelRoutes.get(l);s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s));let f=null==c?void 0:c.get(i),d=s.get(i);if(u){d&&d.lazyData&&d!==f||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}if(!d||!f){d||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}return d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved,loading:d.loading},s.set(i,d)),e(d,f,o.slice(2))}}});let r=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5410:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{computeChangedPath:function(){return s},extractPathFromFlightRouterState:function(){return c}});let r=n(91182),o=n(84541),u=n(76015),l=e=>"/"===e[0]?e.slice(1):e,a=e=>"string"==typeof e?"children"===e?"":e:e[1];function i(e){return e.reduce((e,t)=>""===(t=l(t))||(0,o.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function c(e){var t;let n=Array.isArray(e[0])?e[0][1]:e[0];if(n===o.DEFAULT_SEGMENT_KEY||r.INTERCEPTION_ROUTE_MARKERS.some(e=>n.startsWith(e)))return;if(n.startsWith(o.PAGE_SEGMENT_KEY))return"";let u=[a(n)],l=null!=(t=e[1])?t:{},s=l.children?c(l.children):void 0;if(void 0!==s)u.push(s);else for(let[e,t]of Object.entries(l)){if("children"===e)continue;let n=c(t);void 0!==n&&u.push(n)}return i(u)}function s(e,t){let n=function e(t,n){let[o,l]=t,[i,s]=n,f=a(o),d=a(i);if(r.INTERCEPTION_ROUTE_MARKERS.some(e=>f.startsWith(e)||d.startsWith(e)))return"";if(!(0,u.matchSegment)(o,i)){var p;return null!=(p=c(n))?p:""}for(let t in l)if(s[t]){let n=e(l[t],s[t]);if(null!==n)return a(i)+"/"+n}return null}(e,t);return null==n||"/"===n?n:i(n.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},33456:function(e,t){"use strict";function n(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82952:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return c}});let r=n(33456),o=n(27420),u=n(5410),l=n(60305),a=n(24673),i=n(50232);function c(e){var t;let{buildId:n,initialTree:c,initialSeedData:s,urlParts:f,initialParallelRoutes:d,location:p,initialHead:h,couldBeIntercepted:y}=e,_=f.join("/"),v=!p,b={lazyData:null,rsc:s[2],prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:v?new Map:d,lazyDataResolved:!1,loading:s[3]},g=p?(0,r.createHrefFromUrl)(p):_;(0,i.addRefreshMarkerToActiveParallelSegments)(c,g);let m=new Map;(null===d||0===d.size)&&(0,o.fillLazyItemsTillLeafWithHead)(b,void 0,c,s,h);let R={buildId:n,tree:c,cache:b,prefetchCache:m,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:g,nextUrl:null!=(t=(0,u.extractPathFromFlightRouterState)(c)||(null==p?void 0:p.pathname))?t:null};if(p){let e=new URL(""+p.pathname+p.search,p.origin),t=[["",c,null,null]];(0,l.createPrefetchCacheEntryForInitialLoad)({url:e,kind:a.PrefetchKind.AUTO,data:[t,void 0,!1,y],tree:R.tree,prefetchCache:R.prefetchCache,nextUrl:R.nextUrl})}return R}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},78505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return o}});let r=n(84541);function o(e,t){return(void 0===t&&(t=!1),Array.isArray(e))?e[0]+"|"+e[1]+"|"+e[2]:t&&e.startsWith(r.PAGE_SEGMENT_KEY)?r.PAGE_SEGMENT_KEY:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44848:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return s}});let r=n(6866),o=n(12846),u=n(83079),l=n(24673),a=n(37207),{createFromFetch:i}=n(6671);function c(e){return[(0,o.urlToUrlWithoutFlightMarker)(e).toString(),void 0,!1,!1]}async function s(e,t,n,s,f){let d={[r.RSC_HEADER]:"1",[r.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(t))};f===l.PrefetchKind.AUTO&&(d[r.NEXT_ROUTER_PREFETCH_HEADER]="1"),n&&(d[r.NEXT_URL]=n);let p=(0,a.hexHash)([d[r.NEXT_ROUTER_PREFETCH_HEADER]||"0",d[r.NEXT_ROUTER_STATE_TREE],d[r.NEXT_URL]].join(","));try{var h;let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="index.txt":t.pathname+=".txt",t.searchParams.set(r.NEXT_RSC_UNION_QUERY,p);let n=await fetch(t,{credentials:"same-origin",headers:d}),l=(0,o.urlToUrlWithoutFlightMarker)(n.url),a=n.redirected?l:void 0,f=n.headers.get("content-type")||"",y=!!n.headers.get(r.NEXT_DID_POSTPONE_HEADER),_=!!(null==(h=n.headers.get("vary"))?void 0:h.includes(r.NEXT_URL)),v=f===r.RSC_CONTENT_TYPE_HEADER;if(v||(v=f.startsWith("text/plain")),!v||!n.ok)return e.hash&&(l.hash=e.hash),c(l.toString());let[b,g]=await i(Promise.resolve(n),{callServer:u.callServer});if(s!==b)return c(n.url);return[g,a,y,_]}catch(t){return console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),[e.toString(),void 0,!1,!1]}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function e(t,n,l,a){let i=l.length<=5,[c,s]=l,f=(0,u.createRouterCacheKey)(s),d=n.parallelRoutes.get(c);if(!d)return;let p=t.parallelRoutes.get(c);p&&p!==d||(p=new Map(d),t.parallelRoutes.set(c,p));let h=d.get(f),y=p.get(f);if(i){if(!y||!y.lazyData||y===h){let e=l[3];y={lazyData:null,rsc:e[2],prefetchRsc:null,head:null,prefetchHead:null,loading:e[3],parallelRoutes:h?new Map(h.parallelRoutes):new Map,lazyDataResolved:!1},h&&(0,r.invalidateCacheByRouterState)(y,h,l[2]),(0,o.fillLazyItemsTillLeafWithHead)(y,h,l[2],e,l[4],a),p.set(f,y)}return}y&&h&&(y===h&&(y={lazyData:y.lazyData,rsc:y.rsc,prefetchRsc:y.prefetchRsc,head:y.head,prefetchHead:y.prefetchHead,parallelRoutes:new Map(y.parallelRoutes),lazyDataResolved:!1,loading:y.loading},p.set(f,y)),e(y,h,l.slice(2),a))}}});let r=n(94377),o=n(27420),u=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function e(t,n,u,l,a,i){if(0===Object.keys(u[1]).length){t.head=a;return}for(let c in u[1]){let s;let f=u[1][c],d=f[0],p=(0,r.createRouterCacheKey)(d),h=null!==l&&void 0!==l[1][c]?l[1][c]:null;if(n){let r=n.parallelRoutes.get(c);if(r){let n;let u=(null==i?void 0:i.kind)==="auto"&&i.status===o.PrefetchCacheEntryStatus.reusable,l=new Map(r),s=l.get(p);n=null!==h?{lazyData:null,rsc:h[2],prefetchRsc:null,head:null,prefetchHead:null,loading:h[3],parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1}:u&&s?{lazyData:s.lazyData,rsc:s.rsc,prefetchRsc:s.prefetchRsc,head:s.head,prefetchHead:s.prefetchHead,parallelRoutes:new Map(s.parallelRoutes),lazyDataResolved:s.lazyDataResolved,loading:s.loading}:{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1,loading:null},l.set(p,n),e(n,s,f,h||null,a,i),t.parallelRoutes.set(c,l);continue}}if(null!==h){let e=h[2],t=h[3];s={lazyData:null,rsc:e,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:t}}else s={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};let y=t.parallelRoutes.get(c);y?y.set(p,s):t.parallelRoutes.set(c,new Map([[p,s]])),e(s,void 0,f,h,a,i)}}}});let r=n(78505),o=n(24673);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44510:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleMutable",{enumerable:!0,get:function(){return u}});let r=n(5410);function o(e){return void 0!==e}function u(e,t){var n,u,l;let a=null==(u=t.shouldScroll)||u,i=e.nextUrl;if(o(t.patchedTree)){let n=(0,r.computeChangedPath)(e.tree,t.patchedTree);n?i=n:i||(i=e.canonicalUrl)}return{buildId:e.buildId,canonicalUrl:o(t.canonicalUrl)?t.canonicalUrl===e.canonicalUrl?e.canonicalUrl:t.canonicalUrl:e.canonicalUrl,pushRef:{pendingPush:o(t.pendingPush)?t.pendingPush:e.pushRef.pendingPush,mpaNavigation:o(t.mpaNavigation)?t.mpaNavigation:e.pushRef.mpaNavigation,preserveCustomHistoryState:o(t.preserveCustomHistoryState)?t.preserveCustomHistoryState:e.pushRef.preserveCustomHistoryState},focusAndScrollRef:{apply:!!a&&(!!o(null==t?void 0:t.scrollableSegments)||e.focusAndScrollRef.apply),onlyHashChange:!!t.hashFragment&&e.canonicalUrl.split("#",1)[0]===(null==(n=t.canonicalUrl)?void 0:n.split("#",1)[0]),hashFragment:a?t.hashFragment&&""!==t.hashFragment?decodeURIComponent(t.hashFragment.slice(1)):e.focusAndScrollRef.hashFragment:null,segmentPaths:a?null!=(l=null==t?void 0:t.scrollableSegments)?l:e.focusAndScrollRef.segmentPaths:[]},cache:t.cache?t.cache:e.cache,prefetchCache:t.prefetchCache?t.prefetchCache:e.prefetchCache,tree:o(t.patchedTree)?t.patchedTree:e.tree,nextUrl:i}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77831:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSegmentMismatch",{enumerable:!0,get:function(){return o}});let r=n(95967);function o(e,t,n){return(0,r.handleExternalUrl)(e,{},e.canonicalUrl,!0)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77058:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheBelowFlightSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l);if(!c)return;let s=t.parallelRoutes.get(l);if(s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s)),u){s.delete(i);return}let f=c.get(i),d=s.get(i);d&&f&&(d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved},s.set(i,d)),e(d,f,o.slice(2)))}}});let r=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},94377:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheByRouterState",{enumerable:!0,get:function(){return o}});let r=n(78505);function o(e,t,n){for(let o in n[1]){let u=n[1][o][0],l=(0,r.createRouterCacheKey)(u),a=t.parallelRoutes.get(o);if(a){let t=new Map(a);t.delete(l),e.parallelRoutes.set(o,t)}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63237:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNavigatingToNewRootLayout",{enumerable:!0,get:function(){return function e(t,n){let r=t[0],o=n[0];if(Array.isArray(r)&&Array.isArray(o)){if(r[0]!==o[0]||r[2]!==o[2])return!0}else if(r!==o)return!0;if(t[4])return!n[4];if(n[4])return!0;let u=Object.values(t[1])[0],l=Object.values(n[1])[0];return!u||!l||e(u,l)}}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},56118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{abortTask:function(){return c},listenForDynamicRequest:function(){return a},updateCacheNodeOnNavigation:function(){return function e(t,n,a,c,s){let f=n[1],d=a[1],p=c[1],h=t.parallelRoutes,y=new Map(h),_={},v=null;for(let t in d){let n;let a=d[t],c=f[t],b=h.get(t),g=p[t],m=a[0],R=(0,u.createRouterCacheKey)(m),P=void 0!==c?c[0]:void 0,j=void 0!==b?b.get(R):void 0;if(null!==(n=m===r.PAGE_SEGMENT_KEY?l(a,void 0!==g?g:null,s):m===r.DEFAULT_SEGMENT_KEY?void 0!==c?{route:c,node:null,children:null}:l(a,void 0!==g?g:null,s):void 0!==P&&(0,o.matchSegment)(m,P)&&void 0!==j&&void 0!==c?null!=g?e(j,c,a,g,s):function(e){let t=i(e,null,null);return{route:e,node:t,children:null}}(a):l(a,void 0!==g?g:null,s))){null===v&&(v=new Map),v.set(t,n);let e=n.node;if(null!==e){let n=new Map(b);n.set(R,e),y.set(t,n)}_[t]=n.route}else _[t]=a}if(null===v)return null;let b={lazyData:null,rsc:t.rsc,prefetchRsc:t.prefetchRsc,head:t.head,prefetchHead:t.prefetchHead,loading:t.loading,parallelRoutes:y,lazyDataResolved:!1};return{route:function(e,t){let n=[e[0],t];return 2 in e&&(n[2]=e[2]),3 in e&&(n[3]=e[3]),4 in e&&(n[4]=e[4]),n}(a,_),node:b,children:v}}},updateCacheNodeOnPopstateRestoration:function(){return function e(t,n){let r=n[1],o=t.parallelRoutes,l=new Map(o);for(let t in r){let n=r[t],a=n[0],i=(0,u.createRouterCacheKey)(a),c=o.get(t);if(void 0!==c){let r=c.get(i);if(void 0!==r){let o=e(r,n),u=new Map(c);u.set(i,o),l.set(t,u)}}}let a=t.rsc,i=d(a)&&"pending"===a.status;return{lazyData:null,rsc:a,head:t.head,prefetchHead:i?t.prefetchHead:null,prefetchRsc:i?t.prefetchRsc:null,loading:i?t.loading:null,parallelRoutes:l,lazyDataResolved:!1}}}});let r=n(84541),o=n(76015),u=n(78505);function l(e,t,n){let r=i(e,t,n);return{route:e,node:r,children:null}}function a(e,t){t.then(t=>{for(let n of t[0]){let t=n.slice(0,-3),r=n[n.length-3],l=n[n.length-2],a=n[n.length-1];"string"!=typeof t&&function(e,t,n,r,l){let a=e;for(let e=0;e{c(e,t)})}function i(e,t,n){let r=e[1],o=null!==t?t[1]:null,l=new Map;for(let e in r){let t=r[e],a=null!==o?o[e]:null,c=t[0],s=(0,u.createRouterCacheKey)(c),f=i(t,void 0===a?null:a,n),d=new Map;d.set(s,f),l.set(e,d)}let a=0===l.size,c=null!==t?t[2]:null,s=null!==t?t[3]:null;return{lazyData:null,parallelRoutes:l,prefetchRsc:void 0!==c?c:null,prefetchHead:a?n:null,loading:void 0!==s?s:null,rsc:p(),head:a?p():null,lazyDataResolved:!1}}function c(e,t){let n=e.node;if(null===n)return;let r=e.children;if(null===r)s(e.route,n,t);else for(let e of r.values())c(e,t);e.node=null}function s(e,t,n){let r=e[1],o=t.parallelRoutes;for(let e in r){let t=r[e],l=o.get(e);if(void 0===l)continue;let a=t[0],i=(0,u.createRouterCacheKey)(a),c=l.get(i);void 0!==c&&s(t,c,n)}let l=t.rsc;d(l)&&(null===n?l.resolve(null):l.reject(n));let a=t.head;d(a)&&a.resolve(null)}let f=Symbol();function d(e){return e&&e.tag===f}function p(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});return n.status="pending",n.resolve=t=>{"pending"===n.status&&(n.status="fulfilled",n.value=t,e(t))},n.reject=e=>{"pending"===n.status&&(n.status="rejected",n.reason=e,t(e))},n.tag=f,n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},60305:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createPrefetchCacheEntryForInitialLoad:function(){return c},getOrCreatePrefetchCacheEntry:function(){return i},prunePrefetchCache:function(){return f}});let r=n(33456),o=n(44848),u=n(24673),l=n(24819);function a(e,t){let n=(0,r.createHrefFromUrl)(e,!1);return t?t+"%"+n:n}function i(e){let t,{url:n,nextUrl:r,tree:o,buildId:l,prefetchCache:i,kind:c}=e,f=a(n,r),d=i.get(f);if(d)t=d;else{let e=a(n),r=i.get(e);r&&(t=r)}return t?(t.status=h(t),t.kind!==u.PrefetchKind.FULL&&c===u.PrefetchKind.FULL)?s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:null!=c?c:u.PrefetchKind.TEMPORARY}):(c&&t.kind===u.PrefetchKind.TEMPORARY&&(t.kind=c),t):s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:c||u.PrefetchKind.TEMPORARY})}function c(e){let{nextUrl:t,tree:n,prefetchCache:r,url:o,kind:l,data:i}=e,[,,,c]=i,s=c?a(o,t):a(o),f={treeAtTimeOfPrefetch:n,data:Promise.resolve(i),kind:l,prefetchTime:Date.now(),lastUsedTime:Date.now(),key:s,status:u.PrefetchCacheEntryStatus.fresh};return r.set(s,f),f}function s(e){let{url:t,kind:n,tree:r,nextUrl:i,buildId:c,prefetchCache:s}=e,f=a(t),d=l.prefetchQueue.enqueue(()=>(0,o.fetchServerResponse)(t,r,i,c,n).then(e=>{let[,,,n]=e;return n&&function(e){let{url:t,nextUrl:n,prefetchCache:r}=e,o=a(t),u=r.get(o);if(!u)return;let l=a(t,n);r.set(l,u),r.delete(o)}({url:t,nextUrl:i,prefetchCache:s}),e})),p={treeAtTimeOfPrefetch:r,data:d,kind:n,prefetchTime:Date.now(),lastUsedTime:null,key:f,status:u.PrefetchCacheEntryStatus.fresh};return s.set(f,p),p}function f(e){for(let[t,n]of e)h(n)===u.PrefetchCacheEntryStatus.expired&&e.delete(t)}let d=1e3*Number("30"),p=1e3*Number("300");function h(e){let{kind:t,prefetchTime:n,lastUsedTime:r}=e;return Date.now()<(null!=r?r:n)+d?r?u.PrefetchCacheEntryStatus.reusable:u.PrefetchCacheEntryStatus.fresh:"auto"===t&&Date.now(){let[n,f]=t,h=!1;if(S.lastUsedTime||(S.lastUsedTime=Date.now(),h=!0),"string"==typeof n)return _(e,R,n,O);if(document.getElementById("__next-page-redirect"))return _(e,R,j,O);let b=e.tree,g=e.cache,w=[];for(let t of n){let n=t.slice(0,-4),r=t.slice(-3)[0],c=["",...n],f=(0,u.applyRouterStatePatchToTree)(c,b,r,j);if(null===f&&(f=(0,u.applyRouterStatePatchToTree)(c,E,r,j)),null!==f){if((0,a.isNavigatingToNewRootLayout)(b,f))return _(e,R,j,O);let u=(0,d.createEmptyCacheNode)(),m=!1;for(let e of(S.status!==i.PrefetchCacheEntryStatus.stale||h?m=(0,s.applyFlightData)(g,u,t,S):(m=function(e,t,n,r){let o=!1;for(let u of(e.rsc=t.rsc,e.prefetchRsc=t.prefetchRsc,e.loading=t.loading,e.parallelRoutes=new Map(t.parallelRoutes),v(r).map(e=>[...n,...e])))(0,y.clearCacheNodeDataForSegmentPath)(e,t,u),o=!0;return o}(u,g,n,r),S.lastUsedTime=Date.now()),(0,l.shouldHardNavigate)(c,b)?(u.rsc=g.rsc,u.prefetchRsc=g.prefetchRsc,(0,o.invalidateCacheBelowFlightSegmentPath)(u,g,n),R.cache=u):m&&(R.cache=u,g=u),b=f,v(r))){let t=[...n,...e];t[t.length-1]!==p.DEFAULT_SEGMENT_KEY&&w.push(t)}}}return R.patchedTree=b,R.canonicalUrl=f?(0,r.createHrefFromUrl)(f):j,R.pendingPush=O,R.scrollableSegments=w,R.hashFragment=P,R.shouldScroll=m,(0,c.handleMutable)(e,R)},()=>e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24819:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{prefetchQueue:function(){return l},prefetchReducer:function(){return a}});let r=n(6866),o=n(29744),u=n(60305),l=new o.PromiseQueue(5);function a(e,t){(0,u.prunePrefetchCache)(e.prefetchCache);let{url:n}=t;return n.searchParams.delete(r.NEXT_RSC_UNION_QUERY),(0,u.getOrCreatePrefetchCacheEntry)({url:n,nextUrl:e.nextUrl,prefetchCache:e.prefetchCache,kind:t.kind,tree:e.tree,buildId:e.buildId}),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},99601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return h}});let r=n(44848),o=n(33456),u=n(81935),l=n(63237),a=n(95967),i=n(44510),c=n(27420),s=n(12846),f=n(77831),d=n(28077),p=n(50232);function h(e,t){let{origin:n}=t,h={},y=e.canonicalUrl,_=e.tree;h.preserveCustomHistoryState=!1;let v=(0,s.createEmptyCacheNode)(),b=(0,d.hasInterceptionRouteInCurrentTree)(e.tree);return v.lazyData=(0,r.fetchServerResponse)(new URL(y,n),[_[0],_[1],_[2],"refetch"],b?e.nextUrl:null,e.buildId),v.lazyData.then(async n=>{let[r,s]=n;if("string"==typeof r)return(0,a.handleExternalUrl)(e,h,r,e.pushRef.pendingPush);for(let n of(v.lazyData=null,r)){if(3!==n.length)return console.log("REFRESH FAILED"),e;let[r]=n,i=(0,u.applyRouterStatePatchToTree)([""],_,r,e.canonicalUrl);if(null===i)return(0,f.handleSegmentMismatch)(e,t,r);if((0,l.isNavigatingToNewRootLayout)(_,i))return(0,a.handleExternalUrl)(e,h,y,e.pushRef.pendingPush);let d=s?(0,o.createHrefFromUrl)(s):void 0;s&&(h.canonicalUrl=d);let[g,m]=n.slice(-2);if(null!==g){let e=g[2];v.rsc=e,v.prefetchRsc=null,(0,c.fillLazyItemsTillLeafWithHead)(v,void 0,r,g,m),h.prefetchCache=new Map}await (0,p.refreshInactiveParallelSegments)({state:e,updatedTree:i,updatedCache:v,includeNextUrl:b,canonicalUrl:h.canonicalUrl||e.canonicalUrl}),h.cache=v,h.patchedTree=i,h.canonicalUrl=y,_=i}return(0,i.handleMutable)(e,h)},()=>e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77784:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return u}});let r=n(33456),o=n(5410);function u(e,t){var n;let{url:u,tree:l}=t,a=(0,r.createHrefFromUrl)(u),i=l||e.tree,c=e.cache;return{buildId:e.buildId,canonicalUrl:a,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:e.focusAndScrollRef,cache:c,prefetchCache:e.prefetchCache,tree:i,nextUrl:null!=(n=(0,o.extractPathFromFlightRouterState)(i))?n:u.pathname}}n(56118),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13722:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return g}});let r=n(83079),o=n(6866),u=n(1634),l=n(33456),a=n(95967),i=n(81935),c=n(63237),s=n(44510),f=n(27420),d=n(12846),p=n(28077),h=n(77831),y=n(50232),{createFromFetch:_,encodeReply:v}=n(6671);async function b(e,t,n){let l,{actionId:a,actionArgs:i}=n,c=await v(i),s=await fetch("",{method:"POST",headers:{Accept:o.RSC_CONTENT_TYPE_HEADER,[o.ACTION]:a,[o.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(e.tree)),...t?{[o.NEXT_URL]:t}:{}},body:c}),f=s.headers.get("x-action-redirect");try{let e=JSON.parse(s.headers.get("x-action-revalidated")||"[[],0,0]");l={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){l={paths:[],tag:!1,cookie:!1}}let d=f?new URL((0,u.addBasePath)(f),new URL(e.canonicalUrl,window.location.href)):void 0;if(s.headers.get("content-type")===o.RSC_CONTENT_TYPE_HEADER){let e=await _(Promise.resolve(s),{callServer:r.callServer});if(f){let[,t]=null!=e?e:[];return{actionFlightData:t,redirectLocation:d,revalidatedParts:l}}let[t,[,n]]=null!=e?e:[];return{actionResult:t,actionFlightData:n,redirectLocation:d,revalidatedParts:l}}return{redirectLocation:d,revalidatedParts:l}}function g(e,t){let{resolve:n,reject:r}=t,o={},u=e.canonicalUrl,_=e.tree;o.preserveCustomHistoryState=!1;let v=e.nextUrl&&(0,p.hasInterceptionRouteInCurrentTree)(e.tree)?e.nextUrl:null;return o.inFlightServerAction=b(e,v,t),o.inFlightServerAction.then(async r=>{let{actionResult:p,actionFlightData:b,redirectLocation:g}=r;if(g&&(e.pushRef.pendingPush=!0,o.pendingPush=!0),!b)return(n(p),g)?(0,a.handleExternalUrl)(e,o,g.href,e.pushRef.pendingPush):e;if("string"==typeof b)return(0,a.handleExternalUrl)(e,o,b,e.pushRef.pendingPush);if(o.inFlightServerAction=null,g){let e=(0,l.createHrefFromUrl)(g,!1);o.canonicalUrl=e}for(let n of b){if(3!==n.length)return console.log("SERVER ACTION APPLY FAILED"),e;let[r]=n,s=(0,i.applyRouterStatePatchToTree)([""],_,r,g?(0,l.createHrefFromUrl)(g):e.canonicalUrl);if(null===s)return(0,h.handleSegmentMismatch)(e,t,r);if((0,c.isNavigatingToNewRootLayout)(_,s))return(0,a.handleExternalUrl)(e,o,u,e.pushRef.pendingPush);let[p,b]=n.slice(-2),m=null!==p?p[2]:null;if(null!==m){let t=(0,d.createEmptyCacheNode)();t.rsc=m,t.prefetchRsc=null,(0,f.fillLazyItemsTillLeafWithHead)(t,void 0,r,p,b),await (0,y.refreshInactiveParallelSegments)({state:e,updatedTree:s,updatedCache:t,includeNextUrl:!!v,canonicalUrl:o.canonicalUrl||e.canonicalUrl}),o.cache=t,o.prefetchCache=new Map}o.patchedTree=s,_=s}return n(p),(0,s.handleMutable)(e,o)},t=>(r(t),e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},68448:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return f}});let r=n(33456),o=n(81935),u=n(63237),l=n(95967),a=n(22356),i=n(44510),c=n(12846),s=n(77831);function f(e,t){let{serverResponse:n}=t,[f,d]=n,p={};if(p.preserveCustomHistoryState=!1,"string"==typeof f)return(0,l.handleExternalUrl)(e,p,f,e.pushRef.pendingPush);let h=e.tree,y=e.cache;for(let n of f){let i=n.slice(0,-4),[f]=n.slice(-3,-2),_=(0,o.applyRouterStatePatchToTree)(["",...i],h,f,e.canonicalUrl);if(null===_)return(0,s.handleSegmentMismatch)(e,t,f);if((0,u.isNavigatingToNewRootLayout)(h,_))return(0,l.handleExternalUrl)(e,p,e.canonicalUrl,e.pushRef.pendingPush);let v=d?(0,r.createHrefFromUrl)(d):void 0;v&&(p.canonicalUrl=v);let b=(0,c.createEmptyCacheNode)();(0,a.applyFlightData)(y,b,n),p.patchedTree=_,p.cache=b,y=b,h=_}return(0,i.handleMutable)(e,p)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},50232:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{addRefreshMarkerToActiveParallelSegments:function(){return function e(t,n){let[r,o,,l]=t;for(let a in r.includes(u.PAGE_SEGMENT_KEY)&&"refresh"!==l&&(t[2]=n,t[3]="refresh"),o)e(o[a],n)}},refreshInactiveParallelSegments:function(){return l}});let r=n(22356),o=n(44848),u=n(84541);async function l(e){let t=new Set;await a({...e,rootTree:e.updatedTree,fetchedSegments:t})}async function a(e){let{state:t,updatedTree:n,updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c=n,canonicalUrl:s}=e,[,f,d,p]=n,h=[];if(d&&d!==s&&"refresh"===p&&!i.has(d)){i.add(d);let e=(0,o.fetchServerResponse)(new URL(d,location.origin),[c[0],c[1],c[2],"refetch"],l?t.nextUrl:null,t.buildId).then(e=>{let t=e[0];if("string"!=typeof t)for(let e of t)(0,r.applyFlightData)(u,u,e)});h.push(e)}for(let e in f){let n=a({state:t,updatedTree:f[e],updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c,canonicalUrl:s});h.push(n)}await Promise.all(h)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24673:function(e,t){"use strict";var n,r,o,u;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_FAST_REFRESH:function(){return f},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return s},ACTION_REFRESH:function(){return l},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return r},PrefetchKind:function(){return n},isThenable:function(){return p}});let l="refresh",a="navigate",i="restore",c="server-patch",s="prefetch",f="fast-refresh",d="server-action";function p(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(o=n||(n={})).AUTO="auto",o.FULL="full",o.TEMPORARY="temporary",(u=r||(r={})).fresh="fresh",u.reusable="reusable",u.expired="expired",u.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},91450:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return f}});let r=n(24673),o=n(95967),u=n(68448),l=n(77784),a=n(99601),i=n(24819),c=n(44529),s=n(13722),f="undefined"==typeof window?function(e,t){return e}:function(e,t){switch(t.type){case r.ACTION_NAVIGATE:return(0,o.navigateReducer)(e,t);case r.ACTION_SERVER_PATCH:return(0,u.serverPatchReducer)(e,t);case r.ACTION_RESTORE:return(0,l.restoreReducer)(e,t);case r.ACTION_REFRESH:return(0,a.refreshReducer)(e,t);case r.ACTION_FAST_REFRESH:return(0,c.fastRefreshReducer)(e,t);case r.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case r.ACTION_SERVER_ACTION:return(0,s.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},53728:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function e(t,n){let[o,u]=n,[l,a]=t;return(0,r.matchSegment)(l,o)?!(t.length<=2)&&e(t.slice(2),u[a]):!!Array.isArray(l)}}});let r=n(76015);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54535:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createDynamicallyTrackedSearchParams:function(){return a},createUntrackedSearchParams:function(){return l}});let r=n(51845),o=n(86999),u=n(30650);function l(e){let t=r.staticGenerationAsyncStorage.getStore();return t&&t.forceStatic?{}:e}function a(e){let t=r.staticGenerationAsyncStorage.getStore();return t?t.forceStatic?{}:t.isStaticGeneration||t.dynamicShouldError?new Proxy({},{get:(e,n,r)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),u.ReflectAdapter.get(e,n,r)),has:(e,n)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),Reflect.has(e,n)),ownKeys:e=>((0,o.trackDynamicDataAccessed)(t,"searchParams"),Reflect.ownKeys(e))}):e:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},51845:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});let r=n(20030);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},36864:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{StaticGenBailoutError:function(){return r},isStaticGenBailoutError:function(){return o}});let n="NEXT_STATIC_GEN_BAILOUT";class r extends Error{constructor(...e){super(...e),this.code=n}}function o(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38137:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unresolvedThenable",{enumerable:!0,get:function(){return n}});let n={then:()=>{}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},47744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{useReducerWithReduxDevtools:function(){return i},useUnwrapState:function(){return a}});let r=n(53099)._(n(2265)),o=n(24673),u=n(2103);function l(e){if(e instanceof Map){let t={};for(let[n,r]of e.entries()){if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r._bundlerConfig){t[n]="FlightData";continue}}t[n]=l(r)}return t}if("object"==typeof e&&null!==e){let t={};for(let n in e){let r=e[n];if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r.hasOwnProperty("_bundlerConfig")){t[n]="FlightData";continue}}t[n]=l(r)}return t}return Array.isArray(e)?e.map(l):e}function a(e){return(0,o.isThenable)(e)?(0,r.use)(e):e}let i="undefined"!=typeof window?function(e){let[t,n]=r.default.useState(e),o=(0,r.useContext)(u.ActionQueueContext);if(!o)throw Error("Invariant: Missing ActionQueueContext");let a=(0,r.useRef)(),i=(0,r.useRef)();return(0,r.useEffect)(()=>{if(!a.current&&!1!==i.current){if(void 0===i.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){i.current=!1;return}return a.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),a.current&&(a.current.init(l(e)),o&&(o.devToolsInstance=a.current)),()=>{a.current=void 0}}},[e,o]),[t,(0,r.useCallback)(t=>{o.state||(o.state=e),o.dispatch(t,n)},[o,e]),(0,r.useCallback)(e=>{a.current&&a.current.send({type:"RENDER_SYNC"},l(e))},[])]}:function(e){return[e,()=>{},()=>{}]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},11283:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let r=n(10580);function o(e){return(0,r.pathHasPrefix)(e,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},33068:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return u}});let r=n(26674),o=n(63381),u=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:n,hash:u}=(0,o.parsePath)(e);return""+(0,r.removeTrailingSlash)(t)+n+u};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},61404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(18993);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,r.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35076:function(e,t,n){"use strict";function r(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return r}}),n(11283),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},12010:function(e,t){"use strict";function n(e,t){var n=e.length;for(e.push(t);0>>1,o=e[r];if(0>>1;ru(i,n))cu(s,i)?(e[r]=s,e[c]=n,r=c):(e[r]=i,e[a]=n,r=a);else if(cu(s,n))e[r]=s,e[c]=n,r=c;else break}}return t}function u(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var l,a=performance;t.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var s=[],f=[],d=1,p=null,h=3,y=!1,_=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function R(e){for(var t=r(f);null!==t;){if(null===t.callback)o(f);else if(t.startTime<=e)o(f),t.sortIndex=t.expirationTime,n(s,t);else break;t=r(f)}}function P(e){if(v=!1,R(e),!_){if(null!==r(s))_=!0,C();else{var t=r(f);null!==t&&A(P,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var j=!1,O=-1,S=5,E=-1;function w(){return!(t.unstable_now()-Ee&&w());){var a=p.callback;if("function"==typeof a){p.callback=null,h=p.priorityLevel;var i=a(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){p.callback=i,R(e),n=!0;break t}p===r(s)&&o(s),R(e)}else o(s);p=r(s)}if(null!==p)n=!0;else{var c=r(f);null!==c&&A(P,c.startTime-e),n=!1}}break e}finally{p=null,h=u,y=!1}n=void 0}}finally{n?l():j=!1}}}if("function"==typeof m)l=function(){m(T)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,x=M.port2;M.port1.onmessage=T,l=function(){x.postMessage(null)}}else l=function(){b(T,0)};function C(){j||(j=!0,l())}function A(e,n){O=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){_||y||(_=!0,C())},t.unstable_forceFrameRate=function(e){0>e||125l?(e.sortIndex=u,n(f,e),null===r(s)&&e===r(f)&&(v?(g(O),O=-1):v=!0,A(P,u-l))):(e.sortIndex=a,n(s,e),_||y||(_=!0,C())),e},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},71767:function(e,t,n){"use strict";e.exports=n(12010)},60934:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getPathname:function(){return r},isFullStringUrl:function(){return o},parseUrl:function(){return u}});let n="http://n";function r(e){return new URL(e,n).pathname}function o(e){return/https?:\/\//.test(e)}function u(e){let t;try{t=new URL(e,n)}catch{}return t}},86999:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{Postpone:function(){return d},createPostponedAbortSignal:function(){return b},createPrerenderState:function(){return c},formatDynamicAPIAccesses:function(){return _},markCurrentScopeAsDynamic:function(){return s},trackDynamicDataAccessed:function(){return f},trackDynamicFetch:function(){return p},usedDynamicAPIs:function(){return y}});let o=(r=n(2265))&&r.__esModule?r:{default:r},u=n(46177),l=n(36864),a=n(60934),i="function"==typeof o.default.unstable_postpone;function c(e){return{isDebugSkeleton:e,dynamicAccesses:[]}}function s(e,t){let n=(0,a.getPathname)(e.urlPathname);if(!e.isUnstableCacheCallback){if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}}function f(e,t){let n=(0,a.getPathname)(e.urlPathname);if(e.isUnstableCacheCallback)throw Error(`Route ${n} used "${t}" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "${t}" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`);if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}function d({reason:e,prerenderState:t,pathname:n}){h(t,e,n)}function p(e,t){e.prerenderState&&h(e.prerenderState,t,e.urlPathname)}function h(e,t,n){v();let r=`Route ${n} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;e.dynamicAccesses.push({stack:e.isDebugSkeleton?Error().stack:void 0,expression:t}),o.default.unstable_postpone(r)}function y(e){return e.dynamicAccesses.length>0}function _(e){return e.dynamicAccesses.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" ()")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}:
${t}`))}function v(){if(!i)throw Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js")}function b(e){v();let t=new AbortController;try{o.default.unstable_postpone(e)}catch(e){t.abort(e)}return t.signal}},87417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return o}});let r=n(91182);function o(e){let t=r.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:t?"catchall-intercepted":"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:t?"dynamic-intercepted":"dynamic",param:e.slice(1,-1)}:null}},70647:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HMR_ACTIONS_SENT_TO_BROWSER",{enumerable:!0,get:function(){return n}}),(r=n||(n={})).ADDED_PAGE="addedPage",r.REMOVED_PAGE="removedPage",r.RELOAD_PAGE="reloadPage",r.SERVER_COMPONENT_CHANGES="serverComponentChanges",r.MIDDLEWARE_CHANGES="middlewareChanges",r.CLIENT_CHANGES="clientChanges",r.SERVER_ONLY_CHANGES="serverOnlyChanges",r.SYNC="sync",r.BUILT="built",r.BUILDING="building",r.DEV_PAGES_MANIFEST_UPDATE="devPagesManifestUpdate",r.TURBOPACK_MESSAGE="turbopack-message",r.SERVER_ERROR="serverError",r.TURBOPACK_CONNECTED="turbopack-connected"},91182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return l},isInterceptionRouteAppPath:function(){return u}});let r=n(20926),o=["(..)(..)","(.)","(..)","(...)"];function u(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function l(e){let t,n,u;for(let r of e.split("/"))if(n=o.find(e=>r.startsWith(e))){[t,u]=e.split(n,2);break}if(!t||!n||!u)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,r.normalizeAppPath)(t),n){case"(.)":u="/"===t?`/${u}`:t+"/"+u;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);u=t.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":let l=t.split("/");if(l.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);u=l.slice(0,-2).concat(u).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:u}}},30650:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReflectAdapter",{enumerable:!0,get:function(){return n}});class n{static get(e,t,n){let r=Reflect.get(e,t,n);return"function"==typeof r?r.bind(e):r}static set(e,t,n,r){return Reflect.set(e,t,n,r)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},61956:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return l},LayoutRouterContext:function(){return u},MissingSlotContext:function(){return i},TemplateContext:function(){return a}});let r=n(47043)._(n(2265)),o=r.default.createContext(null),u=r.default.createContext(null),l=r.default.createContext(null),a=r.default.createContext(null),i=r.default.createContext(new Set)},37207:function(e,t){"use strict";function n(e){let t=5381;for(let n=0;n>>0}function r(e){return n(e).toString(36).slice(0,5)}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{djb2Hash:function(){return n},hexHash:function(){return r}})},48701:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return r}});let r=n(47043)._(n(2265)).default.createContext({})},79060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PathParamsContext:function(){return l},PathnameContext:function(){return u},SearchParamsContext:function(){return o}});let r=n(2265),o=(0,r.createContext)(null),u=(0,r.createContext)(null),l=(0,r.createContext)(null)},18993:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{BailoutToCSRError:function(){return r},isBailoutToCSRError:function(){return o}});let n="BAILOUT_TO_CLIENT_SIDE_RENDERING";class r extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=n}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}},78162:function(e,t){"use strict";function n(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return n}})},2103:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ActionQueueContext:function(){return a},createMutableActionQueue:function(){return s}});let r=n(53099),o=n(24673),u=n(91450),l=r._(n(2265)),a=l.default.createContext(null);function i(e,t){null!==e.pending&&(e.pending=e.pending.next,null!==e.pending?c({actionQueue:e,action:e.pending,setState:t}):e.needsRefresh&&(e.needsRefresh=!1,e.dispatch({type:o.ACTION_REFRESH,origin:window.location.origin},t)))}async function c(e){let{actionQueue:t,action:n,setState:r}=e,u=t.state;if(!u)throw Error("Invariant: Router state not initialized");t.pending=n;let l=n.payload,a=t.action(u,l);function c(e){n.discarded||(t.state=e,t.devToolsInstance&&t.devToolsInstance.send(l,e),i(t,r),n.resolve(e))}(0,o.isThenable)(a)?a.then(c,e=>{i(t,r),n.reject(e)}):c(a)}function s(){let e={state:null,dispatch:(t,n)=>(function(e,t,n){let r={resolve:n,reject:()=>{}};if(t.type!==o.ACTION_RESTORE){let e=new Promise((e,t)=>{r={resolve:e,reject:t}});(0,l.startTransition)(()=>{n(e)})}let u={payload:t,next:null,resolve:r.resolve,reject:r.reject};null===e.pending?(e.last=u,c({actionQueue:e,action:u,setState:n})):t.type===o.ACTION_NAVIGATE||t.type===o.ACTION_RESTORE?(e.pending.discarded=!0,e.last=u,e.pending.payload.type===o.ACTION_SERVER_ACTION&&(e.needsRefresh=!0),c({actionQueue:e,action:u,setState:n})):(null!==e.last&&(e.last.next=u),e.last=u)})(e,t,n),action:async(e,t)=>{if(null===e)throw Error("Invariant: Router state not initialized");return(0,u.reducer)(e,t)},pending:null,last:null};return e}},68498:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let r=n(63381);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:n,query:o,hash:u}=(0,r.parsePath)(e);return""+t+n+o+u}},20926:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{normalizeAppPath:function(){return u},normalizeRscURL:function(){return l}});let r=n(78162),o=n(84541);function u(e){return(0,r.ensureLeadingSlash)(e.split("/").reduce((e,t,n,r)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&n===r.length-1?e:e+"/"+t,""))}function l(e){return e.replace(/\.rsc($|\?)/,"$1")}},7092:function(e,t){"use strict";function n(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let n=document.documentElement,r=n.style.scrollBehavior;n.style.scrollBehavior="auto",t.dontForceLayout||n.getClientRects(),e(),n.style.scrollBehavior=r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return n}})},86146:function(e,t){"use strict";function n(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return n}})},63381:function(e,t){"use strict";function n(e){let t=e.indexOf("#"),n=e.indexOf("?"),r=n>-1&&(t<0||n-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return n}})},10580:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let r=n(63381);function o(e,t){if("string"!=typeof e)return!1;let{pathname:n}=(0,r.parsePath)(e);return n===t||n.startsWith(t+"/")}},26674:function(e,t){"use strict";function n(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return n}})},84541:function(e,t){"use strict";function n(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return r},isGroupSegment:function(){return n}});let r="__PAGE__",o="__DEFAULT__"},55501:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return u}});let r=n(53099)._(n(2265)),o=r.default.createContext(null);function u(e){let t=(0,r.useContext)(o);t&&t(e)}},31765:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},47149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54832:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return u}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let o=globalThis.AsyncLocalStorage;function u(){return o?new o:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25575:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},20030:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},34040:function(e,t,n){"use strict";var r=n(54887);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},54887:function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(84417)},97950:function(e,t,n){"use strict";var r=n(54887),o={stream:!0},u=new Map;function l(e){var t=n(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function a(){}var i=new Map,c=n.u;n.u=function(e){var t=i.get(e);return void 0!==t?t:c(e)};var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,f=Symbol.for("react.element"),d=Symbol.for("react.lazy"),p=Symbol.iterator,h=Array.isArray,y=Object.getPrototypeOf,_=Object.prototype,v=new WeakMap;function b(e,t,n,r){this.status=e,this.value=t,this.reason=n,this._response=r}function g(e){switch(e.status){case"resolved_model":E(e);break;case"resolved_module":w(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":case"cyclic":throw e;default:throw e.reason}}function m(e,t){for(var n=0;nh?(_=h,h=3,p++):(_=0,h=3);continue;case 2:44===(m=d[p++])?h=4:v=v<<4|(96d.length&&(m=-1)}var O=d.byteOffset+p;if(-1p.includes(e)||"json"===t.format,m=e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch(e){return!1}},f=(e,t,o)=>{let a={max_budget:"Enter maximum budget in USD (e.g., 100.50)",budget_duration:"Select a time period for budget reset",tpm_limit:"Enter maximum tokens per minute (whole number)",rpm_limit:"Enter maximum requests per minute (whole number)",duration:"Enter duration (e.g., 30s, 24h, 7d)",metadata:'Enter JSON object with key-value pairs\nExample: {"team": "research", "project": "nlp"}',config:'Enter configuration as JSON object\nExample: {"setting": "value"}',permissions:"Enter comma-separated permission strings",enforced_params:'Enter parameters as JSON object\nExample: {"param": "value"}',blocked:"Enter true/false or specific block conditions",aliases:'Enter aliases as JSON object\nExample: {"alias1": "value1", "alias2": "value2"}',models:"Select one or more model names",key_alias:"Enter a unique identifier for this key",tags:"Enter comma-separated tag strings"}[e]||({string:"Text input",number:"Numeric input",integer:"Whole number input",boolean:"True/False value"})[o]||"Text input";return g(e,t)?"".concat(a,"\nMust be valid JSON format"):t.enum?"Select from available options\nAllowed values: ".concat(t.enum.join(", ")):a};t.Z=e=>{let{schemaComponent:t,excludedFields:o=[],form:p,overrideLabels:w={},overrideTooltips:y={},customValidation:j={},defaultValues:_={}}=e,[C,k]=(0,r.useState)(null),[v,T]=(0,r.useState)(null);(0,r.useEffect)(()=>{(async()=>{try{let e=(await (0,h.getOpenAPISchema)()).components.schemas[t];if(!e)throw Error('Schema component "'.concat(t,'" not found'));k(e);let a={};Object.keys(e.properties).filter(e=>!o.includes(e)&&void 0!==_[e]).forEach(e=>{a[e]=_[e]}),p.setFieldsValue(a)}catch(e){console.error("Schema fetch error:",e),T(e instanceof Error?e.message:"Failed to fetch schema")}})()},[t,p,o]);let E=e=>{if(e.type)return e.type;if(e.anyOf){let t=e.anyOf.map(e=>e.type);if(t.includes("number")||t.includes("integer"))return"number";t.includes("string")}return"string"},S=(e,t)=>{var o;let r;let h=E(t),p=null==C?void 0:null===(o=C.required)||void 0===o?void 0:o.includes(e),k=w[e]||t.title||e,v=y[e]||t.description,T=[];p&&T.push({required:!0,message:"".concat(k," is required")}),j[e]&&T.push({validator:j[e]}),g(e,t)&&T.push({validator:async(e,t)=>{if(t&&!m(t))throw Error("Please enter valid JSON")}});let S=v?(0,a.jsxs)("span",{children:[k," ",(0,a.jsx)(u.Z,{title:v,children:(0,a.jsx)(d.Z,{style:{marginLeft:"4px"}})})]}):k;return r=g(e,t)?(0,a.jsx)(n.default.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,a.jsx)(l.default,{children:t.enum.map(e=>(0,a.jsx)(l.default.Option,{value:e,children:e},e))}):"number"===h||"integer"===h?(0,a.jsx)(c.Z,{style:{width:"100%"},precision:"integer"===h?0:void 0}):"duration"===e?(0,a.jsx)(s.o,{placeholder:"eg: 30s, 30h, 30d"}):(0,a.jsx)(s.o,{placeholder:v||""}),(0,a.jsx)(i.Z.Item,{label:S,name:e,className:"mt-8",rules:T,initialValue:_[e],help:(0,a.jsx)("div",{className:"text-xs text-gray-500",children:f(e,t,h)}),children:r},e)};return v?(0,a.jsxs)("div",{className:"text-red-500",children:["Error: ",v]}):(null==C?void 0:C.properties)?(0,a.jsx)("div",{children:Object.entries(C.properties).filter(e=>{let[t]=e;return!o.includes(t)}).map(e=>{let[t,o]=e;return S(t,o)})}):null}},9114:function(e,t,o){var a=o(57271),r=o(85968);function n(){return"topRight"}function l(e,t){var o;return"string"==typeof e?{message:t,description:e}:{message:null!==(o=e.message)&&void 0!==o?o:t,...e}}function c(e){return"number"==typeof e?e:"string"==typeof e&&/^\d+$/.test(e)?parseInt(e,10):void 0}let i=["invalid api key","invalid authorization header format","authentication error","invalid proxy server token","invalid jwt token","invalid jwt submitted","unauthorized access to metrics endpoint"],s=["admin-only endpoint","not allowed to access model","user does not have permission","access forbidden","invalid credentials used to access ui","user not allowed to access proxy"],d=["db not connected","database not initialized","no db connected","prisma client not initialized","service unhealthy"],u=["no models configured on proxy","llm router not initialized","no deployments available","no healthy deployment available","not allowed to access model due to tags configuration","invalid model name passed in"],h=["deployment over user-defined ratelimit","crossed tpm / rpm / max parallel request limit","max parallel request limit"],p=["budget exceeded","crossed budget","provider budget"],g=["must be a litellm enterprise user","only be available for liteLLM enterprise users","missing litellm-enterprise package","only available on the docker image","enterprise feature","premium user"],m=["invalid json payload","invalid request type","invalid key format","invalid hash key","invalid sort column","invalid sort order","invalid limit","invalid file type","invalid field","invalid date format"],f=["model not found","model with id","credential not found","user not found","team not found","organization not found","mcp server with id","tool '"],w=["already exists","team member is already in team","user already exists"],y=["violated openai moderation policy","violated jailbreak threshold","violated prompt_injection threshold","violated content safety policy","violated lasso guardrail policy","blocked by pillar security guardrail","violated azure prompt shield guardrail policy","content blocked by model armor","response blocked by model armor","streaming response blocked by model armor","guardrail","moderation"],j=["invalid purpose","service must be specified","invalid response - response.response is none"],_=["cloudzero settings not configured","failed to decrypt cloudzero api key","cloudzero settings not found"],C=["created successfully","updated successfully","deleted successfully","credential created successfully","model added successfully","team created successfully","user created successfully","organization created successfully","cloudzero settings initialized successfully","cloudzero settings updated successfully","cloudzero export completed successfully","mock llm request made","mock slack alert sent","mock email alert sent","spend for all api keys and teams reset successfully","monthlyglobalspend view refreshed","cache cleared successfully","cache set successfully","ip ","deleted successfully"],k=["rate limit reached for deployment","deployment cooldown period active"],v=["this feature is only available for litellm enterprise users","enterprise features are not available","regenerating virtual keys is an enterprise feature","trying to set allowed_routes. this is an enterprise feature"],T=["invalid maximum_spend_logs_retention_interval value","error has invalid or non-convertible code","failed to save health check to database"];t.Z={error(e){var t,o;let r=l(e,"Error");a.ZP.error({...r,placement:null!==(t=r.placement)&&void 0!==t?t:n(),duration:null!==(o=r.duration)&&void 0!==o?o:6})},warning(e){var t,o;let r=l(e,"Warning");a.ZP.warning({...r,placement:null!==(t=r.placement)&&void 0!==t?t:n(),duration:null!==(o=r.duration)&&void 0!==o?o:5})},info(e){var t,o;let r=l(e,"Info");a.ZP.info({...r,placement:null!==(t=r.placement)&&void 0!==t?t:n(),duration:null!==(o=r.duration)&&void 0!==o?o:4})},success(e){var t,o;let r=l(e,"Success");a.ZP.success({...r,placement:null!==(t=r.placement)&&void 0!==t?t:n(),duration:null!==(o=r.duration)&&void 0!==o?o:3.5})},fromBackend(e,t){var o,l,E,S,b,F,P,O,B,N,x,G;let J=null!==(G=null!==(x=c(null==e?void 0:null===(N=e.response)||void 0===N?void 0:N.status))&&void 0!==x?x:c(null==e?void 0:e.status_code))&&void 0!==G?G:c(null==e?void 0:e.code),A=function(e){var t,o,a,n,l,c,i,s,d,u,h,p;if("string"==typeof e)return e;let g=null!==(p=null!==(h=null!==(u=null!==(d=null!==(s=null==e?void 0:null===(a=e.response)||void 0===a?void 0:null===(o=a.data)||void 0===o?void 0:null===(t=o.error)||void 0===t?void 0:t.message)&&void 0!==s?s:null==e?void 0:null===(l=e.response)||void 0===l?void 0:null===(n=l.data)||void 0===n?void 0:n.message)&&void 0!==d?d:null==e?void 0:null===(i=e.response)||void 0===i?void 0:null===(c=i.data)||void 0===c?void 0:c.error)&&void 0!==u?u:null==e?void 0:e.detail)&&void 0!==h?h:null==e?void 0:e.message)&&void 0!==p?p:e;return(0,r.O)(g)}(e),U={...null!=t?t:{},description:A,placement:null!==(o=null==t?void 0:t.placement)&&void 0!==o?o:n()};if(void 0!==J||e instanceof Error||"string"==typeof e||e&&"object"==typeof e&&("error"in e||"detail"in e)){let e=function(e,t){var o,a,r,n,l;let c=(t||"").toLowerCase();return i.some(e=>c.includes(e))?"Authentication Error":s.some(e=>c.includes(e))?"Access Denied":(null==d?void 0:null===(o=d.some)||void 0===o?void 0:o.call(d,e=>c.includes(e)))||503===e?"Service Unavailable":(null==p?void 0:null===(a=p.some)||void 0===a?void 0:a.call(p,e=>c.includes(e)))?"Budget Exceeded":(null==g?void 0:null===(r=g.some)||void 0===r?void 0:r.call(g,e=>c.includes(e)))?"Feature Unavailable":(null==u?void 0:null===(n=u.some)||void 0===n?void 0:n.call(u,e=>c.includes(e)))?"Routing Error":w.some(e=>c.includes(e))?"Already Exists":y.some(e=>c.includes(e))?"Content Blocked":j.some(e=>c.includes(e))?"Validation Error":_.some(e=>c.includes(e))?"Integration Error":m.some(e=>c.includes(e))?"Validation Error":404===e||c.includes("not found")||f.some(e=>c.includes(e))?"Not Found":429===e||c.includes("rate limit")||c.includes("tpm")||c.includes("rpm")||(null==h?void 0:null===(l=h.some)||void 0===l?void 0:l.call(h,e=>c.includes(e)))?"Rate Limit Exceeded":e&&e>=500?"Server Error":401===e?"Authentication Error":403===e?"Access Denied":c.includes("enterprise")||c.includes("premium")?"Info":e&&e>=400?"Request Error":"Error"}(J,A),o={...U,message:e};if("Rate Limit Exceeded"===e||"Info"===e||"Budget Exceeded"===e||"Feature Unavailable"===e||"Content Blocked"===e||"Integration Error"===e){a.ZP.warning({...o,duration:null!==(l=null==t?void 0:t.duration)&&void 0!==l?l:7});return}if("Server Error"===e){a.ZP.error({...o,duration:null!==(E=null==t?void 0:t.duration)&&void 0!==E?E:8});return}if("Request Error"===e||"Authentication Error"===e||"Access Denied"===e||"Not Found"===e||"Error"===e){a.ZP.error({...o,duration:null!==(S=null==t?void 0:t.duration)&&void 0!==S?S:6});return}a.ZP.info({...o,duration:null!==(b=null==t?void 0:t.duration)&&void 0!==b?b:4});return}let R=function(e){let t=(e||"").toLowerCase();return C.some(e=>t.includes(e))?{kind:"success",title:"Success"}:v.some(e=>t.includes(e))?{kind:"warning",title:"Feature Notice"}:T.some(e=>t.includes(e))?{kind:"warning",title:"Configuration Warning"}:k.some(e=>t.includes(e))?{kind:"warning",title:"Rate Limit"}:null}(A),I={...U,message:null!==(F=null==R?void 0:R.title)&&void 0!==F?F:"Info"};if((null==R?void 0:R.kind)==="success"){a.ZP.success({...I,duration:null!==(P=null==t?void 0:t.duration)&&void 0!==P?P:3.5});return}if((null==R?void 0:R.kind)==="warning"){a.ZP.warning({...I,duration:null!==(O=null==t?void 0:t.duration)&&void 0!==O?O:6});return}a.ZP.info({...I,duration:null!==(B=null==t?void 0:t.duration)&&void 0!==B?B:4})},clear(){a.ZP.destroy()}}},19250:function(e,t,o){o.r(t),o.d(t,{DEFAULT_ORGANIZATION:function(){return p},PredictedSpendLogsCall:function(){return tl},addAllowedIP:function(){return em},adminGlobalActivity:function(){return eJ},adminGlobalActivityExceptions:function(){return eR},adminGlobalActivityExceptionsPerDeployment:function(){return eI},adminGlobalActivityPerModel:function(){return eU},adminGlobalCacheActivity:function(){return eA},adminSpendLogsCall:function(){return eB},adminTopEndUsersCall:function(){return ex},adminTopKeysCall:function(){return eN},adminTopModelsCall:function(){return eM},adminspendByProvider:function(){return eG},alertingSettingsCall:function(){return A},allEndUsersCall:function(){return eb},allTagNamesCall:function(){return eS},availableTeamListCall:function(){return W},budgetCreateCall:function(){return N},budgetDeleteCall:function(){return B},budgetUpdateCall:function(){return x},cachingHealthCheckCall:function(){return tv},callMCPTool:function(){return tq},cancelModelCostMapReload:function(){return S},claimOnboardingToken:function(){return el},convertPromptFileToJson:function(){return tx},createGuardrailCall:function(){return tJ},createMCPServer:function(){return tz},createPassThroughEndpoint:function(){return tf},createPromptCall:function(){return tO},credentialCreateCall:function(){return eQ},credentialDeleteCall:function(){return e1},credentialGetCall:function(){return e0},credentialListCall:function(){return eX},credentialUpdateCall:function(){return e2},defaultProxyBaseUrl:function(){return c},deleteAllowedIP:function(){return ef},deleteCallback:function(){return ou},deleteConfigFieldSetting:function(){return ty},deleteGuardrailCall:function(){return oe},deleteMCPServer:function(){return tD},deletePassThroughEndpointsCall:function(){return tj},deletePromptCall:function(){return tN},fetchMCPAccessGroups:function(){return tM},fetchMCPServers:function(){return tI},formatDate:function(){return l},getAllowedIPs:function(){return eg},getBudgetList:function(){return ts},getBudgetSettings:function(){return td},getCallbacksCall:function(){return tu},getConfigFieldSetting:function(){return tg},getDefaultTeamSettings:function(){return t$},getEmailEventSettings:function(){return t7},getGeneralSettingsCall:function(){return th},getGuardrailInfo:function(){return oa},getGuardrailProviderSpecificParams:function(){return oo},getGuardrailUISettings:function(){return ot},getGuardrailsList:function(){return tb},getInternalUserSettings:function(){return tU},getModelCostMapReloadStatus:function(){return b},getOnboardingCredentials:function(){return en},getOpenAPISchema:function(){return k},getPassThroughEndpointInfo:function(){return od},getPassThroughEndpointsCall:function(){return tp},getPossibleUserRoles:function(){return eK},getPromptInfo:function(){return tP},getPromptsList:function(){return tF},getProxyBaseUrl:function(){return u},getProxyUISettings:function(){return tS},getPublicModelHubInfo:function(){return C},getRemainingUsers:function(){return oi},getSSOSettings:function(){return on},getTeamPermissionsCall:function(){return tX},getTotalSpendCall:function(){return er},getUiConfig:function(){return _},healthCheckCall:function(){return tC},healthCheckHistoryCall:function(){return tT},individualModelHealthCheckCall:function(){return tk},invitationClaimCall:function(){return J},invitationCreateCall:function(){return G},keyCreateCall:function(){return R},keyCreateServiceAccountCall:function(){return U},keyDeleteCall:function(){return M},keyInfoCall:function(){return ez},keyInfoV1Call:function(){return eD},keyListCall:function(){return eV},keySpendLogsCall:function(){return ev},keyUpdateCall:function(){return e4},latestHealthChecksCall:function(){return tE},listMCPTools:function(){return tV},makeModelGroupPublic:function(){return j},mcpToolsCall:function(){return oh},modelAvailableCall:function(){return ek},modelCostMap:function(){return v},modelCreateCall:function(){return F},modelDeleteCall:function(){return O},modelExceptionsCall:function(){return e_},modelHubCall:function(){return ep},modelHubPublicModelsCall:function(){return eh},modelInfoCall:function(){return ed},modelInfoV1Call:function(){return eu},modelMetricsCall:function(){return ew},modelMetricsSlowResponsesCall:function(){return ej},modelPatchUpdateCall:function(){return e5},modelSettingsCall:function(){return P},modelUpdateCall:function(){return e6},organizationCreateCall:function(){return $},organizationDeleteCall:function(){return X},organizationInfoCall:function(){return K},organizationListCall:function(){return Y},organizationMemberAddCall:function(){return tt},organizationMemberDeleteCall:function(){return to},organizationMemberUpdateCall:function(){return ta},organizationUpdateCall:function(){return Q},patchPromptCall:function(){return tG},perUserAnalyticsCall:function(){return ok},proxyBaseUrl:function(){return s},regenerateKeyCall:function(){return ec},reloadModelCostMap:function(){return T},resetEmailEventSettings:function(){return t8},scheduleModelCostMapReload:function(){return E},serverRootPath:function(){return i},serviceHealthCheck:function(){return ti},sessionSpendLogsCall:function(){return t1},setCallbacksCall:function(){return t_},setGlobalLitellmHeaderName:function(){return y},slackBudgetAlertsHealthCheck:function(){return tc},spendUsersCall:function(){return eq},streamingModelMetricsCall:function(){return ey},tagCreateCall:function(){return tZ},tagDailyActivityCall:function(){return eo},tagDauCall:function(){return ow},tagDeleteCall:function(){return tK},tagDistinctCall:function(){return o_},tagInfoCall:function(){return tW},tagListCall:function(){return tY},tagMauCall:function(){return oj},tagUpdateCall:function(){return tH},tagWauCall:function(){return oy},tagsSpendLogsCall:function(){return eE},teamBulkMemberAddCall:function(){return e9},teamCreateCall:function(){return e$},teamDailyActivityCall:function(){return ea},teamDeleteCall:function(){return L},teamInfoCall:function(){return q},teamListCall:function(){return H},teamMemberAddCall:function(){return e7},teamMemberDeleteCall:function(){return te},teamMemberUpdateCall:function(){return e8},teamPermissionsUpdateCall:function(){return t0},teamSpendLogsCall:function(){return eT},teamUpdateCall:function(){return e3},testConnectionRequest:function(){return eL},testMCPConnectionRequest:function(){return op},testMCPToolsListRequest:function(){return og},transformRequestCall:function(){return ee},uiAuditLogsCall:function(){return oc},uiSpendLogDetailsCall:function(){return tA},uiSpendLogsCall:function(){return eO},updateConfigFieldSetting:function(){return tw},updateDefaultTeamSettings:function(){return tQ},updateEmailEventSettings:function(){return t9},updateGuardrailCall:function(){return or},updateInternalUserSettings:function(){return tR},updateMCPServer:function(){return tL},updatePassThroughEndpoint:function(){return os},updatePassThroughFieldSetting:function(){return tm},updatePromptCall:function(){return tB},updateSSOSettings:function(){return ol},updateUsefulLinksCall:function(){return eC},userAgentAnalyticsCall:function(){return of},userAgentSummaryCall:function(){return oC},userBulkUpdateUserCall:function(){return tn},userCreateCall:function(){return I},userDailyActivityAggregatedCall:function(){return eW},userDailyActivityCall:function(){return et},userDeleteCall:function(){return z},userFilterUICall:function(){return eF},userGetAllUsersCall:function(){return eY},userGetRequesedtModelsCall:function(){return eH},userInfoCall:function(){return V},userListCall:function(){return D},userRequestModelCall:function(){return eZ},userSpendLogsCall:function(){return eP},userUpdateUserCall:function(){return tr},v2TeamListCall:function(){return Z},vectorStoreCreateCall:function(){return t2},vectorStoreDeleteCall:function(){return t3},vectorStoreInfoCall:function(){return t5},vectorStoreListCall:function(){return t4},vectorStoreSearchCall:function(){return om},vectorStoreUpdateCall:function(){return t6}});var a=o(42264),r=o(63610),n=o(9114);let l=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)},c=null,i="/",s=null;console.log=function(){};let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=window.location.origin,a=t||o;console.log("proxyBaseUrl:",s),console.log("serverRootPath:",e),e.length>0&&!a.endsWith(e)&&"/"!=e&&(a+=e,s=a),console.log("Updated proxyBaseUrl:",s)},u=()=>s||window.location.origin,h={GET:"GET",DELETE:"DELETE"},p="default_organization",g=0,m=async e=>{let t=Date.now();t-g>6e4?(e.includes("Authentication Error - Expired Key")&&(a.ZP.info("UI Session Expired. Logging out."),g=t,document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",window.location.href=window.location.pathname),g=t):console.log("Error suppressed to prevent spam:",e)},f="Authorization",w="x-mcp-auth";function y(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Authorization";console.log("setGlobalLitellmHeaderName: ".concat(e)),f=e}let j=async(e,t)=>{let o=s?"".concat(s,"/model_group/make_public"):"/model_group/make_public";return(await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},_=async()=>{console.log("Getting UI config");let e=await fetch(c?"".concat(c,"/litellm/.well-known/litellm-ui-config"):"/litellm/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),d(t.server_root_path,t.proxy_base_url),t},C=async()=>{let e=await fetch(c?"".concat(c,"/public/model_hub/info"):"/public/model_hub/info");return await e.json()},k=async()=>{let e=s?"".concat(s,"/openapi.json"):"/openapi.json",t=await fetch(e);return await t.json()},v=async e=>{try{let t=s?"".concat(s,"/get/litellm_model_cost_map"):"/get/litellm_model_cost_map",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("received litellm model cost data: ".concat(a)),a}catch(e){throw console.error("Failed to get model cost map:",e),e}},T=async e=>{try{let t=s?"".concat(s,"/reload/model_cost_map"):"/reload/model_cost_map",o=await fetch(t,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("Model cost map reload response: ".concat(a)),a}catch(e){throw console.error("Failed to reload model cost map:",e),e}},E=async(e,t)=>{try{let o=s?"".concat(s,"/schedule/model_cost_map_reload?hours=").concat(t):"/schedule/model_cost_map_reload?hours=".concat(t),a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}}),r=await a.json();return console.log("Schedule model cost map reload response: ".concat(r)),r}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},S=async e=>{try{let t=s?"".concat(s,"/schedule/model_cost_map_reload"):"/schedule/model_cost_map_reload",o=await fetch(t,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("Cancel model cost map reload response: ".concat(a)),a}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},b=async e=>{try{let t=s?"".concat(s,"/schedule/model_cost_map_reload/status"):"/schedule/model_cost_map_reload/status";console.log("Fetching status from URL:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){console.error("Status request failed with status: ".concat(o.status));let e=await o.text();throw console.error("Error response:",e),Error("HTTP ".concat(o.status,": ").concat(e))}let a=await o.json();return console.log("Model cost map reload status:",a),a}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},F=async(e,t)=>{try{let o=s?"".concat(s,"/model/new"):"/model/new",r=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("API Response:",n),a.ZP.destroy(),a.ZP.success("Model ".concat(t.model_name," created successfully"),2),n}catch(e){throw console.error("Failed to create key:",e),e}},P=async e=>{try{let t=s?"".concat(s,"/model/settings"):"/model/settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){console.error("Failed to get model settings:",e)}},O=async(e,t)=>{console.log("model_id in model delete call: ".concat(t));try{let o=s?"".concat(s,"/model/delete"):"/model/delete",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},B=async(e,t)=>{if(console.log("budget_id in budget delete call: ".concat(t)),null!=e)try{let o=s?"".concat(s,"/budget/delete"):"/budget/delete",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},N=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let o=s?"".concat(s,"/budget/new"):"/budget/new",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},x=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let o=s?"".concat(s,"/budget/update"):"/budget/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},G=async(e,t)=>{try{let o=s?"".concat(s,"/invitation/new"):"/invitation/new",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{try{console.log("Form Values in invitationCreateCall:",t),console.log("Form Values after check:",t);let o=s?"".concat(s,"/invitation/claim"):"/invitation/claim",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},A=async e=>{try{let t=s?"".concat(s,"/alerting/settings"):"/alerting/settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},U=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),r.d))if(t[e]){console.log("formValues.".concat(e,":"),t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error("Failed to parse ".concat(e,": ")+t)}}console.log("Form Values after check:",t);let o=s?"".concat(s,"/key/service-account/generate"):"/key/service-account/generate",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let n=await a.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},R=async(e,t,o)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),r.d))if(o[e]){console.log("formValues.".concat(e,":"),o[e]);try{o[e]=JSON.parse(o[e])}catch(t){throw Error("Failed to parse ".concat(e,": ")+t)}}console.log("Form Values after check:",o);let a=s?"".concat(s,"/key/generate"):"/key/generate",n=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!n.ok){let e=await n.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let l=await n.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},I=async(e,t,o)=>{try{if(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),o.auto_create_key=!1,o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",o);let a=s?"".concat(s,"/user/new"):"/user/new",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!r.ok){let e=await r.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},M=async(e,t)=>{try{let o=s?"".concat(s,"/key/delete"):"/key/delete";console.log("in keyDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},z=async(e,t)=>{try{let o=s?"".concat(s,"/user/delete"):"/user/delete";console.log("in userDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete user(s):",e),e}},L=async(e,t)=>{try{let o=s?"".concat(s,"/team/delete"):"/team/delete";console.log("in teamDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete key:",e),e}},D=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,i=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null;try{let u=s?"".concat(s,"/user/list"):"/user/list";console.log("in userListCall");let h=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");h.append("user_ids",e)}o&&h.append("page",o.toString()),a&&h.append("page_size",a.toString()),r&&h.append("user_email",r),n&&h.append("role",n),l&&h.append("team",l),c&&h.append("sso_user_ids",c),i&&h.append("sort_by",i),d&&h.append("sort_order",d);let p=h.toString();p&&(u+="?".concat(p));let g=await fetch(u,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!g.ok){let e=await g.json(),t=ov(e);throw m(t),Error(t)}let w=await g.json();return console.log("/user/list API Response:",w),w}catch(e){throw console.error("Failed to create key:",e),e}},V=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0,n=arguments.length>5?arguments[5]:void 0,l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];console.log("userInfoCall: ".concat(t,", ").concat(o,", ").concat(a,", ").concat(r,", ").concat(n,", ").concat(l));try{let c;if(a){c=s?"".concat(s,"/user/list"):"/user/list";let e=new URLSearchParams;null!=r&&e.append("page",r.toString()),null!=n&&e.append("page_size",n.toString()),c+="?".concat(e.toString())}else c=s?"".concat(s,"/user/info"):"/user/info",("Admin"!==o&&"Admin Viewer"!==o||l)&&t&&(c+="?user_id=".concat(t));console.log("Requesting user data from:",c);let i=await fetch(c,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}let d=await i.json();return console.log("API Response:",d),d}catch(e){throw console.error("Failed to fetch user data:",e),e}},q=async(e,t)=>{try{let o=s?"".concat(s,"/team/info"):"/team/info";t&&(o="".concat(o,"?team_id=").concat(t)),console.log("in teamInfoCall");let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},Z=async function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&void 0!==arguments[6]&&arguments[6],arguments.length>7&&void 0!==arguments[7]&&arguments[7],arguments.length>8&&void 0!==arguments[8]&&arguments[8];try{let n=s?"".concat(s,"/v2/team/list"):"/v2/team/list";console.log("in teamInfoCall");let l=new URLSearchParams;o&&l.append("user_id",o.toString()),t&&l.append("organization_id",t.toString()),a&&l.append("team_id",a.toString()),r&&l.append("team_alias",r.toString());let c=l.toString();c&&(n+="?".concat(c));let i=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}let d=await i.json();return console.log("/v2/team/list API Response:",d),d}catch(e){throw console.error("Failed to create key:",e),e}},H=async function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let n=s?"".concat(s,"/team/list"):"/team/list";console.log("in teamInfoCall");let l=new URLSearchParams;o&&l.append("user_id",o.toString()),t&&l.append("organization_id",t.toString()),a&&l.append("team_id",a.toString()),r&&l.append("team_alias",r.toString());let c=l.toString();c&&(n+="?".concat(c));let i=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}let d=await i.json();return console.log("/team/list API Response:",d),d}catch(e){throw console.error("Failed to create key:",e),e}},W=async e=>{try{let t=s?"".concat(s,"/team/available"):"/team/available";console.log("in availableTeamListCall");let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("/team/available_teams API Response:",a),a}catch(e){throw e}},Y=async e=>{try{let t=s?"".concat(s,"/organization/list"):"/organization/list",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{let o=s?"".concat(s,"/organization/info"):"/organization/info";t&&(o="".concat(o,"?organization_id=").concat(t)),console.log("in teamInfoCall");let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},$=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let o=s?"".concat(s,"/organization/new"):"/organization/new",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},Q=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let o=s?"".concat(s,"/organization/update"):"/organization/update",a=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("Update Team Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t)=>{try{let o=s?"".concat(s,"/organization/delete"):"/organization/delete",a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!a.ok){let e=await a.text();throw m(e),Error("Error deleting organization: ".concat(e))}return await a.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},ee=async(e,t)=>{try{let o=s?"".concat(s,"/utils/transform_request"):"/utils/transform_request",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},et=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;try{let r=s?"".concat(s,"/user/daily/activity"):"/user/daily/activity",n=new URLSearchParams;n.append("start_date",l(t)),n.append("end_date",l(o)),n.append("page_size","1000"),n.append("page",a.toString());let c=n.toString();c&&(r+="?".concat(c));let i=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},eo=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let n=s?"".concat(s,"/tag/daily/activity"):"/tag/daily/activity",c=new URLSearchParams;c.append("start_date",l(t)),c.append("end_date",l(o)),c.append("page_size","1000"),c.append("page",a.toString()),r&&c.append("tags",r.join(","));let i=c.toString();i&&(n+="?".concat(i));let d=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=ov(e);throw m(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to create key:",e),e}},ea=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let n=s?"".concat(s,"/team/daily/activity"):"/team/daily/activity",c=new URLSearchParams;c.append("start_date",l(t)),c.append("end_date",l(o)),c.append("page_size","1000"),c.append("page",a.toString()),r&&c.append("team_ids",r.join(",")),c.append("exclude_team_ids","litellm-dashboard");let i=c.toString();i&&(n+="?".concat(i));let d=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=ov(e);throw m(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to create key:",e),e}},er=async e=>{try{let t=s?"".concat(s,"/global/spend"):"/global/spend",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},en=async e=>{try{let t=s?"".concat(s,"/onboarding/get_token"):"/onboarding/get_token";t+="?invite_link=".concat(e);let o=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t,o,a)=>{let r=s?"".concat(s,"/onboarding/claim_token"):"/onboarding/claim_token";try{let n=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:o,password:a})});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to delete key:",e),e}},ec=async(e,t,o)=>{try{let a=s?"".concat(s,"/key/").concat(t,"/regenerate"):"/key/".concat(t,"/regenerate"),r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("Regenerate key Response:",n),n}catch(e){throw console.error("Failed to regenerate key:",e),e}},ei=!1,es=null,ed=async(e,t,o)=>{try{console.log("modelInfoCall:",e,t,o);let r=s?"".concat(s,"/v2/model/info"):"/v2/model/info",n=new URLSearchParams;n.append("include_team_models","true"),n.toString()&&(r+="?".concat(n.toString()));let l=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!l.ok){let e=await l.text();throw e+="error shown=".concat(ei),ei||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),a.ZP.info(e,10),ei=!0,es&&clearTimeout(es),es=setTimeout(()=>{ei=!1},1e4)),Error("Network response was not ok")}let c=await l.json();return console.log("modelInfoCall:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},eu=async(e,t)=>{try{let o=s?"".concat(s,"/v1/model/info"):"/v1/model/info";o+="?litellm_model_id=".concat(t);let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("modelInfoV1Call:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eh=async()=>{let e=s?"".concat(s,"/public/model_hub"):"/public/model_hub";return(await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}})).json()},ep=async e=>{try{let t=s?"".concat(s,"/model_group/info"):"/model_group/info",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("modelHubCall:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eg=async e=>{try{let t=s?"".concat(s,"/get/allowed_ips"):"/get/allowed_ips",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("getAllowedIPs:",a),a.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},em=async(e,t)=>{try{let o=s?"".concat(s,"/add/allowed_ip"):"/add/allowed_ip",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("addAllowedIP:",r),r}catch(e){throw console.error("Failed to add allowed IP:",e),e}},ef=async(e,t)=>{try{let o=s?"".concat(s,"/delete/allowed_ip"):"/delete/allowed_ip",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("deleteAllowedIP:",r),r}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},ew=async(e,t,o,a,r,n,l,c)=>{try{let t=s?"".concat(s,"/model/metrics"):"/model/metrics";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(l,"&customer=").concat(c));let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},ey=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/model/streaming_metrics"):"/model/streaming_metrics";t&&(r="".concat(r,"?_selected_model_group=").concat(t,"&startTime=").concat(o,"&endTime=").concat(a));let n=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},ej=async(e,t,o,a,r,n,l,c)=>{try{let t=s?"".concat(s,"/model/metrics/slow_responses"):"/model/metrics/slow_responses";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(l,"&customer=").concat(c));let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},e_=async(e,t,o,a,r,n,l,c)=>{try{let t=s?"".concat(s,"/model/metrics/exceptions"):"/model/metrics/exceptions";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(l,"&customer=").concat(c));let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eC=async(e,t)=>{try{let o=s?"".concat(s,"/model_hub/update_useful_links"):"/model_hub/update_useful_links",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},ek=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=(arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&void 0!==arguments[6]&&arguments[6]);console.log("in /models calls, globalLitellmHeaderName",f);try{let t=s?"".concat(s,"/models"):"/models",o=new URLSearchParams;o.append("include_model_access_groups","True"),!0===a&&o.append("return_wildcard_routes","True"),!0===n&&o.append("only_model_access_groups","True"),r&&o.append("team_id",r.toString()),o.toString()&&(t+="?".concat(o.toString()));let l=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to create key:",e),e}},ev=async(e,t)=>{try{let o=s?"".concat(s,"/global/spend/logs"):"/global/spend/logs";console.log("in keySpendLogsCall:",o);let a=await fetch("".concat(o,"?api_key=").concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},eT=async e=>{try{let t=s?"".concat(s,"/global/spend/teams"):"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let o=await fetch("".concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eE=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/spend/tags"):"/global/spend/tags";t&&o&&(r="".concat(r,"?start_date=").concat(t,"&end_date=").concat(o)),a&&(r+="".concat(r,"&tags=").concat(a.join(","))),console.log("in tagsSpendLogsCall:",r);let n=await fetch("".concat(r),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to create key:",e),e}},eS=async e=>{try{let t=s?"".concat(s,"/global/spend/all_tag_names"):"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eb=async e=>{try{let t=s?"".concat(s,"/global/all_end_users"):"/global/all_end_users";console.log("in global/all_end_users call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t)=>{try{let o=s?"".concat(s,"/user/filter/ui"):"/user/filter/ui";t.get("user_email")&&(o+="?user_email=".concat(t.get("user_email"))),t.get("user_id")&&(o+="?user_id=".concat(t.get("user_id")));let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eP=async(e,t,o,a,r,n)=>{try{console.log("user role in spend logs call: ".concat(o));let t=s?"".concat(s,"/spend/logs"):"/spend/logs";t="App Owner"==o?"".concat(t,"?user_id=").concat(a,"&start_date=").concat(r,"&end_date=").concat(n):"".concat(t,"?start_date=").concat(r,"&end_date=").concat(n);let l=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log(c),c}catch(e){throw console.error("Failed to create key:",e),e}},eO=async(e,t,o,a,r,n,l,c,i,d,u,h)=>{try{let p=s?"".concat(s,"/spend/logs/ui"):"/spend/logs/ui",g=new URLSearchParams;t&&g.append("api_key",t),o&&g.append("team_id",o),a&&g.append("request_id",a),r&&g.append("start_date",r),n&&g.append("end_date",n),l&&g.append("page",l.toString()),c&&g.append("page_size",c.toString()),i&&g.append("user_id",i),d&&g.append("end_user",d),u&&g.append("status_filter",u),h&&g.append("model",h);let w=g.toString();w&&(p+="?".concat(w));let y=await fetch(p,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!y.ok){let e=await y.json(),t=ov(e);throw m(t),Error(t)}let j=await y.json();return console.log("Spend Logs Response:",j),j}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},eB=async e=>{try{let t=s?"".concat(s,"/global/spend/logs"):"/global/spend/logs",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eN=async e=>{try{let t=s?"".concat(s,"/global/spend/keys?limit=5"):"/global/spend/keys?limit=5",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},ex=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/spend/end_users"):"/global/spend/end_users",n="";n=t?JSON.stringify({api_key:t,startTime:o,endTime:a}):JSON.stringify({startTime:o,endTime:a});let l={method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:n},c=await fetch(r,l);if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}let i=await c.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eG=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/spend/provider"):"/global/spend/provider";o&&a&&(r+="?start_date=".concat(o,"&end_date=").concat(a)),t&&(r+="&api_key=".concat(t));let n={method:"GET",headers:{[f]:"Bearer ".concat(e)}},l=await fetch(r,n);if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eJ=async(e,t,o)=>{try{let a=s?"".concat(s,"/global/activity"):"/global/activity";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[f]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eA=async(e,t,o)=>{try{let a=s?"".concat(s,"/global/activity/cache_hits"):"/global/activity/cache_hits";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[f]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eU=async(e,t,o)=>{try{let a=s?"".concat(s,"/global/activity/model"):"/global/activity/model";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[f]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eR=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/activity/exceptions"):"/global/activity/exceptions";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o)),a&&(r+="&model_group=".concat(a));let n={method:"GET",headers:{[f]:"Bearer ".concat(e)}},l=await fetch(r,n);if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eI=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/activity/exceptions/deployment"):"/global/activity/exceptions/deployment";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o)),a&&(r+="&model_group=".concat(a));let n={method:"GET",headers:{[f]:"Bearer ".concat(e)}},l=await fetch(r,n);if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eM=async e=>{try{let t=s?"".concat(s,"/global/spend/models?limit=5"):"/global/spend/models?limit=5",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},ez=async(e,t)=>{try{let o=s?"".concat(s,"/v2/key/info"):"/v2/key/info",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!a.ok){let e=await a.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw m(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},eL=async(e,t,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let r=s?"".concat(s,"/health/test_connection"):"/health/test_connection",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[f]:"Bearer ".concat(e)},body:JSON.stringify({litellm_params:t,mode:o})}),l=n.headers.get("content-type");if(!l||!l.includes("application/json")){let e=await n.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(n.status,": ").concat(n.statusText,"). Check network tab for details."))}let c=await n.json();if(!n.ok||"error"===c.status){if("error"===c.status);else{var a;return{status:"error",message:(null===(a=c.error)||void 0===a?void 0:a.message)||"Connection test failed: ".concat(n.status," ").concat(n.statusText)}}}return c}catch(e){throw console.error("Model connection test error:",e),e}},eD=async(e,t)=>{try{console.log("entering keyInfoV1Call");let o=s?"".concat(s,"/key/info"):"/key/info";o="".concat(o,"?key=").concat(t);let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(console.log("response",a),!a.ok){let e=await a.text();m(e),n.Z.fromBackend("Failed to fetch key info - "+e)}let r=await a.json();return console.log("data",r),r}catch(e){throw console.error("Failed to fetch key info:",e),e}},eV=async function(e,t,o,a,r,n,l,c){let i=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null;try{let u=s?"".concat(s,"/key/list"):"/key/list";console.log("in keyListCall");let h=new URLSearchParams;o&&h.append("team_id",o.toString()),t&&h.append("organization_id",t.toString()),a&&h.append("key_alias",a),n&&h.append("key_hash",n),r&&h.append("user_id",r.toString()),l&&h.append("page",l.toString()),c&&h.append("size",c.toString()),i&&h.append("sort_by",i),d&&h.append("sort_order",d),h.append("return_full_object","true"),h.append("include_team_keys","true");let p=h.toString();p&&(u+="?".concat(p));let g=await fetch(u,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!g.ok){let e=await g.json(),t=ov(e);throw m(t),Error(t)}let w=await g.json();return console.log("/team/list API Response:",w),w}catch(e){throw console.error("Failed to create key:",e),e}},eq=async(e,t)=>{try{let o=s?"".concat(s,"/spend/users"):"/spend/users";console.log("in spendUsersCall:",o);let a=await fetch("".concat(o,"?user_id=").concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to get spend for user",e),e}},eZ=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/user/request_model"):"/user/request_model",n=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({models:[t],user_id:o,justification:a})});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to create key:",e),e}},eH=async e=>{try{let t=s?"".concat(s,"/user/get_requests"):"/user/get_requests";console.log("in userGetRequesedtModelsCall:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to get requested models:",e),e}},eW=async(e,t,o)=>{try{let a=s?"".concat(s,"/user/daily/activity/aggregated"):"/user/daily/activity/aggregated",r=new URLSearchParams,n=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};r.append("start_date",n(t)),r.append("end_date",n(o));let l=r.toString();l&&(a+="?".concat(l));let c=await fetch(a,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},eY=async(e,t)=>{try{let o=s?"".concat(s,"/user/get_users?role=").concat(t):"/user/get_users?role=".concat(t);console.log("in userGetAllUsersCall:",o);let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to get requested models:",e),e}},eK=async e=>{try{let t=s?"".concat(s,"/user/available_roles"):"/user/available_roles",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("response from user/available_role",a),a}catch(e){throw e}},e$=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=s?"".concat(s,"/team/new"):"/team/new",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eQ=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=s?"".concat(s,"/credentials"):"/credentials",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eX=async e=>{try{let t=s?"".concat(s,"/credentials"):"/credentials";console.log("in credentialListCall");let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},e0=async(e,t,o)=>{try{let a=s?"".concat(s,"/credentials"):"/credentials";t?a+="/by_name/".concat(t):o&&(a+="/by_model/".concat(o)),console.log("in credentialListCall");let r=await fetch(a,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("/credentials API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e1=async(e,t)=>{try{let o=s?"".concat(s,"/credentials/").concat(t):"/credentials/".concat(t);console.log("in credentialDeleteCall:",t);let a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete key:",e),e}},e2=async(e,t,o)=>{try{if(console.log("Form Values in credentialUpdateCall:",o),o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let a=s?"".concat(s,"/credentials/").concat(t):"/credentials/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...o})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e4=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let o=s?"".concat(s,"/key/update"):"/key/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let r=await a.json();return console.log("Update key Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},e3=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let o=s?"".concat(s,"/team/update"):"/team/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw m(e),console.error("Error response from the server:",e),n.Z.fromBackend("Failed to update team settings: "+e),Error(e)}let r=await a.json();return console.log("Update Team Response:",r),r}catch(e){throw console.error("Failed to update team:",e),e}},e5=async(e,t,o)=>{try{console.log("Form Values in modelUpateCall:",t);let a=s?"".concat(s,"/model/").concat(o,"/update"):"/model/".concat(o,"/update"),r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw m(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("Update model Response:",n),n}catch(e){throw console.error("Failed to update model:",e),e}},e6=async(e,t)=>{try{console.log("Form Values in modelUpateCall:",t);let o=s?"".concat(s,"/model/update"):"/model/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw m(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("Update model Response:",r),r}catch(e){throw console.error("Failed to update model:",e),e}},e7=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let r=s?"".concat(s,"/team/member_add"):"/team/member_add",n=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:o})});if(!n.ok){var a;let e=await n.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(a=t.detail)||void 0===a?void 0:a.error)||"Failed to add team member",r=Error(o);throw r.raw=t,r}let l=await n.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},e9=async(e,t,o,a,r)=>{try{console.log("Bulk add team members:",{teamId:t,members:o,maxBudgetInTeam:a});let l=s?"".concat(s,"/team/bulk_member_add"):"/team/bulk_member_add",c={team_id:t};r?c.all_users=!0:c.members=o,null!=a&&(c.max_budget_in_team=a);let i=await fetch(l,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(c)});if(!i.ok){var n;let e=await i.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(n=t.detail)||void 0===n?void 0:n.error)||"Failed to bulk add team members",a=Error(o);throw a.raw=t,a}let d=await i.json();return console.log("Bulk team member add API Response:",d),d}catch(e){throw console.error("Failed to bulk add team members:",e),e}},e8=async(e,t,o)=>{try{console.log("Form Values in teamMemberUpdateCall:",o),console.log("Budget value:",o.max_budget_in_team),console.log("TPM limit:",o.tpm_limit),console.log("RPM limit:",o.rpm_limit);let r=s?"".concat(s,"/team/member_update"):"/team/member_update",n={team_id:t,role:o.role,user_id:o.user_id};void 0!==o.user_email&&(n.user_email=o.user_email),void 0!==o.max_budget_in_team&&null!==o.max_budget_in_team&&(n.max_budget_in_team=o.max_budget_in_team),void 0!==o.tpm_limit&&null!==o.tpm_limit&&(n.tpm_limit=o.tpm_limit),void 0!==o.rpm_limit&&null!==o.rpm_limit&&(n.rpm_limit=o.rpm_limit),console.log("Final request body:",n);let l=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok){var a;let e=await l.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(a=t.detail)||void 0===a?void 0:a.error)||"Failed to add team member",r=Error(o);throw r.raw=t,r}let c=await l.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to update team member:",e),e}},te=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let a=s?"".concat(s,"/team/member_delete"):"/team/member_delete",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==o.user_email&&{user_email:o.user_email},...void 0!==o.user_id&&{user_id:o.user_id}})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},tt=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let a=s?"".concat(s,"/organization/member_add"):"/organization/member_add",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:o})});if(!r.ok){let e=await r.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create organization member:",e),e}},to=async(e,t,o)=>{try{console.log("Form Values in organizationMemberDeleteCall:",o);let a=s?"".concat(s,"/organization/member_delete"):"/organization/member_delete",r=await fetch(a,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:o})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to delete organization member:",e),e}},ta=async(e,t,o)=>{try{console.log("Form Values in organizationMemberUpdateCall:",o);let a=s?"".concat(s,"/organization/member_update"):"/organization/member_update",r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...o})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to update organization member:",e),e}},tr=async(e,t,o)=>{try{console.log("Form Values in userUpdateUserCall:",t);let a=s?"".concat(s,"/user/update"):"/user/update",r={...t};null!==o&&(r.user_role=o),r=JSON.stringify(r);let n=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:r});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},tn=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{let r;console.log("Form Values in userUpdateUserCall:",t);let n=s?"".concat(s,"/user/bulk_update"):"/user/bulk_update";if(a)r=JSON.stringify({all_users:!0,user_updates:t});else if(o&&o.length>0){let e=[];for(let a of o)e.push({user_id:a,...t});r=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let l=await fetch(n,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:r});if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},tl=async(e,t)=>{try{let o=s?"".concat(s,"/global/predict/spend/logs"):"/global/predict/spend/logs",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({data:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},tc=async e=>{try{let t=s?"".concat(s,"/health/services?service=slack_budget_alerts"):"/health/services?service=slack_budget_alerts";console.log("Checking Slack Budget Alerts service health");let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error(e)}let r=await o.json();return a.ZP.success("Test Slack Alert worked - check your Slack!"),console.log("Service Health Response:",r),r}catch(e){throw console.error("Failed to perform health check:",e),e}},ti=async(e,t)=>{try{let o=s?"".concat(s,"/health/services?service=").concat(t):"/health/services?service=".concat(t);console.log("Checking Slack Budget Alerts service health");let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw m(e),Error(e)}return await a.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},ts=async e=>{try{let t=s?"".concat(s,"/budget/list"):"/budget/list",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},td=async e=>{try{let t=s?"".concat(s,"/budget/settings"):"/budget/settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tu=async(e,t,o)=>{try{let t=s?"".concat(s,"/get/config/callbacks"):"/get/config/callbacks",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},th=async e=>{try{let t=s?"".concat(s,"/config/list?config_type=general_settings"):"/config/list?config_type=general_settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tp=async e=>{try{let t=s?"".concat(s,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tg=async(e,t)=>{try{let o=s?"".concat(s,"/config/field/info?field_name=").concat(t):"/config/field/info?field_name=".concat(t),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tm=async(e,t,o)=>{try{let r=s?"".concat(s,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",n=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:o})});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return a.ZP.success("Successfully updated value!"),l}catch(e){throw console.error("Failed to set callbacks:",e),e}},tf=async(e,t)=>{try{let o=s?"".concat(s,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tw=async(e,t,o)=>{try{let r=s?"".concat(s,"/config/field/update"):"/config/field/update",n=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:o,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return a.ZP.success("Successfully updated value!"),l}catch(e){throw console.error("Failed to set callbacks:",e),e}},ty=async(e,t)=>{try{let o=s?"".concat(s,"/config/field/delete"):"/config/field/delete",r=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return a.ZP.success("Field reset on proxy"),n}catch(e){throw console.error("Failed to get callbacks:",e),e}},tj=async(e,t)=>{try{let o=s?"".concat(s,"/config/pass_through_endpoint?endpoint_id=").concat(t):"/config/pass_through_endpoint".concat(t),a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async(e,t)=>{try{let o=s?"".concat(s,"/config/update"):"/config/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tC=async e=>{try{let t=s?"".concat(s,"/health"):"/health",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to call /health:",e),e}},tk=async(e,t)=>{try{let o=s?"".concat(s,"/health?model=").concat(encodeURIComponent(t)):"/health?model=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to call /health for model ".concat(t,":"),e),e}},tv=async e=>{try{let t=s?"".concat(s,"/cache/ping"):"/cache/ping",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tT=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;try{let n=s?"".concat(s,"/health/history"):"/health/history",l=new URLSearchParams;t&&l.append("model",t),o&&l.append("status_filter",o),l.append("limit",a.toString()),l.append("offset",r.toString()),l.toString()&&(n+="?".concat(l.toString()));let c=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw m(e),Error(e)}return await c.json()}catch(e){throw console.error("Failed to call /health/history:",e),e}},tE=async e=>{try{let t=s?"".concat(s,"/health/latest"):"/health/latest",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tS=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",s);let t=s?"".concat(s,"/sso/get/ui_settings"):"/sso/get/ui_settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tb=async e=>{try{let t=s?"".concat(s,"/v2/guardrails/list"):"/v2/guardrails/list",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}},tF=async e=>{try{let t=s?"".concat(s,"/prompts/list"):"/prompts/list",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},tP=async(e,t)=>{try{let o=s?"".concat(s,"/prompts/").concat(t,"/info"):"/prompts/".concat(t,"/info"),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},tO=async(e,t)=>{try{let o=s?"".concat(s,"/prompts"):"/prompts",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},tB=async(e,t,o)=>{try{let a=s?"".concat(s,"/prompts/").concat(t):"/prompts/".concat(t),r=await fetch(a,{method:"PUT",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},tN=async(e,t)=>{try{let o=s?"".concat(s,"/prompts/").concat(t):"/prompts/".concat(t),a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},tx=async(e,t)=>{try{let o=new FormData;o.append("file",t);let a=s?"".concat(s,"/utils/dotprompt_json_converter"):"/utils/dotprompt_json_converter",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e)},body:o});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},tG=async(e,t,o)=>{try{let a=s?"".concat(s,"/prompts/").concat(t):"/prompts/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to patch prompt:",e),e}},tJ=async(e,t)=>{try{let o=s?"".concat(s,"/guardrails"):"/guardrails",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!a.ok){let e=await a.text();throw m(e),Error(e)}let r=await a.json();return console.log("Create guardrail response:",r),r}catch(e){throw console.error("Failed to create guardrail:",e),e}},tA=async(e,t,o)=>{try{let a=s?"".concat(s,"/spend/logs/ui/").concat(t,"?start_date=").concat(encodeURIComponent(o)):"/spend/logs/ui/".concat(t,"?start_date=").concat(encodeURIComponent(o));console.log("Fetching log details from:",a);let r=await fetch(a,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("Fetched log details:",n),n}catch(e){throw console.error("Failed to fetch log details:",e),e}},tU=async e=>{try{let t=s?"".concat(s,"/get/internal_user_settings"):"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched SSO settings:",a),a}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},tR=async(e,t)=>{try{let o=s?"".concat(s,"/update/internal_user_settings"):"/update/internal_user_settings";console.log("Updating internal user settings:",t);let r=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.text();throw m(e),Error(e)}let n=await r.json();return console.log("Updated internal user settings:",n),a.ZP.success("Internal user settings updated successfully"),n}catch(e){throw console.error("Failed to update internal user settings:",e),e}},tI=async e=>{try{let t=s?"".concat(s,"/v1/mcp/server"):"/v1/mcp/server";console.log("Fetching MCP servers from:",t);let o=await fetch(t,{method:h.GET,headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched MCP servers:",a),a}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},tM=async e=>{try{let t=s?"".concat(s,"/v1/mcp/access_groups"):"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let o=await fetch(t,{method:h.GET,headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched MCP access groups:",a),a.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},tz=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let o=s?"".concat(s,"/v1/mcp/server"):"/v1/mcp/server",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},tL=async(e,t)=>{try{let o=s?"".concat(s,"/v1/mcp/server"):"/v1/mcp/server",a=await fetch(o,{method:"PUT",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},tD=async(e,t)=>{try{let o=(s?"".concat(s):"")+"/v1/mcp/server/".concat(t);console.log("in deleteMCPServer:",t);let a=await fetch(o,{method:h.DELETE,headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},tV=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/mcp-rest/tools/list?server_id=").concat(t):"/mcp-rest/tools/list?server_id=".concat(t);console.log("Fetching MCP tools from:",r);let n={[f]:"Bearer ".concat(e),"Content-Type":"application/json"};a&&o?n["x-mcp-".concat(a,"-authorization")]=o:o&&(n[w]=o);let l=await fetch(r,{method:"GET",headers:n}),c=await l.json();if(console.log("Fetched MCP tools response:",c),!l.ok){if(c.error&&c.message)throw Error(c.message);throw Error("Failed to fetch MCP tools")}return c}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools"}}},tq=async(e,t,o,a,r)=>{try{let n=s?"".concat(s,"/mcp-rest/tools/call"):"/mcp-rest/tools/call";console.log("Calling MCP tool:",t,"with arguments:",o);let l={[f]:"Bearer ".concat(e),"Content-Type":"application/json"};r?l["x-mcp-".concat(r,"-authorization")]=a:l[w]=a;let c=await fetch(n,{method:"POST",headers:l,body:JSON.stringify({name:t,arguments:o})});if(!c.ok){let e="Network response was not ok",t=null,o=await c.text();try{let a=JSON.parse(o);a.detail?"string"==typeof a.detail?e=a.detail:"object"==typeof a.detail&&(e=a.detail.message||a.detail.error||"An error occurred",t=a.detail):e=a.message||a.error||e}catch(t){console.error("Failed to parse JSON error response:",t),o&&(e=o)}let a=Error(e);throw a.status=c.status,a.statusText=c.statusText,a.details=t,m(e),a}let i=await c.json();return console.log("MCP tool call response:",i),i}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},tZ=async(e,t)=>{try{let o=s?"".concat(s,"/tag/new"):"/tag/new",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();await m(e);return}return await a.json()}catch(e){throw console.error("Error creating tag:",e),e}},tH=async(e,t)=>{try{let o=s?"".concat(s,"/tag/update"):"/tag/update",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();await m(e);return}return await a.json()}catch(e){throw console.error("Error updating tag:",e),e}},tW=async(e,t)=>{try{let o=s?"".concat(s,"/tag/info"):"/tag/info",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({names:t})});if(!a.ok){let e=await a.text();return await m(e),{}}return await a.json()}catch(e){throw console.error("Error getting tag info:",e),e}},tY=async e=>{try{let t=s?"".concat(s,"/tag/list"):"/tag/list",o=await fetch(t,{method:"GET",headers:{Authorization:"Bearer ".concat(e)}});if(!o.ok){let e=await o.text();return await m(e),{}}return await o.json()}catch(e){throw console.error("Error listing tags:",e),e}},tK=async(e,t)=>{try{let o=s?"".concat(s,"/tag/delete"):"/tag/delete",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({name:t})});if(!a.ok){let e=await a.text();await m(e);return}return await a.json()}catch(e){throw console.error("Error deleting tag:",e),e}},t$=async e=>{try{let t=s?"".concat(s,"/get/default_team_settings"):"/get/default_team_settings";console.log("Fetching default team settings from:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched default team settings:",a),a}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},tQ=async(e,t)=>{try{let o=s?"".concat(s,"/update/default_team_settings"):"/update/default_team_settings";console.log("Updating default team settings:",t);let r=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("Updated default team settings:",n),a.ZP.success("Default team settings updated successfully"),n}catch(e){throw console.error("Failed to update default team settings:",e),e}},tX=async(e,t)=>{try{let o=s?"".concat(s,"/team/permissions_list?team_id=").concat(t):"/team/permissions_list?team_id=".concat(t),a=await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("Team permissions response:",r),r}catch(e){throw console.error("Failed to get team permissions:",e),e}},t0=async(e,t,o)=>{try{let a=s?"".concat(s,"/team/permissions_update"):"/team/permissions_update",r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({team_id:t,team_member_permissions:o})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("Team permissions response:",n),n}catch(e){throw console.error("Failed to update team permissions:",e),e}},t1=async(e,t)=>{try{let o=s?"".concat(s,"/spend/logs/session/ui?session_id=").concat(encodeURIComponent(t)):"/spend/logs/session/ui?session_id=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},t2=async(e,t)=>{try{let o=s?"".concat(s,"/vector_store/new"):"/vector_store/new",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to create vector store")}return await a.json()}catch(e){throw console.error("Error creating vector store:",e),e}},t4=async function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{let t=s?"".concat(s,"/vector_store/list"):"/vector_store/list",o=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to list vector stores")}return await o.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},t3=async(e,t)=>{try{let o=s?"".concat(s,"/vector_store/delete"):"/vector_store/delete",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({vector_store_id:t})});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to delete vector store")}return await a.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},t5=async(e,t)=>{try{let o=s?"".concat(s,"/vector_store/info"):"/vector_store/info",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({vector_store_id:t})});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to get vector store info")}return await a.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},t6=async(e,t)=>{try{let o=s?"".concat(s,"/vector_store/update"):"/vector_store/update",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to update vector store")}return await a.json()}catch(e){throw console.error("Error updating vector store:",e),e}},t7=async e=>{try{let t=s?"".concat(s,"/email/event_settings"):"/email/event_settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error("Failed to get email event settings")}let a=await o.json();return console.log("Email event settings response:",a),a}catch(e){throw console.error("Failed to get email event settings:",e),e}},t9=async(e,t)=>{try{let o=s?"".concat(s,"/email/event_settings"):"/email/event_settings",a=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw m(e),Error("Failed to update email event settings")}let r=await a.json();return console.log("Update email event settings response:",r),r}catch(e){throw console.error("Failed to update email event settings:",e),e}},t8=async e=>{try{let t=s?"".concat(s,"/email/event_settings/reset"):"/email/event_settings/reset",o=await fetch(t,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error("Failed to reset email event settings")}let a=await o.json();return console.log("Reset email event settings response:",a),a}catch(e){throw console.error("Failed to reset email event settings:",e),e}},oe=async(e,t)=>{try{let o=s?"".concat(s,"/guardrails/").concat(t):"/guardrails/".concat(t),a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw m(e),Error(e)}let r=await a.json();return console.log("Delete guardrail response:",r),r}catch(e){throw console.error("Failed to delete guardrail:",e),e}},ot=async e=>{try{let t=s?"".concat(s,"/guardrails/ui/add_guardrail_settings"):"/guardrails/ui/add_guardrail_settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error("Failed to get guardrail UI settings")}let a=await o.json();return console.log("Guardrail UI settings response:",a),a}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},oo=async e=>{try{let t=s?"".concat(s,"/guardrails/ui/provider_specific_params"):"/guardrails/ui/provider_specific_params",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error("Failed to get guardrail provider specific parameters")}let a=await o.json();return console.log("Guardrail provider specific params response:",a),a}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},oa=async(e,t)=>{try{let o=s?"".concat(s,"/guardrails/").concat(t,"/info"):"/guardrails/".concat(t,"/info"),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw m(e),Error("Failed to get guardrail info")}let r=await a.json();return console.log("Guardrail info response:",r),r}catch(e){throw console.error("Failed to get guardrail info:",e),e}},or=async(e,t,o)=>{try{let a=s?"".concat(s,"/guardrails/").concat(t):"/guardrails/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw m(e),Error("Failed to update guardrail")}let n=await r.json();return console.log("Update guardrail response:",n),n}catch(e){throw console.error("Failed to update guardrail:",e),e}},on=async e=>{try{let t=s?"".concat(s,"/get/sso_settings"):"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched SSO configuration:",a),a}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},ol=async(e,t)=>{try{let o=s?"".concat(s,"/update/sso_settings"):"/update/sso_settings";console.log("Updating SSO configuration:",t);let a=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("Updated SSO configuration:",r),r}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},oc=async(e,t,o,a,r)=>{try{let t=s?"".concat(s,"/audit"):"/audit",o=new URLSearchParams;a&&o.append("page",a.toString()),r&&o.append("page_size",r.toString());let n=o.toString();n&&(t+="?".concat(n));let l=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},oi=async e=>{try{let t=s?"".concat(s,"/user/available_users"):"/user/available_users",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e)}});if(!o.ok){if(404===o.status)return null;let e=await o.text();throw m(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},os=async(e,t,o)=>{try{let r=s?"".concat(s,"/config/pass_through_endpoint/").concat(encodeURIComponent(t)):"/config/pass_through_endpoint/".concat(encodeURIComponent(t)),n=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return a.ZP.success("Pass through endpoint updated successfully"),l}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},od=async(e,t)=>{try{let o=s?"".concat(s,"/config/pass_through_endpoint?endpoint_id=").concat(encodeURIComponent(t)):"/config/pass_through_endpoint?endpoint_id=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=(await a.json()).endpoints;if(!r||0===r.length)throw Error("Pass through endpoint not found");return r[0]}catch(e){throw console.error("Failed to get pass through endpoint info:",e),e}},ou=async(e,t)=>{try{let o=s?"".concat(s,"/config/callback/delete"):"/config/callback/delete",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},oh=async e=>{let t=u(),o=await fetch("".concat(t,"/v1/mcp/tools"),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw Error("HTTP error! status: ".concat(o.status));return await o.json()},op=async(e,t)=>{try{console.log("Testing MCP connection with config:",JSON.stringify(t));let a=s?"".concat(s,"/mcp-rest/test/connection"):"/mcp-rest/test/connection",r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",[f]:"Bearer ".concat(e)},body:JSON.stringify(t)}),n=r.headers.get("content-type");if(!n||!n.includes("application/json")){let e=await r.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(r.status,": ").concat(r.statusText,"). Check network tab for details."))}let l=await r.json();if(!r.ok||"error"===l.status){if("error"===l.status);else{var o;return{status:"error",message:(null===(o=l.error)||void 0===o?void 0:o.message)||"MCP connection test failed: ".concat(r.status," ").concat(r.statusText)}}}return l}catch(e){throw console.error("MCP connection test error:",e),e}},og=async(e,t)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=s?"".concat(s,"/mcp-rest/test/tools/list"):"/mcp-rest/test/tools/list",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[f]:"Bearer ".concat(e)},body:JSON.stringify(t)}),r=a.headers.get("content-type");if(!r||!r.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(a.status,": ").concat(a.statusText,"). Check network tab for details."))}let n=await a.json();if((!a.ok||n.error)&&!n.error)return{tools:[],error:"request_failed",message:n.message||"MCP tools list failed: ".concat(a.status," ").concat(a.statusText)};return n}catch(e){throw console.error("MCP tools list test error:",e),e}},om=async(e,t,o)=>{try{let a="".concat(u(),"/v1/vector_stores/").concat(t,"/search"),r=await fetch(a,{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({query:o})});if(!r.ok){let e=await r.text();return await m(e),null}return await r.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},of=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:50,n=arguments.length>5?arguments[5]:void 0;try{let l=s?"".concat(s,"/tag/user-agent/analytics"):"/tag/user-agent/analytics",c=new URLSearchParams,i=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};c.append("start_date",i(t)),c.append("end_date",i(o)),c.append("page",a.toString()),c.append("page_size",r.toString()),n&&c.append("user_agent_filter",n);let d=c.toString();d&&(l+="?".concat(d));let u=await fetch(l,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=ov(e);throw m(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch user agent analytics:",e),e}},ow=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/tag/dau"):"/tag/dau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let l=n.toString();l&&(r+="?".concat(l));let c=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},oy=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/tag/wau"):"/tag/wau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let l=n.toString();l&&(r+="?".concat(l));let c=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},oj=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/tag/mau"):"/tag/mau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let l=n.toString();l&&(r+="?".concat(l));let c=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},o_=async e=>{try{let t=s?"".concat(s,"/tag/distinct"):"/tag/distinct",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},oC=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/tag/summary"):"/tag/summary",n=new URLSearchParams,l=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};n.append("start_date",l(t)),n.append("end_date",l(o)),a&&a.length>0&&a.forEach(e=>{n.append("tag_filters",e)});let c=n.toString();c&&(r+="?".concat(c));let i=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},ok=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,a=arguments.length>3?arguments[3]:void 0;try{let r=s?"".concat(s,"/tag/user-agent/per-user-analytics"):"/tag/user-agent/per-user-analytics",n=new URLSearchParams;n.append("page",t.toString()),n.append("page_size",o.toString()),a&&a.length>0&&a.forEach(e=>{n.append("tag_filters",e)});let l=n.toString();l&&(r+="?".concat(l));let c=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},ov=e=>(null==e?void 0:e.error)&&(e.error.message||e.error)||(null==e?void 0:e.message)||(null==e?void 0:e.detail)||(null==e?void 0:e.error)||JSON.stringify(e)},85968:function(e,t,o){o.d(t,{O:function(){return a}});let a=e=>{if(!e)return"An unknown error occurred";if("string"==typeof e)return e;if(e.message)try{let t=JSON.parse(e.message);if(t.error&&t.error.message)return t.error.message;return"string"==typeof t?t:JSON.stringify(t,null,2)}catch(t){return e.message}if(e.response&&e.response.data){if("string"==typeof e.response.data)return e.response.data;if(e.response.data.message)return e.response.data.message;if(e.response.data.error)return"string"==typeof e.response.data.error?e.response.data.error:e.response.data.error.message||JSON.stringify(e.response.data.error)}return String(e)}},3914:function(e,t,o){function a(){let e=window.location.hostname,t=["Lax","Strict","None"];["/","/ui"].forEach(o=>{document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,";"),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; domain=").concat(e,";"),t.forEach(t=>{let a="None"===t?" Secure;":"";document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; SameSite=").concat(t,";").concat(a),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; domain=").concat(e,"; SameSite=").concat(t,";").concat(a)})}),console.log("After clearing cookies:",document.cookie)}function r(e){let t=document.cookie.split("; ").find(t=>t.startsWith(e+"="));return t?t.split("=")[1]:null}o.d(t,{b:function(){return a},e:function(){return r}})}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/154-fff436ed72b19a24.js b/litellm/proxy/_experimental/out/_next/static/chunks/154-fff436ed72b19a24.js
new file mode 100644
index 00000000000..feea71c5b79
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/154-fff436ed72b19a24.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[154],{31283:function(e,t,o){o.d(t,{o:function(){return a.Z}});var a=o(49566)},63610:function(e,t,o){o.d(t,{d:function(){return p}});var a=o(57437),r=o(2265),n=o(64482),l=o(52787),c=o(20577),i=o(13634),s=o(31283),d=o(15424),u=o(89970),h=o(19250);let p=["metadata","config","enforced_params","aliases"],g=(e,t)=>p.includes(e)||"json"===t.format,m=e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch(e){return!1}},f=(e,t,o)=>{let a={max_budget:"Enter maximum budget in USD (e.g., 100.50)",budget_duration:"Select a time period for budget reset",tpm_limit:"Enter maximum tokens per minute (whole number)",rpm_limit:"Enter maximum requests per minute (whole number)",duration:"Enter duration (e.g., 30s, 24h, 7d)",metadata:'Enter JSON object with key-value pairs\nExample: {"team": "research", "project": "nlp"}',config:'Enter configuration as JSON object\nExample: {"setting": "value"}',permissions:"Enter comma-separated permission strings",enforced_params:'Enter parameters as JSON object\nExample: {"param": "value"}',blocked:"Enter true/false or specific block conditions",aliases:'Enter aliases as JSON object\nExample: {"alias1": "value1", "alias2": "value2"}',models:"Select one or more model names",key_alias:"Enter a unique identifier for this key",tags:"Enter comma-separated tag strings"}[e]||({string:"Text input",number:"Numeric input",integer:"Whole number input",boolean:"True/False value"})[o]||"Text input";return g(e,t)?"".concat(a,"\nMust be valid JSON format"):t.enum?"Select from available options\nAllowed values: ".concat(t.enum.join(", ")):a};t.Z=e=>{let{schemaComponent:t,excludedFields:o=[],form:p,overrideLabels:w={},overrideTooltips:y={},customValidation:j={},defaultValues:_={}}=e,[C,k]=(0,r.useState)(null),[v,T]=(0,r.useState)(null);(0,r.useEffect)(()=>{(async()=>{try{let e=(await (0,h.getOpenAPISchema)()).components.schemas[t];if(!e)throw Error('Schema component "'.concat(t,'" not found'));k(e);let a={};Object.keys(e.properties).filter(e=>!o.includes(e)&&void 0!==_[e]).forEach(e=>{a[e]=_[e]}),p.setFieldsValue(a)}catch(e){console.error("Schema fetch error:",e),T(e instanceof Error?e.message:"Failed to fetch schema")}})()},[t,p,o]);let E=e=>{if(e.type)return e.type;if(e.anyOf){let t=e.anyOf.map(e=>e.type);if(t.includes("number")||t.includes("integer"))return"number";t.includes("string")}return"string"},S=(e,t)=>{var o;let r;let h=E(t),p=null==C?void 0:null===(o=C.required)||void 0===o?void 0:o.includes(e),k=w[e]||t.title||e,v=y[e]||t.description,T=[];p&&T.push({required:!0,message:"".concat(k," is required")}),j[e]&&T.push({validator:j[e]}),g(e,t)&&T.push({validator:async(e,t)=>{if(t&&!m(t))throw Error("Please enter valid JSON")}});let S=v?(0,a.jsxs)("span",{children:[k," ",(0,a.jsx)(u.Z,{title:v,children:(0,a.jsx)(d.Z,{style:{marginLeft:"4px"}})})]}):k;return r=g(e,t)?(0,a.jsx)(n.default.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,a.jsx)(l.default,{children:t.enum.map(e=>(0,a.jsx)(l.default.Option,{value:e,children:e},e))}):"number"===h||"integer"===h?(0,a.jsx)(c.Z,{style:{width:"100%"},precision:"integer"===h?0:void 0}):"duration"===e?(0,a.jsx)(s.o,{placeholder:"eg: 30s, 30h, 30d"}):(0,a.jsx)(s.o,{placeholder:v||""}),(0,a.jsx)(i.Z.Item,{label:S,name:e,className:"mt-8",rules:T,initialValue:_[e],help:(0,a.jsx)("div",{className:"text-xs text-gray-500",children:f(e,t,h)}),children:r},e)};return v?(0,a.jsxs)("div",{className:"text-red-500",children:["Error: ",v]}):(null==C?void 0:C.properties)?(0,a.jsx)("div",{children:Object.entries(C.properties).filter(e=>{let[t]=e;return!o.includes(t)}).map(e=>{let[t,o]=e;return S(t,o)})}):null}},9114:function(e,t,o){var a=o(2265),r=o(57271),n=o(85968);function l(){return"topRight"}function c(e,t){var o;return"string"==typeof e?{message:t,description:e}:{message:null!==(o=e.message)&&void 0!==o?o:t,...e}}function i(e){return"number"==typeof e?e:"string"==typeof e&&/^\d+$/.test(e)?parseInt(e,10):void 0}let s=["invalid api key","invalid authorization header format","authentication error","invalid proxy server token","invalid jwt token","invalid jwt submitted","unauthorized access to metrics endpoint"],d=["admin-only endpoint","not allowed to access model","user does not have permission","access forbidden","invalid credentials used to access ui","user not allowed to access proxy"],u=["db not connected","database not initialized","no db connected","prisma client not initialized","service unhealthy"],h=["no models configured on proxy","llm router not initialized","no deployments available","no healthy deployment available","not allowed to access model due to tags configuration","invalid model name passed in"],p=["deployment over user-defined ratelimit","crossed tpm / rpm / max parallel request limit","max parallel request limit"],g=["budget exceeded","crossed budget","provider budget"],m=["must be a litellm enterprise user","only be available for liteLLM enterprise users","missing litellm-enterprise package","only available on the docker image","enterprise feature","premium user"],f=["invalid json payload","invalid request type","invalid key format","invalid hash key","invalid sort column","invalid sort order","invalid limit","invalid file type","invalid field","invalid date format"],w=["model not found","model with id","credential not found","user not found","team not found","organization not found","mcp server with id","tool '"],y=["already exists","team member is already in team","user already exists"],j=["violated openai moderation policy","violated jailbreak threshold","violated prompt_injection threshold","violated content safety policy","violated lasso guardrail policy","blocked by pillar security guardrail","violated azure prompt shield guardrail policy","content blocked by model armor","response blocked by model armor","streaming response blocked by model armor","guardrail","moderation"],_=["invalid purpose","service must be specified","invalid response - response.response is none"],C=["cloudzero settings not configured","failed to decrypt cloudzero api key","cloudzero settings not found"],k=["created successfully","updated successfully","deleted successfully","credential created successfully","model added successfully","team created successfully","user created successfully","organization created successfully","cloudzero settings initialized successfully","cloudzero settings updated successfully","cloudzero export completed successfully","mock llm request made","mock slack alert sent","mock email alert sent","spend for all api keys and teams reset successfully","monthlyglobalspend view refreshed","cache cleared successfully","cache set successfully","ip ","deleted successfully"],v=["rate limit reached for deployment","deployment cooldown period active"],T=["this feature is only available for litellm enterprise users","enterprise features are not available","regenerating virtual keys is an enterprise feature","trying to set allowed_routes. this is an enterprise feature"],E=["invalid maximum_spend_logs_retention_interval value","error has invalid or non-convertible code","failed to save health check to database"];t.Z={error(e){var t,o;let a=c(e,"Error");r.ZP.error({...a,placement:null!==(t=a.placement)&&void 0!==t?t:l(),duration:null!==(o=a.duration)&&void 0!==o?o:6})},warning(e){var t,o;let a=c(e,"Warning");r.ZP.warning({...a,placement:null!==(t=a.placement)&&void 0!==t?t:l(),duration:null!==(o=a.duration)&&void 0!==o?o:5})},info(e){var t,o;let a=c(e,"Info");r.ZP.info({...a,placement:null!==(t=a.placement)&&void 0!==t?t:l(),duration:null!==(o=a.duration)&&void 0!==o?o:4})},success(e){var t,o;if(a.isValidElement(e)){r.ZP.success({message:"Success",description:e,placement:l(),duration:3.5});return}let n=c(e,"Success");r.ZP.success({...n,placement:null!==(t=n.placement)&&void 0!==t?t:l(),duration:null!==(o=n.duration)&&void 0!==o?o:3.5})},fromBackend(e,t){var o,a,c,S,b,F,P,O,B,N,x,G;let J=null!==(G=null!==(x=i(null==e?void 0:null===(N=e.response)||void 0===N?void 0:N.status))&&void 0!==x?x:i(null==e?void 0:e.status_code))&&void 0!==G?G:i(null==e?void 0:e.code),A=function(e){var t,o,a,r,l,c,i,s,d,u,h,p;if("string"==typeof e)return e;let g=null!==(p=null!==(h=null!==(u=null!==(d=null!==(s=null==e?void 0:null===(a=e.response)||void 0===a?void 0:null===(o=a.data)||void 0===o?void 0:null===(t=o.error)||void 0===t?void 0:t.message)&&void 0!==s?s:null==e?void 0:null===(l=e.response)||void 0===l?void 0:null===(r=l.data)||void 0===r?void 0:r.message)&&void 0!==d?d:null==e?void 0:null===(i=e.response)||void 0===i?void 0:null===(c=i.data)||void 0===c?void 0:c.error)&&void 0!==u?u:null==e?void 0:e.detail)&&void 0!==h?h:null==e?void 0:e.message)&&void 0!==p?p:e;return(0,n.O)(g)}(e),U={...null!=t?t:{},description:A,placement:null!==(o=null==t?void 0:t.placement)&&void 0!==o?o:l()};if(void 0!==J||e instanceof Error||"string"==typeof e||e&&"object"==typeof e&&("error"in e||"detail"in e)){let e=function(e,t){var o,a,r,n,l;let c=(t||"").toLowerCase();return s.some(e=>c.includes(e))?"Authentication Error":d.some(e=>c.includes(e))?"Access Denied":(null==u?void 0:null===(o=u.some)||void 0===o?void 0:o.call(u,e=>c.includes(e)))||503===e?"Service Unavailable":(null==g?void 0:null===(a=g.some)||void 0===a?void 0:a.call(g,e=>c.includes(e)))?"Budget Exceeded":(null==m?void 0:null===(r=m.some)||void 0===r?void 0:r.call(m,e=>c.includes(e)))?"Feature Unavailable":(null==h?void 0:null===(n=h.some)||void 0===n?void 0:n.call(h,e=>c.includes(e)))?"Routing Error":y.some(e=>c.includes(e))?"Already Exists":j.some(e=>c.includes(e))?"Content Blocked":_.some(e=>c.includes(e))?"Validation Error":C.some(e=>c.includes(e))?"Integration Error":f.some(e=>c.includes(e))?"Validation Error":404===e||c.includes("not found")||w.some(e=>c.includes(e))?"Not Found":429===e||c.includes("rate limit")||c.includes("tpm")||c.includes("rpm")||(null==p?void 0:null===(l=p.some)||void 0===l?void 0:l.call(p,e=>c.includes(e)))?"Rate Limit Exceeded":e&&e>=500?"Server Error":401===e?"Authentication Error":403===e?"Access Denied":c.includes("enterprise")||c.includes("premium")?"Info":e&&e>=400?"Request Error":"Error"}(J,A),o={...U,message:e};if("Rate Limit Exceeded"===e||"Info"===e||"Budget Exceeded"===e||"Feature Unavailable"===e||"Content Blocked"===e||"Integration Error"===e){r.ZP.warning({...o,duration:null!==(a=null==t?void 0:t.duration)&&void 0!==a?a:7});return}if("Server Error"===e){r.ZP.error({...o,duration:null!==(c=null==t?void 0:t.duration)&&void 0!==c?c:8});return}if("Request Error"===e||"Authentication Error"===e||"Access Denied"===e||"Not Found"===e||"Error"===e){r.ZP.error({...o,duration:null!==(S=null==t?void 0:t.duration)&&void 0!==S?S:6});return}r.ZP.info({...o,duration:null!==(b=null==t?void 0:t.duration)&&void 0!==b?b:4});return}let R=function(e){let t=(e||"").toLowerCase();return k.some(e=>t.includes(e))?{kind:"success",title:"Success"}:T.some(e=>t.includes(e))?{kind:"warning",title:"Feature Notice"}:E.some(e=>t.includes(e))?{kind:"warning",title:"Configuration Warning"}:v.some(e=>t.includes(e))?{kind:"warning",title:"Rate Limit"}:null}(A),I={...U,message:null!==(F=null==R?void 0:R.title)&&void 0!==F?F:"Info"};if((null==R?void 0:R.kind)==="success"){r.ZP.success({...I,duration:null!==(P=null==t?void 0:t.duration)&&void 0!==P?P:3.5});return}if((null==R?void 0:R.kind)==="warning"){r.ZP.warning({...I,duration:null!==(O=null==t?void 0:t.duration)&&void 0!==O?O:6});return}r.ZP.info({...I,duration:null!==(B=null==t?void 0:t.duration)&&void 0!==B?B:4})},clear(){r.ZP.destroy()}}},19250:function(e,t,o){o.r(t),o.d(t,{DEFAULT_ORGANIZATION:function(){return p},PredictedSpendLogsCall:function(){return tl},addAllowedIP:function(){return em},adminGlobalActivity:function(){return eJ},adminGlobalActivityExceptions:function(){return eR},adminGlobalActivityExceptionsPerDeployment:function(){return eI},adminGlobalActivityPerModel:function(){return eU},adminGlobalCacheActivity:function(){return eA},adminSpendLogsCall:function(){return eB},adminTopEndUsersCall:function(){return ex},adminTopKeysCall:function(){return eN},adminTopModelsCall:function(){return eM},adminspendByProvider:function(){return eG},alertingSettingsCall:function(){return A},allEndUsersCall:function(){return eb},allTagNamesCall:function(){return eS},availableTeamListCall:function(){return W},budgetCreateCall:function(){return N},budgetDeleteCall:function(){return B},budgetUpdateCall:function(){return x},cachingHealthCheckCall:function(){return tv},callMCPTool:function(){return tZ},cancelModelCostMapReload:function(){return S},claimOnboardingToken:function(){return el},convertPromptFileToJson:function(){return tx},createGuardrailCall:function(){return tJ},createMCPServer:function(){return tz},createPassThroughEndpoint:function(){return tf},createPromptCall:function(){return tO},credentialCreateCall:function(){return eQ},credentialDeleteCall:function(){return e1},credentialGetCall:function(){return e0},credentialListCall:function(){return eX},credentialUpdateCall:function(){return e2},defaultProxyBaseUrl:function(){return c},deleteAllowedIP:function(){return ef},deleteCallback:function(){return ou},deleteConfigFieldSetting:function(){return ty},deleteGuardrailCall:function(){return oe},deleteMCPServer:function(){return tD},deletePassThroughEndpointsCall:function(){return tj},deletePromptCall:function(){return tN},fetchMCPAccessGroups:function(){return tM},fetchMCPServers:function(){return tI},formatDate:function(){return l},getAllowedIPs:function(){return eg},getBudgetList:function(){return ts},getBudgetSettings:function(){return td},getCallbacksCall:function(){return tu},getConfigFieldSetting:function(){return tg},getDefaultTeamSettings:function(){return t$},getEmailEventSettings:function(){return t7},getGeneralSettingsCall:function(){return th},getGuardrailInfo:function(){return oa},getGuardrailProviderSpecificParams:function(){return oo},getGuardrailUISettings:function(){return ot},getGuardrailsList:function(){return tb},getInternalUserSettings:function(){return tU},getModelCostMapReloadStatus:function(){return b},getOnboardingCredentials:function(){return en},getOpenAPISchema:function(){return k},getPassThroughEndpointInfo:function(){return od},getPassThroughEndpointsCall:function(){return tp},getPossibleUserRoles:function(){return eK},getPromptInfo:function(){return tP},getPromptsList:function(){return tF},getProxyBaseUrl:function(){return u},getProxyUISettings:function(){return tS},getPublicModelHubInfo:function(){return C},getRemainingUsers:function(){return oi},getSSOSettings:function(){return on},getTeamPermissionsCall:function(){return tX},getTotalSpendCall:function(){return er},getUiConfig:function(){return _},healthCheckCall:function(){return tC},healthCheckHistoryCall:function(){return tT},individualModelHealthCheckCall:function(){return tk},invitationClaimCall:function(){return J},invitationCreateCall:function(){return G},keyCreateCall:function(){return R},keyCreateServiceAccountCall:function(){return U},keyDeleteCall:function(){return M},keyInfoCall:function(){return ez},keyInfoV1Call:function(){return eD},keyListCall:function(){return eV},keySpendLogsCall:function(){return ev},keyUpdateCall:function(){return e4},latestHealthChecksCall:function(){return tE},listMCPTools:function(){return tV},makeModelGroupPublic:function(){return j},mcpToolsCall:function(){return oh},modelAvailableCall:function(){return ek},modelCostMap:function(){return v},modelCreateCall:function(){return F},modelDeleteCall:function(){return O},modelExceptionsCall:function(){return e_},modelHubCall:function(){return ep},modelHubPublicModelsCall:function(){return eh},modelInfoCall:function(){return ed},modelInfoV1Call:function(){return eu},modelMetricsCall:function(){return ew},modelMetricsSlowResponsesCall:function(){return ej},modelPatchUpdateCall:function(){return e5},modelSettingsCall:function(){return P},modelUpdateCall:function(){return e6},organizationCreateCall:function(){return $},organizationDeleteCall:function(){return X},organizationInfoCall:function(){return K},organizationListCall:function(){return Y},organizationMemberAddCall:function(){return tt},organizationMemberDeleteCall:function(){return to},organizationMemberUpdateCall:function(){return ta},organizationUpdateCall:function(){return Q},patchPromptCall:function(){return tG},perUserAnalyticsCall:function(){return ok},proxyBaseUrl:function(){return s},regenerateKeyCall:function(){return ec},reloadModelCostMap:function(){return T},resetEmailEventSettings:function(){return t8},scheduleModelCostMapReload:function(){return E},serverRootPath:function(){return i},serviceHealthCheck:function(){return ti},sessionSpendLogsCall:function(){return t1},setCallbacksCall:function(){return t_},setGlobalLitellmHeaderName:function(){return y},slackBudgetAlertsHealthCheck:function(){return tc},spendUsersCall:function(){return eZ},streamingModelMetricsCall:function(){return ey},tagCreateCall:function(){return tq},tagDailyActivityCall:function(){return eo},tagDauCall:function(){return ow},tagDeleteCall:function(){return tK},tagDistinctCall:function(){return o_},tagInfoCall:function(){return tW},tagListCall:function(){return tY},tagMauCall:function(){return oj},tagUpdateCall:function(){return tH},tagWauCall:function(){return oy},tagsSpendLogsCall:function(){return eE},teamBulkMemberAddCall:function(){return e9},teamCreateCall:function(){return e$},teamDailyActivityCall:function(){return ea},teamDeleteCall:function(){return L},teamInfoCall:function(){return Z},teamListCall:function(){return H},teamMemberAddCall:function(){return e7},teamMemberDeleteCall:function(){return te},teamMemberUpdateCall:function(){return e8},teamPermissionsUpdateCall:function(){return t0},teamSpendLogsCall:function(){return eT},teamUpdateCall:function(){return e3},testConnectionRequest:function(){return eL},testMCPConnectionRequest:function(){return op},testMCPToolsListRequest:function(){return og},transformRequestCall:function(){return ee},uiAuditLogsCall:function(){return oc},uiSpendLogDetailsCall:function(){return tA},uiSpendLogsCall:function(){return eO},updateConfigFieldSetting:function(){return tw},updateDefaultTeamSettings:function(){return tQ},updateEmailEventSettings:function(){return t9},updateGuardrailCall:function(){return or},updateInternalUserSettings:function(){return tR},updateMCPServer:function(){return tL},updatePassThroughEndpoint:function(){return os},updatePassThroughFieldSetting:function(){return tm},updatePromptCall:function(){return tB},updateSSOSettings:function(){return ol},updateUsefulLinksCall:function(){return eC},userAgentAnalyticsCall:function(){return of},userAgentSummaryCall:function(){return oC},userBulkUpdateUserCall:function(){return tn},userCreateCall:function(){return I},userDailyActivityAggregatedCall:function(){return eW},userDailyActivityCall:function(){return et},userDeleteCall:function(){return z},userFilterUICall:function(){return eF},userGetAllUsersCall:function(){return eY},userGetRequesedtModelsCall:function(){return eH},userInfoCall:function(){return V},userListCall:function(){return D},userRequestModelCall:function(){return eq},userSpendLogsCall:function(){return eP},userUpdateUserCall:function(){return tr},v2TeamListCall:function(){return q},vectorStoreCreateCall:function(){return t2},vectorStoreDeleteCall:function(){return t3},vectorStoreInfoCall:function(){return t5},vectorStoreListCall:function(){return t4},vectorStoreSearchCall:function(){return om},vectorStoreUpdateCall:function(){return t6}});var a=o(42264),r=o(63610),n=o(9114);let l=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)},c=null,i="/",s=null;console.log=function(){};let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=window.location.origin,a=t||o;console.log("proxyBaseUrl:",s),console.log("serverRootPath:",e),e.length>0&&!a.endsWith(e)&&"/"!=e&&(a+=e,s=a),console.log("Updated proxyBaseUrl:",s)},u=()=>s||window.location.origin,h={GET:"GET",DELETE:"DELETE"},p="default_organization",g=0,m=async e=>{let t=Date.now();t-g>6e4?(e.includes("Authentication Error - Expired Key")&&(n.Z.info("UI Session Expired. Logging out."),g=t,document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",window.location.href=window.location.pathname),g=t):console.log("Error suppressed to prevent spam:",e)},f="Authorization",w="x-mcp-auth";function y(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Authorization";console.log("setGlobalLitellmHeaderName: ".concat(e)),f=e}let j=async(e,t)=>{let o=s?"".concat(s,"/model_group/make_public"):"/model_group/make_public";return(await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},_=async()=>{console.log("Getting UI config");let e=await fetch(c?"".concat(c,"/litellm/.well-known/litellm-ui-config"):"/litellm/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),d(t.server_root_path,t.proxy_base_url),t},C=async()=>{let e=await fetch(c?"".concat(c,"/public/model_hub/info"):"/public/model_hub/info");return await e.json()},k=async()=>{let e=s?"".concat(s,"/openapi.json"):"/openapi.json",t=await fetch(e);return await t.json()},v=async e=>{try{let t=s?"".concat(s,"/get/litellm_model_cost_map"):"/get/litellm_model_cost_map",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("received litellm model cost data: ".concat(a)),a}catch(e){throw console.error("Failed to get model cost map:",e),e}},T=async e=>{try{let t=s?"".concat(s,"/reload/model_cost_map"):"/reload/model_cost_map",o=await fetch(t,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("Model cost map reload response: ".concat(a)),a}catch(e){throw console.error("Failed to reload model cost map:",e),e}},E=async(e,t)=>{try{let o=s?"".concat(s,"/schedule/model_cost_map_reload?hours=").concat(t):"/schedule/model_cost_map_reload?hours=".concat(t),a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}}),r=await a.json();return console.log("Schedule model cost map reload response: ".concat(r)),r}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},S=async e=>{try{let t=s?"".concat(s,"/schedule/model_cost_map_reload"):"/schedule/model_cost_map_reload",o=await fetch(t,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}}),a=await o.json();return console.log("Cancel model cost map reload response: ".concat(a)),a}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},b=async e=>{try{let t=s?"".concat(s,"/schedule/model_cost_map_reload/status"):"/schedule/model_cost_map_reload/status";console.log("Fetching status from URL:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){console.error("Status request failed with status: ".concat(o.status));let e=await o.text();throw console.error("Error response:",e),Error("HTTP ".concat(o.status,": ").concat(e))}let a=await o.json();return console.log("Model cost map reload status:",a),a}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},F=async(e,t)=>{try{let o=s?"".concat(s,"/model/new"):"/model/new",r=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let l=await r.json();return console.log("API Response:",l),a.ZP.destroy(),n.Z.success("Model ".concat(t.model_name," created successfully")),l}catch(e){throw console.error("Failed to create key:",e),e}},P=async e=>{try{let t=s?"".concat(s,"/model/settings"):"/model/settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){console.error("Failed to get model settings:",e)}},O=async(e,t)=>{console.log("model_id in model delete call: ".concat(t));try{let o=s?"".concat(s,"/model/delete"):"/model/delete",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},B=async(e,t)=>{if(console.log("budget_id in budget delete call: ".concat(t)),null!=e)try{let o=s?"".concat(s,"/budget/delete"):"/budget/delete",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},N=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let o=s?"".concat(s,"/budget/new"):"/budget/new",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},x=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let o=s?"".concat(s,"/budget/update"):"/budget/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},G=async(e,t)=>{try{let o=s?"".concat(s,"/invitation/new"):"/invitation/new",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{try{console.log("Form Values in invitationCreateCall:",t),console.log("Form Values after check:",t);let o=s?"".concat(s,"/invitation/claim"):"/invitation/claim",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},A=async e=>{try{let t=s?"".concat(s,"/alerting/settings"):"/alerting/settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},U=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),r.d))if(t[e]){console.log("formValues.".concat(e,":"),t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error("Failed to parse ".concat(e,": ")+t)}}console.log("Form Values after check:",t);let o=s?"".concat(s,"/key/service-account/generate"):"/key/service-account/generate",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let n=await a.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},R=async(e,t,o)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),r.d))if(o[e]){console.log("formValues.".concat(e,":"),o[e]);try{o[e]=JSON.parse(o[e])}catch(t){throw Error("Failed to parse ".concat(e,": ")+t)}}console.log("Form Values after check:",o);let a=s?"".concat(s,"/key/generate"):"/key/generate",n=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!n.ok){let e=await n.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let l=await n.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},I=async(e,t,o)=>{try{if(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),o.auto_create_key=!1,o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",o);let a=s?"".concat(s,"/user/new"):"/user/new",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!r.ok){let e=await r.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},M=async(e,t)=>{try{let o=s?"".concat(s,"/key/delete"):"/key/delete";console.log("in keyDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},z=async(e,t)=>{try{let o=s?"".concat(s,"/user/delete"):"/user/delete";console.log("in userDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete user(s):",e),e}},L=async(e,t)=>{try{let o=s?"".concat(s,"/team/delete"):"/team/delete";console.log("in teamDeleteCall:",t);let a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete key:",e),e}},D=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,i=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null;try{let u=s?"".concat(s,"/user/list"):"/user/list";console.log("in userListCall");let h=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");h.append("user_ids",e)}o&&h.append("page",o.toString()),a&&h.append("page_size",a.toString()),r&&h.append("user_email",r),n&&h.append("role",n),l&&h.append("team",l),c&&h.append("sso_user_ids",c),i&&h.append("sort_by",i),d&&h.append("sort_order",d);let p=h.toString();p&&(u+="?".concat(p));let g=await fetch(u,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!g.ok){let e=await g.json(),t=ov(e);throw m(t),Error(t)}let w=await g.json();return console.log("/user/list API Response:",w),w}catch(e){throw console.error("Failed to create key:",e),e}},V=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0,n=arguments.length>5?arguments[5]:void 0,l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];console.log("userInfoCall: ".concat(t,", ").concat(o,", ").concat(a,", ").concat(r,", ").concat(n,", ").concat(l));try{let c;if(a){c=s?"".concat(s,"/user/list"):"/user/list";let e=new URLSearchParams;null!=r&&e.append("page",r.toString()),null!=n&&e.append("page_size",n.toString()),c+="?".concat(e.toString())}else c=s?"".concat(s,"/user/info"):"/user/info",("Admin"!==o&&"Admin Viewer"!==o||l)&&t&&(c+="?user_id=".concat(t));console.log("Requesting user data from:",c);let i=await fetch(c,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}let d=await i.json();return console.log("API Response:",d),d}catch(e){throw console.error("Failed to fetch user data:",e),e}},Z=async(e,t)=>{try{let o=s?"".concat(s,"/team/info"):"/team/info";t&&(o="".concat(o,"?team_id=").concat(t)),console.log("in teamInfoCall");let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},q=async function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&void 0!==arguments[6]&&arguments[6],arguments.length>7&&void 0!==arguments[7]&&arguments[7],arguments.length>8&&void 0!==arguments[8]&&arguments[8];try{let n=s?"".concat(s,"/v2/team/list"):"/v2/team/list";console.log("in teamInfoCall");let l=new URLSearchParams;o&&l.append("user_id",o.toString()),t&&l.append("organization_id",t.toString()),a&&l.append("team_id",a.toString()),r&&l.append("team_alias",r.toString());let c=l.toString();c&&(n+="?".concat(c));let i=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}let d=await i.json();return console.log("/v2/team/list API Response:",d),d}catch(e){throw console.error("Failed to create key:",e),e}},H=async function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let n=s?"".concat(s,"/team/list"):"/team/list";console.log("in teamInfoCall");let l=new URLSearchParams;o&&l.append("user_id",o.toString()),t&&l.append("organization_id",t.toString()),a&&l.append("team_id",a.toString()),r&&l.append("team_alias",r.toString());let c=l.toString();c&&(n+="?".concat(c));let i=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}let d=await i.json();return console.log("/team/list API Response:",d),d}catch(e){throw console.error("Failed to create key:",e),e}},W=async e=>{try{let t=s?"".concat(s,"/team/available"):"/team/available";console.log("in availableTeamListCall");let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("/team/available_teams API Response:",a),a}catch(e){throw e}},Y=async e=>{try{let t=s?"".concat(s,"/organization/list"):"/organization/list",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{let o=s?"".concat(s,"/organization/info"):"/organization/info";t&&(o="".concat(o,"?organization_id=").concat(t)),console.log("in teamInfoCall");let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},$=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let o=s?"".concat(s,"/organization/new"):"/organization/new",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},Q=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let o=s?"".concat(s,"/organization/update"):"/organization/update",a=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("Update Team Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t)=>{try{let o=s?"".concat(s,"/organization/delete"):"/organization/delete",a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!a.ok){let e=await a.text();throw m(e),Error("Error deleting organization: ".concat(e))}return await a.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},ee=async(e,t)=>{try{let o=s?"".concat(s,"/utils/transform_request"):"/utils/transform_request",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},et=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;try{let r=s?"".concat(s,"/user/daily/activity"):"/user/daily/activity",n=new URLSearchParams;n.append("start_date",l(t)),n.append("end_date",l(o)),n.append("page_size","1000"),n.append("page",a.toString());let c=n.toString();c&&(r+="?".concat(c));let i=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},eo=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let n=s?"".concat(s,"/tag/daily/activity"):"/tag/daily/activity",c=new URLSearchParams;c.append("start_date",l(t)),c.append("end_date",l(o)),c.append("page_size","1000"),c.append("page",a.toString()),r&&c.append("tags",r.join(","));let i=c.toString();i&&(n+="?".concat(i));let d=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=ov(e);throw m(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to create key:",e),e}},ea=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;try{let n=s?"".concat(s,"/team/daily/activity"):"/team/daily/activity",c=new URLSearchParams;c.append("start_date",l(t)),c.append("end_date",l(o)),c.append("page_size","1000"),c.append("page",a.toString()),r&&c.append("team_ids",r.join(",")),c.append("exclude_team_ids","litellm-dashboard");let i=c.toString();i&&(n+="?".concat(i));let d=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=ov(e);throw m(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to create key:",e),e}},er=async e=>{try{let t=s?"".concat(s,"/global/spend"):"/global/spend",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},en=async e=>{try{let t=s?"".concat(s,"/onboarding/get_token"):"/onboarding/get_token";t+="?invite_link=".concat(e);let o=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t,o,a)=>{let r=s?"".concat(s,"/onboarding/claim_token"):"/onboarding/claim_token";try{let n=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:o,password:a})});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to delete key:",e),e}},ec=async(e,t,o)=>{try{let a=s?"".concat(s,"/key/").concat(t,"/regenerate"):"/key/".concat(t,"/regenerate"),r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("Regenerate key Response:",n),n}catch(e){throw console.error("Failed to regenerate key:",e),e}},ei=!1,es=null,ed=async(e,t,o)=>{try{console.log("modelInfoCall:",e,t,o);let a=s?"".concat(s,"/v2/model/info"):"/v2/model/info",r=new URLSearchParams;r.append("include_team_models","true"),r.toString()&&(a+="?".concat(r.toString()));let l=await fetch(a,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!l.ok){let e=await l.text();throw e+="error shown=".concat(ei),ei||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),n.Z.info(e),ei=!0,es&&clearTimeout(es),es=setTimeout(()=>{ei=!1},1e4)),Error("Network response was not ok")}let c=await l.json();return console.log("modelInfoCall:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},eu=async(e,t)=>{try{let o=s?"".concat(s,"/v1/model/info"):"/v1/model/info";o+="?litellm_model_id=".concat(t);let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("modelInfoV1Call:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eh=async()=>{let e=s?"".concat(s,"/public/model_hub"):"/public/model_hub";return(await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}})).json()},ep=async e=>{try{let t=s?"".concat(s,"/model_group/info"):"/model_group/info",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("modelHubCall:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eg=async e=>{try{let t=s?"".concat(s,"/get/allowed_ips"):"/get/allowed_ips",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("getAllowedIPs:",a),a.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},em=async(e,t)=>{try{let o=s?"".concat(s,"/add/allowed_ip"):"/add/allowed_ip",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("addAllowedIP:",r),r}catch(e){throw console.error("Failed to add allowed IP:",e),e}},ef=async(e,t)=>{try{let o=s?"".concat(s,"/delete/allowed_ip"):"/delete/allowed_ip",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("deleteAllowedIP:",r),r}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},ew=async(e,t,o,a,r,n,l,c)=>{try{let t=s?"".concat(s,"/model/metrics"):"/model/metrics";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(l,"&customer=").concat(c));let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},ey=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/model/streaming_metrics"):"/model/streaming_metrics";t&&(r="".concat(r,"?_selected_model_group=").concat(t,"&startTime=").concat(o,"&endTime=").concat(a));let n=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},ej=async(e,t,o,a,r,n,l,c)=>{try{let t=s?"".concat(s,"/model/metrics/slow_responses"):"/model/metrics/slow_responses";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(l,"&customer=").concat(c));let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},e_=async(e,t,o,a,r,n,l,c)=>{try{let t=s?"".concat(s,"/model/metrics/exceptions"):"/model/metrics/exceptions";a&&(t="".concat(t,"?_selected_model_group=").concat(a,"&startTime=").concat(r,"&endTime=").concat(n,"&api_key=").concat(l,"&customer=").concat(c));let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eC=async(e,t)=>{try{let o=s?"".concat(s,"/model_hub/update_useful_links"):"/model_hub/update_useful_links",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},ek=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=(arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&void 0!==arguments[6]&&arguments[6]);console.log("in /models calls, globalLitellmHeaderName",f);try{let t=s?"".concat(s,"/models"):"/models",o=new URLSearchParams;o.append("include_model_access_groups","True"),!0===a&&o.append("return_wildcard_routes","True"),!0===n&&o.append("only_model_access_groups","True"),r&&o.append("team_id",r.toString()),o.toString()&&(t+="?".concat(o.toString()));let l=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to create key:",e),e}},ev=async(e,t)=>{try{let o=s?"".concat(s,"/global/spend/logs"):"/global/spend/logs";console.log("in keySpendLogsCall:",o);let a=await fetch("".concat(o,"?api_key=").concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},eT=async e=>{try{let t=s?"".concat(s,"/global/spend/teams"):"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let o=await fetch("".concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eE=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/spend/tags"):"/global/spend/tags";t&&o&&(r="".concat(r,"?start_date=").concat(t,"&end_date=").concat(o)),a&&(r+="".concat(r,"&tags=").concat(a.join(","))),console.log("in tagsSpendLogsCall:",r);let n=await fetch("".concat(r),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to create key:",e),e}},eS=async e=>{try{let t=s?"".concat(s,"/global/spend/all_tag_names"):"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eb=async e=>{try{let t=s?"".concat(s,"/global/all_end_users"):"/global/all_end_users";console.log("in global/all_end_users call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t)=>{try{let o=s?"".concat(s,"/user/filter/ui"):"/user/filter/ui";t.get("user_email")&&(o+="?user_email=".concat(t.get("user_email"))),t.get("user_id")&&(o+="?user_id=".concat(t.get("user_id")));let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eP=async(e,t,o,a,r,n)=>{try{console.log("user role in spend logs call: ".concat(o));let t=s?"".concat(s,"/spend/logs"):"/spend/logs";t="App Owner"==o?"".concat(t,"?user_id=").concat(a,"&start_date=").concat(r,"&end_date=").concat(n):"".concat(t,"?start_date=").concat(r,"&end_date=").concat(n);let l=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log(c),c}catch(e){throw console.error("Failed to create key:",e),e}},eO=async(e,t,o,a,r,n,l,c,i,d,u,h)=>{try{let p=s?"".concat(s,"/spend/logs/ui"):"/spend/logs/ui",g=new URLSearchParams;t&&g.append("api_key",t),o&&g.append("team_id",o),a&&g.append("request_id",a),r&&g.append("start_date",r),n&&g.append("end_date",n),l&&g.append("page",l.toString()),c&&g.append("page_size",c.toString()),i&&g.append("user_id",i),d&&g.append("end_user",d),u&&g.append("status_filter",u),h&&g.append("model",h);let w=g.toString();w&&(p+="?".concat(w));let y=await fetch(p,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!y.ok){let e=await y.json(),t=ov(e);throw m(t),Error(t)}let j=await y.json();return console.log("Spend Logs Response:",j),j}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},eB=async e=>{try{let t=s?"".concat(s,"/global/spend/logs"):"/global/spend/logs",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},eN=async e=>{try{let t=s?"".concat(s,"/global/spend/keys?limit=5"):"/global/spend/keys?limit=5",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},ex=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/spend/end_users"):"/global/spend/end_users",n="";n=t?JSON.stringify({api_key:t,startTime:o,endTime:a}):JSON.stringify({startTime:o,endTime:a});let l={method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:n},c=await fetch(r,l);if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}let i=await c.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eG=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/spend/provider"):"/global/spend/provider";o&&a&&(r+="?start_date=".concat(o,"&end_date=").concat(a)),t&&(r+="&api_key=".concat(t));let n={method:"GET",headers:{[f]:"Bearer ".concat(e)}},l=await fetch(r,n);if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eJ=async(e,t,o)=>{try{let a=s?"".concat(s,"/global/activity"):"/global/activity";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[f]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eA=async(e,t,o)=>{try{let a=s?"".concat(s,"/global/activity/cache_hits"):"/global/activity/cache_hits";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[f]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eU=async(e,t,o)=>{try{let a=s?"".concat(s,"/global/activity/model"):"/global/activity/model";t&&o&&(a+="?start_date=".concat(t,"&end_date=").concat(o));let r={method:"GET",headers:{[f]:"Bearer ".concat(e)}},n=await fetch(a,r);if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eR=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/activity/exceptions"):"/global/activity/exceptions";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o)),a&&(r+="&model_group=".concat(a));let n={method:"GET",headers:{[f]:"Bearer ".concat(e)}},l=await fetch(r,n);if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eI=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/global/activity/exceptions/deployment"):"/global/activity/exceptions/deployment";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o)),a&&(r+="&model_group=".concat(a));let n={method:"GET",headers:{[f]:"Bearer ".concat(e)}},l=await fetch(r,n);if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log(c),c}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eM=async e=>{try{let t=s?"".concat(s,"/global/spend/models?limit=5"):"/global/spend/models?limit=5",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to create key:",e),e}},ez=async(e,t)=>{try{let o=s?"".concat(s,"/v2/key/info"):"/v2/key/info",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!a.ok){let e=await a.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw m(e),Error("Network response was not ok")}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},eL=async(e,t,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let r=s?"".concat(s,"/health/test_connection"):"/health/test_connection",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[f]:"Bearer ".concat(e)},body:JSON.stringify({litellm_params:t,mode:o})}),l=n.headers.get("content-type");if(!l||!l.includes("application/json")){let e=await n.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(n.status,": ").concat(n.statusText,"). Check network tab for details."))}let c=await n.json();if(!n.ok||"error"===c.status){if("error"===c.status);else{var a;return{status:"error",message:(null===(a=c.error)||void 0===a?void 0:a.message)||"Connection test failed: ".concat(n.status," ").concat(n.statusText)}}}return c}catch(e){throw console.error("Model connection test error:",e),e}},eD=async(e,t)=>{try{console.log("entering keyInfoV1Call");let o=s?"".concat(s,"/key/info"):"/key/info";o="".concat(o,"?key=").concat(t);let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(console.log("response",a),!a.ok){let e=await a.text();m(e),n.Z.fromBackend("Failed to fetch key info - "+e)}let r=await a.json();return console.log("data",r),r}catch(e){throw console.error("Failed to fetch key info:",e),e}},eV=async function(e,t,o,a,r,n,l,c){let i=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null;try{let u=s?"".concat(s,"/key/list"):"/key/list";console.log("in keyListCall");let h=new URLSearchParams;o&&h.append("team_id",o.toString()),t&&h.append("organization_id",t.toString()),a&&h.append("key_alias",a),n&&h.append("key_hash",n),r&&h.append("user_id",r.toString()),l&&h.append("page",l.toString()),c&&h.append("size",c.toString()),i&&h.append("sort_by",i),d&&h.append("sort_order",d),h.append("return_full_object","true"),h.append("include_team_keys","true");let p=h.toString();p&&(u+="?".concat(p));let g=await fetch(u,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!g.ok){let e=await g.json(),t=ov(e);throw m(t),Error(t)}let w=await g.json();return console.log("/team/list API Response:",w),w}catch(e){throw console.error("Failed to create key:",e),e}},eZ=async(e,t)=>{try{let o=s?"".concat(s,"/spend/users"):"/spend/users";console.log("in spendUsersCall:",o);let a=await fetch("".concat(o,"?user_id=").concat(t),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to get spend for user",e),e}},eq=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/user/request_model"):"/user/request_model",n=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({models:[t],user_id:o,justification:a})});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log(l),l}catch(e){throw console.error("Failed to create key:",e),e}},eH=async e=>{try{let t=s?"".concat(s,"/user/get_requests"):"/user/get_requests";console.log("in userGetRequesedtModelsCall:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log(a),a}catch(e){throw console.error("Failed to get requested models:",e),e}},eW=async(e,t,o)=>{try{let a=s?"".concat(s,"/user/daily/activity/aggregated"):"/user/daily/activity/aggregated",r=new URLSearchParams,n=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};r.append("start_date",n(t)),r.append("end_date",n(o));let l=r.toString();l&&(a+="?".concat(l));let c=await fetch(a,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},eY=async(e,t)=>{try{let o=s?"".concat(s,"/user/get_users?role=").concat(t):"/user/get_users?role=".concat(t);console.log("in userGetAllUsersCall:",o);let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to get requested models:",e),e}},eK=async e=>{try{let t=s?"".concat(s,"/user/available_roles"):"/user/available_roles",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("response from user/available_role",a),a}catch(e){throw e}},e$=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=s?"".concat(s,"/team/new"):"/team/new",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eQ=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=s?"".concat(s,"/credentials"):"/credentials",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eX=async e=>{try{let t=s?"".concat(s,"/credentials"):"/credentials";console.log("in credentialListCall");let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},e0=async(e,t,o)=>{try{let a=s?"".concat(s,"/credentials"):"/credentials";t?a+="/by_name/".concat(t):o&&(a+="/by_model/".concat(o)),console.log("in credentialListCall");let r=await fetch(a,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("/credentials API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e1=async(e,t)=>{try{let o=s?"".concat(s,"/credentials/").concat(t):"/credentials/".concat(t);console.log("in credentialDeleteCall:",t);let a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to delete key:",e),e}},e2=async(e,t,o)=>{try{if(console.log("Form Values in credentialUpdateCall:",o),o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let a=s?"".concat(s,"/credentials/").concat(t):"/credentials/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...o})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e4=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let o=s?"".concat(s,"/key/update"):"/key/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let r=await a.json();return console.log("Update key Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},e3=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let o=s?"".concat(s,"/team/update"):"/team/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw m(e),console.error("Error response from the server:",e),n.Z.fromBackend("Failed to update team settings: "+e),Error(e)}let r=await a.json();return console.log("Update Team Response:",r),r}catch(e){throw console.error("Failed to update team:",e),e}},e5=async(e,t,o)=>{try{console.log("Form Values in modelUpateCall:",t);let a=s?"".concat(s,"/model/").concat(o,"/update"):"/model/".concat(o,"/update"),r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw m(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("Update model Response:",n),n}catch(e){throw console.error("Failed to update model:",e),e}},e6=async(e,t)=>{try{console.log("Form Values in modelUpateCall:",t);let o=s?"".concat(s,"/model/update"):"/model/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.text();throw m(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let r=await a.json();return console.log("Update model Response:",r),r}catch(e){throw console.error("Failed to update model:",e),e}},e7=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let r=s?"".concat(s,"/team/member_add"):"/team/member_add",n=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:o})});if(!n.ok){var a;let e=await n.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(a=t.detail)||void 0===a?void 0:a.error)||"Failed to add team member",r=Error(o);throw r.raw=t,r}let l=await n.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},e9=async(e,t,o,a,r)=>{try{console.log("Bulk add team members:",{teamId:t,members:o,maxBudgetInTeam:a});let l=s?"".concat(s,"/team/bulk_member_add"):"/team/bulk_member_add",c={team_id:t};r?c.all_users=!0:c.members=o,null!=a&&(c.max_budget_in_team=a);let i=await fetch(l,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(c)});if(!i.ok){var n;let e=await i.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(n=t.detail)||void 0===n?void 0:n.error)||"Failed to bulk add team members",a=Error(o);throw a.raw=t,a}let d=await i.json();return console.log("Bulk team member add API Response:",d),d}catch(e){throw console.error("Failed to bulk add team members:",e),e}},e8=async(e,t,o)=>{try{console.log("Form Values in teamMemberUpdateCall:",o),console.log("Budget value:",o.max_budget_in_team),console.log("TPM limit:",o.tpm_limit),console.log("RPM limit:",o.rpm_limit);let r=s?"".concat(s,"/team/member_update"):"/team/member_update",n={team_id:t,role:o.role,user_id:o.user_id};void 0!==o.user_email&&(n.user_email=o.user_email),void 0!==o.max_budget_in_team&&null!==o.max_budget_in_team&&(n.max_budget_in_team=o.max_budget_in_team),void 0!==o.tpm_limit&&null!==o.tpm_limit&&(n.tpm_limit=o.tpm_limit),void 0!==o.rpm_limit&&null!==o.rpm_limit&&(n.rpm_limit=o.rpm_limit),console.log("Final request body:",n);let l=await fetch(r,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok){var a;let e=await l.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let o=(null==t?void 0:null===(a=t.detail)||void 0===a?void 0:a.error)||"Failed to add team member",r=Error(o);throw r.raw=t,r}let c=await l.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to update team member:",e),e}},te=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let a=s?"".concat(s,"/team/member_delete"):"/team/member_delete",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==o.user_email&&{user_email:o.user_email},...void 0!==o.user_id&&{user_id:o.user_id}})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},tt=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let a=s?"".concat(s,"/organization/member_add"):"/organization/member_add",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:o})});if(!r.ok){let e=await r.text();throw m(e),console.error("Error response from the server:",e),Error(e)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create organization member:",e),e}},to=async(e,t,o)=>{try{console.log("Form Values in organizationMemberDeleteCall:",o);let a=s?"".concat(s,"/organization/member_delete"):"/organization/member_delete",r=await fetch(a,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:o})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to delete organization member:",e),e}},ta=async(e,t,o)=>{try{console.log("Form Values in organizationMemberUpdateCall:",o);let a=s?"".concat(s,"/organization/member_update"):"/organization/member_update",r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...o})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to update organization member:",e),e}},tr=async(e,t,o)=>{try{console.log("Form Values in userUpdateUserCall:",t);let a=s?"".concat(s,"/user/update"):"/user/update",r={...t};null!==o&&(r.user_role=o),r=JSON.stringify(r);let n=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:r});if(!n.ok){let e=await n.json(),t=ov(e);throw m(t),Error(t)}let l=await n.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},tn=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{let r;console.log("Form Values in userUpdateUserCall:",t);let n=s?"".concat(s,"/user/bulk_update"):"/user/bulk_update";if(a)r=JSON.stringify({all_users:!0,user_updates:t});else if(o&&o.length>0){let e=[];for(let a of o)e.push({user_id:a,...t});r=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let l=await fetch(n,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:r});if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}let c=await l.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},tl=async(e,t)=>{try{let o=s?"".concat(s,"/global/predict/spend/logs"):"/global/predict/spend/logs",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({data:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},tc=async e=>{try{let t=s?"".concat(s,"/health/services?service=slack_budget_alerts"):"/health/services?service=slack_budget_alerts";console.log("Checking Slack Budget Alerts service health");let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error(e)}let a=await o.json();return n.Z.success("Test Slack Alert worked - check your Slack!"),console.log("Service Health Response:",a),a}catch(e){throw console.error("Failed to perform health check:",e),e}},ti=async(e,t)=>{try{let o=s?"".concat(s,"/health/services?service=").concat(t):"/health/services?service=".concat(t);console.log("Checking Slack Budget Alerts service health");let a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw m(e),Error(e)}return await a.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},ts=async e=>{try{let t=s?"".concat(s,"/budget/list"):"/budget/list",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},td=async e=>{try{let t=s?"".concat(s,"/budget/settings"):"/budget/settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tu=async(e,t,o)=>{try{let t=s?"".concat(s,"/get/config/callbacks"):"/get/config/callbacks",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},th=async e=>{try{let t=s?"".concat(s,"/config/list?config_type=general_settings"):"/config/list?config_type=general_settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tp=async e=>{try{let t=s?"".concat(s,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tg=async(e,t)=>{try{let o=s?"".concat(s,"/config/field/info?field_name=").concat(t):"/config/field/info?field_name=".concat(t),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tm=async(e,t,o)=>{try{let a=s?"".concat(s,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:o})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let l=await r.json();return n.Z.success("Successfully updated value!"),l}catch(e){throw console.error("Failed to set callbacks:",e),e}},tf=async(e,t)=>{try{let o=s?"".concat(s,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tw=async(e,t,o)=>{try{let a=s?"".concat(s,"/config/field/update"):"/config/field/update",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:o,config_type:"general_settings"})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let l=await r.json();return n.Z.success("Successfully updated value!"),l}catch(e){throw console.error("Failed to set callbacks:",e),e}},ty=async(e,t)=>{try{let o=s?"".concat(s,"/config/field/delete"):"/config/field/delete",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return n.Z.success("Field reset on proxy"),r}catch(e){throw console.error("Failed to get callbacks:",e),e}},tj=async(e,t)=>{try{let o=s?"".concat(s,"/config/pass_through_endpoint?endpoint_id=").concat(t):"/config/pass_through_endpoint?endpoint_id=".concat(t),a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async(e,t)=>{try{let o=s?"".concat(s,"/config/update"):"/config/update",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tC=async e=>{try{let t=s?"".concat(s,"/health"):"/health",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to call /health:",e),e}},tk=async(e,t)=>{try{let o=s?"".concat(s,"/health?model=").concat(encodeURIComponent(t)):"/health?model=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to call /health for model ".concat(t,":"),e),e}},tv=async e=>{try{let t=s?"".concat(s,"/cache/ping"):"/cache/ping",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tT=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;try{let n=s?"".concat(s,"/health/history"):"/health/history",l=new URLSearchParams;t&&l.append("model",t),o&&l.append("status_filter",o),l.append("limit",a.toString()),l.append("offset",r.toString()),l.toString()&&(n+="?".concat(l.toString()));let c=await fetch(n,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw m(e),Error(e)}return await c.json()}catch(e){throw console.error("Failed to call /health/history:",e),e}},tE=async e=>{try{let t=s?"".concat(s,"/health/latest"):"/health/latest",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tS=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",s);let t=s?"".concat(s,"/sso/get/ui_settings"):"/sso/get/ui_settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tb=async e=>{try{let t=s?"".concat(s,"/v2/guardrails/list"):"/v2/guardrails/list",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}},tF=async e=>{try{let t=s?"".concat(s,"/prompts/list"):"/prompts/list",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},tP=async(e,t)=>{try{let o=s?"".concat(s,"/prompts/").concat(t,"/info"):"/prompts/".concat(t,"/info"),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},tO=async(e,t)=>{try{let o=s?"".concat(s,"/prompts"):"/prompts",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},tB=async(e,t,o)=>{try{let a=s?"".concat(s,"/prompts/").concat(t):"/prompts/".concat(t),r=await fetch(a,{method:"PUT",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},tN=async(e,t)=>{try{let o=s?"".concat(s,"/prompts/").concat(t):"/prompts/".concat(t),a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},tx=async(e,t)=>{try{let o=new FormData;o.append("file",t);let a=s?"".concat(s,"/utils/dotprompt_json_converter"):"/utils/dotprompt_json_converter",r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e)},body:o});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},tG=async(e,t,o)=>{try{let a=s?"".concat(s,"/prompts/").concat(t):"/prompts/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to patch prompt:",e),e}},tJ=async(e,t)=>{try{let o=s?"".concat(s,"/guardrails"):"/guardrails",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!a.ok){let e=await a.text();throw m(e),Error(e)}let r=await a.json();return console.log("Create guardrail response:",r),r}catch(e){throw console.error("Failed to create guardrail:",e),e}},tA=async(e,t,o)=>{try{let a=s?"".concat(s,"/spend/logs/ui/").concat(t,"?start_date=").concat(encodeURIComponent(o)):"/spend/logs/ui/".concat(t,"?start_date=").concat(encodeURIComponent(o));console.log("Fetching log details from:",a);let r=await fetch(a,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("Fetched log details:",n),n}catch(e){throw console.error("Failed to fetch log details:",e),e}},tU=async e=>{try{let t=s?"".concat(s,"/get/internal_user_settings"):"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched SSO settings:",a),a}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},tR=async(e,t)=>{try{let o=s?"".concat(s,"/update/internal_user_settings"):"/update/internal_user_settings";console.log("Updating internal user settings:",t);let a=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw m(e),Error(e)}let r=await a.json();return console.log("Updated internal user settings:",r),n.Z.success("Internal user settings updated successfully"),r}catch(e){throw console.error("Failed to update internal user settings:",e),e}},tI=async e=>{try{let t=s?"".concat(s,"/v1/mcp/server"):"/v1/mcp/server";console.log("Fetching MCP servers from:",t);let o=await fetch(t,{method:h.GET,headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched MCP servers:",a),a}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},tM=async e=>{try{let t=s?"".concat(s,"/v1/mcp/access_groups"):"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let o=await fetch(t,{method:h.GET,headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched MCP access groups:",a),a.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},tz=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let o=s?"".concat(s,"/v1/mcp/server"):"/v1/mcp/server",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},tL=async(e,t)=>{try{let o=s?"".concat(s,"/v1/mcp/server"):"/v1/mcp/server",a=await fetch(o,{method:"PUT",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},tD=async(e,t)=>{try{let o=(s?"".concat(s):"")+"/v1/mcp/server/".concat(t);console.log("in deleteMCPServer:",t);let a=await fetch(o,{method:h.DELETE,headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},tV=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/mcp-rest/tools/list?server_id=").concat(t):"/mcp-rest/tools/list?server_id=".concat(t);console.log("Fetching MCP tools from:",r);let n={[f]:"Bearer ".concat(e),"Content-Type":"application/json"};a&&o?n["x-mcp-".concat(a,"-authorization")]=o:o&&(n[w]=o);let l=await fetch(r,{method:"GET",headers:n}),c=await l.json();if(console.log("Fetched MCP tools response:",c),!l.ok){if(c.error&&c.message)throw Error(c.message);throw Error("Failed to fetch MCP tools")}return c}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools"}}},tZ=async(e,t,o,a,r)=>{try{let n=s?"".concat(s,"/mcp-rest/tools/call"):"/mcp-rest/tools/call";console.log("Calling MCP tool:",t,"with arguments:",o);let l={[f]:"Bearer ".concat(e),"Content-Type":"application/json"};r?l["x-mcp-".concat(r,"-authorization")]=a:l[w]=a;let c=await fetch(n,{method:"POST",headers:l,body:JSON.stringify({name:t,arguments:o})});if(!c.ok){let e="Network response was not ok",t=null,o=await c.text();try{let a=JSON.parse(o);a.detail?"string"==typeof a.detail?e=a.detail:"object"==typeof a.detail&&(e=a.detail.message||a.detail.error||"An error occurred",t=a.detail):e=a.message||a.error||e}catch(t){console.error("Failed to parse JSON error response:",t),o&&(e=o)}let a=Error(e);throw a.status=c.status,a.statusText=c.statusText,a.details=t,m(e),a}let i=await c.json();return console.log("MCP tool call response:",i),i}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},tq=async(e,t)=>{try{let o=s?"".concat(s,"/tag/new"):"/tag/new",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();await m(e);return}return await a.json()}catch(e){throw console.error("Error creating tag:",e),e}},tH=async(e,t)=>{try{let o=s?"".concat(s,"/tag/update"):"/tag/update",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();await m(e);return}return await a.json()}catch(e){throw console.error("Error updating tag:",e),e}},tW=async(e,t)=>{try{let o=s?"".concat(s,"/tag/info"):"/tag/info",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({names:t})});if(!a.ok){let e=await a.text();return await m(e),{}}return await a.json()}catch(e){throw console.error("Error getting tag info:",e),e}},tY=async e=>{try{let t=s?"".concat(s,"/tag/list"):"/tag/list",o=await fetch(t,{method:"GET",headers:{Authorization:"Bearer ".concat(e)}});if(!o.ok){let e=await o.text();return await m(e),{}}return await o.json()}catch(e){throw console.error("Error listing tags:",e),e}},tK=async(e,t)=>{try{let o=s?"".concat(s,"/tag/delete"):"/tag/delete",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({name:t})});if(!a.ok){let e=await a.text();await m(e);return}return await a.json()}catch(e){throw console.error("Error deleting tag:",e),e}},t$=async e=>{try{let t=s?"".concat(s,"/get/default_team_settings"):"/get/default_team_settings";console.log("Fetching default team settings from:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched default team settings:",a),a}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},tQ=async(e,t)=>{try{let o=s?"".concat(s,"/update/default_team_settings"):"/update/default_team_settings";console.log("Updating default team settings:",t);let a=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("Updated default team settings:",r),n.Z.success("Default team settings updated successfully"),r}catch(e){throw console.error("Failed to update default team settings:",e),e}},tX=async(e,t)=>{try{let o=s?"".concat(s,"/team/permissions_list?team_id=").concat(t):"/team/permissions_list?team_id=".concat(t),a=await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("Team permissions response:",r),r}catch(e){throw console.error("Failed to get team permissions:",e),e}},t0=async(e,t,o)=>{try{let a=s?"".concat(s,"/team/permissions_update"):"/team/permissions_update",r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({team_id:t,team_member_permissions:o})});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let n=await r.json();return console.log("Team permissions response:",n),n}catch(e){throw console.error("Failed to update team permissions:",e),e}},t1=async(e,t)=>{try{let o=s?"".concat(s,"/spend/logs/session/ui?session_id=").concat(encodeURIComponent(t)):"/spend/logs/session/ui?session_id=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},t2=async(e,t)=>{try{let o=s?"".concat(s,"/vector_store/new"):"/vector_store/new",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to create vector store")}return await a.json()}catch(e){throw console.error("Error creating vector store:",e),e}},t4=async function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{let t=s?"".concat(s,"/vector_store/list"):"/vector_store/list",o=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to list vector stores")}return await o.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},t3=async(e,t)=>{try{let o=s?"".concat(s,"/vector_store/delete"):"/vector_store/delete",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({vector_store_id:t})});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to delete vector store")}return await a.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},t5=async(e,t)=>{try{let o=s?"".concat(s,"/vector_store/info"):"/vector_store/info",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({vector_store_id:t})});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to get vector store info")}return await a.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},t6=async(e,t)=>{try{let o=s?"".concat(s,"/vector_store/update"):"/vector_store/update",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify(t)});if(!a.ok){let e=await a.json();throw Error(e.detail||"Failed to update vector store")}return await a.json()}catch(e){throw console.error("Error updating vector store:",e),e}},t7=async e=>{try{let t=s?"".concat(s,"/email/event_settings"):"/email/event_settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error("Failed to get email event settings")}let a=await o.json();return console.log("Email event settings response:",a),a}catch(e){throw console.error("Failed to get email event settings:",e),e}},t9=async(e,t)=>{try{let o=s?"".concat(s,"/email/event_settings"):"/email/event_settings",a=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.text();throw m(e),Error("Failed to update email event settings")}let r=await a.json();return console.log("Update email event settings response:",r),r}catch(e){throw console.error("Failed to update email event settings:",e),e}},t8=async e=>{try{let t=s?"".concat(s,"/email/event_settings/reset"):"/email/event_settings/reset",o=await fetch(t,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error("Failed to reset email event settings")}let a=await o.json();return console.log("Reset email event settings response:",a),a}catch(e){throw console.error("Failed to reset email event settings:",e),e}},oe=async(e,t)=>{try{let o=s?"".concat(s,"/guardrails/").concat(t):"/guardrails/".concat(t),a=await fetch(o,{method:"DELETE",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw m(e),Error(e)}let r=await a.json();return console.log("Delete guardrail response:",r),r}catch(e){throw console.error("Failed to delete guardrail:",e),e}},ot=async e=>{try{let t=s?"".concat(s,"/guardrails/ui/add_guardrail_settings"):"/guardrails/ui/add_guardrail_settings",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error("Failed to get guardrail UI settings")}let a=await o.json();return console.log("Guardrail UI settings response:",a),a}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},oo=async e=>{try{let t=s?"".concat(s,"/guardrails/ui/provider_specific_params"):"/guardrails/ui/provider_specific_params",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw m(e),Error("Failed to get guardrail provider specific parameters")}let a=await o.json();return console.log("Guardrail provider specific params response:",a),a}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},oa=async(e,t)=>{try{let o=s?"".concat(s,"/guardrails/").concat(t,"/info"):"/guardrails/".concat(t,"/info"),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.text();throw m(e),Error("Failed to get guardrail info")}let r=await a.json();return console.log("Guardrail info response:",r),r}catch(e){throw console.error("Failed to get guardrail info:",e),e}},or=async(e,t,o)=>{try{let a=s?"".concat(s,"/guardrails/").concat(t):"/guardrails/".concat(t),r=await fetch(a,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.text();throw m(e),Error("Failed to update guardrail")}let n=await r.json();return console.log("Update guardrail response:",n),n}catch(e){throw console.error("Failed to update guardrail:",e),e}},on=async e=>{try{let t=s?"".concat(s,"/get/sso_settings"):"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}let a=await o.json();return console.log("Fetched SSO configuration:",a),a}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},ol=async(e,t)=>{try{let o=s?"".concat(s,"/update/sso_settings"):"/update/sso_settings";console.log("Updating SSO configuration:",t);let a=await fetch(o,{method:"PATCH",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=await a.json();return console.log("Updated SSO configuration:",r),r}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},oc=async(e,t,o,a,r)=>{try{let t=s?"".concat(s,"/audit"):"/audit",o=new URLSearchParams;a&&o.append("page",a.toString()),r&&o.append("page_size",r.toString());let n=o.toString();n&&(t+="?".concat(n));let l=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=ov(e);throw m(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},oi=async e=>{try{let t=s?"".concat(s,"/user/available_users"):"/user/available_users",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e)}});if(!o.ok){if(404===o.status)return null;let e=await o.text();throw m(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},os=async(e,t,o)=>{try{let a=s?"".concat(s,"/config/pass_through_endpoint/").concat(encodeURIComponent(t)):"/config/pass_through_endpoint/".concat(encodeURIComponent(t)),r=await fetch(a,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!r.ok){let e=await r.json(),t=ov(e);throw m(t),Error(t)}let l=await r.json();return n.Z.success("Pass through endpoint updated successfully"),l}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},od=async(e,t)=>{try{let o=s?"".concat(s,"/config/pass_through_endpoint?endpoint_id=").concat(encodeURIComponent(t)):"/config/pass_through_endpoint?endpoint_id=".concat(encodeURIComponent(t)),a=await fetch(o,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}let r=(await a.json()).endpoints;if(!r||0===r.length)throw Error("Pass through endpoint not found");return r[0]}catch(e){throw console.error("Failed to get pass through endpoint info:",e),e}},ou=async(e,t)=>{try{let o=s?"".concat(s,"/config/callback/delete"):"/config/callback/delete",a=await fetch(o,{method:"POST",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!a.ok){let e=await a.json(),t=ov(e);throw m(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},oh=async e=>{let t=u(),o=await fetch("".concat(t,"/v1/mcp/tools"),{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw Error("HTTP error! status: ".concat(o.status));return await o.json()},op=async(e,t)=>{try{console.log("Testing MCP connection with config:",JSON.stringify(t));let a=s?"".concat(s,"/mcp-rest/test/connection"):"/mcp-rest/test/connection",r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",[f]:"Bearer ".concat(e)},body:JSON.stringify(t)}),n=r.headers.get("content-type");if(!n||!n.includes("application/json")){let e=await r.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(r.status,": ").concat(r.statusText,"). Check network tab for details."))}let l=await r.json();if(!r.ok||"error"===l.status){if("error"===l.status);else{var o;return{status:"error",message:(null===(o=l.error)||void 0===o?void 0:o.message)||"MCP connection test failed: ".concat(r.status," ").concat(r.statusText)}}}return l}catch(e){throw console.error("MCP connection test error:",e),e}},og=async(e,t)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=s?"".concat(s,"/mcp-rest/test/tools/list"):"/mcp-rest/test/tools/list",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[f]:"Bearer ".concat(e)},body:JSON.stringify(t)}),r=a.headers.get("content-type");if(!r||!r.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(a.status,": ").concat(a.statusText,"). Check network tab for details."))}let n=await a.json();if((!a.ok||n.error)&&!n.error)return{tools:[],error:"request_failed",message:n.message||"MCP tools list failed: ".concat(a.status," ").concat(a.statusText)};return n}catch(e){throw console.error("MCP tools list test error:",e),e}},om=async(e,t,o)=>{try{let a="".concat(u(),"/v1/vector_stores/").concat(t,"/search"),r=await fetch(a,{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({query:o})});if(!r.ok){let e=await r.text();return await m(e),null}return await r.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},of=async function(e,t,o){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:50,n=arguments.length>5?arguments[5]:void 0;try{let l=s?"".concat(s,"/tag/user-agent/analytics"):"/tag/user-agent/analytics",c=new URLSearchParams,i=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};c.append("start_date",i(t)),c.append("end_date",i(o)),c.append("page",a.toString()),c.append("page_size",r.toString()),n&&c.append("user_agent_filter",n);let d=c.toString();d&&(l+="?".concat(d));let u=await fetch(l,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=ov(e);throw m(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch user agent analytics:",e),e}},ow=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/tag/dau"):"/tag/dau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let l=n.toString();l&&(r+="?".concat(l));let c=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},oy=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/tag/wau"):"/tag/wau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let l=n.toString();l&&(r+="?".concat(l));let c=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},oj=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/tag/mau"):"/tag/mau",n=new URLSearchParams;n.append("end_date",(e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)})(t)),a&&a.length>0?a.forEach(e=>{n.append("tag_filters",e)}):o&&n.append("tag_filter",o);let l=n.toString();l&&(r+="?".concat(l));let c=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},o_=async e=>{try{let t=s?"".concat(s,"/tag/distinct"):"/tag/distinct",o=await fetch(t,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=ov(e);throw m(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},oC=async(e,t,o,a)=>{try{let r=s?"".concat(s,"/tag/summary"):"/tag/summary",n=new URLSearchParams,l=e=>{let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(o,"-").concat(a)};n.append("start_date",l(t)),n.append("end_date",l(o)),a&&a.length>0&&a.forEach(e=>{n.append("tag_filters",e)});let c=n.toString();c&&(r+="?".concat(c));let i=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=ov(e);throw m(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},ok=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,a=arguments.length>3?arguments[3]:void 0;try{let r=s?"".concat(s,"/tag/user-agent/per-user-analytics"):"/tag/user-agent/per-user-analytics",n=new URLSearchParams;n.append("page",t.toString()),n.append("page_size",o.toString()),a&&a.length>0&&a.forEach(e=>{n.append("tag_filters",e)});let l=n.toString();l&&(r+="?".concat(l));let c=await fetch(r,{method:"GET",headers:{[f]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=ov(e);throw m(t),Error(t)}return await c.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},ov=e=>(null==e?void 0:e.error)&&(e.error.message||e.error)||(null==e?void 0:e.message)||(null==e?void 0:e.detail)||(null==e?void 0:e.error)||JSON.stringify(e)},85968:function(e,t,o){o.d(t,{O:function(){return a}});let a=e=>{if(!e)return"An unknown error occurred";if("string"==typeof e)return e;if(e.message)try{let t=JSON.parse(e.message);if(t.error&&t.error.message)return t.error.message;return"string"==typeof t?t:JSON.stringify(t,null,2)}catch(t){return e.message}if(e.response&&e.response.data){if("string"==typeof e.response.data)return e.response.data;if(e.response.data.message)return e.response.data.message;if(e.response.data.error)return"string"==typeof e.response.data.error?e.response.data.error:e.response.data.error.message||JSON.stringify(e.response.data.error)}return String(e)}},3914:function(e,t,o){function a(){let e=window.location.hostname,t=["Lax","Strict","None"];["/","/ui"].forEach(o=>{document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,";"),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; domain=").concat(e,";"),t.forEach(t=>{let a="None"===t?" Secure;":"";document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; SameSite=").concat(t,";").concat(a),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(o,"; domain=").concat(e,"; SameSite=").concat(t,";").concat(a)})}),console.log("After clearing cookies:",document.cookie)}function r(e){let t=document.cookie.split("; ").find(t=>t.startsWith(e+"="));return t?t.split("=")[1]:null}o.d(t,{b:function(){return a},e:function(){return r}})}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/162-714ca0ed10a07f66.js b/litellm/proxy/_experimental/out/_next/static/chunks/162-714ca0ed10a07f66.js
new file mode 100644
index 00000000000..be51aa66580
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/162-714ca0ed10a07f66.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[162],{36724:function(e,t,n){n.d(t,{Dx:function(){return i.Z},Zb:function(){return s.Z},xv:function(){return r.Z},zx:function(){return a.Z}});var a=n(20831),s=n(12514),r=n(84264),i=n(96761)},19130:function(e,t,n){n.d(t,{RM:function(){return s.Z},SC:function(){return l.Z},iA:function(){return a.Z},pj:function(){return r.Z},ss:function(){return i.Z},xs:function(){return o.Z}});var a=n(21626),s=n(97214),r=n(28241),i=n(58834),o=n(69552),l=n(71876)},88658:function(e,t,n){n.d(t,{L:function(){return s}});var a=n(49817);let s=e=>{let t;let{apiKeySource:n,accessToken:s,apiKey:r,inputMessage:i,chatHistory:o,selectedTags:l,selectedVectorStores:c,selectedGuardrails:d,endpointType:m,selectedModel:p,selectedSdk:u}=e,g="session"===n?s:r,x=window.location.origin,h=i||"Your prompt here",f=h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),_=o.filter(e=>!e.isImage).map(e=>{let{role:t,content:n}=e;return{role:t,content:n}}),b={};l.length>0&&(b.tags=l),c.length>0&&(b.vector_stores=c),d.length>0&&(b.guardrails=d);let v=p||"your-model-name",j="azure"===u?'import openai\n\nclient = openai.AzureOpenAI(\n api_key="'.concat(g||"YOUR_LITELLM_API_KEY",'",\n azure_endpoint="').concat(x,'",\n api_version="2024-02-01"\n)'):'import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(g||"YOUR_LITELLM_API_KEY",'",\n base_url="').concat(x,'"\n)');switch(m){case a.KP.CHAT:{let e=Object.keys(b).length>0,n="";if(e){let e=JSON.stringify({metadata:b},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=_.length>0?_:[{role:"user",content:h}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.chat.completions.create(\n model="'.concat(v,'",\n messages=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.chat.completions.create(\n# model="').concat(v,'",\n# messages=[\n# {\n# "role": "user",\n# "content": [\n# {\n# "type": "text",\n# "text": "').concat(f,'"\n# },\n# {\n# "type": "image_url",\n# "image_url": {\n# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file}\n# }\n# }\n# ]\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file)\n");break}case a.KP.RESPONSES:{let e=Object.keys(b).length>0,n="";if(e){let e=JSON.stringify({metadata:b},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=_.length>0?_:[{role:"user",content:h}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.responses.create(\n model="'.concat(v,'",\n input=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response.output_text)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.responses.create(\n# model="').concat(v,'",\n# input=[\n# {\n# "role": "user",\n# "content": [\n# {"type": "input_text", "text": "').concat(f,'"},\n# {\n# "type": "input_image",\n# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file}\n# },\n# ],\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file.output_text)\n");break}case a.KP.IMAGE:t="azure"===u?"\n# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI.\n# This snippet uses 'client.images.generate' and will create a new image based on your prompt.\n# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context.\nimport os\nimport requests\nimport json\nimport time\nfrom PIL import Image\n\nresult = client.images.generate(\n model=\"".concat(v,'",\n prompt="').concat(i,'",\n n=1\n)\n\njson_response = json.loads(result.model_dump_json())\n\n# Set the directory for the stored image\nimage_dir = os.path.join(os.curdir, \'images\')\n\n# If the directory doesn\'t exist, create it\nif not os.path.isdir(image_dir):\n os.mkdir(image_dir)\n\n# Initialize the image path\nimage_filename = f"generated_image_{int(time.time())}.png"\nimage_path = os.path.join(image_dir, image_filename)\n\ntry:\n # Retrieve the generated image\n if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"):\n image_url = json_response["data"][0]["url"]\n generated_image = requests.get(image_url).content\n with open(image_path, "wb") as image_file:\n image_file.write(generated_image)\n\n print(f"Image saved to {image_path}")\n # Display the image\n image = Image.open(image_path)\n image.show()\n else:\n print("Could not find image URL in response.")\n print("Full response:", json_response)\nexcept Exception as e:\n print(f"An error occurred: {e}")\n print("Full response:", json_response)\n'):"\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.IMAGE_EDITS:t="azure"===u?'\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# The prompt entered by the user\nprompt = "'.concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n'):"\nimport base64\nimport os\nimport time\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;default:t="\n# Code generation for this endpoint is not implemented yet."}return"".concat(j,"\n").concat(t)}},49817:function(e,t,n){var a,s,r,i;n.d(t,{KP:function(){return s},vf:function(){return l}}),(r=a||(a={})).IMAGE_GENERATION="image_generation",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",(i=s||(s={})).IMAGE="image",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages";let o={image_generation:"image",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages"},l=e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=o[e];return console.log("endpointType:",t),t}return"chat"}},29488:function(e,t,n){n.d(t,{Hc:function(){return i},Ui:function(){return r},e4:function(){return o},xd:function(){return l}});let a="litellm_mcp_auth_tokens",s=()=>{try{let e=localStorage.getItem(a);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading MCP auth tokens from localStorage:",e),{}}},r=(e,t)=>{try{let n=s()[e];if(n&&n.serverAlias===t||n&&!t&&!n.serverAlias)return n.authValue;return null}catch(e){return console.error("Error getting MCP auth token:",e),null}},i=(e,t,n,r)=>{try{let i=s();i[e]={serverId:e,serverAlias:r,authValue:t,authType:n,timestamp:Date.now()},localStorage.setItem(a,JSON.stringify(i))}catch(e){console.error("Error storing MCP auth token:",e)}},o=e=>{try{let t=s();delete t[e],localStorage.setItem(a,JSON.stringify(t))}catch(e){console.error("Error removing MCP auth token:",e)}},l=()=>{try{localStorage.removeItem(a)}catch(e){console.error("Error clearing MCP auth tokens:",e)}}},8048:function(e,t,n){n.d(t,{C:function(){return m}});var a=n(57437),s=n(71594),r=n(24525),i=n(2265),o=n(19130),l=n(44633),c=n(86462),d=n(49084);function m(e){let{data:t=[],columns:n,isLoading:m=!1,table:p,defaultSorting:u=[]}=e,[g,x]=i.useState(u),[h]=i.useState("onChange"),[f,_]=i.useState({}),[b,v]=i.useState({}),j=(0,s.b7)({data:t,columns:n,state:{sorting:g,columnSizing:f,columnVisibility:b},columnResizeMode:h,onSortingChange:x,onColumnSizingChange:_,onColumnVisibilityChange:v,getCoreRowModel:(0,r.sC)(),getSortedRowModel:(0,r.tj)(),enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return i.useEffect(()=>{p&&(p.current=j)},[j,p]),(0,a.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("div",{className:"relative min-w-full",children:(0,a.jsxs)(o.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,a.jsx)(o.ss,{children:j.getHeaderGroups().map(e=>(0,a.jsx)(o.SC,{children:e.headers.map(e=>{var t;return(0,a.jsxs)(o.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,s.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,a.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,a.jsx)(l.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,a.jsx)(c.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,a.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,a.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,a.jsx)(o.RM,{children:m?(0,a.jsx)(o.SC,{children:(0,a.jsx)(o.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):j.getRowModel().rows.length>0?j.getRowModel().rows.map(e=>(0,a.jsx)(o.SC,{children:e.getVisibleCells().map(e=>{var t;return(0,a.jsx)(o.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,s.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,a.jsx)(o.SC,{children:(0,a.jsx)(o.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"No models found"})})})})})]})})})})}},65373:function(e,t,n){n.d(t,{Z:function(){return v}});var a=n(57437),s=n(27648),r=n(2265),i=n(89970),o=n(80795),l=n(19250),c=n(15883),d=n(46346),m=n(57400),p=n(91870),u=n(40428),g=n(83884),x=n(45524),h=n(3914);let f=async e=>{if(!e)return null;try{return await (0,l.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};var _=n(69734),b=n(29488),v=e=>{let{userID:t,userEmail:n,userRole:v,premiumUser:j,proxySettings:y,setProxySettings:N,accessToken:w,isPublicPage:A=!1,sidebarCollapsed:I=!1,onToggleSidebar:S}=e,k=(0,l.getProxyBaseUrl)(),[C,E]=(0,r.useState)(""),{logoUrl:M}=(0,_.F)();(0,r.useEffect)(()=>{(async()=>{if(w){let e=await f(w);console.log("response from fetchProxySettings",e),e&&N(e)}})()},[w]),(0,r.useEffect)(()=>{E((null==y?void 0:y.PROXY_LOGOUT_URL)||"")},[y]);let O=[{key:"user-info",label:(0,a.jsxs)("div",{className:"px-3 py-3 border-b border-gray-100",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(c.Z,{className:"mr-2 text-gray-700"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:t})]}),j?(0,a.jsx)(i.Z,{title:"Premium User",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gradient-to-r from-amber-500 to-yellow-500 text-white px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Premium"})]})}):(0,a.jsx)(i.Z,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Standard"})]})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(m.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Role"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium",children:v})]}),(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(p.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Email"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium truncate max-w-[150px]",title:n||"Unknown",children:n||"Unknown"})]})]})]})},{key:"logout",label:(0,a.jsxs)("div",{className:"flex items-center py-2 px-3 hover:bg-gray-50 rounded-md mx-1 my-1",onClick:()=>{(0,h.b)(),(0,b.xd)(),window.location.href=C},children:[(0,a.jsx)(u.Z,{className:"mr-3 text-gray-600"}),(0,a.jsx)("span",{className:"text-gray-800",children:"Logout"})]})}];return(0,a.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)("div",{className:"flex items-center h-14 px-4",children:[" ",(0,a.jsxs)("div",{className:"flex items-center flex-shrink-0",children:[S&&(0,a.jsx)("button",{onClick:S,className:"flex items-center justify-center w-10 h-10 mr-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded transition-colors",title:I?"Expand sidebar":"Collapse sidebar",children:(0,a.jsx)("span",{className:"text-lg",children:I?(0,a.jsx)(g.Z,{}):(0,a.jsx)(x.Z,{})})}),(0,a.jsx)(s.default,{href:"/",className:"flex items-center",children:(0,a.jsx)("img",{src:M||"".concat(k,"/get_image"),alt:"LiteLLM Brand",className:"h-10 w-auto"})})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-gray-600 hover:text-gray-900 transition-colors",children:"Docs"}),!A&&(0,a.jsx)(o.Z,{menu:{items:O,className:"min-w-[200px]",style:{padding:"8px",marginTop:"8px",borderRadius:"12px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.08)"}},overlayStyle:{minWidth:"200px"},children:(0,a.jsxs)("button",{className:"inline-flex items-center text-sm text-gray-600 hover:text-gray-900 transition-colors",children:["User",(0,a.jsx)("svg",{className:"ml-1 w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 9l-7 7-7-7"})})]})})]})]})})})}},42673:function(e,t,n){var a,s;n.d(t,{Cl:function(){return a},bK:function(){return d},cd:function(){return o},dr:function(){return l},fK:function(){return r},ph:function(){return c}}),n(2265),(s=a||(a={})).AIML="AI/ML API",s.Bedrock="Amazon Bedrock",s.Anthropic="Anthropic",s.AssemblyAI="AssemblyAI",s.SageMaker="AWS SageMaker",s.Azure="Azure",s.Azure_AI_Studio="Azure AI Foundry (Studio)",s.Cerebras="Cerebras",s.Cohere="Cohere",s.Databricks="Databricks",s.DeepInfra="DeepInfra",s.Deepgram="Deepgram",s.Deepseek="Deepseek",s.ElevenLabs="ElevenLabs",s.FireworksAI="Fireworks AI",s.Google_AI_Studio="Google AI Studio",s.GradientAI="GradientAI",s.Groq="Groq",s.Hosted_Vllm="vllm",s.JinaAI="Jina AI",s.MistralAI="Mistral AI",s.Ollama="Ollama",s.OpenAI="OpenAI",s.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",s.OpenAI_Text="OpenAI Text Completion",s.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",s.Openrouter="Openrouter",s.Perplexity="Perplexity",s.Sambanova="Sambanova",s.TogetherAI="TogetherAI",s.Triton="Triton",s.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",s.VolcEngine="VolcEngine",s.Voyage="Voyage AI",s.xAI="xAI";let r={AIML:"aiml",OpenAI:"openai",OpenAI_Text:"text-completion-openai",Azure:"azure",Azure_AI_Studio:"azure_ai",Anthropic:"anthropic",Google_AI_Studio:"gemini",Bedrock:"bedrock",Groq:"groq",MistralAI:"mistral",Cohere:"cohere",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm"},i="/ui/assets/logos/",o={"AI/ML API":"".concat(i,"aiml_api.svg"),Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),Databricks:"".concat(i,"databricks.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),vllm:"".concat(i,"vllm.png"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},l=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:o[e],displayName:e}}let t=Object.keys(r).find(t=>r[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=a[t];return{logo:o[n],displayName:n}},c=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"azure/my-deployment";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else return"gpt-3.5-turbo"},d=(e,t)=>{console.log("Provider key: ".concat(e));let n=r[e];console.log("Provider mapped to: ".concat(n));let a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(e=>{let[t,s]=e;null!==s&&"object"==typeof s&&"litellm_provider"in s&&(s.litellm_provider===n||s.litellm_provider.includes(n))&&a.push(t)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"cohere_chat"===n.litellm_provider&&a.push(t)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"sagemaker_chat"===n.litellm_provider&&a.push(t)}))),a}},72162:function(e,t,n){var a=n(57437),s=n(2265),r=n(19250),i=n(8048),o=n(36724),l=n(89970),c=n(3810),d=n(52787),m=n(82680),p=n(3477),u=n(17732),g=n(33245),x=n(78867),h=n(88658),f=n(49817),_=n(42673),b=n(65373),v=n(69734),j=n(9114);t.Z=e=>{var t,n;let{accessToken:y}=e,[N,w]=(0,s.useState)(null),[A,I]=(0,s.useState)("LiteLLM Gateway"),[S,k]=(0,s.useState)(null),[C,E]=(0,s.useState)(""),[M,O]=(0,s.useState)({}),[T,D]=(0,s.useState)(!0),[z,P]=(0,s.useState)(""),[L,Z]=(0,s.useState)([]),[G,R]=(0,s.useState)([]),[H,F]=(0,s.useState)([]),[K,V]=(0,s.useState)("I'm alive! ✓"),[U,W]=(0,s.useState)(!1),[q,J]=(0,s.useState)(null),[B,Y]=(0,s.useState)({}),$=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=async()=>{try{D(!0);let e=await (0,r.modelHubPublicModelsCall)();console.log("ModelHubData:",e),w(e)}catch(e){console.error("There was an error fetching the public model data",e),V("Service unavailable")}finally{D(!1)}};(async()=>{let e=await (0,r.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),I(e.docs_title),k(e.custom_docs_description),E(e.litellm_version),O(e.useful_links||{})})(),e()},[]),(0,s.useEffect)(()=>{},[z,L,G,H]);let X=(0,s.useMemo)(()=>{if(!N)return[];let e=N;if(z.trim()){let t=z.toLowerCase(),n=t.split(/\s+/),a=N.filter(e=>{let a=e.model_group.toLowerCase();return!!a.includes(t)||n.every(e=>a.includes(e))});a.length>0&&(e=a.sort((e,n)=>{let a=e.model_group.toLowerCase(),s=n.model_group.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,o=a.startsWith(t)?100:0,l=s.startsWith(t)?100:0,c=t.split(/\s+/).every(e=>a.includes(e))?50:0,d=t.split(/\s+/).every(e=>s.includes(e))?50:0,m=a.length;return i+l+d+(1e3-s.length)-(r+o+c+(1e3-m))}))}return e.filter(e=>{let t=0===L.length||L.some(t=>e.providers.includes(t)),n=0===G.length||G.includes(e.mode||""),a=0===H.length||Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).some(e=>{let[t]=e,n=t.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return H.includes(n)});return t&&n&&a})},[N,z,L,G,H]),Q=e=>{J(e),W(!0)},ee=e=>{navigator.clipboard.writeText(e),j.Z.success("Copied to clipboard!")},et=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),en=e=>Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return t}),ea=e=>"$".concat((1e6*e).toFixed(4)),es=e=>e?e>=1e3?"".concat((e/1e3).toFixed(0),"K"):e.toString():"N/A",er=(e,t)=>{let n=[];return e&&n.push("RPM: ".concat(e.toLocaleString())),t&&n.push("TPM: ".concat(t.toLocaleString())),n.length>0?n.join(", "):"N/A"};return(0,a.jsx)(v.f,{accessToken:y,children:(0,a.jsxs)("div",{className:"min-h-screen bg-white",children:[(0,a.jsx)(b.Z,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:Y,proxySettings:B,accessToken:y||null,isPublicPage:!0}),(0,a.jsxs)("div",{className:"w-full px-8 py-12",children:[(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,a.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:S||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,a.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"w-4 h-4 mr-2",children:"\uD83D\uDD27"}),"Built with litellm: v",C]})})]}),M&&Object.keys(M).length>0&&(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(M||{}).map(e=>{let[t,n]=e;return(0,a.jsxs)("button",{onClick:()=>window.open(n,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,a.jsx)(p.Z,{className:"w-4 h-4"}),(0,a.jsx)(o.xv,{className:"text-sm font-medium",children:t})]},t)})})]}),(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,a.jsxs)(o.xv,{className:"text-green-600 font-medium text-sm",children:["Service status: ",K]})})]}),(0,a.jsxs)(o.Zb,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,a.jsx)(l.Z,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,a.jsx)(g.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(u.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:z,onChange:e=>P(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,a.jsx)(d.default,{mode:"multiple",value:L,onChange:e=>Z(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,_.dr)(e.value);return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,a.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e.label})]})},children:N&&(e=>{let t=new Set;return e.forEach(e=>{e.providers.forEach(e=>t.add(e))}),Array.from(t)})(N).map(e=>(0,a.jsx)(d.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,a.jsx)(d.default,{mode:"multiple",value:G,onChange:e=>R(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:N&&(e=>{let t=new Set;return e.forEach(e=>{e.mode&&t.add(e.mode)}),Array.from(t)})(N).map(e=>(0,a.jsx)(d.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,a.jsx)(d.default,{mode:"multiple",value:H,onChange:e=>F(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:N&&(e=>{let t=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).forEach(e=>{let[n]=e,a=n.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.add(a)})}),Array.from(t).sort()})(N).map(e=>(0,a.jsx)(d.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(i.C,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(l.Z,{title:t.original.model_group,children:(0,a.jsx)(o.zx,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>Q(t.original),children:t.original.model_group})})})},size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.providers;return(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>{let{logo:t}=(0,_.dr)(e);return(0,a.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.mode;return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(e=>{switch(null==e?void 0:e.toLowerCase()){case"chat":return"\uD83D\uDCAC";case"rerank":return"\uD83D\uDD04";case"embedding":return"\uD83D\uDCC4";default:return"\uD83E\uDD16"}})(n||"")}),(0,a.jsx)(o.xv,{children:n||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(o.xv,{className:"text-center",children:es(t.original.max_input_tokens)})},size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(o.xv,{className:"text-center",children:es(t.original.max_output_tokens)})},size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.input_cost_per_token;return(0,a.jsx)(o.xv,{className:"text-center",children:n?ea(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.output_cost_per_token;return(0,a.jsx)(o.xv,{className:"text-center",children:n?ea(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:e=>{let{row:t}=e,n=Object.entries(t.original).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return et(t)});return 0===n.length?(0,a.jsx)(o.xv,{className:"text-gray-400",children:"-"}):1===n.length?(0,a.jsx)("div",{className:"h-6 flex items-center",children:(0,a.jsx)(c.Z,{color:"blue",className:"text-xs",children:n[0]})}):(0,a.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,a.jsx)(c.Z,{color:"blue",className:"text-xs",children:n[0]}),(0,a.jsx)(l.Z,{title:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"All Features:"}),n.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,a.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",n.length-1]})})]})},size:120},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original;return(0,a.jsx)(o.xv,{className:"text-xs text-gray-600",children:er(n.rpm,n.tpm)})},size:150}],data:X,isLoading:T,table:$,defaultSorting:[{id:"model_group",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(o.xv,{className:"text-sm text-gray-600",children:["Showing ",X.length," of ",(null==N?void 0:N.length)||0," models"]})})]})]}),(0,a.jsx)(m.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==q?void 0:q.model_group)||"Model Details"}),q&&(0,a.jsx)(l.Z,{title:"Copy model name",children:(0,a.jsx)(x.Z,{onClick:()=>ee(q.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:U,footer:null,onOk:()=>{W(!1),J(null)},onCancel:()=>{W(!1),J(null)},children:q&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Model Name:"}),(0,a.jsx)(o.xv,{children:q.model_group})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Mode:"}),(0,a.jsx)(o.xv,{children:q.mode||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Providers:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:q.providers.map(e=>{let{logo:t}=(0,_.dr)(e);return(0,a.jsx)(c.Z,{color:"blue",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),q.model_group.includes("*")&&(0,a.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,a.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,a.jsx)(g.Z,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,a.jsxs)(o.xv,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,a.jsxs)(o.xv,{className:"text-sm text-blue-800",children:["For example, with ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:q.model_group}),", you can use any string (",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:q.model_group.replace("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Max Input Tokens:"}),(0,a.jsx)(o.xv,{children:(null===(t=q.max_input_tokens)||void 0===t?void 0:t.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Max Output Tokens:"}),(0,a.jsx)(o.xv,{children:(null===(n=q.max_output_tokens)||void 0===n?void 0:n.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,a.jsx)(o.xv,{children:q.input_cost_per_token?ea(q.input_cost_per_token):"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,a.jsx)(o.xv,{children:q.output_cost_per_token?ea(q.output_cost_per_token):"Not specified"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=en(q),t=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,a.jsx)(o.xv,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,n)=>(0,a.jsx)(c.Z,{color:t[n%t.length],children:et(e)},e))})()})]}),(q.tpm||q.rpm)&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[q.tpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Tokens per Minute:"}),(0,a.jsx)(o.xv,{children:q.tpm.toLocaleString()})]}),q.rpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Requests per Minute:"}),(0,a.jsx)(o.xv,{children:q.rpm.toLocaleString()})]})]})]}),q.supported_openai_params&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:q.supported_openai_params.map(e=>(0,a.jsx)(c.Z,{color:"green",children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-sm",children:(0,h.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],endpointType:(0,f.vf)(q.mode||"chat"),selectedModel:q.model_group,selectedSdk:"openai"})})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ee((0,h.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],endpointType:(0,f.vf)(q.mode||"chat"),selectedModel:q.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})})]})})}},69734:function(e,t,n){n.d(t,{F:function(){return o},f:function(){return l}});var a=n(57437),s=n(2265),r=n(19250);let i=(0,s.createContext)(void 0),o=()=>{let e=(0,s.useContext)(i);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},l=e=>{let{children:t,accessToken:n}=e,[o,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{(async()=>{if(n)try{let t=(0,r.getProxyBaseUrl)(),a=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(a.ok){var e;let t=await a.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&l(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[n]),(0,a.jsx)(i.Provider,{value:{logoUrl:o,setLogoUrl:l},children:t})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/162-8e70dcd28bbbec09.js b/litellm/proxy/_experimental/out/_next/static/chunks/162-8e70dcd28bbbec09.js
deleted file mode 100644
index 2e634539d56..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/162-8e70dcd28bbbec09.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[162],{36724:function(e,t,n){n.d(t,{Dx:function(){return i.Z},Zb:function(){return s.Z},xv:function(){return r.Z},zx:function(){return a.Z}});var a=n(20831),s=n(12514),r=n(84264),i=n(96761)},19130:function(e,t,n){n.d(t,{RM:function(){return s.Z},SC:function(){return l.Z},iA:function(){return a.Z},pj:function(){return r.Z},ss:function(){return i.Z},xs:function(){return o.Z}});var a=n(21626),s=n(97214),r=n(28241),i=n(58834),o=n(69552),l=n(71876)},88658:function(e,t,n){n.d(t,{L:function(){return s}});var a=n(49817);let s=e=>{let t;let{apiKeySource:n,accessToken:s,apiKey:r,inputMessage:i,chatHistory:o,selectedTags:l,selectedVectorStores:c,selectedGuardrails:d,endpointType:m,selectedModel:p,selectedSdk:u}=e,g="session"===n?s:r,x=window.location.origin,h=i||"Your prompt here",f=h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),_=o.filter(e=>!e.isImage).map(e=>{let{role:t,content:n}=e;return{role:t,content:n}}),b={};l.length>0&&(b.tags=l),c.length>0&&(b.vector_stores=c),d.length>0&&(b.guardrails=d);let v=p||"your-model-name",j="azure"===u?'import openai\n\nclient = openai.AzureOpenAI(\n api_key="'.concat(g||"YOUR_LITELLM_API_KEY",'",\n azure_endpoint="').concat(x,'",\n api_version="2024-02-01"\n)'):'import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(g||"YOUR_LITELLM_API_KEY",'",\n base_url="').concat(x,'"\n)');switch(m){case a.KP.CHAT:{let e=Object.keys(b).length>0,n="";if(e){let e=JSON.stringify({metadata:b},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=_.length>0?_:[{role:"user",content:h}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.chat.completions.create(\n model="'.concat(v,'",\n messages=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.chat.completions.create(\n# model="').concat(v,'",\n# messages=[\n# {\n# "role": "user",\n# "content": [\n# {\n# "type": "text",\n# "text": "').concat(f,'"\n# },\n# {\n# "type": "image_url",\n# "image_url": {\n# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file}\n# }\n# }\n# ]\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file)\n");break}case a.KP.RESPONSES:{let e=Object.keys(b).length>0,n="";if(e){let e=JSON.stringify({metadata:b},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=_.length>0?_:[{role:"user",content:h}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.responses.create(\n model="'.concat(v,'",\n input=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response.output_text)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.responses.create(\n# model="').concat(v,'",\n# input=[\n# {\n# "role": "user",\n# "content": [\n# {"type": "input_text", "text": "').concat(f,'"},\n# {\n# "type": "input_image",\n# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file}\n# },\n# ],\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file.output_text)\n");break}case a.KP.IMAGE:t="azure"===u?"\n# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI.\n# This snippet uses 'client.images.generate' and will create a new image based on your prompt.\n# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context.\nimport os\nimport requests\nimport json\nimport time\nfrom PIL import Image\n\nresult = client.images.generate(\n model=\"".concat(v,'",\n prompt="').concat(i,'",\n n=1\n)\n\njson_response = json.loads(result.model_dump_json())\n\n# Set the directory for the stored image\nimage_dir = os.path.join(os.curdir, \'images\')\n\n# If the directory doesn\'t exist, create it\nif not os.path.isdir(image_dir):\n os.mkdir(image_dir)\n\n# Initialize the image path\nimage_filename = f"generated_image_{int(time.time())}.png"\nimage_path = os.path.join(image_dir, image_filename)\n\ntry:\n # Retrieve the generated image\n if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"):\n image_url = json_response["data"][0]["url"]\n generated_image = requests.get(image_url).content\n with open(image_path, "wb") as image_file:\n image_file.write(generated_image)\n\n print(f"Image saved to {image_path}")\n # Display the image\n image = Image.open(image_path)\n image.show()\n else:\n print("Could not find image URL in response.")\n print("Full response:", json_response)\nexcept Exception as e:\n print(f"An error occurred: {e}")\n print("Full response:", json_response)\n'):"\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.IMAGE_EDITS:t="azure"===u?'\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# The prompt entered by the user\nprompt = "'.concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n'):"\nimport base64\nimport os\nimport time\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(f,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(v,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;default:t="\n# Code generation for this endpoint is not implemented yet."}return"".concat(j,"\n").concat(t)}},49817:function(e,t,n){var a,s,r,i;n.d(t,{KP:function(){return s},vf:function(){return l}}),(r=a||(a={})).IMAGE_GENERATION="image_generation",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",(i=s||(s={})).IMAGE="image",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages";let o={image_generation:"image",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages"},l=e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=o[e];return console.log("endpointType:",t),t}return"chat"}},29488:function(e,t,n){n.d(t,{Hc:function(){return i},Ui:function(){return r},e4:function(){return o},xd:function(){return l}});let a="litellm_mcp_auth_tokens",s=()=>{try{let e=localStorage.getItem(a);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading MCP auth tokens from localStorage:",e),{}}},r=(e,t)=>{try{let n=s()[e];if(n&&n.serverAlias===t||n&&!t&&!n.serverAlias)return n.authValue;return null}catch(e){return console.error("Error getting MCP auth token:",e),null}},i=(e,t,n,r)=>{try{let i=s();i[e]={serverId:e,serverAlias:r,authValue:t,authType:n,timestamp:Date.now()},localStorage.setItem(a,JSON.stringify(i))}catch(e){console.error("Error storing MCP auth token:",e)}},o=e=>{try{let t=s();delete t[e],localStorage.setItem(a,JSON.stringify(t))}catch(e){console.error("Error removing MCP auth token:",e)}},l=()=>{try{localStorage.removeItem(a)}catch(e){console.error("Error clearing MCP auth tokens:",e)}}},8048:function(e,t,n){n.d(t,{C:function(){return m}});var a=n(57437),s=n(71594),r=n(24525),i=n(2265),o=n(19130),l=n(44633),c=n(86462),d=n(49084);function m(e){let{data:t=[],columns:n,isLoading:m=!1,table:p,defaultSorting:u=[]}=e,[g,x]=i.useState(u),[h]=i.useState("onChange"),[f,_]=i.useState({}),[b,v]=i.useState({}),j=(0,s.b7)({data:t,columns:n,state:{sorting:g,columnSizing:f,columnVisibility:b},columnResizeMode:h,onSortingChange:x,onColumnSizingChange:_,onColumnVisibilityChange:v,getCoreRowModel:(0,r.sC)(),getSortedRowModel:(0,r.tj)(),enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return i.useEffect(()=>{p&&(p.current=j)},[j,p]),(0,a.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("div",{className:"relative min-w-full",children:(0,a.jsxs)(o.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,a.jsx)(o.ss,{children:j.getHeaderGroups().map(e=>(0,a.jsx)(o.SC,{children:e.headers.map(e=>{var t;return(0,a.jsxs)(o.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,s.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,a.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,a.jsx)(l.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,a.jsx)(c.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,a.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,a.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,a.jsx)(o.RM,{children:m?(0,a.jsx)(o.SC,{children:(0,a.jsx)(o.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):j.getRowModel().rows.length>0?j.getRowModel().rows.map(e=>(0,a.jsx)(o.SC,{children:e.getVisibleCells().map(e=>{var t;return(0,a.jsx)(o.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,s.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,a.jsx)(o.SC,{children:(0,a.jsx)(o.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"No models found"})})})})})]})})})})}},65373:function(e,t,n){n.d(t,{Z:function(){return _}});var a=n(57437),s=n(27648),r=n(2265),i=n(89970),o=n(80795),l=n(19250),c=n(15883),d=n(46346),m=n(57400),p=n(91870),u=n(40428),g=n(3914);let x=async e=>{if(!e)return null;try{return await (0,l.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};var h=n(69734),f=n(29488),_=e=>{let{userID:t,userEmail:n,userRole:_,premiumUser:b,proxySettings:v,setProxySettings:j,accessToken:y,isPublicPage:N=!1}=e,w=(0,l.getProxyBaseUrl)(),[S,A]=(0,r.useState)(""),{logoUrl:I}=(0,h.F)();(0,r.useEffect)(()=>{(async()=>{if(y){let e=await x(y);console.log("response from fetchProxySettings",e),e&&j(e)}})()},[y]),(0,r.useEffect)(()=>{A((null==v?void 0:v.PROXY_LOGOUT_URL)||"")},[v]);let k=[{key:"user-info",label:(0,a.jsxs)("div",{className:"px-3 py-3 border-b border-gray-100",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(c.Z,{className:"mr-2 text-gray-700"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:t})]}),b?(0,a.jsx)(i.Z,{title:"Premium User",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gradient-to-r from-amber-500 to-yellow-500 text-white px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Premium"})]})}):(0,a.jsx)(i.Z,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Standard"})]})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(m.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Role"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium",children:_})]}),(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(p.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Email"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium truncate max-w-[150px]",title:n||"Unknown",children:n||"Unknown"})]})]})]})},{key:"logout",label:(0,a.jsxs)("div",{className:"flex items-center py-2 px-3 hover:bg-gray-50 rounded-md mx-1 my-1",onClick:()=>{(0,g.b)(),(0,f.xd)(),window.location.href=S},children:[(0,a.jsx)(u.Z,{className:"mr-3 text-gray-600"}),(0,a.jsx)("span",{className:"text-gray-800",children:"Logout"})]})}];return(0,a.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)("div",{className:"flex items-center h-12 px-4",children:[(0,a.jsx)("div",{className:"flex items-center flex-shrink-0",children:(0,a.jsx)(s.default,{href:"/",className:"flex items-center",children:(0,a.jsx)("img",{src:I||"".concat(w,"/get_image"),alt:"LiteLLM Brand",className:"h-8 w-auto"})})}),(0,a.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-gray-600 hover:text-gray-900 transition-colors",children:"Docs"}),!N&&(0,a.jsx)(o.Z,{menu:{items:k,className:"min-w-[200px]",style:{padding:"8px",marginTop:"8px",borderRadius:"12px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.08)"}},overlayStyle:{minWidth:"200px"},children:(0,a.jsxs)("button",{className:"inline-flex items-center text-[13px] text-gray-600 hover:text-gray-900 transition-colors",children:["User",(0,a.jsx)("svg",{className:"ml-1 w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 9l-7 7-7-7"})})]})})]})]})})})}},42673:function(e,t,n){var a,s;n.d(t,{Cl:function(){return a},bK:function(){return d},cd:function(){return o},dr:function(){return l},fK:function(){return r},ph:function(){return c}}),n(2265),(s=a||(a={})).Bedrock="Amazon Bedrock",s.Anthropic="Anthropic",s.AssemblyAI="AssemblyAI",s.SageMaker="AWS SageMaker",s.Azure="Azure",s.Azure_AI_Studio="Azure AI Foundry (Studio)",s.Cerebras="Cerebras",s.Cohere="Cohere",s.Databricks="Databricks",s.DeepInfra="DeepInfra",s.Deepgram="Deepgram",s.Deepseek="Deepseek",s.ElevenLabs="ElevenLabs",s.FireworksAI="Fireworks AI",s.Google_AI_Studio="Google AI Studio",s.GradientAI="GradientAI",s.Groq="Groq",s.JinaAI="Jina AI",s.MistralAI="Mistral AI",s.Ollama="Ollama",s.OpenAI="OpenAI",s.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",s.OpenAI_Text="OpenAI Text Completion",s.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",s.Openrouter="Openrouter",s.Perplexity="Perplexity",s.Sambanova="Sambanova",s.TogetherAI="TogetherAI",s.Triton="Triton",s.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",s.VolcEngine="VolcEngine",s.Voyage="Voyage AI",s.xAI="xAI";let r={OpenAI:"openai",OpenAI_Text:"text-completion-openai",Azure:"azure",Azure_AI_Studio:"azure_ai",Anthropic:"anthropic",Google_AI_Studio:"gemini",Bedrock:"bedrock",Groq:"groq",MistralAI:"mistral",Cohere:"cohere",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra"},i="/ui/assets/logos/",o={Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),Databricks:"".concat(i,"databricks.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},l=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:o[e],displayName:e}}let t=Object.keys(r).find(t=>r[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=a[t];return{logo:o[n],displayName:n}},c=e=>{if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";if("Azure"==e)return"azure/my-deployment";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else return"gpt-3.5-turbo"},d=(e,t)=>{console.log("Provider key: ".concat(e));let n=r[e];console.log("Provider mapped to: ".concat(n));let a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(e=>{let[t,s]=e;null!==s&&"object"==typeof s&&"litellm_provider"in s&&(s.litellm_provider===n||s.litellm_provider.includes(n))&&a.push(t)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"cohere_chat"===n.litellm_provider&&a.push(t)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"sagemaker_chat"===n.litellm_provider&&a.push(t)}))),a}},72162:function(e,t,n){var a=n(57437),s=n(2265),r=n(19250),i=n(8048),o=n(36724),l=n(42264),c=n(89970),d=n(3810),m=n(52787),p=n(82680),u=n(3477),g=n(17732),x=n(33245),h=n(78867),f=n(88658),_=n(49817),b=n(42673),v=n(65373),j=n(69734);t.Z=e=>{var t,n;let{accessToken:y}=e,[N,w]=(0,s.useState)(null),[S,A]=(0,s.useState)("LiteLLM Gateway"),[I,k]=(0,s.useState)(null),[C,E]=(0,s.useState)(""),[O,M]=(0,s.useState)({}),[T,D]=(0,s.useState)(!0),[z,P]=(0,s.useState)(""),[L,Z]=(0,s.useState)([]),[G,R]=(0,s.useState)([]),[H,F]=(0,s.useState)([]),[K,U]=(0,s.useState)("I'm alive! ✓"),[V,W]=(0,s.useState)(!1),[q,J]=(0,s.useState)(null),[B,Y]=(0,s.useState)({}),$=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=async()=>{try{D(!0);let e=await (0,r.modelHubPublicModelsCall)();console.log("ModelHubData:",e),w(e)}catch(e){console.error("There was an error fetching the public model data",e),U("Service unavailable")}finally{D(!1)}};(async()=>{let e=await (0,r.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),A(e.docs_title),k(e.custom_docs_description),E(e.litellm_version),M(e.useful_links||{})})(),e()},[]),(0,s.useEffect)(()=>{},[z,L,G,H]);let X=(0,s.useMemo)(()=>{if(!N)return[];let e=N;if(z.trim()){let t=z.toLowerCase(),n=t.split(/\s+/),a=N.filter(e=>{let a=e.model_group.toLowerCase();return!!a.includes(t)||n.every(e=>a.includes(e))});a.length>0&&(e=a.sort((e,n)=>{let a=e.model_group.toLowerCase(),s=n.model_group.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,o=a.startsWith(t)?100:0,l=s.startsWith(t)?100:0,c=t.split(/\s+/).every(e=>a.includes(e))?50:0,d=t.split(/\s+/).every(e=>s.includes(e))?50:0,m=a.length;return i+l+d+(1e3-s.length)-(r+o+c+(1e3-m))}))}return e.filter(e=>{let t=0===L.length||L.some(t=>e.providers.includes(t)),n=0===G.length||G.includes(e.mode||""),a=0===H.length||Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).some(e=>{let[t]=e,n=t.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return H.includes(n)});return t&&n&&a})},[N,z,L,G,H]),Q=e=>{J(e),W(!0)},ee=e=>{navigator.clipboard.writeText(e),l.ZP.success("Copied to clipboard!")},et=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),en=e=>Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return t}),ea=e=>"$".concat((1e6*e).toFixed(4)),es=e=>e?e>=1e3?"".concat((e/1e3).toFixed(0),"K"):e.toString():"N/A",er=(e,t)=>{let n=[];return e&&n.push("RPM: ".concat(e.toLocaleString())),t&&n.push("TPM: ".concat(t.toLocaleString())),n.length>0?n.join(", "):"N/A"};return(0,a.jsx)(j.f,{accessToken:y,children:(0,a.jsxs)("div",{className:"min-h-screen bg-white",children:[(0,a.jsx)(v.Z,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:Y,proxySettings:B,accessToken:y||null,isPublicPage:!0}),(0,a.jsxs)("div",{className:"w-full px-8 py-12",children:[(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,a.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:I||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,a.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"w-4 h-4 mr-2",children:"\uD83D\uDD27"}),"Built with litellm: v",C]})})]}),O&&Object.keys(O).length>0&&(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(O||{}).map(e=>{let[t,n]=e;return(0,a.jsxs)("button",{onClick:()=>window.open(n,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,a.jsx)(u.Z,{className:"w-4 h-4"}),(0,a.jsx)(o.xv,{className:"text-sm font-medium",children:t})]},t)})})]}),(0,a.jsxs)(o.Zb,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,a.jsxs)(o.xv,{className:"text-green-600 font-medium text-sm",children:["Service status: ",K]})})]}),(0,a.jsxs)(o.Zb,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(o.Dx,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,a.jsx)(c.Z,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,a.jsx)(x.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(g.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:z,onChange:e=>P(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,a.jsx)(m.default,{mode:"multiple",value:L,onChange:e=>Z(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,b.dr)(e.value);return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,a.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e.label})]})},children:N&&(e=>{let t=new Set;return e.forEach(e=>{e.providers.forEach(e=>t.add(e))}),Array.from(t)})(N).map(e=>(0,a.jsx)(m.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,a.jsx)(m.default,{mode:"multiple",value:G,onChange:e=>R(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:N&&(e=>{let t=new Set;return e.forEach(e=>{e.mode&&t.add(e.mode)}),Array.from(t)})(N).map(e=>(0,a.jsx)(m.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,a.jsx)(m.default,{mode:"multiple",value:H,onChange:e=>F(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:N&&(e=>{let t=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).forEach(e=>{let[n]=e,a=n.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.add(a)})}),Array.from(t).sort()})(N).map(e=>(0,a.jsx)(m.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(i.C,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(c.Z,{title:t.original.model_group,children:(0,a.jsx)(o.zx,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>Q(t.original),children:t.original.model_group})})})},size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.providers;return(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>{let{logo:t}=(0,b.dr)(e);return(0,a.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.mode;return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(e=>{switch(null==e?void 0:e.toLowerCase()){case"chat":return"\uD83D\uDCAC";case"rerank":return"\uD83D\uDD04";case"embedding":return"\uD83D\uDCC4";default:return"\uD83E\uDD16"}})(n||"")}),(0,a.jsx)(o.xv,{children:n||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(o.xv,{className:"text-center",children:es(t.original.max_input_tokens)})},size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(o.xv,{className:"text-center",children:es(t.original.max_output_tokens)})},size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.input_cost_per_token;return(0,a.jsx)(o.xv,{className:"text-center",children:n?ea(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.output_cost_per_token;return(0,a.jsx)(o.xv,{className:"text-center",children:n?ea(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:e=>{let{row:t}=e,n=Object.entries(t.original).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return et(t)});return 0===n.length?(0,a.jsx)(o.xv,{className:"text-gray-400",children:"-"}):1===n.length?(0,a.jsx)("div",{className:"h-6 flex items-center",children:(0,a.jsx)(d.Z,{color:"blue",className:"text-xs",children:n[0]})}):(0,a.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,a.jsx)(d.Z,{color:"blue",className:"text-xs",children:n[0]}),(0,a.jsx)(c.Z,{title:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"All Features:"}),n.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,a.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",n.length-1]})})]})},size:120},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original;return(0,a.jsx)(o.xv,{className:"text-xs text-gray-600",children:er(n.rpm,n.tpm)})},size:150}],data:X,isLoading:T,table:$,defaultSorting:[{id:"model_group",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(o.xv,{className:"text-sm text-gray-600",children:["Showing ",X.length," of ",(null==N?void 0:N.length)||0," models"]})})]})]}),(0,a.jsx)(p.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==q?void 0:q.model_group)||"Model Details"}),q&&(0,a.jsx)(c.Z,{title:"Copy model name",children:(0,a.jsx)(h.Z,{onClick:()=>ee(q.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:V,footer:null,onOk:()=>{W(!1),J(null)},onCancel:()=>{W(!1),J(null)},children:q&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Model Name:"}),(0,a.jsx)(o.xv,{children:q.model_group})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Mode:"}),(0,a.jsx)(o.xv,{children:q.mode||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Providers:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:q.providers.map(e=>{let{logo:t}=(0,b.dr)(e);return(0,a.jsx)(d.Z,{color:"blue",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),q.model_group.includes("*")&&(0,a.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,a.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,a.jsx)(x.Z,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,a.jsxs)(o.xv,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,a.jsxs)(o.xv,{className:"text-sm text-blue-800",children:["For example, with ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:q.model_group}),", you can use any string (",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:q.model_group.replace("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Max Input Tokens:"}),(0,a.jsx)(o.xv,{children:(null===(t=q.max_input_tokens)||void 0===t?void 0:t.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Max Output Tokens:"}),(0,a.jsx)(o.xv,{children:(null===(n=q.max_output_tokens)||void 0===n?void 0:n.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,a.jsx)(o.xv,{children:q.input_cost_per_token?ea(q.input_cost_per_token):"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,a.jsx)(o.xv,{children:q.output_cost_per_token?ea(q.output_cost_per_token):"Not specified"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=en(q),t=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,a.jsx)(o.xv,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,n)=>(0,a.jsx)(d.Z,{color:t[n%t.length],children:et(e)},e))})()})]}),(q.tpm||q.rpm)&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[q.tpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Tokens per Minute:"}),(0,a.jsx)(o.xv,{children:q.tpm.toLocaleString()})]}),q.rpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"font-medium",children:"Requests per Minute:"}),(0,a.jsx)(o.xv,{children:q.rpm.toLocaleString()})]})]})]}),q.supported_openai_params&&(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:q.supported_openai_params.map(e=>(0,a.jsx)(d.Z,{color:"green",children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(o.xv,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-sm",children:(0,f.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],endpointType:(0,_.vf)(q.mode||"chat"),selectedModel:q.model_group,selectedSdk:"openai"})})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ee((0,f.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],endpointType:(0,_.vf)(q.mode||"chat"),selectedModel:q.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})})]})})}},69734:function(e,t,n){n.d(t,{F:function(){return o},f:function(){return l}});var a=n(57437),s=n(2265),r=n(19250);let i=(0,s.createContext)(void 0),o=()=>{let e=(0,s.useContext)(i);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},l=e=>{let{children:t,accessToken:n}=e,[o,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{(async()=>{if(n)try{let t=(0,r.getProxyBaseUrl)(),a=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(a.ok){var e;let t=await a.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&l(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[n]),(0,a.jsx)(i.Provider,{value:{logoUrl:o,setLogoUrl:l},children:t})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/172-0f7049c565983c4d.js b/litellm/proxy/_experimental/out/_next/static/chunks/172-0f7049c565983c4d.js
new file mode 100644
index 00000000000..65e0c151dc5
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/172-0f7049c565983c4d.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[172],{57018:function(e,s,l){l.d(s,{Ct:function(){return t.Z},Dx:function(){return i.Z},Zb:function(){return r.Z},xv:function(){return n.Z},zx:function(){return a.Z}});var t=l(41649),a=l(20831),r=l(12514),n=l(84264),i=l(96761)},95704:function(e,s,l){l.d(s,{Dx:function(){return x.Z},RM:function(){return r.Z},SC:function(){return o.Z},Zb:function(){return t.Z},iA:function(){return a.Z},pj:function(){return n.Z},ss:function(){return i.Z},xs:function(){return c.Z},xv:function(){return d.Z}});var t=l(12514),a=l(21626),r=l(97214),n=l(28241),i=l(58834),c=l(69552),o=l(71876),d=l(84264),x=l(96761)},36172:function(e,s,l){l.d(s,{Z:function(){return D}});var t=l(57437),a=l(2265),r=l(99376),n=l(19250),i=l(8048),c=l(41649),o=l(20831),d=l(84264),x=l(89970),m=l(3810),u=l(23639),p=l(15424);let h=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),g=e=>Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).map(e=>{let[s]=e;return s}),j=e=>"$".concat((1e6*e).toFixed(2)),b=e=>e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString(),v=function(e,s){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=[{header:"Public Model Name",accessorKey:"model_group",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:l}=e,a=l.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(d.Z,{className:"font-medium text-sm",children:a.model_group}),(0,t.jsx)(x.Z,{title:"Copy model name",children:(0,t.jsx)(u.Z,{onClick:()=>s(a.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(d.Z,{className:"text-xs text-gray-600",children:a.providers.join(", ")})})]})}},{header:"Provider",accessorKey:"providers",enableSorting:!0,sortingFn:(e,s)=>{let l=e.original.providers.join(", "),t=s.original.providers.join(", ");return l.localeCompare(t)},cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.providers.slice(0,2).map(e=>(0,t.jsx)(m.Z,{color:"blue",className:"text-xs",children:e},e)),l.providers.length>2&&(0,t.jsxs)(d.Z,{className:"text-xs text-gray-500",children:["+",l.providers.length-2]})]})},meta:{className:"hidden md:table-cell"}},{header:"Mode",accessorKey:"mode",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:s}=e,l=s.original;return l.mode?(0,t.jsx)(c.Z,{color:"green",size:"sm",children:l.mode}):(0,t.jsx)(d.Z,{className:"text-gray-500",children:"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Tokens",accessorKey:"max_input_tokens",enableSorting:!0,sortingFn:(e,s)=>(e.original.max_input_tokens||0)+(e.original.max_output_tokens||0)-((s.original.max_input_tokens||0)+(s.original.max_output_tokens||0)),cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsxs)(d.Z,{className:"text-xs",children:[l.max_input_tokens?b(l.max_input_tokens):"-"," / ",l.max_output_tokens?b(l.max_output_tokens):"-"]})})},meta:{className:"hidden lg:table-cell"}},{header:"Cost/1M",accessorKey:"input_cost_per_token",enableSorting:!0,sortingFn:(e,s)=>(e.original.input_cost_per_token||0)+(e.original.output_cost_per_token||0)-((s.original.input_cost_per_token||0)+(s.original.output_cost_per_token||0)),cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.Z,{className:"text-xs",children:l.input_cost_per_token?j(l.input_cost_per_token):"-"}),(0,t.jsx)(d.Z,{className:"text-xs text-gray-500",children:l.output_cost_per_token?j(l.output_cost_per_token):"-"})]})}},{header:"Features",accessorKey:"capabilities",enableSorting:!1,cell:e=>{let{row:s}=e,l=g(s.original),a=["green","blue","purple","orange","red","yellow"];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(d.Z,{className:"text-gray-500 text-xs",children:"-"}):l.map((e,s)=>(0,t.jsx)(c.Z,{color:a[s%a.length],size:"xs",children:h(e)},e))})}},{header:"Public",accessorKey:"is_public_model_group",enableSorting:!0,sortingFn:(e,s)=>(!0===e.original.is_public_model_group?1:0)-(!0===s.original.is_public_model_group?1:0),cell:e=>{let{row:s}=e;return!0===s.original.is_public_model_group?(0,t.jsx)(c.Z,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(c.Z,{color:"gray",size:"xs",children:"No"})},meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:s=>{let{row:l}=s,a=l.original;return(0,t.jsxs)(o.Z,{size:"xs",variant:"secondary",onClick:()=>e(a),icon:p.Z,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}];return l?a.filter(e=>!("accessorKey"in e)||"is_public_model_group"!==e.accessorKey):a};var f=l(72162),y=l(91810),N=l(13634),_=l(61994),k=l(73002),w=l(82680),Z=l(96761),C=l(12514),S=e=>{let{modelHubData:s,onFilteredDataChange:l,showFiltersCard:r=!0,className:n=""}=e,[i,c]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,u]=(0,a.useState)(""),[p,h]=(0,a.useState)(""),g=(0,a.useRef)([]),j=(0,a.useMemo)(()=>(null==s?void 0:s.filter(e=>{let s=e.model_group.toLowerCase().includes(i.toLowerCase()),l=""===o||e.providers.includes(o),t=""===m||e.mode===m,a=""===p||Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).some(e=>{let[s]=e;return s.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")===p});return s&&l&&t&&a}))||[],[s,i,o,m,p]);(0,a.useEffect)(()=>{(j.length!==g.current.length||j.some((e,s)=>{var l;return e.model_group!==(null===(l=g.current[s])||void 0===l?void 0:l.model_group)}))&&(g.current=j,l(j))},[j,l]);let b=(0,t.jsxs)("div",{className:"flex flex-wrap gap-4 items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Search Models:"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names...",value:i,onChange:e=>c(e.target.value),className:"border rounded px-3 py-2 w-64 h-10 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Provider:"}),(0,t.jsxs)("select",{value:o,onChange:e=>x(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-40 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Providers"}),s&&(e=>{let s=new Set;return e.forEach(e=>{e.providers.forEach(e=>s.add(e))}),Array.from(s)})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Mode:"}),(0,t.jsxs)("select",{value:m,onChange:e=>u(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-32 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Modes"}),s&&(e=>{let s=new Set;return e.forEach(e=>{e.mode&&s.add(e.mode)}),Array.from(s)})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Features:"}),(0,t.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-48 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Features"}),s&&(e=>{let s=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).forEach(e=>{let[l]=e,t=l.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");s.add(t)})}),Array.from(s).sort()})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(i||o||m||p)&&(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)("button",{onClick:()=>{c(""),x(""),u(""),h("")},className:"text-blue-600 hover:text-blue-800 text-sm underline h-10 flex items-center",children:"Clear Filters"})})]});return r?(0,t.jsx)(C.Z,{className:"mb-6 ".concat(n),children:b}):(0,t.jsx)("div",{className:n,children:b})},M=l(9114);let{Step:P}=y.default;var L=e=>{let{visible:s,onClose:l,accessToken:r,modelHubData:i,onSuccess:o}=e,[x,m]=(0,a.useState)(0),[u,p]=(0,a.useState)(new Set),[h,g]=(0,a.useState)([]),[j,b]=(0,a.useState)(!1),[v]=N.Z.useForm(),f=()=>{m(0),p(new Set),g([]),v.resetFields(),l()},C=(e,s)=>{let l=new Set(u);s?l.add(e):l.delete(e),p(l)},L=e=>{e?p(new Set(h.map(e=>e.model_group))):p(new Set)},A=(0,a.useCallback)(e=>{g(e)},[]);(0,a.useEffect)(()=>{s&&i.length>0&&(g(i),p(new Set(i.filter(e=>!0===e.is_public_model_group).map(e=>e.model_group))))},[s,i]);let F=async()=>{if(0===u.size){M.Z.fromBackend("Please select at least one model to make public");return}b(!0);try{let e=Array.from(u);await (0,n.makeModelGroupPublic)(r,e),M.Z.success("Successfully made ".concat(e.length," model group(s) public!")),f(),o()}catch(e){console.error("Error making model groups public:",e),M.Z.fromBackend("Failed to make model groups public. Please try again.")}finally{b(!1)}},U=()=>{let e=h.length>0&&h.every(e=>u.has(e.model_group)),s=u.size>0&&!e;return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(Z.Z,{children:"Select Models to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(_.Z,{checked:e,indeterminate:s,onChange:e=>L(e.target.checked),disabled:0===h.length,children:["Select All ",h.length>0&&"(".concat(h.length,")")]})})]}),(0,t.jsx)(d.Z,{className:"text-sm text-gray-600",children:"Select the models you want to be visible on the public model hub. Users will still require a valid API key to use these models."}),(0,t.jsx)(S,{modelHubData:i,onFilteredDataChange:A,showFiltersCard:!1,className:"border rounded-lg p-4 bg-gray-50"}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===h.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(d.Z,{children:"No models match the current filters."})}):h.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(_.Z,{checked:u.has(e.model_group),onChange:s=>C(e.model_group,s.target.checked)}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(d.Z,{className:"font-medium",children:e.model_group}),e.mode&&(0,t.jsx)(c.Z,{color:"green",size:"sm",children:e.mode})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.providers.map(e=>(0,t.jsx)(c.Z,{color:"blue",size:"xs",children:e},e))})]})]},e.model_group))})}),u.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Z,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:u.size})," model",1!==u.size?"s":""," selected"]})})]})},z=()=>(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(Z.Z,{children:"Confirm Making Models Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(d.Z,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these models public, anyone who can go to the ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(d.Z,{className:"font-medium",children:"Models to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(u).map(e=>{let s=i.find(s=>s.model_group===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"font-medium",children:e}),s&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:s.providers.map(e=>(0,t.jsx)(c.Z,{color:"blue",size:"xs",children:e},e))})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Z,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:u.size})," model",1!==u.size?"s":""," will be made public"]})})]});return(0,t.jsx)(w.Z,{title:"Make Models Public",open:s,onCancel:f,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(N.Z,{form:v,layout:"vertical",children:[(0,t.jsxs)(y.default,{current:x,className:"mb-6",children:[(0,t.jsx)(P,{title:"Select Models"}),(0,t.jsx)(P,{title:"Confirm"})]}),(()=>{switch(x){case 0:return U();case 1:return z();default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(k.ZP,{onClick:0===x?f:()=>{1===x&&m(0)},children:0===x?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===x&&(0,t.jsx)(k.ZP,{onClick:()=>{if(0===x){if(0===u.size){M.Z.fromBackend("Please select at least one model to make public");return}m(1)}},disabled:0===u.size,children:"Next"}),1===x&&(0,t.jsx)(k.ZP,{onClick:F,loading:j,children:"Make Public"})]})]})]})})},A=l(69870),F=l(57018),U=l(17906),z=l(78867),E=l(20347),D=e=>{var s,l;let{accessToken:c,publicPage:o,premiumUser:d,userRole:x}=e,[m,u]=(0,a.useState)(!1),[p,h]=(0,a.useState)(null),[g,j]=(0,a.useState)(!0),[b,y]=(0,a.useState)(!1),[N,_]=(0,a.useState)(!1),[k,Z]=(0,a.useState)(null),[C,P]=(0,a.useState)([]),[D,R]=(0,a.useState)(!1),H=(0,r.useRouter)(),O=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=async e=>{try{j(!0);let s=await (0,n.modelHubCall)(e);console.log("ModelHubData:",s),h(s.data),(0,n.getConfigFieldSetting)(e,"enable_public_model_hub").then(e=>{console.log("data: ".concat(JSON.stringify(e))),!0==e.field_value&&u(!0)}).catch(e=>{})}catch(e){console.error("There was an error fetching the model data",e)}finally{j(!1)}},s=async()=>{try{var e,s;j(!0);let l=await (0,n.modelHubPublicModelsCall)();console.log("ModelHubData:",l),console.log("First model structure:",l[0]),console.log("Model has model_group?",null===(e=l[0])||void 0===e?void 0:e.model_group),console.log("Model has providers?",null===(s=l[0])||void 0===s?void 0:s.providers),h(l),u(!0)}catch(e){console.error("There was an error fetching the public model data",e)}finally{j(!1)}};c?e(c):o&&s()},[c,o]);let T=()=>{c&&R(!0)},B=()=>{y(!1),_(!1),Z(null)},I=()=>{y(!1),_(!1),Z(null)},K=e=>{navigator.clipboard.writeText(e),M.Z.success("Copied to clipboard!")},Y=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),W=e=>Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).map(e=>{let[s]=e;return s}),V=e=>"$".concat((1e6*e).toFixed(2)),q=(0,a.useCallback)(e=>{P(e)},[]);return(console.log("publicPage: ",o),console.log("publicPageAllowed: ",m),o&&m)?(0,t.jsx)(f.Z,{accessToken:c}):(0,t.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[!1==o?(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start",children:[(0,t.jsx)(F.Dx,{className:"text-center",children:"Model Hub"}),(0,E.tY)(x||"")?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Make models public for developers to know what models are available on the proxy."}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"A list of all public model names personally available to you."})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)(F.xv,{children:"Model Hub URL:"}),(0,t.jsxs)("div",{className:"flex items-center bg-gray-200 px-2 py-1 rounded",children:[(0,t.jsx)(F.xv,{className:"mr-2",children:"".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")}),(0,t.jsx)("button",{onClick:()=>K("".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")),className:"p-1 hover:bg-gray-300 rounded transition-colors",title:"Copy URL",children:(0,t.jsx)(z.Z,{size:16,className:"text-gray-600"})})]}),!1==o&&(0,E.tY)(x||"")&&(0,t.jsx)(F.zx,{className:"ml-4",onClick:()=>T(),children:"Make Public"})]})]}),(0,E.tY)(x||"")&&(0,t.jsx)("div",{className:"mt-8 mb-2",children:(0,t.jsx)(A.Z,{accessToken:c,userRole:x})}),(0,t.jsxs)(F.Zb,{children:[(0,t.jsx)(S,{modelHubData:p||[],onFilteredDataChange:q}),(0,t.jsx)(i.C,{columns:v(e=>{Z(e),y(!0)},K,o),data:C,isLoading:g,table:O,defaultSorting:[{id:"model_group",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(F.xv,{className:"text-sm text-gray-600",children:["Showing ",C.length," of ",(null==p?void 0:p.length)||0," models"]})})]}):(0,t.jsxs)(F.Zb,{className:"mx-auto max-w-xl mt-10",children:[(0,t.jsx)(F.xv,{className:"text-xl text-center mb-2 text-black",children:"Public Model Hub not enabled."}),(0,t.jsx)("p",{className:"text-base text-center text-slate-800",children:"Ask your proxy admin to enable this on their Admin UI."})]}),(0,t.jsx)(w.Z,{title:"Public Model Hub",width:600,visible:N,footer:null,onOk:B,onCancel:I,children:(0,t.jsxs)("div",{className:"pt-5 pb-5",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,t.jsx)(F.xv,{className:"text-base mr-2",children:"Shareable Link:"}),(0,t.jsx)(F.xv,{className:"max-w-sm ml-2 bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center rounded",children:"".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(F.zx,{onClick:()=>{H.replace("/model_hub_table?key=".concat(c))},children:"See Page"})})]})}),(0,t.jsx)(w.Z,{title:(null==k?void 0:k.model_group)||"Model Details",width:1e3,visible:b,footer:null,onOk:B,onCancel:I,children:k&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Model Group:"}),(0,t.jsx)(F.xv,{children:k.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(F.xv,{children:k.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:k.providers.map(e=>(0,t.jsx)(F.Ct,{color:"blue",children:e},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(F.xv,{children:(null===(s=k.max_input_tokens)||void 0===s?void 0:s.toLocaleString())||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(F.xv,{children:(null===(l=k.max_output_tokens)||void 0===l?void 0:l.toLocaleString())||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(F.xv,{children:k.input_cost_per_token?V(k.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(F.xv,{children:k.output_cost_per_token?V(k.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=W(k),s=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,t.jsx)(F.xv,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,l)=>(0,t.jsx)(F.Ct,{color:s[l%s.length],children:Y(e)},e))})()})]}),(k.tpm||k.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[k.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(F.xv,{children:k.tpm.toLocaleString()})]}),k.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(F.xv,{children:k.rpm.toLocaleString()})]})]})]}),k.supported_openai_params&&(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:k.supported_openai_params.map(e=>(0,t.jsx)(F.Ct,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(U.Z,{language:"python",className:"text-sm",children:'import openai\n\nclient = openai.OpenAI(\n api_key="your_api_key",\n base_url="http://0.0.0.0:4000" # Your LiteLLM Proxy URL\n)\n\nresponse = client.chat.completions.create(\n model="'.concat(k.model_group,'",\n messages=[\n {\n "role": "user",\n "content": "Hello, how are you?"\n }\n ]\n)\n\nprint(response.choices[0].message.content)')})]})]})}),(0,t.jsx)(L,{visible:D,onClose:()=>R(!1),accessToken:c||"",modelHubData:p||[],onSuccess:()=>{c&&(async()=>{try{let e=await (0,n.modelHubCall)(c);h(e.data)}catch(e){console.error("Error refreshing model data:",e)}})()}})]})}},69870:function(e,s,l){var t=l(57437),a=l(2265),r=l(82680),n=l(86462),i=l(47686),c=l(77355),o=l(93416),d=l(74998),x=l(20347),m=l(19250),u=l(95704),p=l(9114);s.Z=e=>{let{accessToken:s,userRole:l}=e,[h,g]=(0,a.useState)([]),[j,b]=(0,a.useState)({url:"",displayName:""}),[v,f]=(0,a.useState)(null),[y,N]=(0,a.useState)(!1),[_,k]=(0,a.useState)(!0),w=async()=>{if(s)try{N(!0);let e=await (0,m.getPublicModelHubInfo)();if(e&&e.useful_links){let s=e.useful_links||{},l=Object.entries(s).map((e,s)=>{let[l,t]=e;return{id:"".concat(s,"-").concat(l),displayName:l,url:t}});g(l)}else g([])}catch(e){console.error("Error fetching useful links:",e),g([])}finally{N(!1)}};if((0,a.useEffect)(()=>{w()},[s]),!(0,x.tY)(l||""))return null;let Z=async e=>{if(!s)return!1;try{let l={};return e.forEach(e=>{l[e.displayName]=e.url}),await (0,m.updateUsefulLinksCall)(s,l),r.Z.success({title:"Links Saved Successfully",content:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)("p",{className:"text-gray-600 mb-4",children:"Your useful links have been saved and are now visible on the public model hub."}),(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,t.jsx)("p",{className:"text-sm text-blue-800 mb-2 font-medium",children:"View your updated model hub:"}),(0,t.jsx)("a",{href:"".concat((0,m.getProxyBaseUrl)(),"/ui/model_hub_table"),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-blue-600 hover:text-blue-800 underline text-sm font-medium",children:"Open Public Model Hub →"})]})]}),width:500,okText:"Close",maskClosable:!0,keyboard:!0}),!0}catch(e){return console.error("Error saving links:",e),p.Z.fromBackend("Failed to save links - ".concat(e)),!1}},C=async()=>{if(!j.url||!j.displayName)return;try{new URL(j.url)}catch(e){p.Z.fromBackend("Please enter a valid URL");return}if(h.some(e=>e.displayName===j.displayName)){p.Z.fromBackend("A link with this display name already exists");return}let e=[...h,{id:"".concat(Date.now(),"-").concat(j.displayName),displayName:j.displayName,url:j.url}];await Z(e)&&(g(e),b({url:"",displayName:""}),p.Z.success("Link added successfully"))},S=e=>{f({...e})},M=async()=>{if(!v)return;try{new URL(v.url)}catch(e){p.Z.fromBackend("Please enter a valid URL");return}if(h.some(e=>e.id!==v.id&&e.displayName===v.displayName)){p.Z.fromBackend("A link with this display name already exists");return}let e=h.map(e=>e.id===v.id?v:e);await Z(e)&&(g(e),f(null),p.Z.success("Link updated successfully"))},P=()=>{f(null)},L=async e=>{let s=h.filter(s=>s.id!==e);await Z(s)&&(g(s),p.Z.success("Link deleted successfully"))},A=e=>{window.open(e,"_blank")};return(0,t.jsxs)(u.Zb,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>k(!_),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(u.Dx,{className:"mb-0",children:"Link Management"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Manage the links that are displayed under 'Useful Links' on the public model hub."})]}),(0,t.jsx)("div",{className:"flex items-center",children:_?(0,t.jsx)(n.Z,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(i.Z,{className:"w-5 h-5 text-gray-500"})})]}),_&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(u.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Link"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"URL"}),(0,t.jsx)("input",{type:"text",value:j.url,onChange:e=>b({...j,url:e.target.value}),placeholder:"https://example.com",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Display Name"}),(0,t.jsx)("input",{type:"text",value:j.displayName,onChange:e=>b({...j,displayName:e.target.value}),placeholder:"Friendly name",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:C,disabled:!j.url||!j.displayName,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(j.url&&j.displayName?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,t.jsx)(c.Z,{className:"w-4 h-4 mr-1"}),"Add Link"]})})]})]}),(0,t.jsx)(u.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Links"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(u.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(u.ss,{children:(0,t.jsxs)(u.SC,{children:[(0,t.jsx)(u.xs,{className:"py-1 h-8",children:"Display Name"}),(0,t.jsx)(u.xs,{className:"py-1 h-8",children:"URL"}),(0,t.jsx)(u.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(u.RM,{children:[h.map(e=>(0,t.jsx)(u.SC,{className:"h-8",children:v&&v.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.pj,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:v.displayName,onChange:e=>f({...v,displayName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(u.pj,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:v.url,onChange:e=>f({...v,url:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(u.pj,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:M,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:P,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.pj,{className:"py-0.5 text-sm text-gray-900",children:e.displayName}),(0,t.jsx)(u.pj,{className:"py-0.5 text-sm text-gray-500",children:e.url}),(0,t.jsx)(u.pj,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>A(e.url),className:"text-xs bg-green-50 text-green-600 px-2 py-1 rounded hover:bg-green-100",children:"Use"}),(0,t.jsx)("button",{onClick:()=>S(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(o.Z,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>L(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(d.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===h.length&&(0,t.jsx)(u.SC,{children:(0,t.jsx)(u.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No links added yet. Add a new link above."})})]})]})})})]})]})}},20347:function(e,s,l){l.d(s,{LQ:function(){return r},ZL:function(){return t},lo:function(){return a},tY:function(){return n}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],a=["Internal User","Internal Viewer"],r=["Internal User","Admin"],n=e=>t.includes(e)}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/172-c602ad2ba592907b.js b/litellm/proxy/_experimental/out/_next/static/chunks/172-c602ad2ba592907b.js
deleted file mode 100644
index edc2b213760..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/172-c602ad2ba592907b.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[172],{57018:function(e,s,l){l.d(s,{Ct:function(){return t.Z},Dx:function(){return i.Z},Zb:function(){return r.Z},xv:function(){return n.Z},zx:function(){return a.Z}});var t=l(41649),a=l(20831),r=l(12514),n=l(84264),i=l(96761)},95704:function(e,s,l){l.d(s,{Dx:function(){return x.Z},RM:function(){return r.Z},SC:function(){return o.Z},Zb:function(){return t.Z},iA:function(){return a.Z},pj:function(){return n.Z},ss:function(){return i.Z},xs:function(){return c.Z},xv:function(){return d.Z}});var t=l(12514),a=l(21626),r=l(97214),n=l(28241),i=l(58834),c=l(69552),o=l(71876),d=l(84264),x=l(96761)},36172:function(e,s,l){l.d(s,{Z:function(){return R}});var t=l(57437),a=l(2265),r=l(99376),n=l(19250),i=l(8048),c=l(41649),o=l(20831),d=l(84264),x=l(89970),m=l(3810),u=l(23639),p=l(15424);let h=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),g=e=>Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).map(e=>{let[s]=e;return s}),j=e=>"$".concat((1e6*e).toFixed(2)),b=e=>e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString(),v=function(e,s){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=[{header:"Public Model Name",accessorKey:"model_group",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:l}=e,a=l.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(d.Z,{className:"font-medium text-sm",children:a.model_group}),(0,t.jsx)(x.Z,{title:"Copy model name",children:(0,t.jsx)(u.Z,{onClick:()=>s(a.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(d.Z,{className:"text-xs text-gray-600",children:a.providers.join(", ")})})]})}},{header:"Provider",accessorKey:"providers",enableSorting:!0,sortingFn:(e,s)=>{let l=e.original.providers.join(", "),t=s.original.providers.join(", ");return l.localeCompare(t)},cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.providers.slice(0,2).map(e=>(0,t.jsx)(m.Z,{color:"blue",className:"text-xs",children:e},e)),l.providers.length>2&&(0,t.jsxs)(d.Z,{className:"text-xs text-gray-500",children:["+",l.providers.length-2]})]})},meta:{className:"hidden md:table-cell"}},{header:"Mode",accessorKey:"mode",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:s}=e,l=s.original;return l.mode?(0,t.jsx)(c.Z,{color:"green",size:"sm",children:l.mode}):(0,t.jsx)(d.Z,{className:"text-gray-500",children:"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Tokens",accessorKey:"max_input_tokens",enableSorting:!0,sortingFn:(e,s)=>(e.original.max_input_tokens||0)+(e.original.max_output_tokens||0)-((s.original.max_input_tokens||0)+(s.original.max_output_tokens||0)),cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsxs)(d.Z,{className:"text-xs",children:[l.max_input_tokens?b(l.max_input_tokens):"-"," / ",l.max_output_tokens?b(l.max_output_tokens):"-"]})})},meta:{className:"hidden lg:table-cell"}},{header:"Cost/1M",accessorKey:"input_cost_per_token",enableSorting:!0,sortingFn:(e,s)=>(e.original.input_cost_per_token||0)+(e.original.output_cost_per_token||0)-((s.original.input_cost_per_token||0)+(s.original.output_cost_per_token||0)),cell:e=>{let{row:s}=e,l=s.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.Z,{className:"text-xs",children:l.input_cost_per_token?j(l.input_cost_per_token):"-"}),(0,t.jsx)(d.Z,{className:"text-xs text-gray-500",children:l.output_cost_per_token?j(l.output_cost_per_token):"-"})]})}},{header:"Features",accessorKey:"capabilities",enableSorting:!1,cell:e=>{let{row:s}=e,l=g(s.original),a=["green","blue","purple","orange","red","yellow"];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(d.Z,{className:"text-gray-500 text-xs",children:"-"}):l.map((e,s)=>(0,t.jsx)(c.Z,{color:a[s%a.length],size:"xs",children:h(e)},e))})}},{header:"Public",accessorKey:"is_public_model_group",enableSorting:!0,sortingFn:(e,s)=>(!0===e.original.is_public_model_group?1:0)-(!0===s.original.is_public_model_group?1:0),cell:e=>{let{row:s}=e;return!0===s.original.is_public_model_group?(0,t.jsx)(c.Z,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(c.Z,{color:"gray",size:"xs",children:"No"})},meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:s=>{let{row:l}=s,a=l.original;return(0,t.jsxs)(o.Z,{size:"xs",variant:"secondary",onClick:()=>e(a),icon:p.Z,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}];return l?a.filter(e=>!("accessorKey"in e)||"is_public_model_group"!==e.accessorKey):a};var f=l(72162),y=l(91810),N=l(13634),_=l(42264),k=l(61994),w=l(73002),Z=l(82680),C=l(96761),S=l(12514),M=e=>{let{modelHubData:s,onFilteredDataChange:l,showFiltersCard:r=!0,className:n=""}=e,[i,c]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,u]=(0,a.useState)(""),[p,h]=(0,a.useState)(""),g=(0,a.useRef)([]),j=(0,a.useMemo)(()=>(null==s?void 0:s.filter(e=>{let s=e.model_group.toLowerCase().includes(i.toLowerCase()),l=""===o||e.providers.includes(o),t=""===m||e.mode===m,a=""===p||Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).some(e=>{let[s]=e;return s.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")===p});return s&&l&&t&&a}))||[],[s,i,o,m,p]);(0,a.useEffect)(()=>{(j.length!==g.current.length||j.some((e,s)=>{var l;return e.model_group!==(null===(l=g.current[s])||void 0===l?void 0:l.model_group)}))&&(g.current=j,l(j))},[j,l]);let b=(0,t.jsxs)("div",{className:"flex flex-wrap gap-4 items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Search Models:"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names...",value:i,onChange:e=>c(e.target.value),className:"border rounded px-3 py-2 w-64 h-10 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Provider:"}),(0,t.jsxs)("select",{value:o,onChange:e=>x(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-40 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Providers"}),s&&(e=>{let s=new Set;return e.forEach(e=>{e.providers.forEach(e=>s.add(e))}),Array.from(s)})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Mode:"}),(0,t.jsxs)("select",{value:m,onChange:e=>u(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-32 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Modes"}),s&&(e=>{let s=new Set;return e.forEach(e=>{e.mode&&s.add(e.mode)}),Array.from(s)})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"text-sm font-medium mb-2",children:"Features:"}),(0,t.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-48 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Features"}),s&&(e=>{let s=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).forEach(e=>{let[l]=e,t=l.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");s.add(t)})}),Array.from(s).sort()})(s).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(i||o||m||p)&&(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)("button",{onClick:()=>{c(""),x(""),u(""),h("")},className:"text-blue-600 hover:text-blue-800 text-sm underline h-10 flex items-center",children:"Clear Filters"})})]});return r?(0,t.jsx)(S.Z,{className:"mb-6 ".concat(n),children:b}):(0,t.jsx)("div",{className:n,children:b})},P=l(9114);let{Step:L}=y.default;var A=e=>{let{visible:s,onClose:l,accessToken:r,modelHubData:i,onSuccess:o}=e,[x,m]=(0,a.useState)(0),[u,p]=(0,a.useState)(new Set),[h,g]=(0,a.useState)([]),[j,b]=(0,a.useState)(!1),[v]=N.Z.useForm(),f=()=>{m(0),p(new Set),g([]),v.resetFields(),l()},S=(e,s)=>{let l=new Set(u);s?l.add(e):l.delete(e),p(l)},A=e=>{e?p(new Set(h.map(e=>e.model_group))):p(new Set)},F=(0,a.useCallback)(e=>{g(e)},[]);(0,a.useEffect)(()=>{s&&i.length>0&&(g(i),p(new Set(i.filter(e=>!0===e.is_public_model_group).map(e=>e.model_group))))},[s,i]);let U=async()=>{if(0===u.size){P.Z.fromBackend("Please select at least one model to make public");return}b(!0);try{let e=Array.from(u);await (0,n.makeModelGroupPublic)(r,e),_.ZP.success("Successfully made ".concat(e.length," model group(s) public!")),f(),o()}catch(e){console.error("Error making model groups public:",e),P.Z.fromBackend("Failed to make model groups public. Please try again.")}finally{b(!1)}},z=()=>{let e=h.length>0&&h.every(e=>u.has(e.model_group)),s=u.size>0&&!e;return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(C.Z,{children:"Select Models to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(k.Z,{checked:e,indeterminate:s,onChange:e=>A(e.target.checked),disabled:0===h.length,children:["Select All ",h.length>0&&"(".concat(h.length,")")]})})]}),(0,t.jsx)(d.Z,{className:"text-sm text-gray-600",children:"Select the models you want to be visible on the public model hub. Users will still require a valid API key to use these models."}),(0,t.jsx)(M,{modelHubData:i,onFilteredDataChange:F,showFiltersCard:!1,className:"border rounded-lg p-4 bg-gray-50"}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===h.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(d.Z,{children:"No models match the current filters."})}):h.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(k.Z,{checked:u.has(e.model_group),onChange:s=>S(e.model_group,s.target.checked)}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(d.Z,{className:"font-medium",children:e.model_group}),e.mode&&(0,t.jsx)(c.Z,{color:"green",size:"sm",children:e.mode})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.providers.map(e=>(0,t.jsx)(c.Z,{color:"blue",size:"xs",children:e},e))})]})]},e.model_group))})}),u.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Z,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:u.size})," model",1!==u.size?"s":""," selected"]})})]})},E=()=>(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(C.Z,{children:"Confirm Making Models Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(d.Z,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these models public, anyone who can go to the ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(d.Z,{className:"font-medium",children:"Models to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(u).map(e=>{let s=i.find(s=>s.model_group===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Z,{className:"font-medium",children:e}),s&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:s.providers.map(e=>(0,t.jsx)(c.Z,{color:"blue",size:"xs",children:e},e))})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Z,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:u.size})," model",1!==u.size?"s":""," will be made public"]})})]});return(0,t.jsx)(Z.Z,{title:"Make Models Public",open:s,onCancel:f,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(N.Z,{form:v,layout:"vertical",children:[(0,t.jsxs)(y.default,{current:x,className:"mb-6",children:[(0,t.jsx)(L,{title:"Select Models"}),(0,t.jsx)(L,{title:"Confirm"})]}),(()=>{switch(x){case 0:return z();case 1:return E();default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(w.ZP,{onClick:0===x?f:()=>{1===x&&m(0)},children:0===x?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===x&&(0,t.jsx)(w.ZP,{onClick:()=>{if(0===x){if(0===u.size){P.Z.fromBackend("Please select at least one model to make public");return}m(1)}},disabled:0===u.size,children:"Next"}),1===x&&(0,t.jsx)(w.ZP,{onClick:U,loading:j,children:"Make Public"})]})]})]})})},F=l(69870),U=l(57018),z=l(17906),E=l(78867),D=l(20347),R=e=>{var s,l;let{accessToken:c,publicPage:o,premiumUser:d,userRole:x}=e,[m,u]=(0,a.useState)(!1),[p,h]=(0,a.useState)(null),[g,j]=(0,a.useState)(!0),[b,y]=(0,a.useState)(!1),[N,k]=(0,a.useState)(!1),[w,C]=(0,a.useState)(null),[S,P]=(0,a.useState)([]),[L,R]=(0,a.useState)(!1),H=(0,r.useRouter)(),O=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=async e=>{try{j(!0);let s=await (0,n.modelHubCall)(e);console.log("ModelHubData:",s),h(s.data),(0,n.getConfigFieldSetting)(e,"enable_public_model_hub").then(e=>{console.log("data: ".concat(JSON.stringify(e))),!0==e.field_value&&u(!0)}).catch(e=>{})}catch(e){console.error("There was an error fetching the model data",e)}finally{j(!1)}},s=async()=>{try{var e,s;j(!0);let l=await (0,n.modelHubPublicModelsCall)();console.log("ModelHubData:",l),console.log("First model structure:",l[0]),console.log("Model has model_group?",null===(e=l[0])||void 0===e?void 0:e.model_group),console.log("Model has providers?",null===(s=l[0])||void 0===s?void 0:s.providers),h(l),u(!0)}catch(e){console.error("There was an error fetching the public model data",e)}finally{j(!1)}};c?e(c):o&&s()},[c,o]);let T=()=>{c&&R(!0)},B=()=>{y(!1),k(!1),C(null)},I=()=>{y(!1),k(!1),C(null)},K=e=>{navigator.clipboard.writeText(e),_.ZP.success("Copied to clipboard!")},Y=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),W=e=>Object.entries(e).filter(e=>{let[s,l]=e;return s.startsWith("supports_")&&!0===l}).map(e=>{let[s]=e;return s}),V=e=>"$".concat((1e6*e).toFixed(2)),q=(0,a.useCallback)(e=>{P(e)},[]);return(console.log("publicPage: ",o),console.log("publicPageAllowed: ",m),o&&m)?(0,t.jsx)(f.Z,{accessToken:c}):(0,t.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[!1==o?(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start",children:[(0,t.jsx)(U.Dx,{className:"text-center",children:"Model Hub"}),(0,D.tY)(x||"")?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Make models public for developers to know what models are available on the proxy."}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"A list of all public model names personally available to you."})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)(U.xv,{children:"Model Hub URL:"}),(0,t.jsxs)("div",{className:"flex items-center bg-gray-200 px-2 py-1 rounded",children:[(0,t.jsx)(U.xv,{className:"mr-2",children:"".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")}),(0,t.jsx)("button",{onClick:()=>K("".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")),className:"p-1 hover:bg-gray-300 rounded transition-colors",title:"Copy URL",children:(0,t.jsx)(E.Z,{size:16,className:"text-gray-600"})})]}),!1==o&&(0,D.tY)(x||"")&&(0,t.jsx)(U.zx,{className:"ml-4",onClick:()=>T(),children:"Make Public"})]})]}),(0,D.tY)(x||"")&&(0,t.jsx)("div",{className:"mt-8 mb-2",children:(0,t.jsx)(F.Z,{accessToken:c,userRole:x})}),(0,t.jsxs)(U.Zb,{children:[(0,t.jsx)(M,{modelHubData:p||[],onFilteredDataChange:q}),(0,t.jsx)(i.C,{columns:v(e=>{C(e),y(!0)},K,o),data:S,isLoading:g,table:O,defaultSorting:[{id:"model_group",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(U.xv,{className:"text-sm text-gray-600",children:["Showing ",S.length," of ",(null==p?void 0:p.length)||0," models"]})})]}):(0,t.jsxs)(U.Zb,{className:"mx-auto max-w-xl mt-10",children:[(0,t.jsx)(U.xv,{className:"text-xl text-center mb-2 text-black",children:"Public Model Hub not enabled."}),(0,t.jsx)("p",{className:"text-base text-center text-slate-800",children:"Ask your proxy admin to enable this on their Admin UI."})]}),(0,t.jsx)(Z.Z,{title:"Public Model Hub",width:600,visible:N,footer:null,onOk:B,onCancel:I,children:(0,t.jsxs)("div",{className:"pt-5 pb-5",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,t.jsx)(U.xv,{className:"text-base mr-2",children:"Shareable Link:"}),(0,t.jsx)(U.xv,{className:"max-w-sm ml-2 bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center rounded",children:"".concat((0,n.getProxyBaseUrl)(),"/ui/model_hub_table")})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(U.zx,{onClick:()=>{H.replace("/model_hub_table?key=".concat(c))},children:"See Page"})})]})}),(0,t.jsx)(Z.Z,{title:(null==w?void 0:w.model_group)||"Model Details",width:1e3,visible:b,footer:null,onOk:B,onCancel:I,children:w&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"font-medium",children:"Model Group:"}),(0,t.jsx)(U.xv,{children:w.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(U.xv,{children:w.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:w.providers.map(e=>(0,t.jsx)(U.Ct,{color:"blue",children:e},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(U.xv,{children:(null===(s=w.max_input_tokens)||void 0===s?void 0:s.toLocaleString())||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(U.xv,{children:(null===(l=w.max_output_tokens)||void 0===l?void 0:l.toLocaleString())||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(U.xv,{children:w.input_cost_per_token?V(w.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(U.xv,{children:w.output_cost_per_token?V(w.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=W(w),s=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,t.jsx)(U.xv,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,l)=>(0,t.jsx)(U.Ct,{color:s[l%s.length],children:Y(e)},e))})()})]}),(w.tpm||w.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[w.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(U.xv,{children:w.tpm.toLocaleString()})]}),w.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(U.xv,{children:w.rpm.toLocaleString()})]})]})]}),w.supported_openai_params&&(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:w.supported_openai_params.map(e=>(0,t.jsx)(U.Ct,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(U.xv,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(z.Z,{language:"python",className:"text-sm",children:'import openai\n\nclient = openai.OpenAI(\n api_key="your_api_key",\n base_url="http://0.0.0.0:4000" # Your LiteLLM Proxy URL\n)\n\nresponse = client.chat.completions.create(\n model="'.concat(w.model_group,'",\n messages=[\n {\n "role": "user",\n "content": "Hello, how are you?"\n }\n ]\n)\n\nprint(response.choices[0].message.content)')})]})]})}),(0,t.jsx)(A,{visible:L,onClose:()=>R(!1),accessToken:c||"",modelHubData:p||[],onSuccess:()=>{c&&(async()=>{try{let e=await (0,n.modelHubCall)(c);h(e.data)}catch(e){console.error("Error refreshing model data:",e)}})()}})]})}},69870:function(e,s,l){var t=l(57437),a=l(2265),r=l(82680),n=l(42264),i=l(86462),c=l(47686),o=l(77355),d=l(93416),x=l(74998),m=l(20347),u=l(19250),p=l(95704),h=l(9114);s.Z=e=>{let{accessToken:s,userRole:l}=e,[g,j]=(0,a.useState)([]),[b,v]=(0,a.useState)({url:"",displayName:""}),[f,y]=(0,a.useState)(null),[N,_]=(0,a.useState)(!1),[k,w]=(0,a.useState)(!0),Z=async()=>{if(s)try{_(!0);let e=await (0,u.getPublicModelHubInfo)();if(e&&e.useful_links){let s=e.useful_links||{},l=Object.entries(s).map((e,s)=>{let[l,t]=e;return{id:"".concat(s,"-").concat(l),displayName:l,url:t}});j(l)}else j([])}catch(e){console.error("Error fetching useful links:",e),j([])}finally{_(!1)}};if((0,a.useEffect)(()=>{Z()},[s]),!(0,m.tY)(l||""))return null;let C=async e=>{if(!s)return!1;try{let l={};return e.forEach(e=>{l[e.displayName]=e.url}),await (0,u.updateUsefulLinksCall)(s,l),r.Z.success({title:"Links Saved Successfully",content:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)("p",{className:"text-gray-600 mb-4",children:"Your useful links have been saved and are now visible on the public model hub."}),(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,t.jsx)("p",{className:"text-sm text-blue-800 mb-2 font-medium",children:"View your updated model hub:"}),(0,t.jsx)("a",{href:"".concat((0,u.getProxyBaseUrl)(),"/ui/model_hub_table"),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-blue-600 hover:text-blue-800 underline text-sm font-medium",children:"Open Public Model Hub →"})]})]}),width:500,okText:"Close",maskClosable:!0,keyboard:!0}),!0}catch(e){return console.error("Error saving links:",e),h.Z.fromBackend("Failed to save links - ".concat(e)),!1}},S=async()=>{if(!b.url||!b.displayName)return;try{new URL(b.url)}catch(e){h.Z.fromBackend("Please enter a valid URL");return}if(g.some(e=>e.displayName===b.displayName)){h.Z.fromBackend("A link with this display name already exists");return}let e=[...g,{id:"".concat(Date.now(),"-").concat(b.displayName),displayName:b.displayName,url:b.url}];await C(e)&&(j(e),v({url:"",displayName:""}),n.ZP.success("Link added successfully"))},M=e=>{y({...e})},P=async()=>{if(!f)return;try{new URL(f.url)}catch(e){h.Z.fromBackend("Please enter a valid URL");return}if(g.some(e=>e.id!==f.id&&e.displayName===f.displayName)){h.Z.fromBackend("A link with this display name already exists");return}let e=g.map(e=>e.id===f.id?f:e);await C(e)&&(j(e),y(null),n.ZP.success("Link updated successfully"))},L=()=>{y(null)},A=async e=>{let s=g.filter(s=>s.id!==e);await C(s)&&(j(s),n.ZP.success("Link deleted successfully"))},F=e=>{window.open(e,"_blank")};return(0,t.jsxs)(p.Zb,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>w(!k),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(p.Dx,{className:"mb-0",children:"Link Management"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Manage the links that are displayed under 'Useful Links' on the public model hub."})]}),(0,t.jsx)("div",{className:"flex items-center",children:k?(0,t.jsx)(i.Z,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(c.Z,{className:"w-5 h-5 text-gray-500"})})]}),k&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(p.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Link"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"URL"}),(0,t.jsx)("input",{type:"text",value:b.url,onChange:e=>v({...b,url:e.target.value}),placeholder:"https://example.com",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Display Name"}),(0,t.jsx)("input",{type:"text",value:b.displayName,onChange:e=>v({...b,displayName:e.target.value}),placeholder:"Friendly name",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:S,disabled:!b.url||!b.displayName,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(b.url&&b.displayName?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,t.jsx)(o.Z,{className:"w-4 h-4 mr-1"}),"Add Link"]})})]})]}),(0,t.jsx)(p.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Links"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(p.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(p.ss,{children:(0,t.jsxs)(p.SC,{children:[(0,t.jsx)(p.xs,{className:"py-1 h-8",children:"Display Name"}),(0,t.jsx)(p.xs,{className:"py-1 h-8",children:"URL"}),(0,t.jsx)(p.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(p.RM,{children:[g.map(e=>(0,t.jsx)(p.SC,{className:"h-8",children:f&&f.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.pj,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:f.displayName,onChange:e=>y({...f,displayName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.pj,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:f.url,onChange:e=>y({...f,url:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.pj,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:P,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:L,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.pj,{className:"py-0.5 text-sm text-gray-900",children:e.displayName}),(0,t.jsx)(p.pj,{className:"py-0.5 text-sm text-gray-500",children:e.url}),(0,t.jsx)(p.pj,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>F(e.url),className:"text-xs bg-green-50 text-green-600 px-2 py-1 rounded hover:bg-green-100",children:"Use"}),(0,t.jsx)("button",{onClick:()=>M(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(d.Z,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>A(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(x.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===g.length&&(0,t.jsx)(p.SC,{children:(0,t.jsx)(p.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No links added yet. Add a new link above."})})]})]})})})]})]})}},20347:function(e,s,l){l.d(s,{LQ:function(){return r},ZL:function(){return t},lo:function(){return a},tY:function(){return n}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],a=["Internal User","Internal Viewer"],r=["Internal User","Admin"],n=e=>t.includes(e)}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/220-1c8d82f7ce7658c4.js b/litellm/proxy/_experimental/out/_next/static/chunks/220-1c8d82f7ce7658c4.js
new file mode 100644
index 00000000000..206acc40d24
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/220-1c8d82f7ce7658c4.js
@@ -0,0 +1,12 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[220],{12660:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},88009:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},79276:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},37527:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},9775:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},11429:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},68208:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},83322:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z"}}]},name:"bulb",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},49634:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},83669:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},26430:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},5540:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},11894:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},44625:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},26349:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},62670:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z"}}]},name:"dollar",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},73879:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},29271:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},41169:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z"}}]},name:"experiment",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},11741:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},34310:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM472 744a40 40 0 1080 0 40 40 0 10-80 0zm16-104h48c4.4 0 8-3.6 8-8V448c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8z"}}]},name:"file-exclamation",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},50010:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-pdf",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},38434:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},10798:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},71282:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},92403:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},48231:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},62272:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},45246:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},16601:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 394c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H400V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v236H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h228v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h164c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V394h164zM628 630H400V394h228v236z"}}]},name:"number",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},53508:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},99890:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},28595:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},34419:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},96473:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},89245:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},69993:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},78355:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},23907:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},55322:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},8881:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},71891:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},41361:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},58630:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},3632:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},35291:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},58747:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(5853),o=n(2265);let i=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}},4537:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(5853),o=n(2265);let i=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}},75105:function(e,t,n){"use strict";n.d(t,{Z:function(){return et}});var r=n(5853),o=n(2265),i=n(47625),a=n(93765),l=n(87602),s=n(59221),c=n(86757),u=n.n(c),d=n(95645),f=n.n(d),p=n(77571),h=n.n(p),m=n(82559),g=n.n(m),v=n(21652),y=n.n(v),b=n(57165),x=n(81889),w=n(9841),k=n(58772),S=n(34067),E=n(16630),O=n(85355),C=n(82944),j=["layout","type","stroke","connectNulls","isRange","ref"];function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(){return(P=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,j));return o.createElement(w.m,{clipPath:n?"url(#clipPath-".concat(r,")"):null},o.createElement(b.H,P({},(0,C.L6)(d,!0),{points:e,connectNulls:c,type:l,baseLine:t,layout:a,stroke:"none",className:"recharts-area-area"})),"none"!==s&&o.createElement(b.H,P({},(0,C.L6)(this.props,!1),{className:"recharts-area-curve",layout:a,type:l,connectNulls:c,fill:"none",points:e})),"none"!==s&&u&&o.createElement(b.H,P({},(0,C.L6)(this.props,!1),{className:"recharts-area-curve",layout:a,type:l,connectNulls:c,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var n=this,r=this.props,i=r.points,a=r.baseLine,l=r.isAnimationActive,c=r.animationBegin,u=r.animationDuration,d=r.animationEasing,f=r.animationId,p=this.state,m=p.prevPoints,v=p.prevBaseLine;return o.createElement(s.ZP,{begin:c,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"area-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var l=r.t;if(m){var s,c=m.length/i.length,u=i.map(function(e,t){var n=Math.floor(t*c);if(m[n]){var r=m[n],o=(0,E.k4)(r.x,e.x),i=(0,E.k4)(r.y,e.y);return M(M({},e),{},{x:o(l),y:i(l)})}return e});return s=(0,E.hj)(a)&&"number"==typeof a?(0,E.k4)(v,a)(l):h()(a)||g()(a)?(0,E.k4)(v,0)(l):a.map(function(e,t){var n=Math.floor(t*c);if(v[n]){var r=v[n],o=(0,E.k4)(r.x,e.x),i=(0,E.k4)(r.y,e.y);return M(M({},e),{},{x:o(l),y:i(l)})}return e}),n.renderAreaStatically(u,s,e,t)}return o.createElement(w.m,null,o.createElement("defs",null,o.createElement("clipPath",{id:"animationClipPath-".concat(t)},n.renderClipRect(l))),o.createElement(w.m,{clipPath:"url(#animationClipPath-".concat(t,")")},n.renderAreaStatically(i,a,e,t)))})}},{key:"renderArea",value:function(e,t){var n=this.props,r=n.points,o=n.baseLine,i=n.isAnimationActive,a=this.state,l=a.prevPoints,s=a.prevBaseLine,c=a.totalLength;return i&&r&&r.length&&(!l&&c>0||!y()(l,r)||!y()(s,o))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,o,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,i=t.points,a=t.className,s=t.top,c=t.left,u=t.xAxis,d=t.yAxis,f=t.width,p=t.height,m=t.isAnimationActive,g=t.id;if(n||!i||!i.length)return null;var v=this.state.isAnimationFinished,y=1===i.length,b=(0,l.Z)("recharts-area",a),x=u&&u.allowDataOverflow,S=d&&d.allowDataOverflow,E=x||S,O=h()(g)?this.id:g,j=null!==(e=(0,C.L6)(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},_=j.r,P=j.strokeWidth,T=((0,C.$k)(r)?r:{}).clipDot,M=void 0===T||T,N=2*(void 0===_?3:_)+(void 0===P?2:P);return o.createElement(w.m,{className:b},x||S?o.createElement("defs",null,o.createElement("clipPath",{id:"clipPath-".concat(O)},o.createElement("rect",{x:x?c:c-f/2,y:S?s:s-p/2,width:x?f:2*f,height:S?p:2*p})),!M&&o.createElement("clipPath",{id:"clipPath-dots-".concat(O)},o.createElement("rect",{x:c-N/2,y:s-N/2,width:f+N,height:p+N}))):null,y?null:this.renderArea(E,O),(r||y)&&this.renderDots(E,M,O),(!m||v)&&k.e.renderCallByParent(this.props,i))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],n&&N(a.prototype,n),r&&N(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(o.PureComponent);D(z,"displayName","Area"),D(z,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!S.x.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),D(z,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,l=null!=a?a:i;if((0,E.hj)(l)&&"number"==typeof l)return l;var s="horizontal"===o?r:n,c=s.scale.domain();if("number"===s.type){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return"dataMin"===l?d:"dataMax"===l?u:u<0?u:Math.max(Math.min(c[0],c[1]),0)}return"dataMin"===l?c[0]:"dataMax"===l?c[1]:c[0]}),D(z,"getComposedData",function(e){var t,n=e.props,r=e.item,o=e.xAxis,i=e.yAxis,a=e.xAxisTicks,l=e.yAxisTicks,s=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,h=n.layout,m=u&&u.length,g=z.getBaseValue(n,r,o,i),v="horizontal"===h,y=!1,b=f.map(function(e,t){m?n=u[d+t]:Array.isArray(n=(0,O.F$)(e,c))?y=!0:n=[g,n];var n,r=null==n[1]||m&&null==(0,O.F$)(e,c);return v?{x:(0,O.Hv)({axis:o,ticks:a,bandSize:s,entry:e,index:t}),y:r?null:i.scale(n[1]),value:n,payload:e}:{x:r?null:o.scale(n[1]),y:(0,O.Hv)({axis:i,ticks:l,bandSize:s,entry:e,index:t}),value:n,payload:e}});return t=m||y?b.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:null!=t&&null!=e.y?i.scale(t):null}:{x:null!=t?o.scale(t):null,y:e.y}}):v?i.scale(g):o.scale(g),M({points:b,baseLine:t,layout:h,isRange:y},p)}),D(z,"renderDotItem",function(e,t){return o.isValidElement(e)?o.cloneElement(e,t):u()(e)?e(t):o.createElement(x.o,P({},t,{className:"recharts-area-dot"}))});var Z=n(97059),B=n(62994),F=n(25311),H=(0,a.z)({chartName:"AreaChart",GraphicalChild:z,axisComponents:[{axisType:"xAxis",AxisComp:Z.K},{axisType:"yAxis",AxisComp:B.B}],formatAxisMap:F.t9}),q=n(56940),U=n(8147),W=n(22190),K=n(54061),V=n(65278),$=n(98593),X=n(69448),G=n(32644),Y=n(7084),Q=n(26898),J=n(97324),ee=n(1153);let et=o.forwardRef((e,t)=>{let{data:n=[],categories:a=[],index:l,stack:s=!1,colors:c=Q.s,valueFormatter:u=ee.Cj,startEndOnly:d=!1,showXAxis:f=!0,showYAxis:p=!0,yAxisWidth:h=56,intervalType:m="equidistantPreserveStart",showAnimation:g=!1,animationDuration:v=900,showTooltip:y=!0,showLegend:b=!0,showGridLines:w=!0,showGradient:k=!0,autoMinValue:S=!1,curveType:E="linear",minValue:O,maxValue:C,connectNulls:j=!1,allowDecimals:_=!0,noDataText:P,className:T,onValueChange:M,enableLegendSlider:N=!1,customTooltip:A,rotateLabelX:I,tickGap:R=5}=e,D=(0,r._T)(e,["data","categories","index","stack","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","showAnimation","animationDuration","showTooltip","showLegend","showGridLines","showGradient","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap"]),L=(f||p)&&(!d||p)?20:0,[F,et]=(0,o.useState)(60),[en,er]=(0,o.useState)(void 0),[eo,ei]=(0,o.useState)(void 0),ea=(0,G.me)(a,c),el=(0,G.i4)(S,O,C),es=!!M;function ec(e){es&&(e===eo&&!en||(0,G.FB)(n,e)&&en&&en.dataKey===e?(ei(void 0),null==M||M(null)):(ei(e),null==M||M({eventType:"category",categoryClicked:e})),er(void 0))}return o.createElement("div",Object.assign({ref:t,className:(0,J.q)("w-full h-80",T)},D),o.createElement(i.h,{className:"h-full w-full"},(null==n?void 0:n.length)?o.createElement(H,{data:n,onClick:es&&(eo||en)?()=>{er(void 0),ei(void 0),null==M||M(null)}:void 0},w?o.createElement(q.q,{className:(0,J.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,o.createElement(Z.K,{padding:{left:L,right:L},hide:!f,dataKey:l,tick:{transform:"translate(0, 6)"},ticks:d?[n[0][l],n[n.length-1][l]]:void 0,fill:"",stroke:"",className:(0,J.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),interval:d?"preserveStartEnd":m,tickLine:!1,axisLine:!1,minTickGap:R,angle:null==I?void 0:I.angle,dy:null==I?void 0:I.verticalShift,height:null==I?void 0:I.xAxisHeight}),o.createElement(B.B,{width:h,hide:!p,axisLine:!1,tickLine:!1,type:"number",domain:el,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,J.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:u,allowDecimals:_}),o.createElement(U.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:y?e=>{let{active:t,payload:n,label:r}=e;return A?o.createElement(A,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=ea.get(e.dataKey))&&void 0!==t?t:Y.fr.Gray})}),active:t,label:r}):o.createElement($.ZP,{active:t,payload:n,label:r,valueFormatter:u,categoryColors:ea})}:o.createElement(o.Fragment,null),position:{y:0}}),b?o.createElement(W.D,{verticalAlign:"top",height:F,content:e=>{let{payload:t}=e;return(0,V.Z)({payload:t},ea,et,eo,es?e=>ec(e):void 0,N)}}):null,a.map(e=>{var t,n;return o.createElement("defs",{key:e},k?o.createElement("linearGradient",{className:(0,ee.bM)(null!==(t=ea.get(e))&&void 0!==t?t:Y.fr.Gray,Q.K.text).textColor,id:ea.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},o.createElement("stop",{offset:"5%",stopColor:"currentColor",stopOpacity:en||eo&&eo!==e?.15:.4}),o.createElement("stop",{offset:"95%",stopColor:"currentColor",stopOpacity:0})):o.createElement("linearGradient",{className:(0,ee.bM)(null!==(n=ea.get(e))&&void 0!==n?n:Y.fr.Gray,Q.K.text).textColor,id:ea.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},o.createElement("stop",{stopColor:"currentColor",stopOpacity:en||eo&&eo!==e?.1:.3})))}),a.map(e=>{var t;return o.createElement(z,{className:(0,ee.bM)(null!==(t=ea.get(e))&&void 0!==t?t:Y.fr.Gray,Q.K.text).strokeColor,strokeOpacity:en||eo&&eo!==e?.3:1,activeDot:e=>{var t;let{cx:r,cy:i,stroke:a,strokeLinecap:l,strokeLinejoin:s,strokeWidth:c,dataKey:u}=e;return o.createElement(x.o,{className:(0,J.q)("stroke-tremor-background dark:stroke-dark-tremor-background",M?"cursor-pointer":"",(0,ee.bM)(null!==(t=ea.get(u))&&void 0!==t?t:Y.fr.Gray,Q.K.text).fillColor),cx:r,cy:i,r:5,fill:"",stroke:a,strokeLinecap:l,strokeLinejoin:s,strokeWidth:c,onClick:(t,r)=>{r.stopPropagation(),es&&(e.index===(null==en?void 0:en.index)&&e.dataKey===(null==en?void 0:en.dataKey)||(0,G.FB)(n,e.dataKey)&&eo&&eo===e.dataKey?(ei(void 0),er(void 0),null==M||M(null)):(ei(e.dataKey),er({index:e.index,dataKey:e.dataKey}),null==M||M(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var r;let{stroke:i,strokeLinecap:a,strokeLinejoin:l,strokeWidth:s,cx:c,cy:u,dataKey:d,index:f}=t;return(0,G.FB)(n,e)&&!(en||eo&&eo!==e)||(null==en?void 0:en.index)===f&&(null==en?void 0:en.dataKey)===e?o.createElement(x.o,{key:f,cx:c,cy:u,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:l,strokeWidth:s,className:(0,J.q)("stroke-tremor-background dark:stroke-dark-tremor-background",M?"cursor-pointer":"",(0,ee.bM)(null!==(r=ea.get(d))&&void 0!==r?r:Y.fr.Gray,Q.K.text).fillColor)}):o.createElement(o.Fragment,{key:f})},key:e,name:e,type:E,dataKey:e,stroke:"",fill:"url(#".concat(ea.get(e),")"),strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:g,animationDuration:v,stackId:s?"a":void 0,connectNulls:j})}),M?a.map(e=>o.createElement(K.x,{className:(0,J.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:E,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:j,onClick:(e,t)=>{t.stopPropagation();let{name:n}=e;ec(n)}})):null):o.createElement(X.Z,{noDataText:P})))});et.displayName="AreaChart"},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(5853),o=n(7084),i=n(26898),a=n(97324),l=n(1153),s=n(2265),c=n(47625),u=n(93765),d=n(31699),f=n(97059),p=n(62994),h=n(25311),m=(0,u.z)({chartName:"BarChart",GraphicalChild:d.$,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:f.K},{axisType:"yAxis",AxisComp:p.B}],formatAxisMap:h.t9}),g=n(56940),v=n(8147),y=n(22190),b=n(65278),x=n(98593),w=n(69448),k=n(32644);let S=s.forwardRef((e,t)=>{let{data:n=[],categories:u=[],index:h,colors:S=i.s,valueFormatter:E=l.Cj,layout:O="horizontal",stack:C=!1,relative:j=!1,startEndOnly:_=!1,animationDuration:P=900,showAnimation:T=!1,showXAxis:M=!0,showYAxis:N=!0,yAxisWidth:A=56,intervalType:I="equidistantPreserveStart",showTooltip:R=!0,showLegend:D=!0,showGridLines:L=!0,autoMinValue:z=!1,minValue:Z,maxValue:B,allowDecimals:F=!0,noDataText:H,onValueChange:q,enableLegendSlider:U=!1,customTooltip:W,rotateLabelX:K,tickGap:V=5,className:$}=e,X=(0,r._T)(e,["data","categories","index","colors","valueFormatter","layout","stack","relative","startEndOnly","animationDuration","showAnimation","showXAxis","showYAxis","yAxisWidth","intervalType","showTooltip","showLegend","showGridLines","autoMinValue","minValue","maxValue","allowDecimals","noDataText","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap","className"]),G=M||N?20:0,[Y,Q]=(0,s.useState)(60),J=(0,k.me)(u,S),[ee,et]=s.useState(void 0),[en,er]=(0,s.useState)(void 0),eo=!!q;function ei(e,t,n){var r,o,i,a;n.stopPropagation(),q&&((0,k.vZ)(ee,Object.assign(Object.assign({},e.payload),{value:e.value}))?(er(void 0),et(void 0),null==q||q(null)):(er(null===(o=null===(r=e.tooltipPayload)||void 0===r?void 0:r[0])||void 0===o?void 0:o.dataKey),et(Object.assign(Object.assign({},e.payload),{value:e.value})),null==q||q(Object.assign({eventType:"bar",categoryClicked:null===(a=null===(i=e.tooltipPayload)||void 0===i?void 0:i[0])||void 0===a?void 0:a.dataKey},e.payload))))}let ea=(0,k.i4)(z,Z,B);return s.createElement("div",Object.assign({ref:t,className:(0,a.q)("w-full h-80",$)},X),s.createElement(c.h,{className:"h-full w-full"},(null==n?void 0:n.length)?s.createElement(m,{data:n,stackOffset:C?"sign":j?"expand":"none",layout:"vertical"===O?"vertical":"horizontal",onClick:eo&&(en||ee)?()=>{et(void 0),er(void 0),null==q||q(null)}:void 0},L?s.createElement(g.q,{className:(0,a.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:"vertical"!==O,vertical:"vertical"===O}):null,"vertical"!==O?s.createElement(f.K,{padding:{left:G,right:G},hide:!M,dataKey:h,interval:_?"preserveStartEnd":I,tick:{transform:"translate(0, 6)"},ticks:_?[n[0][h],n[n.length-1][h]]:void 0,fill:"",stroke:"",className:(0,a.q)("mt-4 text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,angle:null==K?void 0:K.angle,dy:null==K?void 0:K.verticalShift,height:null==K?void 0:K.xAxisHeight,minTickGap:V}):s.createElement(f.K,{hide:!M,type:"number",tick:{transform:"translate(-3, 0)"},domain:ea,fill:"",stroke:"",className:(0,a.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,tickFormatter:E,minTickGap:V,allowDecimals:F,angle:null==K?void 0:K.angle,dy:null==K?void 0:K.verticalShift,height:null==K?void 0:K.xAxisHeight}),"vertical"!==O?s.createElement(p.B,{width:A,hide:!N,axisLine:!1,tickLine:!1,type:"number",domain:ea,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,a.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:j?e=>"".concat((100*e).toString()," %"):E,allowDecimals:F}):s.createElement(p.B,{width:A,hide:!N,dataKey:h,axisLine:!1,tickLine:!1,ticks:_?[n[0][h],n[n.length-1][h]]:void 0,type:"category",interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},fill:"",stroke:"",className:(0,a.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content")}),s.createElement(v.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{fill:"#d1d5db",opacity:"0.15"},content:R?e=>{let{active:t,payload:n,label:r}=e;return W?s.createElement(W,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=J.get(e.dataKey))&&void 0!==t?t:o.fr.Gray})}),active:t,label:r}):s.createElement(x.ZP,{active:t,payload:n,label:r,valueFormatter:E,categoryColors:J})}:s.createElement(s.Fragment,null),position:{y:0}}),D?s.createElement(y.D,{verticalAlign:"top",height:Y,content:e=>{let{payload:t}=e;return(0,b.Z)({payload:t},J,Q,en,eo?e=>{eo&&(e!==en||ee?(er(e),null==q||q({eventType:"category",categoryClicked:e})):(er(void 0),null==q||q(null)),et(void 0))}:void 0,U)}}):null,u.map(e=>{var t;return s.createElement(d.$,{className:(0,a.q)((0,l.bM)(null!==(t=J.get(e))&&void 0!==t?t:o.fr.Gray,i.K.background).fillColor,q?"cursor-pointer":""),key:e,name:e,type:"linear",stackId:C||j?"a":void 0,dataKey:e,fill:"",isAnimationActive:T,animationDuration:P,shape:e=>((e,t,n,r)=>{let{fillOpacity:o,name:i,payload:a,value:l}=e,{x:c,width:u,y:d,height:f}=e;return"horizontal"===r&&f<0?(d+=f,f=Math.abs(f)):"vertical"===r&&u<0&&(c+=u,u=Math.abs(u)),s.createElement("rect",{x:c,y:d,width:u,height:f,opacity:t||n&&n!==i?(0,k.vZ)(t,Object.assign(Object.assign({},a),{value:l}))?o:.3:o})})(e,ee,en,O),onClick:ei})})):s.createElement(w.Z,{noDataText:H})))});S.displayName="BarChart"},14042:function(e,t,n){"use strict";n.d(t,{Z:function(){return eZ}});var r=n(5853),o=n(7084),i=n(26898),a=n(97324),l=n(1153),s=n(2265),c=n(60474),u=n(47625),d=n(93765),f=n(86757),p=n.n(f),h=n(9841),m=n(81889),g=n(87602),v=n(82944),y=["points","className","baseLinePoints","connectNulls"];function b(){return(b=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach(function(e){k(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),k(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t},E=function(e,t){var n=S(e);t&&(n=[n.reduce(function(e,t){return[].concat(x(e),x(t))},[])]);var r=n.map(function(e){return e.reduce(function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)},"")}).join("");return 1===n.length?"".concat(r,"Z"):r},O=function(e,t,n){var r=E(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(E(t.reverse(),n).slice(1))},C=function(e){var t=e.points,n=e.className,r=e.baseLinePoints,o=e.connectNulls,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,y);if(!t||!t.length)return null;var a=(0,g.Z)("recharts-polygon",n);if(r&&r.length){var l=i.stroke&&"none"!==i.stroke,c=O(t,r,o);return s.createElement("g",{className:a},s.createElement("path",b({},(0,v.L6)(i,!0),{fill:"Z"===c.slice(-1)?i.fill:"none",stroke:"none",d:c})),l?s.createElement("path",b({},(0,v.L6)(i,!0),{fill:"none",d:E(t,o)})):null,l?s.createElement("path",b({},(0,v.L6)(i,!0),{fill:"none",d:E(r,o)})):null)}var u=E(t,o);return s.createElement("path",b({},(0,v.L6)(i,!0),{fill:"Z"===u.slice(-1)?i.fill:"none",className:a,d:u}))},j=n(58811),_=n(41637),P=n(39206);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M(){return(M=Object.assign?Object.assign.bind():function(e){for(var t=1;t1e-5?"outer"===t?"start":"end":n<-.00001?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,o=e.axisLine,i=e.axisLineType,a=A(A({},(0,v.L6)(this.props,!1)),{},{fill:"none"},(0,v.L6)(o,!1));if("circle"===i)return s.createElement(m.o,M({className:"recharts-polar-angle-axis-line"},a,{cx:t,cy:n,r:r}));var l=this.props.ticks.map(function(e){return(0,P.op)(t,n,r,e.coordinate)});return s.createElement(C,M({className:"recharts-polar-angle-axis-line"},a,{points:l}))}},{key:"renderTicks",value:function(){var e=this,t=this.props,n=t.ticks,r=t.tick,o=t.tickLine,a=t.tickFormatter,l=t.stroke,c=(0,v.L6)(this.props,!1),u=(0,v.L6)(r,!1),d=A(A({},c),{},{fill:"none"},(0,v.L6)(o,!1)),f=n.map(function(t,n){var f=e.getTickLineCoord(t),p=A(A(A({textAnchor:e.getTickTextAnchor(t)},c),{},{stroke:"none",fill:l},u),{},{index:n,payload:t,x:f.x2,y:f.y2});return s.createElement(h.m,M({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(t.coordinate)},(0,_.bw)(e.props,t,n)),o&&s.createElement("line",M({className:"recharts-polar-angle-axis-tick-line"},d,f)),r&&i.renderTickItem(r,p,a?a(t.value,n):t.value))});return s.createElement(h.m,{className:"recharts-polar-angle-axis-ticks"},f)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return!(n<=0)&&t&&t.length?s.createElement(h.m,{className:"recharts-polar-angle-axis"},r&&this.renderAxisLine(),this.renderTicks()):null}}],r=[{key:"renderTickItem",value:function(e,t,n){return s.isValidElement(e)?s.cloneElement(e,t):p()(e)?e(t):s.createElement(j.x,M({},t,{className:"recharts-polar-angle-axis-tick-value"}),n)}}],n&&I(i.prototype,n),r&&I(i,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(s.PureComponent);L(B,"displayName","PolarAngleAxis"),L(B,"axisType","angleAxis"),L(B,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var F=n(35802),H=n.n(F),q=n(37891),U=n.n(q),W=n(26680),K=["cx","cy","angle","ticks","axisLine"],V=["ticks","tick","angle","tickFormatter","stroke"];function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(){return(X=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function J(e,t){for(var n=0;n0?el()(e,"paddingAngle",0):0;if(n){var l=(0,eg.k4)(n.endAngle-n.startAngle,e.endAngle-e.startAngle),s=eS(eS({},e),{},{startAngle:i+a,endAngle:i+l(r)+a});o.push(s),i=s.endAngle}else{var c=e.endAngle,d=e.startAngle,f=(0,eg.k4)(0,c-d)(r),p=eS(eS({},e),{},{startAngle:i+a,endAngle:i+f+a});o.push(p),i=p.endAngle}}),s.createElement(h.m,null,e.renderSectorsStatically(o))})}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return n&&t&&t.length&&(!r||!ec()(r,t))?this.renderSectorsWithAnimation():this.renderSectorsStatically(t)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var e=this,t=this.props,n=t.hide,r=t.sectors,o=t.className,i=t.label,a=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.isAnimationActive,f=this.state.isAnimationFinished;if(n||!r||!r.length||!(0,eg.hj)(a)||!(0,eg.hj)(l)||!(0,eg.hj)(c)||!(0,eg.hj)(u))return null;var p=(0,g.Z)("recharts-pie",o);return s.createElement(h.m,{tabIndex:this.props.rootTabIndex,className:p,ref:function(t){e.pieRef=t}},this.renderSectors(),i&&this.renderLabels(r),W._.renderCallByParent(this.props,null,!1),(!d||f)&&ep.e.renderCallByParent(this.props,r,!1))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e=360?x:x-1)*u,k=i.reduce(function(e,t){var n=(0,ev.F$)(t,b,0);return e+((0,eg.hj)(n)?n:0)},0);return k>0&&(t=i.map(function(e,t){var r,o=(0,ev.F$)(e,b,0),i=(0,ev.F$)(e,f,t),a=((0,eg.hj)(o)?o:0)/k,c=(r=t?n.endAngle+(0,eg.uY)(v)*u*(0!==o?1:0):s)+(0,eg.uY)(v)*((0!==o?m:0)+a*w),d=(r+c)/2,p=(g.innerRadius+g.outerRadius)/2,y=[{name:i,value:o,payload:e,dataKey:b,type:h}],x=(0,P.op)(g.cx,g.cy,p,d);return n=eS(eS(eS({percent:a,cornerRadius:l,name:i,tooltipPayload:y,midAngle:d,middleRadius:p,tooltipPosition:x},e),g),{},{value:(0,ev.F$)(e,b),startAngle:r,endAngle:c,payload:e,paddingAngle:(0,eg.uY)(v)*u})})),eS(eS({},g),{},{sectors:t,data:i})});var eM=(0,d.z)({chartName:"PieChart",GraphicalChild:eT,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:B},{axisType:"radiusAxis",AxisComp:eo}],formatAxisMap:P.t9,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),eN=n(8147),eA=n(69448),eI=n(98593);let eR=e=>{let{active:t,payload:n,valueFormatter:r}=e;if(t&&(null==n?void 0:n[0])){let e=null==n?void 0:n[0];return s.createElement(eI.$B,null,s.createElement("div",{className:(0,a.q)("px-4 py-2")},s.createElement(eI.zX,{value:r(e.value),name:e.name,color:e.payload.color})))}return null},eD=(e,t)=>e.map((e,n)=>{let r=ne||t((0,l.vP)(n.map(e=>e[r]))),ez=e=>{let{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a,className:l}=e;return s.createElement("g",null,s.createElement(c.L,{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a,className:l,fill:"",opacity:.3,style:{outline:"none"}}))},eZ=s.forwardRef((e,t)=>{let{data:n=[],category:c="value",index:d="name",colors:f=i.s,variant:p="donut",valueFormatter:h=l.Cj,label:m,showLabel:g=!0,animationDuration:v=900,showAnimation:y=!1,showTooltip:b=!0,noDataText:x,onValueChange:w,customTooltip:k,className:S}=e,E=(0,r._T)(e,["data","category","index","colors","variant","valueFormatter","label","showLabel","animationDuration","showAnimation","showTooltip","noDataText","onValueChange","customTooltip","className"]),O="donut"==p,C=eL(m,h,n,c),[j,_]=s.useState(void 0),P=!!w;return(0,s.useEffect)(()=>{let e=document.querySelectorAll(".recharts-pie-sector");e&&e.forEach(e=>{e.setAttribute("style","outline: none")})},[j]),s.createElement("div",Object.assign({ref:t,className:(0,a.q)("w-full h-40",S)},E),s.createElement(u.h,{className:"h-full w-full"},(null==n?void 0:n.length)?s.createElement(eM,{onClick:P&&j?()=>{_(void 0),null==w||w(null)}:void 0,margin:{top:0,left:0,right:0,bottom:0}},g&&O?s.createElement("text",{className:(0,a.q)("fill-tremor-content-emphasis","dark:fill-dark-tremor-content-emphasis"),x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle"},C):null,s.createElement(eT,{className:(0,a.q)("stroke-tremor-background dark:stroke-dark-tremor-background",w?"cursor-pointer":"cursor-default"),data:eD(n,f),cx:"50%",cy:"50%",startAngle:90,endAngle:-270,innerRadius:O?"75%":"0%",outerRadius:"100%",stroke:"",strokeLinejoin:"round",dataKey:c,nameKey:d,isAnimationActive:y,animationDuration:v,onClick:function(e,t,n){n.stopPropagation(),P&&(j===t?(_(void 0),null==w||w(null)):(_(t),null==w||w(Object.assign({eventType:"slice"},e.payload.payload))))},activeIndex:j,inactiveShape:ez,style:{outline:"none"}}),s.createElement(eN.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,content:b?e=>{var t;let{active:n,payload:r}=e;return k?s.createElement(k,{payload:null==r?void 0:r.map(e=>{var t,n,i;return Object.assign(Object.assign({},e),{color:null!==(i=null===(n=null===(t=null==r?void 0:r[0])||void 0===t?void 0:t.payload)||void 0===n?void 0:n.color)&&void 0!==i?i:o.fr.Gray})}),active:n,label:null===(t=null==r?void 0:r[0])||void 0===t?void 0:t.name}):s.createElement(eR,{active:n,payload:r,valueFormatter:h})}:s.createElement(s.Fragment,null)})):s.createElement(eA.Z,{noDataText:x})))});eZ.displayName="DonutChart"},59664:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(5853),o=n(2265),i=n(47625),a=n(93765),l=n(54061),s=n(97059),c=n(62994),u=n(25311),d=(0,a.z)({chartName:"LineChart",GraphicalChild:l.x,axisComponents:[{axisType:"xAxis",AxisComp:s.K},{axisType:"yAxis",AxisComp:c.B}],formatAxisMap:u.t9}),f=n(56940),p=n(8147),h=n(22190),m=n(81889),g=n(65278),v=n(98593),y=n(69448),b=n(32644),x=n(7084),w=n(26898),k=n(97324),S=n(1153);let E=o.forwardRef((e,t)=>{let{data:n=[],categories:a=[],index:u,colors:E=w.s,valueFormatter:O=S.Cj,startEndOnly:C=!1,showXAxis:j=!0,showYAxis:_=!0,yAxisWidth:P=56,intervalType:T="equidistantPreserveStart",animationDuration:M=900,showAnimation:N=!1,showTooltip:A=!0,showLegend:I=!0,showGridLines:R=!0,autoMinValue:D=!1,curveType:L="linear",minValue:z,maxValue:Z,connectNulls:B=!1,allowDecimals:F=!0,noDataText:H,className:q,onValueChange:U,enableLegendSlider:W=!1,customTooltip:K,rotateLabelX:V,tickGap:$=5}=e,X=(0,r._T)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap"]),G=j||_?20:0,[Y,Q]=(0,o.useState)(60),[J,ee]=(0,o.useState)(void 0),[et,en]=(0,o.useState)(void 0),er=(0,b.me)(a,E),eo=(0,b.i4)(D,z,Z),ei=!!U;function ea(e){ei&&(e===et&&!J||(0,b.FB)(n,e)&&J&&J.dataKey===e?(en(void 0),null==U||U(null)):(en(e),null==U||U({eventType:"category",categoryClicked:e})),ee(void 0))}return o.createElement("div",Object.assign({ref:t,className:(0,k.q)("w-full h-80",q)},X),o.createElement(i.h,{className:"h-full w-full"},(null==n?void 0:n.length)?o.createElement(d,{data:n,onClick:ei&&(et||J)?()=>{ee(void 0),en(void 0),null==U||U(null)}:void 0},R?o.createElement(f.q,{className:(0,k.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,o.createElement(s.K,{padding:{left:G,right:G},hide:!j,dataKey:u,interval:C?"preserveStartEnd":T,tick:{transform:"translate(0, 6)"},ticks:C?[n[0][u],n[n.length-1][u]]:void 0,fill:"",stroke:"",className:(0,k.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:$,angle:null==V?void 0:V.angle,dy:null==V?void 0:V.verticalShift,height:null==V?void 0:V.xAxisHeight}),o.createElement(c.B,{width:P,hide:!_,axisLine:!1,tickLine:!1,type:"number",domain:eo,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,k.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:O,allowDecimals:F}),o.createElement(p.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:A?e=>{let{active:t,payload:n,label:r}=e;return K?o.createElement(K,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=er.get(e.dataKey))&&void 0!==t?t:x.fr.Gray})}),active:t,label:r}):o.createElement(v.ZP,{active:t,payload:n,label:r,valueFormatter:O,categoryColors:er})}:o.createElement(o.Fragment,null),position:{y:0}}),I?o.createElement(h.D,{verticalAlign:"top",height:Y,content:e=>{let{payload:t}=e;return(0,g.Z)({payload:t},er,Q,et,ei?e=>ea(e):void 0,W)}}):null,a.map(e=>{var t;return o.createElement(l.x,{className:(0,k.q)((0,S.bM)(null!==(t=er.get(e))&&void 0!==t?t:x.fr.Gray,w.K.text).strokeColor),strokeOpacity:J||et&&et!==e?.3:1,activeDot:e=>{var t;let{cx:r,cy:i,stroke:a,strokeLinecap:l,strokeLinejoin:s,strokeWidth:c,dataKey:u}=e;return o.createElement(m.o,{className:(0,k.q)("stroke-tremor-background dark:stroke-dark-tremor-background",U?"cursor-pointer":"",(0,S.bM)(null!==(t=er.get(u))&&void 0!==t?t:x.fr.Gray,w.K.text).fillColor),cx:r,cy:i,r:5,fill:"",stroke:a,strokeLinecap:l,strokeLinejoin:s,strokeWidth:c,onClick:(t,r)=>{r.stopPropagation(),ei&&(e.index===(null==J?void 0:J.index)&&e.dataKey===(null==J?void 0:J.dataKey)||(0,b.FB)(n,e.dataKey)&&et&&et===e.dataKey?(en(void 0),ee(void 0),null==U||U(null)):(en(e.dataKey),ee({index:e.index,dataKey:e.dataKey}),null==U||U(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var r;let{stroke:i,strokeLinecap:a,strokeLinejoin:l,strokeWidth:s,cx:c,cy:u,dataKey:d,index:f}=t;return(0,b.FB)(n,e)&&!(J||et&&et!==e)||(null==J?void 0:J.index)===f&&(null==J?void 0:J.dataKey)===e?o.createElement(m.o,{key:f,cx:c,cy:u,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:l,strokeWidth:s,className:(0,k.q)("stroke-tremor-background dark:stroke-dark-tremor-background",U?"cursor-pointer":"",(0,S.bM)(null!==(r=er.get(d))&&void 0!==r?r:x.fr.Gray,w.K.text).fillColor)}):o.createElement(o.Fragment,{key:f})},key:e,name:e,type:L,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:N,animationDuration:M,connectNulls:B})}),U?a.map(e=>o.createElement(l.x,{className:(0,k.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:L,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:B,onClick:(e,t)=>{t.stopPropagation();let{name:n}=e;ea(n)}})):null):o.createElement(y.Z,{noDataText:H})))});E.displayName="LineChart"},65278:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(2265);let o=(e,t)=>{let[n,o]=(0,r.useState)(t);(0,r.useEffect)(()=>{let t=()=>{o(window.innerWidth),e()};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e,n])};var i=n(5853),a=n(26898),l=n(97324),s=n(1153);let c=e=>{var t=(0,i._T)(e,[]);return r.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.createElement("path",{d:"M8 12L14 6V18L8 12Z"}))},u=e=>{var t=(0,i._T)(e,[]);return r.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.createElement("path",{d:"M16 12L10 18V6L16 12Z"}))},d=(0,s.fn)("Legend"),f=e=>{let{name:t,color:n,onClick:o,activeLegend:i}=e,c=!!o;return r.createElement("li",{className:(0,l.q)(d("legendItem"),"group inline-flex items-center px-2 py-0.5 rounded-tremor-small transition whitespace-nowrap",c?"cursor-pointer":"cursor-default","text-tremor-content",c?"hover:bg-tremor-background-subtle":"","dark:text-dark-tremor-content",c?"dark:hover:bg-dark-tremor-background-subtle":""),onClick:e=>{e.stopPropagation(),null==o||o(t,n)}},r.createElement("svg",{className:(0,l.q)("flex-none h-2 w-2 mr-1.5",(0,s.bM)(n,a.K.text).textColor,i&&i!==t?"opacity-40":"opacity-100"),fill:"currentColor",viewBox:"0 0 8 8"},r.createElement("circle",{cx:4,cy:4,r:4})),r.createElement("p",{className:(0,l.q)("whitespace-nowrap truncate text-tremor-default","text-tremor-content",c?"group-hover:text-tremor-content-emphasis":"","dark:text-dark-tremor-content",i&&i!==t?"opacity-40":"opacity-100",c?"dark:group-hover:text-dark-tremor-content-emphasis":"")},t))},p=e=>{let{icon:t,onClick:n,disabled:o}=e,[i,a]=r.useState(!1),s=r.useRef(null);return r.useEffect(()=>(i?s.current=setInterval(()=>{null==n||n()},300):clearInterval(s.current),()=>clearInterval(s.current)),[i,n]),(0,r.useEffect)(()=>{o&&(clearInterval(s.current),a(!1))},[o]),r.createElement("button",{type:"button",className:(0,l.q)(d("legendSliderButton"),"w-5 group inline-flex items-center truncate rounded-tremor-small transition",o?"cursor-not-allowed":"cursor-pointer",o?"text-tremor-content-subtle":"text-tremor-content hover:text-tremor-content-emphasis hover:bg-tremor-background-subtle",o?"dark:text-dark-tremor-subtle":"dark:text-dark-tremor dark:hover:text-tremor-content-emphasis dark:hover:bg-dark-tremor-background-subtle"),disabled:o,onClick:e=>{e.stopPropagation(),null==n||n()},onMouseDown:e=>{e.stopPropagation(),a(!0)},onMouseUp:e=>{e.stopPropagation(),a(!1)}},r.createElement(t,{className:"w-full"}))},h=r.forwardRef((e,t)=>{var n,o;let{categories:s,colors:h=a.s,className:m,onClickLegendItem:g,activeLegend:v,enableLegendSlider:y=!1}=e,b=(0,i._T)(e,["categories","colors","className","onClickLegendItem","activeLegend","enableLegendSlider"]),x=r.useRef(null),[w,k]=r.useState(null),[S,E]=r.useState(null),O=r.useRef(null),C=(0,r.useCallback)(()=>{let e=null==x?void 0:x.current;e&&k({left:e.scrollLeft>0,right:e.scrollWidth-e.clientWidth>e.scrollLeft})},[k]),j=(0,r.useCallback)(e=>{var t;let n=null==x?void 0:x.current,r=null!==(t=null==n?void 0:n.clientWidth)&&void 0!==t?t:0;n&&y&&(n.scrollTo({left:"left"===e?n.scrollLeft-r:n.scrollLeft+r,behavior:"smooth"}),setTimeout(()=>{C()},400))},[y,C]);r.useEffect(()=>{let e=e=>{"ArrowLeft"===e?j("left"):"ArrowRight"===e&&j("right")};return S?(e(S),O.current=setInterval(()=>{e(S)},300)):clearInterval(O.current),()=>clearInterval(O.current)},[S,j]);let _=e=>{e.stopPropagation(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),E(e.key))},P=e=>{e.stopPropagation(),E(null)};return r.useEffect(()=>{let e=null==x?void 0:x.current;return y&&(C(),null==e||e.addEventListener("keydown",_),null==e||e.addEventListener("keyup",P)),()=>{null==e||e.removeEventListener("keydown",_),null==e||e.removeEventListener("keyup",P)}},[C,y]),r.createElement("ol",Object.assign({ref:t,className:(0,l.q)(d("root"),"relative overflow-hidden",m)},b),r.createElement("div",{ref:x,tabIndex:0,className:(0,l.q)("h-full flex",y?(null==w?void 0:w.right)||(null==w?void 0:w.left)?"pl-4 pr-12 items-center overflow-auto snap-mandatory [&::-webkit-scrollbar]:hidden [scrollbar-width:none]":"":"flex-wrap")},s.map((e,t)=>r.createElement(f,{key:"item-".concat(t),name:e,color:h[t],onClick:g,activeLegend:v}))),y&&((null==w?void 0:w.right)||(null==w?void 0:w.left))?r.createElement(r.Fragment,null,r.createElement("div",{className:(0,l.q)("from-tremor-background","dark:from-dark-tremor-background","absolute top-0 bottom-0 left-0 w-4 bg-gradient-to-r to-transparent pointer-events-none")}),r.createElement("div",{className:(0,l.q)("to-tremor-background","dark:to-dark-tremor-background","absolute top-0 bottom-0 right-10 w-4 bg-gradient-to-r from-transparent pointer-events-none")}),r.createElement("div",{className:(0,l.q)("bg-tremor-background","dark:bg-dark-tremor-background","absolute flex top-0 pr-1 bottom-0 right-0 items-center justify-center h-full")},r.createElement(p,{icon:c,onClick:()=>{E(null),j("left")},disabled:!(null==w?void 0:w.left)}),r.createElement(p,{icon:u,onClick:()=>{E(null),j("right")},disabled:!(null==w?void 0:w.right)}))):null)});h.displayName="Legend";let m=(e,t,n,i,a,l)=>{let{payload:s}=e,c=(0,r.useRef)(null);o(()=>{var e,t;n((t=null===(e=c.current)||void 0===e?void 0:e.clientHeight)?Number(t)+20:60)});let u=s.filter(e=>"none"!==e.type);return r.createElement("div",{ref:c,className:"flex items-center justify-end"},r.createElement(h,{categories:u.map(e=>e.value),colors:u.map(e=>t.get(e.value)),onClickLegendItem:a,activeLegend:i,enableLegendSlider:l}))}},98593:function(e,t,n){"use strict";n.d(t,{$B:function(){return s},ZP:function(){return u},zX:function(){return c}});var r=n(2265),o=n(7084),i=n(26898),a=n(97324),l=n(1153);let s=e=>{let{children:t}=e;return r.createElement("div",{className:(0,a.q)("rounded-tremor-default text-tremor-default border","bg-tremor-background shadow-tremor-dropdown border-tremor-border","dark:bg-dark-tremor-background dark:shadow-dark-tremor-dropdown dark:border-dark-tremor-border")},t)},c=e=>{let{value:t,name:n,color:o}=e;return r.createElement("div",{className:"flex items-center justify-between space-x-8"},r.createElement("div",{className:"flex items-center space-x-2"},r.createElement("span",{className:(0,a.q)("shrink-0 rounded-tremor-full border-2 h-3 w-3","border-tremor-background shadow-tremor-card","dark:border-dark-tremor-background dark:shadow-dark-tremor-card",(0,l.bM)(o,i.K.background).bgColor)}),r.createElement("p",{className:(0,a.q)("text-right whitespace-nowrap","text-tremor-content","dark:text-dark-tremor-content")},n)),r.createElement("p",{className:(0,a.q)("font-medium tabular-nums text-right whitespace-nowrap","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t))},u=e=>{let{active:t,payload:n,label:i,categoryColors:l,valueFormatter:u}=e;if(t&&n){let e=n.filter(e=>"none"!==e.type);return r.createElement(s,null,r.createElement("div",{className:(0,a.q)("border-tremor-border border-b px-4 py-2","dark:border-dark-tremor-border")},r.createElement("p",{className:(0,a.q)("font-medium","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},i)),r.createElement("div",{className:(0,a.q)("px-4 py-2 space-y-1")},e.map((e,t)=>{var n;let{value:i,name:a}=e;return r.createElement(c,{key:"id-".concat(t),value:u(i),name:a,color:null!==(n=l.get(a))&&void 0!==n?n:o.fr.Blue})})))}return null}},69448:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(97324),o=n(2265),i=n(5853);let a=(0,n(1153).fn)("Flex"),l={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},s={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},c={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},u=o.forwardRef((e,t)=>{let{flexDirection:n="row",justifyContent:u="between",alignItems:d="center",children:f,className:p}=e,h=(0,i._T)(e,["flexDirection","justifyContent","alignItems","children","className"]);return o.createElement("div",Object.assign({ref:t,className:(0,r.q)(a("root"),"flex w-full",c[n],l[u],s[d],p)},h),f)});u.displayName="Flex";var d=n(84264);let f=e=>{let{noDataText:t="No data"}=e;return o.createElement(u,{alignItems:"center",justifyContent:"center",className:(0,r.q)("w-full h-full border border-dashed rounded-tremor-default","border-tremor-border","dark:border-dark-tremor-border")},o.createElement(d.Z,{className:(0,r.q)("text-tremor-content","dark:text-dark-tremor-content")},t))}},32644:function(e,t,n){"use strict";n.d(t,{FB:function(){return i},i4:function(){return o},me:function(){return r},vZ:function(){return function e(t,n){if(t===n)return!0;if("object"!=typeof t||"object"!=typeof n||null===t||null===n)return!1;let r=Object.keys(t),o=Object.keys(n);if(r.length!==o.length)return!1;for(let i of r)if(!o.includes(i)||!e(t[i],n[i]))return!1;return!0}}});let r=(e,t)=>{let n=new Map;return e.forEach((e,r)=>{n.set(e,t[r])}),n},o=(e,t,n)=>[e?"auto":null!=t?t:0,null!=n?n:"auto"];function i(e,t){let n=[];for(let r of e)if(Object.prototype.hasOwnProperty.call(r,t)&&(n.push(r[t]),n.length>1))return!1;return!0}},47323:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(5853),o=n(2265),i=n(1526),a=n(7084),l=n(97324),s=n(1153),c=n(26898);let u={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},f={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},p=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,s.bM)(t,c.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.q)((0,s.bM)(t,c.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},h=(0,s.fn)("Icon"),m=o.forwardRef((e,t)=>{let{icon:n,variant:c="simple",tooltip:m,size:g=a.u8.SM,color:v,className:y}=e,b=(0,r._T)(e,["icon","variant","tooltip","size","color","className"]),x=p(c,v),{tooltipProps:w,getReferenceProps:k}=(0,i.l)();return o.createElement("span",Object.assign({ref:(0,s.lq)([t,w.refs.setReference]),className:(0,l.q)(h("root"),"inline-flex flex-shrink-0 items-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,f[c].rounded,f[c].border,f[c].shadow,f[c].ring,u[g].paddingX,u[g].paddingY,y)},k,b),o.createElement(i.Z,Object.assign({text:m},w)),o.createElement(n,{className:(0,l.q)(h("icon"),"shrink-0",d[g].height,d[g].width)}))});m.displayName="Icon"},21487:function(e,t,n){"use strict";let r,o,i;n.d(t,{Z:function(){return nF}});var a,l,s,c,u=n(5853),d=n(2265),f=n(54887),p=n(13323),h=n(64518),m=n(96822),g=n(40048),v=n(72238),y=n(93689);let b=(0,d.createContext)(!1);var x=n(61424),w=n(27847);let k=d.Fragment,S=d.Fragment,E=(0,d.createContext)(null),O=(0,d.createContext)(null);Object.assign((0,w.yV)(function(e,t){var n;let r,o,i=(0,d.useRef)(null),a=(0,y.T)((0,y.h)(e=>{i.current=e}),t),l=(0,g.i)(i),s=function(e){let t=(0,d.useContext)(b),n=(0,d.useContext)(E),r=(0,g.i)(e),[o,i]=(0,d.useState)(()=>{if(!t&&null!==n||x.O.isServer)return null;let e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)});return(0,d.useEffect)(()=>{null!==o&&(null!=r&&r.body.contains(o)||null==r||r.body.appendChild(o))},[o,r]),(0,d.useEffect)(()=>{t||null!==n&&i(n.current)},[n,i,t]),o}(i),[c]=(0,d.useState)(()=>{var e;return x.O.isServer?null:null!=(e=null==l?void 0:l.createElement("div"))?e:null}),u=(0,d.useContext)(O),S=(0,v.H)();return(0,h.e)(()=>{!s||!c||s.contains(c)||(c.setAttribute("data-headlessui-portal",""),s.appendChild(c))},[s,c]),(0,h.e)(()=>{if(c&&u)return u.register(c)},[u,c]),n=()=>{var e;s&&c&&(c instanceof Node&&s.contains(c)&&s.removeChild(c),s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s)))},r=(0,p.z)(n),o=(0,d.useRef)(!1),(0,d.useEffect)(()=>(o.current=!1,()=>{o.current=!0,(0,m.Y)(()=>{o.current&&r()})}),[r]),S&&s&&c?(0,f.createPortal)((0,w.sY)({ourProps:{ref:a},theirProps:e,defaultTag:k,name:"Portal"}),c):null}),{Group:(0,w.yV)(function(e,t){let{target:n,...r}=e,o={ref:(0,y.T)(t)};return d.createElement(E.Provider,{value:n},(0,w.sY)({ourProps:o,theirProps:r,defaultTag:S,name:"Popover.Group"}))})});var C=n(31948),j=n(17684),_=n(32539),P=n(80004),T=n(38198),M=n(3141),N=((r=N||{})[r.Forwards=0]="Forwards",r[r.Backwards=1]="Backwards",r);function A(){let e=(0,d.useRef)(0);return(0,M.s)("keydown",t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)},!0),e}var I=n(37863),R=n(47634),D=n(37105),L=n(24536),z=n(40293),Z=n(37388),B=((o=B||{})[o.Open=0]="Open",o[o.Closed=1]="Closed",o),F=((i=F||{})[i.TogglePopover=0]="TogglePopover",i[i.ClosePopover=1]="ClosePopover",i[i.SetButton=2]="SetButton",i[i.SetButtonId=3]="SetButtonId",i[i.SetPanel=4]="SetPanel",i[i.SetPanelId=5]="SetPanelId",i);let H={0:e=>{let t={...e,popoverState:(0,L.E)(e.popoverState,{0:1,1:0})};return 0===t.popoverState&&(t.__demoMode=!1),t},1:e=>1===e.popoverState?e:{...e,popoverState:1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},q=(0,d.createContext)(null);function U(e){let t=(0,d.useContext)(q);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,U),t}return t}q.displayName="PopoverContext";let W=(0,d.createContext)(null);function K(e){let t=(0,d.useContext)(W);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,K),t}return t}W.displayName="PopoverAPIContext";let V=(0,d.createContext)(null);function $(){return(0,d.useContext)(V)}V.displayName="PopoverGroupContext";let X=(0,d.createContext)(null);function G(e,t){return(0,L.E)(t.type,H,e,t)}X.displayName="PopoverPanelContext";let Y=w.AN.RenderStrategy|w.AN.Static,Q=w.AN.RenderStrategy|w.AN.Static,J=Object.assign((0,w.yV)(function(e,t){var n,r,o,i;let a,l,s,c,u,f;let{__demoMode:h=!1,...m}=e,v=(0,d.useRef)(null),b=(0,y.T)(t,(0,y.h)(e=>{v.current=e})),x=(0,d.useRef)([]),k=(0,d.useReducer)(G,{__demoMode:h,popoverState:h?0:1,buttons:x,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:(0,d.createRef)(),afterPanelSentinel:(0,d.createRef)()}),[{popoverState:S,button:E,buttonId:j,panel:P,panelId:M,beforePanelSentinel:N,afterPanelSentinel:A},R]=k,z=(0,g.i)(null!=(n=v.current)?n:E),Z=(0,d.useMemo)(()=>{if(!E||!P)return!1;for(let e of document.querySelectorAll("body > *"))if(Number(null==e?void 0:e.contains(E))^Number(null==e?void 0:e.contains(P)))return!0;let e=(0,D.GO)(),t=e.indexOf(E),n=(t+e.length-1)%e.length,r=(t+1)%e.length,o=e[n],i=e[r];return!P.contains(o)&&!P.contains(i)},[E,P]),B=(0,C.E)(j),F=(0,C.E)(M),H=(0,d.useMemo)(()=>({buttonId:B,panelId:F,close:()=>R({type:1})}),[B,F,R]),U=$(),K=null==U?void 0:U.registerPopover,V=(0,p.z)(()=>{var e;return null!=(e=null==U?void 0:U.isFocusWithinPopoverGroup())?e:(null==z?void 0:z.activeElement)&&((null==E?void 0:E.contains(z.activeElement))||(null==P?void 0:P.contains(z.activeElement)))});(0,d.useEffect)(()=>null==K?void 0:K(H),[K,H]);let[Y,Q]=(a=(0,d.useContext)(O),l=(0,d.useRef)([]),s=(0,p.z)(e=>(l.current.push(e),a&&a.register(e),()=>c(e))),c=(0,p.z)(e=>{let t=l.current.indexOf(e);-1!==t&&l.current.splice(t,1),a&&a.unregister(e)}),u=(0,d.useMemo)(()=>({register:s,unregister:c,portals:l}),[s,c,l]),[l,(0,d.useMemo)(()=>function(e){let{children:t}=e;return d.createElement(O.Provider,{value:u},t)},[u])]),J=function(){var e;let{defaultContainers:t=[],portals:n,mainTreeNodeRef:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=(0,d.useRef)(null!=(e=null==r?void 0:r.current)?e:null),i=(0,g.i)(o),a=(0,p.z)(()=>{var e,r,a;let l=[];for(let e of t)null!==e&&(e instanceof HTMLElement?l.push(e):"current"in e&&e.current instanceof HTMLElement&&l.push(e.current));if(null!=n&&n.current)for(let e of n.current)l.push(e);for(let t of null!=(e=null==i?void 0:i.querySelectorAll("html > *, body > *"))?e:[])t!==document.body&&t!==document.head&&t instanceof HTMLElement&&"headlessui-portal-root"!==t.id&&(t.contains(o.current)||t.contains(null==(a=null==(r=o.current)?void 0:r.getRootNode())?void 0:a.host)||l.some(e=>t.contains(e))||l.push(t));return l});return{resolveContainers:a,contains:(0,p.z)(e=>a().some(t=>t.contains(e))),mainTreeNodeRef:o,MainTreeNode:(0,d.useMemo)(()=>function(){return null!=r?null:d.createElement(T._,{features:T.A.Hidden,ref:o})},[o,r])}}({mainTreeNodeRef:null==U?void 0:U.mainTreeNodeRef,portals:Y,defaultContainers:[E,P]});r=null==z?void 0:z.defaultView,o="focus",i=e=>{var t,n,r,o;e.target!==window&&e.target instanceof HTMLElement&&0===S&&(V()||E&&P&&(J.contains(e.target)||null!=(n=null==(t=N.current)?void 0:t.contains)&&n.call(t,e.target)||null!=(o=null==(r=A.current)?void 0:r.contains)&&o.call(r,e.target)||R({type:1})))},f=(0,C.E)(i),(0,d.useEffect)(()=>{function e(e){f.current(e)}return(r=null!=r?r:window).addEventListener(o,e,!0),()=>r.removeEventListener(o,e,!0)},[r,o,!0]),(0,_.O)(J.resolveContainers,(e,t)=>{R({type:1}),(0,D.sP)(t,D.tJ.Loose)||(e.preventDefault(),null==E||E.focus())},0===S);let ee=(0,p.z)(e=>{R({type:1});let t=e?e instanceof HTMLElement?e:"current"in e&&e.current instanceof HTMLElement?e.current:E:E;null==t||t.focus()}),et=(0,d.useMemo)(()=>({close:ee,isPortalled:Z}),[ee,Z]),en=(0,d.useMemo)(()=>({open:0===S,close:ee}),[S,ee]);return d.createElement(X.Provider,{value:null},d.createElement(q.Provider,{value:k},d.createElement(W.Provider,{value:et},d.createElement(I.up,{value:(0,L.E)(S,{0:I.ZM.Open,1:I.ZM.Closed})},d.createElement(Q,null,(0,w.sY)({ourProps:{ref:b},theirProps:m,slot:en,defaultTag:"div",name:"Popover"}),d.createElement(J.MainTreeNode,null))))))}),{Button:(0,w.yV)(function(e,t){let n=(0,j.M)(),{id:r="headlessui-popover-button-".concat(n),...o}=e,[i,a]=U("Popover.Button"),{isPortalled:l}=K("Popover.Button"),s=(0,d.useRef)(null),c="headlessui-focus-sentinel-".concat((0,j.M)()),u=$(),f=null==u?void 0:u.closeOthers,h=null!==(0,d.useContext)(X);(0,d.useEffect)(()=>{if(!h)return a({type:3,buttonId:r}),()=>{a({type:3,buttonId:null})}},[h,r,a]);let[m]=(0,d.useState)(()=>Symbol()),v=(0,y.T)(s,t,h?null:e=>{if(e)i.buttons.current.push(m);else{let e=i.buttons.current.indexOf(m);-1!==e&&i.buttons.current.splice(e,1)}i.buttons.current.length>1&&console.warn("You are already using a but only 1 is supported."),e&&a({type:2,button:e})}),b=(0,y.T)(s,t),x=(0,g.i)(s),k=(0,p.z)(e=>{var t,n,r;if(h){if(1===i.popoverState)return;switch(e.key){case Z.R.Space:case Z.R.Enter:e.preventDefault(),null==(n=(t=e.target).click)||n.call(t),a({type:1}),null==(r=i.button)||r.focus()}}else switch(e.key){case Z.R.Space:case Z.R.Enter:e.preventDefault(),e.stopPropagation(),1===i.popoverState&&(null==f||f(i.buttonId)),a({type:0});break;case Z.R.Escape:if(0!==i.popoverState)return null==f?void 0:f(i.buttonId);if(!s.current||null!=x&&x.activeElement&&!s.current.contains(x.activeElement))return;e.preventDefault(),e.stopPropagation(),a({type:1})}}),S=(0,p.z)(e=>{h||e.key===Z.R.Space&&e.preventDefault()}),E=(0,p.z)(t=>{var n,r;(0,R.P)(t.currentTarget)||e.disabled||(h?(a({type:1}),null==(n=i.button)||n.focus()):(t.preventDefault(),t.stopPropagation(),1===i.popoverState&&(null==f||f(i.buttonId)),a({type:0}),null==(r=i.button)||r.focus()))}),O=(0,p.z)(e=>{e.preventDefault(),e.stopPropagation()}),C=0===i.popoverState,_=(0,d.useMemo)(()=>({open:C}),[C]),M=(0,P.f)(e,s),I=h?{ref:b,type:M,onKeyDown:k,onClick:E}:{ref:v,id:i.buttonId,type:M,"aria-expanded":0===i.popoverState,"aria-controls":i.panel?i.panelId:void 0,onKeyDown:k,onKeyUp:S,onClick:E,onMouseDown:O},z=A(),B=(0,p.z)(()=>{let e=i.panel;e&&(0,L.E)(z.current,{[N.Forwards]:()=>(0,D.jA)(e,D.TO.First),[N.Backwards]:()=>(0,D.jA)(e,D.TO.Last)})===D.fE.Error&&(0,D.jA)((0,D.GO)().filter(e=>"true"!==e.dataset.headlessuiFocusGuard),(0,L.E)(z.current,{[N.Forwards]:D.TO.Next,[N.Backwards]:D.TO.Previous}),{relativeTo:i.button})});return d.createElement(d.Fragment,null,(0,w.sY)({ourProps:I,theirProps:o,slot:_,defaultTag:"button",name:"Popover.Button"}),C&&!h&&l&&d.createElement(T._,{id:c,features:T.A.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:B}))}),Overlay:(0,w.yV)(function(e,t){let n=(0,j.M)(),{id:r="headlessui-popover-overlay-".concat(n),...o}=e,[{popoverState:i},a]=U("Popover.Overlay"),l=(0,y.T)(t),s=(0,I.oJ)(),c=null!==s?(s&I.ZM.Open)===I.ZM.Open:0===i,u=(0,p.z)(e=>{if((0,R.P)(e.currentTarget))return e.preventDefault();a({type:1})}),f=(0,d.useMemo)(()=>({open:0===i}),[i]);return(0,w.sY)({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:f,defaultTag:"div",features:Y,visible:c,name:"Popover.Overlay"})}),Panel:(0,w.yV)(function(e,t){let n=(0,j.M)(),{id:r="headlessui-popover-panel-".concat(n),focus:o=!1,...i}=e,[a,l]=U("Popover.Panel"),{close:s,isPortalled:c}=K("Popover.Panel"),u="headlessui-focus-sentinel-before-".concat((0,j.M)()),f="headlessui-focus-sentinel-after-".concat((0,j.M)()),m=(0,d.useRef)(null),v=(0,y.T)(m,t,e=>{l({type:4,panel:e})}),b=(0,g.i)(m),x=(0,w.Y2)();(0,h.e)(()=>(l({type:5,panelId:r}),()=>{l({type:5,panelId:null})}),[r,l]);let k=(0,I.oJ)(),S=null!==k?(k&I.ZM.Open)===I.ZM.Open:0===a.popoverState,E=(0,p.z)(e=>{var t;if(e.key===Z.R.Escape){if(0!==a.popoverState||!m.current||null!=b&&b.activeElement&&!m.current.contains(b.activeElement))return;e.preventDefault(),e.stopPropagation(),l({type:1}),null==(t=a.button)||t.focus()}});(0,d.useEffect)(()=>{var t;e.static||1===a.popoverState&&(null==(t=e.unmount)||t)&&l({type:4,panel:null})},[a.popoverState,e.unmount,e.static,l]),(0,d.useEffect)(()=>{if(a.__demoMode||!o||0!==a.popoverState||!m.current)return;let e=null==b?void 0:b.activeElement;m.current.contains(e)||(0,D.jA)(m.current,D.TO.First)},[a.__demoMode,o,m,a.popoverState]);let O=(0,d.useMemo)(()=>({open:0===a.popoverState,close:s}),[a,s]),C={ref:v,id:r,onKeyDown:E,onBlur:o&&0===a.popoverState?e=>{var t,n,r,o,i;let s=e.relatedTarget;s&&m.current&&(null!=(t=m.current)&&t.contains(s)||(l({type:1}),(null!=(r=null==(n=a.beforePanelSentinel.current)?void 0:n.contains)&&r.call(n,s)||null!=(i=null==(o=a.afterPanelSentinel.current)?void 0:o.contains)&&i.call(o,s))&&s.focus({preventScroll:!0})))}:void 0,tabIndex:-1},_=A(),P=(0,p.z)(()=>{let e=m.current;e&&(0,L.E)(_.current,{[N.Forwards]:()=>{var t;(0,D.jA)(e,D.TO.First)===D.fE.Error&&(null==(t=a.afterPanelSentinel.current)||t.focus())},[N.Backwards]:()=>{var e;null==(e=a.button)||e.focus({preventScroll:!0})}})}),M=(0,p.z)(()=>{let e=m.current;e&&(0,L.E)(_.current,{[N.Forwards]:()=>{var e;if(!a.button)return;let t=(0,D.GO)(),n=t.indexOf(a.button),r=t.slice(0,n+1),o=[...t.slice(n+1),...r];for(let t of o.slice())if("true"===t.dataset.headlessuiFocusGuard||null!=(e=a.panel)&&e.contains(t)){let e=o.indexOf(t);-1!==e&&o.splice(e,1)}(0,D.jA)(o,D.TO.First,{sorted:!1})},[N.Backwards]:()=>{var t;(0,D.jA)(e,D.TO.Previous)===D.fE.Error&&(null==(t=a.button)||t.focus())}})});return d.createElement(X.Provider,{value:r},S&&c&&d.createElement(T._,{id:u,ref:a.beforePanelSentinel,features:T.A.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:P}),(0,w.sY)({mergeRefs:x,ourProps:C,theirProps:i,slot:O,defaultTag:"div",features:Q,visible:S,name:"Popover.Panel"}),S&&c&&d.createElement(T._,{id:f,ref:a.afterPanelSentinel,features:T.A.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:M}))}),Group:(0,w.yV)(function(e,t){let n;let r=(0,d.useRef)(null),o=(0,y.T)(r,t),[i,a]=(0,d.useState)([]),l={mainTreeNodeRef:n=(0,d.useRef)(null),MainTreeNode:(0,d.useMemo)(()=>function(){return d.createElement(T._,{features:T.A.Hidden,ref:n})},[n])},s=(0,p.z)(e=>{a(t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t})}),c=(0,p.z)(e=>(a(t=>[...t,e]),()=>s(e))),u=(0,p.z)(()=>{var e;let t=(0,z.r)(r);if(!t)return!1;let n=t.activeElement;return!!(null!=(e=r.current)&&e.contains(n))||i.some(e=>{var r,o;return(null==(r=t.getElementById(e.buttonId.current))?void 0:r.contains(n))||(null==(o=t.getElementById(e.panelId.current))?void 0:o.contains(n))})}),f=(0,p.z)(e=>{for(let t of i)t.buttonId.current!==e&&t.close()}),h=(0,d.useMemo)(()=>({registerPopover:c,unregisterPopover:s,isFocusWithinPopoverGroup:u,closeOthers:f,mainTreeNodeRef:l.mainTreeNodeRef}),[c,s,u,f,l.mainTreeNodeRef]),m=(0,d.useMemo)(()=>({}),[]);return d.createElement(V.Provider,{value:h},(0,w.sY)({ourProps:{ref:o},theirProps:e,slot:m,defaultTag:"div",name:"Popover.Group"}),d.createElement(l.MainTreeNode,null))})});var ee=n(33044),et=n(9528);let en=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),d.createElement("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"}))};var er=n(4537),eo=n(99735),ei=n(7656);function ea(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return t.setHours(0,0,0,0),t}function el(){return ea(Date.now())}function es(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return t.setDate(1),t.setHours(0,0,0,0),t}var ec=n(97324),eu=n(96398),ed=n(41154);function ef(e){var t,n;if((0,ei.Z)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==(0,ed.Z)(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach(function(e){var t=(0,eo.Z)(e);(void 0===n||nt||isNaN(t.getDate()))&&(n=t)}),n||new Date(NaN)}var eh=n(25721),em=n(47869);function eg(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,eh.Z)(e,-n)}var ev=n(55463);function ey(e,t){if((0,ei.Z)(2,arguments),!t||"object"!==(0,ed.Z)(t))return new Date(NaN);var n=t.years?(0,em.Z)(t.years):0,r=t.months?(0,em.Z)(t.months):0,o=t.weeks?(0,em.Z)(t.weeks):0,i=t.days?(0,em.Z)(t.days):0,a=t.hours?(0,em.Z)(t.hours):0,l=t.minutes?(0,em.Z)(t.minutes):0,s=t.seconds?(0,em.Z)(t.seconds):0;return new Date(eg(function(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,ev.Z)(e,-n)}(e,r+12*n),i+7*o).getTime()-1e3*(s+60*(l+60*a)))}function eb(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ex(e){return(0,ei.Z)(1,arguments),e instanceof Date||"object"===(0,ed.Z)(e)&&"[object Date]"===Object.prototype.toString.call(e)}function ew(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getUTCDay();return t.setUTCDate(t.getUTCDate()-((n<1?7:0)+n-1)),t.setUTCHours(0,0,0,0),t}function ek(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=ew(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=ew(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}var eS={};function eE(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:eS.weekStartsOn)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,eo.Z)(e),f=d.getUTCDay();return d.setUTCDate(d.getUTCDate()-((f=1&&f<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var h=eE(p,t),m=new Date(0);m.setUTCFullYear(d,0,f),m.setUTCHours(0,0,0,0);var g=eE(m,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=g.getTime()?d:d-1}function eC(e,t){for(var n=Math.abs(e).toString();n.length0?n:1-n;return eC("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):eC(n+1,2)},d:function(e,t){return eC(e.getUTCDate(),t.length)},h:function(e,t){return eC(e.getUTCHours()%12||12,t.length)},H:function(e,t){return eC(e.getUTCHours(),t.length)},m:function(e,t){return eC(e.getUTCMinutes(),t.length)},s:function(e,t){return eC(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length;return eC(Math.floor(e.getUTCMilliseconds()*Math.pow(10,n-3)),t.length)}},e_={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};function eP(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+(t||"")+eC(i,2)}function eT(e,t){return e%60==0?(e>0?"-":"+")+eC(Math.abs(e)/60,2):eM(e,t)}function eM(e,t){var n=Math.abs(e);return(e>0?"-":"+")+eC(Math.floor(n/60),2)+(t||"")+eC(n%60,2)}var eN={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return ej.y(e,t)},Y:function(e,t,n,r){var o=eO(e,r),i=o>0?o:1-o;return"YY"===t?eC(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):eC(i,t.length)},R:function(e,t){return eC(ek(e),t.length)},u:function(e,t){return eC(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return eC(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return eC(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return ej.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return eC(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){(0,ei.Z)(1,arguments);var n=(0,eo.Z)(e);return Math.round((eE(n,t).getTime()-(function(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:eS.firstWeekContainsDate)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),d=eO(e,t),f=new Date(0);return f.setUTCFullYear(d,0,u),f.setUTCHours(0,0,0,0),eE(f,t)})(n,t).getTime())/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):eC(o,t.length)},I:function(e,t,n){var r=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return Math.round((ew(t).getTime()-(function(e){(0,ei.Z)(1,arguments);var t=ek(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),ew(n)})(t).getTime())/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):eC(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):ej.d(e,t)},D:function(e,t,n){var r=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getTime();return t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),Math.floor((n-t.getTime())/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):eC(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return eC(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return eC(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return eC(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?e_.noon:0===o?e_.midnight:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?e_.evening:o>=12?e_.afternoon:o>=4?e_.morning:e_.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ej.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):ej.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):eC(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):eC(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ej.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):ej.s(e,t)},S:function(e,t){return ej.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return eT(o);case"XXXX":case"XX":return eM(o);default:return eM(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return eT(o);case"xxxx":case"xx":return eM(o);default:return eM(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eP(o,":");default:return"GMT"+eM(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eP(o,":");default:return"GMT"+eM(o,":")}},t:function(e,t,n,r){return eC(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,n,r){return eC((r._originalDate||e).getTime(),t.length)}},eA=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},eI=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},eR={p:eI,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return eA(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",eA(o,t)).replace("{{time}}",eI(i,t))}};function eD(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var eL=["D","DD"],ez=["YY","YYYY"];function eZ(e,t,n){if("YYYY"===e)throw RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var eB={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eF(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var eH={date:eF({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eF({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eF({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function eU(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,l=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function eW(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?function(e,t){for(var n=0;n0?"in "+r:r+" ago":r},formatLong:eH,formatRelative:function(e,t,n,r){return eq[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:eU({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:eU({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:eU({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:eU({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:eU({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(a={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(a.matchPattern);if(!n)return null;var r=n[0],o=e.match(a.parsePattern);if(!o)return null;var i=a.valueCallback?a.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:eW({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:eW({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:eW({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:eW({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:eW({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},eV=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,e$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eX=/^'([^]*?)'?$/,eG=/''/g,eY=/[a-zA-Z]/;function eQ(e,t,n){(0,ei.Z)(2,arguments);var r,o,i,a,l,s,c,u,d,f,p,h,m,g,v,y,b,x,w=String(t),k=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:eS.locale)&&void 0!==r?r:eK,S=(0,em.Z)(null!==(i=null!==(a=null!==(l=null!==(s=null==n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:null==n?void 0:null===(c=n.locale)||void 0===c?void 0:null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:eS.firstWeekContainsDate)&&void 0!==a?a:null===(d=eS.locale)||void 0===d?void 0:null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(S>=1&&S<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=(0,em.Z)(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n?void 0:null===(v=n.locale)||void 0===v?void 0:null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:eS.weekStartsOn)&&void 0!==h?h:null===(b=eS.locale)||void 0===b?void 0:null===(x=b.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==p?p:0);if(!(E>=0&&E<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw RangeError("locale must contain localize property");if(!k.formatLong)throw RangeError("locale must contain formatLong property");var O=(0,eo.Z)(e);if(!function(e){return(0,ei.Z)(1,arguments),(!!ex(e)||"number"==typeof e)&&!isNaN(Number((0,eo.Z)(e)))}(O))throw RangeError("Invalid time value");var C=eD(O),j=function(e,t){return(0,ei.Z)(2,arguments),function(e,t){return(0,ei.Z)(2,arguments),new Date((0,eo.Z)(e).getTime()+(0,em.Z)(t))}(e,-(0,em.Z)(t))}(O,C),_={firstWeekContainsDate:S,weekStartsOn:E,locale:k,_originalDate:O};return w.match(e$).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,eR[t])(e,k.formatLong):e}).join("").match(eV).map(function(r){if("''"===r)return"'";var o,i=r[0];if("'"===i)return(o=r.match(eX))?o[1].replace(eG,"'"):r;var a=eN[i];if(a)return null!=n&&n.useAdditionalWeekYearTokens||-1===ez.indexOf(r)||eZ(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||-1===eL.indexOf(r)||eZ(r,t,String(e)),a(j,r,k.localize,_);if(i.match(eY))throw RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r}).join("")}var eJ=n(1153);let e0=(0,eJ.fn)("DateRangePicker"),e1=(e,t,n,r)=>{var o;if(n&&(e=null===(o=r.get(n))||void 0===o?void 0:o.from),e)return ea(e&&!t?e:ef([e,t]))},e2=(e,t,n,r)=>{var o,i;if(n&&(e=ea(null!==(i=null===(o=r.get(n))||void 0===o?void 0:o.to)&&void 0!==i?i:el())),e)return ea(e&&!t?e:ep([e,t]))},e4=[{value:"tdy",text:"Today",from:el()},{value:"w",text:"Last 7 days",from:ey(el(),{days:7})},{value:"t",text:"Last 30 days",from:ey(el(),{days:30})},{value:"m",text:"Month to Date",from:es(el())},{value:"y",text:"Year to Date",from:eb(el())}],e3=(e,t,n,r)=>{let o=(null==n?void 0:n.code)||"en-US";if(!e&&!t)return"";if(e&&!t)return r?eQ(e,r):e.toLocaleDateString(o,{year:"numeric",month:"short",day:"numeric"});if(e&&t){if(function(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getTime()===r.getTime()}(e,t))return r?eQ(e,r):e.toLocaleDateString(o,{year:"numeric",month:"short",day:"numeric"});if(e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())return r?"".concat(eQ(e,r)," - ").concat(eQ(t,r)):"".concat(e.toLocaleDateString(o,{month:"short",day:"numeric"})," - \n ").concat(t.getDate(),", ").concat(t.getFullYear());{if(r)return"".concat(eQ(e,r)," - ").concat(eQ(t,r));let n={year:"numeric",month:"short",day:"numeric"};return"".concat(e.toLocaleDateString(o,n)," - \n ").concat(t.toLocaleDateString(o,n))}}return""};function e6(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function e8(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,em.Z)(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var l=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,l)),n}function e5(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,em.Z)(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function e7(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function e9(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function te(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getTime()=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,eo.Z)(e),f=d.getDay();return d.setDate(d.getDate()-((fr.getTime()}function ti(e,t){(0,ei.Z)(2,arguments);var n=ea(e),r=ea(t);return Math.round((n.getTime()-eD(n)-(r.getTime()-eD(r)))/864e5)}function ta(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,eh.Z)(e,7*n)}function tl(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,ev.Z)(e,12*n)}function ts(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:eS.weekStartsOn)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,eo.Z)(e),f=d.getDay();return d.setDate(d.getDate()+((fe7(l,a)&&(a=(0,ev.Z)(l,-1*((void 0===c?1:c)-1))),s&&0>e7(a,s)&&(a=s),u=es(a),f=t.month,h=(p=(0,d.useState)(u))[0],m=[void 0===f?h:f,p[1]])[0],v=m[1],[g,function(e){if(!t.disableNavigation){var n,r=es(e);v(r),null===(n=t.onMonthChange)||void 0===n||n.call(t,r)}}]),x=b[0],w=b[1],k=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=es(e),i=e7(es((0,ev.Z)(o,r)),o),a=[],l=0;l=e7(i,n)))return(0,ev.Z)(i,-(r?void 0===o?1:o:1))}}(x,y),O=function(e){return k.some(function(t){return e9(e,t)})};return th.jsx(tP.Provider,{value:{currentMonth:x,displayMonths:k,goToMonth:w,goToDate:function(e,t){O(e)||(t&&te(e,t)?w((0,ev.Z)(e,1+-1*y.numberOfMonths)):w(e))},previousMonth:E,nextMonth:S,isDateDisplayed:O},children:e.children})}function tM(){var e=(0,d.useContext)(tP);if(!e)throw Error("useNavigation must be used within a NavigationProvider");return e}function tN(e){var t,n=tS(),r=n.classNames,o=n.styles,i=n.components,a=tM().goToMonth,l=function(t){a((0,ev.Z)(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:tE,c=th.jsx(s,{id:e.id,displayMonth:e.displayMonth});return th.jsxs("div",{className:r.caption_dropdowns,style:o.caption_dropdowns,children:[th.jsx("div",{className:r.vhidden,children:c}),th.jsx(tj,{onChange:l,displayMonth:e.displayMonth}),th.jsx(t_,{onChange:l,displayMonth:e.displayMonth})]})}function tA(e){return th.jsx("svg",tu({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:th.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function tI(e){return th.jsx("svg",tu({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:th.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var tR=(0,d.forwardRef)(function(e,t){var n=tS(),r=n.classNames,o=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var a=i.join(" "),l=tu(tu({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),th.jsx("button",tu({},e,{ref:t,type:"button",className:a,style:l}))});function tD(e){var t,n,r=tS(),o=r.dir,i=r.locale,a=r.classNames,l=r.styles,s=r.labels,c=s.labelPrevious,u=s.labelNext,d=r.components;if(!e.nextMonth&&!e.previousMonth)return th.jsx(th.Fragment,{});var f=c(e.previousMonth,{locale:i}),p=[a.nav_button,a.nav_button_previous].join(" "),h=u(e.nextMonth,{locale:i}),m=[a.nav_button,a.nav_button_next].join(" "),g=null!==(t=null==d?void 0:d.IconRight)&&void 0!==t?t:tI,v=null!==(n=null==d?void 0:d.IconLeft)&&void 0!==n?n:tA;return th.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&th.jsx(tR,{name:"previous-month","aria-label":f,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?th.jsx(g,{className:a.nav_icon,style:l.nav_icon}):th.jsx(v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&th.jsx(tR,{name:"next-month","aria-label":h,className:m,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?th.jsx(v,{className:a.nav_icon,style:l.nav_icon}):th.jsx(g,{className:a.nav_icon,style:l.nav_icon})})]})}function tL(e){var t=tS().numberOfMonths,n=tM(),r=n.previousMonth,o=n.nextMonth,i=n.goToMonth,a=n.displayMonths,l=a.findIndex(function(t){return e9(e.displayMonth,t)}),s=0===l,c=l===a.length-1;return th.jsx(tD,{displayMonth:e.displayMonth,hideNext:t>1&&(s||!c),hidePrevious:t>1&&(c||!s),nextMonth:o,previousMonth:r,onPreviousClick:function(){r&&i(r)},onNextClick:function(){o&&i(o)}})}function tz(e){var t,n,r=tS(),o=r.classNames,i=r.disableNavigation,a=r.styles,l=r.captionLayout,s=r.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:tE;return n=i?th.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?th.jsx(tN,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?th.jsxs(th.Fragment,{children:[th.jsx(tN,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),th.jsx(tL,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):th.jsxs(th.Fragment,{children:[th.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),th.jsx(tL,{displayMonth:e.displayMonth,id:e.id})]}),th.jsx("div",{className:o.caption,style:a.caption,children:n})}function tZ(e){var t=tS(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?th.jsx("tfoot",{className:o,style:r.tfoot,children:th.jsx("tr",{children:th.jsx("td",{colSpan:8,children:n})})}):th.jsx(th.Fragment,{})}function tB(){var e=tS(),t=e.classNames,n=e.styles,r=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,n){for(var r=n?tn(new Date):tt(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=(0,eh.Z)(r,i);o.push(a)}return o}(o,i,a);return th.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&th.jsx("td",{style:n.head_cell,className:t.head_cell}),c.map(function(e,r){return th.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},r)})]})}function tF(){var e,t=tS(),n=t.classNames,r=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:tB;return th.jsx("thead",{style:r.head,className:n.head,children:th.jsx(i,{})})}function tH(e){var t=tS(),n=t.locale,r=t.formatters.formatDay;return th.jsx(th.Fragment,{children:r(e.date,{locale:n})})}var tq=(0,d.createContext)(void 0);function tU(e){return tm(e.initialProps)?th.jsx(tW,{initialProps:e.initialProps,children:e.children}):th.jsx(tq.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}function tW(e){var t=e.initialProps,n=e.children,r=t.selected,o=t.min,i=t.max,a={disabled:[]};return r&&a.disabled.push(function(e){var t=i&&r.length>i-1,n=r.some(function(t){return tr(t,e)});return!!(t&&!n)}),th.jsx(tq.Provider,{value:{selected:r,onDayClick:function(e,n,a){if(null===(l=t.onDayClick)||void 0===l||l.call(t,e,n,a),(!n.selected||!o||(null==r?void 0:r.length)!==o)&&(n.selected||!i||(null==r?void 0:r.length)!==i)){var l,s,c=r?td([],r,!0):[];if(n.selected){var u=c.findIndex(function(t){return tr(e,t)});c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,n,a)}},modifiers:a},children:n})}function tK(){var e=(0,d.useContext)(tq);if(!e)throw Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var tV=(0,d.createContext)(void 0);function t$(e){return tg(e.initialProps)?th.jsx(tX,{initialProps:e.initialProps,children:e.children}):th.jsx(tV.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}function tX(e){var t=e.initialProps,n=e.children,r=t.selected,o=r||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],tr(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:eg(i,l-1),before:(0,eh.Z)(i,l-1)}),i&&a&&c.disabled.push({after:i,before:(0,eh.Z)(i,l-1)}),!i&&a&&c.disabled.push({after:eg(a,l-1),before:(0,eh.Z)(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:(0,eh.Z)(i,-s+1)}),c.disabled.push({after:(0,eh.Z)(i,s-1)})),i&&a){var u=s-(ti(a,i)+1);c.disabled.push({before:eg(i,u)}),c.disabled.push({after:(0,eh.Z)(a,u)})}!i&&a&&(c.disabled.push({before:(0,eh.Z)(a,-s+1)}),c.disabled.push({after:(0,eh.Z)(a,s-1)}))}return th.jsx(tV.Provider,{value:{selected:r,onDayClick:function(e,n,o){null===(s=t.onDayClick)||void 0===s||s.call(t,e,n,o);var i,a,l,s,c,u=(a=(i=r||{}).from,l=i.to,a&&l?tr(l,e)&&tr(a,e)?void 0:tr(l,e)?{from:l,to:void 0}:tr(a,e)?void 0:to(a,e)?{from:e,to:l}:{from:a,to:e}:l?to(e,l)?{from:l,to:e}:{from:e,to:l}:a?te(e,a)?{from:e,to:a}:{from:a,to:e}:{from:e,to:void 0});null===(c=t.onSelect)||void 0===c||c.call(t,u,e,n,o)},modifiers:c},children:n})}function tG(){var e=(0,d.useContext)(tV);if(!e)throw Error("useSelectRange must be used within a SelectRangeProvider");return e}function tY(e){return Array.isArray(e)?td([],e,!0):void 0!==e?[e]:[]}(l=c||(c={})).Outside="outside",l.Disabled="disabled",l.Selected="selected",l.Hidden="hidden",l.Today="today",l.RangeStart="range_start",l.RangeEnd="range_end",l.RangeMiddle="range_middle";var tQ=c.Selected,tJ=c.Disabled,t0=c.Hidden,t1=c.Today,t2=c.RangeEnd,t4=c.RangeMiddle,t3=c.RangeStart,t6=c.Outside,t8=(0,d.createContext)(void 0);function t5(e){var t,n,r,o=tS(),i=tK(),a=tG(),l=((t={})[tQ]=tY(o.selected),t[tJ]=tY(o.disabled),t[t0]=tY(o.hidden),t[t1]=[o.today],t[t2]=[],t[t4]=[],t[t3]=[],t[t6]=[],o.fromDate&&t[tJ].push({before:o.fromDate}),o.toDate&&t[tJ].push({after:o.toDate}),tm(o)?t[tJ]=t[tJ].concat(i.modifiers[tJ]):tg(o)&&(t[tJ]=t[tJ].concat(a.modifiers[tJ]),t[t3]=a.modifiers[t3],t[t4]=a.modifiers[t4],t[t2]=a.modifiers[t2]),t),s=(n=o.modifiers,r={},Object.entries(n).forEach(function(e){var t=e[0],n=e[1];r[t]=tY(n)}),r),c=tu(tu({},l),s);return th.jsx(t8.Provider,{value:c,children:e.children})}function t7(){var e=(0,d.useContext)(t8);if(!e)throw Error("useModifiers must be used within a ModifiersProvider");return e}function t9(e,t,n){var r=Object.keys(t).reduce(function(n,r){return t[r].some(function(t){if("boolean"==typeof t)return t;if(ex(t))return tr(e,t);if(Array.isArray(t)&&t.every(ex))return t.includes(e);if(t&&"object"==typeof t&&"from"in t)return r=t.from,o=t.to,r&&o?(0>ti(o,r)&&(r=(n=[o,r])[0],o=n[1]),ti(e,r)>=0&&ti(o,e)>=0):o?tr(o,e):!!r&&tr(r,e);if(t&&"object"==typeof t&&"dayOfWeek"in t)return t.dayOfWeek.includes(e.getDay());if(t&&"object"==typeof t&&"before"in t&&"after"in t){var n,r,o,i=ti(t.before,e),a=ti(t.after,e),l=i>0,s=a<0;return to(t.before,t.after)?s&&l:l||s}return t&&"object"==typeof t&&"after"in t?ti(e,t.after)>0:t&&"object"==typeof t&&"before"in t?ti(t.before,e)>0:"function"==typeof t&&t(e)})&&n.push(r),n},[]),o={};return r.forEach(function(e){return o[e]=!0}),n&&!e9(e,n)&&(o.outside=!0),o}var ne=(0,d.createContext)(void 0);function nt(e){var t=tM(),n=t7(),r=(0,d.useState)(),o=r[0],i=r[1],a=(0,d.useState)(),l=a[0],s=a[1],c=function(e,t){for(var n,r,o=es(e[0]),i=e6(e[e.length-1]),a=o;a<=i;){var l=t9(a,t);if(!(!l.disabled&&!l.hidden)){a=(0,eh.Z)(a,1);continue}if(l.selected)return a;l.today&&!r&&(r=a),n||(n=a),a=(0,eh.Z)(a,1)}return r||n}(t.displayMonths,n),u=(null!=o?o:l&&t.isDateDisplayed(l))?l:c,f=function(e){i(e)},p=tS(),h=function(e,r){if(o){var i=function e(t,n){var r=n.moveBy,o=n.direction,i=n.context,a=n.modifiers,l=n.retry,s=void 0===l?{count:0,lastFocused:t}:l,c=i.weekStartsOn,u=i.fromDate,d=i.toDate,f=i.locale,p=({day:eh.Z,week:ta,month:ev.Z,year:tl,startOfWeek:function(e){return i.ISOWeek?tn(e):tt(e,{locale:f,weekStartsOn:c})},endOfWeek:function(e){return i.ISOWeek?tc(e):ts(e,{locale:f,weekStartsOn:c})}})[r](t,"after"===o?1:-1);"before"===o&&u?p=ef([u,p]):"after"===o&&d&&(p=ep([d,p]));var h=!0;if(a){var m=t9(p,a);h=!m.disabled&&!m.hidden}return h?p:s.count>365?s.lastFocused:e(p,{moveBy:r,direction:o,context:i,modifiers:a,retry:tu(tu({},s),{count:s.count+1})})}(o,{moveBy:e,direction:r,context:p,modifiers:n});tr(o,i)||(t.goToDate(i,o),f(i))}};return th.jsx(ne.Provider,{value:{focusedDay:o,focusTarget:u,blur:function(){s(o),i(void 0)},focus:f,focusDayAfter:function(){return h("day","after")},focusDayBefore:function(){return h("day","before")},focusWeekAfter:function(){return h("week","after")},focusWeekBefore:function(){return h("week","before")},focusMonthBefore:function(){return h("month","before")},focusMonthAfter:function(){return h("month","after")},focusYearBefore:function(){return h("year","before")},focusYearAfter:function(){return h("year","after")},focusStartOfWeek:function(){return h("startOfWeek","before")},focusEndOfWeek:function(){return h("endOfWeek","after")}},children:e.children})}function nn(){var e=(0,d.useContext)(ne);if(!e)throw Error("useFocusContext must be used within a FocusProvider");return e}var nr=(0,d.createContext)(void 0);function no(e){return tv(e.initialProps)?th.jsx(ni,{initialProps:e.initialProps,children:e.children}):th.jsx(nr.Provider,{value:{selected:void 0},children:e.children})}function ni(e){var t=e.initialProps,n=e.children,r={selected:t.selected,onDayClick:function(e,n,r){var o,i,a;if(null===(o=t.onDayClick)||void 0===o||o.call(t,e,n,r),n.selected&&!t.required){null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,n,r);return}null===(a=t.onSelect)||void 0===a||a.call(t,e,e,n,r)}};return th.jsx(nr.Provider,{value:r,children:n})}function na(){var e=(0,d.useContext)(nr);if(!e)throw Error("useSelectSingle must be used within a SelectSingleProvider");return e}function nl(e){var t,n,r,o,i,a,l,s,u,f,p,h,m,g,v,y,b,x,w,k,S,E,O,C,j,_,P,T,M,N,A,I,R,D,L,z,Z,B,F,H,q,U,W=(0,d.useRef)(null),K=(t=e.date,n=e.displayMonth,a=tS(),l=nn(),s=t9(t,t7(),n),u=tS(),f=na(),p=tK(),h=tG(),g=(m=nn()).focusDayAfter,v=m.focusDayBefore,y=m.focusWeekAfter,b=m.focusWeekBefore,x=m.blur,w=m.focus,k=m.focusMonthBefore,S=m.focusMonthAfter,E=m.focusYearBefore,O=m.focusYearAfter,C=m.focusStartOfWeek,j=m.focusEndOfWeek,_={onClick:function(e){var n,r,o,i;tv(u)?null===(n=f.onDayClick)||void 0===n||n.call(f,t,s,e):tm(u)?null===(r=p.onDayClick)||void 0===r||r.call(p,t,s,e):tg(u)?null===(o=h.onDayClick)||void 0===o||o.call(h,t,s,e):null===(i=u.onDayClick)||void 0===i||i.call(u,t,s,e)},onFocus:function(e){var n;w(t),null===(n=u.onDayFocus)||void 0===n||n.call(u,t,s,e)},onBlur:function(e){var n;x(),null===(n=u.onDayBlur)||void 0===n||n.call(u,t,s,e)},onKeyDown:function(e){var n;switch(e.key){case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===u.dir?g():v();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===u.dir?v():g();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),y();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),b();break;case"PageUp":e.preventDefault(),e.stopPropagation(),e.shiftKey?E():k();break;case"PageDown":e.preventDefault(),e.stopPropagation(),e.shiftKey?O():S();break;case"Home":e.preventDefault(),e.stopPropagation(),C();break;case"End":e.preventDefault(),e.stopPropagation(),j()}null===(n=u.onDayKeyDown)||void 0===n||n.call(u,t,s,e)},onKeyUp:function(e){var n;null===(n=u.onDayKeyUp)||void 0===n||n.call(u,t,s,e)},onMouseEnter:function(e){var n;null===(n=u.onDayMouseEnter)||void 0===n||n.call(u,t,s,e)},onMouseLeave:function(e){var n;null===(n=u.onDayMouseLeave)||void 0===n||n.call(u,t,s,e)},onPointerEnter:function(e){var n;null===(n=u.onDayPointerEnter)||void 0===n||n.call(u,t,s,e)},onPointerLeave:function(e){var n;null===(n=u.onDayPointerLeave)||void 0===n||n.call(u,t,s,e)},onTouchCancel:function(e){var n;null===(n=u.onDayTouchCancel)||void 0===n||n.call(u,t,s,e)},onTouchEnd:function(e){var n;null===(n=u.onDayTouchEnd)||void 0===n||n.call(u,t,s,e)},onTouchMove:function(e){var n;null===(n=u.onDayTouchMove)||void 0===n||n.call(u,t,s,e)},onTouchStart:function(e){var n;null===(n=u.onDayTouchStart)||void 0===n||n.call(u,t,s,e)}},P=tS(),T=na(),M=tK(),N=tG(),A=tv(P)?T.selected:tm(P)?M.selected:tg(P)?N.selected:void 0,I=!!(a.onDayClick||"default"!==a.mode),(0,d.useEffect)(function(){var e;!s.outside&&l.focusedDay&&I&&tr(l.focusedDay,t)&&(null===(e=W.current)||void 0===e||e.focus())},[l.focusedDay,t,W,I,s.outside]),D=(R=[a.classNames.day],Object.keys(s).forEach(function(e){var t=a.modifiersClassNames[e];if(t)R.push(t);else if(Object.values(c).includes(e)){var n=a.classNames["day_".concat(e)];n&&R.push(n)}}),R).join(" "),L=tu({},a.styles.day),Object.keys(s).forEach(function(e){var t;L=tu(tu({},L),null===(t=a.modifiersStyles)||void 0===t?void 0:t[e])}),z=L,Z=!!(s.outside&&!a.showOutsideDays||s.hidden),B=null!==(i=null===(o=a.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:tH,F={style:z,className:D,children:th.jsx(B,{date:t,displayMonth:n,activeModifiers:s}),role:"gridcell"},H=l.focusTarget&&tr(l.focusTarget,t)&&!s.outside,q=l.focusedDay&&tr(l.focusedDay,t),U=tu(tu(tu({},F),((r={disabled:s.disabled,role:"gridcell"})["aria-selected"]=s.selected,r.tabIndex=q||H?0:-1,r)),_),{isButton:I,isHidden:Z,activeModifiers:s,selectedDays:A,buttonProps:U,divProps:F});return K.isHidden?th.jsx("div",{role:"gridcell"}):K.isButton?th.jsx(tR,tu({name:"day",ref:W},K.buttonProps)):th.jsx("div",tu({},K.divProps))}function ns(e){var t=e.number,n=e.dates,r=tS(),o=r.onWeekNumberClick,i=r.styles,a=r.classNames,l=r.locale,s=r.labels.labelWeekNumber,c=(0,r.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return th.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return th.jsx(tR,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,n,e)},children:c})}function nc(e){var t,n,r,o=tS(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:nl,u=null!==(n=null==s?void 0:s.WeekNumber)&&void 0!==n?n:ns;return l&&(r=th.jsx("td",{className:a.cell,style:i.cell,children:th.jsx(u,{number:e.weekNumber,dates:e.dates})})),th.jsxs("tr",{className:a.row,style:i.row,children:[r,e.dates.map(function(t){return th.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:th.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return(0,ei.Z)(1,arguments),Math.floor(function(e){return(0,ei.Z)(1,arguments),(0,eo.Z)(e).getTime()}(e)/1e3)}(t))})]})}function nu(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?tc(t):ts(t,n),o=(null==n?void 0:n.ISOWeek)?tn(e):tt(e,n),i=ti(r,o),a=[],l=0;l<=i;l++)a.push((0,eh.Z)(o,l));return a.reduce(function(e,t){var r=(null==n?void 0:n.ISOWeek)?function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return Math.round((tn(t).getTime()-(function(e){(0,ei.Z)(1,arguments);var t=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getFullYear(),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var o=tn(r),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var a=tn(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),tn(n)})(t).getTime())/6048e5)+1}(t):function(e,t){(0,ei.Z)(1,arguments);var n=(0,eo.Z)(e);return Math.round((tt(n,t).getTime()-(function(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:eS.firstWeekContainsDate)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),d=function(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,s,c,u=(0,eo.Z)(e),d=u.getFullYear(),f=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:eS.firstWeekContainsDate)&&void 0!==r?r:null===(s=eS.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(d+1,0,f),p.setHours(0,0,0,0);var h=tt(p,t),m=new Date(0);m.setFullYear(d,0,f),m.setHours(0,0,0,0);var g=tt(m,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=g.getTime()?d:d-1}(e,t),f=new Date(0);return f.setFullYear(d,0,u),f.setHours(0,0,0,0),tt(f,t)})(n,t).getTime())/6048e5)+1}(t,n),o=e.find(function(e){return e.weekNumber===r});return o?o.dates.push(t):e.push({weekNumber:r,dates:[t]}),e},[])}function nd(e){var t,n,r,o=tS(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,d=o.weekStartsOn,f=o.firstWeekContainsDate,p=o.ISOWeek,h=function(e,t){var n=nu(es(e),e6(e),t);if(null==t?void 0:t.useFixedWeeks){var r=function(e,t){return(0,ei.Z)(1,arguments),function(e,t,n){(0,ei.Z)(2,arguments);var r=tt(e,n),o=tt(t,n);return Math.round((r.getTime()-eD(r)-(o.getTime()-eD(o)))/6048e5)}(function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),es(e),t)+1}(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],a=ta(i,6-r),l=nu(ta(i,1),a,t);n.push.apply(n,l)}}return n}(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:p,locale:i,weekStartsOn:d,firstWeekContainsDate:f}),m=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:tF,g=null!==(n=null==u?void 0:u.Row)&&void 0!==n?n:nc,v=null!==(r=null==u?void 0:u.Footer)&&void 0!==r?r:tZ;return th.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&th.jsx(m,{}),th.jsx("tbody",{className:a.tbody,style:l.tbody,children:h.map(function(t){return th.jsx(g,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)})}),th.jsx(v,{displayMonth:e.displayMonth})]})}var nf="undefined"!=typeof window&&window.document&&window.document.createElement?d.useLayoutEffect:d.useEffect,np=!1,nh=0;function nm(){return"react-day-picker-".concat(++nh)}function ng(e){var t,n,r,o,i,a,l,s,c=tS(),u=c.dir,f=c.classNames,p=c.styles,h=c.components,m=tM().displayMonths,g=(r=null!=(t=c.id?"".concat(c.id,"-").concat(e.displayIndex):void 0)?t:np?nm():null,i=(o=(0,d.useState)(r))[0],a=o[1],nf(function(){null===i&&a(nm())},[]),(0,d.useEffect)(function(){!1===np&&(np=!0)},[]),null!==(n=null!=t?t:i)&&void 0!==n?n:void 0),v=c.id?"".concat(c.id,"-grid-").concat(e.displayIndex):void 0,y=[f.month],b=p.month,x=0===e.displayIndex,w=e.displayIndex===m.length-1,k=!x&&!w;"rtl"===u&&(w=(l=[x,w])[0],x=l[1]),x&&(y.push(f.caption_start),b=tu(tu({},b),p.caption_start)),w&&(y.push(f.caption_end),b=tu(tu({},b),p.caption_end)),k&&(y.push(f.caption_between),b=tu(tu({},b),p.caption_between));var S=null!==(s=null==h?void 0:h.Caption)&&void 0!==s?s:tz;return th.jsxs("div",{className:y.join(" "),style:b,children:[th.jsx(S,{id:g,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),th.jsx(nd,{id:v,"aria-labelledby":g,displayMonth:e.displayMonth})]},e.displayIndex)}function nv(e){var t=tS(),n=t.classNames,r=t.styles;return th.jsx("div",{className:n.months,style:r.months,children:e.children})}function ny(e){var t,n,r=e.initialProps,o=tS(),i=nn(),a=tM(),l=(0,d.useState)(!1),s=l[0],c=l[1];(0,d.useEffect)(function(){o.initialFocus&&i.focusTarget&&(s||(i.focus(i.focusTarget),c(!0)))},[o.initialFocus,s,i.focus,i.focusTarget,i]);var u=[o.classNames.root,o.className];o.numberOfMonths>1&&u.push(o.classNames.multiple_months),o.showWeekNumber&&u.push(o.classNames.with_weeknumber);var f=tu(tu({},o.styles.root),o.style),p=Object.keys(r).filter(function(e){return e.startsWith("data-")}).reduce(function(e,t){var n;return tu(tu({},e),((n={})[t]=r[t],n))},{}),h=null!==(n=null===(t=r.components)||void 0===t?void 0:t.Months)&&void 0!==n?n:nv;return th.jsx("div",tu({className:u.join(" "),style:f,dir:o.dir,id:o.id,nonce:r.nonce,title:r.title,lang:r.lang},p,{children:th.jsx(h,{children:a.displayMonths.map(function(e,t){return th.jsx(ng,{displayIndex:t,displayMonth:e},t)})})}))}function nb(e){var t=e.children,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(e,["children"]);return th.jsx(tk,{initialProps:n,children:th.jsx(tT,{children:th.jsx(no,{initialProps:n,children:th.jsx(tU,{initialProps:n,children:th.jsx(t$,{initialProps:n,children:th.jsx(t5,{children:th.jsx(nt,{children:t})})})})})})})}function nx(e){return th.jsx(nb,tu({},e,{children:th.jsx(ny,{initialProps:e})}))}let nw=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"}))},nk=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"}))},nS=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z"}))},nE=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z"}))};var nO=n(84264);n(41649);var nC=n(1526),nj=n(7084),n_=n(26898);let nP={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-1",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-1.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-1.5",fontSize:"text-lg"},xl:{paddingX:"px-3.5",paddingY:"py-1.5",fontSize:"text-xl"}},nT={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},nM={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},nN={[nj.wu.Increase]:{bgColor:(0,eJ.bM)(nj.fr.Emerald,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Emerald,n_.K.text).textColor},[nj.wu.ModerateIncrease]:{bgColor:(0,eJ.bM)(nj.fr.Emerald,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Emerald,n_.K.text).textColor},[nj.wu.Decrease]:{bgColor:(0,eJ.bM)(nj.fr.Rose,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Rose,n_.K.text).textColor},[nj.wu.ModerateDecrease]:{bgColor:(0,eJ.bM)(nj.fr.Rose,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Rose,n_.K.text).textColor},[nj.wu.Unchanged]:{bgColor:(0,eJ.bM)(nj.fr.Orange,n_.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Orange,n_.K.text).textColor}},nA={[nj.wu.Increase]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z"}))},[nj.wu.ModerateIncrease]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M16.0037 9.41421L7.39712 18.0208L5.98291 16.6066L14.5895 8H7.00373V6H18.0037V17H16.0037V9.41421Z"}))},[nj.wu.Decrease]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z"}))},[nj.wu.ModerateDecrease]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M14.5895 16.0032L5.98291 7.39664L7.39712 5.98242L16.0037 14.589V7.00324H18.0037V18.0032H7.00373V16.0032H14.5895Z"}))},[nj.wu.Unchanged]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z"}))}},nI=(0,eJ.fn)("BadgeDelta");d.forwardRef((e,t)=>{let{deltaType:n=nj.wu.Increase,isIncreasePositive:r=!0,size:o=nj.u8.SM,tooltip:i,children:a,className:l}=e,s=(0,u._T)(e,["deltaType","isIncreasePositive","size","tooltip","children","className"]),c=nA[n],f=(0,eJ.Fo)(n,r),p=a?nT:nP,{tooltipProps:h,getReferenceProps:m}=(0,nC.l)();return d.createElement("span",Object.assign({ref:(0,eJ.lq)([t,h.refs.setReference]),className:(0,ec.q)(nI("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-full bg-opacity-20 dark:bg-opacity-25",nN[f].bgColor,nN[f].textColor,p[o].paddingX,p[o].paddingY,p[o].fontSize,l)},m,s),d.createElement(nC.Z,Object.assign({text:i},h)),d.createElement(c,{className:(0,ec.q)(nI("icon"),"shrink-0",a?(0,ec.q)("-ml-1 mr-1.5"):nM[o].height,nM[o].width)}),a?d.createElement("p",{className:(0,ec.q)(nI("text"),"text-sm whitespace-nowrap")},a):null)}).displayName="BadgeDelta";var nR=n(47323);let nD=e=>{var{onClick:t,icon:n}=e,r=(0,u._T)(e,["onClick","icon"]);return d.createElement("button",Object.assign({type:"button",className:(0,ec.q)("flex items-center justify-center p-1 h-7 w-7 outline-none focus:ring-2 transition duration-100 border border-tremor-border dark:border-dark-tremor-border hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted rounded-tremor-small focus:border-tremor-brand-subtle select-none dark:focus:border-dark-tremor-brand-subtle focus:ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted text-tremor-content-subtle dark:text-dark-tremor-content-subtle hover:text-tremor-content dark:hover:text-dark-tremor-content")},r),d.createElement(nR.Z,{onClick:t,icon:n,variant:"simple",color:"slate",size:"sm"}))};function nL(e){var{mode:t,defaultMonth:n,selected:r,onSelect:o,locale:i,disabled:a,enableYearNavigation:l,classNames:s,weekStartsOn:c=0}=e,f=(0,u._T)(e,["mode","defaultMonth","selected","onSelect","locale","disabled","enableYearNavigation","classNames","weekStartsOn"]);return d.createElement(nx,Object.assign({showOutsideDays:!0,mode:t,defaultMonth:n,selected:r,onSelect:o,locale:i,disabled:a,weekStartsOn:c,classNames:Object.assign({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-2 relative items-center",caption_label:"text-tremor-default text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium",nav:"space-x-1 flex items-center",nav_button:"flex items-center justify-center p-1 h-7 w-7 outline-none focus:ring-2 transition duration-100 border border-tremor-border dark:border-dark-tremor-border hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted rounded-tremor-small focus:border-tremor-brand-subtle dark:focus:border-dark-tremor-brand-subtle focus:ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted text-tremor-content-subtle dark:text-dark-tremor-content-subtle hover:text-tremor-content dark:hover:text-dark-tremor-content",nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"w-9 font-normal text-center text-tremor-content-subtle dark:text-dark-tremor-content-subtle",row:"flex w-full mt-0.5",cell:"text-center p-0 relative focus-within:relative text-tremor-default text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",day:"h-9 w-9 p-0 hover:bg-tremor-background-subtle dark:hover:bg-dark-tremor-background-subtle outline-tremor-brand dark:outline-dark-tremor-brand rounded-tremor-default",day_today:"font-bold",day_selected:"aria-selected:bg-tremor-background-emphasis aria-selected:text-tremor-content-inverted dark:aria-selected:bg-dark-tremor-background-emphasis dark:aria-selected:text-dark-tremor-content-inverted ",day_disabled:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle disabled:hover:bg-transparent",day_outside:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle"},s),components:{IconLeft:e=>{var t=(0,u._T)(e,[]);return d.createElement(nw,Object.assign({className:"h-4 w-4"},t))},IconRight:e=>{var t=(0,u._T)(e,[]);return d.createElement(nk,Object.assign({className:"h-4 w-4"},t))},Caption:e=>{var t=(0,u._T)(e,[]);let{goToMonth:n,nextMonth:r,previousMonth:o,currentMonth:a}=tM();return d.createElement("div",{className:"flex justify-between items-center"},d.createElement("div",{className:"flex items-center space-x-1"},l&&d.createElement(nD,{onClick:()=>a&&n(tl(a,-1)),icon:nS}),d.createElement(nD,{onClick:()=>o&&n(o),icon:nw})),d.createElement(nO.Z,{className:"text-tremor-default tabular-nums capitalize text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium"},eQ(t.displayMonth,"LLLL yyy",{locale:i})),d.createElement("div",{className:"flex items-center space-x-1"},d.createElement(nD,{onClick:()=>r&&n(r),icon:nk}),l&&d.createElement(nD,{onClick:()=>a&&n(tl(a,1)),icon:nE})))}}},f))}nL.displayName="DateRangePicker",n(27281);var nz=n(57365),nZ=n(44140);let nB=el(),nF=d.forwardRef((e,t)=>{var n,r;let{value:o,defaultValue:i,onValueChange:a,enableSelect:l=!0,minDate:s,maxDate:c,placeholder:f="Select range",selectPlaceholder:p="Select range",disabled:h=!1,locale:m=eK,enableClear:g=!0,displayFormat:v,children:y,className:b,enableYearNavigation:x=!1,weekStartsOn:w=0,disabledDates:k}=e,S=(0,u._T)(e,["value","defaultValue","onValueChange","enableSelect","minDate","maxDate","placeholder","selectPlaceholder","disabled","locale","enableClear","displayFormat","children","className","enableYearNavigation","weekStartsOn","disabledDates"]),[E,O]=(0,nZ.Z)(i,o),[C,j]=(0,d.useState)(!1),[_,P]=(0,d.useState)(!1),T=(0,d.useMemo)(()=>{let e=[];return s&&e.push({before:s}),c&&e.push({after:c}),[...e,...null!=k?k:[]]},[s,c,k]),M=(0,d.useMemo)(()=>{let e=new Map;return y?d.Children.forEach(y,t=>{var n;e.set(t.props.value,{text:null!==(n=(0,eu.qg)(t))&&void 0!==n?n:t.props.value,from:t.props.from,to:t.props.to})}):e4.forEach(t=>{e.set(t.value,{text:t.text,from:t.from,to:nB})}),e},[y]),N=(0,d.useMemo)(()=>{if(y)return(0,eu.sl)(y);let e=new Map;return e4.forEach(t=>e.set(t.value,t.text)),e},[y]),A=(null==E?void 0:E.selectValue)||"",I=e1(null==E?void 0:E.from,s,A,M),R=e2(null==E?void 0:E.to,c,A,M),D=I||R?e3(I,R,m,v):f,L=es(null!==(r=null!==(n=null!=R?R:I)&&void 0!==n?n:c)&&void 0!==r?r:nB),z=g&&!h;return d.createElement("div",Object.assign({ref:t,className:(0,ec.q)("w-full min-w-[10rem] relative flex justify-between text-tremor-default max-w-sm shadow-tremor-input dark:shadow-dark-tremor-input rounded-tremor-default",b)},S),d.createElement(J,{as:"div",className:(0,ec.q)("w-full",l?"rounded-l-tremor-default":"rounded-tremor-default",C&&"ring-2 ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted z-10")},d.createElement("div",{className:"relative w-full"},d.createElement(J.Button,{onFocus:()=>j(!0),onBlur:()=>j(!1),disabled:h,className:(0,ec.q)("w-full outline-none text-left whitespace-nowrap truncate focus:ring-2 transition duration-100 rounded-l-tremor-default flex flex-nowrap border pl-3 py-2","rounded-l-tremor-default border-tremor-border text-tremor-content-emphasis focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",l?"rounded-l-tremor-default":"rounded-tremor-default",z?"pr-8":"pr-4",(0,eu.um)((0,eu.Uh)(I||R),h))},d.createElement(en,{className:(0,ec.q)(e0("calendarIcon"),"flex-none shrink-0 h-5 w-5 -ml-0.5 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle"),"aria-hidden":"true"}),d.createElement("p",{className:"truncate"},D)),z&&I?d.createElement("button",{type:"button",className:(0,ec.q)("absolute outline-none inset-y-0 right-0 flex items-center transition duration-100 mr-4"),onClick:e=>{e.preventDefault(),null==a||a({}),O({})}},d.createElement(er.Z,{className:(0,ec.q)(e0("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null),d.createElement(ee.u,{className:"absolute z-10 min-w-min left-0",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},d.createElement(J.Panel,{focus:!0,className:(0,ec.q)("divide-y overflow-y-auto outline-none rounded-tremor-default p-3 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},d.createElement(nL,Object.assign({mode:"range",showOutsideDays:!0,defaultMonth:L,selected:{from:I,to:R},onSelect:e=>{null==a||a({from:null==e?void 0:e.from,to:null==e?void 0:e.to}),O({from:null==e?void 0:e.from,to:null==e?void 0:e.to})},locale:m,disabled:T,enableYearNavigation:x,classNames:{day_range_middle:(0,ec.q)("!rounded-none aria-selected:!bg-tremor-background-subtle aria-selected:dark:!bg-dark-tremor-background-subtle aria-selected:!text-tremor-content aria-selected:dark:!bg-dark-tremor-background-subtle"),day_range_start:"rounded-r-none rounded-l-tremor-small aria-selected:text-tremor-brand-inverted dark:aria-selected:text-dark-tremor-brand-inverted",day_range_end:"rounded-l-none rounded-r-tremor-small aria-selected:text-tremor-brand-inverted dark:aria-selected:text-dark-tremor-brand-inverted"},weekStartsOn:w},e))))),l&&d.createElement(et.R,{as:"div",className:(0,ec.q)("w-48 -ml-px rounded-r-tremor-default",_&&"ring-2 ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted z-10"),value:A,onChange:e=>{let{from:t,to:n}=M.get(e),r=null!=n?n:nB;null==a||a({from:t,to:r,selectValue:e}),O({from:t,to:r,selectValue:e})},disabled:h},e=>{var t;let{value:n}=e;return d.createElement(d.Fragment,null,d.createElement(et.R.Button,{onFocus:()=>P(!0),onBlur:()=>P(!1),className:(0,ec.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-r-tremor-default transition duration-100 border px-4 py-2","border-tremor-border shadow-tremor-input text-tremor-content-emphasis focus:border-tremor-brand-subtle","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle",(0,eu.um)((0,eu.Uh)(n),h))},n&&null!==(t=N.get(n))&&void 0!==t?t:p),d.createElement(ee.u,{className:"absolute z-10 w-full inset-x-0 right-0",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},d.createElement(et.R.Options,{className:(0,ec.q)("divide-y overflow-y-auto outline-none border my-1","shadow-tremor-dropdown bg-tremor-background border-tremor-border divide-tremor-border rounded-tremor-default","dark:shadow-dark-tremor-dropdown dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border")},null!=y?y:e4.map(e=>d.createElement(nz.Z,{key:e.value,value:e.value},e.text)))))}))});nF.displayName="DateRangePicker"},92414:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(5853),o=n(2265);n(42698),n(64016),n(8710);var i=n(33232),a=n(44140),l=n(58747);let s=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z"}))};var c=n(4537),u=n(9528),d=n(33044);let f=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},t),o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))};var p=n(97324),h=n(1153),m=n(96398);let g=(0,h.fn)("MultiSelect"),v=o.forwardRef((e,t)=>{let{defaultValue:n,value:h,onValueChange:v,placeholder:y="Select...",placeholderSearch:b="Search",disabled:x=!1,icon:w,children:k,className:S}=e,E=(0,r._T)(e,["defaultValue","value","onValueChange","placeholder","placeholderSearch","disabled","icon","children","className"]),[O,C]=(0,a.Z)(n,h),{reactElementChildren:j,optionsAvailable:_}=(0,o.useMemo)(()=>{let e=o.Children.toArray(k).filter(o.isValidElement);return{reactElementChildren:e,optionsAvailable:(0,m.n0)("",e)}},[k]),[P,T]=(0,o.useState)(""),M=(null!=O?O:[]).length>0,N=(0,o.useMemo)(()=>P?(0,m.n0)(P,j):_,[P,j,_]),A=()=>{T("")};return o.createElement(u.R,Object.assign({as:"div",ref:t,defaultValue:O,value:O,onChange:e=>{null==v||v(e),C(e)},disabled:x,className:(0,p.q)("w-full min-w-[10rem] relative text-tremor-default",S)},E,{multiple:!0}),e=>{let{value:t}=e;return o.createElement(o.Fragment,null,o.createElement(u.R.Button,{className:(0,p.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-1.5","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",w?"pl-11 -ml-0.5":"pl-3",(0,m.um)(t.length>0,x))},w&&o.createElement("span",{className:(0,p.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},o.createElement(w,{className:(0,p.q)(g("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement("div",{className:"h-6 flex items-center"},t.length>0?o.createElement("div",{className:"flex flex-nowrap overflow-x-scroll [&::-webkit-scrollbar]:hidden [scrollbar-width:none] gap-x-1 mr-5 -ml-1.5 relative"},_.filter(e=>t.includes(e.props.value)).map((e,n)=>{var r;return o.createElement("div",{key:n,className:(0,p.q)("max-w-[100px] lg:max-w-[200px] flex justify-center items-center pl-2 pr-1.5 py-1 font-medium","rounded-tremor-small","bg-tremor-background-muted dark:bg-dark-tremor-background-muted","bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle","text-tremor-content-default dark:text-dark-tremor-content-default","text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis")},o.createElement("div",{className:"text-xs truncate "},null!==(r=e.props.children)&&void 0!==r?r:e.props.value),o.createElement("div",{onClick:n=>{n.preventDefault();let r=t.filter(t=>t!==e.props.value);null==v||v(r),C(r)}},o.createElement(f,{className:(0,p.q)(g("clearIconItem"),"cursor-pointer rounded-tremor-full w-3.5 h-3.5 ml-2","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle dark:hover:text-tremor-content")})))})):o.createElement("span",null,y)),o.createElement("span",{className:(0,p.q)("absolute inset-y-0 right-0 flex items-center mr-2.5")},o.createElement(l.Z,{className:(0,p.q)(g("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),M&&!x?o.createElement("button",{type:"button",className:(0,p.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),C([]),null==v||v([])}},o.createElement(c.Z,{className:(0,p.q)(g("clearIconAllItems"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,o.createElement(d.u,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},o.createElement(u.R.Options,{className:(0,p.q)("divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},o.createElement("div",{className:(0,p.q)("flex items-center w-full px-2.5","bg-tremor-background-muted","dark:bg-dark-tremor-background-muted")},o.createElement("span",null,o.createElement(s,{className:(0,p.q)("flex-none w-4 h-4 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement("input",{name:"search",type:"input",autoComplete:"off",placeholder:b,className:(0,p.q)("w-full focus:outline-none focus:ring-none bg-transparent text-tremor-default py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onKeyDown:e=>{"Space"===e.code&&""!==e.target.value&&e.stopPropagation()},onChange:e=>T(e.target.value),value:P})),o.createElement(i.Z.Provider,Object.assign({},{onBlur:{handleResetSearch:A}},{value:{selectedValue:t}}),N))))})});v.displayName="MultiSelect"},46030:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(5853);n(42698),n(64016),n(8710);var o=n(33232),i=n(2265),a=n(97324),l=n(1153),s=n(9528);let c=(0,l.fn)("MultiSelectItem"),u=i.forwardRef((e,t)=>{let{value:n,className:u,children:d}=e,f=(0,r._T)(e,["value","className","children"]),{selectedValue:p}=(0,i.useContext)(o.Z),h=(0,l.NZ)(n,p);return i.createElement(s.R.Option,Object.assign({className:(0,a.q)(c("root"),"flex justify-start items-center cursor-default text-tremor-default p-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",u),ref:t,key:n,value:n},f),i.createElement("input",{type:"checkbox",className:(0,a.q)(c("checkbox"),"flex-none focus:ring-none focus:outline-none cursor-pointer mr-2.5","accent-tremor-brand","dark:accent-dark-tremor-brand"),checked:h,readOnly:!0}),i.createElement("span",{className:"whitespace-nowrap truncate"},null!=d?d:n))});u.displayName="MultiSelectItem"},30150:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(5853),o=n(2265);let i=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M12 4v16m8-8H4"}))},a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M20 12H4"}))};var l=n(97324),s=n(1153),c=n(69262);let u="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",d="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",f=o.forwardRef((e,t)=>{let{onSubmit:n,enableStepper:f=!0,disabled:p,onValueChange:h,onChange:m}=e,g=(0,r._T)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),v=(0,o.useRef)(null),[y,b]=o.useState(!1),x=o.useCallback(()=>{b(!0)},[]),w=o.useCallback(()=>{b(!1)},[]),[k,S]=o.useState(!1),E=o.useCallback(()=>{S(!0)},[]),O=o.useCallback(()=>{S(!1)},[]);return o.createElement(c.Z,Object.assign({type:"number",ref:(0,s.lq)([v,t]),disabled:p,makeInputClassName:(0,s.fn)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null===(t=v.current)||void 0===t?void 0:t.value;null==n||n(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&x(),"ArrowUp"===e.key&&E()},onKeyUp:e=>{"ArrowDown"===e.key&&w(),"ArrowUp"===e.key&&O()},onChange:e=>{p||(null==h||h(parseFloat(e.target.value)),null==m||m(e))},stepper:f?o.createElement("div",{className:(0,l.q)("flex justify-center align-middle")},o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null===(e=v.current)||void 0===e||e.stepDown(),null===(t=v.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,l.q)(!p&&d,u,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(a,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null===(e=v.current)||void 0===e||e.stepUp(),null===(t=v.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,l.q)(!p&&d,u,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(i,{"data-testid":"step-up",className:(k?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},g))});f.displayName="NumberInput"},54250:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(5853),o=n(2265),i=n(44140),a=n(34237),l=n(33044),s=n(58747),c=n(4537),u=n(97324),d=n(1153),f=n(96398);let p=(0,d.fn)("SearchSelect"),h=(0,d.fn)("SearchSelect"),m=o.forwardRef((e,t)=>{let{defaultValue:n,value:d,onValueChange:m,placeholder:g="Select...",disabled:v=!1,icon:y,enableClear:b=!0,children:x,className:w}=e,k=(0,r._T)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","children","className"]),[S,E]=(0,o.useState)(""),[O,C]=(0,i.Z)(n,d),{reactElementChildren:j,valueToNameMapping:_}=(0,o.useMemo)(()=>{let e=o.Children.toArray(x).filter(o.isValidElement);return{reactElementChildren:e,valueToNameMapping:(0,f.sl)(e)}},[x]),P=(0,o.useMemo)(()=>(0,f.n0)(S,j),[S,j]);return o.createElement(a.h,Object.assign({as:"div",ref:t,defaultValue:O,value:O,onChange:e=>{null==m||m(e),C(e)},disabled:v,className:(0,u.q)("w-full min-w-[10rem] relative text-tremor-default",w)},k),e=>{let{value:t}=e;return o.createElement(o.Fragment,null,o.createElement(a.h.Button,{className:"w-full"},y&&o.createElement("span",{className:(0,u.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},o.createElement(y,{className:(0,u.q)(p("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement(a.h.Input,{className:(0,u.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 text-tremor-default pr-14 border py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",y?"pl-10":"pl-3",v?"placeholder:text-tremor-content-subtle dark:placeholder:text-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-tremor-content",(0,f.um)((0,f.Uh)(t),v)),placeholder:g,onChange:e=>E(e.target.value),displayValue:e=>{var t;return null!==(t=_.get(e))&&void 0!==t?t:""}}),o.createElement("div",{className:(0,u.q)("absolute inset-y-0 right-0 flex items-center pr-2.5")},o.createElement(s.Z,{className:(0,u.q)(p("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&O?o.createElement("button",{type:"button",className:(0,u.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),C(""),E(""),null==m||m("")}},o.createElement(c.Z,{className:(0,u.q)(h("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,P.length>0&&o.createElement(l.u,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},o.createElement(a.h.Options,{className:(0,u.q)("divide-y overflow-y-auto outline-none rounded-tremor-default text-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},P)))})});m.displayName="SearchSelect"},70450:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),o=n(2265),i=n(97324),a=n(1153),l=n(34237);let s=(0,a.fn)("SearchSelectItem"),c=o.forwardRef((e,t)=>{let{value:n,icon:a,className:c,children:u}=e,d=(0,r._T)(e,["value","icon","className","children"]);return o.createElement(l.h.Option,Object.assign({className:(0,i.q)(s("root"),"flex justify-start items-center cursor-default text-tremor-default p-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong ui-selected:bg-tremor-background-muted text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",c),ref:t,key:n,value:n},d),a&&o.createElement(a,{className:(0,i.q)(s("icon"),"flex-none h-5 w-5 mr-3","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}),o.createElement("span",{className:"whitespace-nowrap truncate"},null!=u?u:n))});c.displayName="SearchSelectItem"},27281:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(5853),o=n(2265),i=n(58747),a=n(4537),l=n(97324),s=n(1153),c=n(96398),u=n(9528),d=n(33044),f=n(44140);let p=(0,s.fn)("Select"),h=o.forwardRef((e,t)=>{let{defaultValue:n,value:s,onValueChange:h,placeholder:m="Select...",disabled:g=!1,icon:v,enableClear:y=!0,children:b,className:x}=e,w=(0,r._T)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","children","className"]),[k,S]=(0,f.Z)(n,s),E=(0,o.useMemo)(()=>{let e=o.Children.toArray(b).filter(o.isValidElement);return(0,c.sl)(e)},[b]);return o.createElement(u.R,Object.assign({as:"div",ref:t,defaultValue:k,value:k,onChange:e=>{null==h||h(e),S(e)},disabled:g,className:(0,l.q)("w-full min-w-[10rem] relative text-tremor-default",x)},w),e=>{var t;let{value:n}=e;return o.createElement(o.Fragment,null,o.createElement(u.R.Button,{className:(0,l.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",v?"pl-10":"pl-3",(0,c.um)((0,c.Uh)(n),g))},v&&o.createElement("span",{className:(0,l.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},o.createElement(v,{className:(0,l.q)(p("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement("span",{className:"w-[90%] block truncate"},n&&null!==(t=E.get(n))&&void 0!==t?t:m),o.createElement("span",{className:(0,l.q)("absolute inset-y-0 right-0 flex items-center mr-3")},o.createElement(i.Z,{className:(0,l.q)(p("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),y&&k?o.createElement("button",{type:"button",className:(0,l.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),S(""),null==h||h("")}},o.createElement(a.Z,{className:(0,l.q)(p("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,o.createElement(d.u,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},o.createElement(u.R.Options,{className:(0,l.q)("divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},b)))})});h.displayName="Select"},57365:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(5853),o=n(2265),i=n(9528),a=n(97324);let l=(0,n(1153).fn)("SelectItem"),s=o.forwardRef((e,t)=>{let{value:n,icon:s,className:c,children:u}=e,d=(0,r._T)(e,["value","icon","className","children"]);return o.createElement(i.R.Option,Object.assign({className:(0,a.q)(l("root"),"flex justify-start items-center cursor-default text-tremor-default px-2.5 py-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong ui-selected:bg-tremor-background-muted text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",c),ref:t,key:n,value:n},d),s&&o.createElement(s,{className:(0,a.q)(l("icon"),"flex-none w-5 h-5 mr-1.5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}),o.createElement("span",{className:"whitespace-nowrap truncate"},null!=u?u:n))});s.displayName="SelectItem"},92858:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(5853),o=n(2265),i=n(62963),a=n(90945),l=n(13323),s=n(17684),c=n(80004),u=n(93689),d=n(38198),f=n(47634),p=n(56314),h=n(27847),m=n(64518);let g=(0,o.createContext)(null),v=Object.assign((0,h.yV)(function(e,t){let n=(0,s.M)(),{id:r="headlessui-description-".concat(n),...i}=e,a=function e(){let t=(0,o.useContext)(g);if(null===t){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),l=(0,u.T)(t);(0,m.e)(()=>a.register(r),[r,a.register]);let c={ref:l,...a.props,id:r};return(0,h.sY)({ourProps:c,theirProps:i,slot:a.slot||{},defaultTag:"p",name:a.name||"Description"})}),{});var y=n(37388);let b=(0,o.createContext)(null),x=Object.assign((0,h.yV)(function(e,t){let n=(0,s.M)(),{id:r="headlessui-label-".concat(n),passive:i=!1,...a}=e,l=function e(){let t=(0,o.useContext)(b);if(null===t){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),c=(0,u.T)(t);(0,m.e)(()=>l.register(r),[r,l.register]);let d={ref:c,...l.props,id:r};return i&&("onClick"in d&&(delete d.htmlFor,delete d.onClick),"onClick"in a&&delete a.onClick),(0,h.sY)({ourProps:d,theirProps:a,slot:l.slot||{},defaultTag:"label",name:l.name||"Label"})}),{}),w=(0,o.createContext)(null);w.displayName="GroupContext";let k=o.Fragment,S=Object.assign((0,h.yV)(function(e,t){let n=(0,s.M)(),{id:r="headlessui-switch-".concat(n),checked:m,defaultChecked:g=!1,onChange:v,name:b,value:x,form:k,...S}=e,E=(0,o.useContext)(w),O=(0,o.useRef)(null),C=(0,u.T)(O,t,null===E?null:E.setSwitch),[j,_]=(0,i.q)(m,v,g),P=(0,l.z)(()=>null==_?void 0:_(!j)),T=(0,l.z)(e=>{if((0,f.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),P()}),M=(0,l.z)(e=>{e.key===y.R.Space?(e.preventDefault(),P()):e.key===y.R.Enter&&(0,p.g)(e.currentTarget)}),N=(0,l.z)(e=>e.preventDefault()),A=(0,o.useMemo)(()=>({checked:j}),[j]),I={id:r,ref:C,role:"switch",type:(0,c.f)(e,O),tabIndex:0,"aria-checked":j,"aria-labelledby":null==E?void 0:E.labelledby,"aria-describedby":null==E?void 0:E.describedby,onClick:T,onKeyUp:M,onKeyPress:N},R=(0,a.G)();return(0,o.useEffect)(()=>{var e;let t=null==(e=O.current)?void 0:e.closest("form");t&&void 0!==g&&R.addEventListener(t,"reset",()=>{_(g)})},[O,_]),o.createElement(o.Fragment,null,null!=b&&j&&o.createElement(d._,{features:d.A.Hidden,...(0,h.oA)({as:"input",type:"checkbox",hidden:!0,readOnly:!0,form:k,checked:j,name:b,value:x})}),(0,h.sY)({ourProps:I,theirProps:S,slot:A,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[n,r]=(0,o.useState)(null),[i,a]=function(){let[e,t]=(0,o.useState)([]);return[e.length>0?e.join(" "):void 0,(0,o.useMemo)(()=>function(e){let n=(0,l.z)(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),r=(0,o.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props}),[n,e.slot,e.name,e.props]);return o.createElement(b.Provider,{value:r},e.children)},[t])]}(),[s,c]=function(){let[e,t]=(0,o.useState)([]);return[e.length>0?e.join(" "):void 0,(0,o.useMemo)(()=>function(e){let n=(0,l.z)(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),r=(0,o.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props}),[n,e.slot,e.name,e.props]);return o.createElement(g.Provider,{value:r},e.children)},[t])]}(),u=(0,o.useMemo)(()=>({switch:n,setSwitch:r,labelledby:i,describedby:s}),[n,r,i,s]);return o.createElement(c,{name:"Switch.Description"},o.createElement(a,{name:"Switch.Label",props:{htmlFor:null==(t=u.switch)?void 0:t.id,onClick(e){n&&("LABEL"===e.currentTarget.tagName&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},o.createElement(w.Provider,{value:u},(0,h.sY)({ourProps:{},theirProps:e,defaultTag:k,name:"Switch.Group"}))))},Label:x,Description:v});var E=n(44140),O=n(26898),C=n(97324),j=n(1153),_=n(1526);let P=(0,j.fn)("Switch"),T=o.forwardRef((e,t)=>{let{checked:n,defaultChecked:i=!1,onChange:a,color:l,name:s,error:c,errorMessage:u,disabled:d,required:f,tooltip:p,id:h}=e,m=(0,r._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:l?(0,j.bM)(l,O.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:l?(0,j.bM)(l,O.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[v,y]=(0,E.Z)(i,n),[b,x]=(0,o.useState)(!1),{tooltipProps:w,getReferenceProps:k}=(0,_.l)(300);return o.createElement("div",{className:"flex flex-row items-center justify-start"},o.createElement(_.Z,Object.assign({text:p},w)),o.createElement("div",Object.assign({ref:(0,j.lq)([t,w.refs.setReference]),className:(0,C.q)(P("root"),"flex flex-row relative h-5")},m,k),o.createElement("input",{type:"checkbox",className:(0,C.q)(P("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:s,required:f,checked:v,onChange:e=>{e.preventDefault()}}),o.createElement(S,{checked:v,onChange:e=>{y(e),null==a||a(e)},disabled:d,className:(0,C.q)(P("switch"),"w-10 h-5 group relative inline-flex flex-shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>x(!0),onBlur:()=>x(!1),id:h},o.createElement("span",{className:(0,C.q)(P("sr-only"),"sr-only")},"Switch ",v?"on":"off"),o.createElement("span",{"aria-hidden":"true",className:(0,C.q)(P("background"),v?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),o.createElement("span",{"aria-hidden":"true",className:(0,C.q)(P("round"),v?(0,C.q)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",b?(0,C.q)("ring-2",g.ringColor):"")}))),c&&u?o.createElement("p",{className:(0,C.q)(P("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});T.displayName="Switch"},12485:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(5853),o=n(31492),i=n(26898),a=n(97324),l=n(1153),s=n(2265),c=n(35242),u=n(42698);n(64016),n(8710),n(33232);let d=(0,l.fn)("Tab"),f=s.forwardRef((e,t)=>{let{icon:n,className:f,children:p}=e,h=(0,r._T)(e,["icon","className","children"]),m=(0,s.useContext)(c.O),g=(0,s.useContext)(u.Z);return s.createElement(o.O,Object.assign({ref:t,className:(0,a.q)(d("root"),"flex whitespace-nowrap truncate max-w-xs outline-none focus:ring-0 text-tremor-default transition duration-100",g?(0,l.bM)(g,i.K.text).selectTextColor:"solid"===m?"ui-selected:text-tremor-content-emphasis dark:ui-selected:text-dark-tremor-content-emphasis":"ui-selected:text-tremor-brand dark:ui-selected:text-dark-tremor-brand",function(e,t){switch(e){case"line":return(0,a.q)("ui-selected:border-b-2 hover:border-b-2 border-transparent transition duration-100 -mb-px px-2 py-2","hover:border-tremor-content hover:text-tremor-content-emphasis text-tremor-content","dark:hover:border-dark-tremor-content-emphasis dark:hover:text-dark-tremor-content-emphasis dark:text-dark-tremor-content",t?(0,l.bM)(t,i.K.border).selectBorderColor:"ui-selected:border-tremor-brand dark:ui-selected:border-dark-tremor-brand");case"solid":return(0,a.q)("border-transparent border rounded-tremor-small px-2.5 py-1","ui-selected:border-tremor-border ui-selected:bg-tremor-background ui-selected:shadow-tremor-input hover:text-tremor-content-emphasis ui-selected:text-tremor-brand","dark:ui-selected:border-dark-tremor-border dark:ui-selected:bg-dark-tremor-background dark:ui-selected:shadow-dark-tremor-input dark:hover:text-dark-tremor-content-emphasis dark:ui-selected:text-dark-tremor-brand",t?(0,l.bM)(t,i.K.text).selectTextColor:"text-tremor-content dark:text-dark-tremor-content")}}(m,g),f)},h),n?s.createElement(n,{className:(0,a.q)(d("icon"),"flex-none h-5 w-5",p?"mr-2":"")}):null,p?s.createElement("span",null,p):null)});f.displayName="Tab"},18135:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),o=n(31492),i=n(97324),a=n(1153),l=n(2265);let s=(0,a.fn)("TabGroup"),c=l.forwardRef((e,t)=>{let{defaultIndex:n,index:a,onIndexChange:c,children:u,className:d}=e,f=(0,r._T)(e,["defaultIndex","index","onIndexChange","children","className"]);return l.createElement(o.O.Group,Object.assign({as:"div",ref:t,defaultIndex:n,selectedIndex:a,onChange:c,className:(0,i.q)(s("root"),"w-full",d)},f),u)});c.displayName="TabGroup"},35242:function(e,t,n){"use strict";n.d(t,{O:function(){return c},Z:function(){return d}});var r=n(5853),o=n(2265),i=n(42698);n(64016),n(8710),n(33232);var a=n(31492),l=n(97324);let s=(0,n(1153).fn)("TabList"),c=(0,o.createContext)("line"),u={line:(0,l.q)("flex border-b space-x-4","border-tremor-border","dark:border-dark-tremor-border"),solid:(0,l.q)("inline-flex p-0.5 rounded-tremor-default space-x-1.5","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle")},d=o.forwardRef((e,t)=>{let{color:n,variant:d="line",children:f,className:p}=e,h=(0,r._T)(e,["color","variant","children","className"]);return o.createElement(a.O.List,Object.assign({ref:t,className:(0,l.q)(s("root"),"justify-start overflow-x-clip",u[d],p)},h),o.createElement(c.Provider,{value:d},o.createElement(i.Z.Provider,{value:n},f)))});d.displayName="TabList"},29706:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(5853);n(42698);var o=n(64016);n(8710);var i=n(33232),a=n(97324),l=n(1153),s=n(2265);let c=(0,l.fn)("TabPanel"),u=s.forwardRef((e,t)=>{let{children:n,className:l}=e,u=(0,r._T)(e,["children","className"]),{selectedValue:d}=(0,s.useContext)(i.Z),f=d===(0,s.useContext)(o.Z);return s.createElement("div",Object.assign({ref:t,className:(0,a.q)(c("root"),"w-full mt-2",f?"":"hidden",l),"aria-selected":f?"true":"false"},u),n)});u.displayName="TabPanel"},77991:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(5853),o=n(31492);n(42698);var i=n(64016);n(8710);var a=n(33232),l=n(97324),s=n(1153),c=n(2265);let u=(0,s.fn)("TabPanels"),d=c.forwardRef((e,t)=>{let{children:n,className:s}=e,d=(0,r._T)(e,["children","className"]);return c.createElement(o.O.Panels,Object.assign({as:"div",ref:t,className:(0,l.q)(u("root"),"w-full",s)},d),e=>{let{selectedIndex:t}=e;return c.createElement(a.Z.Provider,{value:{selectedValue:t}},c.Children.map(n,(e,t)=>c.createElement(i.Z.Provider,{value:t},e)))})});d.displayName="TabPanels"},16853:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(5853),o=n(96398),i=n(44140),a=n(2265),l=n(97324),s=n(1153);let c=(0,s.fn)("Textarea"),u=a.forwardRef((e,t)=>{let{value:n,defaultValue:u="",placeholder:d="Type...",error:f=!1,errorMessage:p,disabled:h=!1,className:m,onChange:g,onValueChange:v}=e,y=(0,r._T)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange"]),[b,x]=(0,i.Z)(u,n),w=(0,a.useRef)(null),k=(0,o.Uh)(b);return a.createElement(a.Fragment,null,a.createElement("textarea",Object.assign({ref:(0,s.lq)([w,t]),value:b,placeholder:d,disabled:h,className:(0,l.q)(c("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,o.um)(k,h,f),h?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",m),"data-testid":"text-area",onChange:e=>{null==g||g(e),x(e.target.value),null==v||v(e.target.value)}},y)),f&&p?a.createElement("p",{className:(0,l.q)(c("errorMessage"),"text-sm text-red-500 mt-1")},p):null)});u.displayName="Textarea"},87452:function(e,t,n){"use strict";n.d(t,{Z:function(){return d},r:function(){return u}});var r=n(5853),o=n(21886);n(42698),n(64016);var i=n(8710);n(33232);var a=n(97324),l=n(1153),s=n(2265);let c=(0,l.fn)("Accordion"),u=(0,s.createContext)({isOpen:!1}),d=s.forwardRef((e,t)=>{var n;let{defaultOpen:l=!1,children:d,className:f}=e,p=(0,r._T)(e,["defaultOpen","children","className"]),h=null!==(n=(0,s.useContext)(i.Z))&&void 0!==n?n:(0,a.q)("rounded-tremor-default border");return s.createElement(o.p,Object.assign({as:"div",ref:t,className:(0,a.q)(c("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",h,f),defaultOpen:l},p),e=>{let{open:t}=e;return s.createElement(u.Provider,{value:{isOpen:t}},d)})});d.displayName="Accordion"},88829:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(5853),o=n(2265),i=n(21886),a=n(97324);let l=(0,n(1153).fn)("AccordionBody"),s=o.forwardRef((e,t)=>{let{children:n,className:s}=e,c=(0,r._T)(e,["children","className"]);return o.createElement(i.p.Panel,Object.assign({ref:t,className:(0,a.q)(l("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",s)},c),n)});s.displayName="AccordionBody"},72208:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(5853),o=n(2265),i=n(21886);let a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var l=n(87452),s=n(97324);let c=(0,n(1153).fn)("AccordionHeader"),u=o.forwardRef((e,t)=>{let{children:n,className:u}=e,d=(0,r._T)(e,["children","className"]),{isOpen:f}=(0,o.useContext)(l.r);return o.createElement(i.p.Button,Object.assign({ref:t,className:(0,s.q)(c("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",u)},d),o.createElement("div",{className:(0,s.q)(c("children"),"flex flex-1 text-inherit mr-4")},n),o.createElement("div",null,o.createElement(a,{className:(0,s.q)(c("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",f?"transition-all":"transition-all -rotate-180")})))});u.displayName="AccordionHeader"},67982:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(5853),o=n(97324),i=n(1153),a=n(2265);let l=(0,i.fn)("Divider"),s=a.forwardRef((e,t)=>{let{className:n,children:i}=e,s=(0,r._T)(e,["className","children"]);return a.createElement("div",Object.assign({ref:t,className:(0,o.q)(l("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",n)},s),i?a.createElement(a.Fragment,null,a.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),a.createElement("div",{className:(0,o.q)("text-inherit whitespace-nowrap")},i),a.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):a.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});s.displayName="Divider"},49804:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),o=n(97324),i=n(1153),a=n(2265),l=n(9496);let s=(0,i.fn)("Col"),c=a.forwardRef((e,t)=>{let{numColSpan:n=1,numColSpanSm:i,numColSpanMd:c,numColSpanLg:u,children:d,className:f}=e,p=(0,r._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),h=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return a.createElement("div",Object.assign({ref:t,className:(0,o.q)(s("root"),(()=>{let e=h(n,l.PT),t=h(i,l.SP),r=h(c,l.VS),a=h(u,l._w);return(0,o.q)(e,t,r,a)})(),f)},p),d)});c.displayName="Col"},67101:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(5853),o=n(97324),i=n(1153),a=n(2265),l=n(9496);let s=(0,i.fn)("Grid"),c=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",u=a.forwardRef((e,t)=>{let{numItems:n=1,numItemsSm:i,numItemsMd:u,numItemsLg:d,children:f,className:p}=e,h=(0,r._T)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),m=c(n,l._m),g=c(i,l.LH),v=c(u,l.l5),y=c(d,l.N4),b=(0,o.q)(m,g,v,y);return a.createElement("div",Object.assign({ref:t,className:(0,o.q)(s("root"),"grid",b,p)},h),f)});u.displayName="Grid"},9496:function(e,t,n){"use strict";n.d(t,{LH:function(){return o},N4:function(){return a},PT:function(){return l},SP:function(){return s},VS:function(){return c},_m:function(){return r},_w:function(){return u},l5:function(){return i}});let r={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},o={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},i={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},a={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},l={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},s={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},c={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},u={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"}},94789:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),o=n(2265),i=n(26898),a=n(97324),l=n(1153);let s=(0,l.fn)("Callout"),c=o.forwardRef((e,t)=>{let{title:n,icon:c,color:u,className:d,children:f}=e,p=(0,r._T)(e,["title","icon","color","className","children"]);return o.createElement("div",Object.assign({ref:t,className:(0,a.q)(s("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",u?(0,a.q)((0,l.bM)(u,i.K.background).bgColor,(0,l.bM)(u,i.K.darkBorder).borderColor,(0,l.bM)(u,i.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,a.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),d)},p),o.createElement("div",{className:(0,a.q)(s("header"),"flex items-start")},c?o.createElement(c,{className:(0,a.q)(s("icon"),"flex-none h-5 w-5 mr-1.5")}):null,o.createElement("h4",{className:(0,a.q)(s("title"),"font-semibold")},n)),o.createElement("p",{className:(0,a.q)(s("body"),"overflow-y-auto",f?"mt-2":"")},f))});c.displayName="Callout"},35829:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(5853),o=n(26898),i=n(97324),a=n(1153),l=n(2265);let s=l.forwardRef((e,t)=>{let{color:n,children:s,className:c}=e,u=(0,r._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:t,className:(0,i.q)("font-semibold text-tremor-metric",n?(0,a.bM)(n,o.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},u),s)});s.displayName="Metric"},97765:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(5853),o=n(26898),i=n(97324),a=n(1153),l=n(2265);let s=l.forwardRef((e,t)=>{let{color:n,children:s,className:c}=e,u=(0,r._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:t,className:(0,i.q)(n?(0,a.bM)(n,o.K.lightText).textColor:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle",c)},u),s)});s.displayName="Subtitle"},96889:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),o=n(2265),i=n(26898),a=n(97324),l=n(1153);let s=(0,l.fn)("BarList"),c=o.forwardRef((e,t)=>{var n;let c;let{data:u=[],color:d,valueFormatter:f=l.Cj,showAnimation:p=!1,className:h}=e,m=(0,r._T)(e,["data","color","valueFormatter","showAnimation","className"]),g=(n=u.map(e=>e.value),c=-1/0,n.forEach(e=>{c=Math.max(c,e)}),n.map(e=>0===e?0:Math.max(e/c*100,1)));return o.createElement("div",Object.assign({ref:t,className:(0,a.q)(s("root"),"flex justify-between space-x-6",h)},m),o.createElement("div",{className:(0,a.q)(s("bars"),"relative w-full")},u.map((e,t)=>{var n,r,c;let f=e.icon;return o.createElement("div",{key:null!==(n=e.key)&&void 0!==n?n:e.name,className:(0,a.q)(s("bar"),"flex items-center rounded-tremor-small bg-opacity-30","h-9",e.color||d?(0,l.bM)(null!==(r=e.color)&&void 0!==r?r:d,i.K.background).bgColor:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle dark:bg-opacity-30",t===u.length-1?"mb-0":"mb-2"),style:{width:"".concat(g[t],"%"),transition:p?"all 1s":""}},o.createElement("div",{className:(0,a.q)("absolute max-w-full flex left-2")},f?o.createElement(f,{className:(0,a.q)(s("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?o.createElement("a",{href:e.href,target:null!==(c=e.target)&&void 0!==c?c:"_blank",rel:"noreferrer",className:(0,a.q)(s("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name):o.createElement("p",{className:(0,a.q)(s("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name)))})),o.createElement("div",{className:"text-right min-w-min"},u.map((e,t)=>{var n;return o.createElement("div",{key:null!==(n=e.key)&&void 0!==n?n:e.name,className:(0,a.q)(s("labelWrapper"),"flex justify-end items-center","h-9",t===u.length-1?"mb-0":"mb-2")},o.createElement("p",{className:(0,a.q)(s("labelText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},f(e.value)))})))});c.displayName="BarList"},42698:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(2265),o=n(7084);n(97324);let i=(0,r.createContext)(o.fr.Blue)},64016:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(2265).createContext)(0)},8710:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(2265).createContext)(void 0)},33232:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(2265).createContext)({selectedValue:void 0,handleValueChange:void 0})},44140:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2265);let o=(e,t)=>{let n=void 0!==t,[o,i]=(0,r.useState)(e);return[n?t:o,e=>{n||i(e)}]}},92570:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=e=>e?"function"==typeof e?e():e:null},61778:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var r=n(2265),o=n(8900),i=n(39725),a=n(49638),l=n(54537),s=n(55726),c=n(36760),u=n.n(c),d=n(47970),f=n(18242),p=n(19722),h=n(71744),m=n(352),g=n(12918),v=n(80669);let y=(e,t,n,r,o)=>({background:e,border:"".concat((0,m.bf)(r.lineWidth)," ").concat(r.lineType," ").concat(t),["".concat(o,"-icon")]:{color:n}}),b=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:o,fontSize:i,fontSizeLG:a,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:p,defaultPadding:h}=e;return{[t]:Object.assign(Object.assign({},(0,g.Wf)(e)),{position:"relative",display:"flex",alignItems:"center",padding:h,wordWrap:"break-word",borderRadius:s,["&".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-content")]:{flex:1,minWidth:0},["".concat(t,"-icon")]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:l},"&-message":{color:f},["&".concat(t,"-motion-leave")]:{overflow:"hidden",opacity:1,transition:"max-height ".concat(n," ").concat(c,", opacity ").concat(n," ").concat(c,",\n padding-top ").concat(n," ").concat(c,", padding-bottom ").concat(n," ").concat(c,",\n margin-bottom ").concat(n," ").concat(c)},["&".concat(t,"-motion-leave-active")]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),["".concat(t,"-with-description")]:{alignItems:"flex-start",padding:p,["".concat(t,"-icon")]:{marginInlineEnd:o,fontSize:u,lineHeight:0},["".concat(t,"-message")]:{display:"block",marginBottom:r,color:f,fontSize:a},["".concat(t,"-description")]:{display:"block",color:d}},["".concat(t,"-banner")]:{marginBottom:0,border:"0 !important",borderRadius:0}}},x=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:o,colorWarning:i,colorWarningBorder:a,colorWarningBg:l,colorError:s,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:p}=e;return{[t]:{"&-success":y(o,r,n,e,t),"&-info":y(p,f,d,e,t),"&-warning":y(l,a,i,e,t),"&-error":Object.assign(Object.assign({},y(u,c,s,e,t)),{["".concat(t,"-description > pre")]:{margin:0,padding:0}})}}},w=e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:o,fontSizeIcon:i,colorIcon:a,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:o},["".concat(t,"-close-icon")]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:i,lineHeight:(0,m.bf)(i),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",["".concat(n,"-close")]:{color:a,transition:"color ".concat(r),"&:hover":{color:l}}},"&-close-text":{color:a,transition:"color ".concat(r),"&:hover":{color:l}}}}};var k=(0,v.I$)("Alert",e=>[b(e),x(e),w(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:"".concat(e.paddingContentVerticalSM,"px ").concat(12,"px"),withDescriptionPadding:"".concat(e.paddingMD,"px ").concat(e.paddingContentHorizontalLG,"px")})),S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let E={success:o.Z,info:s.Z,error:i.Z,warning:l.Z},O=e=>{let{icon:t,prefixCls:n,type:o}=e,i=E[o]||null;return t?(0,p.wm)(t,r.createElement("span",{className:"".concat(n,"-icon")},t),()=>({className:u()("".concat(n,"-icon"),{[t.props.className]:t.props.className})})):r.createElement(i,{className:"".concat(n,"-icon")})},C=e=>{let{isClosable:t,prefixCls:n,closeIcon:o,handleClose:i}=e,l=!0===o||void 0===o?r.createElement(a.Z,null):o;return t?r.createElement("button",{type:"button",onClick:i,className:"".concat(n,"-close-icon"),tabIndex:0},l):null};var j=e=>{let{description:t,prefixCls:n,message:o,banner:i,className:a,rootClassName:l,style:s,onMouseEnter:c,onMouseLeave:p,onClick:m,afterClose:g,showIcon:v,closable:y,closeText:b,closeIcon:x,action:w}=e,E=S(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),[j,_]=r.useState(!1),P=r.useRef(null),{getPrefixCls:T,direction:M,alert:N}=r.useContext(h.E_),A=T("alert",n),[I,R,D]=k(A),L=t=>{var n;_(!0),null===(n=e.onClose)||void 0===n||n.call(e,t)},z=r.useMemo(()=>void 0!==e.type?e.type:i?"warning":"info",[e.type,i]),Z=r.useMemo(()=>!!b||("boolean"==typeof y?y:!1!==x&&null!=x),[b,x,y]),B=!!i&&void 0===v||v,F=u()(A,"".concat(A,"-").concat(z),{["".concat(A,"-with-description")]:!!t,["".concat(A,"-no-icon")]:!B,["".concat(A,"-banner")]:!!i,["".concat(A,"-rtl")]:"rtl"===M},null==N?void 0:N.className,a,l,D,R),H=(0,f.Z)(E,{aria:!0,data:!0});return I(r.createElement(d.ZP,{visible:!j,motionName:"".concat(A,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:g},n=>{let{className:i,style:a}=n;return r.createElement("div",Object.assign({ref:P,"data-show":!j,className:u()(F,i),style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.style),s),a),onMouseEnter:c,onMouseLeave:p,onClick:m,role:"alert"},H),B?r.createElement(O,{description:t,icon:e.icon,prefixCls:A,type:z}):null,r.createElement("div",{className:"".concat(A,"-content")},o?r.createElement("div",{className:"".concat(A,"-message")},o):null,t?r.createElement("div",{className:"".concat(A,"-description")},t):null),w?r.createElement("div",{className:"".concat(A,"-action")},w):null,r.createElement(C,{isClosable:Z,prefixCls:A,closeIcon:b||x,handleClose:L}))}))},_=n(76405),P=n(25049),T=n(37977),M=n(63929),N=n(24995),A=n(15354);let I=function(e){function t(){var e,n,r;return(0,_.Z)(this,t),n=t,r=arguments,n=(0,N.Z)(n),(e=(0,T.Z)(this,(0,M.Z)()?Reflect.construct(n,r||[],(0,N.Z)(this).constructor):n.apply(this,r))).state={error:void 0,info:{componentStack:""}},e}return(0,A.Z)(t,e),(0,P.Z)(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,description:t,children:n}=this.props,{error:o,info:i}=this.state,a=i&&i.componentStack?i.componentStack:null,l=void 0===e?(o||"").toString():e;return o?r.createElement(j,{type:"error",message:l,description:r.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},void 0===t?a:t)}):n}}]),t}(r.Component);j.ErrorBoundary=I;var R=j},33866:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var r=n(2265),o=n(36760),i=n.n(o),a=n(47970),l=n(93350),s=n(19722),c=n(71744),u=n(352),d=n(12918),f=n(18536),p=n(3104),h=n(80669);let m=new u.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),g=new u.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),v=new u.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),y=new u.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),b=new u.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),x=new u.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),w=e=>{let{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:o,motionDurationSlow:i,textFontSize:a,textFontSizeSM:l,statusSize:s,dotSize:c,textFontWeight:p,indicatorHeight:h,indicatorHeightSM:w,marginXS:k,calc:S}=e,E="".concat(r,"-scroll-number"),O=(0,f.Z)(e,(e,n)=>{let{darkColor:r}=n;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:r,["&:not(".concat(t,"-count)")]:{color:r}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{zIndex:e.indicatorZIndex,minWidth:h,height:h,color:e.badgeTextColor,fontWeight:p,fontSize:a,lineHeight:(0,u.bf)(h),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:S(h).div(2).equal(),boxShadow:"0 0 0 ".concat((0,u.bf)(o)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:w,height:w,fontSize:l,lineHeight:(0,u.bf)(w),borderRadius:S(w).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,u.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:c,minWidth:c,height:c,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,u.bf)(o)," ").concat(e.badgeShadowColor)},["".concat(t,"-dot").concat(E)]:{transition:"background ".concat(i)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(E,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(n,"-spin")]:{animationName:x,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:m,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:k,color:e.colorText,fontSize:e.fontSize}}}),O),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:y,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:b,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(E,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(E,"-custom-component, ").concat(E)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},["".concat(E)]:{overflow:"hidden",["".concat(E,"-only")]:{position:"relative",display:"inline-block",height:h,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(E,"-only-unit")]:{height:h,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(E,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(E,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},k=e=>{let{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:o}=e,i=e.colorBgContainer,a=e.colorError,l=e.colorErrorHover;return(0,p.TS)(e,{badgeFontHeight:t,badgeShadowSize:n,badgeTextColor:i,badgeColor:a,badgeColorHover:l,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},S=e=>{let{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*o,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}};var E=(0,h.I$)("Badge",e=>w(k(e)),S);let O=e=>{let{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:o,calc:i}=e,a="".concat(t,"-ribbon"),l=(0,f.Z)(e,(e,t)=>{let{darkColor:n}=t;return{["&".concat(a,"-color-").concat(e)]:{background:n,color:n}}});return{["".concat("".concat(t,"-ribbon-wrapper"))]:{position:"relative"},["".concat(a)]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"absolute",top:r,padding:"0 ".concat((0,u.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,u.bf)(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(a,"-text")]:{color:e.colorTextLightSolid},["".concat(a,"-corner")]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:"".concat((0,u.bf)(i(o).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),l),{["&".concat(a,"-placement-end")]:{insetInlineEnd:i(o).mul(-1).equal(),borderEndEndRadius:0,["".concat(a,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(a,"-placement-start")]:{insetInlineStart:i(o).mul(-1).equal(),borderEndStartRadius:0,["".concat(a,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var C=(0,h.I$)(["Badge","Ribbon"],e=>O(k(e)),S);function j(e){let t,{prefixCls:n,value:o,current:a,offset:l=0}=e;return l&&(t={position:"absolute",top:"".concat(l,"00%"),left:0}),r.createElement("span",{style:t,className:i()("".concat(n,"-only-unit"),{current:a})},o)}function _(e){let t,n;let{prefixCls:o,count:i,value:a}=e,l=Number(a),s=Math.abs(i),[c,u]=r.useState(l),[d,f]=r.useState(s),p=()=>{u(l),f(s)};if(r.useEffect(()=>{let e=setTimeout(()=>{p()},1e3);return()=>{clearTimeout(e)}},[l]),c===l||Number.isNaN(l)||Number.isNaN(c))t=[r.createElement(j,Object.assign({},e,{key:l,current:!0}))],n={transition:"none"};else{t=[];let o=l+10,i=[];for(let e=l;e<=o;e+=1)i.push(e);let a=i.findIndex(e=>e%10===c);t=i.map((t,n)=>r.createElement(j,Object.assign({},e,{key:t,value:t%10,offset:n-a,current:n===a}))),n={transform:"translateY(".concat(-function(e,t,n){let r=e,o=0;for(;(r+10)%10!==t;)r+=n,o+=n;return o}(c,l,dt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let T=r.forwardRef((e,t)=>{let{prefixCls:n,count:o,className:a,motionClassName:l,style:u,title:d,show:f,component:p="sup",children:h}=e,m=P(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:g}=r.useContext(c.E_),v=g("scroll-number",n),y=Object.assign(Object.assign({},m),{"data-show":f,style:u,className:i()(v,a,l),title:d}),b=o;if(o&&Number(o)%1==0){let e=String(o).split("");b=r.createElement("bdi",null,e.map((t,n)=>r.createElement(_,{prefixCls:v,count:Number(o),value:t,key:e.length-n})))}return(u&&u.borderColor&&(y.style=Object.assign(Object.assign({},u),{boxShadow:"0 0 0 1px ".concat(u.borderColor," inset")})),h)?(0,s.Tm)(h,e=>({className:i()("".concat(v,"-custom-component"),null==e?void 0:e.className,l)})):r.createElement(p,Object.assign({},y,{ref:t}),b)});var M=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let N=r.forwardRef((e,t)=>{var n,o,u,d,f;let{prefixCls:p,scrollNumberPrefixCls:h,children:m,status:g,text:v,color:y,count:b=null,overflowCount:x=99,dot:w=!1,size:k="default",title:S,offset:O,style:C,className:j,rootClassName:_,classNames:P,styles:N,showZero:A=!1}=e,I=M(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:R,direction:D,badge:L}=r.useContext(c.E_),z=R("badge",p),[Z,B,F]=E(z),H=b>x?"".concat(x,"+"):b,q="0"===H||0===H,U=(null!=g||null!=y)&&(null===b||q&&!A),W=w&&!q,K=W?"":H,V=(0,r.useMemo)(()=>(null==K||""===K||q&&!A)&&!W,[K,q,A,W]),$=(0,r.useRef)(b);V||($.current=b);let X=$.current,G=(0,r.useRef)(K);V||(G.current=K);let Y=G.current,Q=(0,r.useRef)(W);V||(Q.current=W);let J=(0,r.useMemo)(()=>{if(!O)return Object.assign(Object.assign({},null==L?void 0:L.style),C);let e={marginTop:O[1]};return"rtl"===D?e.left=parseInt(O[0],10):e.right=-parseInt(O[0],10),Object.assign(Object.assign(Object.assign({},e),null==L?void 0:L.style),C)},[D,O,C,null==L?void 0:L.style]),ee=null!=S?S:"string"==typeof X||"number"==typeof X?X:void 0,et=V||!v?null:r.createElement("span",{className:"".concat(z,"-status-text")},v),en=X&&"object"==typeof X?(0,s.Tm)(X,e=>({style:Object.assign(Object.assign({},J),e.style)})):void 0,er=(0,l.o2)(y,!1),eo=i()(null==P?void 0:P.indicator,null===(n=null==L?void 0:L.classNames)||void 0===n?void 0:n.indicator,{["".concat(z,"-status-dot")]:U,["".concat(z,"-status-").concat(g)]:!!g,["".concat(z,"-color-").concat(y)]:er}),ei={};y&&!er&&(ei.color=y,ei.background=y);let ea=i()(z,{["".concat(z,"-status")]:U,["".concat(z,"-not-a-wrapper")]:!m,["".concat(z,"-rtl")]:"rtl"===D},j,_,null==L?void 0:L.className,null===(o=null==L?void 0:L.classNames)||void 0===o?void 0:o.root,null==P?void 0:P.root,B,F);if(!m&&U){let e=J.color;return Z(r.createElement("span",Object.assign({},I,{className:ea,style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.root),null===(u=null==L?void 0:L.styles)||void 0===u?void 0:u.root),J)}),r.createElement("span",{className:eo,style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.indicator),null===(d=null==L?void 0:L.styles)||void 0===d?void 0:d.indicator),ei)}),v&&r.createElement("span",{style:{color:e},className:"".concat(z,"-status-text")},v)))}return Z(r.createElement("span",Object.assign({ref:t},I,{className:ea,style:Object.assign(Object.assign({},null===(f=null==L?void 0:L.styles)||void 0===f?void 0:f.root),null==N?void 0:N.root)}),m,r.createElement(a.ZP,{visible:!V,motionName:"".concat(z,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,n;let{className:o,ref:a}=e,l=R("scroll-number",h),s=Q.current,c=i()(null==P?void 0:P.indicator,null===(t=null==L?void 0:L.classNames)||void 0===t?void 0:t.indicator,{["".concat(z,"-dot")]:s,["".concat(z,"-count")]:!s,["".concat(z,"-count-sm")]:"small"===k,["".concat(z,"-multiple-words")]:!s&&Y&&Y.toString().length>1,["".concat(z,"-status-").concat(g)]:!!g,["".concat(z,"-color-").concat(y)]:er}),u=Object.assign(Object.assign(Object.assign({},null==N?void 0:N.indicator),null===(n=null==L?void 0:L.styles)||void 0===n?void 0:n.indicator),J);return y&&!er&&((u=u||{}).background=y),r.createElement(T,{prefixCls:l,show:!V,motionClassName:o,className:c,count:Y,title:ee,style:u,key:"scrollNumber",ref:a},en)}),et))});N.Ribbon=e=>{let{className:t,prefixCls:n,style:o,color:a,children:s,text:u,placement:d="end",rootClassName:f}=e,{getPrefixCls:p,direction:h}=r.useContext(c.E_),m=p("ribbon",n),g="".concat(m,"-wrapper"),[v,y,b]=C(m,g),x=(0,l.o2)(a,!1),w=i()(m,"".concat(m,"-placement-").concat(d),{["".concat(m,"-rtl")]:"rtl"===h,["".concat(m,"-color-").concat(a)]:x},t),k={},S={};return a&&!x&&(k.background=a,S.color=a),v(r.createElement("div",{className:i()(g,f,y,b)},s,r.createElement("div",{className:i()(w,y),style:Object.assign(Object.assign({},k),o)},r.createElement("span",{className:"".concat(m,"-text")},u),r.createElement("div",{className:"".concat(m,"-corner"),style:S}))))};var A=N},67960:function(e,t,n){"use strict";n.d(t,{Z:function(){return e5}});var r=n(2265),o=n(36760),i=n.n(o),a=n(18694),l=n(71744),s=n(33759),c=e=>{let{prefixCls:t,className:n,style:o,size:a,shape:l}=e,s=i()({["".concat(t,"-lg")]:"large"===a,["".concat(t,"-sm")]:"small"===a}),c=i()({["".concat(t,"-circle")]:"circle"===l,["".concat(t,"-square")]:"square"===l,["".concat(t,"-round")]:"round"===l}),u=r.useMemo(()=>"number"==typeof a?{width:a,height:a,lineHeight:"".concat(a,"px")}:{},[a]);return r.createElement("span",{className:i()(t,s,c,n),style:Object.assign(Object.assign({},u),o)})},u=n(352),d=n(80669),f=n(3104);let p=new u.E4("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),h=e=>({height:e,lineHeight:(0,u.bf)(e)}),m=e=>Object.assign({width:e},h(e)),g=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:p,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),v=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},h(e)),y=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return{["".concat(t)]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},m(r)),["".concat(t).concat(t,"-circle")]:{borderRadius:"50%"},["".concat(t).concat(t,"-lg")]:Object.assign({},m(o)),["".concat(t).concat(t,"-sm")]:Object.assign({},m(i))}},b=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return{["".concat(r)]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},v(t,l)),["".concat(r,"-lg")]:Object.assign({},v(o,l)),["".concat(r,"-sm")]:Object.assign({},v(i,l))}},x=e=>Object.assign({width:e},h(e)),w=e=>{let{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:o,calc:i}=e;return{["".concat(t)]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:r,borderRadius:o},x(i(n).mul(2).equal())),{["".concat(t,"-path")]:{fill:"#bfbfbf"},["".concat(t,"-svg")]:Object.assign(Object.assign({},x(n)),{maxWidth:i(n).mul(4).equal(),maxHeight:i(n).mul(4).equal()}),["".concat(t,"-svg").concat(t,"-svg-circle")]:{borderRadius:"50%"}}),["".concat(t).concat(t,"-circle")]:{borderRadius:"50%"}}},k=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{["".concat(n).concat(r,"-circle")]:{width:t,minWidth:t,borderRadius:"50%"},["".concat(n).concat(r,"-round")]:{borderRadius:t}}},S=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},h(e)),E=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:l(r).mul(2).equal(),minWidth:l(r).mul(2).equal()},S(r,l))},k(e,r,n)),{["".concat(n,"-lg")]:Object.assign({},S(o,l))}),k(e,o,"".concat(n,"-lg"))),{["".concat(n,"-sm")]:Object.assign({},S(i,l))}),k(e,i,"".concat(n,"-sm")))},O=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:l,controlHeight:s,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:p,borderRadius:h,titleHeight:v,blockRadius:x,paragraphLiHeight:k,controlHeightXS:S,paragraphMarginTop:O}=e;return{["".concat(t)]:{display:"table",width:"100%",["".concat(t,"-header")]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},m(s)),["".concat(n,"-circle")]:{borderRadius:"50%"},["".concat(n,"-lg")]:Object.assign({},m(c)),["".concat(n,"-sm")]:Object.assign({},m(u))},["".concat(t,"-content")]:{display:"table-cell",width:"100%",verticalAlign:"top",["".concat(r)]:{width:"100%",height:v,background:d,borderRadius:x,["+ ".concat(o)]:{marginBlockStart:u}},["".concat(o)]:{padding:0,"> li":{width:"100%",height:k,listStyle:"none",background:d,borderRadius:x,"+ li":{marginBlockStart:S}}},["".concat(o,"> li:last-child:not(:first-child):not(:nth-child(2))")]:{width:"61%"}},["&-round ".concat(t,"-content")]:{["".concat(r,", ").concat(o," > li")]:{borderRadius:h}}},["".concat(t,"-with-avatar ").concat(t,"-content")]:{["".concat(r)]:{marginBlockStart:p,["+ ".concat(o)]:{marginBlockStart:O}}},["".concat(t).concat(t,"-element")]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},E(e)),y(e)),b(e)),w(e)),["".concat(t).concat(t,"-block")]:{width:"100%",["".concat(i)]:{width:"100%"},["".concat(a)]:{width:"100%"}},["".concat(t).concat(t,"-active")]:{["\n ".concat(r,",\n ").concat(o," > li,\n ").concat(n,",\n ").concat(i,",\n ").concat(a,",\n ").concat(l,"\n ")]:Object.assign({},g(e))}}};var C=(0,d.I$)("Skeleton",e=>{let{componentCls:t,calc:n}=e;return[O((0,f.TS)(e,{skeletonAvatarCls:"".concat(t,"-avatar"),skeletonTitleCls:"".concat(t,"-title"),skeletonParagraphCls:"".concat(t,"-paragraph"),skeletonButtonCls:"".concat(t,"-button"),skeletonInputCls:"".concat(t,"-input"),skeletonImageCls:"".concat(t,"-image"),imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:"linear-gradient(90deg, ".concat(e.gradientFromColor," 25%, ").concat(e.gradientToColor," 37%, ").concat(e.gradientFromColor," 63%)"),skeletonLoadingMotionDuration:"1.4s"}))]},e=>{let{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n,gradientFromColor:t,gradientToColor:n,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),j=n(1119),_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},P=n(55015),T=r.forwardRef(function(e,t){return r.createElement(P.Z,(0,j.Z)({},e,{ref:t,icon:_}))}),M=n(83145),N=e=>{let t=t=>{let{width:n,rows:r=2}=e;return Array.isArray(n)?n[t]:r-1===t?n:void 0},{prefixCls:n,className:o,style:a,rows:l}=e,s=(0,M.Z)(Array(l)).map((e,n)=>r.createElement("li",{key:n,style:{width:t(n)}}));return r.createElement("ul",{className:i()(n,o),style:a},s)},A=e=>{let{prefixCls:t,className:n,width:o,style:a}=e;return r.createElement("h3",{className:i()(t,n),style:Object.assign({width:o},a)})};function I(e){return e&&"object"==typeof e?e:{}}let R=e=>{let{prefixCls:t,loading:n,className:o,rootClassName:a,style:s,children:u,avatar:d=!1,title:f=!0,paragraph:p=!0,active:h,round:m}=e,{getPrefixCls:g,direction:v,skeleton:y}=r.useContext(l.E_),b=g("skeleton",t),[x,w,k]=C(b);if(n||!("loading"in e)){let e,t;let n=!!d,l=!!f,u=!!p;if(n){let t=Object.assign(Object.assign({prefixCls:"".concat(b,"-avatar")},l&&!u?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),I(d));e=r.createElement("div",{className:"".concat(b,"-header")},r.createElement(c,Object.assign({},t)))}if(l||u){let e,o;if(l){let t=Object.assign(Object.assign({prefixCls:"".concat(b,"-title")},!n&&u?{width:"38%"}:n&&u?{width:"50%"}:{}),I(f));e=r.createElement(A,Object.assign({},t))}if(u){let e=Object.assign(Object.assign({prefixCls:"".concat(b,"-paragraph")},function(e,t){let n={};return e&&t||(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}(n,l)),I(p));o=r.createElement(N,Object.assign({},e))}t=r.createElement("div",{className:"".concat(b,"-content")},e,o)}let g=i()(b,{["".concat(b,"-with-avatar")]:n,["".concat(b,"-active")]:h,["".concat(b,"-rtl")]:"rtl"===v,["".concat(b,"-round")]:m},null==y?void 0:y.className,o,a,w,k);return x(r.createElement("div",{className:g,style:Object.assign(Object.assign({},null==y?void 0:y.style),s)},e,t))}return void 0!==u?u:null};R.Button=e=>{let{prefixCls:t,className:n,rootClassName:o,active:s,block:u=!1,size:d="default"}=e,{getPrefixCls:f}=r.useContext(l.E_),p=f("skeleton",t),[h,m,g]=C(p),v=(0,a.Z)(e,["prefixCls"]),y=i()(p,"".concat(p,"-element"),{["".concat(p,"-active")]:s,["".concat(p,"-block")]:u},n,o,m,g);return h(r.createElement("div",{className:y},r.createElement(c,Object.assign({prefixCls:"".concat(p,"-button"),size:d},v))))},R.Avatar=e=>{let{prefixCls:t,className:n,rootClassName:o,active:s,shape:u="circle",size:d="default"}=e,{getPrefixCls:f}=r.useContext(l.E_),p=f("skeleton",t),[h,m,g]=C(p),v=(0,a.Z)(e,["prefixCls","className"]),y=i()(p,"".concat(p,"-element"),{["".concat(p,"-active")]:s},n,o,m,g);return h(r.createElement("div",{className:y},r.createElement(c,Object.assign({prefixCls:"".concat(p,"-avatar"),shape:u,size:d},v))))},R.Input=e=>{let{prefixCls:t,className:n,rootClassName:o,active:s,block:u,size:d="default"}=e,{getPrefixCls:f}=r.useContext(l.E_),p=f("skeleton",t),[h,m,g]=C(p),v=(0,a.Z)(e,["prefixCls"]),y=i()(p,"".concat(p,"-element"),{["".concat(p,"-active")]:s,["".concat(p,"-block")]:u},n,o,m,g);return h(r.createElement("div",{className:y},r.createElement(c,Object.assign({prefixCls:"".concat(p,"-input"),size:d},v))))},R.Image=e=>{let{prefixCls:t,className:n,rootClassName:o,style:a,active:s}=e,{getPrefixCls:c}=r.useContext(l.E_),u=c("skeleton",t),[d,f,p]=C(u),h=i()(u,"".concat(u,"-element"),{["".concat(u,"-active")]:s},n,o,f,p);return d(r.createElement("div",{className:h},r.createElement("div",{className:i()("".concat(u,"-image"),n),style:a},r.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:"".concat(u,"-image-svg")},r.createElement("path",{d:"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",className:"".concat(u,"-image-path")})))))},R.Node=e=>{let{prefixCls:t,className:n,rootClassName:o,style:a,active:s,children:c}=e,{getPrefixCls:u}=r.useContext(l.E_),d=u("skeleton",t),[f,p,h]=C(d),m=i()(d,"".concat(d,"-element"),{["".concat(d,"-active")]:s},p,n,o,h),g=null!=c?c:r.createElement(T,null);return f(r.createElement("div",{className:m},r.createElement("div",{className:i()("".concat(d,"-image"),n),style:a},g)))};var D=n(49638),L=n(39760),z=n(96473),Z=n(11993),B=n(31686),F=n(26365),H=n(41154),q=n(6989),U=n(50506),W=n(79267),K=(0,r.createContext)(null),V=n(31474),$=n(58525),X=n(28791),G=n(53346),Y=function(e){var t=e.activeTabOffset,n=e.horizontal,o=e.rtl,i=e.indicator,a=void 0===i?{}:i,l=a.size,s=a.align,c=void 0===s?"center":s,u=(0,r.useState)(),d=(0,F.Z)(u,2),f=d[0],p=d[1],h=(0,r.useRef)(),m=r.useCallback(function(e){return"function"==typeof l?l(e):"number"==typeof l?l:e},[l]);function g(){G.Z.cancel(h.current)}return(0,r.useEffect)(function(){var e={};if(t){if(n){e.width=m(t.width);var r=o?"right":"left";"start"===c&&(e[r]=t[r]),"center"===c&&(e[r]=t[r]+t.width/2,e.transform=o?"translateX(50%)":"translateX(-50%)"),"end"===c&&(e[r]=t[r]+t.width,e.transform="translateX(-100%)")}else e.height=m(t.height),"start"===c&&(e.top=t.top),"center"===c&&(e.top=t.top+t.height/2,e.transform="translateY(-50%)"),"end"===c&&(e.top=t.top+t.height,e.transform="translateY(-100%)")}return g(),h.current=(0,G.Z)(function(){p(e)}),g},[t,n,o,c,m]),{style:f}},Q={width:0,height:0,left:0,top:0};function J(e,t){var n=r.useRef(e),o=r.useState({}),i=(0,F.Z)(o,2)[1];return[n.current,function(e){var r="function"==typeof e?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,i({})}]}var ee=n(27380);function et(e){var t=(0,r.useState)(0),n=(0,F.Z)(t,2),o=n[0],i=n[1],a=(0,r.useRef)(0),l=(0,r.useRef)();return l.current=e,(0,ee.o)(function(){var e;null===(e=l.current)||void 0===e||e.call(l)},[o]),function(){a.current===o&&(a.current+=1,i(a.current))}}var en={width:0,height:0,left:0,top:0,right:0};function er(e){var t;return e instanceof Map?(t={},e.forEach(function(e,n){t[n]=e})):t=e,JSON.stringify(t)}function eo(e){return String(e).replace(/"/g,"TABS_DQ")}function ei(e,t,n,r){return!!n&&!r&&!1!==e&&(void 0!==e||!1!==t&&null!==t)}var ea=r.forwardRef(function(e,t){var n=e.prefixCls,o=e.editable,i=e.locale,a=e.style;return o&&!1!==o.showAdd?r.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:a,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){o.onEdit("add",{event:e})}},o.addIcon||"+"):null}),el=r.forwardRef(function(e,t){var n,o=e.position,i=e.prefixCls,a=e.extra;if(!a)return null;var l={};return"object"!==(0,H.Z)(a)||r.isValidElement(a)?l.right=a:l=a,"right"===o&&(n=l.right),"left"===o&&(n=l.left),n?r.createElement("div",{className:"".concat(i,"-extra-content"),ref:t},n):null}),es=n(71030),ec=n(33082),eu=n(95814),ed=r.forwardRef(function(e,t){var n=e.prefixCls,o=e.id,a=e.tabs,l=e.locale,s=e.mobile,c=e.moreIcon,u=e.moreTransitionName,d=e.style,f=e.className,p=e.editable,h=e.tabBarGutter,m=e.rtl,g=e.removeAriaLabel,v=e.onTabClick,y=e.getPopupContainer,b=e.popupClassName,x=(0,r.useState)(!1),w=(0,F.Z)(x,2),k=w[0],S=w[1],E=(0,r.useState)(null),O=(0,F.Z)(E,2),C=O[0],j=O[1],_="".concat(o,"-more-popup"),P="".concat(n,"-dropdown"),T=null!==C?"".concat(_,"-").concat(C):null,M=null==l?void 0:l.dropdownAriaLabel,N=r.createElement(ec.ZP,{onClick:function(e){v(e.key,e.domEvent),S(!1)},prefixCls:"".concat(P,"-menu"),id:_,tabIndex:-1,role:"listbox","aria-activedescendant":T,selectedKeys:[C],"aria-label":void 0!==M?M:"expanded dropdown"},a.map(function(e){var t=e.closable,n=e.disabled,i=e.closeIcon,a=e.key,l=e.label,s=ei(t,i,p,n);return r.createElement(ec.sN,{key:a,id:"".concat(_,"-").concat(a),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(a),disabled:n},r.createElement("span",null,l),s&&r.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:0,className:"".concat(P,"-menu-item-remove"),onClick:function(e){e.stopPropagation(),e.preventDefault(),e.stopPropagation(),p.onEdit("remove",{key:a,event:e})}},i||p.removeIcon||"\xd7"))}));function A(e){for(var t=a.filter(function(e){return!e.disabled}),n=t.findIndex(function(e){return e.key===C})||0,r=t.length,o=0;oMath.abs(l-n)?[l,s,c-t.x,u-t.y]:[n,r,i,o]},em=function(e){var t=e.current||{},n=t.offsetWidth,r=void 0===n?0:n,o=t.offsetHeight;if(e.current){var i=e.current.getBoundingClientRect(),a=i.width,l=i.height;if(1>Math.abs(a-r))return[a,l]}return[r,void 0===o?0:o]},eg=function(e,t){return e[t?0:1]},ev=r.forwardRef(function(e,t){var n,o,a,l,s,c,u,d,f,p,h,m,g,v,y,b,x,w,k,S,E,O,C,_,P,T,N,A,I,R,D,L,z,H,q,U,W,G,ee,ei=e.className,es=e.style,ec=e.id,eu=e.animated,ed=e.activeKey,ev=e.rtl,ey=e.extra,eb=e.editable,ex=e.locale,ew=e.tabPosition,ek=e.tabBarGutter,eS=e.children,eE=e.onTabClick,eO=e.onTabScroll,eC=e.indicator,ej=r.useContext(K),e_=ej.prefixCls,eP=ej.tabs,eT=(0,r.useRef)(null),eM=(0,r.useRef)(null),eN=(0,r.useRef)(null),eA=(0,r.useRef)(null),eI=(0,r.useRef)(null),eR=(0,r.useRef)(null),eD=(0,r.useRef)(null),eL="top"===ew||"bottom"===ew,ez=J(0,function(e,t){eL&&eO&&eO({direction:e>t?"left":"right"})}),eZ=(0,F.Z)(ez,2),eB=eZ[0],eF=eZ[1],eH=J(0,function(e,t){!eL&&eO&&eO({direction:e>t?"top":"bottom"})}),eq=(0,F.Z)(eH,2),eU=eq[0],eW=eq[1],eK=(0,r.useState)([0,0]),eV=(0,F.Z)(eK,2),e$=eV[0],eX=eV[1],eG=(0,r.useState)([0,0]),eY=(0,F.Z)(eG,2),eQ=eY[0],eJ=eY[1],e0=(0,r.useState)([0,0]),e1=(0,F.Z)(e0,2),e2=e1[0],e4=e1[1],e3=(0,r.useState)([0,0]),e6=(0,F.Z)(e3,2),e8=e6[0],e5=e6[1],e7=(n=new Map,o=(0,r.useRef)([]),a=(0,r.useState)({}),l=(0,F.Z)(a,2)[1],s=(0,r.useRef)("function"==typeof n?n():n),c=et(function(){var e=s.current;o.current.forEach(function(t){e=t(e)}),o.current=[],s.current=e,l({})}),[s.current,function(e){o.current.push(e),c()}]),e9=(0,F.Z)(e7,2),te=e9[0],tt=e9[1],tn=(u=eQ[0],(0,r.useMemo)(function(){for(var e=new Map,t=te.get(null===(o=eP[0])||void 0===o?void 0:o.key)||Q,n=t.left+t.width,r=0;rtd?td:e}eL&&ev?(tu=0,td=Math.max(0,to-ts)):(tu=Math.min(0,ts-to),td=0);var tp=(0,r.useRef)(null),th=(0,r.useState)(),tm=(0,F.Z)(th,2),tg=tm[0],tv=tm[1];function ty(){tv(Date.now())}function tb(){tp.current&&clearTimeout(tp.current)}d=function(e,t){function n(e,t){e(function(e){return tf(e+t)})}return!!tl&&(eL?n(eF,e):n(eW,t),tb(),ty(),!0)},f=(0,r.useState)(),h=(p=(0,F.Z)(f,2))[0],m=p[1],g=(0,r.useState)(0),y=(v=(0,F.Z)(g,2))[0],b=v[1],x=(0,r.useState)(0),k=(w=(0,F.Z)(x,2))[0],S=w[1],E=(0,r.useState)(),C=(O=(0,F.Z)(E,2))[0],_=O[1],P=(0,r.useRef)(),T=(0,r.useRef)(),(N=(0,r.useRef)(null)).current={onTouchStart:function(e){var t=e.touches[0];m({x:t.screenX,y:t.screenY}),window.clearInterval(P.current)},onTouchMove:function(e){if(h){e.preventDefault();var t=e.touches[0],n=t.screenX,r=t.screenY;m({x:n,y:r});var o=n-h.x,i=r-h.y;d(o,i);var a=Date.now();b(a),S(a-y),_({x:o,y:i})}},onTouchEnd:function(){if(h&&(m(null),_(null),C)){var e=C.x/k,t=C.y/k;if(!(.1>Math.max(Math.abs(e),Math.abs(t)))){var n=e,r=t;P.current=window.setInterval(function(){if(.01>Math.abs(n)&&.01>Math.abs(r)){window.clearInterval(P.current);return}n*=.9046104802746175,r*=.9046104802746175,d(20*n,20*r)},20)}}},onWheel:function(e){var t=e.deltaX,n=e.deltaY,r=0,o=Math.abs(t),i=Math.abs(n);o===i?r="x"===T.current?t:n:o>i?(r=t,T.current="x"):(r=n,T.current="y"),d(-r,-r)&&e.preventDefault()}},r.useEffect(function(){function e(e){N.current.onTouchMove(e)}function t(e){N.current.onTouchEnd(e)}return document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",t,{passive:!1}),eA.current.addEventListener("touchstart",function(e){N.current.onTouchStart(e)},{passive:!1}),eA.current.addEventListener("wheel",function(e){N.current.onWheel(e)}),function(){document.removeEventListener("touchmove",e),document.removeEventListener("touchend",t)}},[]),(0,r.useEffect)(function(){return tb(),tg&&(tp.current=setTimeout(function(){tv(0)},100)),tb},[tg]);var tx=(A=eL?eB:eU,z=(I=(0,B.Z)((0,B.Z)({},e),{},{tabs:eP})).tabs,H=I.tabPosition,q=I.rtl,["top","bottom"].includes(H)?(R="width",D=q?"right":"left",L=Math.abs(A)):(R="height",D="top",L=-A),(0,r.useMemo)(function(){if(!z.length)return[0,0];for(var e=z.length,t=e,n=0;nL+ts){t=n-1;break}}for(var o=0,i=e-1;i>=0;i-=1)if((tn.get(z[i].key)||en)[D]=t?[0,0]:[o,t]},[tn,ts,to,ti,ta,L,H,z.map(function(e){return e.key}).join("_"),q])),tw=(0,F.Z)(tx,2),tk=tw[0],tS=tw[1],tE=(0,$.Z)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ed,t=tn.get(e)||{width:0,height:0,left:0,right:0,top:0};if(eL){var n=eB;ev?t.righteB+ts&&(n=t.right+t.width-ts):t.left<-eB?n=-t.left:t.left+t.width>-eB+ts&&(n=-(t.left+t.width-ts)),eW(0),eF(tf(n))}else{var r=eU;t.top<-eU?r=-t.top:t.top+t.height>-eU+ts&&(r=-(t.top+t.height-ts)),eF(0),eW(tf(r))}}),tO={};"top"===ew||"bottom"===ew?tO[ev?"marginRight":"marginLeft"]=ek:tO.marginTop=ek;var tC=eP.map(function(e,t){var n=e.key;return r.createElement(ep,{id:ec,prefixCls:e_,key:n,tab:e,style:0===t?void 0:tO,closable:e.closable,editable:eb,active:n===ed,renderWrapper:eS,removeAriaLabel:null==ex?void 0:ex.removeAriaLabel,onClick:function(e){eE(n,e)},onFocus:function(){tE(n),ty(),eA.current&&(ev||(eA.current.scrollLeft=0),eA.current.scrollTop=0)}})}),tj=function(){return tt(function(){var e,t=new Map,n=null===(e=eI.current)||void 0===e?void 0:e.getBoundingClientRect();return eP.forEach(function(e){var r,o=e.key,i=null===(r=eI.current)||void 0===r?void 0:r.querySelector('[data-node-key="'.concat(eo(o),'"]'));if(i){var a=eh(i,n),l=(0,F.Z)(a,4),s=l[0],c=l[1],u=l[2],d=l[3];t.set(o,{width:s,height:c,left:u,top:d})}}),t})};(0,r.useEffect)(function(){tj()},[eP.map(function(e){return e.key}).join("_")]);var t_=et(function(){var e=em(eT),t=em(eM),n=em(eN);eX([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var r=em(eD);e4(r),e5(em(eR));var o=em(eI);eJ([o[0]-r[0],o[1]-r[1]]),tj()}),tP=eP.slice(0,tk),tT=eP.slice(tS+1),tM=[].concat((0,M.Z)(tP),(0,M.Z)(tT)),tN=tn.get(ed),tA=Y({activeTabOffset:tN,horizontal:eL,indicator:eC,rtl:ev}).style;(0,r.useEffect)(function(){tE()},[ed,tu,td,er(tN),er(tn),eL]),(0,r.useEffect)(function(){t_()},[ev]);var tI=!!tM.length,tR="".concat(e_,"-nav-wrap");return eL?ev?(W=eB>0,U=eB!==td):(U=eB<0,W=eB!==tu):(G=eU<0,ee=eU!==tu),r.createElement(V.Z,{onResize:t_},r.createElement("div",{ref:(0,X.x1)(t,eT),role:"tablist",className:i()("".concat(e_,"-nav"),ei),style:es,onKeyDown:function(){ty()}},r.createElement(el,{ref:eM,position:"left",extra:ey,prefixCls:e_}),r.createElement(V.Z,{onResize:t_},r.createElement("div",{className:i()(tR,(0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)({},"".concat(tR,"-ping-left"),U),"".concat(tR,"-ping-right"),W),"".concat(tR,"-ping-top"),G),"".concat(tR,"-ping-bottom"),ee)),ref:eA},r.createElement(V.Z,{onResize:t_},r.createElement("div",{ref:eI,className:"".concat(e_,"-nav-list"),style:{transform:"translate(".concat(eB,"px, ").concat(eU,"px)"),transition:tg?"none":void 0}},tC,r.createElement(ea,{ref:eD,prefixCls:e_,locale:ex,editable:eb,style:(0,B.Z)((0,B.Z)({},0===tC.length?void 0:tO),{},{visibility:tI?"hidden":null})}),r.createElement("div",{className:i()("".concat(e_,"-ink-bar"),(0,Z.Z)({},"".concat(e_,"-ink-bar-animated"),eu.inkBar)),style:tA}))))),r.createElement(ef,(0,j.Z)({},e,{removeAriaLabel:null==ex?void 0:ex.removeAriaLabel,ref:eR,prefixCls:e_,tabs:tM,className:!tI&&tc,tabMoving:!!tg})),r.createElement(el,{ref:eN,position:"right",extra:ey,prefixCls:e_})))}),ey=r.forwardRef(function(e,t){var n=e.prefixCls,o=e.className,a=e.style,l=e.id,s=e.active,c=e.tabKey,u=e.children;return r.createElement("div",{id:l&&"".concat(l,"-panel-").concat(c),role:"tabpanel",tabIndex:s?0:-1,"aria-labelledby":l&&"".concat(l,"-tab-").concat(c),"aria-hidden":!s,style:a,className:i()(n,s&&"".concat(n,"-active"),o),ref:t},u)}),eb=["renderTabBar"],ex=["label","key"],ew=function(e){var t=e.renderTabBar,n=(0,q.Z)(e,eb),o=r.useContext(K).tabs;return t?t((0,B.Z)((0,B.Z)({},n),{},{panes:o.map(function(e){var t=e.label,n=e.key,o=(0,q.Z)(e,ex);return r.createElement(ey,(0,j.Z)({tab:t,key:n,tabKey:n},o))})}),ev):r.createElement(ev,n)},ek=n(47970),eS=["key","forceRender","style","className","destroyInactiveTabPane"],eE=function(e){var t=e.id,n=e.activeKey,o=e.animated,a=e.tabPosition,l=e.destroyInactiveTabPane,s=r.useContext(K),c=s.prefixCls,u=s.tabs,d=o.tabPane,f="".concat(c,"-tabpane");return r.createElement("div",{className:i()("".concat(c,"-content-holder"))},r.createElement("div",{className:i()("".concat(c,"-content"),"".concat(c,"-content-").concat(a),(0,Z.Z)({},"".concat(c,"-content-animated"),d))},u.map(function(e){var a=e.key,s=e.forceRender,c=e.style,u=e.className,p=e.destroyInactiveTabPane,h=(0,q.Z)(e,eS),m=a===n;return r.createElement(ek.ZP,(0,j.Z)({key:a,visible:m,forceRender:s,removeOnLeave:!!(l||p),leavedClassName:"".concat(f,"-hidden")},o.tabPaneMotion),function(e,n){var o=e.style,l=e.className;return r.createElement(ey,(0,j.Z)({},h,{prefixCls:f,id:t,tabKey:a,animated:d,active:m,style:(0,B.Z)((0,B.Z)({},c),o),className:i()(u,l),ref:n}))})})))};n(32559);var eO=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],eC=0,ej=r.forwardRef(function(e,t){var n=e.id,o=e.prefixCls,a=void 0===o?"rc-tabs":o,l=e.className,s=e.items,c=e.direction,u=e.activeKey,d=e.defaultActiveKey,f=e.editable,p=e.animated,h=e.tabPosition,m=void 0===h?"top":h,g=e.tabBarGutter,v=e.tabBarStyle,y=e.tabBarExtraContent,b=e.locale,x=e.moreIcon,w=e.moreTransitionName,k=e.destroyInactiveTabPane,S=e.renderTabBar,E=e.onChange,O=e.onTabClick,C=e.onTabScroll,_=e.getPopupContainer,P=e.popupClassName,T=e.indicator,M=(0,q.Z)(e,eO),N=r.useMemo(function(){return(s||[]).filter(function(e){return e&&"object"===(0,H.Z)(e)&&"key"in e})},[s]),A="rtl"===c,I=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(e=!1===t?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!1}:(0,B.Z)({inkBar:!0},"object"===(0,H.Z)(t)?t:{})).tabPaneMotion&&void 0===e.tabPane&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}(p),R=(0,r.useState)(!1),D=(0,F.Z)(R,2),L=D[0],z=D[1];(0,r.useEffect)(function(){z((0,W.Z)())},[]);var V=(0,U.Z)(function(){var e;return null===(e=N[0])||void 0===e?void 0:e.key},{value:u,defaultValue:d}),$=(0,F.Z)(V,2),X=$[0],G=$[1],Y=(0,r.useState)(function(){return N.findIndex(function(e){return e.key===X})}),Q=(0,F.Z)(Y,2),J=Q[0],ee=Q[1];(0,r.useEffect)(function(){var e,t=N.findIndex(function(e){return e.key===X});-1===t&&(t=Math.max(0,Math.min(J,N.length-1)),G(null===(e=N[t])||void 0===e?void 0:e.key)),ee(t)},[N.map(function(e){return e.key}).join("_"),X,J]);var et=(0,U.Z)(null,{value:n}),en=(0,F.Z)(et,2),er=en[0],eo=en[1];(0,r.useEffect)(function(){n||(eo("rc-tabs-".concat(eC)),eC+=1)},[]);var ei={id:er,activeKey:X,animated:I,tabPosition:m,rtl:A,mobile:L},ea=(0,B.Z)((0,B.Z)({},ei),{},{editable:f,locale:b,moreIcon:x,moreTransitionName:w,tabBarGutter:g,onTabClick:function(e,t){null==O||O(e,t);var n=e!==X;G(e),n&&(null==E||E(e))},onTabScroll:C,extra:y,style:v,panes:null,getPopupContainer:_,popupClassName:P,indicator:T});return r.createElement(K.Provider,{value:{tabs:N,prefixCls:a}},r.createElement("div",(0,j.Z)({ref:t,id:n,className:i()(a,"".concat(a,"-").concat(m),(0,Z.Z)((0,Z.Z)((0,Z.Z)({},"".concat(a,"-mobile"),L),"".concat(a,"-editable"),f),"".concat(a,"-rtl"),A),l)},M),r.createElement(ew,(0,j.Z)({},ea,{renderTabBar:S})),r.createElement(eE,(0,j.Z)({destroyInactiveTabPane:k},ei,{animated:I}))))}),e_=n(64024),eP=n(68710);let eT={motionAppear:!1,motionEnter:!0,motionLeave:!0};var eM=n(45287),eN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},eA=n(12918),eI=n(18544),eR=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{["".concat(t,"-switch")]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:"opacity ".concat(n)}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:"opacity ".concat(n)}}}}},[(0,eI.oN)(e,"slide-up"),(0,eI.oN)(e,"slide-down")]]};let eD=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:o,colorBorderSecondary:i,itemSelectedColor:a}=e;return{["".concat(t,"-card")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{margin:0,padding:n,background:r,border:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(i),transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut)},["".concat(t,"-tab-active")]:{color:a,background:e.colorBgContainer},["".concat(t,"-ink-bar")]:{visibility:"hidden"}},["&".concat(t,"-top, &").concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginLeft:{_skip_check_:!0,value:(0,u.bf)(o)}}}},["&".concat(t,"-top")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0")},["".concat(t,"-tab-active")]:{borderBottomColor:e.colorBgContainer}}},["&".concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:"0 0 ".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG))},["".concat(t,"-tab-active")]:{borderTopColor:e.colorBgContainer}}},["&".concat(t,"-left, &").concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginTop:(0,u.bf)(o)}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat((0,u.bf)(e.borderRadiusLG)," 0 0 ").concat((0,u.bf)(e.borderRadiusLG))}},["".concat(t,"-tab-active")]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0")}},["".concat(t,"-tab-active")]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},eL=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{["".concat(t,"-dropdown")]:Object.assign(Object.assign({},(0,eA.Wf)(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},["".concat(t,"-dropdown-menu")]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:"".concat((0,u.bf)(r)," 0"),overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},eA.vS),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:"".concat((0,u.bf)(e.paddingXXS)," ").concat((0,u.bf)(e.paddingSM)),color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},ez=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:o,verticalItemPadding:i,verticalItemMargin:a,calc:l}=e;return{["".concat(t,"-top, ").concat(t,"-bottom")]:{flexDirection:"column",["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{margin:o,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(r),content:"''"},["".concat(t,"-ink-bar")]:{height:e.lineWidthBold,"&-animated":{transition:"width ".concat(e.motionDurationSlow,", left ").concat(e.motionDurationSlow,",\n right ").concat(e.motionDurationSlow)}},["".concat(t,"-nav-wrap")]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},["&".concat(t,"-nav-wrap-ping-left::before")]:{opacity:1},["&".concat(t,"-nav-wrap-ping-right::after")]:{opacity:1}}}},["".concat(t,"-top")]:{["> ".concat(t,"-nav,\n > div > ").concat(t,"-nav")]:{"&::before":{bottom:0},["".concat(t,"-ink-bar")]:{bottom:0}}},["".concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},["".concat(t,"-ink-bar")]:{top:0}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{order:0}},["".concat(t,"-left, ").concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{flexDirection:"column",minWidth:l(e.controlHeight).mul(1.25).equal(),["".concat(t,"-tab")]:{padding:i,textAlign:"center"},["".concat(t,"-tab + ").concat(t,"-tab")]:{margin:a},["".concat(t,"-nav-wrap")]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},["&".concat(t,"-nav-wrap-ping-top::before")]:{opacity:1},["&".concat(t,"-nav-wrap-ping-bottom::after")]:{opacity:1}},["".concat(t,"-ink-bar")]:{width:e.lineWidthBold,"&-animated":{transition:"height ".concat(e.motionDurationSlow,", top ").concat(e.motionDurationSlow)}},["".concat(t,"-nav-list, ").concat(t,"-nav-operations")]:{flex:"1 0 auto",flexDirection:"column"}}},["".concat(t,"-left")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-ink-bar")]:{right:{_skip_check_:!0,value:0}}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{marginLeft:{_skip_check_:!0,value:(0,u.bf)(l(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},["> ".concat(t,"-content > ").concat(t,"-tabpane")]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},["".concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{order:1,["".concat(t,"-ink-bar")]:{left:{_skip_check_:!0,value:0}}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{order:0,marginRight:{_skip_check_:!0,value:l(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},["> ".concat(t,"-content > ").concat(t,"-tabpane")]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},eZ=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,horizontalItemPaddingSM:o,horizontalItemPaddingLG:i}=e;return{[t]:{"&-small":{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:i,fontSize:e.titleFontSizeLG}}}},["".concat(t,"-card")]:{["&".concat(t,"-small")]:{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:n}},["&".concat(t,"-bottom")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:"0 0 ".concat((0,u.bf)(e.borderRadius)," ").concat((0,u.bf)(e.borderRadius))}},["&".concat(t,"-top")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:"".concat((0,u.bf)(e.borderRadius)," ").concat((0,u.bf)(e.borderRadius)," 0 0")}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat((0,u.bf)(e.borderRadius)," ").concat((0,u.bf)(e.borderRadius)," 0")}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat((0,u.bf)(e.borderRadius)," 0 0 ").concat((0,u.bf)(e.borderRadius))}}}},["&".concat(t,"-large")]:{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:r}}}}}},eB=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:o,tabsHorizontalItemMargin:i,horizontalItemPadding:a,itemSelectedColor:l,itemColor:s}=e,c="".concat(t,"-tab");return{[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:s,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:n}},(0,eA.Qy)(e)),"&-btn":{outline:"none",transition:"all 0.3s",["".concat(c,"-icon:not(:last-child)")]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"&:hover":{color:e.colorTextHeading}},"&:hover":{color:r},["&".concat(c,"-active ").concat(c,"-btn")]:{color:l,textShadow:e.tabsActiveTextShadow},["&".concat(c,"-disabled")]:{color:e.colorTextDisabled,cursor:"not-allowed"},["&".concat(c,"-disabled ").concat(c,"-btn, &").concat(c,"-disabled ").concat(t,"-remove")]:{"&:focus, &:active":{color:e.colorTextDisabled}},["& ".concat(c,"-remove ").concat(o)]:{margin:0},["".concat(o,":not(:last-child)")]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},["".concat(c," + ").concat(c)]:{margin:{_skip_check_:!0,value:i}}}},eF=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:o,calc:i}=e;return{["".concat(t,"-rtl")]:{direction:"rtl",["".concat(t,"-nav")]:{["".concat(t,"-tab")]:{margin:{_skip_check_:!0,value:n},["".concat(t,"-tab:last-of-type")]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:(0,u.bf)(e.marginSM)}},["".concat(t,"-tab-remove")]:{marginRight:{_skip_check_:!0,value:(0,u.bf)(e.marginXS)},marginLeft:{_skip_check_:!0,value:(0,u.bf)(i(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav")]:{order:1},["> ".concat(t,"-content-holder")]:{order:0}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav")]:{order:0},["> ".concat(t,"-content-holder")]:{order:1}},["&".concat(t,"-card").concat(t,"-top, &").concat(t,"-card").concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginRight:{_skip_check_:!0,value:o},marginLeft:{_skip_check_:!0,value:0}}}}},["".concat(t,"-dropdown-rtl")]:{direction:"rtl"},["".concat(t,"-menu-item")]:{["".concat(t,"-dropdown-rtl")]:{textAlign:{_skip_check_:!0,value:"right"}}}}},eH=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:o,itemHoverColor:i,itemActiveColor:a,colorBorderSecondary:l}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,eA.Wf)(e)),{display:"flex",["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{position:"relative",display:"flex",flex:"none",alignItems:"center",["".concat(t,"-nav-wrap")]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:"opacity ".concat(e.motionDurationSlow),content:"''",pointerEvents:"none"}},["".concat(t,"-nav-list")]:{position:"relative",display:"flex",transition:"opacity ".concat(e.motionDurationSlow)},["".concat(t,"-nav-operations")]:{display:"flex",alignSelf:"stretch"},["".concat(t,"-nav-operations-hidden")]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},["".concat(t,"-nav-more")]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},["".concat(t,"-nav-add")]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:o},padding:"0 ".concat((0,u.bf)(e.paddingXS)),background:"transparent",border:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(l),borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0"),outline:"none",cursor:"pointer",color:e.colorText,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut),"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:a}},(0,eA.Qy)(e))},["".concat(t,"-extra-content")]:{flex:"none"},["".concat(t,"-ink-bar")]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),eB(e)),{["".concat(t,"-content")]:{position:"relative",width:"100%"},["".concat(t,"-content-holder")]:{flex:"auto",minWidth:0,minHeight:0},["".concat(t,"-tabpane")]:{outline:"none","&-hidden":{display:"none"}}}),["".concat(t,"-centered")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-nav-wrap")]:{["&:not([class*='".concat(t,"-nav-wrap-ping'])")]:{justifyContent:"center"}}}}}};var eq=(0,d.I$)("Tabs",e=>{let t=(0,f.TS)(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:"0 0 0 ".concat((0,u.bf)(e.horizontalItemGutter)),tabsHorizontalItemMarginRTL:"0 0 0 ".concat((0,u.bf)(e.horizontalItemGutter))});return[eZ(t),eF(t),ez(t),eL(t),eD(t),eH(t),eR(t)]},e=>{let t=e.controlHeightLG;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:t,cardPadding:"".concat((t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth,"px ").concat(e.padding,"px"),cardPaddingSM:"".concat(1.5*e.paddingXXS,"px ").concat(e.padding,"px"),cardPaddingLG:"".concat(e.paddingXS,"px ").concat(e.padding,"px ").concat(1.5*e.paddingXXS,"px"),titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:"0 0 ".concat(e.margin,"px 0"),horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:"".concat(e.paddingSM,"px 0"),horizontalItemPaddingSM:"".concat(e.paddingXS,"px 0"),horizontalItemPaddingLG:"".concat(e.padding,"px 0"),verticalItemPadding:"".concat(e.paddingXS,"px ").concat(e.paddingLG,"px"),verticalItemMargin:"".concat(e.margin,"px 0 0 0"),itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),eU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eW=e=>{var t,n,o,a,c,u;let d;let{type:f,className:p,rootClassName:h,size:m,onEdit:g,hideAdd:v,centered:y,addIcon:b,popupClassName:x,children:w,items:k,animated:S,style:E,indicatorSize:O,indicator:C}=e,j=eU(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize","indicator"]),{prefixCls:_,moreIcon:P=r.createElement(L.Z,null)}=j,{direction:T,tabs:M,getPrefixCls:N,getPopupContainer:A}=r.useContext(l.E_),I=N("tabs",_),R=(0,e_.Z)(I),[Z,B,F]=eq(I,R);"editable-card"===f&&(d={onEdit:(e,t)=>{let{key:n,event:r}=t;null==g||g("add"===e?r:n,e)},removeIcon:r.createElement(D.Z,null),addIcon:b||r.createElement(z.Z,null),showAdd:!0!==v});let H=N(),q=(0,s.Z)(m),U=k||(0,eM.Z)(w).map(e=>{if(r.isValidElement(e)){let{key:t,props:n}=e,r=n||{},{tab:o}=r,i=eN(r,["tab"]);return Object.assign(Object.assign({key:String(t)},i),{label:o})}return null}).filter(e=>e),W=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{inkBar:!0,tabPane:!1};return(t=!1===n?{inkBar:!1,tabPane:!1}:!0===n?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},"object"==typeof n?n:{})).tabPane&&(t.tabPaneMotion=Object.assign(Object.assign({},eT),{motionName:(0,eP.m)(e,"switch")})),t}(I,S),K=Object.assign(Object.assign({},null==M?void 0:M.style),E),V={align:null!==(t=null==C?void 0:C.align)&&void 0!==t?t:null===(n=null==M?void 0:M.indicator)||void 0===n?void 0:n.align,size:null!==(u=null!==(a=null!==(o=null==C?void 0:C.size)&&void 0!==o?o:O)&&void 0!==a?a:null===(c=null==M?void 0:M.indicator)||void 0===c?void 0:c.size)&&void 0!==u?u:null==M?void 0:M.indicatorSize};return Z(r.createElement(ej,Object.assign({direction:T,getPopupContainer:A,moreTransitionName:"".concat(H,"-slide-up")},j,{items:U,className:i()({["".concat(I,"-").concat(q)]:q,["".concat(I,"-card")]:["card","editable-card"].includes(f),["".concat(I,"-editable-card")]:"editable-card"===f,["".concat(I,"-centered")]:y},null==M?void 0:M.className,p,h,B,F,R),popupClassName:i()(x,B,F,R),style:K,editable:d,moreIcon:P,prefixCls:I,animated:W,indicator:V})))};eW.TabPane=()=>null;var eK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},eV=e=>{var{prefixCls:t,className:n,hoverable:o=!0}=e,a=eK(e,["prefixCls","className","hoverable"]);let{getPrefixCls:s}=r.useContext(l.E_),c=s("card",t),u=i()("".concat(c,"-grid"),n,{["".concat(c,"-grid-hoverable")]:o});return r.createElement("div",Object.assign({},a,{className:u}))};let e$=e=>{let{antCls:t,componentCls:n,headerHeight:r,cardPaddingBase:o,tabsMarginBottom:i}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:"0 ".concat((0,u.bf)(o)),color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary),borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0")},(0,eA.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},eA.vS),{["\n > ".concat(n,"-typography,\n > ").concat(n,"-typography-edit-content\n ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(t,"-tabs-top")]:{clear:"both",marginBottom:i,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary)}}})},eX=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:o}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:"\n ".concat((0,u.bf)(o)," 0 0 0 ").concat(n,",\n 0 ").concat((0,u.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,u.bf)(o)," ").concat((0,u.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,u.bf)(o)," 0 0 0 ").concat(n," inset,\n 0 ").concat((0,u.bf)(o)," 0 0 ").concat(n," inset;\n "),transition:"all ".concat(e.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}},eG=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:o,colorBorderSecondary:i,actionsBg:a}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(i),display:"flex",borderRadius:"0 0 ".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG))},(0,eA.dF)()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:"color ".concat(e.motionDurationMid)},["a:not(".concat(t,"-btn), > ").concat(n)]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:(0,u.bf)(e.fontHeight),transition:"color ".concat(e.motionDurationMid),"&:hover":{color:e.colorPrimary}},["> ".concat(n)]:{fontSize:o,lineHeight:(0,u.bf)(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(i)}}})},eY=e=>Object.assign(Object.assign({margin:"".concat((0,u.bf)(e.calc(e.marginXXS).mul(-1).equal())," 0"),display:"flex"},(0,eA.dF)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},eA.vS),"&-description":{color:e.colorTextDescription}}),eQ=e=>{let{componentCls:t,cardPaddingBase:n,colorFillAlter:r}=e;return{["".concat(t,"-head")]:{padding:"0 ".concat((0,u.bf)(n)),background:r,"&-title":{fontSize:e.fontSize}},["".concat(t,"-body")]:{padding:"".concat((0,u.bf)(e.padding)," ").concat((0,u.bf)(n))}}},eJ=e=>{let{componentCls:t}=e;return{overflow:"hidden",["".concat(t,"-body")]:{userSelect:"none"}}},e0=e=>{let{antCls:t,componentCls:n,cardShadow:r,cardHeadPadding:o,colorBorderSecondary:i,boxShadowTertiary:a,cardPaddingBase:l,extraColor:s}=e;return{[n]:Object.assign(Object.assign({},(0,eA.Wf)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,["&:not(".concat(n,"-bordered)")]:{boxShadow:a},["".concat(n,"-head")]:e$(e),["".concat(n,"-extra")]:{marginInlineStart:"auto",color:s,fontWeight:"normal",fontSize:e.fontSize},["".concat(n,"-body")]:Object.assign({padding:l,borderRadius:" 0 0 ".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG))},(0,eA.dF)()),["".concat(n,"-grid")]:eX(e),["".concat(n,"-cover")]:{"> *":{display:"block",width:"100%"},["img, img + ".concat(t,"-image-mask")]:{borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0")}},["".concat(n,"-actions")]:eG(e),["".concat(n,"-meta")]:eY(e)}),["".concat(n,"-bordered")]:{border:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(i),["".concat(n,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(n,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(e.motionDurationMid,", border-color ").concat(e.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:r}},["".concat(n,"-contain-grid")]:{borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0 "),["".concat(n,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(n,"-loading) ").concat(n,"-body")]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},["".concat(n,"-contain-tabs")]:{["> ".concat(n,"-head")]:{minHeight:0,["".concat(n,"-head-title, ").concat(n,"-extra")]:{paddingTop:o}}},["".concat(n,"-type-inner")]:eQ(e),["".concat(n,"-loading")]:eJ(e),["".concat(n,"-rtl")]:{direction:"rtl"}}},e1=e=>{let{componentCls:t,cardPaddingSM:n,headerHeightSM:r,headerFontSizeSM:o}=e;return{["".concat(t,"-small")]:{["> ".concat(t,"-head")]:{minHeight:r,padding:"0 ".concat((0,u.bf)(n)),fontSize:o,["> ".concat(t,"-head-wrapper")]:{["> ".concat(t,"-extra")]:{fontSize:e.fontSize}}},["> ".concat(t,"-body")]:{padding:n}},["".concat(t,"-small").concat(t,"-contain-tabs")]:{["> ".concat(t,"-head")]:{["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}};var e2=(0,d.I$)("Card",e=>{let t=(0,f.TS)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[e0(t),e1(t)]},e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:"".concat(e.paddingSM,"px 0"),tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText})),e4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let e3=e=>{let{prefixCls:t,actions:n=[]}=e;return r.createElement("ul",{className:"".concat(t,"-actions")},n.map((e,t)=>r.createElement("li",{style:{width:"".concat(100/n.length,"%")},key:"action-".concat(t)},r.createElement("span",null,e))))},e6=r.forwardRef((e,t)=>{let n;let{prefixCls:o,className:c,rootClassName:u,style:d,extra:f,headStyle:p={},bodyStyle:h={},title:m,loading:g,bordered:v=!0,size:y,type:b,cover:x,actions:w,tabList:k,children:S,activeTabKey:E,defaultActiveTabKey:O,tabBarExtraContent:C,hoverable:j,tabProps:_={}}=e,P=e4(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:T,direction:M,card:N}=r.useContext(l.E_),A=r.useMemo(()=>{let e=!1;return r.Children.forEach(S,t=>{t&&t.type&&t.type===eV&&(e=!0)}),e},[S]),I=T("card",o),[D,L,z]=e2(I),Z=r.createElement(R,{loading:!0,active:!0,paragraph:{rows:4},title:!1},S),B=void 0!==E,F=Object.assign(Object.assign({},_),{[B?"activeKey":"defaultActiveKey"]:B?E:O,tabBarExtraContent:C}),H=(0,s.Z)(y),q=H&&"default"!==H?H:"large",U=k?r.createElement(eW,Object.assign({size:q},F,{className:"".concat(I,"-head-tabs"),onChange:t=>{var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)},items:k.map(e=>{var{tab:t}=e;return Object.assign({label:t},e4(e,["tab"]))})})):null;(m||f||U)&&(n=r.createElement("div",{className:"".concat(I,"-head"),style:p},r.createElement("div",{className:"".concat(I,"-head-wrapper")},m&&r.createElement("div",{className:"".concat(I,"-head-title")},m),f&&r.createElement("div",{className:"".concat(I,"-extra")},f)),U));let W=x?r.createElement("div",{className:"".concat(I,"-cover")},x):null,K=r.createElement("div",{className:"".concat(I,"-body"),style:h},g?Z:S),V=w&&w.length?r.createElement(e3,{prefixCls:I,actions:w}):null,$=(0,a.Z)(P,["onTabChange"]),X=i()(I,null==N?void 0:N.className,{["".concat(I,"-loading")]:g,["".concat(I,"-bordered")]:v,["".concat(I,"-hoverable")]:j,["".concat(I,"-contain-grid")]:A,["".concat(I,"-contain-tabs")]:k&&k.length,["".concat(I,"-").concat(H)]:H,["".concat(I,"-type-").concat(b)]:!!b,["".concat(I,"-rtl")]:"rtl"===M},c,u,L,z),G=Object.assign(Object.assign({},null==N?void 0:N.style),d);return D(r.createElement("div",Object.assign({ref:t},$,{className:X,style:G}),n,W,K,V))});var e8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};e6.Grid=eV,e6.Meta=e=>{let{prefixCls:t,className:n,avatar:o,title:a,description:s}=e,c=e8(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:u}=r.useContext(l.E_),d=u("card",t),f=i()("".concat(d,"-meta"),n),p=o?r.createElement("div",{className:"".concat(d,"-meta-avatar")},o):null,h=a?r.createElement("div",{className:"".concat(d,"-meta-title")},a):null,m=s?r.createElement("div",{className:"".concat(d,"-meta-description")},s):null,g=h||m?r.createElement("div",{className:"".concat(d,"-meta-detail")},h,m):null;return r.createElement("div",Object.assign({},c,{className:f}),p,g)};var e5=e6},69410:function(e,t,n){"use strict";var r=n(54998);t.Z=r.Z},44851:function(e,t,n){"use strict";n.d(t,{default:function(){return H}});var r=n(2265),o=n(77565),i=n(36760),a=n.n(i),l=n(83145),s=n(26365),c=n(41154),u=n(50506),d=n(32559),f=n(1119),p=n(6989),h=n(45287),m=n(11993),g=n(47970),v=n(95814),y=r.forwardRef(function(e,t){var n,o=e.prefixCls,i=e.forceRender,l=e.className,c=e.style,u=e.children,d=e.isActive,f=e.role,p=r.useState(d||i),h=(0,s.Z)(p,2),g=h[0],v=h[1];return(r.useEffect(function(){(i||d)&&v(!0)},[i,d]),g)?r.createElement("div",{ref:t,className:a()("".concat(o,"-content"),(n={},(0,m.Z)(n,"".concat(o,"-content-active"),d),(0,m.Z)(n,"".concat(o,"-content-inactive"),!d),n),l),style:c,role:f},r.createElement("div",{className:"".concat(o,"-content-box")},u)):null});y.displayName="PanelContent";var b=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],x=r.forwardRef(function(e,t){var n,o,i=e.showArrow,l=e.headerClass,s=e.isActive,c=e.onItemClick,u=e.forceRender,d=e.className,h=e.prefixCls,x=e.collapsible,w=e.accordion,k=e.panelKey,S=e.extra,E=e.header,O=e.expandIcon,C=e.openMotion,j=e.destroyInactivePanel,_=e.children,P=(0,p.Z)(e,b),T="disabled"===x,M="header"===x,N="icon"===x,A=function(){null==c||c(k)},I="function"==typeof O?O(e):r.createElement("i",{className:"arrow"});I&&(I=r.createElement("div",{className:"".concat(h,"-expand-icon"),onClick:["header","icon"].includes(x)?A:void 0},I));var R=a()((n={},(0,m.Z)(n,"".concat(h,"-item"),!0),(0,m.Z)(n,"".concat(h,"-item-active"),s),(0,m.Z)(n,"".concat(h,"-item-disabled"),T),n),d),D={className:a()(l,(o={},(0,m.Z)(o,"".concat(h,"-header"),!0),(0,m.Z)(o,"".concat(h,"-header-collapsible-only"),M),(0,m.Z)(o,"".concat(h,"-icon-collapsible-only"),N),o)),"aria-expanded":s,"aria-disabled":T,onKeyDown:function(e){("Enter"===e.key||e.keyCode===v.Z.ENTER||e.which===v.Z.ENTER)&&A()}};return M||N||(D.onClick=A,D.role=w?"tab":"button",D.tabIndex=T?-1:0),r.createElement("div",(0,f.Z)({},P,{ref:t,className:R}),r.createElement("div",D,(void 0===i||i)&&I,r.createElement("span",{className:"".concat(h,"-header-text"),onClick:"header"===x?A:void 0},E),null!=S&&"boolean"!=typeof S&&r.createElement("div",{className:"".concat(h,"-extra")},S)),r.createElement(g.ZP,(0,f.Z)({visible:s,leavedClassName:"".concat(h,"-content-hidden")},C,{forceRender:u,removeOnLeave:j}),function(e,t){var n=e.className,o=e.style;return r.createElement(y,{ref:t,prefixCls:h,className:n,style:o,isActive:s,forceRender:u,role:w?"tabpanel":void 0},_)}))}),w=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],k=function(e,t){var n=t.prefixCls,o=t.accordion,i=t.collapsible,a=t.destroyInactivePanel,l=t.onItemClick,s=t.activeKey,c=t.openMotion,u=t.expandIcon;return e.map(function(e,t){var d=e.children,h=e.label,m=e.key,g=e.collapsible,v=e.onItemClick,y=e.destroyInactivePanel,b=(0,p.Z)(e,w),k=String(null!=m?m:t),S=null!=g?g:i,E=!1;return E=o?s[0]===k:s.indexOf(k)>-1,r.createElement(x,(0,f.Z)({},b,{prefixCls:n,key:k,panelKey:k,isActive:E,accordion:o,openMotion:c,expandIcon:u,header:h,collapsible:S,onItemClick:function(e){"disabled"!==S&&(l(e),null==v||v(e))},destroyInactivePanel:null!=y?y:a}),d)})},S=function(e,t,n){if(!e)return null;var o=n.prefixCls,i=n.accordion,a=n.collapsible,l=n.destroyInactivePanel,s=n.onItemClick,c=n.activeKey,u=n.openMotion,d=n.expandIcon,f=e.key||String(t),p=e.props,h=p.header,m=p.headerClass,g=p.destroyInactivePanel,v=p.collapsible,y=p.onItemClick,b=!1;b=i?c[0]===f:c.indexOf(f)>-1;var x=null!=v?v:a,w={key:f,panelKey:f,header:h,headerClass:m,isActive:b,prefixCls:o,destroyInactivePanel:null!=g?g:l,openMotion:u,accordion:i,children:e.props.children,onItemClick:function(e){"disabled"!==x&&(s(e),null==y||y(e))},expandIcon:d,collapsible:x};return"string"==typeof e.type?e:(Object.keys(w).forEach(function(e){void 0===w[e]&&delete w[e]}),r.cloneElement(e,w))};function E(e){var t=e;if(!Array.isArray(t)){var n=(0,c.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map(function(e){return String(e)})}var O=Object.assign(r.forwardRef(function(e,t){var n,o=e.prefixCls,i=void 0===o?"rc-collapse":o,c=e.destroyInactivePanel,f=e.style,p=e.accordion,m=e.className,g=e.children,v=e.collapsible,y=e.openMotion,b=e.expandIcon,x=e.activeKey,w=e.defaultActiveKey,O=e.onChange,C=e.items,j=a()(i,m),_=(0,u.Z)([],{value:x,onChange:function(e){return null==O?void 0:O(e)},defaultValue:w,postState:E}),P=(0,s.Z)(_,2),T=P[0],M=P[1];(0,d.ZP)(!g,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var N=(n={prefixCls:i,accordion:p,openMotion:y,expandIcon:b,collapsible:v,destroyInactivePanel:void 0!==c&&c,onItemClick:function(e){return M(function(){return p?T[0]===e?[]:[e]:T.indexOf(e)>-1?T.filter(function(t){return t!==e}):[].concat((0,l.Z)(T),[e])})},activeKey:T},Array.isArray(C)?k(C,n):(0,h.Z)(g).map(function(e,t){return S(e,t,n)}));return r.createElement("div",{ref:t,className:j,style:f,role:p?"tablist":void 0},N)}),{Panel:x});O.Panel;var C=n(18694),j=n(68710),_=n(19722),P=n(71744),T=n(33759);let M=r.forwardRef((e,t)=>{let{getPrefixCls:n}=r.useContext(P.E_),{prefixCls:o,className:i,showArrow:l=!0}=e,s=n("collapse",o),c=a()({["".concat(s,"-no-arrow")]:!l},i);return r.createElement(O.Panel,Object.assign({ref:t},e,{prefixCls:s,className:c}))});var N=n(352),A=n(12918),I=n(63074),R=n(80669),D=n(3104);let L=e=>{let{componentCls:t,contentBg:n,padding:r,headerBg:o,headerPadding:i,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:l,collapsePanelBorderRadius:s,lineWidth:c,lineType:u,colorBorder:d,colorText:f,colorTextHeading:p,colorTextDisabled:h,fontSizeLG:m,lineHeight:g,lineHeightLG:v,marginSM:y,paddingSM:b,paddingLG:x,paddingXS:w,motionDurationSlow:k,fontSizeIcon:S,contentPadding:E,fontHeight:O,fontHeightLG:C}=e,j="".concat((0,N.bf)(c)," ").concat(u," ").concat(d);return{[t]:Object.assign(Object.assign({},(0,A.Wf)(e)),{backgroundColor:o,border:j,borderBottom:0,borderRadius:s,"&-rtl":{direction:"rtl"},["& > ".concat(t,"-item")]:{borderBottom:j,"&:last-child":{["\n &,\n & > ".concat(t,"-header")]:{borderRadius:"0 0 ".concat((0,N.bf)(s)," ").concat((0,N.bf)(s))}},["> ".concat(t,"-header")]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:p,lineHeight:g,cursor:"pointer",transition:"all ".concat(k,", visibility 0s"),["> ".concat(t,"-header-text")]:{flex:"auto"},"&:focus":{outline:"none"},["".concat(t,"-expand-icon")]:{height:O,display:"flex",alignItems:"center",paddingInlineEnd:y},["".concat(t,"-arrow")]:Object.assign(Object.assign({},(0,A.Ro)()),{fontSize:S,svg:{transition:"transform ".concat(k)}}),["".concat(t,"-header-text")]:{marginInlineEnd:"auto"}},["".concat(t,"-icon-collapsible-only")]:{cursor:"unset",["".concat(t,"-expand-icon")]:{cursor:"pointer"}}},["".concat(t,"-content")]:{color:f,backgroundColor:n,borderTop:j,["& > ".concat(t,"-content-box")]:{padding:E},"&-hidden":{display:"none"}},"&-small":{["> ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{padding:a,paddingInlineStart:w,["> ".concat(t,"-expand-icon")]:{marginInlineStart:e.calc(b).sub(w).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:b}}},"&-large":{["> ".concat(t,"-item")]:{fontSize:m,lineHeight:v,["> ".concat(t,"-header")]:{padding:l,paddingInlineStart:r,["> ".concat(t,"-expand-icon")]:{height:C,marginInlineStart:e.calc(x).sub(r).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:x}}},["".concat(t,"-item:last-child")]:{["> ".concat(t,"-content")]:{borderRadius:"0 0 ".concat((0,N.bf)(s)," ").concat((0,N.bf)(s))}},["& ".concat(t,"-item-disabled > ").concat(t,"-header")]:{"\n &,\n & > .arrow\n ":{color:h,cursor:"not-allowed"}},["&".concat(t,"-icon-position-end")]:{["& > ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{["".concat(t,"-expand-icon")]:{order:1,paddingInlineEnd:0,paddingInlineStart:y}}}}})}},z=e=>{let{componentCls:t}=e,n="> ".concat(t,"-item > ").concat(t,"-header ").concat(t,"-arrow svg");return{["".concat(t,"-rtl")]:{[n]:{transform:"rotate(180deg)"}}}},Z=e=>{let{componentCls:t,headerBg:n,paddingXXS:r,colorBorder:o}=e;return{["".concat(t,"-borderless")]:{backgroundColor:n,border:0,["> ".concat(t,"-item")]:{borderBottom:"1px solid ".concat(o)},["\n > ".concat(t,"-item:last-child,\n > ").concat(t,"-item:last-child ").concat(t,"-header\n ")]:{borderRadius:0},["> ".concat(t,"-item:last-child")]:{borderBottom:0},["> ".concat(t,"-item > ").concat(t,"-content")]:{backgroundColor:"transparent",borderTop:0},["> ".concat(t,"-item > ").concat(t,"-content > ").concat(t,"-content-box")]:{paddingTop:r}}}},B=e=>{let{componentCls:t,paddingSM:n}=e;return{["".concat(t,"-ghost")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-item")]:{borderBottom:0,["> ".concat(t,"-content")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-content-box")]:{paddingBlock:n}}}}}};var F=(0,R.I$)("Collapse",e=>{let t=(0,D.TS)(e,{collapseHeaderPaddingSM:"".concat((0,N.bf)(e.paddingXS)," ").concat((0,N.bf)(e.paddingSM)),collapseHeaderPaddingLG:"".concat((0,N.bf)(e.padding)," ").concat((0,N.bf)(e.paddingLG)),collapsePanelBorderRadius:e.borderRadiusLG});return[L(t),Z(t),B(t),z(t),(0,I.Z)(t)]},e=>({headerPadding:"".concat(e.paddingSM,"px ").concat(e.padding,"px"),headerBg:e.colorFillAlter,contentPadding:"".concat(e.padding,"px 16px"),contentBg:e.colorBgContainer})),H=Object.assign(r.forwardRef((e,t)=>{let{getPrefixCls:n,direction:i,collapse:l}=r.useContext(P.E_),{prefixCls:s,className:c,rootClassName:u,style:d,bordered:f=!0,ghost:p,size:m,expandIconPosition:g="start",children:v,expandIcon:y}=e,b=(0,T.Z)(e=>{var t;return null!==(t=null!=m?m:e)&&void 0!==t?t:"middle"}),x=n("collapse",s),w=n(),[k,S,E]=F(x),M=r.useMemo(()=>"left"===g?"start":"right"===g?"end":g,[g]),N=a()("".concat(x,"-icon-position-").concat(M),{["".concat(x,"-borderless")]:!f,["".concat(x,"-rtl")]:"rtl"===i,["".concat(x,"-ghost")]:!!p,["".concat(x,"-").concat(b)]:"middle"!==b},null==l?void 0:l.className,c,u,S,E),A=Object.assign(Object.assign({},(0,j.Z)(w)),{motionAppear:!1,leavedClassName:"".concat(x,"-content-hidden")}),I=r.useMemo(()=>v?(0,h.Z)(v).map((e,t)=>{var n,r;if(null===(n=e.props)||void 0===n?void 0:n.disabled){let n=null!==(r=e.key)&&void 0!==r?r:String(t),{disabled:o,collapsible:i}=e.props,a=Object.assign(Object.assign({},(0,C.Z)(e.props,["disabled"])),{key:n,collapsible:null!=i?i:o?"disabled":void 0});return(0,_.Tm)(e,a)}return e}):null,[v]);return k(r.createElement(O,Object.assign({ref:t,openMotion:A},(0,C.Z)(e,["rootClassName"]),{expandIcon:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=y?y(e):r.createElement(o.Z,{rotate:e.isActive?90:void 0});return(0,_.Tm)(t,()=>({className:a()(t.props.className,"".concat(x,"-arrow"))}))},prefixCls:x,className:N,style:Object.assign(Object.assign({},null==l?void 0:l.style),d)}),I))}),{Panel:M})},23496:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(2265),o=n(36760),i=n.n(o),a=n(71744),l=n(352),s=n(12918),c=n(80669),u=n(3104);let d=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,s.Wf)(e)),{borderBlockStart:"".concat((0,l.bf)(o)," solid ").concat(r),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat((0,l.bf)(o)," solid ").concat(r)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat((0,l.bf)(e.dividerHorizontalGutterMargin)," 0")},["&-horizontal".concat(t,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat((0,l.bf)(e.dividerHorizontalWithTextGutterMargin)," 0"),color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(r),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat((0,l.bf)(o)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(t,"-with-text-left")]:{"&::before":{width:"calc(".concat(a," * 100%)")},"&::after":{width:"calc(100% - ".concat(a," * 100%)")}},["&-horizontal".concat(t,"-with-text-right")]:{"&::before":{width:"calc(100% - ".concat(a," * 100%)")},"&::after":{width:"calc(".concat(a," * 100%)")}},["".concat(t,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:"".concat((0,l.bf)(o)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(t,"-dashed")]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(t,"-with-text")]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},["&-horizontal".concat(t,"-with-text-left").concat(t,"-no-default-orientation-margin-left")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(t,"-inner-text")]:{paddingInlineStart:n}},["&-horizontal".concat(t,"-with-text-right").concat(t,"-no-default-orientation-margin-right")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(t,"-inner-text")]:{paddingInlineEnd:n}}})}};var f=(0,c.I$)("Divider",e=>[d((0,u.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0}))],e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},h=e=>{let{getPrefixCls:t,direction:n,divider:o}=r.useContext(a.E_),{prefixCls:l,type:s="horizontal",orientation:c="center",orientationMargin:u,className:d,rootClassName:h,children:m,dashed:g,plain:v,style:y}=e,b=p(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),x=t("divider",l),[w,k,S]=f(x),E=c.length>0?"-".concat(c):c,O=!!m,C="left"===c&&null!=u,j="right"===c&&null!=u,_=i()(x,null==o?void 0:o.className,k,S,"".concat(x,"-").concat(s),{["".concat(x,"-with-text")]:O,["".concat(x,"-with-text").concat(E)]:O,["".concat(x,"-dashed")]:!!g,["".concat(x,"-plain")]:!!v,["".concat(x,"-rtl")]:"rtl"===n,["".concat(x,"-no-default-orientation-margin-left")]:C,["".concat(x,"-no-default-orientation-margin-right")]:j},d,h),P=r.useMemo(()=>"number"==typeof u?u:/^\d+$/.test(u)?Number(u):u,[u]),T=Object.assign(Object.assign({},C&&{marginLeft:P}),j&&{marginRight:P});return w(r.createElement("div",Object.assign({className:_,style:Object.assign(Object.assign({},null==o?void 0:o.style),y)},b,{role:"separator"}),m&&"vertical"!==s&&r.createElement("span",{className:"".concat(x,"-inner-text"),style:T},m)))}},19226:function(e,t,n){"use strict";n.d(t,{default:function(){return O}});var r=n(83145),o=n(2265),i=n(36760),a=n.n(i),l=n(18694),s=n(71744),c=n(80856),u=n(45287),d=n(92239),f=n(352),p=n(80669),h=e=>{let{componentCls:t,bodyBg:n,lightSiderBg:r,lightTriggerBg:o,lightTriggerColor:i}=e;return{["".concat(t,"-sider-light")]:{background:r,["".concat(t,"-sider-trigger")]:{color:i,background:o},["".concat(t,"-sider-zero-width-trigger")]:{color:i,background:o,border:"1px solid ".concat(n),borderInlineStart:0}}}};let m=e=>{let{antCls:t,componentCls:n,colorText:r,triggerColor:o,footerBg:i,triggerBg:a,headerHeight:l,headerPadding:s,headerColor:c,footerPadding:u,triggerHeight:d,zeroTriggerHeight:p,zeroTriggerWidth:m,motionDurationMid:g,motionDurationSlow:v,fontSize:y,borderRadius:b,bodyBg:x,headerBg:w,siderBg:k}=e;return{[n]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:x,"&, *":{boxSizing:"border-box"},["&".concat(n,"-has-sider")]:{flexDirection:"row",["> ".concat(n,", > ").concat(n,"-content")]:{width:0}},["".concat(n,"-header, &").concat(n,"-footer")]:{flex:"0 0 auto"},["".concat(n,"-sider")]:{position:"relative",minWidth:0,background:k,transition:"all ".concat(g,", background 0s"),"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,["".concat(t,"-menu").concat(t,"-menu-inline-collapsed")]:{width:"auto"}},"&-has-trigger":{paddingBottom:d},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:d,color:o,lineHeight:(0,f.bf)(d),textAlign:"center",background:a,cursor:"pointer",transition:"all ".concat(g)},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:l,insetInlineEnd:e.calc(m).mul(-1).equal(),zIndex:1,width:m,height:p,color:o,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:k,borderStartStartRadius:0,borderStartEndRadius:b,borderEndEndRadius:b,borderEndStartRadius:0,cursor:"pointer",transition:"background ".concat(v," ease"),"&::after":{position:"absolute",inset:0,background:"transparent",transition:"all ".concat(v),content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(m).mul(-1).equal(),borderStartStartRadius:b,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:b}}}}},h(e)),{"&-rtl":{direction:"rtl"}}),["".concat(n,"-header")]:{height:l,padding:s,color:c,lineHeight:(0,f.bf)(l),background:w,["".concat(t,"-menu")]:{lineHeight:"inherit"}},["".concat(n,"-footer")]:{padding:u,color:r,fontSize:y,background:i},["".concat(n,"-content")]:{flex:"auto",minHeight:0}}};var g=(0,p.I$)("Layout",e=>[m(e)],e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:l,colorBgContainer:s}=e,c=1.25*r;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:2*n,headerPadding:"0 ".concat(c,"px"),headerColor:o,footerPadding:"".concat(i,"px ").concat(c,"px"),footerBg:t,siderBg:"#001529",triggerHeight:r+2*a,triggerBg:"#002140",triggerColor:l,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:s,lightTriggerBg:s,lightTriggerColor:o}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function y(e){let{suffixCls:t,tagName:n,displayName:r}=e;return e=>o.forwardRef((r,i)=>o.createElement(e,Object.assign({ref:i,suffixCls:t,tagName:n},r)))}let b=o.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:i,tagName:l}=e,c=v(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:u}=o.useContext(s.E_),d=u("layout",n),[f,p,h]=g(d),m=r?"".concat(d,"-").concat(r):d;return f(o.createElement(l,Object.assign({className:a()(n||m,i,p,h),ref:t},c)))}),x=o.forwardRef((e,t)=>{let{direction:n}=o.useContext(s.E_),[i,f]=o.useState([]),{prefixCls:p,className:h,rootClassName:m,children:y,hasSider:b,tagName:x,style:w}=e,k=v(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),S=(0,l.Z)(k,["suffixCls"]),{getPrefixCls:E,layout:O}=o.useContext(s.E_),C=E("layout",p),j="boolean"==typeof b?b:!!i.length||(0,u.Z)(y).some(e=>e.type===d.Z),[_,P,T]=g(C),M=a()(C,{["".concat(C,"-has-sider")]:j,["".concat(C,"-rtl")]:"rtl"===n},null==O?void 0:O.className,h,m,P,T),N=o.useMemo(()=>({siderHook:{addSider:e=>{f(t=>[].concat((0,r.Z)(t),[e]))},removeSider:e=>{f(t=>t.filter(t=>t!==e))}}}),[]);return _(o.createElement(c.V.Provider,{value:N},o.createElement(x,Object.assign({ref:t,className:M,style:Object.assign(Object.assign({},null==O?void 0:O.style),w)},S),y)))}),w=y({tagName:"div",displayName:"Layout"})(x),k=y({suffixCls:"header",tagName:"header",displayName:"Header"})(b),S=y({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(b),E=y({suffixCls:"content",tagName:"main",displayName:"Content"})(b);w.Header=k,w.Footer=S,w.Content=E,w.Sider=d.Z,w._InternalSiderContext=d.D;var O=w},867:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(2265),o=n(54537),i=n(36760),a=n.n(i),l=n(50506),s=n(95814),c=n(18694),u=n(19722),d=n(71744),f=n(79326),p=n(59367),h=n(92570),m=n(73002),g=n(51248),v=n(55274),y=n(13823),b=n(20435),x=n(80669);let w=e=>{let{componentCls:t,iconCls:n,antCls:r,zIndexPopup:o,colorText:i,colorWarning:a,marginXXS:l,marginXS:s,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:o,["&".concat(r,"-popover")]:{fontSize:c},["".concat(t,"-message")]:{marginBottom:s,display:"flex",flexWrap:"nowrap",alignItems:"start",["> ".concat(t,"-message-icon ").concat(n)]:{color:a,fontSize:c,lineHeight:1,marginInlineEnd:s},["".concat(t,"-title")]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},["".concat(t,"-description")]:{marginTop:l,color:i}},["".concat(t,"-buttons")]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:s}}}}};var k=(0,x.I$)("Popconfirm",e=>w(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let E=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:i,title:l,description:s,cancelText:c,okText:u,okType:f="primary",icon:b=r.createElement(o.Z,null),showCancel:x=!0,close:w,onConfirm:k,onCancel:S,onPopupClick:E}=e,{getPrefixCls:O}=r.useContext(d.E_),[C]=(0,v.Z)("Popconfirm",y.Z.Popconfirm),j=(0,h.Z)(l),_=(0,h.Z)(s);return r.createElement("div",{className:"".concat(t,"-inner-content"),onClick:E},r.createElement("div",{className:"".concat(t,"-message")},b&&r.createElement("span",{className:"".concat(t,"-message-icon")},b),r.createElement("div",{className:"".concat(t,"-message-text")},j&&r.createElement("div",{className:a()("".concat(t,"-title"))},j),_&&r.createElement("div",{className:"".concat(t,"-description")},_))),r.createElement("div",{className:"".concat(t,"-buttons")},x&&r.createElement(m.ZP,Object.assign({onClick:S,size:"small"},i),c||(null==C?void 0:C.cancelText)),r.createElement(p.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,g.nx)(f)),n),actionFn:k,close:w,prefixCls:O("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},u||(null==C?void 0:C.okText))))};var O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let C=r.forwardRef((e,t)=>{var n,i;let{prefixCls:p,placement:h="top",trigger:m="click",okType:g="primary",icon:v=r.createElement(o.Z,null),children:y,overlayClassName:b,onOpenChange:x,onVisibleChange:w}=e,S=O(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),{getPrefixCls:C}=r.useContext(d.E_),[j,_]=(0,l.Z)(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(i=e.defaultOpen)&&void 0!==i?i:e.defaultVisible}),P=(e,t)=>{_(e,!0),null==w||w(e),null==x||x(e,t)},T=e=>{e.keyCode===s.Z.ESC&&j&&P(!1,e)},M=C("popconfirm",p),N=a()(M,b),[A]=k(M);return A(r.createElement(f.Z,Object.assign({},(0,c.Z)(S,["title"]),{trigger:m,placement:h,onOpenChange:t=>{let{disabled:n=!1}=e;n||P(t)},open:j,ref:t,overlayClassName:N,content:r.createElement(E,Object.assign({okType:g,icon:v},e,{prefixCls:M,close:e=>{P(!1,e)},onConfirm:t=>{var n;return null===(n=e.onConfirm)||void 0===n?void 0:n.call(void 0,t)},onCancel:t=>{var n;P(!1,t),null===(n=e.onCancel)||void 0===n||n.call(void 0,t)}})),"data-popover-inject":!0}),(0,u.Tm)(y,{onKeyDown:e=>{var t,n;r.isValidElement(y)&&(null===(n=null==y?void 0:(t=y.props).onKeyDown)||void 0===n||n.call(t,e)),T(e)}})))});C._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,placement:n,className:o,style:i}=e,l=S(e,["prefixCls","placement","className","style"]),{getPrefixCls:s}=r.useContext(d.E_),c=s("popconfirm",t),[u]=k(c);return u(r.createElement(b.ZP,{placement:n,className:a()(c,o),style:i,content:r.createElement(E,Object.assign({prefixCls:c},l))}))};var j=C},20435:function(e,t,n){"use strict";var r=n(2265),o=n(36760),i=n.n(o),a=n(5769),l=n(92570),s=n(71744),c=n(72262),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let d=(e,t,n)=>t||n?r.createElement(r.Fragment,null,t&&r.createElement("div",{className:"".concat(e,"-title")},(0,l.Z)(t)),r.createElement("div",{className:"".concat(e,"-inner-content")},(0,l.Z)(n))):null,f=e=>{let{hashId:t,prefixCls:n,className:o,style:l,placement:s="top",title:c,content:u,children:f}=e;return r.createElement("div",{className:i()(t,n,"".concat(n,"-pure"),"".concat(n,"-placement-").concat(s),o),style:l},r.createElement("div",{className:"".concat(n,"-arrow")}),r.createElement(a.G,Object.assign({},e,{className:t,prefixCls:n}),f||d(n,c,u)))};t.ZP=e=>{let{prefixCls:t,className:n}=e,o=u(e,["prefixCls","className"]),{getPrefixCls:a}=r.useContext(s.E_),l=a("popover",t),[d,p,h]=(0,c.Z)(l);return d(r.createElement(f,Object.assign({},o,{prefixCls:l,hashId:p,className:i()(n,h)})))}},79326:function(e,t,n){"use strict";var r=n(2265),o=n(36760),i=n.n(o),a=n(92570),l=n(68710),s=n(71744),c=n(89970),u=n(20435),d=n(72262),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let p=e=>{let{title:t,content:n,prefixCls:o}=e;return r.createElement(r.Fragment,null,t&&r.createElement("div",{className:"".concat(o,"-title")},(0,a.Z)(t)),r.createElement("div",{className:"".concat(o,"-inner-content")},(0,a.Z)(n)))},h=r.forwardRef((e,t)=>{let{prefixCls:n,title:o,content:a,overlayClassName:u,placement:h="top",trigger:m="hover",mouseEnterDelay:g=.1,mouseLeaveDelay:v=.1,overlayStyle:y={}}=e,b=f(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:x}=r.useContext(s.E_),w=x("popover",n),[k,S,E]=(0,d.Z)(w),O=x(),C=i()(u,S,E);return k(r.createElement(c.Z,Object.assign({placement:h,trigger:m,mouseEnterDelay:g,mouseLeaveDelay:v,overlayStyle:y},b,{prefixCls:w,overlayClassName:C,ref:t,overlay:o||a?r.createElement(p,{prefixCls:w,title:o,content:a}):null,transitionName:(0,l.m)(O,"zoom-big",b.transitionName),"data-popover-inject":!0})))});h._InternalPanelDoNotUseOrYouWillBeFired=u.ZP,t.Z=h},72262:function(e,t,n){"use strict";var r=n(12918),o=n(691),i=n(88260),a=n(53454),l=n(80669),s=n(3104),c=n(34442);let u=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:o,fontWeightStrong:a,innerPadding:l,boxShadowSecondary:s,colorTextHeading:c,borderRadiusLG:u,zIndexPopup:d,titleMarginBottom:f,colorBgElevated:p,popoverBg:h,titleBorderBottom:m,innerContentPadding:g,titlePadding:v}=e;return[{[t]:Object.assign(Object.assign({},(0,r.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":p,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},["".concat(t,"-content")]:{position:"relative"},["".concat(t,"-inner")]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:u,boxShadow:s,padding:l},["".concat(t,"-title")]:{minWidth:o,marginBottom:f,color:c,fontWeight:a,borderBottom:m,padding:v},["".concat(t,"-inner-content")]:{color:n,padding:g}})},(0,i.ZP)(e,"var(--antd-arrow-background-color)"),{["".concat(t,"-pure")]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",["".concat(t,"-content")]:{display:"inline-block"}}}]},d=e=>{let{componentCls:t}=e;return{[t]:a.i.map(n=>{let r=e["".concat(n,"6")];return{["&".concat(t,"-").concat(n)]:{"--antd-arrow-background-color":r,["".concat(t,"-inner")]:{backgroundColor:r},["".concat(t,"-arrow")]:{background:"transparent"}}}})}};t.Z=(0,l.I$)("Popover",e=>{let{colorBgElevated:t,colorText:n}=e,r=(0,s.TS)(e,{popoverBg:t,popoverColor:n});return[u(r),d(r),(0,o._y)(r,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:o,wireframe:a,zIndexPopupBase:l,borderRadiusLG:s,marginXS:u,lineType:d,colorSplit:f,paddingSM:p}=e,h=n-r;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:l+30},(0,c.w)(e)),(0,i.wZ)({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:a?0:12,titleMarginBottom:a?0:u,titlePadding:a?"".concat(h/2,"px ").concat(o,"px ").concat(h/2-t,"px"):0,titleBorderBottom:a?"".concat(t,"px ").concat(d," ").concat(f):"none",innerContentPadding:a?"".concat(p,"px ").concat(o,"px"):0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]})},29967:function(e,t,n){"use strict";n.d(t,{ZP:function(){return R}});var r=n(2265),o=n(36760),i=n.n(o),a=n(50506),l=n(18242),s=n(71744),c=n(33759);let u=r.createContext(null),d=u.Provider,f=r.createContext(null),p=f.Provider;var h=n(20873),m=n(28791),g=n(6694),v=n(34709),y=n(86586),b=n(39109),x=n(352),w=n(12918),k=n(80669),S=n(3104);let E=e=>{let{componentCls:t,antCls:n}=e,r="".concat(t,"-group");return{[r]:Object.assign(Object.assign({},(0,w.Wf)(e)),{display:"inline-block",fontSize:0,["&".concat(r,"-rtl")]:{direction:"rtl"},["".concat(n,"-badge ").concat(n,"-badge-count")]:{zIndex:1},["> ".concat(n,"-badge:not(:first-child) > ").concat(n,"-button-wrapper")]:{borderInlineStart:"none"}})}},O=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:o,motionDurationSlow:i,motionDurationMid:a,motionEaseInOutCirc:l,colorBgContainer:s,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:f,paddingXS:p,dotColorDisabled:h,lineType:m,radioColor:g,radioBgColor:v,calc:y}=e,b="".concat(t,"-inner"),k=y(o).sub(y(4).mul(2)),S=y(1).mul(o).equal();return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},(0,w.Wf)(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",["&".concat(t,"-wrapper-rtl")]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},["".concat(t,"-checked::after")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:"".concat((0,x.bf)(u)," ").concat(m," ").concat(r),borderRadius:"50%",visibility:"hidden",content:'""'},[t]:Object.assign(Object.assign({},(0,w.Wf)(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),["".concat(t,"-wrapper:hover &,\n &:hover ").concat(b)]:{borderColor:r},["".concat(t,"-input:focus-visible + ").concat(b)]:Object.assign({},(0,w.oN)(e)),["".concat(t,":hover::after, ").concat(t,"-wrapper:hover &::after")]:{visibility:"visible"},["".concat(t,"-inner")]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:S,height:S,marginBlockStart:y(1).mul(o).div(-2).equal(),marginInlineStart:y(1).mul(o).div(-2).equal(),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:S,transform:"scale(0)",opacity:0,transition:"all ".concat(i," ").concat(l),content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:S,height:S,backgroundColor:s,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:"all ".concat(a)},["".concat(t,"-input")]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},["".concat(t,"-checked")]:{[b]:{borderColor:r,backgroundColor:v,"&::after":{transform:"scale(".concat(e.calc(e.dotSize).div(o).equal(),")"),opacity:1,transition:"all ".concat(i," ").concat(l)}}},["".concat(t,"-disabled")]:{cursor:"not-allowed",[b]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:h}},["".concat(t,"-input")]:{cursor:"not-allowed"},["".concat(t,"-disabled + span")]:{color:f,cursor:"not-allowed"},["&".concat(t,"-checked")]:{[b]:{"&::after":{transform:"scale(".concat(y(k).div(o).equal({unit:!1}),")")}}}},["span".concat(t," + *")]:{paddingInlineStart:p,paddingInlineEnd:p}})}},C=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:o,lineType:i,colorBorder:a,motionDurationSlow:l,motionDurationMid:s,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:f,controlHeightLG:p,controlHeightSM:h,paddingXS:m,borderRadius:g,borderRadiusSM:v,borderRadiusLG:y,buttonCheckedBg:b,buttonSolidCheckedColor:k,colorTextDisabled:S,colorBgContainerDisabled:E,buttonCheckedBgDisabled:O,buttonCheckedColorDisabled:C,colorPrimary:j,colorPrimaryHover:_,colorPrimaryActive:P,buttonSolidCheckedBg:T,buttonSolidCheckedHoverBg:M,buttonSolidCheckedActiveBg:N,calc:A}=e;return{["".concat(r,"-button-wrapper")]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:(0,x.bf)(A(n).sub(A(o).mul(2)).equal()),background:d,border:"".concat((0,x.bf)(o)," ").concat(i," ").concat(a),borderBlockStartWidth:A(o).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:["color ".concat(s),"background ".concat(s),"box-shadow ".concat(s)].join(","),a:{color:t},["> ".concat(r,"-button")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:A(o).mul(-1).equal(),insetInlineStart:A(o).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:a,transition:"background-color ".concat(l),content:'""'}},"&:first-child":{borderInlineStart:"".concat((0,x.bf)(o)," ").concat(i," ").concat(a),borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},["".concat(r,"-group-large &")]:{height:p,fontSize:f,lineHeight:(0,x.bf)(A(p).sub(A(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},["".concat(r,"-group-small &")]:{height:h,paddingInline:A(m).sub(o).equal(),paddingBlock:0,lineHeight:(0,x.bf)(A(h).sub(A(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},"&:hover":{position:"relative",color:j},"&:has(:focus-visible)":Object.assign({},(0,w.oN)(e)),["".concat(r,"-inner, input[type='checkbox'], input[type='radio']")]:{width:0,height:0,opacity:0,pointerEvents:"none"},["&-checked:not(".concat(r,"-button-wrapper-disabled)")]:{zIndex:1,color:j,background:b,borderColor:j,"&::before":{backgroundColor:j},"&:first-child":{borderColor:j},"&:hover":{color:_,borderColor:_,"&::before":{backgroundColor:_}},"&:active":{color:P,borderColor:P,"&::before":{backgroundColor:P}}},["".concat(r,"-group-solid &-checked:not(").concat(r,"-button-wrapper-disabled)")]:{color:k,background:T,borderColor:T,"&:hover":{color:k,background:M,borderColor:M},"&:active":{color:k,background:N,borderColor:N}},"&-disabled":{color:S,backgroundColor:E,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:S,backgroundColor:E,borderColor:a}},["&-disabled".concat(r,"-button-wrapper-checked")]:{color:C,backgroundColor:O,borderColor:a,boxShadow:"none"}}}};var j=(0,k.I$)("Radio",e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r="0 0 0 ".concat((0,x.bf)(n)," ").concat(t),o=(0,S.TS)(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[E(o),O(o),C(o)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:o,fontSizeLG:i,colorText:a,colorBgContainer:l,colorTextDisabled:s,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:h}=e;return{radioSize:i,dotSize:t?i-8:i-(4+o)*2,dotColorDisabled:s,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:l,buttonCheckedBg:l,buttonColor:a,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:s,buttonPaddingInline:n-o,wrapperMarginInlineEnd:r,radioColor:t?d:h,radioBgColor:t?l:d}},{unitless:{radioSize:!0,dotSize:!0}}),_=n(64024),P=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let T=r.forwardRef((e,t)=>{var n,o;let a=r.useContext(u),l=r.useContext(f),{getPrefixCls:c,direction:d,radio:p}=r.useContext(s.E_),x=r.useRef(null),w=(0,m.sQ)(t,x),{isFormItemInput:k}=r.useContext(b.aM),{prefixCls:S,className:E,rootClassName:O,children:C,style:T,title:M}=e,N=P(e,["prefixCls","className","rootClassName","children","style","title"]),A=c("radio",S),I="button"===((null==a?void 0:a.optionType)||l),R=I?"".concat(A,"-button"):A,D=(0,_.Z)(A),[L,z,Z]=j(A,D),B=Object.assign({},N),F=r.useContext(y.Z);a&&(B.name=a.name,B.onChange=t=>{var n,r;null===(n=e.onChange)||void 0===n||n.call(e,t),null===(r=null==a?void 0:a.onChange)||void 0===r||r.call(a,t)},B.checked=e.value===a.value,B.disabled=null!==(n=B.disabled)&&void 0!==n?n:a.disabled),B.disabled=null!==(o=B.disabled)&&void 0!==o?o:F;let H=i()("".concat(R,"-wrapper"),{["".concat(R,"-wrapper-checked")]:B.checked,["".concat(R,"-wrapper-disabled")]:B.disabled,["".concat(R,"-wrapper-rtl")]:"rtl"===d,["".concat(R,"-wrapper-in-form-item")]:k},null==p?void 0:p.className,E,O,z,Z,D);return L(r.createElement(g.Z,{component:"Radio",disabled:B.disabled},r.createElement("label",{className:H,style:Object.assign(Object.assign({},null==p?void 0:p.style),T),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:M},r.createElement(h.Z,Object.assign({},B,{className:i()(B.className,!I&&v.A),type:"radio",prefixCls:R,ref:w})),void 0!==C?r.createElement("span",null,C):null)))}),M=r.forwardRef((e,t)=>{let{getPrefixCls:n,direction:o}=r.useContext(s.E_),[u,f]=(0,a.Z)(e.defaultValue,{value:e.value}),{prefixCls:p,className:h,rootClassName:m,options:g,buttonStyle:v="outline",disabled:y,children:b,size:x,style:w,id:k,onMouseEnter:S,onMouseLeave:E,onFocus:O,onBlur:C}=e,P=n("radio",p),M="".concat(P,"-group"),N=(0,_.Z)(P),[A,I,R]=j(P,N),D=b;g&&g.length>0&&(D=g.map(e=>"string"==typeof e||"number"==typeof e?r.createElement(T,{key:e.toString(),prefixCls:P,disabled:y,value:e,checked:u===e},e):r.createElement(T,{key:"radio-group-value-options-".concat(e.value),prefixCls:P,disabled:e.disabled||y,value:e.value,checked:u===e.value,title:e.title,style:e.style,id:e.id,required:e.required},e.label)));let L=(0,c.Z)(x),z=i()(M,"".concat(M,"-").concat(v),{["".concat(M,"-").concat(L)]:L,["".concat(M,"-rtl")]:"rtl"===o},h,m,I,R,N);return A(r.createElement("div",Object.assign({},(0,l.Z)(e,{aria:!0,data:!0}),{className:z,style:w,onMouseEnter:S,onMouseLeave:E,onFocus:O,onBlur:C,id:k,ref:t}),r.createElement(d,{value:{onChange:t=>{let n=t.target.value;"value"in e||f(n);let{onChange:r}=e;r&&n!==u&&r(t)},value:u,disabled:e.disabled,name:e.name,optionType:e.optionType}},D)))});var N=r.memo(M),A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},I=r.forwardRef((e,t)=>{let{getPrefixCls:n}=r.useContext(s.E_),{prefixCls:o}=e,i=A(e,["prefixCls"]),a=n("radio",o);return r.createElement(p,{value:"button"},r.createElement(T,Object.assign({prefixCls:a},i,{type:"radio",ref:t})))});T.Button=I,T.Group=N,T.__ANT_RADIO=!0;var R=T},47451:function(e,t,n){"use strict";var r=n(10295);t.Z=r.Z},87908:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(2265),o=n(36760),i=n.n(o),a=n(18694),l=n(19722),s=n(71744),c=n(352),u=n(12918),d=n(80669),f=n(3104);let p=new c.E4("antSpinMove",{to:{opacity:1}}),h=new c.E4("antRotate",{to:{transform:"rotate(405deg)"}}),m=e=>{let{componentCls:t,calc:n}=e;return{["".concat(t)]:Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:"transform ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOutCirc),"&-spinning":{position:"static",display:"inline-block",opacity:1},["".concat(t,"-text")]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:"all ".concat(e.motionDurationMid),"&-show":{opacity:1,visibility:"visible"},["".concat(t,"-dot ").concat(t,"-dot-item")]:{backgroundColor:e.colorWhite},["".concat(t,"-text")]:{color:e.colorTextLightSolid}},"&-nested-loading":{position:"relative",["> div > ".concat(t)]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,["".concat(t,"-dot")]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},["".concat(t,"-text")]:{position:"absolute",top:"50%",width:"100%",textShadow:"0 1px 2px ".concat(e.colorBgContainer)},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{["".concat(t,"-dot")]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},["".concat(t,"-text")]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{["".concat(t,"-dot")]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},["".concat(t,"-text")]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},["".concat(t,"-container")]:{position:"relative",transition:"opacity ".concat(e.motionDurationSlow),"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:"all ".concat(e.motionDurationSlow),content:'""',pointerEvents:"none"}},["".concat(t,"-blur")]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},["".concat(t,"-dot")]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:p,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:h,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&-sm ".concat(t,"-dot")]:{fontSize:e.dotSizeSM,i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},["&-lg ".concat(t,"-dot")]:{fontSize:e.dotSizeLG,i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},["&".concat(t,"-show-text ").concat(t,"-text")]:{display:"block"}})}};var g=(0,d.I$)("Spin",e=>[m((0,f.TS)(e,{spinDotDefault:e.colorTextDescription}))],e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:n}}),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let y=null,b=e=>{let{prefixCls:t,spinning:n=!0,delay:o=0,className:c,rootClassName:u,size:d="default",tip:f,wrapperClassName:p,style:h,children:m,fullscreen:b}=e,x=v(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen"]),{getPrefixCls:w}=r.useContext(s.E_),k=w("spin",t),[S,E,O]=g(k),[C,j]=r.useState(()=>n&&(!n||!o||!!isNaN(Number(o))));r.useEffect(()=>{if(n){var e;let t=function(e,t,n){var r,o=n||{},i=o.noTrailing,a=void 0!==i&&i,l=o.noLeading,s=void 0!==l&&l,c=o.debounceMode,u=void 0===c?void 0:c,d=!1,f=0;function p(){r&&clearTimeout(r)}function h(){for(var n=arguments.length,o=Array(n),i=0;ie?s?(f=Date.now(),a||(r=setTimeout(u?m:h,e))):h():!0!==a&&(r=setTimeout(u?m:h,void 0===u?e-c:e)))}return h.cancel=function(e){var t=(e||{}).upcomingOnly;p(),d=!(void 0!==t&&t)},h}(o,()=>{j(!0)},{debounceMode:!1!==(void 0!==(e=({}).atBegin)&&e)});return t(),()=>{var e;null===(e=null==t?void 0:t.cancel)||void 0===e||e.call(t)}}j(!1)},[o,n]);let _=r.useMemo(()=>void 0!==m&&!b,[m,b]),{direction:P,spin:T}=r.useContext(s.E_),M=i()(k,null==T?void 0:T.className,{["".concat(k,"-sm")]:"small"===d,["".concat(k,"-lg")]:"large"===d,["".concat(k,"-spinning")]:C,["".concat(k,"-show-text")]:!!f,["".concat(k,"-fullscreen")]:b,["".concat(k,"-fullscreen-show")]:b&&C,["".concat(k,"-rtl")]:"rtl"===P},c,u,E,O),N=i()("".concat(k,"-container"),{["".concat(k,"-blur")]:C}),A=(0,a.Z)(x,["indicator"]),I=Object.assign(Object.assign({},null==T?void 0:T.style),h),R=r.createElement("div",Object.assign({},A,{style:I,className:M,"aria-live":"polite","aria-busy":C}),function(e,t){let{indicator:n}=t,o="".concat(e,"-dot");return null===n?null:(0,l.l$)(n)?(0,l.Tm)(n,{className:i()(n.props.className,o)}):(0,l.l$)(y)?(0,l.Tm)(y,{className:i()(y.props.className,o)}):r.createElement("span",{className:i()(o,"".concat(e,"-dot-spin"))},r.createElement("i",{className:"".concat(e,"-dot-item"),key:1}),r.createElement("i",{className:"".concat(e,"-dot-item"),key:2}),r.createElement("i",{className:"".concat(e,"-dot-item"),key:3}),r.createElement("i",{className:"".concat(e,"-dot-item"),key:4}))}(k,e),f&&(_||b)?r.createElement("div",{className:"".concat(k,"-text")},f):null);return S(_?r.createElement("div",Object.assign({},A,{className:i()("".concat(k,"-nested-loading"),p,E,O)}),C&&r.createElement("div",{key:"loading"},R),r.createElement("div",{className:N,key:"container"},m)):R)};b.setDefaultIndicator=e=>{y=e};var x=b},76122:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});let r=e=>({color:e.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}})},63709:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var r=n(2265),o=n(61935),i=n(36760),a=n.n(i),l=n(1119),s=n(11993),c=n(26365),u=n(6989),d=n(50506),f=n(95814),p=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],h=r.forwardRef(function(e,t){var n,o=e.prefixCls,i=void 0===o?"rc-switch":o,h=e.className,m=e.checked,g=e.defaultChecked,v=e.disabled,y=e.loadingIcon,b=e.checkedChildren,x=e.unCheckedChildren,w=e.onClick,k=e.onChange,S=e.onKeyDown,E=(0,u.Z)(e,p),O=(0,d.Z)(!1,{value:m,defaultValue:g}),C=(0,c.Z)(O,2),j=C[0],_=C[1];function P(e,t){var n=j;return v||(_(n=e),null==k||k(n,t)),n}var T=a()(i,h,(n={},(0,s.Z)(n,"".concat(i,"-checked"),j),(0,s.Z)(n,"".concat(i,"-disabled"),v),n));return r.createElement("button",(0,l.Z)({},E,{type:"button",role:"switch","aria-checked":j,disabled:v,className:T,ref:t,onKeyDown:function(e){e.which===f.Z.LEFT?P(!1,e):e.which===f.Z.RIGHT&&P(!0,e),null==S||S(e)},onClick:function(e){var t=P(!j,e);null==w||w(t,e)}}),y,r.createElement("span",{className:"".concat(i,"-inner")},r.createElement("span",{className:"".concat(i,"-inner-checked")},b),r.createElement("span",{className:"".concat(i,"-inner-unchecked")},x)))});h.displayName="Switch";var m=n(6694),g=n(71744),v=n(86586),y=n(33759),b=n(352),x=n(36360),w=n(12918),k=n(80669),S=n(3104);let E=e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:o,innerMinMarginSM:i,innerMaxMarginSM:a,handleSizeSM:l,calc:s}=e,c="".concat(t,"-inner"),u=(0,b.bf)(s(l).add(s(r).mul(2)).equal()),d=(0,b.bf)(s(a).mul(2).equal());return{[t]:{["&".concat(t,"-small")]:{minWidth:o,height:n,lineHeight:(0,b.bf)(n),["".concat(t,"-inner")]:{paddingInlineStart:a,paddingInlineEnd:i,["".concat(c,"-checked")]:{marginInlineStart:"calc(-100% + ".concat(u," - ").concat(d,")"),marginInlineEnd:"calc(100% - ".concat(u," + ").concat(d,")")},["".concat(c,"-unchecked")]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},["".concat(t,"-handle")]:{width:l,height:l},["".concat(t,"-loading-icon")]:{top:s(s(l).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},["&".concat(t,"-checked")]:{["".concat(t,"-inner")]:{paddingInlineStart:i,paddingInlineEnd:a,["".concat(c,"-checked")]:{marginInlineStart:0,marginInlineEnd:0},["".concat(c,"-unchecked")]:{marginInlineStart:"calc(100% - ".concat(u," + ").concat(d,")"),marginInlineEnd:"calc(-100% + ".concat(u," - ").concat(d,")")}},["".concat(t,"-handle")]:{insetInlineStart:"calc(100% - ".concat((0,b.bf)(s(l).add(r).equal()),")")}},["&:not(".concat(t,"-disabled):active")]:{["&:not(".concat(t,"-checked) ").concat(c)]:{["".concat(c,"-unchecked")]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},["&".concat(t,"-checked ").concat(c)]:{["".concat(c,"-checked")]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}},O=e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{["".concat(t,"-loading-icon").concat(e.iconCls)]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},["&".concat(t,"-checked ").concat(t,"-loading-icon")]:{color:e.switchColor}}}},C=e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:o,handleSize:i,calc:a}=e,l="".concat(t,"-handle");return{[t]:{[l]:{position:"absolute",top:n,insetInlineStart:n,width:i,height:i,transition:"all ".concat(e.switchDuration," ease-in-out"),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(i).div(2).equal(),boxShadow:o,transition:"all ".concat(e.switchDuration," ease-in-out"),content:'""'}},["&".concat(t,"-checked ").concat(l)]:{insetInlineStart:"calc(100% - ".concat((0,b.bf)(a(i).add(n).equal()),")")},["&:not(".concat(t,"-disabled):active")]:{["".concat(l,"::before")]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},["&".concat(t,"-checked ").concat(l,"::before")]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},j=e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:o,innerMaxMargin:i,handleSize:a,calc:l}=e,s="".concat(t,"-inner"),c=(0,b.bf)(l(a).add(l(r).mul(2)).equal()),u=(0,b.bf)(l(i).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:o,transition:"padding-inline-start ".concat(e.switchDuration," ease-in-out, padding-inline-end ").concat(e.switchDuration," ease-in-out"),["".concat(s,"-checked, ").concat(s,"-unchecked")]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:"margin-inline-start ".concat(e.switchDuration," ease-in-out, margin-inline-end ").concat(e.switchDuration," ease-in-out"),pointerEvents:"none"},["".concat(s,"-checked")]:{marginInlineStart:"calc(-100% + ".concat(c," - ").concat(u,")"),marginInlineEnd:"calc(100% - ".concat(c," + ").concat(u,")")},["".concat(s,"-unchecked")]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},["&".concat(t,"-checked ").concat(s)]:{paddingInlineStart:o,paddingInlineEnd:i,["".concat(s,"-checked")]:{marginInlineStart:0,marginInlineEnd:0},["".concat(s,"-unchecked")]:{marginInlineStart:"calc(100% - ".concat(c," + ").concat(u,")"),marginInlineEnd:"calc(-100% + ".concat(c," - ").concat(u,")")}},["&:not(".concat(t,"-disabled):active")]:{["&:not(".concat(t,"-checked) ").concat(s)]:{["".concat(s,"-unchecked")]:{marginInlineStart:l(r).mul(2).equal(),marginInlineEnd:l(r).mul(-1).mul(2).equal()}},["&".concat(t,"-checked ").concat(s)]:{["".concat(s,"-checked")]:{marginInlineStart:l(r).mul(-1).mul(2).equal(),marginInlineEnd:l(r).mul(2).equal()}}}}}},_=e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,w.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:"".concat((0,b.bf)(n)),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),userSelect:"none",["&:hover:not(".concat(t,"-disabled)")]:{background:e.colorTextTertiary}}),(0,w.Qy)(e)),{["&".concat(t,"-checked")]:{background:e.switchColor,["&:hover:not(".concat(t,"-disabled)")]:{background:e.colorPrimaryHover}},["&".concat(t,"-loading, &").concat(t,"-disabled")]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},["&".concat(t,"-rtl")]:{direction:"rtl"}})}};var P=(0,k.I$)("Switch",e=>{let t=(0,S.TS)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:"rgba(0, 0, 0, ".concat(e.opacityLoading,")"),switchHandleActiveInset:"-30%"});return[_(t),j(t),C(t),O(t),E(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:o}=e,i=t*n,a=r/2,l=i-4,s=a-4;return{trackHeight:i,trackHeightSM:a,trackMinWidth:2*l+8,trackMinWidthSM:2*s+4,trackPadding:2,handleBg:o,handleSize:l,handleSizeSM:s,handleShadow:"0 2px 4px 0 ".concat(new x.C("#00230b").setAlpha(.2).toRgbString()),innerMinMargin:l/2,innerMaxMargin:l+2+4,innerMinMarginSM:s/2,innerMaxMarginSM:s+2+4}}),T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let M=r.forwardRef((e,t)=>{let{prefixCls:n,size:i,disabled:l,loading:s,className:c,rootClassName:u,style:f,checked:p,value:b,defaultChecked:x,defaultValue:w,onChange:k}=e,S=T(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[E,O]=(0,d.Z)(!1,{value:null!=p?p:b,defaultValue:null!=x?x:w}),{getPrefixCls:C,direction:j,switch:_}=r.useContext(g.E_),M=r.useContext(v.Z),N=(null!=l?l:M)||s,A=C("switch",n),I=r.createElement("div",{className:"".concat(A,"-handle")},s&&r.createElement(o.Z,{className:"".concat(A,"-loading-icon")})),[R,D,L]=P(A),z=(0,y.Z)(i),Z=a()(null==_?void 0:_.className,{["".concat(A,"-small")]:"small"===z,["".concat(A,"-loading")]:s,["".concat(A,"-rtl")]:"rtl"===j},c,u,D,L),B=Object.assign(Object.assign({},null==_?void 0:_.style),f);return R(r.createElement(m.Z,{component:"Switch"},r.createElement(h,Object.assign({},S,{checked:E,onChange:function(){O(arguments.length<=0?void 0:arguments[0]),null==k||k.apply(void 0,arguments)},prefixCls:A,className:Z,style:B,disabled:N,ref:t,loadingIcon:I}))))});M.__ANT_SWITCH=!0;var N=M},72188:function(e,t,n){"use strict";n.d(t,{Z:function(){return oe}});var r,o,i=n(2265),a={},l="rc-table-internal-hook",s=n(26365),c=n(58525),u=n(27380),d=n(16671),f=n(54887);function p(e){var t=i.createContext(void 0);return{Context:t,Provider:function(e){var n=e.value,r=e.children,o=i.useRef(n);o.current=n;var a=i.useState(function(){return{getValue:function(){return o.current},listeners:new Set}}),l=(0,s.Z)(a,1)[0];return(0,u.Z)(function(){(0,f.unstable_batchedUpdates)(function(){l.listeners.forEach(function(e){e(n)})})},[n]),i.createElement(t.Provider,{value:l},r)},defaultValue:e}}function h(e,t){var n=(0,c.Z)("function"==typeof t?t:function(e){if(void 0===t)return e;if(!Array.isArray(t))return e[t];var n={};return t.forEach(function(t){n[t]=e[t]}),n}),r=i.useContext(null==e?void 0:e.Context),o=r||{},a=o.listeners,l=o.getValue,f=i.useRef();f.current=n(r?l():null==e?void 0:e.defaultValue);var p=i.useState({}),h=(0,s.Z)(p,2)[1];return(0,u.Z)(function(){if(r)return a.add(e),function(){a.delete(e)};function e(e){var t=n(e);(0,d.Z)(f.current,t,!0)||h({})}},[r]),f.current}var m=n(1119),g=n(28791);function v(){var e=i.createContext(null);function t(){return i.useContext(e)}return{makeImmutable:function(n,r){var o=(0,g.Yr)(n),a=function(a,l){var s=o?{ref:l}:{},c=i.useRef(0),u=i.useRef(a);return null!==t()?i.createElement(n,(0,m.Z)({},a,s)):((!r||r(u.current,a))&&(c.current+=1),u.current=a,i.createElement(e.Provider,{value:c.current},i.createElement(n,(0,m.Z)({},a,s))))};return o?i.forwardRef(a):a},responseImmutable:function(e,n){var r=(0,g.Yr)(e),o=function(n,o){return t(),i.createElement(e,(0,m.Z)({},n,r?{ref:o}:{}))};return r?i.memo(i.forwardRef(o),n):i.memo(o,n)},useImmutableMark:t}}var y=v();y.makeImmutable,y.responseImmutable,y.useImmutableMark;var b=v(),x=b.makeImmutable,w=b.responseImmutable,k=b.useImmutableMark,S=p();i.memo(function(){var e,t,n,r,o,a=(t=i.useRef(0),t.current+=1,n=i.useRef(void 0),r=[],Object.keys(e||{}).map(function(t){var o;(null==e?void 0:e[t])!==(null===(o=n.current)||void 0===o?void 0:o[t])&&r.push(t)}),n.current=e,o=i.useRef([]),r.length&&(o.current=r),i.useDebugValue(t.current),i.useDebugValue(o.current.join(", ")),t.current);return i.createElement("h1",null,"Render Times: ",a)}).displayName="RenderBlock";var E=n(41154),O=n(31686),C=n(11993),j=n(36760),_=n.n(j),P=n(6397),T=n(16847),M=n(32559),N=i.createContext({renderWithProps:!1});function A(e){var t=[],n={};return e.forEach(function(e){for(var r=e||{},o=r.key,i=r.dataIndex,a=o||(null==i?[]:Array.isArray(i)?i:[i]).join("-")||"RC_TABLE_KEY";n[a];)a="".concat(a,"_next");n[a]=!0,t.push(a)}),t}var I=n(74126),R=function(e){var t,n=e.ellipsis,r=e.rowType,o=e.children,a=!0===n?{showTitle:!0}:n;return a&&(a.showTitle||"header"===r)&&("string"==typeof o||"number"==typeof o?t=o.toString():i.isValidElement(o)&&"string"==typeof o.props.children&&(t=o.props.children)),t},D=i.memo(function(e){var t,n,r,o,a,l,c,u,f,p,g=e.component,v=e.children,y=e.ellipsis,b=e.scope,x=e.prefixCls,w=e.className,j=e.align,M=e.record,A=e.render,D=e.dataIndex,L=e.renderIndex,z=e.shouldCellUpdate,Z=e.index,B=e.rowType,F=e.colSpan,H=e.rowSpan,q=e.fixLeft,U=e.fixRight,W=e.firstFixLeft,K=e.lastFixLeft,V=e.firstFixRight,$=e.lastFixRight,X=e.appendNode,G=e.additionalProps,Y=void 0===G?{}:G,Q=e.isSticky,J="".concat(x,"-cell"),ee=h(S,["supportSticky","allColumnsFixedLeft"]),et=ee.supportSticky,en=ee.allColumnsFixedLeft,er=(t=i.useContext(N),n=k(),(0,P.Z)(function(){if(null!=v)return[v];var e=null==D||""===D?[]:Array.isArray(D)?D:[D],n=(0,T.Z)(M,e),r=n,o=void 0;if(A){var a=A(n,M,L);!a||"object"!==(0,E.Z)(a)||Array.isArray(a)||i.isValidElement(a)?r=a:(r=a.children,o=a.props,t.renderWithProps=!0)}return[r,o]},[n,M,v,D,A,L],function(e,n){if(z){var r=(0,s.Z)(e,2)[1];return z((0,s.Z)(n,2)[1],r)}return!!t.renderWithProps||!(0,d.Z)(e,n,!0)})),eo=(0,s.Z)(er,2),ei=eo[0],ea=eo[1],el={},es="number"==typeof q&&et,ec="number"==typeof U&&et;es&&(el.position="sticky",el.left=q),ec&&(el.position="sticky",el.right=U);var eu=null!==(r=null!==(o=null!==(a=null==ea?void 0:ea.colSpan)&&void 0!==a?a:Y.colSpan)&&void 0!==o?o:F)&&void 0!==r?r:1,ed=null!==(l=null!==(c=null!==(u=null==ea?void 0:ea.rowSpan)&&void 0!==u?u:Y.rowSpan)&&void 0!==c?c:H)&&void 0!==l?l:1,ef=h(S,function(e){var t,n;return[(t=ed||1,n=e.hoverStartRow,Z<=e.hoverEndRow&&Z+t-1>=n),e.onHover]}),ep=(0,s.Z)(ef,2),eh=ep[0],em=ep[1],eg=(0,I.zX)(function(e){var t;M&&em(Z,Z+ed-1),null==Y||null===(t=Y.onMouseEnter)||void 0===t||t.call(Y,e)}),ev=(0,I.zX)(function(e){var t;M&&em(-1,-1),null==Y||null===(t=Y.onMouseLeave)||void 0===t||t.call(Y,e)});if(0===eu||0===ed)return null;var ey=null!==(f=Y.title)&&void 0!==f?f:R({rowType:B,ellipsis:y,children:ei}),eb=_()(J,w,(p={},(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)(p,"".concat(J,"-fix-left"),es&&et),"".concat(J,"-fix-left-first"),W&&et),"".concat(J,"-fix-left-last"),K&&et),"".concat(J,"-fix-left-all"),K&&en&&et),"".concat(J,"-fix-right"),ec&&et),"".concat(J,"-fix-right-first"),V&&et),"".concat(J,"-fix-right-last"),$&&et),"".concat(J,"-ellipsis"),y),"".concat(J,"-with-append"),X),"".concat(J,"-fix-sticky"),(es||ec)&&Q&&et),(0,C.Z)(p,"".concat(J,"-row-hover"),!ea&&eh)),Y.className,null==ea?void 0:ea.className),ex={};j&&(ex.textAlign=j);var ew=(0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)({},el),Y.style),ex),null==ea?void 0:ea.style),ek=ei;return"object"!==(0,E.Z)(ek)||Array.isArray(ek)||i.isValidElement(ek)||(ek=null),y&&(K||V)&&(ek=i.createElement("span",{className:"".concat(J,"-content")},ek)),i.createElement(g,(0,m.Z)({},ea,Y,{className:eb,style:ew,title:ey,scope:b,onMouseEnter:eg,onMouseLeave:ev,colSpan:1!==eu?eu:null,rowSpan:1!==ed?ed:null}),X,ek)});function L(e,t,n,r,o,i){var a,l,s=n[e]||{},c=n[t]||{};"left"===s.fixed?a=r.left["rtl"===o?t:e]:"right"===c.fixed&&(l=r.right["rtl"===o?e:t]);var u=!1,d=!1,f=!1,p=!1,h=n[t+1],m=n[e-1],g=!(null!=i&&i.children);return"rtl"===o?void 0!==a?p=!(m&&"left"===m.fixed)&&g:void 0!==l&&(f=!(h&&"right"===h.fixed)&&g):void 0!==a?u=!(h&&"left"===h.fixed)&&g:void 0!==l&&(d=!(m&&"right"===m.fixed)&&g),{fixLeft:a,fixRight:l,lastFixLeft:u,firstFixRight:d,lastFixRight:f,firstFixLeft:p,isSticky:r.isSticky}}var z=i.createContext({}),Z=n(6989),B=["children"];function F(e){return e.children}F.Row=function(e){var t=e.children,n=(0,Z.Z)(e,B);return i.createElement("tr",n,t)},F.Cell=function(e){var t=e.className,n=e.index,r=e.children,o=e.colSpan,a=void 0===o?1:o,l=e.rowSpan,s=e.align,c=h(S,["prefixCls","direction"]),u=c.prefixCls,d=c.direction,f=i.useContext(z),p=f.scrollColumnIndex,g=f.stickyOffsets,v=f.flattenColumns,y=f.columns,b=n+a-1+1===p?a+1:a,x=L(n,n+b-1,v,g,d,null==y?void 0:y[n]);return i.createElement(D,(0,m.Z)({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,align:s,colSpan:b,rowSpan:l,render:function(){return r}},x))};var H=w(function(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,o=e.columns,a=h(S,"prefixCls"),l=r.length-1,s=r[l],c=i.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:null!=s&&s.scrollbar?l:null,columns:o}},[s,r,l,n,o]);return i.createElement(z.Provider,{value:c},i.createElement("tfoot",{className:"".concat(a,"-summary")},t))}),q=n(31474),U=n(2857),W=n(10281),K=n(3208),V=n(18242);function $(e,t,n,r){return i.useMemo(function(){if(null!=n&&n.size){for(var o=[],i=0;i<(null==e?void 0:e.length);i+=1)!function e(t,n,r,o,i,a,l){t.push({record:n,indent:r,index:l});var s=a(n),c=null==i?void 0:i.has(s);if(n&&Array.isArray(n[o])&&c)for(var u=0;u1?n-1:0),o=1;o=0;s-=1){var c=t[s],u=n&&n[s],d=u&&u[ei];if(c||d||l){var f=d||{},p=(f.columnType,(0,Z.Z)(f,ea));o.unshift(i.createElement("col",(0,m.Z)({key:s,style:{width:c}},p))),l=!0}}return i.createElement("colgroup",null,o)},es=n(83145),ec=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"],eu=i.forwardRef(function(e,t){var n=e.className,r=e.noData,o=e.columns,a=e.flattenColumns,l=e.colWidths,s=e.columCount,c=e.stickyOffsets,u=e.direction,d=e.fixHeader,f=e.stickyTopOffset,p=e.stickyBottomOffset,m=e.stickyClassName,v=e.onScroll,y=e.maxContentScroll,b=e.children,x=(0,Z.Z)(e,ec),w=h(S,["prefixCls","scrollbarSize","isSticky"]),k=w.prefixCls,E=w.scrollbarSize,j=w.isSticky,P=j&&!d?0:E,T=i.useRef(null),M=i.useCallback(function(e){(0,g.mH)(t,e),(0,g.mH)(T,e)},[]);i.useEffect(function(){var e;function t(e){var t=e.currentTarget,n=e.deltaX;n&&(v({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}return null===(e=T.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=T.current)||void 0===e||e.removeEventListener("wheel",t)}},[]);var N=i.useMemo(function(){return a.every(function(e){return e.width})},[a]),A=a[a.length-1],I={fixed:A?A.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(k,"-cell-scrollbar")}}},R=(0,i.useMemo)(function(){return P?[].concat((0,es.Z)(o),[I]):o},[P,o]),D=(0,i.useMemo)(function(){return P?[].concat((0,es.Z)(a),[I]):a},[P,a]),L=(0,i.useMemo)(function(){var e=c.right,t=c.left;return(0,O.Z)((0,O.Z)({},c),{},{left:"rtl"===u?[].concat((0,es.Z)(t.map(function(e){return e+P})),[0]):t,right:"rtl"===u?e:[].concat((0,es.Z)(e.map(function(e){return e+P})),[0]),isSticky:j})},[P,c,j]),z=(0,i.useMemo)(function(){for(var e=[],t=0;t1?"colgroup":"col":null,ellipsis:a.ellipsis,align:a.align,component:a.title?l:s,prefixCls:f,key:g[t]},c,{additionalProps:n,rowType:"header"}))}))}ef.displayName="HeaderRow";var ep=w(function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,o=e.onHeaderRow,a=h(S,["prefixCls","getComponent"]),l=a.prefixCls,s=a.getComponent,c=i.useMemo(function(){return function(e){var t=[];!function e(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[o]=t[o]||[];var i=r;return n.filter(Boolean).map(function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:i},a=1,l=n.children;return l&&l.length>0&&(a=e(l,i,o+1).reduce(function(e,t){return e+t},0),r.hasSubColumns=!0),"colSpan"in n&&(a=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=a,r.colEnd=r.colStart+a-1,t[o].push(r),i+=a,a})}(e,0);for(var n=t.length,r=function(e){t[e].forEach(function(t){("rowSpan"in t)||t.hasSubColumns||(t.rowSpan=n-e)})},o=0;o1&&void 0!==arguments[1]?arguments[1]:"";return"number"==typeof t?t:t.endsWith("%")?e*parseFloat(t)/100:null}var eg=["children"],ev=["fixed"];function ey(e){return(0,eh.Z)(e).filter(function(e){return i.isValidElement(e)}).map(function(e){var t=e.key,n=e.props,r=n.children,o=(0,Z.Z)(n,eg),i=(0,O.Z)({key:t},o);return r&&(i.children=ey(r)),i})}function eb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";return e.filter(function(e){return e&&"object"===(0,E.Z)(e)}).reduce(function(e,n,r){var o=n.fixed,i=!0===o?"left":o,a="".concat(t,"-").concat(r),l=n.children;return l&&l.length>0?[].concat((0,es.Z)(e),(0,es.Z)(eb(l,a).map(function(e){return(0,O.Z)({fixed:i},e)}))):[].concat((0,es.Z)(e),[(0,O.Z)((0,O.Z)({key:a},n),{},{fixed:i})])},[])}var ex=function(e,t){var n=e.prefixCls,r=e.columns,o=e.children,l=e.expandable,c=e.expandedKeys,u=e.columnTitle,d=e.getRowKey,f=e.onTriggerExpand,p=e.expandIcon,h=e.rowExpandable,m=e.expandIconColumnIndex,g=e.direction,v=e.expandRowByClick,y=e.columnWidth,b=e.fixed,x=e.scrollWidth,w=e.clientWidth,k=i.useMemo(function(){return function e(t){return t.filter(function(e){return e&&"object"===(0,E.Z)(e)&&!e.hidden}).map(function(t){var n=t.children;return n&&n.length>0?(0,O.Z)((0,O.Z)({},t),{},{children:e(n)}):t})}((r||ey(o)||[]).slice())},[r,o]),S=i.useMemo(function(){if(l){var e,t=k.slice();if(!t.includes(a)){var r=m||0;r>=0&&t.splice(r,0,a)}var o=t.indexOf(a);t=t.filter(function(e,t){return e!==a||t===o});var s=k[o];e=("left"===b||b)&&!m?"left":("right"===b||b)&&m===k.length?"right":s?s.fixed:null;var g=(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)({},ei,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",u),"fixed",e),"className","".concat(n,"-row-expand-icon-cell")),"width",y),"render",function(e,t,r){var o=d(t,r),a=p({prefixCls:n,expanded:c.has(o),expandable:!h||h(t),record:t,onExpand:f});return v?i.createElement("span",{onClick:function(e){return e.stopPropagation()}},a):a});return t.map(function(e){return e===a?g:e})}return k.filter(function(e){return e!==a})},[l,k,d,c,p,g]),j=i.useMemo(function(){var e=S;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e},[t,S,g]),_=i.useMemo(function(){return"rtl"===g?eb(j).map(function(e){var t=e.fixed,n=(0,Z.Z)(e,ev),r=t;return"left"===t?r="right":"right"===t&&(r="left"),(0,O.Z)({fixed:r},n)}):eb(j)},[j,g,x]),P=i.useMemo(function(){if(x&&x>0){var e=0,t=0;_.forEach(function(n){var r=em(x,n.width);r?e+=r:t+=1});var n=Math.max(x,w),r=Math.max(n-e,t),o=t,i=r/t,a=0,l=_.map(function(e){var t=(0,O.Z)({},e),n=em(x,t.width);if(n)t.width=n;else{var l=Math.floor(i);t.width=1===o?r:l,r-=l,o-=1}return a+=t.width,t});if(a=f&&(r=f-p),a({scrollLeft:r/f*(d+2)}),x.current.x=e.pageX},M=function(){if(o.current){var e=eC(o.current).top,t=e+o.current.offsetHeight,n=c===window?document.documentElement.scrollTop+window.innerHeight:eC(c).top+c.clientHeight;t-(0,K.Z)()<=n||e>=n-l?b(function(e){return(0,O.Z)((0,O.Z)({},e),{},{isHiddenScrollBar:!0})}):b(function(e){return(0,O.Z)((0,O.Z)({},e),{},{isHiddenScrollBar:!1})})}},N=function(e){b(function(t){return(0,O.Z)((0,O.Z)({},t),{},{scrollLeft:e/d*f||0})})};return(i.useImperativeHandle(t,function(){return{setScrollLeft:N}}),i.useEffect(function(){var e=eO(document.body,"mouseup",P,!1),t=eO(document.body,"mousemove",T,!1);return M(),function(){e.remove(),t.remove()}},[p,E]),i.useEffect(function(){var e=eO(c,"scroll",M,!1),t=eO(window,"resize",M,!1);return function(){e.remove(),t.remove()}},[c]),i.useEffect(function(){y.isHiddenScrollBar||b(function(e){var t=o.current;return t?(0,O.Z)((0,O.Z)({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e})},[y.isHiddenScrollBar]),d<=f||!p||y.isHiddenScrollBar)?null:i.createElement("div",{style:{height:(0,K.Z)(),width:f,bottom:l},className:"".concat(u,"-sticky-scroll")},i.createElement("div",{onMouseDown:function(e){e.persist(),x.current.delta=e.pageX-y.scrollLeft,x.current.x=0,j(!0),e.preventDefault()},ref:m,className:_()("".concat(u,"-sticky-scroll-bar"),(0,C.Z)({},"".concat(u,"-sticky-scroll-bar-active"),E)),style:{width:"".concat(p,"px"),transform:"translate3d(".concat(y.scrollLeft,"px, 0, 0)")}}))}),e_="rc-table",eP=[],eT={};function eM(){return"No Data"}var eN=i.forwardRef(function(e,t){var n,r=(0,O.Z)({rowKey:"key",prefixCls:e_,emptyText:eM},e),o=r.prefixCls,a=r.className,u=r.rowClassName,f=r.style,p=r.data,h=r.rowKey,g=r.scroll,v=r.tableLayout,y=r.direction,b=r.title,x=r.footer,w=r.summary,k=r.caption,j=r.id,M=r.showHeader,N=r.components,I=r.emptyText,R=r.onRow,D=r.onHeaderRow,z=r.internalHooks,B=r.transformColumns,$=r.internalRefs,X=r.tailor,G=r.getContainerWidth,Y=r.sticky,Q=p||eP,J=!!Q.length,ee=z===l,et=i.useCallback(function(e,t){return(0,T.Z)(N,e)||t},[N]),en=i.useMemo(function(){return"function"==typeof h?h:function(e){return e&&e[h]}},[h]),ei=et(["body"]),ea=(tH=i.useState(-1),tU=(tq=(0,s.Z)(tH,2))[0],tW=tq[1],tK=i.useState(-1),t$=(tV=(0,s.Z)(tK,2))[0],tX=tV[1],[tU,t$,i.useCallback(function(e,t){tW(e),tX(t)},[])]),ec=(0,s.Z)(ea,3),eu=ec[0],ef=ec[1],eh=ec[2],em=(tJ=(tY=r.expandable,tQ=(0,Z.Z)(r,eo),!1===(tG="expandable"in r?(0,O.Z)((0,O.Z)({},tQ),tY):tQ).showExpandColumn&&(tG.expandIconColumnIndex=-1),tG).expandIcon,t0=tG.expandedRowKeys,t1=tG.defaultExpandedRowKeys,t2=tG.defaultExpandAllRows,t4=tG.expandedRowRender,t3=tG.onExpand,t6=tG.onExpandedRowsChange,t8=tG.childrenColumnName||"children",t5=i.useMemo(function(){return t4?"row":!!(r.expandable&&r.internalHooks===l&&r.expandable.__PARENT_RENDER_ICON__||Q.some(function(e){return e&&"object"===(0,E.Z)(e)&&e[t8]}))&&"nest"},[!!t4,Q]),t7=i.useState(function(){if(t1)return t1;if(t2){var e;return e=[],function t(n){(n||[]).forEach(function(n,r){e.push(en(n,r)),t(n[t8])})}(Q),e}return[]}),ne=(t9=(0,s.Z)(t7,2))[0],nt=t9[1],nn=i.useMemo(function(){return new Set(t0||ne||[])},[t0,ne]),nr=i.useCallback(function(e){var t,n=en(e,Q.indexOf(e)),r=nn.has(n);r?(nn.delete(n),t=(0,es.Z)(nn)):t=[].concat((0,es.Z)(nn),[n]),nt(t),t3&&t3(!r,e),t6&&t6(t)},[en,nn,Q,t3,t6]),[tG,t5,nn,tJ||ew,t8,nr]),eg=(0,s.Z)(em,6),ev=eg[0],ey=eg[1],eb=eg[2],eO=eg[3],eC=eg[4],eN=eg[5],eA=null==g?void 0:g.x,eI=i.useState(0),eR=(0,s.Z)(eI,2),eD=eR[0],eL=eR[1],ez=ex((0,O.Z)((0,O.Z)((0,O.Z)({},r),ev),{},{expandable:!!ev.expandedRowRender,columnTitle:ev.columnTitle,expandedKeys:eb,getRowKey:en,onTriggerExpand:eN,expandIcon:eO,expandIconColumnIndex:ev.expandIconColumnIndex,direction:y,scrollWidth:ee&&X&&"number"==typeof eA?eA:null,clientWidth:eD}),ee?B:null),eZ=(0,s.Z)(ez,3),eB=eZ[0],eF=eZ[1],eH=eZ[2],eq=null!=eH?eH:eA,eU=i.useMemo(function(){return{columns:eB,flattenColumns:eF}},[eB,eF]),eW=i.useRef(),eK=i.useRef(),eV=i.useRef(),e$=i.useRef();i.useImperativeHandle(t,function(){return{nativeElement:eW.current,scrollTo:function(e){var t;if(eV.current instanceof HTMLElement){var n=e.index,r=e.top,o=e.key;if(r)null===(i=eV.current)||void 0===i||i.scrollTo({top:r});else{var i,a,l=null!=o?o:en(Q[n]);null===(a=eV.current.querySelector('[data-row-key="'.concat(l,'"]')))||void 0===a||a.scrollIntoView()}}else null!==(t=eV.current)&&void 0!==t&&t.scrollTo&&eV.current.scrollTo(e)}}});var eX=i.useRef(),eG=i.useState(!1),eY=(0,s.Z)(eG,2),eQ=eY[0],eJ=eY[1],e0=i.useState(!1),e1=(0,s.Z)(e0,2),e2=e1[0],e4=e1[1],e3=ek(new Map),e6=(0,s.Z)(e3,2),e8=e6[0],e5=e6[1],e7=A(eF).map(function(e){return e8.get(e)}),e9=i.useMemo(function(){return e7},[e7.join("_")]),te=(no=eF.length,(0,i.useMemo)(function(){for(var e=[],t=[],n=0,r=0,o=0;o0)):(eJ(i>0),e4(i1?b-A:0,pointerEvents:"auto"}),R=i.useMemo(function(){return f?N<=1:0===T||0===N||N>1},[N,T,f]);R?I.visibility="hidden":f&&(I.height=null==p?void 0:p(N));var L={};return(0===N||0===T)&&(L.rowSpan=1,L.colSpan=1),i.createElement(D,(0,m.Z)({className:_()(y,d),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:"div",prefixCls:n.prefixCls,key:k,record:c,index:l,renderIndex:s,dataIndex:v,render:R?function(){return null}:g,shouldCellUpdate:r.shouldCellUpdate},S,{appendNode:E,additionalProps:(0,O.Z)((0,O.Z)({},C),{},{style:I},L)}))},ez=["data","index","className","rowKey","style","extra","getHeight"],eZ=w(i.forwardRef(function(e,t){var n,r=e.data,o=e.index,a=e.className,l=e.rowKey,s=e.style,c=e.extra,u=e.getHeight,d=(0,Z.Z)(e,ez),f=r.record,p=r.indent,g=r.index,v=h(S,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),y=v.scrollX,b=v.flattenColumns,x=v.prefixCls,w=v.fixColumn,k=v.componentWidth,E=X(f,l,o,p),j=E.rowSupportExpand,P=E.expanded,T=E.rowProps,M=E.expandedRowRender,N=E.expandedRowClassName;if(j&&P){var A=M(f,o,p+1,P),I=null==N?void 0:N(f,o,p),R={};w&&(R={style:(0,C.Z)({},"--virtual-width","".concat(k,"px"))});var L="".concat(x,"-expanded-row-cell");n=i.createElement("div",{className:_()("".concat(x,"-expanded-row"),"".concat(x,"-expanded-row-level-").concat(p+1),I)},i.createElement(D,{component:"div",prefixCls:x,className:_()(L,(0,C.Z)({},"".concat(L,"-fixed"),w)),additionalProps:R},A))}var z=(0,O.Z)((0,O.Z)({},s),{},{width:y});c&&(z.position="absolute",z.pointerEvents="none");var B=i.createElement("div",(0,m.Z)({},T,d,{ref:j?null:t,className:_()(a,"".concat(x,"-row"),null==T?void 0:T.className,(0,C.Z)({},"".concat(x,"-row-extra"),c)),style:(0,O.Z)((0,O.Z)({},z),null==T?void 0:T.style)}),b.map(function(e,t){return i.createElement(eL,{key:t,rowInfo:E,column:e,colIndex:t,indent:p,index:o,renderIndex:g,record:f,inverse:c,getHeight:u})}));return j?i.createElement("div",{ref:t},B,n):B})),eB=w(i.forwardRef(function(e,t){var n,r=e.data,o=e.onScroll,a=h(S,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),l=a.flattenColumns,c=a.onColumnResize,u=a.getRowKey,d=a.expandedKeys,f=a.prefixCls,p=a.childrenColumnName,g=a.emptyNode,v=a.scrollX,y=h(eR),b=y.sticky,x=y.scrollY,w=y.listItemHeight,k=i.useRef(),O=$(r,p,d,u),C=i.useMemo(function(){var e=0;return l.map(function(t){var n=t.width,r=t.key;return e+=n,[r,n,e]})},[l]),j=i.useMemo(function(){return C.map(function(e){return e[2]})},[C]);i.useEffect(function(){C.forEach(function(e){var t=(0,s.Z)(e,2);c(t[0],t[1])})},[C]),i.useImperativeHandle(t,function(){var e={scrollTo:function(e){var t;null===(t=k.current)||void 0===t||t.scrollTo(e)}};return Object.defineProperty(e,"scrollLeft",{get:function(){var e;return(null===(e=k.current)||void 0===e?void 0:e.getScrollInfo().x)||0},set:function(e){var t;null===(t=k.current)||void 0===t||t.scrollTo({left:e})}}),e});var P=function(e,t){var n=null===(o=O[t])||void 0===o?void 0:o.record,r=e.onCell;if(r){var o,i,a=r(n,t);return null!==(i=null==a?void 0:a.rowSpan)&&void 0!==i?i:1}return 1},T=i.useMemo(function(){return{columnsOffset:j}},[j]),M="".concat(f,"-tbody");if(O.length){var N={};b&&(N.position="sticky",N.bottom=0,"object"===(0,E.Z)(b)&&b.offsetScroll&&(N.bottom=b.offsetScroll)),n=i.createElement(eI.Z,{fullHeight:!1,ref:k,styles:{horizontalScrollBar:N},className:_()(M,"".concat(M,"-virtual")),height:x,itemHeight:w||24,data:O,itemKey:function(e){return u(e.record)},scrollWidth:v,onVirtualScroll:function(e){o({scrollLeft:e.x})},extraRender:function(e){var t=e.start,n=e.end,r=e.getSize,o=e.offsetY;if(n<0)return null;for(var a=l.filter(function(e){return 0===P(e,t)}),s=t,c=function(e){if(!(a=a.filter(function(t){return 0===P(t,e)})).length)return s=e,1},d=t;d>=0&&!c(d);d-=1);for(var f=l.filter(function(e){return 1!==P(e,n)}),p=n,h=function(e){if(!(f=f.filter(function(t){return 1!==P(t,e)})).length)return p=Math.max(e-1,n),1},m=n;m1})&&g.push(e)},y=s;y<=p;y+=1)if(v(y))continue;return g.map(function(e){var t=O[e],n=u(t.record,e),a=r(n);return i.createElement(eZ,{key:e,data:t,rowKey:n,index:e,style:{top:-o+a.top},extra:!0,getHeight:function(t){var o=e+t-1,i=r(n,u(O[o].record,o));return i.bottom-i.top}})})}},function(e,t,n){var r=u(e.record,t);return i.createElement(eZ,(0,m.Z)({data:e,rowKey:r,index:t},n))})}else n=i.createElement("div",{className:_()("".concat(f,"-placeholder"))},i.createElement(D,{component:"div",prefixCls:f},g));return i.createElement(eD.Provider,{value:T},n)})),eF=function(e,t){var n=t.ref,r=t.onScroll;return i.createElement(eB,{ref:n,data:e,onScroll:r})},eH=i.forwardRef(function(e,t){var n=e.columns,r=e.scroll,o=e.sticky,a=e.prefixCls,s=void 0===a?e_:a,c=e.className,u=e.listItemHeight,d=e.components,f=r||{},p=f.x,h=f.y;"number"!=typeof p&&(p=1),"number"!=typeof h&&(h=500);var g=i.useMemo(function(){return{sticky:o,scrollY:h,listItemHeight:u}},[o,h,u]);return i.createElement(eR.Provider,{value:g},i.createElement(eA,(0,m.Z)({},e,{className:_()(c,"".concat(s,"-virtual")),scroll:(0,O.Z)((0,O.Z)({},r),{},{x:p}),components:(0,O.Z)((0,O.Z)({},d),{},{body:eF}),columns:n,internalHooks:l,tailor:!0,ref:t})))});x(eH,void 0);var eq=n(70464),eU=n(76405),eW=n(25049),eK=n(63496),eV=n(15354),e$=n(15900),eX=i.createContext(null),eG=i.memo(function(e){for(var t,n=e.prefixCls,r=e.level,o=e.isStart,a=e.isEnd,l="".concat(n,"-indent-unit"),s=[],c=0;c1&&void 0!==arguments[1]?arguments[1]:null;return n.map(function(c,u){for(var d,f=eJ(r?r.pos:"0",u),p=e0(c[i],f),h=0;h1&&void 0!==arguments[1]?arguments[1]:{},f=d.initWrapper,p=d.processEntity,h=d.onProcessFinished,m=d.externalGetKey,g=d.childrenPropName,v=d.fieldNames,y=arguments.length>2?arguments[2]:void 0,b={},x={},w={posEntities:b,keyEntities:x};return f&&(w=f(w)||w),t=function(e){var t=e.node,n=e.index,r=e.pos,o=e.key,i=e.parentPos,a=e.level,l={node:t,nodes:e.nodes,index:n,key:o,pos:r,level:a},s=e0(o,r);b[r]=l,x[s]=l,l.parent=b[i],l.parent&&(l.parent.children=l.parent.children||[],l.parent.children.push(l)),p&&p(l,w)},n={externalGetKey:m||y,childrenPropName:g,fieldNames:v},i=(o=("object"===(0,E.Z)(n)?n:{externalGetKey:n})||{}).childrenPropName,a=o.externalGetKey,s=(l=e1(o.fieldNames)).key,c=l.children,u=i||c,a?"string"==typeof a?r=function(e){return e[a]}:"function"==typeof a&&(r=function(e){return a(e)}):r=function(e,t){return e0(e[s],t)},function n(o,i,a,l){var s=o?o[u]:e,c=o?eJ(a.pos,i):"0",d=o?[].concat((0,es.Z)(l),[o]):[];if(o){var f=r(o,c);t({node:o,index:i,pos:c,key:f,parentPos:a.node?a.pos:null,level:a.level+1,nodes:d})}s&&s.forEach(function(e,t){n(e,t,{node:o,pos:c,level:a?a.level+1:-1},d)})}(null),h&&h(w),w}function e6(e,t){var n=t.expandedKeys,r=t.selectedKeys,o=t.loadedKeys,i=t.loadingKeys,a=t.checkedKeys,l=t.halfCheckedKeys,s=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==o.indexOf(e),loading:-1!==i.indexOf(e),checked:-1!==a.indexOf(e),halfChecked:-1!==l.indexOf(e),pos:String(u?u.pos:""),dragOver:s===e&&0===c,dragOverGapTop:s===e&&-1===c,dragOverGapBottom:s===e&&1===c}}function e8(e){var t=e.data,n=e.expanded,r=e.selected,o=e.checked,i=e.loaded,a=e.loading,l=e.halfChecked,s=e.dragOver,c=e.dragOverGapTop,u=e.dragOverGapBottom,d=e.pos,f=e.active,p=e.eventKey,h=(0,O.Z)((0,O.Z)({},t),{},{expanded:n,selected:r,checked:o,loaded:i,loading:a,halfChecked:l,dragOver:s,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,key:p});return"props"in h||Object.defineProperty(h,"props",{get:function(){return(0,M.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),h}var e5=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],e7="open",e9="close",te=function(e){(0,eV.Z)(n,e);var t=(0,e$.Z)(n);function n(){var e;(0,eU.Z)(this,n);for(var r=arguments.length,o=Array(r),a=0;a=0&&n.splice(r,1),n}function tr(e,t){var n=(e||[]).slice();return -1===n.indexOf(t)&&n.push(t),n}function to(e){return e.split("-")}function ti(e,t,n,r,o,i,a,l,s,c){var u,d,f=e.clientX,p=e.clientY,h=e.target.getBoundingClientRect(),m=h.top,g=h.height,v=(("rtl"===c?-1:1)*(((null==o?void 0:o.x)||0)-f)-12)/r,y=l[n.props.eventKey];if(p-1.5?i({dragNode:C,dropNode:j,dropPosition:1})?S=1:_=!1:i({dragNode:C,dropNode:j,dropPosition:0})?S=0:i({dragNode:C,dropNode:j,dropPosition:1})?S=1:_=!1:i({dragNode:C,dropNode:j,dropPosition:1})?S=1:_=!1,{dropPosition:S,dropLevelOffset:E,dropTargetKey:y.key,dropTargetPos:y.pos,dragOverNodeKey:k,dropContainerKey:0===S?null:(null===(d=y.parent)||void 0===d?void 0:d.key)||null,dropAllowed:_}}function ta(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function tl(e){var t;if(!e)return null;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==(0,E.Z)(e))return(0,M.ZP)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function ts(e,t){var n=new Set;return(e||[]).forEach(function(e){!function e(r){if(!n.has(r)){var o=t[r];if(o){n.add(r);var i=o.parent;!o.node.disabled&&i&&e(i.key)}}}(e)}),(0,es.Z)(n)}function tc(e,t){var n=new Set;return e.forEach(function(e){t.has(e)||n.add(e)}),n}function tu(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,o=t.checkable;return!!(n||r)||!1===o}function td(e,t,n,r){var o,i=[];o=r||tu;var a=new Set(e.filter(function(e){var t=!!n[e];return t||i.push(e),t})),l=new Map,s=0;return Object.keys(n).forEach(function(e){var t=n[e],r=t.level,o=l.get(r);o||(o=new Set,l.set(r,o)),o.add(t),s=Math.max(s,r)}),(0,M.ZP)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(e){return"'".concat(e,"'")}).join(", "))),!0===t?function(e,t,n,r){for(var o=new Set(e),i=new Set,a=0;a<=n;a+=1)(t.get(a)||new Set).forEach(function(e){var t=e.key,n=e.node,i=e.children,a=void 0===i?[]:i;o.has(t)&&!r(n)&&a.filter(function(e){return!r(e.node)}).forEach(function(e){o.add(e.key)})});for(var l=new Set,s=n;s>=0;s-=1)(t.get(s)||new Set).forEach(function(e){var t=e.parent;if(!(r(e.node)||!e.parent||l.has(e.parent.key))){if(r(e.parent.node)){l.add(t.key);return}var n=!0,a=!1;(t.children||[]).filter(function(e){return!r(e.node)}).forEach(function(e){var t=e.key,r=o.has(t);n&&!r&&(n=!1),!a&&(r||i.has(t))&&(a=!0)}),n&&o.add(t.key),a&&i.add(t.key),l.add(t.key)}});return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(tc(i,o))}}(a,l,s,o):function(e,t,n,r,o){for(var i=new Set(e),a=new Set(t),l=0;l<=r;l+=1)(n.get(l)||new Set).forEach(function(e){var t=e.key,n=e.node,r=e.children,l=void 0===r?[]:r;i.has(t)||a.has(t)||o(n)||l.filter(function(e){return!o(e.node)}).forEach(function(e){i.delete(e.key)})});a=new Set;for(var s=new Set,c=r;c>=0;c-=1)(n.get(c)||new Set).forEach(function(e){var t=e.parent;if(!(o(e.node)||!e.parent||s.has(e.parent.key))){if(o(e.parent.node)){s.add(t.key);return}var n=!0,r=!1;(t.children||[]).filter(function(e){return!o(e.node)}).forEach(function(e){var t=e.key,o=i.has(t);n&&!o&&(n=!1),!r&&(o||a.has(t))&&(r=!0)}),n||i.delete(t.key),r&&a.add(t.key),s.add(t.key)}});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(tc(a,i))}}(a,t.halfCheckedKeys,l,s,o)}tt.displayName="TreeNode",tt.isTreeNode=1;var tf=n(50506),tp=n(13613),th=n(61994),tm=n(80795),tg=n(29967);let tv={},ty="SELECT_ALL",tb="SELECT_INVERT",tx="SELECT_NONE",tw=[],tk=(e,t)=>{let n=[];return(t||[]).forEach(t=>{n.push(t),t&&"object"==typeof t&&e in t&&(n=[].concat((0,es.Z)(n),(0,es.Z)(tk(e,t[e]))))}),n};var tS=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:o,getCheckboxProps:a,onChange:l,onSelect:s,onSelectAll:c,onSelectInvert:u,onSelectNone:d,onSelectMultiple:f,columnWidth:p,type:h,selections:m,fixed:g,renderCell:v,hideSelectAll:y,checkStrictly:b=!0}=t||{},{prefixCls:x,data:w,pageData:k,getRecordByKey:S,getRowKey:E,expandType:O,childrenColumnName:C,locale:j,getPopupContainer:P}=e,T=(0,tp.ln)("Table"),[M,N]=function(e){let[t,n]=(0,i.useState)(null);return[(0,i.useCallback)((r,o,i)=>{let a=null!=t?t:r,l=Math.max(a||0,r),s=o.slice(Math.min(a||0,r),l+1).map(t=>e(t)),c=s.some(e=>!i.has(e)),u=[];return s.forEach(e=>{c?(i.has(e)||u.push(e),i.add(e)):(i.delete(e),u.push(e))}),n(c?l:null),u},[t]),e=>{n(e)}]}(e=>e),[A,I]=(0,tf.Z)(r||o||tw,{value:r}),R=i.useRef(new Map),D=(0,i.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=S(e);!n&&R.current.has(e)&&(n=R.current.get(e)),t.set(e,n)}),R.current=t}},[S,n]);i.useEffect(()=>{D(A)},[A]);let{keyEntities:L}=(0,i.useMemo)(()=>{if(b)return{keyEntities:null};let e=w;if(n){let t=new Set(w.map((e,t)=>E(e,t))),n=Array.from(R.current).reduce((e,n)=>{let[r,o]=n;return t.has(r)?e:e.concat(o)},[]);e=[].concat((0,es.Z)(e),(0,es.Z)(n))}return e3(e,{externalGetKey:E,childrenPropName:C})},[w,E,b,C,n]),z=(0,i.useMemo)(()=>tk(C,k),[C,k]),Z=(0,i.useMemo)(()=>{let e=new Map;return z.forEach((t,n)=>{let r=E(t,n),o=(a?a(t):null)||{};e.set(r,o)}),e},[z,E,a]),B=(0,i.useCallback)(e=>{var t;return!!(null===(t=Z.get(E(e)))||void 0===t?void 0:t.disabled)},[Z,E]),[F,H]=(0,i.useMemo)(()=>{if(b)return[A||[],[]];let{checkedKeys:e,halfCheckedKeys:t}=td(A,!0,L,B);return[e||[],t]},[A,b,L,B]),q=(0,i.useMemo)(()=>new Set("radio"===h?F.slice(0,1):F),[F,h]),U=(0,i.useMemo)(()=>"radio"===h?new Set:new Set(H),[H,h]);i.useEffect(()=>{t||I(tw)},[!!t]);let W=(0,i.useCallback)((e,t)=>{let r,o;D(e),n?(r=e,o=e.map(e=>R.current.get(e))):(r=[],o=[],e.forEach(e=>{let t=S(e);void 0!==t&&(r.push(e),o.push(t))})),I(r),null==l||l(r,o,{type:t})},[I,S,l,n]),K=(0,i.useCallback)((e,t,n,r)=>{if(s){let o=n.map(e=>S(e));s(S(e),t,o,r)}W(n,"single")},[s,S,W]),V=(0,i.useMemo)(()=>!m||y?null:(!0===m?[ty,tb,tx]:m).map(e=>e===ty?{key:"all",text:j.selectionAll,onSelect(){W(w.map((e,t)=>E(e,t)).filter(e=>{let t=Z.get(e);return!(null==t?void 0:t.disabled)||q.has(e)}),"all")}}:e===tb?{key:"invert",text:j.selectInvert,onSelect(){let e=new Set(q);k.forEach((t,n)=>{let r=E(t,n),o=Z.get(r);(null==o?void 0:o.disabled)||(e.has(r)?e.delete(r):e.add(r))});let t=Array.from(e);u&&(T.deprecated(!1,"onSelectInvert","onChange"),u(t)),W(t,"invert")}}:e===tx?{key:"none",text:j.selectNone,onSelect(){null==d||d(),W(Array.from(q).filter(e=>{let t=Z.get(e);return null==t?void 0:t.disabled}),"none")}}:e).map(e=>Object.assign(Object.assign({},e),{onSelect:function(){for(var t,n=arguments.length,r=Array(n),o=0;o{var n;let r,o,a;if(!t)return e.filter(e=>e!==tv);let l=(0,es.Z)(e),s=new Set(q),u=z.map(E).filter(e=>!Z.get(e).disabled),d=u.every(e=>s.has(e)),w=u.some(e=>s.has(e));if("radio"!==h){let e;if(V){let t={getPopupContainer:P,items:V.map((e,t)=>{let{key:n,text:r,onSelect:o}=e;return{key:null!=n?n:t,onClick:()=>{null==o||o(u)},label:r}})};e=i.createElement("div",{className:"".concat(x,"-selection-extra")},i.createElement(tm.Z,{menu:t,getPopupContainer:P},i.createElement("span",null,i.createElement(eq.Z,null))))}let t=z.map((e,t)=>{let n=E(e,t),r=Z.get(n)||{};return Object.assign({checked:s.has(n)},r)}).filter(e=>{let{disabled:t}=e;return t}),n=!!t.length&&t.length===z.length,a=n&&t.every(e=>{let{checked:t}=e;return t}),l=n&&t.some(e=>{let{checked:t}=e;return t});o=i.createElement(th.Z,{checked:n?a:!!z.length&&d,indeterminate:n?!a&&l:!d&&w,onChange:()=>{let e=[];d?u.forEach(t=>{s.delete(t),e.push(t)}):u.forEach(t=>{s.has(t)||(s.add(t),e.push(t))});let t=Array.from(s);null==c||c(!d,t.map(e=>S(e)),e.map(e=>S(e))),W(t,"all"),N(null)},disabled:0===z.length||n,"aria-label":e?"Custom selection":"Select all",skipGroup:!0}),r=!y&&i.createElement("div",{className:"".concat(x,"-selection")},o,e)}if(a="radio"===h?(e,t,n)=>{let r=E(t,n),o=s.has(r);return{node:i.createElement(tg.ZP,Object.assign({},Z.get(r),{checked:o,onClick:e=>e.stopPropagation(),onChange:e=>{s.has(r)||K(r,!0,[r],e.nativeEvent)}})),checked:o}}:(e,t,n)=>{var r;let o;let a=E(t,n),l=s.has(a),c=U.has(a),d=Z.get(a);return o="nest"===O?c:null!==(r=null==d?void 0:d.indeterminate)&&void 0!==r?r:c,{node:i.createElement(th.Z,Object.assign({},d,{indeterminate:o,checked:l,skipGroup:!0,onClick:e=>e.stopPropagation(),onChange:e=>{let{nativeEvent:t}=e,{shiftKey:n}=t,r=u.findIndex(e=>e===a),o=F.some(e=>u.includes(e));if(n&&b&&o){let e=M(r,u,s),t=Array.from(s);null==f||f(!l,t.map(e=>S(e)),e.map(e=>S(e))),W(t,"multiple")}else if(b){let e=l?tn(F,a):tr(F,a);K(a,!l,e,t)}else{let{checkedKeys:e,halfCheckedKeys:n}=td([].concat((0,es.Z)(F),[a]),!0,L,B),r=e;if(l){let t=new Set(e);t.delete(a),r=td(Array.from(t),{checked:!1,halfCheckedKeys:n},L,B).checkedKeys}K(a,!l,r,t)}l?N(null):N(r)}})),checked:l}},!l.includes(tv)){if(0===l.findIndex(e=>{var t;return(null===(t=e[ei])||void 0===t?void 0:t.columnType)==="EXPAND_COLUMN"})){let[e,...t]=l;l=[e,tv].concat((0,es.Z)(t))}else l=[tv].concat((0,es.Z)(l))}let k=l.indexOf(tv),C=(l=l.filter((e,t)=>e!==tv||t===k))[k-1],j=l[k+1],T=g;void 0===T&&((null==j?void 0:j.fixed)!==void 0?T=j.fixed:(null==C?void 0:C.fixed)!==void 0&&(T=C.fixed)),T&&C&&(null===(n=C[ei])||void 0===n?void 0:n.columnType)==="EXPAND_COLUMN"&&void 0===C.fixed&&(C.fixed=T);let A=_()("".concat(x,"-selection-col"),{["".concat(x,"-selection-col-with-dropdown")]:m&&"checkbox"===h}),I={fixed:T,width:p,className:"".concat(x,"-selection-column"),title:(null==t?void 0:t.columnTitle)?"function"==typeof t.columnTitle?t.columnTitle(o):t.columnTitle:r,render:(e,t,n)=>{let{node:r,checked:o}=a(e,t,n);return v?v(o,t,n,r):r},onCell:t.onCell,[ei]:{className:A}};return l.map(e=>e===tv?I:e)},[E,z,t,F,q,U,p,V,O,Z,f,K,B]),q]},tE=n(53346);function tO(e){return null!=e&&e===e.window}var tC=n(71744),tj=n(91086),t_=n(64024),tP=n(33759),tT=n(28617),tM=n(13823),tN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},tA=n(55015),tI=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:tN}))}),tR={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},tD=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:tR}))}),tL=n(15327),tz=n(77565),tZ=n(95814),tB={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},tF=["10","20","50","100"],tH=function(e){var t=e.pageSizeOptions,n=void 0===t?tF:t,r=e.locale,o=e.changeSize,a=e.pageSize,l=e.goButton,c=e.quickGo,u=e.rootPrefixCls,d=e.selectComponentClass,f=e.selectPrefixCls,p=e.disabled,h=e.buildOptionText,m=i.useState(""),g=(0,s.Z)(m,2),v=g[0],y=g[1],b=function(){return!v||Number.isNaN(v)?void 0:Number(v)},x="function"==typeof h?h:function(e){return"".concat(e," ").concat(r.items_per_page)},w=function(e){""!==v&&(e.keyCode===tZ.Z.ENTER||"click"===e.type)&&(y(""),null==c||c(b()))},k="".concat(u,"-options");if(!o&&!c)return null;var S=null,E=null,O=null;if(o&&d){var C=(n.some(function(e){return e.toString()===a.toString()})?n:n.concat([a.toString()]).sort(function(e,t){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))})).map(function(e,t){return i.createElement(d.Option,{key:t,value:e.toString()},x(e))});S=i.createElement(d,{disabled:p,prefixCls:f,showSearch:!1,className:"".concat(k,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(a||n[0]).toString(),onChange:function(e){null==o||o(Number(e))},getPopupContainer:function(e){return e.parentNode},"aria-label":r.page_size,defaultOpen:!1},C)}return c&&(l&&(O="boolean"==typeof l?i.createElement("button",{type:"button",onClick:w,onKeyUp:w,disabled:p,className:"".concat(k,"-quick-jumper-button")},r.jump_to_confirm):i.createElement("span",{onClick:w,onKeyUp:w},l)),E=i.createElement("div",{className:"".concat(k,"-quick-jumper")},r.jump_to,i.createElement("input",{disabled:p,type:"text",value:v,onChange:function(e){y(e.target.value)},onKeyUp:w,onBlur:function(e){!l&&""!==v&&(y(""),e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(u,"-item-link"))>=0||e.relatedTarget.className.indexOf("".concat(u,"-item"))>=0)||null==c||c(b()))},"aria-label":r.page}),r.page,O)),i.createElement("li",{className:k},S,E)},tq=function(e){var t,n=e.rootPrefixCls,r=e.page,o=e.active,a=e.className,l=e.showTitle,s=e.onClick,c=e.onKeyPress,u=e.itemRender,d="".concat(n,"-item"),f=_()(d,"".concat(d,"-").concat(r),(t={},(0,C.Z)(t,"".concat(d,"-active"),o),(0,C.Z)(t,"".concat(d,"-disabled"),!r),t),a),p=u(r,"page",i.createElement("a",{rel:"nofollow"},r));return p?i.createElement("li",{title:l?String(r):null,className:f,onClick:function(){s(r)},onKeyDown:function(e){c(e,s,r)},tabIndex:0},p):null},tU=function(e,t,n){return n};function tW(){}function tK(e){var t=Number(e);return"number"==typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function tV(e,t,n){return Math.floor((n-1)/(void 0===e?t:e))+1}var t$=function(e){var t,n,r,o,a,l=e.prefixCls,c=void 0===l?"rc-pagination":l,u=e.selectPrefixCls,d=e.className,f=e.selectComponentClass,p=e.current,h=e.defaultCurrent,g=e.total,v=void 0===g?0:g,y=e.pageSize,b=e.defaultPageSize,x=e.onChange,w=void 0===x?tW:x,k=e.hideOnSinglePage,S=e.showPrevNextJumpers,E=e.showQuickJumper,j=e.showLessItems,P=e.showTitle,T=void 0===P||P,M=e.onShowSizeChange,N=void 0===M?tW:M,A=e.locale,I=void 0===A?tB:A,R=e.style,D=e.totalBoundaryShowSizeChanger,L=e.disabled,z=e.simple,Z=e.showTotal,B=e.showSizeChanger,F=e.pageSizeOptions,H=e.itemRender,q=void 0===H?tU:H,U=e.jumpPrevIcon,W=e.jumpNextIcon,K=e.prevIcon,$=e.nextIcon,X=i.useRef(null),G=(0,tf.Z)(10,{value:y,defaultValue:void 0===b?10:b}),Y=(0,s.Z)(G,2),Q=Y[0],J=Y[1],ee=(0,tf.Z)(1,{value:p,defaultValue:void 0===h?1:h,postState:function(e){return Math.max(1,Math.min(e,tV(void 0,Q,v)))}}),et=(0,s.Z)(ee,2),en=et[0],er=et[1],eo=i.useState(en),ei=(0,s.Z)(eo,2),ea=ei[0],el=ei[1];(0,i.useEffect)(function(){el(en)},[en]);var es=Math.max(1,en-(j?3:5)),ec=Math.min(tV(void 0,Q,v),en+(j?3:5));function eu(t,n){var r=t||i.createElement("button",{type:"button","aria-label":n,className:"".concat(c,"-item-link")});return"function"==typeof t&&(r=i.createElement(t,(0,O.Z)({},e))),r}function ed(e){var t=e.target.value,n=tV(void 0,Q,v);return""===t?t:Number.isNaN(Number(t))?ea:t>=n?n:Number(t)}var ef=v>Q&&E;function ep(e){var t=ed(e);switch(t!==ea&&el(t),e.keyCode){case tZ.Z.ENTER:eh(t);break;case tZ.Z.UP:eh(t-1);break;case tZ.Z.DOWN:eh(t+1)}}function eh(e){if(tK(e)&&e!==en&&tK(v)&&v>0&&!L){var t=tV(void 0,Q,v),n=e;return e>t?n=t:e<1&&(n=1),n!==ea&&el(n),er(n),null==w||w(n,Q),n}return en}var em=en>1,eg=en(void 0===D?50:D);function ey(){em&&eh(en-1)}function eb(){eg&&eh(en+1)}function ex(){eh(es)}function ew(){eh(ec)}function ek(e,t){if("Enter"===e.key||e.charCode===tZ.Z.ENTER||e.keyCode===tZ.Z.ENTER){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;ov?v:en*Q])),ej=null,e_=tV(void 0,Q,v);if(k&&v<=Q)return null;var eP=[],eT={rootPrefixCls:c,onClick:eh,onKeyPress:ek,showTitle:T,itemRender:q,page:-1},eM=en-1>0?en-1:0,eN=en+1=2*eD&&3!==en&&(eP[0]=i.cloneElement(eP[0],{className:_()("".concat(c,"-item-after-jump-prev"),eP[0].props.className)}),eP.unshift(eE)),e_-en>=2*eD&&en!==e_-2){var eW=eP[eP.length-1];eP[eP.length-1]=i.cloneElement(eW,{className:_()("".concat(c,"-item-before-jump-next"),eW.props.className)}),eP.push(ej)}1!==eH&&eP.unshift(i.createElement(tq,(0,m.Z)({},eT,{key:1,page:1}))),eq!==e_&&eP.push(i.createElement(tq,(0,m.Z)({},eT,{key:e_,page:e_})))}var eK=(t=q(eM,"prev",eu(K,"prev page")),i.isValidElement(t)?i.cloneElement(t,{disabled:!em}):t);if(eK){var eV=!em||!e_;eK=i.createElement("li",{title:T?I.prev_page:null,onClick:ey,tabIndex:eV?null:0,onKeyDown:function(e){ek(e,ey)},className:_()("".concat(c,"-prev"),(0,C.Z)({},"".concat(c,"-disabled"),eV)),"aria-disabled":eV},eK)}var e$=(n=q(eN,"next",eu($,"next page")),i.isValidElement(n)?i.cloneElement(n,{disabled:!eg}):n);e$&&(z?(o=!eg,a=em?0:null):a=(o=!eg||!e_)?null:0,e$=i.createElement("li",{title:T?I.next_page:null,onClick:eb,tabIndex:a,onKeyDown:function(e){ek(e,eb)},className:_()("".concat(c,"-next"),(0,C.Z)({},"".concat(c,"-disabled"),o)),"aria-disabled":o},e$));var eX=_()(c,d,(r={},(0,C.Z)(r,"".concat(c,"-simple"),z),(0,C.Z)(r,"".concat(c,"-disabled"),L),r));return i.createElement("ul",(0,m.Z)({className:eX,style:R,ref:X},eO),eC,eK,z?eR:eP,e$,i.createElement(tH,{locale:I,rootPrefixCls:c,disabled:L,selectComponentClass:f,selectPrefixCls:void 0===u?"rc-select":u,changeSize:ev?function(e){var t=tV(e,Q,v),n=en>t&&0!==t?t:en;J(e),el(n),null==N||N(en,e),er(n),null==w||w(n,e)}:null,pageSize:Q,pageSizeOptions:F,quickGo:ef?eh:null,goButton:eI}))},tX=n(96257),tG=n(55274),tY=n(52787);let tQ=e=>i.createElement(tY.default,Object.assign({},e,{showSearch:!0,size:"small"})),tJ=e=>i.createElement(tY.default,Object.assign({},e,{showSearch:!0,size:"middle"}));tQ.Option=tY.default.Option,tJ.Option=tY.default.Option;var t0=n(352),t1=n(31282),t2=n(37433),t4=n(12918),t3=n(3104),t6=n(80669),t8=n(65265);let t5=e=>{let{componentCls:t}=e;return{["".concat(t,"-disabled")]:{"&, &:hover":{cursor:"not-allowed",["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},["&".concat(t,"-disabled")]:{cursor:"not-allowed",["".concat(t,"-item")]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},["".concat(t,"-simple&")]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},["".concat(t,"-simple-pager")]:{color:e.colorTextDisabled},["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{["".concat(t,"-item-link-icon")]:{opacity:0},["".concat(t,"-item-ellipsis")]:{opacity:1}}},["&".concat(t,"-simple")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{["&".concat(t,"-disabled ").concat(t,"-item-link")]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},t7=e=>{let{componentCls:t}=e;return{["&".concat(t,"-mini ").concat(t,"-total-text, &").concat(t,"-mini ").concat(t,"-simple-pager")]:{height:e.itemSizeSM,lineHeight:(0,t0.bf)(e.itemSizeSM)},["&".concat(t,"-mini ").concat(t,"-item")]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,t0.bf)(e.calc(e.itemSizeSM).sub(2).equal())},["&".concat(t,"-mini:not(").concat(t,"-disabled) ").concat(t,"-item:not(").concat(t,"-item-active)")]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},["&".concat(t,"-mini ").concat(t,"-prev, &").concat(t,"-mini ").concat(t,"-next")]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,t0.bf)(e.itemSizeSM)},["&".concat(t,"-mini:not(").concat(t,"-disabled)")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{["&:hover ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextHover},["&:active ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextActive},["&".concat(t,"-disabled:hover ").concat(t,"-item-link")]:{backgroundColor:"transparent"}}},["\n &".concat(t,"-mini ").concat(t,"-prev ").concat(t,"-item-link,\n &").concat(t,"-mini ").concat(t,"-next ").concat(t,"-item-link\n ")]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:(0,t0.bf)(e.itemSizeSM)}},["&".concat(t,"-mini ").concat(t,"-jump-prev, &").concat(t,"-mini ").concat(t,"-jump-next")]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:(0,t0.bf)(e.itemSizeSM)},["&".concat(t,"-mini ").concat(t,"-options")]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:(0,t0.bf)(e.itemSizeSM),input:Object.assign(Object.assign({},(0,t1.x0)(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},t9=e=>{let{componentCls:t}=e;return{["\n &".concat(t,"-simple ").concat(t,"-prev,\n &").concat(t,"-simple ").concat(t,"-next\n ")]:{height:e.itemSizeSM,lineHeight:(0,t0.bf)(e.itemSizeSM),verticalAlign:"top",["".concat(t,"-item-link")]:{height:e.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSizeSM,lineHeight:(0,t0.bf)(e.itemSizeSM)}}},["&".concat(t,"-simple ").concat(t,"-simple-pager")]:{display:"inline-block",height:e.itemSizeSM,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:e.marginXS,padding:"0 ".concat((0,t0.bf)(e.paginationItemPaddingInline)),textAlign:"center",backgroundColor:e.itemInputBg,border:"".concat((0,t0.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadius,outline:"none",transition:"border-color ".concat(e.motionDurationMid),color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:"".concat((0,t0.bf)(e.inputOutlineOffset)," 0 ").concat((0,t0.bf)(e.controlOutlineWidth)," ").concat(e.controlOutline)},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}}}},ne=e=>{let{componentCls:t}=e;return{["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{outline:0,["".concat(t,"-item-container")]:{position:"relative",["".concat(t,"-item-link-icon")]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:"all ".concat(e.motionDurationMid),"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},["".concat(t,"-item-ellipsis")]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:"all ".concat(e.motionDurationMid)}},"&:hover":{["".concat(t,"-item-link-icon")]:{opacity:1},["".concat(t,"-item-ellipsis")]:{opacity:0}}},["\n ".concat(t,"-prev,\n ").concat(t,"-jump-prev,\n ").concat(t,"-jump-next\n ")]:{marginInlineEnd:e.marginXS},["\n ".concat(t,"-prev,\n ").concat(t,"-next,\n ").concat(t,"-jump-prev,\n ").concat(t,"-jump-next\n ")]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:"".concat((0,t0.bf)(e.itemSize)),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:"all ".concat(e.motionDurationMid)},["".concat(t,"-prev, ").concat(t,"-next")]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},["".concat(t,"-item-link")]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:"".concat((0,t0.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),borderRadius:e.borderRadius,outline:"none",transition:"all ".concat(e.motionDurationMid)},["&:hover ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextHover},["&:active ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextActive},["&".concat(t,"-disabled:hover")]:{["".concat(t,"-item-link")]:{backgroundColor:"transparent"}}},["".concat(t,"-slash")]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},["".concat(t,"-options")]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:(0,t0.bf)(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},(0,t1.ik)(e)),(0,t8.$U)(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},(0,t8.Xy)(e)),width:e.calc(e.controlHeightLG).mul(1.25).equal(),height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},nt=e=>{let{componentCls:t}=e;return{["".concat(t,"-item")]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:(0,t0.bf)(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:"".concat((0,t0.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:"0 ".concat((0,t0.bf)(e.paginationItemPaddingInline)),color:e.colorText,"&:hover":{textDecoration:"none"}},["&:not(".concat(t,"-item-active)")]:{"&:hover":{transition:"all ".concat(e.motionDurationMid),backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}}}},nn=e=>{let{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,t4.Wf)(e)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},["".concat(t,"-total-text")]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:(0,t0.bf)(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),nt(e)),ne(e)),t9(e)),t7(e)),t5(e)),{["@media only screen and (max-width: ".concat(e.screenLG,"px)")]:{["".concat(t,"-item")]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},["@media only screen and (max-width: ".concat(e.screenSM,"px)")]:{["".concat(t,"-options")]:{display:"none"}}}),["&".concat(e.componentCls,"-rtl")]:{direction:"rtl"}}},nr=e=>{let{componentCls:t}=e;return{["".concat(t,":not(").concat(t,"-disabled)")]:{["".concat(t,"-item")]:Object.assign({},(0,t4.Qy)(e)),["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{"&:focus-visible":Object.assign({["".concat(t,"-item-link-icon")]:{opacity:1},["".concat(t,"-item-ellipsis")]:{opacity:0}},(0,t4.oN)(e))},["".concat(t,"-prev, ").concat(t,"-next")]:{["&:focus-visible ".concat(t,"-item-link")]:Object.assign({},(0,t4.oN)(e))}}}},no=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},(0,t2.T)(e)),ni=e=>(0,t3.TS)(e,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginXXS,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,t2.e)(e));var na=(0,t6.I$)("Pagination",e=>{let t=ni(e);return[nn(t),nr(t)]},no),nl=n(29961);let ns=e=>{let{componentCls:t}=e;return{["".concat(t).concat(t,"-bordered").concat(t,"-disabled:not(").concat(t,"-mini)")]:{"&, &:hover":{["".concat(t,"-item-link")]:{borderColor:e.colorBorder}},"&:focus-visible":{["".concat(t,"-item-link")]:{borderColor:e.colorBorder}},["".concat(t,"-item, ").concat(t,"-item-link")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,["&:hover:not(".concat(t,"-item-active)")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},["&".concat(t,"-item-active")]:{backgroundColor:e.itemActiveBgDisabled}},["".concat(t,"-prev, ").concat(t,"-next")]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},["".concat(t,"-item-link")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},["".concat(t).concat(t,"-bordered:not(").concat(t,"-mini)")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},["".concat(t,"-item-link")]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},["&:hover ".concat(t,"-item-link")]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},["&".concat(t,"-disabled")]:{["".concat(t,"-item-link")]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},["".concat(t,"-item")]:{backgroundColor:e.itemBg,border:"".concat((0,t0.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),["&:hover:not(".concat(t,"-item-active)")]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}};var nc=(0,t6.bk)(["Pagination","bordered"],e=>[ns(ni(e))],no),nu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},nd=e=>{let{prefixCls:t,selectPrefixCls:n,className:r,rootClassName:o,style:a,size:l,locale:s,selectComponentClass:c,responsive:u,showSizeChanger:d}=e,f=nu(e,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:p}=(0,tT.Z)(u),[,h]=(0,nl.ZP)(),{getPrefixCls:m,direction:g,pagination:v={}}=i.useContext(tC.E_),y=m("pagination",t),[b,x,w]=na(y),k=null!=d?d:v.showSizeChanger,S=i.useMemo(()=>{let e=i.createElement("span",{className:"".concat(y,"-item-ellipsis")},"•••"),t=i.createElement("button",{className:"".concat(y,"-item-link"),type:"button",tabIndex:-1},"rtl"===g?i.createElement(tz.Z,null):i.createElement(tL.Z,null));return{prevIcon:t,nextIcon:i.createElement("button",{className:"".concat(y,"-item-link"),type:"button",tabIndex:-1},"rtl"===g?i.createElement(tL.Z,null):i.createElement(tz.Z,null)),jumpPrevIcon:i.createElement("a",{className:"".concat(y,"-item-link")},i.createElement("div",{className:"".concat(y,"-item-container")},"rtl"===g?i.createElement(tD,{className:"".concat(y,"-item-link-icon")}):i.createElement(tI,{className:"".concat(y,"-item-link-icon")}),e)),jumpNextIcon:i.createElement("a",{className:"".concat(y,"-item-link")},i.createElement("div",{className:"".concat(y,"-item-container")},"rtl"===g?i.createElement(tI,{className:"".concat(y,"-item-link-icon")}):i.createElement(tD,{className:"".concat(y,"-item-link-icon")}),e))}},[g,y]),[E]=(0,tG.Z)("Pagination",tX.Z),O=Object.assign(Object.assign({},E),s),C=(0,tP.Z)(l),j="small"===C||!!(p&&!C&&u),P=m("select",n),T=_()({["".concat(y,"-mini")]:j,["".concat(y,"-rtl")]:"rtl"===g,["".concat(y,"-bordered")]:h.wireframe},null==v?void 0:v.className,r,o,x,w),M=Object.assign(Object.assign({},null==v?void 0:v.style),a);return b(i.createElement(i.Fragment,null,h.wireframe&&i.createElement(nc,{prefixCls:y}),i.createElement(t$,Object.assign({},S,f,{style:M,prefixCls:y,selectPrefixCls:P,className:T,selectComponentClass:c||(j?tQ:tJ),locale:O,showSizeChanger:k}))))},nf=n(87908);function np(e,t){return"key"in e&&void 0!==e.key&&null!==e.key?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t}function nh(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}function nm(e,t){return"function"==typeof e?e(t):e}var ng={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},nv=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:ng}))}),ny=n(51646),nb=n(73002),nx=n(85180),nw=n(45937),nk=n(88208);function nS(e){if(null==e)throw TypeError("Cannot destructure "+e)}var nE=n(47970),nO=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],nC=function(e,t){var n,r,o,a,l,c=e.className,d=e.style,f=e.motion,p=e.motionNodes,h=e.motionType,g=e.onMotionStart,v=e.onMotionEnd,y=e.active,b=e.treeNodeRequiredProps,x=(0,Z.Z)(e,nO),w=i.useState(!0),k=(0,s.Z)(w,2),S=k[0],E=k[1],O=i.useContext(eX).prefixCls,C=p&&"hide"!==h;(0,u.Z)(function(){p&&C!==S&&E(C)},[p]);var j=i.useRef(!1),P=function(){p&&!j.current&&(j.current=!0,v())};return(n=function(){p&&g()},r=i.useState(!1),a=(o=(0,s.Z)(r,2))[0],l=o[1],(0,u.Z)(function(){if(a)return n(),function(){P()}},[a]),(0,u.Z)(function(){return l(!0),function(){l(!1)}},[]),p)?i.createElement(nE.ZP,(0,m.Z)({ref:t,visible:S},f,{motionAppear:"show"===h,onVisibleChanged:function(e){C===e&&P()}}),function(e,t){var n=e.className,r=e.style;return i.createElement("div",{ref:t,className:_()("".concat(O,"-treenode-motion"),n),style:r},p.map(function(e){var t=(0,m.Z)({},(nS(e.data),e.data)),n=e.title,r=e.key,o=e.isStart,a=e.isEnd;delete t.children;var l=e6(r,b);return i.createElement(tt,(0,m.Z)({},t,l,{title:n,active:y,data:e.data,key:r,isStart:o,isEnd:a}))}))}):i.createElement(tt,(0,m.Z)({domRef:t,className:c,style:d},x,{active:y}))};nC.displayName="MotionTreeNode";var nj=i.forwardRef(nC);function n_(e,t,n){var r=e.findIndex(function(e){return e.key===n}),o=e[r+1],i=t.findIndex(function(e){return e.key===n});if(o){var a=t.findIndex(function(e){return e.key===o.key});return t.slice(i+1,a)}return t.slice(i+1)}var nP=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],nT={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},nM=function(){},nN="RC_TREE_MOTION_".concat(Math.random()),nA={key:nN},nI={key:nN,level:0,index:0,pos:"0",node:nA,nodes:[nA]},nR={parent:null,children:[],pos:nI.pos,data:nA,title:null,key:nN,isStart:[],isEnd:[]};function nD(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function nL(e){return e0(e.key,e.pos)}var nz=i.forwardRef(function(e,t){var n=e.prefixCls,r=e.data,o=(e.selectable,e.checkable,e.expandedKeys),a=e.selectedKeys,l=e.checkedKeys,c=e.loadedKeys,d=e.loadingKeys,f=e.halfCheckedKeys,p=e.keyEntities,h=e.disabled,g=e.dragging,v=e.dragOverNodeKey,y=e.dropPosition,b=e.motion,x=e.height,w=e.itemHeight,k=e.virtual,S=e.focusable,E=e.activeItem,O=e.focused,C=e.tabIndex,j=e.onKeyDown,_=e.onFocus,P=e.onBlur,T=e.onActiveChange,M=e.onListChangeStart,N=e.onListChangeEnd,A=(0,Z.Z)(e,nP),I=i.useRef(null),R=i.useRef(null);i.useImperativeHandle(t,function(){return{scrollTo:function(e){I.current.scrollTo(e)},getIndentWidth:function(){return R.current.offsetWidth}}});var D=i.useState(o),L=(0,s.Z)(D,2),z=L[0],B=L[1],F=i.useState(r),H=(0,s.Z)(F,2),q=H[0],U=H[1],W=i.useState(r),K=(0,s.Z)(W,2),V=K[0],$=K[1],X=i.useState([]),G=(0,s.Z)(X,2),Y=G[0],Q=G[1],J=i.useState(null),ee=(0,s.Z)(J,2),et=ee[0],en=ee[1],er=i.useRef(r);function eo(){var e=er.current;U(e),$(e),Q([]),en(null),N()}er.current=r,(0,u.Z)(function(){B(o);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function o(e,t){var n=new Map;e.forEach(function(e){n.set(e,!0)});var r=t.filter(function(e){return!n.has(e)});return 1===r.length?r[0]:null}return n ").concat(t);return t}(E)),i.createElement("div",null,i.createElement("input",{style:nT,disabled:!1===S||h,tabIndex:!1!==S?C:null,onKeyDown:j,onFocus:_,onBlur:P,value:"",onChange:nM,"aria-label":"for screen reader"})),i.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},i.createElement("div",{className:"".concat(n,"-indent")},i.createElement("div",{ref:R,className:"".concat(n,"-indent-unit")}))),i.createElement(eI.Z,(0,m.Z)({},A,{data:ei,itemKey:nL,height:x,fullHeight:!1,virtual:k,itemHeight:w,prefixCls:"".concat(n,"-list"),ref:I,onVisibleChange:function(e,t){var n=new Set(e);t.filter(function(e){return!n.has(e)}).some(function(e){return nL(e)===nN})&&eo()}}),function(e){var t=e.pos,n=(0,m.Z)({},(nS(e.data),e.data)),r=e.title,o=e.key,a=e.isStart,l=e.isEnd,s=e0(o,t);delete n.key,delete n.children;var c=e6(s,ea);return i.createElement(nj,(0,m.Z)({},n,c,{title:r,active:!!E&&o===E.key,pos:t,data:e.data,isStart:a,isEnd:l,motion:b,motionNodes:o===nN?Y:null,motionType:et,onMotionStart:M,onMotionEnd:eo,treeNodeRequiredProps:ea,onMouseMove:function(){T(null)}}))}))});nz.displayName="NodeList";var nZ=function(e){(0,eV.Z)(n,e);var t=(0,e$.Z)(n);function n(){var e;(0,eU.Z)(this,n);for(var r=arguments.length,o=Array(r),a=0;a0&&void 0!==arguments[0]?arguments[0]:[];t.forEach(function(t){var n=t.key,o=t.children;r.push(n),e(o)})}(a[s].children),r),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(c),window.addEventListener("dragend",e.onWindowDragEnd),null==l||l({event:t,node:e8(n.props)})},e.onNodeDragEnter=function(t,n){var r=e.state,o=r.expandedKeys,i=r.keyEntities,a=r.dragChildrenKeys,l=r.flattenNodes,s=r.indent,c=e.props,u=c.onDragEnter,d=c.onExpand,f=c.allowDrop,p=c.direction,h=n.props,m=h.pos,g=h.eventKey,v=(0,eK.Z)(e).dragNode;if(e.currentMouseOverDroppableNodeKey!==g&&(e.currentMouseOverDroppableNodeKey=g),!v){e.resetDragState();return}var y=ti(t,v,n,s,e.dragStartMousePosition,f,l,i,o,p),b=y.dropPosition,x=y.dropLevelOffset,w=y.dropTargetKey,k=y.dropContainerKey,S=y.dropTargetPos,E=y.dropAllowed,O=y.dragOverNodeKey;if(-1!==a.indexOf(w)||!E||(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach(function(t){clearTimeout(e.delayedDragEnterLogic[t])}),v.props.eventKey!==n.props.eventKey&&(t.persist(),e.delayedDragEnterLogic[m]=window.setTimeout(function(){if(null!==e.state.draggingNodeKey){var r=(0,es.Z)(o),a=i[n.props.eventKey];a&&(a.children||[]).length&&(r=tr(o,n.props.eventKey)),"expandedKeys"in e.props||e.setExpandedKeys(r),null==d||d(r,{node:e8(n.props),expanded:!0,nativeEvent:t.nativeEvent})}},800)),v.props.eventKey===w&&0===x)){e.resetDragState();return}e.setState({dragOverNodeKey:O,dropPosition:b,dropLevelOffset:x,dropTargetKey:w,dropContainerKey:k,dropTargetPos:S,dropAllowed:E}),null==u||u({event:t,node:e8(n.props),expandedKeys:o})},e.onNodeDragOver=function(t,n){var r=e.state,o=r.dragChildrenKeys,i=r.flattenNodes,a=r.keyEntities,l=r.expandedKeys,s=r.indent,c=e.props,u=c.onDragOver,d=c.allowDrop,f=c.direction,p=(0,eK.Z)(e).dragNode;if(p){var h=ti(t,p,n,s,e.dragStartMousePosition,d,i,a,l,f),m=h.dropPosition,g=h.dropLevelOffset,v=h.dropTargetKey,y=h.dropContainerKey,b=h.dropAllowed,x=h.dropTargetPos,w=h.dragOverNodeKey;-1===o.indexOf(v)&&b&&(p.props.eventKey===v&&0===g?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():m===e.state.dropPosition&&g===e.state.dropLevelOffset&&v===e.state.dropTargetKey&&y===e.state.dropContainerKey&&x===e.state.dropTargetPos&&b===e.state.dropAllowed&&w===e.state.dragOverNodeKey||e.setState({dropPosition:m,dropLevelOffset:g,dropTargetKey:v,dropContainerKey:y,dropTargetPos:x,dropAllowed:b,dragOverNodeKey:w}),null==u||u({event:t,node:e8(n.props)}))}},e.onNodeDragLeave=function(t,n){e.currentMouseOverDroppableNodeKey!==n.props.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var r=e.props.onDragLeave;null==r||r({event:t,node:e8(n.props)})},e.onWindowDragEnd=function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)},e.onNodeDragEnd=function(t,n){var r=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==r||r({event:t,node:e8(n.props)}),e.dragNode=null,window.removeEventListener("dragend",e.onWindowDragEnd)},e.onNodeDrop=function(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.state,a=i.dragChildrenKeys,l=i.dropPosition,s=i.dropTargetKey,c=i.dropTargetPos;if(i.dropAllowed){var u=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==s){var d=(0,O.Z)((0,O.Z)({},e6(s,e.getTreeNodeRequiredProps())),{},{active:(null===(r=e.getActiveItem())||void 0===r?void 0:r.key)===s,data:e.state.keyEntities[s].node}),f=-1!==a.indexOf(s);(0,M.ZP)(!f,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var p=to(c),h={event:t,node:e8(d),dragNode:e.dragNode?e8(e.dragNode.props):null,dragNodesKeys:[e.dragNode.props.eventKey].concat(a),dropToGap:0!==l,dropPosition:l+Number(p[p.length-1])};o||null==u||u(h),e.dragNode=null}}},e.cleanDragState=function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null},e.triggerExpandActionExpand=function(t,n){var r=e.state,o=r.expandedKeys,i=r.flattenNodes,a=n.expanded,l=n.key;if(!n.isLeaf&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey){var s=i.filter(function(e){return e.key===l})[0],c=e8((0,O.Z)((0,O.Z)({},e6(l,e.getTreeNodeRequiredProps())),{},{data:s.data}));e.setExpandedKeys(a?tn(o,l):tr(o,l)),e.onNodeExpand(t,c)}},e.onNodeClick=function(t,n){var r=e.props,o=r.onClick;"click"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==o||o(t,n)},e.onNodeDoubleClick=function(t,n){var r=e.props,o=r.onDoubleClick;"doubleClick"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==o||o(t,n)},e.onNodeSelect=function(t,n){var r=e.state.selectedKeys,o=e.state,i=o.keyEntities,a=o.fieldNames,l=e.props,s=l.onSelect,c=l.multiple,u=n.selected,d=n[a.key],f=!u,p=(r=f?c?tr(r,d):[d]:tn(r,d)).map(function(e){var t=i[e];return t?t.node:null}).filter(function(e){return e});e.setUncontrolledState({selectedKeys:r}),null==s||s(r,{event:"select",selected:f,node:n,selectedNodes:p,nativeEvent:t.nativeEvent})},e.onNodeCheck=function(t,n,r){var o,i=e.state,a=i.keyEntities,l=i.checkedKeys,s=i.halfCheckedKeys,c=e.props,u=c.checkStrictly,d=c.onCheck,f=n.key,p={event:"check",node:n,checked:r,nativeEvent:t.nativeEvent};if(u){var h=r?tr(l,f):tn(l,f);o={checked:h,halfChecked:tn(s,f)},p.checkedNodes=h.map(function(e){return a[e]}).filter(function(e){return e}).map(function(e){return e.node}),e.setUncontrolledState({checkedKeys:h})}else{var m=td([].concat((0,es.Z)(l),[f]),!0,a),g=m.checkedKeys,v=m.halfCheckedKeys;if(!r){var y=new Set(g);y.delete(f);var b=td(Array.from(y),{checked:!1,halfCheckedKeys:v},a);g=b.checkedKeys,v=b.halfCheckedKeys}o=g,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=v,g.forEach(function(e){var t=a[e];if(t){var n=t.node,r=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:r})}}),e.setUncontrolledState({checkedKeys:g},!1,{halfCheckedKeys:v})}null==d||d(o,p)},e.onNodeLoad=function(t){var n=t.key,r=new Promise(function(r,o){e.setState(function(i){var a=i.loadedKeys,l=i.loadingKeys,s=void 0===l?[]:l,c=e.props,u=c.loadData,d=c.onLoad;return u&&-1===(void 0===a?[]:a).indexOf(n)&&-1===s.indexOf(n)?(u(t).then(function(){var o=tr(e.state.loadedKeys,n);null==d||d(o,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:o}),e.setState(function(e){return{loadingKeys:tn(e.loadingKeys,n)}}),r()}).catch(function(t){if(e.setState(function(e){return{loadingKeys:tn(e.loadingKeys,n)}}),e.loadingRetryTimes[n]=(e.loadingRetryTimes[n]||0)+1,e.loadingRetryTimes[n]>=10){var i=e.state.loadedKeys;(0,M.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:tr(i,n)}),r()}o(t)}),{loadingKeys:tr(s,n)}):null})});return r.catch(function(){}),r},e.onNodeMouseEnter=function(t,n){var r=e.props.onMouseEnter;null==r||r({event:t,node:n})},e.onNodeMouseLeave=function(t,n){var r=e.props.onMouseLeave;null==r||r({event:t,node:n})},e.onNodeContextMenu=function(t,n){var r=e.props.onRightClick;r&&(t.preventDefault(),r({event:t,node:n}))},e.onFocus=function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,r=Array(n),o=0;o1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var o=!1,i=!0,a={};Object.keys(t).forEach(function(n){if(n in e.props){i=!1;return}o=!0,a[n]=t[n]}),o&&(!n||i)&&e.setState((0,O.Z)((0,O.Z)({},a),r))}},e.scrollTo=function(t){e.listRef.current.scrollTo(t)},e}return(0,eW.Z)(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:void 0===n?0:n}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,t,n=this.state,r=n.focused,o=n.flattenNodes,a=n.keyEntities,l=n.draggingNodeKey,s=n.activeKey,c=n.dropLevelOffset,u=n.dropContainerKey,d=n.dropTargetKey,f=n.dropPosition,p=n.dragOverNodeKey,h=n.indent,g=this.props,v=g.prefixCls,y=g.className,b=g.style,x=g.showLine,w=g.focusable,k=g.tabIndex,S=g.selectable,O=g.showIcon,j=g.icon,P=g.switcherIcon,T=g.draggable,M=g.checkable,N=g.checkStrictly,A=g.disabled,I=g.motion,R=g.loadData,D=g.filterTreeNode,L=g.height,z=g.itemHeight,Z=g.virtual,B=g.titleRender,F=g.dropIndicatorRender,H=g.onContextMenu,q=g.onScroll,U=g.direction,W=g.rootClassName,K=g.rootStyle,$=(0,V.Z)(this.props,{aria:!0,data:!0});return T&&(t="object"===(0,E.Z)(T)?T:"function"==typeof T?{nodeDraggable:T}:{}),i.createElement(eX.Provider,{value:{prefixCls:v,selectable:S,showIcon:O,icon:j,switcherIcon:P,draggable:t,draggingNodeKey:l,checkable:M,checkStrictly:N,disabled:A,keyEntities:a,dropLevelOffset:c,dropContainerKey:u,dropTargetKey:d,dropPosition:f,dragOverNodeKey:p,indent:h,direction:U,dropIndicatorRender:F,loadData:R,filterTreeNode:D,titleRender:B,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},i.createElement("div",{role:"tree",className:_()(v,y,W,(e={},(0,C.Z)(e,"".concat(v,"-show-line"),x),(0,C.Z)(e,"".concat(v,"-focused"),r),(0,C.Z)(e,"".concat(v,"-active-focused"),null!==s),e)),style:K},i.createElement(nz,(0,m.Z)({ref:this.listRef,prefixCls:v,style:b,data:o,disabled:A,selectable:S,checkable:!!M,motion:I,dragging:null!==l,height:L,itemHeight:z,virtual:Z,focusable:w,focused:r,tabIndex:void 0===k?0:k,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:H,onScroll:q},this.getTreeNodeRequiredProps(),$))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r,o=t.prevProps,i={prevProps:e};function a(t){return!o&&t in e||o&&o[t]!==e[t]}var l=t.fieldNames;if(a("fieldNames")&&(l=e1(e.fieldNames),i.fieldNames=l),a("treeData")?n=e.treeData:a("children")&&((0,M.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=e2(e.children)),n){i.treeData=n;var s=e3(n,{fieldNames:l});i.keyEntities=(0,O.Z)((0,C.Z)({},nN,nI),s.keyEntities)}var c=i.keyEntities||t.keyEntities;if(a("expandedKeys")||o&&a("autoExpandParent"))i.expandedKeys=e.autoExpandParent||!o&&e.defaultExpandParent?ts(e.expandedKeys,c):e.expandedKeys;else if(!o&&e.defaultExpandAll){var u=(0,O.Z)({},c);delete u[nN],i.expandedKeys=Object.keys(u).map(function(e){return u[e].key})}else!o&&e.defaultExpandedKeys&&(i.expandedKeys=e.autoExpandParent||e.defaultExpandParent?ts(e.defaultExpandedKeys,c):e.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,n||i.expandedKeys){var d=e4(n||t.treeData,i.expandedKeys||t.expandedKeys,l);i.flattenNodes=d}if(e.selectable&&(a("selectedKeys")?i.selectedKeys=ta(e.selectedKeys,e):!o&&e.defaultSelectedKeys&&(i.selectedKeys=ta(e.defaultSelectedKeys,e))),e.checkable&&(a("checkedKeys")?r=tl(e.checkedKeys)||{}:!o&&e.defaultCheckedKeys?r=tl(e.defaultCheckedKeys)||{}:n&&(r=tl(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),r)){var f=r,p=f.checkedKeys,h=void 0===p?[]:p,m=f.halfCheckedKeys,g=void 0===m?[]:m;if(!e.checkStrictly){var v=td(h,!0,c);h=v.checkedKeys,g=v.halfCheckedKeys}i.checkedKeys=h,i.halfCheckedKeys=g}return a("loadedKeys")&&(i.loadedKeys=e.loadedKeys),i}}]),n}(i.Component);nZ.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case -1:o.top=0,o.left=-n*r;break;case 1:o.bottom=0,o.left=-n*r;break;case 0:o.bottom=0,o.left=r}return i.createElement("div",{style:o})},allowDrop:function(){return!0},expandAction:!1},nZ.TreeNode=tt;var nB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},nF=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:nB}))}),nH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},nq=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:nH}))}),nU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},nW=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:nU}))}),nK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},nV=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:nK}))}),n$=n(68710),nX=n(23159),nG=n(63074);let nY=new t0.E4("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),nQ=(e,t)=>({[".".concat(e,"-switcher-icon")]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:"transform ".concat(t.motionDurationSlow)}}}),nJ=(e,t)=>({[".".concat(e,"-drop-indicator")]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:"".concat((0,t0.bf)(t.lineWidthBold)," solid ").concat(t.colorPrimary),borderRadius:"50%",content:'""'}}}),n0=(e,t)=>{let{treeCls:n,treeNodeCls:r,treeNodePadding:o,titleHeight:i,nodeSelectedBg:a,nodeHoverBg:l}=t,s=t.paddingXS;return{[n]:Object.assign(Object.assign({},(0,t4.Wf)(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:"background-color ".concat(t.motionDurationSlow),["&".concat(n,"-rtl")]:{["".concat(n,"-switcher")]:{"&_close":{["".concat(n,"-switcher-icon")]:{svg:{transform:"rotate(90deg)"}}}}},["&-focused:not(:hover):not(".concat(n,"-active-focused)")]:Object.assign({},(0,t4.oN)(t)),["".concat(n,"-list-holder-inner")]:{alignItems:"flex-start"},["&".concat(n,"-block-node")]:{["".concat(n,"-list-holder-inner")]:{alignItems:"stretch",["".concat(n,"-node-content-wrapper")]:{flex:"auto"},["".concat(r,".dragging")]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,border:"1px solid ".concat(t.colorPrimary),opacity:0,animationName:nY,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},["".concat(r)]:{display:"flex",alignItems:"flex-start",padding:"0 0 ".concat((0,t0.bf)(o)," 0"),outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{["".concat(n,"-node-content-wrapper")]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},["&-active ".concat(n,"-node-content-wrapper")]:{background:t.controlItemBgHover},["&:not(".concat(r,"-disabled).filter-node ").concat(n,"-title")]:{color:"inherit",fontWeight:500},"&-draggable":{cursor:"grab",["".concat(n,"-draggable-icon")]:{flexShrink:0,width:i,lineHeight:"".concat((0,t0.bf)(i)),textAlign:"center",visibility:"visible",opacity:.2,transition:"opacity ".concat(t.motionDurationSlow),["".concat(r,":hover &")]:{opacity:.45}},["&".concat(r,"-disabled")]:{["".concat(n,"-draggable-icon")]:{visibility:"hidden"}}}},["".concat(n,"-indent")]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},["".concat(n,"-draggable-icon")]:{visibility:"hidden"},["".concat(n,"-switcher")]:Object.assign(Object.assign({},nQ(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,margin:0,lineHeight:"".concat((0,t0.bf)(i)),textAlign:"center",cursor:"pointer",userSelect:"none",transition:"all ".concat(t.motionDurationSlow),borderRadius:t.borderRadius,"&-noop":{cursor:"unset"},["&:not(".concat(n,"-switcher-noop):hover")]:{backgroundColor:t.colorBgTextHover},"&_close":{["".concat(n,"-switcher-icon")]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(i).div(2).equal()).mul(.8).equal(),height:t.calc(i).div(2).equal(),borderBottom:"1px solid ".concat(t.colorBorder),content:'""'}}}),["".concat(n,"-checkbox")]:{top:"initial",marginInlineEnd:s,alignSelf:"flex-start",marginTop:t.marginXXS},["".concat(n,"-node-content-wrapper, ").concat(n,"-checkbox + span")]:{position:"relative",zIndex:"auto",minHeight:i,margin:0,padding:"0 ".concat((0,t0.bf)(t.calc(t.paddingXS).div(2).equal())),color:"inherit",lineHeight:"".concat((0,t0.bf)(i)),background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:"all ".concat(t.motionDurationMid,", border 0s, line-height 0s, box-shadow 0s"),"&:hover":{backgroundColor:l},["&".concat(n,"-node-selected")]:{backgroundColor:a},["".concat(n,"-iconEle")]:{display:"inline-block",width:i,height:i,lineHeight:"".concat((0,t0.bf)(i)),textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},["".concat(n,"-unselectable ").concat(n,"-node-content-wrapper:hover")]:{backgroundColor:"transparent"},["".concat(n,"-node-content-wrapper")]:Object.assign({lineHeight:"".concat((0,t0.bf)(i)),userSelect:"none"},nJ(e,t)),["".concat(r,".drop-container")]:{"> [draggable]":{boxShadow:"0 0 0 2px ".concat(t.colorPrimary)}},"&-show-line":{["".concat(n,"-indent")]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&-end":{"&:before":{display:"none"}}}},["".concat(n,"-switcher")]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},["".concat(r,"-leaf-last")]:{["".concat(n,"-switcher")]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:"".concat((0,t0.bf)(t.calc(i).div(2).equal())," !important")}}}}})}},n1=e=>{let{treeCls:t,treeNodeCls:n,treeNodePadding:r,directoryNodeSelectedBg:o,directoryNodeSelectedColor:i}=e;return{["".concat(t).concat(t,"-directory")]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,transition:"background-color ".concat(e.motionDurationMid),content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:e.controlItemBgHover}},"> *":{zIndex:1},["".concat(t,"-switcher")]:{transition:"color ".concat(e.motionDurationMid)},["".concat(t,"-node-content-wrapper")]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},["&".concat(t,"-node-selected")]:{color:i,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:o},["".concat(t,"-switcher")]:{color:i},["".concat(t,"-node-content-wrapper")]:{color:i,background:"transparent"}}}}}},n2=(e,t)=>{let n=".".concat(e),r=t.calc(t.paddingXS).div(2).equal(),o=(0,t3.TS)(t,{treeCls:n,treeNodeCls:"".concat(n,"-treenode"),treeNodePadding:r});return[n0(e,o),n1(o)]},n4=e=>{let{controlHeightSM:t}=e;return{titleHeight:t,nodeHoverBg:e.controlItemBgHover,nodeSelectedBg:e.controlItemBgActive}};var n3=(0,t6.I$)("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:(0,nX.C2)("".concat(n,"-checkbox"),e)},n2(n,e),(0,nG.Z)(e)]},e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},n4(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})});function n6(e){let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:o,direction:a="ltr"}=e,l="ltr"===a?"left":"right",s={[l]:-n*o+4,["ltr"===a?"right":"left"]:0};switch(t){case -1:s.top=-3;break;case 1:s.bottom=-3;break;default:s.bottom=-3,s[l]=o+4}return i.createElement("div",{style:s,className:"".concat(r,"-drop-indicator")})}var n8={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},n5=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:n8}))}),n7=n(61935),n9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},re=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:n9}))}),rt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},rn=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:rt}))}),rr=n(19722),ro=e=>{let t;let{prefixCls:n,switcherIcon:r,treeNodeProps:o,showLine:a}=e,{isLeaf:l,expanded:s,loading:c}=o;if(c)return i.createElement(n7.Z,{className:"".concat(n,"-switcher-loading-icon")});if(a&&"object"==typeof a&&(t=a.showLeafIcon),l){if(!a)return null;if("boolean"!=typeof t&&t){let e="function"==typeof t?t(o):t;return(0,rr.l$)(e)?(0,rr.Tm)(e,{className:_()(e.props.className||"","".concat(n,"-switcher-line-custom-icon"))}):e}return t?i.createElement(nF,{className:"".concat(n,"-switcher-line-icon")}):i.createElement("span",{className:"".concat(n,"-switcher-leaf-line")})}let u="".concat(n,"-switcher-icon"),d="function"==typeof r?r(o):r;return(0,rr.l$)(d)?(0,rr.Tm)(d,{className:_()(d.props.className||"",u)}):void 0!==d?d:a?s?i.createElement(re,{className:"".concat(n,"-switcher-line-icon")}):i.createElement(rn,{className:"".concat(n,"-switcher-line-icon")}):i.createElement(n5,{className:u})};let ri=i.forwardRef((e,t)=>{var n;let{getPrefixCls:r,direction:o,virtual:a,tree:l}=i.useContext(tC.E_),{prefixCls:s,className:c,showIcon:u=!1,showLine:d,switcherIcon:f,blockNode:p=!1,children:h,checkable:m=!1,selectable:g=!0,draggable:v,motion:y,style:b}=e,x=r("tree",s),w=r(),k=null!=y?y:Object.assign(Object.assign({},(0,n$.Z)(w)),{motionAppear:!1}),S=Object.assign(Object.assign({},e),{checkable:m,selectable:g,showIcon:u,motion:k,blockNode:p,showLine:!!d,dropIndicatorRender:n6}),[E,O,C]=n3(x),[,j]=(0,nl.ZP)(),P=j.paddingXS/2+((null===(n=j.Tree)||void 0===n?void 0:n.titleHeight)||j.controlHeightSM),T=i.useMemo(()=>{if(!v)return!1;let e={};switch(typeof v){case"function":e.nodeDraggable=v;break;case"object":e=Object.assign({},v)}return!1!==e.icon&&(e.icon=e.icon||i.createElement(nV,null)),e},[v]);return E(i.createElement(nZ,Object.assign({itemHeight:P,ref:t,virtual:a},S,{style:Object.assign(Object.assign({},null==l?void 0:l.style),b),prefixCls:x,className:_()({["".concat(x,"-icon-hide")]:!u,["".concat(x,"-block-node")]:p,["".concat(x,"-unselectable")]:!g,["".concat(x,"-rtl")]:"rtl"===o},null==l?void 0:l.className,c,O,C),direction:o,checkable:m?i.createElement("span",{className:"".concat(x,"-checkbox-inner")}):m,selectable:g,switcherIcon:e=>i.createElement(ro,{prefixCls:x,switcherIcon:f,treeNodeProps:e,showLine:d}),draggable:T}),h))});function ra(e,t,n){let{key:r,children:o}=n;e.forEach(function(e){let i=e[r],a=e[o];!1!==t(i,e)&&ra(a||[],t,n)})}(r=o||(o={}))[r.None=0]="None",r[r.Start=1]="Start",r[r.End=2]="End";var rl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function rs(e){let{isLeaf:t,expanded:n}=e;return t?i.createElement(nF,null):n?i.createElement(nq,null):i.createElement(nW,null)}function rc(e){let{treeData:t,children:n}=e;return t||e2(n)}let ru=i.forwardRef((e,t)=>{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:a}=e,l=rl(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);let s=i.useRef(),c=i.useRef(),u=()=>{let{keyEntities:e}=e3(rc(l));return n?Object.keys(e):r?ts(l.expandedKeys||a||[],e):l.expandedKeys||a},[d,f]=i.useState(l.selectedKeys||l.defaultSelectedKeys||[]),[p,h]=i.useState(()=>u());i.useEffect(()=>{"selectedKeys"in l&&f(l.selectedKeys)},[l.selectedKeys]),i.useEffect(()=>{"expandedKeys"in l&&h(l.expandedKeys)},[l.expandedKeys]);let{getPrefixCls:m,direction:g}=i.useContext(tC.E_),{prefixCls:v,className:y,showIcon:b=!0,expandAction:x="click"}=l,w=rl(l,["prefixCls","className","showIcon","expandAction"]),k=m("tree",v),S=_()("".concat(k,"-directory"),{["".concat(k,"-directory-rtl")]:"rtl"===g},y);return i.createElement(ri,Object.assign({icon:rs,ref:t,blockNode:!0},w,{showIcon:b,expandAction:x,prefixCls:k,className:S,expandedKeys:p,selectedKeys:d,onSelect:(e,t)=>{var n;let r;let{multiple:i,fieldNames:a}=l,{node:u,nativeEvent:d}=t,{key:h=""}=u,m=rc(l),g=Object.assign(Object.assign({},t),{selected:!0}),v=(null==d?void 0:d.ctrlKey)||(null==d?void 0:d.metaKey),y=null==d?void 0:d.shiftKey;i&&v?(r=e,s.current=h,c.current=r):i&&y?r=Array.from(new Set([].concat((0,es.Z)(c.current||[]),(0,es.Z)(function(e){let{treeData:t,expandedKeys:n,startKey:r,endKey:i,fieldNames:a}=e,l=[],s=o.None;return r&&r===i?[r]:r&&i?(ra(t,e=>{if(s===o.End)return!1;if(e===r||e===i){if(l.push(e),s===o.None)s=o.Start;else if(s===o.Start)return s=o.End,!1}else s===o.Start&&l.push(e);return n.includes(e)},e1(a)),l):[]}({treeData:m,expandedKeys:p,startKey:h,endKey:s.current,fieldNames:a}))))):(r=[h],s.current=h,c.current=r),g.selectedNodes=function(e,t,n){let r=(0,es.Z)(t),o=[];return ra(e,(e,t)=>{let n=r.indexOf(e);return -1!==n&&(o.push(t),r.splice(n,1)),!!r.length},e1(n)),o}(m,r,a),null===(n=l.onSelect)||void 0===n||n.call(l,r,g),"selectedKeys"in l||f(r)},onExpand:(e,t)=>{var n;return"expandedKeys"in l||h(e),null===(n=l.onExpand)||void 0===n?void 0:n.call(l,e,t)}}))});ri.DirectoryTree=ru,ri.TreeNode=tt;var rd=n(29436),rf=n(64482),rp=function(e){let{value:t,onChange:n,filterSearch:r,tablePrefixCls:o,locale:a}=e;return r?i.createElement("div",{className:"".concat(o,"-filter-dropdown-search")},i.createElement(rf.default,{prefix:i.createElement(rd.Z,null),placeholder:a.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,className:"".concat(o,"-filter-dropdown-search-input")})):null};let rh=e=>{let{keyCode:t}=e;t===tZ.Z.ENTER&&e.stopPropagation()},rm=i.forwardRef((e,t)=>i.createElement("div",{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:rh,ref:t},e.children));function rg(e){let t=[];return(e||[]).forEach(e=>{let{value:n,children:r}=e;t.push(n),r&&(t=[].concat((0,es.Z)(t),(0,es.Z)(rg(r))))}),t}function rv(e,t){return("string"==typeof t||"number"==typeof t)&&(null==t?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()))}var ry=function(e){var t,n;let r,o;let{tablePrefixCls:a,prefixCls:l,column:s,dropdownPrefixCls:c,columnKey:u,filterMultiple:f,filterMode:p="menu",filterSearch:h=!1,filterState:m,triggerFilter:g,locale:v,children:y,getPopupContainer:b,rootClassName:x}=e,{filterDropdownOpen:w,onFilterDropdownOpenChange:k,filterResetToDefaultFilteredValue:S,defaultFilteredValue:E,filterDropdownVisible:O,onFilterDropdownVisibleChange:C}=s,[j,P]=i.useState(!1),T=!!(m&&((null===(t=m.filteredKeys)||void 0===t?void 0:t.length)||m.forceFiltered)),M=e=>{P(e),null==k||k(e),null==C||C(e)},N=null!==(n=null!=w?w:O)&&void 0!==n?n:j,A=null==m?void 0:m.filteredKeys,[I,R]=function(e){let t=i.useRef(e),n=(0,ny.Z)();return[()=>t.current,e=>{t.current=e,n()}]}(A||[]),D=e=>{let{selectedKeys:t}=e;R(t)};i.useEffect(()=>{j&&D({selectedKeys:A||[]})},[A]);let[L,z]=i.useState([]),[Z,B]=i.useState(""),F=e=>{let{value:t}=e.target;B(t)};i.useEffect(()=>{j||B("")},[j]);let H=e=>{let t=e&&e.length?e:null;if(null===t&&(!m||!m.filteredKeys)||(0,d.Z)(t,null==m?void 0:m.filteredKeys,!0))return null;g({column:s,key:u,filteredKeys:t})},q=()=>{M(!1),H(I())},U=function(){let{confirm:e,closeDropdown:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{confirm:!1,closeDropdown:!1};e&&H([]),t&&M(!1),B(""),S?R((E||[]).map(e=>String(e))):R([])},W=_()({["".concat(c,"-menu-without-submenu")]:!(s.filters||[]).some(e=>{let{children:t}=e;return t})}),K=e=>{let{filters:t}=e;return(t||[]).map((e,t)=>{let n=String(e.value),r={title:e.text,key:void 0!==e.value?n:String(t)};return e.children&&(r.children=K({filters:e.children})),r})},V=e=>{var t;return Object.assign(Object.assign({},e),{text:e.title,value:e.key,children:(null===(t=e.children)||void 0===t?void 0:t.map(e=>V(e)))||[]})};if("function"==typeof s.filterDropdown)r=s.filterDropdown({prefixCls:"".concat(c,"-custom"),setSelectedKeys:e=>D({selectedKeys:e}),selectedKeys:I(),confirm:function(){let{closeDropdown:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{closeDropdown:!0};e&&M(!1),H(I())},clearFilters:U,filters:s.filters,visible:N,close:()=>{M(!1)}});else if(s.filterDropdown)r=s.filterDropdown;else{let e=I()||[];r=i.createElement(i.Fragment,null,0===(s.filters||[]).length?i.createElement(nx.Z,{image:nx.Z.PRESENTED_IMAGE_SIMPLE,description:v.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):"tree"===p?i.createElement(i.Fragment,null,i.createElement(rp,{filterSearch:h,value:Z,onChange:F,tablePrefixCls:a,locale:v}),i.createElement("div",{className:"".concat(a,"-filter-dropdown-tree")},f?i.createElement(th.Z,{checked:e.length===rg(s.filters).length,indeterminate:e.length>0&&e.length{e.target.checked?R(rg(null==s?void 0:s.filters).map(e=>String(e))):R([])}},v.filterCheckall):null,i.createElement(ri,{checkable:!0,selectable:!1,blockNode:!0,multiple:f,checkStrictly:!f,className:"".concat(c,"-menu"),onCheck:(e,t)=>{let{node:n,checked:r}=t;f?D({selectedKeys:e}):D({selectedKeys:r&&n.key?[n.key]:[]})},checkedKeys:e,selectedKeys:e,showIcon:!1,treeData:K({filters:s.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Z.trim()?e=>"function"==typeof h?h(Z,V(e)):rv(Z,e.title):void 0}))):i.createElement(i.Fragment,null,i.createElement(rp,{filterSearch:h,value:Z,onChange:F,tablePrefixCls:a,locale:v}),i.createElement(nw.Z,{selectable:!0,multiple:f,prefixCls:"".concat(c,"-menu"),className:W,onSelect:D,onDeselect:D,selectedKeys:e,getPopupContainer:b,openKeys:L,onOpenChange:e=>{z(e)},items:function e(t){let{filters:n,prefixCls:r,filteredKeys:o,filterMultiple:a,searchValue:l,filterSearch:s}=t;return n.map((t,n)=>{let c=String(t.value);if(t.children)return{key:c||n,label:t.text,popupClassName:"".concat(r,"-dropdown-submenu"),children:e({filters:t.children,prefixCls:r,filteredKeys:o,filterMultiple:a,searchValue:l,filterSearch:s})};let u=a?th.Z:tg.ZP,d={key:void 0!==t.value?c:n,label:i.createElement(i.Fragment,null,i.createElement(u,{checked:o.includes(c)}),i.createElement("span",null,t.text))};return l.trim()?"function"==typeof s?s(l,t)?d:null:rv(l,t.text)?d:null:d})}({filters:s.filters||[],filterSearch:h,prefixCls:l,filteredKeys:I(),filterMultiple:f,searchValue:Z})})),i.createElement("div",{className:"".concat(l,"-dropdown-btns")},i.createElement(nb.ZP,{type:"link",size:"small",disabled:S?(0,d.Z)((E||[]).map(e=>String(e)),e,!0):0===e.length,onClick:()=>U()},v.filterReset),i.createElement(nb.ZP,{type:"primary",size:"small",onClick:q},v.filterConfirm)))}s.filterDropdown&&(r=i.createElement(nk.J,{selectable:void 0},r)),o="function"==typeof s.filterIcon?s.filterIcon(T):s.filterIcon?s.filterIcon:i.createElement(nv,null);let{direction:$}=i.useContext(tC.E_);return i.createElement("div",{className:"".concat(l,"-column")},i.createElement("span",{className:"".concat(a,"-column-title")},y),i.createElement(tm.Z,{dropdownRender:()=>i.createElement(rm,{className:"".concat(l,"-dropdown")},r),trigger:["click"],open:N,onOpenChange:(e,t)=>{"trigger"===t.source&&(e&&void 0!==A&&R(A||[]),M(e),e||s.filterDropdown||q())},getPopupContainer:b,placement:"rtl"===$?"bottomLeft":"bottomRight",rootClassName:x},i.createElement("span",{role:"button",tabIndex:-1,className:_()("".concat(l,"-trigger"),{active:T}),onClick:e=>{e.stopPropagation()}},o)))};function rb(e,t,n){let r=[];return(e||[]).forEach((e,o)=>{var i;let a=nh(o,n);if(e.filters||"filterDropdown"in e||"onFilter"in e){if("filteredValue"in e){let t=e.filteredValue;"filterDropdown"in e||(t=null!==(i=null==t?void 0:t.map(String))&&void 0!==i?i:t),r.push({column:e,key:np(e,a),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:np(e,a),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered})}"children"in e&&(r=[].concat((0,es.Z)(r),(0,es.Z)(rb(e.children,t,a))))}),r}function rx(e){let t={};return e.forEach(e=>{let{key:n,filteredKeys:r,column:o}=e,{filters:i,filterDropdown:a}=o;if(a)t[n]=r||null;else if(Array.isArray(r)){let e=rg(i);t[n]=e.filter(e=>r.includes(String(e)))}else t[n]=null}),t}function rw(e,t){return t.reduce((e,t)=>{let{column:{onFilter:n,filters:r},filteredKeys:o}=t;return n&&o&&o.length?e.filter(e=>o.some(t=>{let o=rg(r),i=o.findIndex(e=>String(e)===String(t));return n(-1!==i?o[i]:t,e)})):e},e)}let rk=e=>e.flatMap(e=>"children"in e?[e].concat((0,es.Z)(rk(e.children||[]))):[e]);var rS=function(e){let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:o,getPopupContainer:a,locale:l,rootClassName:s}=e;(0,tp.ln)("Table");let c=i.useMemo(()=>rk(r||[]),[r]),[u,d]=i.useState(()=>rb(c,!0)),f=i.useMemo(()=>{let e=rb(c,!1);if(0===e.length)return e;let t=!0;if(e.forEach(e=>{let{filteredKeys:n}=e;void 0!==n&&(t=!1)}),t){let e=(c||[]).map((e,t)=>np(e,nh(t)));return u.filter(t=>{let{key:n}=t;return e.includes(n)}).map(t=>{let n=c[e.findIndex(e=>e===t.key)];return Object.assign(Object.assign({},t),{column:Object.assign(Object.assign({},t.column),n),forceFiltered:n.filtered})})}return e},[c,u]),p=i.useMemo(()=>rx(f),[f]),h=e=>{let t=f.filter(t=>{let{key:n}=t;return n!==e.key});t.push(e),d(t),o(rx(t),t)};return[e=>(function e(t,n,r,o,a,l,s,c,u){return r.map((r,d)=>{let f=nh(d,c),{filterMultiple:p=!0,filterMode:h,filterSearch:m}=r,g=r;if(g.filters||g.filterDropdown){let e=np(g,f),c=o.find(t=>{let{key:n}=t;return e===n});g=Object.assign(Object.assign({},g),{title:o=>i.createElement(ry,{tablePrefixCls:t,prefixCls:"".concat(t,"-filter"),dropdownPrefixCls:n,column:g,columnKey:e,filterState:c,filterMultiple:p,filterMode:h,filterSearch:m,triggerFilter:l,locale:a,getPopupContainer:s,rootClassName:u},nm(r.title,o))})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:e(t,n,g.children,o,a,l,s,f,u)})),g})})(t,n,e,f,l,h,a,void 0,s),f,p]},rE=function(){let e=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t{let r=n[t];void 0!==r&&(e[t]=r)})}return e},rO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},rC=function(e,t,n){let r=n&&"object"==typeof n?n:{},{total:o=0}=r,a=rO(r,["total"]),[l,s]=(0,i.useState)(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:10})),c=rE(l,a,{total:o>0?o:e}),u=Math.ceil((o||e)/c.pageSize);c.current>u&&(c.current=u||1);let d=(e,t)=>{s({current:null!=e?e:1,pageSize:t||c.pageSize})};return!1===n?[{},()=>{}]:[Object.assign(Object.assign({},c),{onChange:(e,r)=>{var o;n&&(null===(o=n.onChange)||void 0===o||o.call(n,e,r)),d(e,r),t(e,r||(null==c?void 0:c.pageSize))}}),d]},rj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},r_=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:rj}))}),rP={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},rT=i.forwardRef(function(e,t){return i.createElement(tA.Z,(0,m.Z)({},e,{ref:t,icon:rP}))}),rM=n(89970);let rN="ascend",rA="descend";function rI(e){return"object"==typeof e.sorter&&"number"==typeof e.sorter.multiple&&e.sorter.multiple}function rR(e){return"function"==typeof e?e:!!e&&"object"==typeof e&&!!e.compare&&e.compare}function rD(e,t,n){let r=[];function o(e,t){r.push({column:e,key:np(e,t),multiplePriority:rI(e),sortOrder:e.sortOrder})}return(e||[]).forEach((e,i)=>{let a=nh(i,n);e.children?("sortOrder"in e&&o(e,a),r=[].concat((0,es.Z)(r),(0,es.Z)(rD(e.children,t,a)))):e.sorter&&("sortOrder"in e?o(e,a):t&&e.defaultSortOrder&&r.push({column:e,key:np(e,a),multiplePriority:rI(e),sortOrder:e.defaultSortOrder}))}),r}function rL(e){let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function rz(e){let t=e.filter(e=>{let{sortOrder:t}=e;return t}).map(rL);return 0===t.length&&e.length?Object.assign(Object.assign({},rL(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function rZ(e,t,n){let r=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),o=e.slice(),i=r.filter(e=>{let{column:{sorter:t},sortOrder:n}=e;return rR(t)&&n});return i.length?o.sort((e,t)=>{for(let n=0;n{let r=e[n];return r?Object.assign(Object.assign({},e),{[n]:rZ(r,t,n)}):e}):o}var rB=x(eN,(e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),rF=x(eH,(e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),rH=n(36360),rq=e=>{let{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:o,tableHeaderBg:i,tablePaddingVertical:a,tablePaddingHorizontal:l,calc:s}=e,c="".concat((0,t0.bf)(n)," ").concat(r," ").concat(o),u=(e,r,o)=>({["&".concat(t,"-").concat(e)]:{["> ".concat(t,"-container")]:{["> ".concat(t,"-content, > ").concat(t,"-body")]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,t0.bf)(s(r).mul(-1).equal()),"\n ").concat((0,t0.bf)(s(s(o).add(n)).mul(-1).equal()))}}}}}});return{["".concat(t,"-wrapper")]:{["".concat(t).concat(t,"-bordered")]:Object.assign(Object.assign(Object.assign({["> ".concat(t,"-title")]:{border:c,borderBottom:0},["> ".concat(t,"-container")]:{borderInlineStart:c,borderTop:c,["\n > ".concat(t,"-content,\n > ").concat(t,"-header,\n > ").concat(t,"-body,\n > ").concat(t,"-summary\n ")]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:c},"> thead":{"> tr:not(:last-child) > th":{borderBottom:c},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{["> ".concat(t,"-cell-fix-right-first::after")]:{borderInlineEnd:c}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,t0.bf)(s(a).mul(-1).equal())," ").concat((0,t0.bf)(s(s(l).add(n)).mul(-1).equal())),"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:c,content:'""'}}}}}},["&".concat(t,"-scroll-horizontal")]:{["> ".concat(t,"-container > ").concat(t,"-body")]:{"> table > tbody":{["\n > tr".concat(t,"-expanded-row,\n > tr").concat(t,"-placeholder\n ")]:{"> th, > td":{borderInlineEnd:0}}}}}},u("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),u("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{["> ".concat(t,"-footer")]:{border:c,borderTop:0}}),["".concat(t,"-cell")]:{["".concat(t,"-container:first-child")]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:"0 ".concat((0,t0.bf)(n)," 0 ").concat((0,t0.bf)(n)," ").concat(i)}},["".concat(t,"-bordered ").concat(t,"-cell-scrollbar")]:{borderInlineEnd:c}}}},rU=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-cell-ellipsis")]:Object.assign(Object.assign({},t4.vS),{wordBreak:"keep-all",["\n &".concat(t,"-cell-fix-left-last,\n &").concat(t,"-cell-fix-right-first\n ")]:{overflow:"visible",["".concat(t,"-cell-content")]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},["".concat(t,"-column-title")]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},rW=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody > tr").concat(t,"-placeholder")]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},rK=n(76122),rV=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:o,paddingXS:i,lineType:a,tableBorderColor:l,tableExpandIconBg:s,tableExpandColumnWidth:c,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:h,expandIconMarginTop:m,expandIconSize:g,expandIconHalfInner:v,expandIconScale:y,calc:b}=e,x="".concat((0,t0.bf)(o)," ").concat(a," ").concat(l),w=b(h).sub(o).equal();return{["".concat(t,"-wrapper")]:{["".concat(t,"-expand-icon-col")]:{width:c},["".concat(t,"-row-expand-icon-cell")]:{textAlign:"center",["".concat(t,"-row-expand-icon")]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},["".concat(t,"-row-indent")]:{height:1,float:"left"},["".concat(t,"-row-expand-icon")]:Object.assign(Object.assign({},(0,rK.N)(e)),{position:"relative",float:"left",boxSizing:"border-box",width:g,height:g,padding:0,color:"inherit",lineHeight:(0,t0.bf)(g),background:s,border:x,borderRadius:u,transform:"scale(".concat(y,")"),transition:"all ".concat(r),userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:"transform ".concat(r," ease-out"),content:'""'},"&::before":{top:v,insetInlineEnd:w,insetInlineStart:w,height:o},"&::after":{top:w,bottom:w,insetInlineStart:v,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),["".concat(t,"-row-indent + ").concat(t,"-row-expand-icon")]:{marginTop:m,marginInlineEnd:i},["tr".concat(t,"-expanded-row")]:{"&, &:hover":{"> th, > td":{background:p}},["".concat(n,"-descriptions-view")]:{display:"flex",table:{flex:"auto",width:"auto"}}},["".concat(t,"-expanded-row-fixed")]:{position:"relative",margin:"".concat((0,t0.bf)(b(d).mul(-1).equal())," ").concat((0,t0.bf)(b(f).mul(-1).equal())),padding:"".concat((0,t0.bf)(d)," ").concat((0,t0.bf)(f))}}}},r$=e=>{let{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:i,paddingXXS:a,paddingXS:l,colorText:s,lineWidth:c,lineType:u,tableBorderColor:d,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:h,borderRadius:m,motionDurationSlow:g,colorTextDescription:v,colorPrimary:y,tableHeaderFilterActiveBg:b,colorTextDisabled:x,tableFilterDropdownBg:w,tableFilterDropdownHeight:k,controlItemBgHover:S,controlItemBgActive:E,boxShadowSecondary:O,filterDropdownMenuBg:C,calc:j}=e,_="".concat(n,"-dropdown"),P="".concat(t,"-filter-dropdown"),T="".concat(n,"-tree"),M="".concat((0,t0.bf)(c)," ").concat(u," ").concat(d);return[{["".concat(t,"-wrapper")]:{["".concat(t,"-filter-column")]:{display:"flex",justifyContent:"space-between"},["".concat(t,"-filter-trigger")]:{position:"relative",display:"flex",alignItems:"center",marginBlock:j(a).mul(-1).equal(),marginInline:"".concat((0,t0.bf)(a)," ").concat((0,t0.bf)(j(h).div(2).mul(-1).equal())),padding:"0 ".concat((0,t0.bf)(a)),color:f,fontSize:p,borderRadius:m,cursor:"pointer",transition:"all ".concat(g),"&:hover":{color:v,background:b},"&.active":{color:y}}}},{["".concat(n,"-dropdown")]:{[P]:Object.assign(Object.assign({},(0,t4.Wf)(e)),{minWidth:o,backgroundColor:w,borderRadius:m,boxShadow:O,overflow:"hidden",["".concat(_,"-menu")]:{maxHeight:k,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:C,"&:empty::after":{display:"block",padding:"".concat((0,t0.bf)(l)," 0"),color:x,fontSize:p,textAlign:"center",content:'"Not Found"'}},["".concat(P,"-tree")]:{paddingBlock:"".concat((0,t0.bf)(l)," 0"),paddingInline:l,[T]:{padding:0},["".concat(T,"-treenode ").concat(T,"-node-content-wrapper:hover")]:{backgroundColor:S},["".concat(T,"-treenode-checkbox-checked ").concat(T,"-node-content-wrapper")]:{"&, &:hover":{backgroundColor:E}}},["".concat(P,"-search")]:{padding:l,borderBottom:M,"&-input":{input:{minWidth:i},[r]:{color:x}}},["".concat(P,"-checkall")]:{width:"100%",marginBottom:a,marginInlineStart:a},["".concat(P,"-btns")]:{display:"flex",justifyContent:"space-between",padding:"".concat((0,t0.bf)(j(l).sub(c).equal())," ").concat((0,t0.bf)(l)),overflow:"hidden",borderTop:M}})}},{["".concat(n,"-dropdown ").concat(P,", ").concat(P,"-submenu")]:{["".concat(n,"-checkbox-wrapper + span")]:{paddingInlineStart:l,color:s},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},rX=e=>{let{componentCls:t,lineWidth:n,colorSplit:r,motionDurationSlow:o,zIndexTableFixed:i,tableBg:a,zIndexTableSticky:l,calc:s}=e;return{["".concat(t,"-wrapper")]:{["\n ".concat(t,"-cell-fix-left,\n ").concat(t,"-cell-fix-right\n ")]:{position:"sticky !important",zIndex:i,background:a},["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after\n ")]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:s(n).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:"box-shadow ".concat(o),content:'""',pointerEvents:"none"},["".concat(t,"-cell-fix-left-all::after")]:{display:"none"},["\n ".concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{position:"absolute",top:0,bottom:s(n).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:"box-shadow ".concat(o),content:'""',pointerEvents:"none"},["".concat(t,"-container")]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:s(l).add(1).equal({unit:!1}),width:30,transition:"box-shadow ".concat(o),content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},["".concat(t,"-ping-left")]:{["&:not(".concat(t,"-has-fix-left) ").concat(t,"-container::before")]:{boxShadow:"inset 10px 0 8px -8px ".concat(r)},["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after\n ")]:{boxShadow:"inset 10px 0 8px -8px ".concat(r)},["".concat(t,"-cell-fix-left-last::before")]:{backgroundColor:"transparent !important"}},["".concat(t,"-ping-right")]:{["&:not(".concat(t,"-has-fix-right) ").concat(t,"-container::after")]:{boxShadow:"inset -10px 0 8px -8px ".concat(r)},["\n ".concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{boxShadow:"inset -10px 0 8px -8px ".concat(r)}}}}},rG=e=>{let{componentCls:t,antCls:n,margin:r}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-pagination").concat(n,"-pagination")]:{margin:"".concat((0,t0.bf)(r)," 0")},["".concat(t,"-pagination")]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},rY=e=>{let{componentCls:t,tableRadius:n}=e;return{["".concat(t,"-wrapper")]:{[t]:{["".concat(t,"-title, ").concat(t,"-header")]:{borderRadius:"".concat((0,t0.bf)(n)," ").concat((0,t0.bf)(n)," 0 0")},["".concat(t,"-title + ").concat(t,"-container")]:{borderStartStartRadius:0,borderStartEndRadius:0,["".concat(t,"-header, table")]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:"0 0 ".concat((0,t0.bf)(n)," ").concat((0,t0.bf)(n))}}}}},rQ=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper-rtl")]:{direction:"rtl",table:{direction:"rtl"},["".concat(t,"-pagination-left")]:{justifyContent:"flex-end"},["".concat(t,"-pagination-right")]:{justifyContent:"flex-start"},["".concat(t,"-row-expand-icon")]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},["".concat(t,"-container")]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},["".concat(t,"-row-indent")]:{float:"right"}}}}},rJ=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:o,padding:i,paddingXS:a,headerIconColor:l,headerIconHoverColor:s,tableSelectionColumnWidth:c,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:h}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-selection-col")]:{width:c,["&".concat(t,"-selection-col-with-dropdown")]:{width:h(c).add(o).add(h(i).div(4)).equal()}},["".concat(t,"-bordered ").concat(t,"-selection-col")]:{width:h(c).add(h(a).mul(2)).equal(),["&".concat(t,"-selection-col-with-dropdown")]:{width:h(c).add(o).add(h(i).div(4)).add(h(a).mul(2)).equal()}},["\n table tr th".concat(t,"-selection-column,\n table tr td").concat(t,"-selection-column,\n ").concat(t,"-selection-column\n ")]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",["".concat(n,"-radio-wrapper")]:{marginInlineEnd:0}},["table tr th".concat(t,"-selection-column").concat(t,"-cell-fix-left")]:{zIndex:e.zIndexTableFixed+1},["table tr th".concat(t,"-selection-column::after")]:{backgroundColor:"transparent !important"},["".concat(t,"-selection")]:{position:"relative",display:"inline-flex",flexDirection:"column"},["".concat(t,"-selection-extra")]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),marginInlineStart:"100%",paddingInlineStart:(0,t0.bf)(h(p).div(4).equal()),[r]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:s}}},["".concat(t,"-tbody")]:{["".concat(t,"-row")]:{["&".concat(t,"-row-selected")]:{["> ".concat(t,"-cell")]:{background:u,"&-row-hover":{background:d}}},["> ".concat(t,"-cell-row-hover")]:{background:f}}}}}},r0=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,o=(e,o,i,a)=>({["".concat(t).concat(t,"-").concat(e)]:{fontSize:a,["\n ".concat(t,"-title,\n ").concat(t,"-footer,\n ").concat(t,"-cell,\n ").concat(t,"-thead > tr > th,\n ").concat(t,"-tbody > tr > th,\n ").concat(t,"-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n ")]:{padding:"".concat((0,t0.bf)(o)," ").concat((0,t0.bf)(i))},["".concat(t,"-filter-trigger")]:{marginInlineEnd:(0,t0.bf)(r(i).div(2).mul(-1).equal())},["".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,t0.bf)(r(o).mul(-1).equal())," ").concat((0,t0.bf)(r(i).mul(-1).equal()))},["".concat(t,"-tbody")]:{["".concat(t,"-wrapper:only-child ").concat(t)]:{marginBlock:(0,t0.bf)(r(o).mul(-1).equal()),marginInline:"".concat((0,t0.bf)(r(n).sub(i).equal())," ").concat((0,t0.bf)(r(i).mul(-1).equal()))}},["".concat(t,"-selection-extra")]:{paddingInlineStart:(0,t0.bf)(r(i).div(4).equal())}}});return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},r1=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:o,headerIconHoverColor:i}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-thead th").concat(t,"-column-has-sorters")]:{outline:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},["\n &".concat(t,"-cell-fix-left:hover,\n &").concat(t,"-cell-fix-right:hover\n ")]:{background:e.tableFixedHeaderSortActiveBg}},["".concat(t,"-thead th").concat(t,"-column-sort")]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},["td".concat(t,"-column-sort")]:{background:e.tableBodySortBg},["".concat(t,"-column-title")]:{position:"relative",zIndex:1,flex:1},["".concat(t,"-column-sorters")]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},["".concat(t,"-column-sorter")]:{marginInlineStart:n,color:o,fontSize:0,transition:"color ".concat(e.motionDurationSlow),"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},["".concat(t,"-column-sorter-up + ").concat(t,"-column-sorter-down")]:{marginTop:"-0.3em"}},["".concat(t,"-column-sorters:hover ").concat(t,"-column-sorter")]:{color:i}}}},r2=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:o,tableScrollThumbSize:i,tableScrollBg:a,zIndexTableSticky:l,stickyScrollBarBorderRadius:s,lineWidth:c,lineType:u,tableBorderColor:d}=e,f="".concat((0,t0.bf)(c)," ").concat(u," ").concat(d);return{["".concat(t,"-wrapper")]:{["".concat(t,"-sticky")]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:"".concat((0,t0.bf)(i)," !important"),zIndex:l,display:"flex",alignItems:"center",background:a,borderTop:f,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:r,borderRadius:s,transition:"all ".concat(e.motionDurationSlow,", transform none"),position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},r4=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:r,calc:o}=e,i="".concat((0,t0.bf)(n)," ").concat(e.lineType," ").concat(r);return{["".concat(t,"-wrapper")]:{["".concat(t,"-summary")]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:i}}},["div".concat(t,"-summary")]:{boxShadow:"0 ".concat((0,t0.bf)(o(n).mul(-1).equal())," 0 ").concat(r)}}}},r3=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:o,tableBorderColor:i,calc:a}=e,l="".concat((0,t0.bf)(r)," ").concat(o," ").concat(i),s="".concat(t,"-expanded-row-cell");return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody-virtual")]:{["".concat(t,"-row")]:{display:"flex",boxSizing:"border-box",width:"100%"},["".concat(t,"-cell")]:{borderBottom:l,transition:"background ".concat(n)},["".concat(t,"-expanded-row")]:{["".concat(s).concat(s,"-fixed")]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:"calc(var(--virtual-width) - ".concat((0,t0.bf)(r),")"),borderInlineEnd:"none"}}},["".concat(t,"-bordered")]:{["".concat(t,"-tbody-virtual")]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:l,position:"absolute"},["".concat(t,"-cell")]:{borderInlineEnd:l,["&".concat(t,"-cell-fix-right-first:before")]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:a(r).mul(-1).equal(),borderInlineStart:l}}},["&".concat(t,"-virtual")]:{["".concat(t,"-placeholder ").concat(t,"-cell")]:{borderInlineEnd:l,borderBottom:l}}}}}};let r6=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:o,tableExpandColumnWidth:i,lineWidth:a,lineType:l,tableBorderColor:s,tableFontSize:c,tableBg:u,tableRadius:d,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:h,tableHeaderCellSplitColor:m,tableFooterTextColor:g,tableFooterBg:v,calc:y}=e,b="".concat((0,t0.bf)(a)," ").concat(l," ").concat(s);return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,t4.dF)()),{[t]:Object.assign(Object.assign({},(0,t4.Wf)(e)),{fontSize:c,background:u,borderRadius:"".concat((0,t0.bf)(d)," ").concat((0,t0.bf)(d)," 0 0")}),table:{width:"100%",textAlign:"start",borderRadius:"".concat((0,t0.bf)(d)," ").concat((0,t0.bf)(d)," 0 0"),borderCollapse:"separate",borderSpacing:0},["\n ".concat(t,"-cell,\n ").concat(t,"-thead > tr > th,\n ").concat(t,"-tbody > tr > th,\n ").concat(t,"-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n ")]:{position:"relative",padding:"".concat((0,t0.bf)(r)," ").concat((0,t0.bf)(o)),overflowWrap:"break-word"},["".concat(t,"-title")]:{padding:"".concat((0,t0.bf)(r)," ").concat((0,t0.bf)(o))},["".concat(t,"-thead")]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:h,borderBottom:b,transition:"background ".concat(p," ease"),"&[colspan]:not([colspan='1'])":{textAlign:"center"},["&:not(:last-child):not(".concat(t,"-selection-column):not(").concat(t,"-row-expand-icon-cell):not([colspan])::before")]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:m,transform:"translateY(-50%)",transition:"background-color ".concat(p),content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},["".concat(t,"-tbody")]:{"> tr":{"> th, > td":{transition:"background ".concat(p,", border-color ").concat(p),borderBottom:b,["\n > ".concat(t,"-wrapper:only-child,\n > ").concat(t,"-expanded-row-fixed > ").concat(t,"-wrapper:only-child\n ")]:{[t]:{marginBlock:(0,t0.bf)(y(r).mul(-1).equal()),marginInline:"".concat((0,t0.bf)(y(i).sub(o).equal()),"\n ").concat((0,t0.bf)(y(o).mul(-1).equal())),["".concat(t,"-tbody > tr:last-child > td")]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:h,borderBottom:b,transition:"background ".concat(p," ease")}}},["".concat(t,"-footer")]:{padding:"".concat((0,t0.bf)(r)," ").concat((0,t0.bf)(o)),color:g,background:v}})}};var r8=(0,t6.I$)("Table",e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:o,headerBg:i,headerColor:a,headerSortActiveBg:l,headerSortHoverBg:s,bodySortBg:c,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:h,cellPaddingInline:m,cellPaddingBlockMD:g,cellPaddingInlineMD:v,cellPaddingBlockSM:y,cellPaddingInlineSM:b,borderColor:x,footerBg:w,footerColor:k,headerBorderRadius:S,cellFontSize:E,cellFontSizeMD:O,cellFontSizeSM:C,headerSplitColor:j,fixedHeaderSortActiveBg:_,headerFilterHoverBg:P,filterDropdownBg:T,expandIconBg:M,selectionColumnWidth:N,stickyScrollBarBg:A,calc:I}=e,R=(0,t3.TS)(e,{tableFontSize:E,tableBg:r,tableRadius:S,tablePaddingVertical:h,tablePaddingHorizontal:m,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:v,tablePaddingVerticalSmall:y,tablePaddingHorizontalSmall:b,tableBorderColor:x,tableHeaderTextColor:a,tableHeaderBg:i,tableFooterTextColor:k,tableFooterBg:w,tableHeaderCellSplitColor:j,tableHeaderSortBg:l,tableHeaderSortHoverBg:s,tableBodySortBg:c,tableFixedHeaderSortActiveBg:_,tableHeaderFilterActiveBg:P,tableFilterDropdownBg:T,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:f,zIndexTableFixed:2,zIndexTableSticky:3,tableFontSizeMiddle:O,tableFontSizeSmall:C,tableSelectionColumnWidth:N,tableExpandIconBg:M,tableExpandColumnWidth:I(o).add(I(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:A,tableScrollThumbBgHover:t,tableScrollBg:n});return[r6(R),rG(R),r4(R),r1(R),r$(R),rq(R),rY(R),rV(R),r4(R),rW(R),rJ(R),rX(R),r2(R),rU(R),r0(R),rQ(R),r3(R)]},e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:o,colorFillContent:i,controlItemBgActive:a,controlItemBgActiveHover:l,padding:s,paddingSM:c,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:h,fontSize:m,fontSizeSM:g,lineHeight:v,lineWidth:y,colorIcon:b,colorIconHover:x,opacityLoading:w,controlInteractiveSize:k}=e,S=new rH.C(o).onBackground(n).toHexShortString(),E=new rH.C(i).onBackground(n).toHexShortString(),O=new rH.C(t).onBackground(n).toHexShortString(),C=new rH.C(b),j=new rH.C(x),_=k/2-y,P=2*_+3*y;return{headerBg:O,headerColor:r,headerSortActiveBg:S,headerSortHoverBg:E,bodySortBg:O,rowHoverBg:O,rowSelectedBg:a,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:s,cellPaddingInline:s,cellPaddingBlockMD:c,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:f,footerBg:O,footerColor:r,cellFontSize:m,cellFontSizeMD:m,cellFontSizeSM:m,headerSplitColor:d,fixedHeaderSortActiveBg:S,headerFilterHoverBg:i,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:h,stickyScrollBarBorderRadius:100,expandIconMarginTop:(m*v-3*y)/2-Math.ceil((1.4*g-3*y)/2),headerIconColor:C.clone().setAlpha(C.getAlpha()*w).toRgbString(),headerIconHoverColor:j.clone().setAlpha(j.getAlpha()*w).toRgbString(),expandIconHalfInner:_,expandIconSize:P,expandIconScale:k/P}},{unitless:{expandIconScale:!0}});let r5=[];var r7=i.forwardRef((e,t)=>{var n,r;let o,a,s;let{prefixCls:c,className:u,rootClassName:d,style:f,size:p,bordered:h,dropdownPrefixCls:m,dataSource:g,pagination:v,rowSelection:y,rowKey:b="key",rowClassName:x,columns:w,children:k,childrenColumnName:S,onChange:E,getPopupContainer:O,loading:C,expandIcon:j,expandable:P,expandedRowRender:T,expandIconColumnIndex:M,indentSize:N,scroll:A,sortDirections:I,locale:R,showSorterTooltip:D=!0,virtual:L}=e;(0,tp.ln)("Table");let z=i.useMemo(()=>w||ey(k),[w,k]),Z=i.useMemo(()=>z.some(e=>e.responsive),[z]),B=(0,tT.Z)(Z),F=i.useMemo(()=>{let e=new Set(Object.keys(B).filter(e=>B[e]));return z.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[z,B]),H=(0,eY.Z)(e,["className","style","columns"]),{locale:q=tM.Z,direction:U,table:W,renderEmpty:K,getPrefixCls:V,getPopupContainer:$}=i.useContext(tC.E_),X=(0,tP.Z)(p),G=Object.assign(Object.assign({},q.Table),R),Y=g||r5,Q=V("table",c),J=V("dropdown",m),[,ee]=(0,nl.ZP)(),et=(0,t_.Z)(Q),[en,er,eo]=r8(Q,et),ei=Object.assign({childrenColumnName:S,expandIconColumnIndex:M},P),{childrenColumnName:ea="children"}=ei,el=i.useMemo(()=>Y.some(e=>null==e?void 0:e[ea])?"nest":T||P&&P.expandedRowRender?"row":null,[Y]),ec={body:i.useRef()},eu=i.useRef(null),ed=i.useRef(null);n=()=>Object.assign(Object.assign({},ed.current),{nativeElement:eu.current}),(0,i.useImperativeHandle)(t,()=>{let e=n(),{nativeElement:t}=e;return"undefined"!=typeof Proxy?new Proxy(t,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)}):(t._antProxy=t._antProxy||{},Object.keys(e).forEach(n=>{if(!(n in t._antProxy)){let r=t[n];t._antProxy[n]=r,t[n]=e[n]}}),t)});let ef=i.useMemo(()=>"function"==typeof b?b:e=>null==e?void 0:e[b],[b]),[ep]=function(e,t,n){let r=i.useRef({});return[function(o){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let o=new Map;!function e(r){r.forEach((r,i)=>{let a=n(r,i);o.set(a,r),r&&"object"==typeof r&&t in r&&e(r[t]||[])})}(e),r.current={data:e,childrenColumnName:t,kvMap:o,getRowKey:n}}return r.current.kvMap.get(o)}]}(Y,ea,ef),eh={},em=function(e,t){var n,r,o;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign(Object.assign({},eh),e);i&&(null===(n=eh.resetPagination)||void 0===n||n.call(eh),(null===(r=a.pagination)||void 0===r?void 0:r.current)&&(a.pagination.current=1),v&&v.onChange&&v.onChange(1,null===(o=a.pagination)||void 0===o?void 0:o.pageSize)),A&&!1!==A.scrollToFirstRowOnChange&&ec.body.current&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{getContainer:n=()=>window,callback:r,duration:o=450}=t,i=n(),a=function(e,t){var n,r;if("undefined"==typeof window)return 0;let o=t?"scrollTop":"scrollLeft",i=0;return tO(e)?i=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?i=e.documentElement[o]:e instanceof HTMLElement?i=e[o]:e&&(i=e[o]),e&&!tO(e)&&"number"!=typeof i&&(i=null===(r=(null!==(n=e.ownerDocument)&&void 0!==n?n:e).documentElement)||void 0===r?void 0:r[o]),i}(i,!0),l=Date.now(),s=()=>{let t=Date.now()-l,n=function(e,t,n,r){let o=n-t;return(e/=r/2)<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}(t>o?o:t,a,e,o);tO(i)?i.scrollTo(window.pageXOffset,n):i instanceof Document||"HTMLDocument"===i.constructor.name?i.documentElement.scrollTop=n:i.scrollTop=n,tec.body.current}),null==E||E(a.pagination,a.filters,a.sorter,{currentDataSource:rw(rZ(Y,a.sorterStates,ea),a.filterStates),action:t})},[eg,ev,eb,ex]=function(e){let{prefixCls:t,mergedColumns:n,onSorterChange:r,sortDirections:o,tableLocale:a,showSorterTooltip:l}=e,[s,c]=i.useState(rD(n,!0)),u=i.useMemo(()=>{let e=!0,t=rD(n,!1);if(!t.length)return s;let r=[];function o(t){e?r.push(t):r.push(Object.assign(Object.assign({},t),{sortOrder:null}))}let i=null;return t.forEach(t=>{null===i?(o(t),t.sortOrder&&(!1===t.multiplePriority?e=!1:i=!0)):(i&&!1!==t.multiplePriority||(e=!1),o(t))}),r},[n,s]),d=i.useMemo(()=>{let e=u.map(e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n}});return{sortColumns:e,sortColumn:e[0]&&e[0].column,sortOrder:e[0]&&e[0].order}},[u]);function f(e){let t;c(t=!1!==e.multiplePriority&&u.length&&!1!==u[0].multiplePriority?[].concat((0,es.Z)(u.filter(t=>{let{key:n}=t;return n!==e.key})),[e]):[e]),r(rz(t),t)}return[e=>(function e(t,n,r,o,a,l,s,c){return(n||[]).map((n,u)=>{let d=nh(u,c),f=n;if(f.sorter){let e;let c=f.sortDirections||a,u=void 0===f.showSorterTooltip?s:f.showSorterTooltip,p=np(f,d),h=r.find(e=>{let{key:t}=e;return t===p}),m=h?h.sortOrder:null,g=m?c[c.indexOf(m)+1]:c[0];if(n.sortIcon)e=n.sortIcon({sortOrder:m});else{let n=c.includes(rN)&&i.createElement(rT,{className:_()("".concat(t,"-column-sorter-up"),{active:m===rN})}),r=c.includes(rA)&&i.createElement(r_,{className:_()("".concat(t,"-column-sorter-down"),{active:m===rA})});e=i.createElement("span",{className:_()("".concat(t,"-column-sorter"),{["".concat(t,"-column-sorter-full")]:!!(n&&r)})},i.createElement("span",{className:"".concat(t,"-column-sorter-inner"),"aria-hidden":"true"},n,r))}let{cancelSort:v,triggerAsc:y,triggerDesc:b}=l||{},x=v;g===rA?x=b:g===rN&&(x=y);let w="object"==typeof u?Object.assign({title:x},u):{title:x};f=Object.assign(Object.assign({},f),{className:_()(f.className,{["".concat(t,"-column-sort")]:m}),title:r=>{let o=i.createElement("div",{className:"".concat(t,"-column-sorters")},i.createElement("span",{className:"".concat(t,"-column-title")},nm(n.title,r)),e);return u?i.createElement(rM.Z,Object.assign({},w),o):o},onHeaderCell:e=>{let r=n.onHeaderCell&&n.onHeaderCell(e)||{},i=r.onClick,a=r.onKeyDown;r.onClick=e=>{o({column:n,key:p,sortOrder:g,multiplePriority:rI(n)}),null==i||i(e)},r.onKeyDown=e=>{e.keyCode===tZ.Z.ENTER&&(o({column:n,key:p,sortOrder:g,multiplePriority:rI(n)}),null==a||a(e))};let l=function(e,t){let n=nm(e,t);return"[object Object]"===Object.prototype.toString.call(n)?"":n}(n.title,{}),s=null==l?void 0:l.toString();return m?r["aria-sort"]="ascend"===m?"ascending":"descending":r["aria-label"]=s||"",r.className=_()(r.className,"".concat(t,"-column-has-sorters")),r.tabIndex=0,n.ellipsis&&(r.title=(null!=l?l:"").toString()),r}})}return"children"in f&&(f=Object.assign(Object.assign({},f),{children:e(t,f.children,r,o,a,l,s,d)})),f})})(t,e,u,f,o,a,l),u,d,()=>rz(u)]}({prefixCls:Q,mergedColumns:F,onSorterChange:(e,t)=>{em({sorter:e,sorterStates:t},"sort",!1)},sortDirections:I||["ascend","descend"],tableLocale:G,showSorterTooltip:D}),ew=i.useMemo(()=>rZ(Y,ev,ea),[Y,ev]);eh.sorter=ex(),eh.sorterStates=ev;let[ek,eS,eE]=rS({prefixCls:Q,locale:G,dropdownPrefixCls:J,mergedColumns:F,onFilterChange:(e,t)=>{em({filters:e,filterStates:t},"filter",!0)},getPopupContainer:O||$,rootClassName:_()(d,et)}),eO=rw(ew,eS);eh.filters=eE,eh.filterStates=eS;let[eC]=(r=i.useMemo(()=>{let e={};return Object.keys(eE).forEach(t=>{null!==eE[t]&&(e[t]=eE[t])}),Object.assign(Object.assign({},eb),{filters:e})},[eb,eE]),[i.useCallback(e=>(function e(t,n){return t.map(t=>{let r=Object.assign({},t);return r.title=nm(t.title,n),"children"in r&&(r.children=e(r.children,n)),r})})(e,r),[r])]),[ej,e_]=rC(eO.length,(e,t)=>{em({pagination:Object.assign(Object.assign({},eh.pagination),{current:e,pageSize:t})},"paginate")},v);eh.pagination=!1===v?{}:function(e,t){let n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&"object"==typeof t?t:{}).forEach(t=>{let r=e[t];"function"!=typeof r&&(n[t]=r)}),n}(ej,v),eh.resetPagination=e_;let eP=i.useMemo(()=>{if(!1===v||!ej.pageSize)return eO;let{current:e=1,total:t,pageSize:n=10}=ej;return eO.lengthn?eO.slice((e-1)*n,e*n):eO:eO.slice((e-1)*n,e*n)},[!!v,eO,ej&&ej.current,ej&&ej.pageSize,ej&&ej.total]),[eT,eM]=tS({prefixCls:Q,data:eO,pageData:eP,getRowKey:ef,getRecordByKey:ep,expandType:el,childrenColumnName:ea,locale:G,getPopupContainer:O||$},y);ei.__PARENT_RENDER_ICON__=ei.expandIcon,ei.expandIcon=ei.expandIcon||j||function(e){let{prefixCls:t,onExpand:n,record:r,expanded:o,expandable:a}=e,l="".concat(t,"-row-expand-icon");return i.createElement("button",{type:"button",onClick:e=>{n(r,e),e.stopPropagation()},className:_()(l,{["".concat(l,"-spaced")]:!a,["".concat(l,"-expanded")]:a&&o,["".concat(l,"-collapsed")]:a&&!o}),"aria-label":o?G.collapse:G.expand,"aria-expanded":o})},"nest"===el&&void 0===ei.expandIconColumnIndex?ei.expandIconColumnIndex=y?1:0:ei.expandIconColumnIndex>0&&y&&(ei.expandIconColumnIndex-=1),"number"!=typeof ei.indentSize&&(ei.indentSize="number"==typeof N?N:15);let eN=i.useCallback(e=>eC(eT(ek(eg(e)))),[eg,ek,eT]);if(!1!==v&&(null==ej?void 0:ej.total)){let e;e=ej.size?ej.size:"small"===X||"middle"===X?"small":void 0;let t=t=>i.createElement(nd,Object.assign({},ej,{className:_()("".concat(Q,"-pagination ").concat(Q,"-pagination-").concat(t),ej.className),size:e})),n="rtl"===U?"left":"right",{position:r}=ej;if(null!==r&&Array.isArray(r)){let e=r.find(e=>e.includes("top")),i=r.find(e=>e.includes("bottom")),l=r.every(e=>"none"==="".concat(e));e||i||l||(a=t(n)),e&&(o=t(e.toLowerCase().replace("top",""))),i&&(a=t(i.toLowerCase().replace("bottom","")))}else a=t(n)}"boolean"==typeof C?s={spinning:C}:"object"==typeof C&&(s=Object.assign({spinning:!0},C));let eA=_()(eo,et,"".concat(Q,"-wrapper"),null==W?void 0:W.className,{["".concat(Q,"-wrapper-rtl")]:"rtl"===U},u,d,er),eI=Object.assign(Object.assign({},null==W?void 0:W.style),f),eR=R&&R.emptyText||(null==K?void 0:K("Table"))||i.createElement(tj.Z,{componentName:"Table"}),eD={},eL=i.useMemo(()=>{let{fontSize:e,lineHeight:t,padding:n,paddingXS:r,paddingSM:o}=ee,i=Math.floor(e*t);switch(X){case"large":return 2*n+i;case"small":return 2*r+i;default:return 2*o+i}},[ee,X]);return L&&(eD.listItemHeight=eL),en(i.createElement("div",{ref:eu,className:eA,style:eI},i.createElement(nf.Z,Object.assign({spinning:!1},s),o,i.createElement(L?rF:rB,Object.assign({},eD,H,{ref:ed,columns:F,direction:U,expandable:ei,prefixCls:Q,className:_()({["".concat(Q,"-middle")]:"middle"===X,["".concat(Q,"-small")]:"small"===X,["".concat(Q,"-bordered")]:h,["".concat(Q,"-empty")]:0===Y.length},eo,et,er),data:eP,rowKey:ef,rowClassName:(e,t,n)=>{let r;return r="function"==typeof x?_()(x(e,t,n)):_()(x),_()({["".concat(Q,"-row-selected")]:eM.has(ef(e,t))},r)},emptyText:eR,internalHooks:l,internalRefs:ec,transformColumns:eN,getContainerWidth:(e,t)=>{let n=e.querySelector(".".concat(Q,"-container")),r=t;if(n){let e=getComputedStyle(n);r=t-parseInt(e.borderLeftWidth,10)-parseInt(e.borderRightWidth,10)}return r}})),a)))});let r9=i.forwardRef((e,t)=>{let n=i.useRef(0);return n.current+=1,i.createElement(r7,Object.assign({},e,{ref:t,_renderTimes:n.current}))});r9.SELECTION_COLUMN=tv,r9.EXPAND_COLUMN=a,r9.SELECTION_ALL=ty,r9.SELECTION_INVERT=tb,r9.SELECTION_NONE=tx,r9.Column=function(e){return null},r9.ColumnGroup=function(e){return null},r9.Summary=F;var oe=r9},93192:function(e,t,n){"use strict";n.d(t,{default:function(){return ef}});var r=n(2265),o=n(9738),i=n(23639),a=n(1119),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},s=n(55015),c=r.forwardRef(function(e,t){return r.createElement(s.Z,(0,a.Z)({},e,{ref:t,icon:l}))}),u=n(36760),d=n.n(u),f=n(49211),p=n.n(f),h=n(31474),m=n(45287),g=n(27380),v=n(50506),y=n(18694),b=n(28791),x=n(10281),w=n(95814),k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let S={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},E=r.forwardRef((e,t)=>{let{style:n,noStyle:o,disabled:i}=e,a=k(e,["style","noStyle","disabled"]),l={};return o||(l=Object.assign({},S)),i&&(l.pointerEvents="none"),l=Object.assign(Object.assign({},l),n),r.createElement("div",Object.assign({role:"button",tabIndex:0,ref:t},a,{onKeyDown:e=>{let{keyCode:t}=e;t===w.Z.ENTER&&e.preventDefault()},onKeyUp:t=>{let{keyCode:n}=t,{onClick:r}=e;n===w.Z.ENTER&&r&&r()},style:l}))});var O=n(71744),C=n(55274),j=n(89970),_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},P=r.forwardRef(function(e,t){return r.createElement(s.Z,(0,a.Z)({},e,{ref:t,icon:_}))}),T=n(19722),M=n(90464),N=n(76122),A=n(80669),I=n(31373),R=n(352);let D=(e,t,n,r)=>{let{titleMarginBottom:o,fontWeightStrong:i}=r;return{marginBottom:o,color:n,fontWeight:i,fontSize:e,lineHeight:t}},L=e=>{let t={};return[1,2,3,4,5].forEach(n=>{t["\n h".concat(n,"&,\n div&-h").concat(n,",\n div&-h").concat(n," > textarea,\n h").concat(n,"\n ")]=D(e["fontSizeHeading".concat(n)],e["lineHeightHeading".concat(n)],e.colorTextHeading,e)}),t},z=e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},(0,N.N)(e)),{textDecoration:e.linkDecoration,"&:active, &:hover":{textDecoration:e.linkHoverDecoration},["&[disabled], &".concat(t,"-disabled")]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},Z=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:I.EV[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),B=e=>{let{componentCls:t,paddingSM:n}=e;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),marginTop:e.calc(n).mul(-1).equal(),marginBottom:"calc(1em - ".concat((0,R.bf)(n),")")},["".concat(t,"-edit-content-confirm")]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},F=e=>({["".concat(e.componentCls,"-copy-success")]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},["".concat(e.componentCls,"-copy-icon-only")]:{marginInlineStart:0}}),H=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),q=e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,["&".concat(t,"-secondary")]:{color:e.colorTextDescription},["&".concat(t,"-success")]:{color:e.colorSuccess},["&".concat(t,"-warning")]:{color:e.colorWarning},["&".concat(t,"-danger")]:{color:e.colorError,"a&:active, a&:focus":{color:e.colorErrorActive},"a&:hover":{color:e.colorErrorHover}},["&".concat(t,"-disabled")]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},L(e)),{["\n & + h1".concat(t,",\n & + h2").concat(t,",\n & + h3").concat(t,",\n & + h4").concat(t,",\n & + h5").concat(t,"\n ")]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),Z(e)),z(e)),{["\n ".concat(t,"-expand,\n ").concat(t,"-edit,\n ").concat(t,"-copy\n ")]:Object.assign(Object.assign({},(0,N.N)(e)),{marginInlineStart:e.marginXXS})}),B(e)),F(e)),H()),{"&-rtl":{direction:"rtl"}})}};var U=(0,A.I$)("Typography",e=>[q(e)],()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),W=e=>{let{prefixCls:t,"aria-label":n,className:o,style:i,direction:a,maxLength:l,autoSize:s=!0,value:c,onSave:u,onCancel:f,onEnd:p,component:h,enterIcon:m=r.createElement(P,null)}=e,g=r.useRef(null),v=r.useRef(!1),y=r.useRef(),[b,x]=r.useState(c);r.useEffect(()=>{x(c)},[c]),r.useEffect(()=>{if(g.current&&g.current.resizableTextArea){let{textArea:e}=g.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let k=()=>{u(b.trim())},S=h?"".concat(t,"-").concat(h):"",[E,O,C]=U(t),j=d()(t,"".concat(t,"-edit-content"),{["".concat(t,"-rtl")]:"rtl"===a},o,S,O,C);return E(r.createElement("div",{className:j,style:i},r.createElement(M.Z,{ref:g,maxLength:l,value:b,onChange:e=>{let{target:t}=e;x(t.value.replace(/[\n\r]/g,""))},onKeyDown:e=>{let{keyCode:t}=e;v.current||(y.current=t)},onKeyUp:e=>{let{keyCode:t,ctrlKey:n,altKey:r,metaKey:o,shiftKey:i}=e;y.current!==t||v.current||n||r||o||i||(t===w.Z.ENTER?(k(),null==p||p()):t===w.Z.ESC&&f())},onCompositionStart:()=>{v.current=!0},onCompositionEnd:()=>{v.current=!1},onBlur:()=>{k()},"aria-label":n,rows:1,autoSize:s}),null!==m?(0,T.Tm)(m,{className:"".concat(t,"-edit-content-confirm")}):null))};function K(e,t){return r.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&"object"==typeof e?e:null)]},[e])}var V=(e,t)=>{let n=r.useRef(!1);r.useEffect(()=>{n.current?e():n.current=!0},t)},$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let X=r.forwardRef((e,t)=>{let{prefixCls:n,component:o="article",className:i,rootClassName:a,setContentRef:l,children:s,direction:c,style:u}=e,f=$(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:p,direction:h,typography:m}=r.useContext(O.E_),g=t;l&&(g=(0,b.sQ)(t,l));let v=p("typography",n),[y,x,w]=U(v),k=d()(v,null==m?void 0:m.className,{["".concat(v,"-rtl")]:"rtl"===(null!=c?c:h)},i,a,x,w),S=Object.assign(Object.assign({},null==m?void 0:m.style),u);return y(r.createElement(o,Object.assign({className:k,style:S,ref:g},f),s))});function G(e){let t=typeof e;return"string"===t||"number"===t}function Y(e,t){let n=0,r=[];for(let o=0;ot){let e=t-n;return r.push(String(i).slice(0,e)),r}r.push(i),n=a}return e}var Q=e=>{let{enabledMeasure:t,children:n,text:o,width:i,fontSize:a,rows:l,onEllipsis:s}=e,[[c,u,d],f]=r.useState([0,0,0]),[p,h]=r.useState(0),[v,y]=r.useState(0),[b,x]=r.useState(0),w=r.useRef(null),k=r.useRef(null),S=r.useMemo(()=>(0,m.Z)(o),[o]),E=r.useMemo(()=>{let e;return e=0,S.forEach(t=>{G(t)?e+=String(t).length:e+=1}),e},[S]),O=r.useMemo(()=>t&&3===v?n(Y(S,u),u{t&&i&&a&&E&&(y(1),f([0,Math.ceil(E/2),E]))},[t,i,a,o,E,l]),(0,g.Z)(()=>{var e;1===v&&x((null===(e=w.current)||void 0===e?void 0:e.offsetHeight)||0)},[v]),(0,g.Z)(()=>{var e,t;if(b){if(1===v)((null===(e=k.current)||void 0===e?void 0:e.offsetHeight)||0)<=l*b?(y(4),s(!1)):y(2);else if(2===v){if(c!==d){let e=(null===(t=k.current)||void 0===t?void 0:t.offsetHeight)||0,n=l*b,r=c,o=d;c===d-1?o=c:e<=n?r=u:o=u;let i=Math.ceil((r+o)/2);f([r,i,o])}else y(3),h(u),s(!0)}}},[v,c,d,l,b]);let C=(e,t,n)=>r.createElement("span",{"aria-hidden":!0,ref:t,style:Object.assign({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none",fontSize:2*Math.ceil(a/2)},n)},e);return r.createElement(r.Fragment,null,O,t&&3!==v&&4!==v&&r.createElement(r.Fragment,null,C("lg",w,{wordBreak:"keep-all",whiteSpace:"nowrap"}),C(1===v?n(S,!1):n(Y(S,u),!0),k,{width:i,whiteSpace:"normal",margin:0,padding:0})))},J=e=>{let{enabledEllipsis:t,isEllipsis:n,children:o,tooltipProps:i}=e;return(null==i?void 0:i.title)&&t?r.createElement(j.Z,Object.assign({open:!!n&&void 0},i),o):o},ee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function et(e,t,n){return!0===e||void 0===e?t:e||n&&t}function en(e){return!1===e?[!1,!1]:Array.isArray(e)?e:[e]}let er=r.forwardRef((e,t)=>{var n,a,l;let{prefixCls:s,className:u,style:f,type:w,disabled:k,children:S,ellipsis:_,editable:P,copyable:T,component:M,title:N}=e,A=ee(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:I,direction:R}=r.useContext(O.E_),[D]=(0,C.Z)("Text"),L=r.useRef(null),z=r.useRef(null),Z=I("typography",s),B=(0,y.Z)(A,["mark","code","delete","underline","strong","keyboard","italic"]),[F,H]=K(P),[q,U]=(0,v.Z)(!1,{value:H.editing}),{triggerType:$=["icon"]}=H,G=e=>{var t;e&&(null===(t=H.onStart)||void 0===t||t.call(H)),U(e)};V(()=>{var e;q||null===(e=z.current)||void 0===e||e.focus()},[q]);let Y=e=>{null==e||e.preventDefault(),G(!0)},[er,eo]=K(T),[ei,ea]=r.useState(!1),el=r.useRef(null),es={};eo.format&&(es.format=eo.format);let ec=()=>{el.current&&clearTimeout(el.current)},eu=e=>{var t;null==e||e.preventDefault(),null==e||e.stopPropagation(),p()(eo.text||String(S)||"",es),ea(!0),ec(),el.current=setTimeout(()=>{ea(!1)},3e3),null===(t=eo.onCopy)||void 0===t||t.call(eo,e)};r.useEffect(()=>ec,[]);let[ed,ef]=r.useState(!1),[ep,eh]=r.useState(!1),[em,eg]=r.useState(!1),[ev,ey]=r.useState(!1),[eb,ex]=r.useState(!1),[ew,ek]=r.useState(!0),[eS,eE]=K(_,{expandable:!1}),eO=eS&&!em,{rows:eC=1}=eE,ej=r.useMemo(()=>!eO||void 0!==eE.suffix||eE.onEllipsis||eE.expandable||F||er,[eO,eE,F,er]);(0,g.Z)(()=>{eS&&!ej&&(ef((0,x.G)("webkitLineClamp")),eh((0,x.G)("textOverflow")))},[ej,eS]);let e_=r.useMemo(()=>!ej&&(1===eC?ep:ed),[ej,ep,ed]),eP=eO&&(e_?eb:ev),eT=eO&&1===eC&&e_,eM=eO&&eC>1&&e_,eN=e=>{var t;eg(!0),null===(t=eE.onExpand)||void 0===t||t.call(eE,e)},[eA,eI]=r.useState(0),[eR,eD]=r.useState(0),eL=e=>{var t;ey(e),ev!==e&&(null===(t=eE.onEllipsis)||void 0===t||t.call(eE,e))};r.useEffect(()=>{let e=L.current;if(eS&&e_&&e){let t=eM?e.offsetHeight{let e=L.current;if("undefined"==typeof IntersectionObserver||!e||!e_||!eO)return;let t=new IntersectionObserver(()=>{ek(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[e_,eO]);let ez={};ez=!0===eE.tooltip?{title:null!==(n=H.text)&&void 0!==n?n:S}:r.isValidElement(eE.tooltip)?{title:eE.tooltip}:"object"==typeof eE.tooltip?Object.assign({title:null!==(a=H.text)&&void 0!==a?a:S},eE.tooltip):{title:eE.tooltip};let eZ=r.useMemo(()=>{let e=e=>["string","number"].includes(typeof e);return!eS||e_?void 0:e(H.text)?H.text:e(S)?S:e(N)?N:e(ez.title)?ez.title:void 0},[eS,e_,N,ez.title,eP]);if(q)return r.createElement(W,{value:null!==(l=H.text)&&void 0!==l?l:"string"==typeof S?S:"",onSave:e=>{var t;null===(t=H.onChange)||void 0===t||t.call(H,e),G(!1)},onCancel:()=>{var e;null===(e=H.onCancel)||void 0===e||e.call(H),G(!1)},onEnd:H.onEnd,prefixCls:Z,className:u,style:f,direction:R,component:M,maxLength:H.maxLength,autoSize:H.autoSize,enterIcon:H.enterIcon});let eB=()=>{let e;let{expandable:t,symbol:n}=eE;return t?(e=n||(null==D?void 0:D.expand),r.createElement("a",{key:"expand",className:"".concat(Z,"-expand"),onClick:eN,"aria-label":null==D?void 0:D.expand},e)):null},eF=()=>{if(!F)return;let{icon:e,tooltip:t}=H,n=(0,m.Z)(t)[0]||(null==D?void 0:D.edit),o="string"==typeof n?n:"";return $.includes("icon")?r.createElement(j.Z,{key:"edit",title:!1===t?"":n},r.createElement(E,{ref:z,className:"".concat(Z,"-edit"),onClick:Y,"aria-label":o},e||r.createElement(c,{role:"button"}))):null},eH=()=>{if(!er)return null;let{tooltips:e,icon:t}=eo,n=en(e),a=en(t),l=ei?et(n[1],null==D?void 0:D.copied):et(n[0],null==D?void 0:D.copy),s=ei?null==D?void 0:D.copied:null==D?void 0:D.copy,c="string"==typeof l?l:s;return r.createElement(j.Z,{key:"copy",title:l},r.createElement(E,{className:d()("".concat(Z,"-copy"),{["".concat(Z,"-copy-success")]:ei,["".concat(Z,"-copy-icon-only")]:null==S}),onClick:eu,"aria-label":c},ei?et(a[1],r.createElement(o.Z,null),!0):et(a[0],r.createElement(i.Z,null),!0)))},eq=e=>[e&&eB(),eF(),eH()],eU=e=>[e&&r.createElement("span",{"aria-hidden":!0,key:"ellipsis"},"..."),eE.suffix,eq(e)];return r.createElement(h.Z,{onResize:(e,t)=>{var n;let{offsetWidth:r}=e;eI(r),eD(parseInt(null===(n=window.getComputedStyle)||void 0===n?void 0:n.call(window,t).fontSize,10)||0)},disabled:!eO},n=>r.createElement(J,{tooltipProps:ez,enabledEllipsis:eO,isEllipsis:eP},r.createElement(X,Object.assign({className:d()({["".concat(Z,"-").concat(w)]:w,["".concat(Z,"-disabled")]:k,["".concat(Z,"-ellipsis")]:eS,["".concat(Z,"-single-line")]:eO&&1===eC,["".concat(Z,"-ellipsis-single-line")]:eT,["".concat(Z,"-ellipsis-multiple-line")]:eM},u),prefixCls:s,style:Object.assign(Object.assign({},f),{WebkitLineClamp:eM?eC:void 0}),component:M,ref:(0,b.sQ)(n,L,t),direction:R,onClick:$.includes("text")?Y:void 0,"aria-label":null==eZ?void 0:eZ.toString(),title:N},B),r.createElement(Q,{enabledMeasure:eO&&!e_,text:S,rows:eC,width:eA,fontSize:eR,onEllipsis:eL},(t,n)=>{let o=t;return t.length&&n&&eZ&&(o=r.createElement("span",{key:"show-content","aria-hidden":!0},o)),function(e,t){let{mark:n,code:o,underline:i,delete:a,strong:l,keyboard:s,italic:c}=e,u=t;function d(e,t){t&&(u=r.createElement(e,{},u))}return d("strong",l),d("u",i),d("del",a),d("code",o),d("mark",n),d("kbd",s),d("i",c),u}(e,r.createElement(r.Fragment,null,o,eU(n)))}))))});var eo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ei=r.forwardRef((e,t)=>{var{ellipsis:n,rel:o}=e,i=eo(e,["ellipsis","rel"]);let a=Object.assign(Object.assign({},i),{rel:void 0===o&&"_blank"===i.target?"noopener noreferrer":o});return delete a.navigate,r.createElement(er,Object.assign({},a,{ref:t,ellipsis:!!n,component:"a"}))}),ea=r.forwardRef((e,t)=>r.createElement(er,Object.assign({ref:t},e,{component:"div"})));var el=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},es=r.forwardRef((e,t)=>{var{ellipsis:n}=e,o=el(e,["ellipsis"]);let i=r.useMemo(()=>n&&"object"==typeof n?(0,y.Z)(n,["expandable","rows"]):n,[n]);return r.createElement(er,Object.assign({ref:t},o,{ellipsis:i,component:"span"}))}),ec=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eu=[1,2,3,4,5],ed=r.forwardRef((e,t)=>{let n;let{level:o=1}=e,i=ec(e,["level"]);return n=eu.includes(o)?"h".concat(o):"h1",r.createElement(er,Object.assign({ref:t},i,{component:n}))});X.Text=es,X.Link=ei,X.Title=ed,X.Paragraph=ea;var ef=X},65319:function(e,t,n){"use strict";n.d(t,{default:function(){return eT}});var r=n(2265),o=n(83145),i=n(54887),a=n(36760),l=n.n(a),s=n(1119),c=n(76405),u=n(25049),d=n(63496),f=n(15354),p=n(15900),h=n(11993),m=n(31686),g=n(6989),v=n(73129),y=n(41154),b=n(54580),x=n(18242),w=n(32559),k=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=e.type||"",i=o.replace(/\/.*$/,"");return n.some(function(e){var t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if("."===t.charAt(0)){var n=r.toLowerCase(),a=t.toLowerCase(),l=[a];return(".jpg"===a||".jpeg"===a)&&(l=[".jpg",".jpeg"]),l.some(function(e){return n.endsWith(e)})}return/\/\*$/.test(t)?i===t.replace(/\/.*$/,""):o===t||!!/^\w+$/.test(t)&&((0,w.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(t,"'.Skip for check.")),!0)})}return!0};function S(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}var E=function(e,t,n){var r=function e(r,o){if(r){if(r.path=o||"",r.isFile)r.file(function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))});else if(r.isDirectory){var i,a,l;i=function(t){t.forEach(function(t){e(t,"".concat(o).concat(r.name,"/"))})},a=r.createReader(),l=[],function e(){a.readEntries(function(t){var n=Array.prototype.slice.apply(t);l=l.concat(n),n.length?e():i(l)})}()}}};e.forEach(function(e){r(e.webkitGetAsEntry())})},O=+new Date,C=0;function j(){return"rc-upload-".concat(O,"-").concat(++C)}var _=["component","prefixCls","className","classNames","disabled","id","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],P=function(e){(0,f.Z)(n,e);var t=(0,p.Z)(n);function n(){(0,c.Z)(this,n);for(var e,r,i=arguments.length,a=Array(i),l=0;l0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(t){var r=e.data[t];if(Array.isArray(r)){r.forEach(function(e){n.append("".concat(t,"[]"),e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){if(t.status<200||t.status>=300){var n;return e.onError(((n=Error("cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"))).status=t.status,n.method=e.method,n.url=e.action,n),S(t))}return e.onSuccess(S(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(e){null!==r[e]&&t.setRequestHeader(e,r[e])}),t.send(n),{abort:function(){t.abort()}}})({action:o,filename:c,data:n,file:i,headers:u,withCredentials:d,method:f||"post",onProgress:function(e){var n=t.props.onProgress;null==n||n(e,i)},onSuccess:function(e,n){var r=t.props.onSuccess;null==r||r(e,i,n),delete t.reqs[p]},onError:function(e,n){var r=t.props.onError;null==r||r(e,n,i),delete t.reqs[p]}})}}},{key:"reset",value:function(){this.setState({uid:j()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}},{key:"render",value:function(){var e,t=this.props,n=t.component,o=t.prefixCls,i=t.className,a=t.classNames,c=t.disabled,u=t.id,d=t.style,f=t.styles,p=t.multiple,v=t.accept,y=t.capture,b=t.children,w=t.directory,k=t.openFileDialogOnClick,S=t.onMouseEnter,E=t.onMouseLeave,O=t.hasControlInside,C=(0,g.Z)(t,_),j=l()((e={},(0,h.Z)(e,o,!0),(0,h.Z)(e,"".concat(o,"-disabled"),c),(0,h.Z)(e,i,i),e)),P=c?{}:{onClick:k?this.onClick:function(){},onKeyDown:k?this.onKeyDown:function(){},onMouseEnter:S,onMouseLeave:E,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:O?void 0:"0"};return r.createElement(n,(0,s.Z)({},P,{className:j,role:O?void 0:"button",style:d}),r.createElement("input",(0,s.Z)({},(0,x.Z)(C,{aria:!0,data:!0}),{id:u,disabled:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:(0,m.Z)({display:"none"},(void 0===f?{}:f).input),className:(void 0===a?{}:a).input,accept:v},w?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},{multiple:p,onChange:this.onChange},null!=y?{capture:y}:{})),b)}}]),n}(r.Component);function T(){}var M=function(e){(0,f.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,c.Z)(this,n);for(var r=arguments.length,o=Array(r),i=0;i{let{componentCls:t,iconCls:n}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-drag")]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:"".concat((0,F.bf)(e.lineWidth)," dashed ").concat(e.colorBorder),borderRadius:e.borderRadiusLG,cursor:"pointer",transition:"border-color ".concat(e.motionDurationSlow),[t]:{padding:e.padding},["".concat(t,"-btn")]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:"".concat((0,F.bf)(e.lineWidthFocus)," solid ").concat(e.colorPrimaryBorder)}},["".concat(t,"-drag-container")]:{display:"table-cell",verticalAlign:"middle"},["\n &:not(".concat(t,"-disabled):hover,\n &-hover:not(").concat(t,"-disabled)\n ")]:{borderColor:e.colorPrimaryHover},["p".concat(t,"-drag-icon")]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},["p".concat(t,"-text")]:{margin:"0 0 ".concat((0,F.bf)(e.marginXXS)),color:e.colorTextHeading,fontSize:e.fontSizeLG},["p".concat(t,"-hint")]:{color:e.colorTextDescription,fontSize:e.fontSize},["&".concat(t,"-disabled")]:{["p".concat(t,"-drag-icon ").concat(n,",\n p").concat(t,"-text,\n p").concat(t,"-hint\n ")]:{color:e.colorTextDisabled}}}}}},q=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSize:o,lineHeight:i,calc:a}=e,l="".concat(t,"-list-item"),s="".concat(l,"-actions"),c="".concat(l,"-action"),u=e.fontHeightSM;return{["".concat(t,"-wrapper")]:{["".concat(t,"-list")]:Object.assign(Object.assign({},(0,L.dF)()),{lineHeight:e.lineHeight,[l]:{position:"relative",height:a(e.lineHeight).mul(o).equal(),marginTop:e.marginXS,fontSize:o,display:"flex",alignItems:"center",transition:"background-color ".concat(e.motionDurationSlow),"&:hover":{backgroundColor:e.controlItemBgHover},["".concat(l,"-name")]:Object.assign(Object.assign({},L.vS),{padding:"0 ".concat((0,F.bf)(e.paddingXS)),lineHeight:i,flex:"auto",transition:"all ".concat(e.motionDurationSlow)}),[s]:{[c]:{opacity:0},[r]:{color:e.actionsColor,transition:"all ".concat(e.motionDurationSlow)},["\n ".concat(c,":focus-visible,\n &.picture ").concat(c,"\n ")]:{opacity:1},["".concat(c).concat(n,"-btn")]:{height:u,border:0,lineHeight:1}},["".concat(t,"-icon ").concat(r)]:{color:e.colorTextDescription,fontSize:o},["".concat(l,"-progress")]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:a(o).add(e.paddingXS).equal(),fontSize:o,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},["".concat(l,":hover ").concat(c)]:{opacity:1},["".concat(l,"-error")]:{color:e.colorError,["".concat(l,"-name, ").concat(t,"-icon ").concat(r)]:{color:e.colorError},[s]:{["".concat(r,", ").concat(r,":hover")]:{color:e.colorError},[c]:{opacity:1}}},["".concat(t,"-list-item-container")]:{transition:"opacity ".concat(e.motionDurationSlow,", height ").concat(e.motionDurationSlow),"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},U=n(11699);let W=new F.E4("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),K=new F.E4("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var V=e=>{let{componentCls:t}=e,n="".concat(t,"-animate-inline");return[{["".concat(t,"-wrapper")]:{["".concat(n,"-appear, ").concat(n,"-enter, ").concat(n,"-leave")]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},["".concat(n,"-appear, ").concat(n,"-enter")]:{animationName:W},["".concat(n,"-leave")]:{animationName:K}}},{["".concat(t,"-wrapper")]:(0,U.J$)(e)},W,K]},$=n(31373);let X=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:o,calc:i}=e,a="".concat(t,"-list"),l="".concat(a,"-item");return{["".concat(t,"-wrapper")]:{["\n ".concat(a).concat(a,"-picture,\n ").concat(a).concat(a,"-picture-card,\n ").concat(a).concat(a,"-picture-circle\n ")]:{[l]:{position:"relative",height:i(r).add(i(e.lineWidth).mul(2)).add(i(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:"".concat((0,F.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},["".concat(l,"-thumbnail")]:Object.assign(Object.assign({},L.vS),{width:r,height:r,lineHeight:(0,F.bf)(i(r).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),["".concat(l,"-progress")]:{bottom:o,width:"calc(100% - ".concat((0,F.bf)(i(e.paddingSM).mul(2).equal()),")"),marginTop:0,paddingInlineStart:i(r).add(e.paddingXS).equal()}},["".concat(l,"-error")]:{borderColor:e.colorError,["".concat(l,"-thumbnail ").concat(n)]:{["svg path[fill='".concat($.iN[0],"']")]:{fill:e.colorErrorBg},["svg path[fill='".concat($.iN.primary,"']")]:{fill:e.colorError}}},["".concat(l,"-uploading")]:{borderStyle:"dashed",["".concat(l,"-name")]:{marginBottom:o}}},["".concat(a).concat(a,"-picture-circle ").concat(l)]:{["&, &::before, ".concat(l,"-thumbnail")]:{borderRadius:"50%"}}}}},G=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:o,calc:i}=e,a="".concat(t,"-list"),l="".concat(a,"-item"),s=e.uploadPicCardSize;return{["\n ".concat(t,"-wrapper").concat(t,"-picture-card-wrapper,\n ").concat(t,"-wrapper").concat(t,"-picture-circle-wrapper\n ")]:Object.assign(Object.assign({},(0,L.dF)()),{display:"inline-block",width:"100%",["".concat(t).concat(t,"-select")]:{width:s,height:s,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:"".concat((0,F.bf)(e.lineWidth)," dashed ").concat(e.colorBorder),borderRadius:e.borderRadiusLG,cursor:"pointer",transition:"border-color ".concat(e.motionDurationSlow),["> ".concat(t)]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},["&:not(".concat(t,"-disabled):hover")]:{borderColor:e.colorPrimary}},["".concat(a).concat(a,"-picture-card, ").concat(a).concat(a,"-picture-circle")]:{["".concat(a,"-item-container")]:{display:"inline-block",width:s,height:s,marginBlock:"0 ".concat((0,F.bf)(e.marginXS)),marginInline:"0 ".concat((0,F.bf)(e.marginXS)),verticalAlign:"top"},"&::after":{display:"none"},[l]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:"calc(100% - ".concat((0,F.bf)(i(e.paddingXS).mul(2).equal()),")"),height:"calc(100% - ".concat((0,F.bf)(i(e.paddingXS).mul(2).equal()),")"),backgroundColor:e.colorBgMask,opacity:0,transition:"all ".concat(e.motionDurationSlow),content:'" "'}},["".concat(l,":hover")]:{["&::before, ".concat(l,"-actions")]:{opacity:1}},["".concat(l,"-actions")]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:"all ".concat(e.motionDurationSlow),["\n ".concat(n,"-eye,\n ").concat(n,"-download,\n ").concat(n,"-delete\n ")]:{zIndex:10,width:r,margin:"0 ".concat((0,F.bf)(e.marginXXS)),fontSize:r,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),color:o,"&:hover":{color:o},svg:{verticalAlign:"baseline"}}},["".concat(l,"-thumbnail, ").concat(l,"-thumbnail img")]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},["".concat(l,"-name")]:{display:"none",textAlign:"center"},["".concat(l,"-file + ").concat(l,"-name")]:{position:"absolute",bottom:e.margin,display:"block",width:"calc(100% - ".concat((0,F.bf)(i(e.paddingXS).mul(2).equal()),")")},["".concat(l,"-uploading")]:{["&".concat(l)]:{backgroundColor:e.colorFillAlter},["&::before, ".concat(n,"-eye, ").concat(n,"-download, ").concat(n,"-delete")]:{display:"none"}},["".concat(l,"-progress")]:{bottom:e.marginXL,width:"calc(100% - ".concat((0,F.bf)(i(e.paddingXS).mul(2).equal()),")"),paddingInlineStart:0}}}),["".concat(t,"-wrapper").concat(t,"-picture-circle-wrapper")]:{["".concat(t).concat(t,"-select")]:{borderRadius:"50%"}}}};var Y=e=>{let{componentCls:t}=e;return{["".concat(t,"-rtl")]:{direction:"rtl"}}};let Q=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},(0,L.Wf)(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},["".concat(t,"-select")]:{display:"inline-block"},["".concat(t,"-disabled")]:{color:n,cursor:"not-allowed"}})}};var J=(0,Z.I$)("Upload",e=>{let{fontSizeHeading3:t,fontHeight:n,lineWidth:r,controlHeightLG:o,calc:i}=e,a=(0,B.TS)(e,{uploadThumbnailSize:i(t).mul(2).equal(),uploadProgressOffset:i(i(n).div(2)).add(r).equal(),uploadPicCardSize:i(o).mul(2.55).equal()});return[Q(a),H(a),X(a),G(a),q(a),V(a),Y(a),(0,z.Z)(a)]},e=>({actionsColor:e.colorTextDescription})),ee={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:e}}]}},name:"file",theme:"twotone"},et=n(55015),en=r.forwardRef(function(e,t){return r.createElement(et.Z,(0,s.Z)({},e,{ref:t,icon:ee}))}),er=n(61935),eo=n(53508),ei={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:e}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:t}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:e}}]}},name:"picture",theme:"twotone"},ea=r.forwardRef(function(e,t){return r.createElement(et.Z,(0,s.Z)({},e,{ref:t,icon:ei}))}),el=n(47970),es=n(51646),ec=n(68710),eu=n(19722),ed=n(73002);function ef(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function ep(e,t){let n=(0,o.Z)(t),r=n.findIndex(t=>{let{uid:n}=t;return n===e.uid});return -1===r?n.push(e):n[r]=e,n}function eh(e,t){let n=void 0!==e.uid?"uid":"name";return t.filter(t=>t[n]===e[n])[0]}let em=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},eg=e=>0===e.indexOf("image/"),ev=e=>{if(e.type&&!e.thumbUrl)return eg(e.type);let t=e.thumbUrl||e.url||"",n=em(t);return!!(/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n))||!/^data:/.test(t)&&!n};function ey(e){return new Promise(t=>{if(!e.type||!eg(e.type)){t("");return}let n=document.createElement("canvas");n.width=200,n.height=200,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(200,"px; height: ").concat(200,"px; z-index: 9999; display: none;"),document.body.appendChild(n);let r=n.getContext("2d"),o=new Image;if(o.onload=()=>{let{width:e,height:i}=o,a=200,l=200,s=0,c=0;e>i?c=-((l=200/e*i)-a)/2:s=-((a=200/i*e)-l)/2,r.drawImage(o,s,c,a,l);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(o.src),t(u)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){let t=new FileReader;t.onload=()=>{t.result&&(o.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)})}var eb=n(26349),ex=n(73879),ew=n(6520),ek=n(68565),eS=n(89970);let eE=r.forwardRef((e,t)=>{var n,o;let{prefixCls:i,className:a,style:s,locale:c,listType:u,file:d,items:f,progress:p,iconRender:h,actionIconRender:m,itemRender:g,isImgUrl:v,showPreviewIcon:y,showRemoveIcon:b,showDownloadIcon:x,previewIcon:w,removeIcon:k,downloadIcon:S,onPreview:E,onDownload:O,onClose:C}=e,{status:j}=d,[_,P]=r.useState(j);r.useEffect(()=>{"removed"!==j&&P(j)},[j]);let[T,M]=r.useState(!1);r.useEffect(()=>{let e=setTimeout(()=>{M(!0)},300);return()=>{clearTimeout(e)}},[]);let N=h(d),I=r.createElement("div",{className:"".concat(i,"-icon")},N);if("picture"===u||"picture-card"===u||"picture-circle"===u){if("uploading"!==_&&(d.thumbUrl||d.url)){let e=(null==v?void 0:v(d))?r.createElement("img",{src:d.thumbUrl||d.url,alt:d.name,className:"".concat(i,"-list-item-image"),crossOrigin:d.crossOrigin}):N,t=l()("".concat(i,"-list-item-thumbnail"),{["".concat(i,"-list-item-file")]:v&&!v(d)});I=r.createElement("a",{className:t,onClick:e=>E(d,e),href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer"},e)}else{let e=l()("".concat(i,"-list-item-thumbnail"),{["".concat(i,"-list-item-file")]:"uploading"!==_});I=r.createElement("div",{className:e},N)}}let R=l()("".concat(i,"-list-item"),"".concat(i,"-list-item-").concat(_)),D="string"==typeof d.linkProps?JSON.parse(d.linkProps):d.linkProps,L=b?m(("function"==typeof k?k(d):k)||r.createElement(eb.Z,null),()=>C(d),i,c.removeFile,!0):null,z=x&&"done"===_?m(("function"==typeof S?S(d):S)||r.createElement(ex.Z,null),()=>O(d),i,c.downloadFile):null,Z="picture-card"!==u&&"picture-circle"!==u&&r.createElement("span",{key:"download-delete",className:l()("".concat(i,"-list-item-actions"),{picture:"picture"===u})},z,L),B=l()("".concat(i,"-list-item-name")),F=d.url?[r.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:B,title:d.name},D,{href:d.url,onClick:e=>E(d,e)}),d.name),Z]:[r.createElement("span",{key:"view",className:B,onClick:e=>E(d,e),title:d.name},d.name),Z],H=y&&(d.url||d.thumbUrl)?r.createElement("a",{href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>E(d,e),title:c.previewFile},"function"==typeof w?w(d):w||r.createElement(ew.Z,null)):null,q=("picture-card"===u||"picture-circle"===u)&&"uploading"!==_&&r.createElement("span",{className:"".concat(i,"-list-item-actions")},H,"done"===_&&z,L),{getPrefixCls:U}=r.useContext(A.E_),W=U(),K=r.createElement("div",{className:R},I,F,q,T&&r.createElement(el.ZP,{motionName:"".concat(W,"-fade"),visible:"uploading"===_,motionDeadline:2e3},e=>{let{className:t}=e,n="percent"in d?r.createElement(ek.Z,Object.assign({},p,{type:"line",percent:d.percent,"aria-label":d["aria-label"],"aria-labelledby":d["aria-labelledby"]})):null;return r.createElement("div",{className:l()("".concat(i,"-list-item-progress"),t)},n)})),V=d.response&&"string"==typeof d.response?d.response:(null===(n=d.error)||void 0===n?void 0:n.statusText)||(null===(o=d.error)||void 0===o?void 0:o.message)||c.uploadError,$="error"===_?r.createElement(eS.Z,{title:V,getPopupContainer:e=>e.parentNode},K):K;return r.createElement("div",{className:l()("".concat(i,"-list-item-container"),a),style:s,ref:t},g?g($,d,f,{download:O.bind(null,d),preview:E.bind(null,d),remove:C.bind(null,d)}):$)}),eO=r.forwardRef((e,t)=>{let{listType:n="text",previewFile:i=ey,onPreview:a,onDownload:s,onRemove:c,locale:u,iconRender:d,isImageUrl:f=ev,prefixCls:p,items:h=[],showPreviewIcon:m=!0,showRemoveIcon:g=!0,showDownloadIcon:v=!1,removeIcon:y,previewIcon:b,downloadIcon:x,progress:w={size:[-1,2],showInfo:!1},appendAction:k,appendActionVisible:S=!0,itemRender:E,disabled:O}=e,C=(0,es.Z)(),[j,_]=r.useState(!1);r.useEffect(()=>{("picture"===n||"picture-card"===n||"picture-circle"===n)&&(h||[]).forEach(e=>{"undefined"!=typeof document&&"undefined"!=typeof window&&window.FileReader&&window.File&&(e.originFileObj instanceof File||e.originFileObj instanceof Blob)&&void 0===e.thumbUrl&&(e.thumbUrl="",i&&i(e.originFileObj).then(t=>{e.thumbUrl=t||"",C()}))})},[n,h,i]),r.useEffect(()=>{_(!0)},[]);let P=(e,t)=>{if(a)return null==t||t.preventDefault(),a(e)},T=e=>{"function"==typeof s?s(e):e.url&&window.open(e.url)},M=e=>{null==c||c(e)},N=e=>{if(d)return d(e,n);let t="uploading"===e.status,o=f&&f(e)?r.createElement(ea,null):r.createElement(en,null),i=t?r.createElement(er.Z,null):r.createElement(eo.Z,null);return"picture"===n?i=t?r.createElement(er.Z,null):o:("picture-card"===n||"picture-circle"===n)&&(i=t?u.uploading:o),i},I=(e,t,n,o,i)=>{let a={type:"text",size:"small",title:o,onClick:n=>{t(),(0,eu.l$)(e)&&e.props.onClick&&e.props.onClick(n)},className:"".concat(n,"-list-item-action")};if(i&&(a.disabled=O),(0,eu.l$)(e)){let t=(0,eu.Tm)(e,Object.assign(Object.assign({},e.props),{onClick:()=>{}}));return r.createElement(ed.ZP,Object.assign({},a,{icon:t}))}return r.createElement(ed.ZP,Object.assign({},a),r.createElement("span",null,e))};r.useImperativeHandle(t,()=>({handlePreview:P,handleDownload:T}));let{getPrefixCls:R}=r.useContext(A.E_),D=R("upload",p),L=R(),z=l()("".concat(D,"-list"),"".concat(D,"-list-").concat(n)),Z=(0,o.Z)(h.map(e=>({key:e.uid,file:e}))),B={motionDeadline:2e3,motionName:"".concat(D,"-").concat("picture-card"===n||"picture-circle"===n?"animate-inline":"animate"),keys:Z,motionAppear:j},F=r.useMemo(()=>{let e=Object.assign({},(0,ec.Z)(L));return delete e.onAppearEnd,delete e.onEnterEnd,delete e.onLeaveEnd,e},[L]);return"picture-card"!==n&&"picture-circle"!==n&&(B=Object.assign(Object.assign({},F),B)),r.createElement("div",{className:z},r.createElement(el.V4,Object.assign({},B,{component:!1}),e=>{let{key:t,file:o,className:i,style:a}=e;return r.createElement(eE,{key:t,locale:u,prefixCls:D,className:i,style:a,file:o,items:h,progress:w,listType:n,isImgUrl:f,showPreviewIcon:m,showRemoveIcon:g,showDownloadIcon:v,removeIcon:y,previewIcon:b,downloadIcon:x,iconRender:N,actionIconRender:I,itemRender:E,onPreview:P,onDownload:T,onClose:M})}),k&&r.createElement(el.ZP,Object.assign({},B,{visible:S,forceRender:!0}),e=>{let{className:t,style:n}=e;return(0,eu.Tm)(k,e=>({className:l()(e.className,t),style:Object.assign(Object.assign(Object.assign({},n),{pointerEvents:t?"none":void 0}),e.style)}))}))}),eC="__LIST_IGNORE_".concat(Date.now(),"__"),ej=r.forwardRef((e,t)=>{let n;let{fileList:a,defaultFileList:s,onRemove:c,showUploadList:u=!0,listType:d="text",onPreview:f,onDownload:p,onChange:h,onDrop:m,previewFile:g,disabled:v,locale:y,iconRender:b,isImageUrl:x,progress:w,prefixCls:k,className:S,type:E="select",children:O,style:C,itemRender:j,maxCount:_,data:P={},multiple:T=!1,hasControlInside:L=!0,action:z="",accept:Z="",supportServerRender:B=!0,rootClassName:F}=e,H=r.useContext(I.Z),q=null!=v?v:H,[U,W]=(0,N.Z)(s||[],{value:a,postState:e=>null!=e?e:[]}),[K,V]=r.useState("drop"),$=r.useRef(null);r.useMemo(()=>{let e=Date.now();(a||[]).forEach((t,n)=>{t.uid||Object.isFrozen(t)||(t.uid="__AUTO__".concat(e,"_").concat(n,"__"))})},[a]);let X=(e,t,n)=>{let r=(0,o.Z)(t),a=!1;1===_?r=r.slice(-1):_&&(a=r.length>_,r=r.slice(0,_)),(0,i.flushSync)(()=>{W(r)});let l={file:e,fileList:r};n&&(l.event=n),(!a||r.some(t=>t.uid===e.uid))&&(0,i.flushSync)(()=>{null==h||h(l)})},G=e=>{let t=e.filter(e=>!e.file[eC]);if(!t.length)return;let n=t.map(e=>ef(e.file)),r=(0,o.Z)(U);n.forEach(e=>{r=ep(e,r)}),n.forEach((e,n)=>{let o=e;if(t[n].parsedFile)e.status="uploading";else{let t;let{originFileObj:n}=e;try{t=new File([n],n.name,{type:n.type})}catch(e){(t=new Blob([n],{type:n.type})).name=n.name,t.lastModifiedDate=new Date,t.lastModified=new Date().getTime()}t.uid=e.uid,o=t}X(o,r)})},Y=(e,t,n)=>{try{"string"==typeof e&&(e=JSON.parse(e))}catch(e){}if(!eh(t,U))return;let r=ef(t);r.status="done",r.percent=100,r.response=e,r.xhr=n;let o=ep(r,U);X(r,o)},Q=(e,t)=>{if(!eh(t,U))return;let n=ef(t);n.status="uploading",n.percent=e.percent;let r=ep(n,U);X(n,r,e)},ee=(e,t,n)=>{if(!eh(n,U))return;let r=ef(n);r.error=e,r.response=t,r.status="error";let o=ep(r,U);X(r,o)},et=e=>{let t;Promise.resolve("function"==typeof c?c(e):c).then(n=>{var r;if(!1===n)return;let o=function(e,t){let n=void 0!==e.uid?"uid":"name",r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}(e,U);o&&(t=Object.assign(Object.assign({},e),{status:"removed"}),null==U||U.forEach(e=>{let n=void 0!==t.uid?"uid":"name";e[n]!==t[n]||Object.isFrozen(e)||(e.status="removed")}),null===(r=$.current)||void 0===r||r.abort(t),X(t,o))})},en=e=>{V(e.type),"drop"===e.type&&(null==m||m(e))};r.useImperativeHandle(t,()=>({onBatchStart:G,onSuccess:Y,onProgress:Q,onError:ee,fileList:U,upload:$.current}));let{getPrefixCls:er,direction:eo,upload:ei}=r.useContext(A.E_),ea=er("upload",k),el=Object.assign(Object.assign({onBatchStart:G,onError:ee,onProgress:Q,onSuccess:Y},e),{data:P,multiple:T,action:z,accept:Z,supportServerRender:B,prefixCls:ea,disabled:q,beforeUpload:(t,n)=>{var r,o,i,a;return r=void 0,o=void 0,i=void 0,a=function*(){let{beforeUpload:r,transformFile:o}=e,i=t;if(r){let e=yield r(t,n);if(!1===e)return!1;if(delete t[eC],e===eC)return Object.defineProperty(t,eC,{value:!0,configurable:!0}),!1;"object"==typeof e&&e&&(i=e)}return o&&(i=yield o(i)),i},new(i||(i=Promise))(function(e,t){function n(e){try{s(a.next(e))}catch(e){t(e)}}function l(e){try{s(a.throw(e))}catch(e){t(e)}}function s(t){var r;t.done?e(t.value):((r=t.value)instanceof i?r:new i(function(e){e(r)})).then(n,l)}s((a=a.apply(r,o||[])).next())})},onChange:void 0,hasControlInside:L});delete el.className,delete el.style,(!O||q)&&delete el.id;let es="".concat(ea,"-wrapper"),[ec,eu,ed]=J(ea,es),[em]=(0,R.Z)("Upload",D.Z.Upload),{showRemoveIcon:eg,showPreviewIcon:ev,showDownloadIcon:ey,removeIcon:eb,previewIcon:ex,downloadIcon:ew}="boolean"==typeof u?{}:u,ek=void 0===eg?!q:!!eg,eS=(e,t)=>u?r.createElement(eO,{prefixCls:ea,listType:d,items:U,previewFile:g,onPreview:f,onDownload:p,onRemove:et,showRemoveIcon:ek,showPreviewIcon:ev,showDownloadIcon:ey,removeIcon:eb,previewIcon:ex,downloadIcon:ew,iconRender:b,locale:Object.assign(Object.assign({},em),y),isImageUrl:x,progress:w,appendAction:e,appendActionVisible:t,itemRender:j,disabled:q}):e,eE=l()(es,S,F,eu,ed,null==ei?void 0:ei.className,{["".concat(ea,"-rtl")]:"rtl"===eo,["".concat(ea,"-picture-card-wrapper")]:"picture-card"===d,["".concat(ea,"-picture-circle-wrapper")]:"picture-circle"===d}),ej=Object.assign(Object.assign({},null==ei?void 0:ei.style),C);if("drag"===E){let e=l()(eu,ea,"".concat(ea,"-drag"),{["".concat(ea,"-drag-uploading")]:U.some(e=>"uploading"===e.status),["".concat(ea,"-drag-hover")]:"dragover"===K,["".concat(ea,"-disabled")]:q,["".concat(ea,"-rtl")]:"rtl"===eo});return ec(r.createElement("span",{className:eE},r.createElement("div",{className:e,style:ej,onDrop:en,onDragOver:en,onDragLeave:en},r.createElement(M,Object.assign({},el,{ref:$,className:"".concat(ea,"-btn")}),r.createElement("div",{className:"".concat(ea,"-drag-container")},O))),eS()))}let e_=l()(ea,"".concat(ea,"-select"),{["".concat(ea,"-disabled")]:q}),eP=(n=O?void 0:{display:"none"},r.createElement("div",{className:e_,style:n},r.createElement(M,Object.assign({},el,{ref:$}))));return ec("picture-card"===d||"picture-circle"===d?r.createElement("span",{className:eE},eS(eP,!!O)):r.createElement("span",{className:eE},eP,eS()))});var e_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eP=r.forwardRef((e,t)=>{var{style:n,height:o,hasControlInside:i=!1}=e,a=e_(e,["style","height","hasControlInside"]);return r.createElement(ej,Object.assign({ref:t,hasControlInside:i},a,{type:"drag",style:Object.assign(Object.assign({},n),{height:o})}))});ej.Dragger=eP,ej.LIST_IGNORE=eC;var eT=ej},49211:function(e,t,n){"use strict";var r=n(99623),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,l,s,c,u,d,f=!1;t||(t={}),a=t.debug||!1;try{if(s=r(),c=document.createRange(),u=document.getSelection(),(d=document.createElement("span")).textContent=e,d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(n){if(n.stopPropagation(),t.format){if(n.preventDefault(),void 0===n.clipboardData){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=o[t.format]||o.default;window.clipboardData.setData(r,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e)}t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),c.selectNodeContents(d),u.addRange(c),!document.execCommand("copy"))throw Error("copy command was unsuccessful");f=!0}catch(r){a&&console.error("unable to copy using execCommand: ",r),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(r){a&&console.error("unable to copy using clipboardData: ",r),a&&console.error("falling back to prompt"),n="message"in t?t.message:"Copy to clipboard: #{key}, Enter",i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C",l=n.replace(/#{\s*key\s*}/g,i),window.prompt(l,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(c):u.removeAllRanges()),d&&document.body.removeChild(d),s()}return f}},7656:function(e,t,n){"use strict";function r(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}n.d(t,{Z:function(){return r}})},47869:function(e,t,n){"use strict";function r(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,{Z:function(){return r}})},7366:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(41154),o=n(25721),i=n(55463),a=n(99735),l=n(7656),s=n(47869);function c(e,t){if((0,l.Z)(2,arguments),!t||"object"!==(0,r.Z)(t))return new Date(NaN);var n=t.years?(0,s.Z)(t.years):0,c=t.months?(0,s.Z)(t.months):0,u=t.weeks?(0,s.Z)(t.weeks):0,d=t.days?(0,s.Z)(t.days):0,f=t.hours?(0,s.Z)(t.hours):0,p=t.minutes?(0,s.Z)(t.minutes):0,h=t.seconds?(0,s.Z)(t.seconds):0,m=(0,a.Z)(e),g=c||n?(0,i.Z)(m,c+12*n):m;return new Date((d||u?(0,o.Z)(g,d+7*u):g).getTime()+1e3*(h+60*(p+60*f)))}},25721:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(47869),o=n(99735),i=n(7656);function a(e,t){(0,i.Z)(2,arguments);var n=(0,o.Z)(e),a=(0,r.Z)(t);return isNaN(a)?new Date(NaN):(a&&n.setDate(n.getDate()+a),n)}},55463:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(47869),o=n(99735),i=n(7656);function a(e,t){(0,i.Z)(2,arguments);var n=(0,o.Z)(e),a=(0,r.Z)(t);if(isNaN(a))return new Date(NaN);if(!a)return n;var l=n.getDate(),s=new Date(n.getTime());return(s.setMonth(n.getMonth()+a+1,0),l>=s.getDate())?s:(n.setFullYear(s.getFullYear(),s.getMonth(),l),n)}},99735:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(41154),o=n(7656);function i(e){(0,o.Z)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,r.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}},61134:function(e,t,n){var r;!function(o){"use strict";var i,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},l=!0,s="[DecimalError] ",c=s+"Invalid argument: ",u=s+"Exponent out of range: ",d=Math.floor,f=Math.pow,p=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,h=d(1286742750677284.5),m={};function g(e,t){var n,r,o,i,a,s,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),l?C(t,f):t;if(c=e.d,u=t.d,a=e.e,o=t.e,c=c.slice(),i=a-o){for(i<0?(r=c,i=-i,s=u.length):(r=u,o=a,s=c.length),i>(s=(a=Math.ceil(f/7))>s?a+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=c.length)-(i=u.length)<0&&(i=s,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/1e7|0,c[i]%=1e7;for(n&&(c.unshift(n),++o),s=c.length;0==c[--s];)c.pop();return t.d=c,t.e=o,l?C(t,f):t}function v(e,t,n){if(e!==~~e||en)throw Error(c+e)}function y(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;te.e^this.s<0?1:-1;for(t=0,n=(r=this.d.length)<(o=e.d.length)?r:o;te.d[t]^this.s<0?1:-1;return r===o?0:r>o^this.s<0?1:-1},m.decimalPlaces=m.dp=function(){var e=this.d.length-1,t=(e-this.e)*7;if(e=this.d[e])for(;e%10==0;e/=10)t--;return t<0?0:t},m.dividedBy=m.div=function(e){return b(this,new this.constructor(e))},m.dividedToIntegerBy=m.idiv=function(e){var t=this.constructor;return C(b(this,new t(e),0,1),t.precision)},m.equals=m.eq=function(e){return!this.cmp(e)},m.exponent=function(){return w(this)},m.greaterThan=m.gt=function(e){return this.cmp(e)>0},m.greaterThanOrEqualTo=m.gte=function(e){return this.cmp(e)>=0},m.isInteger=m.isint=function(){return this.e>this.d.length-2},m.isNegative=m.isneg=function(){return this.s<0},m.isPositive=m.ispos=function(){return this.s>0},m.isZero=function(){return 0===this.s},m.lessThan=m.lt=function(e){return 0>this.cmp(e)},m.lessThanOrEqualTo=m.lte=function(e){return 1>this.cmp(e)},m.logarithm=m.log=function(e){var t,n=this.constructor,r=n.precision,o=r+5;if(void 0===e)e=new n(10);else if((e=new n(e)).s<1||e.eq(i))throw Error(s+"NaN");if(this.s<1)throw Error(s+(this.s?"NaN":"-Infinity"));return this.eq(i)?new n(0):(l=!1,t=b(E(this,o),E(e,o),o),l=!0,C(t,r))},m.minus=m.sub=function(e){return e=new this.constructor(e),this.s==e.s?j(this,e):g(this,(e.s=-e.s,e))},m.modulo=m.mod=function(e){var t,n=this.constructor,r=n.precision;if(!(e=new n(e)).s)throw Error(s+"NaN");return this.s?(l=!1,t=b(this,e,0,1).times(e),l=!0,this.minus(t)):C(new n(this),r)},m.naturalExponential=m.exp=function(){return x(this)},m.naturalLogarithm=m.ln=function(){return E(this)},m.negated=m.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},m.plus=m.add=function(e){return e=new this.constructor(e),this.s==e.s?g(this,e):j(this,(e.s=-e.s,e))},m.precision=m.sd=function(e){var t,n,r;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(c+e);if(t=w(this)+1,n=7*(r=this.d.length-1)+1,r=this.d[r]){for(;r%10==0;r/=10)n--;for(r=this.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},m.squareRoot=m.sqrt=function(){var e,t,n,r,o,i,a,c=this.constructor;if(this.s<1){if(!this.s)return new c(0);throw Error(s+"NaN")}for(e=w(this),l=!1,0==(o=Math.sqrt(+this))||o==1/0?(((t=y(this.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),r=new c(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new c(o.toString()),o=a=(n=c.precision)+3;;)if(r=(i=r).plus(b(this,i,a+2)).times(.5),y(i.d).slice(0,a)===(t=y(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&"4999"==t){if(C(i,n+1,0),i.times(i).eq(this)){r=i;break}}else if("9999"!=t)break;a+=4}return l=!0,C(r,n)},m.times=m.mul=function(e){var t,n,r,o,i,a,s,c,u,d=this.constructor,f=this.d,p=(e=new d(e)).d;if(!this.s||!e.s)return new d(0);for(e.s*=this.s,n=this.e+e.e,(c=f.length)<(u=p.length)&&(i=f,f=p,p=i,a=c,c=u,u=a),i=[],r=a=c+u;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,o=c+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%1e7|0,t=s/1e7|0;i[o]=(i[o]+t)%1e7|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,l?C(e,d.precision):e},m.toDecimalPlaces=m.todp=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(v(e,0,1e9),void 0===t?t=r.rounding:v(t,0,8),C(n,e+w(n)+1,t))},m.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=_(r,!0):(v(e,0,1e9),void 0===t?t=o.rounding:v(t,0,8),n=_(r=C(new o(r),e+1,t),!0,e+1)),n},m.toFixed=function(e,t){var n,r,o=this.constructor;return void 0===e?_(this):(v(e,0,1e9),void 0===t?t=o.rounding:v(t,0,8),n=_((r=C(new o(this),e+w(this)+1,t)).abs(),!1,e+w(r)+1),this.isneg()&&!this.isZero()?"-"+n:n)},m.toInteger=m.toint=function(){var e=this.constructor;return C(new e(this),w(this)+1,e.rounding)},m.toNumber=function(){return+this},m.toPower=m.pow=function(e){var t,n,r,o,a,c,u=this,f=u.constructor,p=+(e=new f(e));if(!e.s)return new f(i);if(!(u=new f(u)).s){if(e.s<1)throw Error(s+"Infinity");return u}if(u.eq(i))return u;if(r=f.precision,e.eq(i))return C(u,r);if(c=(t=e.e)>=(n=e.d.length-1),a=u.s,c){if((n=p<0?-p:p)<=9007199254740991){for(o=new f(i),t=Math.ceil(r/7+4),l=!1;n%2&&P((o=o.times(u)).d,t),0!==(n=d(n/2));)P((u=u.times(u)).d,t);return l=!0,e.s<0?new f(i).div(o):C(o,r)}}else if(a<0)throw Error(s+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,u.s=1,l=!1,o=e.times(E(u,r+12)),l=!0,(o=x(o)).s=a,o},m.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?(n=w(o),r=_(o,n<=i.toExpNeg||n>=i.toExpPos)):(v(e,1,1e9),void 0===t?t=i.rounding:v(t,0,8),n=w(o=C(new i(o),e,t)),r=_(o,e<=n||n<=i.toExpNeg,e)),r},m.toSignificantDigits=m.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(v(e,1,1e9),void 0===t?t=n.rounding:v(t,0,8)),C(new n(this),e,t)},m.toString=m.valueOf=m.val=m.toJSON=function(){var e=w(this),t=this.constructor;return _(this,e<=t.toExpNeg||e>=t.toExpPos)};var b=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%1e7|0,r=n/1e7|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;ot[o]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]1;)e.shift()}return function(r,o,i,a){var l,c,u,d,f,p,h,m,g,v,y,b,x,k,S,E,O,j,_=r.constructor,P=r.s==o.s?1:-1,T=r.d,M=o.d;if(!r.s)return new _(r);if(!o.s)throw Error(s+"Division by zero");for(u=0,c=r.e-o.e,O=M.length,S=T.length,m=(h=new _(P)).d=[];M[u]==(T[u]||0);)++u;if(M[u]>(T[u]||0)&&--c,(b=null==i?i=_.precision:a?i+(w(r)-w(o))+1:i)<0)return new _(0);if(b=b/7+2|0,u=0,1==O)for(d=0,M=M[0],b++;(u1&&(M=e(M,d),T=e(T,d),O=M.length,S=T.length),k=O,v=(g=T.slice(0,O)).length;v=1e7/2&&++E;do d=0,(l=t(M,g,O,v))<0?(y=g[0],O!=v&&(y=1e7*y+(g[1]||0)),(d=y/E|0)>1?(d>=1e7&&(d=1e7-1),p=(f=e(M,d)).length,v=g.length,1==(l=t(f,g,p,v))&&(d--,n(f,O16)throw Error(u+w(e));if(!e.s)return new p(i);for(null==t?(l=!1,s=h):s=t,a=new p(.03125);e.abs().gte(.1);)e=e.times(a),d+=5;for(s+=Math.log(f(2,d))/Math.LN10*2+5|0,n=r=o=new p(i),p.precision=s;;){if(r=C(r.times(e),s),n=n.times(++c),y((a=o.plus(b(r,n,s))).d).slice(0,s)===y(o.d).slice(0,s)){for(;d--;)o=C(o.times(o),s);return p.precision=h,null==t?(l=!0,C(o,h)):o}o=a}}function w(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function k(e,t,n){if(t>e.LN10.sd())throw l=!0,n&&(e.precision=n),Error(s+"LN10 precision limit exceeded");return C(new e(e.LN10),t)}function S(e){for(var t="";e--;)t+="0";return t}function E(e,t){var n,r,o,a,c,u,d,f,p,h=1,m=e,g=m.d,v=m.constructor,x=v.precision;if(m.s<1)throw Error(s+(m.s?"NaN":"-Infinity"));if(m.eq(i))return new v(0);if(null==t?(l=!1,f=x):f=t,m.eq(10))return null==t&&(l=!0),k(v,f);if(f+=10,v.precision=f,r=(n=y(g)).charAt(0),!(15e14>Math.abs(a=w(m))))return d=k(v,f+2,x).times(a+""),m=E(new v(r+"."+n.slice(1)),f-10).plus(d),v.precision=x,null==t?(l=!0,C(m,x)):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=y((m=m.times(e)).d)).charAt(0),h++;for(a=w(m),r>1?(m=new v("0."+n),a++):m=new v(r+"."+n.slice(1)),u=c=m=b(m.minus(i),m.plus(i),f),p=C(m.times(m),f),o=3;;){if(c=C(c.times(p),f),y((d=u.plus(b(c,new v(o),f))).d).slice(0,f)===y(u.d).slice(0,f))return u=u.times(2),0!==a&&(u=u.plus(k(v,f+2,x).times(a+""))),u=b(u,new v(h),f),v.precision=x,null==t?(l=!0,C(u,x)):u;u=d,o+=2}}function O(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=d(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),rh||e.e<-h))throw Error(u+n)}else e.s=0,e.e=0,e.d=[0];return e}function C(e,t,n){var r,o,i,a,s,c,p,m,g=e.d;for(a=1,i=g[0];i>=10;i/=10)a++;if((r=t-a)<0)r+=7,o=t,p=g[m=0];else{if((m=Math.ceil((r+1)/7))>=(i=g.length))return e;for(a=1,p=i=g[m];i>=10;i/=10)a++;r%=7,o=r-7+a}if(void 0!==n&&(s=p/(i=f(10,a-o-1))%10|0,c=t<0||void 0!==g[m+1]||p%i,c=n<4?(s||c)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||c||6==n&&(r>0?o>0?p/f(10,a-o):0:g[m-1])%10&1||n==(e.s<0?8:7))),t<1||!g[0])return c?(i=w(e),g.length=1,t=t-i-1,g[0]=f(10,(7-t%7)%7),e.e=d(-t/7)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(0==r?(g.length=m,i=1,m--):(g.length=m+1,i=f(10,7-r),g[m]=o>0?(p/f(10,a-o)%f(10,o)|0)*i:0),c)for(;;){if(0==m){1e7==(g[0]+=i)&&(g[0]=1,++e.e);break}if(g[m]+=i,1e7!=g[m])break;g[m--]=0,i=1}for(r=g.length;0===g[--r];)g.pop();if(l&&(e.e>h||e.e<-h))throw Error(u+w(e));return e}function j(e,t){var n,r,o,i,a,s,c,u,d,f,p=e.constructor,h=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),l?C(t,h):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),a=u-r){for((d=a<0)?(n=c,a=-a,s=f.length):(n=f,r=u,s=c.length),a>(o=Math.max(Math.ceil(h/7),s)+2)&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for((d=(o=c.length)<(s=f.length))&&(s=o),o=0;o0;--o)c[s++]=0;for(o=f.length;o>a;){if(c[--o]0?i=i.charAt(0)+"."+i.slice(1)+S(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+S(-o-1)+i,n&&(r=n-a)>0&&(i+=S(r))):o>=a?(i+=S(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+S(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=S(r))),e.s<0?"-"+i:i}function P(e,t){if(e.length>t)return e.length=t,!0}function T(e){if(!e||"object"!=typeof e)throw Error(s+"Object expected");var t,n,r,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(c+n+": "+r)}if(void 0!==(r=e[n="LN10"])){if(r==Math.LN10)this[n]=new this(r);else throw Error(c+n+": "+r)}return this}(a=function e(t){var n,r,o;function i(e){if(!(this instanceof i))return new i(e);if(this.constructor=i,e instanceof i){this.s=e.s,this.e=e.e,this.d=(e=e.d)?e.slice():e;return}if("number"==typeof e){if(0*e!=0)throw Error(c+e);if(e>0)this.s=1;else if(e<0)e=-e,this.s=-1;else{this.s=0,this.e=0,this.d=[0];return}if(e===~~e&&e<1e7){this.e=0,this.d=[e];return}return O(this,e.toString())}if("string"!=typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),this.s=-1):this.s=1,p.test(e))O(this,e);else throw Error(c+e)}if(i.prototype=m,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=T,void 0===t&&(t={}),t)for(n=0,o=["precision","rounding","toExpNeg","toExpPos","LN10"];n-1}},56883:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r0&&i(u)?n>1?e(u,n-1,i,a,l):r(l,u):a||(l[l.length]=u)}return l}},63321:function(e,t,n){var r=n(33023)();e.exports=r},98060:function(e,t,n){var r=n(63321),o=n(43228);e.exports=function(e,t){return e&&r(e,t,o)}},92167:function(e,t,n){var r=n(67906),o=n(70235);e.exports=function(e,t){t=r(t,e);for(var n=0,i=t.length;null!=e&&nt}},93012:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},47909:function(e,t,n){var r=n(8235),o=n(31953),i=n(35281);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},90370:function(e,t,n){var r=n(54506),o=n(10303);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},56318:function(e,t,n){var r=n(6791),o=n(10303);e.exports=function e(t,n,i,a,l){return t===n||(null!=t&&null!=n&&(o(t)||o(n))?r(t,n,i,a,e,l):t!=t&&n!=n)}},6791:function(e,t,n){var r=n(85885),o=n(97638),i=n(88030),a=n(64974),l=n(81690),s=n(25614),c=n(98051),u=n(9792),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,v){var y=s(e),b=s(t),x=y?f:l(e),w=b?f:l(t);x=x==d?p:x,w=w==d?p:w;var k=x==p,S=w==p,E=x==w;if(E&&c(e)){if(!c(t))return!1;y=!0,k=!1}if(E&&!k)return v||(v=new r),y||u(e)?o(e,t,n,m,g,v):i(e,t,x,n,m,g,v);if(!(1&n)){var O=k&&h.call(e,"__wrapped__"),C=S&&h.call(t,"__wrapped__");if(O||C){var j=O?e.value():e,_=C?t.value():t;return v||(v=new r),g(j,_,n,m,v)}}return!!E&&(v||(v=new r),a(e,t,n,m,g,v))}},62538:function(e,t,n){var r=n(85885),o=n(56318);e.exports=function(e,t,n,i){var a=n.length,l=a,s=!i;if(null==e)return!l;for(e=Object(e);a--;){var c=n[a];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++ao?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=200){var m=t?null:l(e);if(m)return s(m);f=!1,u=a,h=new r}else h=t?[]:p;e:for(;++c=o?e:r(e,t,n)}},1536:function(e,t,n){var r=n(78371);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e==e,a=r(e),l=void 0!==t,s=null===t,c=t==t,u=r(t);if(!s&&!u&&!a&&e>t||a&&l&&c&&!s&&!u||o&&l&&c||!n&&c||!i)return 1;if(!o&&!a&&!u&&e=s)return c;return c*("desc"==n[o]?-1:1)}}return e.index-t.index}},92077:function(e,t,n){var r=n(74288)["__core-js_shared__"];e.exports=r},97930:function(e,t,n){var r=n(5629);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,l=Object(n);(t?a--:++a-1?l[s?t[c]:c]:void 0}}},35464:function(e,t,n){var r=n(19608),o=n(49639),i=n(175);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&o(t,n,a)&&(n=a=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),a=void 0===a?tu))return!1;var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var h=-1,m=!0,g=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e-1}},13368:function(e,t,n){var r=n(24457);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},38764:function(e,t,n){var r=n(9855),o=n(99078),i=n(88675);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},78615:function(e,t,n){var r=n(1507);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},83391:function(e,t,n){var r=n(1507);e.exports=function(e){return r(this,e).get(e)}},53483:function(e,t,n){var r=n(1507);e.exports=function(e){return r(this,e).has(e)}},74724:function(e,t,n){var r=n(1507);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},22523:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},47073:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},23787:function(e,t,n){var r=n(50967);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},20453:function(e,t,n){var r=n(39866)(Object,"create");e.exports=r},77184:function(e,t,n){var r=n(45070)(Object.keys,Object);e.exports=r},39931:function(e,t,n){e=n.nmd(e);var r=n(17071),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,l=function(){try{var e=i&&i.require&&i.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l},80910:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},45070:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},49478:function(e,t,n){var r=n(60493),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,l=o(i.length-t,0),s=Array(l);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},84092:function(e,t,n){var r=n(99078);e.exports=function(){this.__data__=new r,this.size=0}},31663:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},69135:function(e){e.exports=function(e){return this.__data__.get(e)}},39552:function(e){e.exports=function(e){return this.__data__.has(e)}},8381:function(e,t,n){var r=n(99078),o=n(88675),i=n(76219);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},35281:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r=t||n<0||g&&r>=u}function x(){var e,n,r,i=o();if(b(i))return w(i);f=setTimeout(x,(e=i-p,n=i-h,r=t-e,g?l(r,u-n):r))}function w(e){return(f=void 0,v&&s)?y(e):(s=c=void 0,d)}function k(){var e,n=o(),r=b(n);if(s=arguments,c=this,p=n,r){if(void 0===f)return h=e=p,f=setTimeout(x,t),m?y(e):d;if(g)return clearTimeout(f),f=setTimeout(x,t),y(p)}return void 0===f&&(f=setTimeout(x,t)),d}return t=i(t)||0,r(n)&&(m=!!n.leading,u=(g="maxWait"in n)?a(i(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=p=c=f=void 0},k.flush=function(){return void 0===f?d:w(o())},k}},37560:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},32242:function(e,t,n){var r=n(78897),o=n(28935),i=n(88157),a=n(25614),l=n(49639);e.exports=function(e,t,n){var s=a(e)?r:o;return n&&l(e,t,n)&&(t=void 0),s(e,i(t,3))}},84173:function(e,t,n){var r=n(82602)(n(12152));e.exports=r},12152:function(e,t,n){var r=n(8235),o=n(88157),i=n(85759),a=Math.max;e.exports=function(e,t,n){var l=null==e?0:e.length;if(!l)return -1;var s=null==n?0:i(n);return s<0&&(s=a(l+s,0)),r(e,o(t,3),s)}},11314:function(e,t,n){var r=n(72569),o=n(89238);e.exports=function(e,t){return r(o(e,t),1)}},13735:function(e,t,n){var r=n(92167);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},17764:function(e,t,n){var r=n(93012),o=n(59592);e.exports=function(e,t){return null!=e&&o(e,t,r)}},79586:function(e){e.exports=function(e){return e}},56569:function(e,t,n){var r=n(90370),o=n(10303),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=s},25614:function(e){var t=Array.isArray;e.exports=t},5629:function(e,t,n){var r=n(86757),o=n(13973);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},24342:function(e,t,n){var r=n(54506),o=n(10303);e.exports=function(e){return!0===e||!1===e||o(e)&&"[object Boolean]"==r(e)}},98051:function(e,t,n){e=n.nmd(e);var r=n(74288),o=n(7406),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,l=a&&a.exports===i?r.Buffer:void 0,s=l?l.isBuffer:void 0;e.exports=s||o},21652:function(e,t,n){var r=n(56318);e.exports=function(e,t){return r(e,t)}},86757:function(e,t,n){var r=n(54506),o=n(28302);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},13973:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},82559:function(e,t,n){var r=n(22345);e.exports=function(e){return r(e)&&e!=+e}},77571:function(e){e.exports=function(e){return null==e}},22345:function(e,t,n){var r=n(54506),o=n(10303);e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==r(e)}},28302:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},10303:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},90231:function(e,t,n){var r=n(54506),o=n(62602),i=n(10303),a=Object.prototype,l=Function.prototype.toString,s=a.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=s.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},42715:function(e,t,n){var r=n(54506),o=n(25614),i=n(10303);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},78371:function(e,t,n){var r=n(54506),o=n(10303);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},9792:function(e,t,n){var r=n(59332),o=n(23305),i=n(39931),a=i&&i.isTypedArray,l=a?o(a):r;e.exports=l},43228:function(e,t,n){var r=n(28579),o=n(4578),i=n(5629);e.exports=function(e){return i(e)?r(e):o(e)}},86185:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},89238:function(e,t,n){var r=n(73819),o=n(88157),i=n(24240),a=n(25614);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},41443:function(e,t,n){var r=n(83023),o=n(98060),i=n(88157);e.exports=function(e,t){var n={};return t=i(t,3),o(e,function(e,o,i){r(n,o,t(e,o,i))}),n}},95645:function(e,t,n){var r=n(67646),o=n(58905),i=n(79586);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},35802:function(e,t,n){var r=n(67646),o=n(58905),i=n(88157);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},50967:function(e,t,n){var r=n(76219);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},99008:function(e,t,n){var r=n(67646),o=n(20121),i=n(79586);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},37891:function(e,t,n){var r=n(67646),o=n(88157),i=n(20121);e.exports=function(e,t){return e&&e.length?r(e,o(t,2),i):void 0}},93810:function(e){e.exports=function(){}},11121:function(e,t,n){var r=n(74288);e.exports=function(){return r.Date.now()}},22350:function(e,t,n){var r=n(18155),o=n(73584),i=n(67352),a=n(70235);e.exports=function(e){return i(e)?r(a(e)):o(e)}},99676:function(e,t,n){var r=n(35464)();e.exports=r},33645:function(e,t,n){var r=n(25253),o=n(88157),i=n(12327),a=n(25614),l=n(49639);e.exports=function(e,t,n){var s=a(e)?r:i;return n&&l(e,t,n)&&(t=void 0),s(e,o(t,3))}},34935:function(e,t,n){var r=n(72569),o=n(84046),i=n(44843),a=n(49639),l=i(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])});e.exports=l},55716:function(e){e.exports=function(){return[]}},7406:function(e){e.exports=function(){return!1}},37065:function(e,t,n){var r=n(7310),o=n(28302);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},175:function(e,t,n){var r=n(6660),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},85759:function(e,t,n){var r=n(175);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},6660:function(e,t,n){var r=n(41087),o=n(28302),i=n(78371),a=0/0,l=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):l.test(e)?a:+e}},3641:function(e,t,n){var r=n(65020);e.exports=function(e){return null==e?"":r(e)}},47230:function(e,t,n){var r=n(88157),o=n(13826);e.exports=function(e,t){return e&&e.length?o(e,r(t,2)):[]}},75551:function(e,t,n){var r=n(80675)("toUpperCase");e.exports=r},30401:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},40875:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},22135:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},64935:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]])},96362:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},87769:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},42208:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},29202:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},54001:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]])},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},21047:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},96137:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},80221:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},70525:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])},76865:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},49663:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},95805:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},32489:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},11239:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},24601:function(){},15452:function(e,t){var n,r,o;r=[],void 0!==(o="function"==typeof(n=function e(){var t,n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:{},r=!n.document&&!!n.postMessage,o=n.IS_PAPA_WORKER||!1,i={},a=0,l={};function s(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,o)n.postMessage({results:i,workerId:l.WORKER_ID,finished:r});else if(w(this._config.chunk)&&!t){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=i=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!r||!w(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):o&&this._config.error&&n.postMessage({workerId:l.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=l.RemoteChunkSize),s.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e,n,o=this._config.downloadRequestHeaders;for(n in o)t.setRequestHeader(n,o[n])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function u(e){(e=e||{}).chunkSize||(e.chunkSize=l.LocalChunkSize),s.call(this,e);var t,n,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;s.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,n;if(!this._finished)return t=(e=this._config.chunkSize)?(n=t.substring(0,e),t.substring(e)):(n=t,""),this._finished=!t,this.parseChunk(n)}}function f(e){s.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){s.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){s.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=x(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=x(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=x(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=x(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function p(e){var t,n,r,o,i=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,s=this,c=0,u=0,d=!1,f=!1,p=[],g={data:[],errors:[],meta:{}};function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function y(){if(g&&r&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+l.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!v(e)})),x()){if(g){if(Array.isArray(g.data[0])){for(var t,n=0;x()&&n=p.length?"__parsed_extra":p[o]:l,c=s=e.transform?e.transform(s,l):s,(e.dynamicTypingFunction&&void 0===e.dynamicTyping[n]&&(e.dynamicTyping[n]=e.dynamicTypingFunction(n)),!0===(e.dynamicTyping[n]||e.dynamicTyping))?"true"===c||"TRUE"===c||"false"!==c&&"FALSE"!==c&&((e=>{if(i.test(e)&&-9007199254740992<(e=parseFloat(e))&&e<9007199254740992)return 1})(c)?parseFloat(c):a.test(c)?new Date(c):""===c?null:c):c);"__parsed_extra"===l?(r[l]=r[l]||[],r[l].push(s)):r[l]=s}return e.header&&(o>p.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+o,u+n):oe.preview?n.abort():(g.data=g.data[0],o(g,s))))}),this.parse=function(o,i,a){var s=e.quoteChar||'"',s=(e.newline||(e.newline=this.guessLineEndings(o,s)),r=!1,e.delimiter?w(e.delimiter)&&(e.delimiter=e.delimiter(o),g.meta.delimiter=e.delimiter):((s=((t,n,r,o,i)=>{var a,s,c,u;i=i||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var d=0;d=n.length/2?"\r\n":"\r"}}function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,n=e.newline,r=e.comments,o=e.step,i=e.preview,a=e.fastMode,s=null,c=!1,u=null==e.quoteChar?'"':e.quoteChar,d=u;if(void 0!==e.escapeChar&&(d=e.escapeChar),("string"!=typeof t||-1=i)return z(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:S.length,index:f}),N++}}else if(r&&0===O.length&&l.substring(f,f+x)===r){if(-1===T)return z();f=T+b,T=l.indexOf(n,f),P=l.indexOf(t,f)}else if(-1!==P&&(P=i)return z(!0)}return D();function I(e){S.push(e),C=f}function R(e){return -1!==e&&(e=l.substring(N+1,e))&&""===e.trim()?e.length:0}function D(e){return g||(void 0===e&&(e=l.substring(f)),O.push(e),f=v,I(O),k&&Z()),z()}function L(e){f=e,I(O),O=[],T=l.indexOf(n,f)}function z(r){if(e.header&&!m&&S.length&&!c){var o=S[0],i={},a=new Set(o);let t=!1;for(let n=0;n{if("object"==typeof t){if("string"!=typeof t.delimiter||l.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(i=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(s=t.escapeChar+a),t.escapeFormulae instanceof RegExp?d=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(d=/^[=+\-@\t\r].*$/)}})(),RegExp(h(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,c);if("object"==typeof e[0])return p(u||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],c);throw Error("Unable to serialize unrecognized input");function p(e,t,n){var a="",l=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),r=o.default.Children.only(t);return o.default.cloneElement(r,c(c({},n),{},{onClick:this.onClick}))}}],function(e,t){for(var n=0;n0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function y(e,t){return p(e.getTime(),t.getTime())}function b(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.entries(),l=0;(r=a.next())&&!r.done;){for(var s=t.entries(),c=!1,u=0;(o=s.next())&&!o.done;){var d=r.value,f=d[0],p=d[1],h=o.value,m=h[0],g=h[1];!c&&!i[u]&&(c=n.equals(f,m,l,u,e,t,n)&&n.equals(p,g,f,m,e,t,n))&&(i[u]=!0),u++}if(!c)return!1;l++}return!0}function x(e,t,n){var r,o=g(e),i=o.length;if(g(t).length!==i)return!1;for(;i-- >0;)if((r=o[i])===h&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!f(t,r)||!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function w(e,t,n){var r,o,i,a=d(e),l=a.length;if(d(t).length!==l)return!1;for(;l-- >0;)if((r=a[l])===h&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!f(t,r)||!n.equals(e[r],t[r],r,r,e,t,n)||(o=m(e,r),i=m(t,r),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable)))return!1;return!0}function k(e,t){return p(e.valueOf(),t.valueOf())}function S(e,t){return e.source===t.source&&e.flags===t.flags}function E(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.values();(r=a.next())&&!r.done;){for(var l=t.values(),s=!1,c=0;(o=l.next())&&!o.done;)!s&&!i[c]&&(s=n.equals(r.value,o.value,r.value,o.value,e,t,n))&&(i[c]=!0),c++;if(!s)return!1}return!0}function O(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var C=Array.isArray,j="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,_=Object.assign,P=Object.prototype.toString.call.bind(Object.prototype.toString),T=M();function M(e){void 0===e&&(e={});var t,n,r,o,i,a,l,s,d,f=e.circular,p=e.createInternalComparator,h=e.createState,m=e.strict,g=(n=(t=function(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?w:v,areDatesEqual:y,areMapsEqual:r?c(b,w):b,areObjectsEqual:r?w:x,arePrimitiveWrappersEqual:k,areRegExpsEqual:S,areSetsEqual:r?c(E,w):E,areTypedArraysEqual:r?w:O};if(n&&(o=_({},o,n(o))),t){var i=u(o.areArraysEqual),a=u(o.areMapsEqual),l=u(o.areObjectsEqual),s=u(o.areSetsEqual);o=_({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:l,areSetsEqual:s})}return o}(e)).areArraysEqual,r=t.areDatesEqual,o=t.areMapsEqual,i=t.areObjectsEqual,a=t.arePrimitiveWrappersEqual,l=t.areRegExpsEqual,s=t.areSetsEqual,d=t.areTypedArraysEqual,function(e,t,c){if(e===t)return!0;if(null==e||null==t||"object"!=typeof e||"object"!=typeof t)return e!=e&&t!=t;var u=e.constructor;if(u!==t.constructor)return!1;if(u===Object)return i(e,t,c);if(C(e))return n(e,t,c);if(null!=j&&j(e))return d(e,t,c);if(u===Date)return r(e,t,c);if(u===RegExp)return l(e,t,c);if(u===Map)return o(e,t,c);if(u===Set)return s(e,t,c);var f=P(e);return"[object Date]"===f?r(e,t,c):"[object RegExp]"===f?l(e,t,c):"[object Map]"===f?o(e,t,c):"[object Set]"===f?s(e,t,c):"[object Object]"===f?"function"!=typeof e.then&&"function"!=typeof t.then&&i(e,t,c):"[object Arguments]"===f?i(e,t,c):("[object Boolean]"===f||"[object Number]"===f||"[object String]"===f)&&a(e,t,c)}),T=p?p(g):function(e,t,n,r,o,i,a){return g(e,t,a)};return function(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(e,a){var l=r(),s=l.cache;return n(e,a,{cache:void 0===s?t?new WeakMap:void 0:s,equals:o,meta:l.meta,strict:i})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(e,t){return n(e,t,a)}}({circular:void 0!==f&&f,comparator:g,createState:h,equals:T,strict:void 0!==m&&m})}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame(function r(o){if(n<0&&(n=o),o-n>t)e(o),n=-1;else{var i;i=r,"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(i)}})}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&e<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=Q(i,l),p=Q(a,s),h=(e=i,t=l,function(n){var r;return Y([].concat(function(e){if(Array.isArray(e))return X(e)}(r=G(e,t).map(function(e,t){return e*t}).slice(1))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||$(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[0]),n)}),m=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o,i=f(n)-t,a=h(n);if(1e-4>Math.abs(i-t)||a<1e-4)break;n=(o=n-i/a)>1?1:o<0?0:o}return p(n)};return m.isStepper=!1,m},ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,i=e.dt,a=void 0===i?17:i,l=function(e,t,r){var i=r+(-(e-t)*n-r*o)*a/1e3,l=r*a/1e3+e;return 1e-4>Math.abs(l-t)&&1e-4>Math.abs(i)?[t,0]:[l,i]};return l.isStepper=!0,l.dt=a,l},et=function(){for(var e=arguments.length,t=Array(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0?n[o-1]:r,f=c||Object.keys(s);if("function"==typeof l||"spring"===l)return[].concat(em(e),[t.runJSAnimation.bind(t,{from:d.style,to:s,duration:i,easing:l}),i]);var p=K(f,i,l),h=ey(ey(ey({},d.style),s),{},{transition:p});return[].concat(em(e),[h,i,u]).filter(H)},[a,Math.max(void 0===l?0:l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){if(!this.manager){var t,n,r;this.manager=(t=function(){return null},n=!1,r=function e(r){if(!n){if(Array.isArray(r)){if(!r.length)return;var o=function(e){if(Array.isArray(e))return e}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return I(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,void 0)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o.slice(1);if("number"==typeof i){N(e.bind(null,a),i);return}e(i),N(e.bind(null,a));return}"object"===A(r)&&t(r),"function"==typeof r&&r()}},{stop:function(){n=!0},start:function(e){n=!1,r(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}})}var o=e.begin,i=e.duration,a=e.attributeName,l=e.to,s=e.easing,c=e.onAnimationStart,u=e.onAnimationEnd,d=e.steps,f=e.children,p=this.manager;if(this.unSubscribe=p.subscribe(this.handleStyleChange),"function"==typeof s||"function"==typeof f||"spring"===s){this.runJSAnimation(e);return}if(d.length>1){this.runStepAnimation(e);return}var h=a?eb({},a,l):l,m=K(Object.keys(h),i,s);p.start([c,o,ey(ey({},h),{},{transition:m}),i,u])}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.begin,e.duration),o=(e.attributeName,e.easing,e.isActive),i=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eh)),a=r.Children.count(t),l=W(this.state.style);if("function"==typeof t)return t(l);if(!o||0===a||n<=0)return t;var s=function(e){var t=e.props,n=t.style,o=t.className;return(0,r.cloneElement)(e,ey(ey({},i),{},{style:ey(ey({},void 0===n?{}:n),l),className:o}))};return 1===a?s(r.Children.only(t)):r.createElement("div",null,r.Children.map(t,function(e){return s(e)}))}}],function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.steps,n=e.duration;return t&&t.length?t.reduce(function(e,t){return e+(Number.isFinite(t.duration)&&t.duration>0?t.duration:0)},0):Number.isFinite(n)?n:0},ez=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eN(e,t)}(i,e);var t,n,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=eI(i);return e=t?Reflect.construct(n,arguments,eI(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===e_(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return eA(e)}(this,e)});function i(){var e;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),eR(eA(e=o.call(this)),"handleEnter",function(t,n){var r=e.props,o=r.appearOptions,i=r.enterOptions;e.handleStyleActive(n?o:i)}),eR(eA(e),"handleExit",function(){var t=e.props.leaveOptions;e.handleStyleActive(t)}),e.state={isActive:!1},e}return n=[{key:"handleStyleActive",value:function(e){if(e){var t=e.onAnimationEnd?function(){e.onAnimationEnd()}:null;this.setState(eM(eM({},e),{},{onAnimationEnd:t,isActive:!0}))}}},{key:"parseTimeout",value:function(){var e=this.props,t=e.appearOptions,n=e.enterOptions,r=e.leaveOptions;return eL(t)+eL(n)+eL(r)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=(t.appearOptions,t.enterOptions,t.leaveOptions,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,ej));return r.createElement(eC.Transition,eP({},o,{onEnter:this.handleEnter,onExit:this.handleExit,timeout:this.parseTimeout()}),function(){return r.createElement(eO,e.state,r.Children.only(n))})}}],function(e,t){for(var n=0;n code':{position:"relative",zIndex:"1",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em",position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal"},'pre[class*="language-"]:before':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"0.18em",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(-2deg)",MozTransform:"rotate(-2deg)",msTransform:"rotate(-2deg)",OTransform:"rotate(-2deg)",transform:"rotate(-2deg)"},'pre[class*="language-"]:after':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"auto",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(2deg)",MozTransform:"rotate(2deg)",msTransform:"rotate(2deg)",OTransform:"rotate(2deg)",transform:"rotate(2deg)",right:"0.75em"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"},'pre[class*="language-"].line-numbers.line-numbers':{paddingLeft:"0"},'pre[class*="language-"].line-numbers.line-numbers code':{paddingLeft:"3.8em"},'pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows':{left:"0"},'pre[class*="language-"][data-line]':{paddingTop:"0",paddingBottom:"0",paddingLeft:"0"},"pre[data-line] code":{position:"relative",paddingLeft:"4em"},"pre .line-highlight":{marginTop:"0"}}},33664:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(!e||!e.__esModule){var t={};if(null!=e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}}t.default=e}}(n(40718));var r=l(n(84617)),o=l(n(67973)),i=l(n(2265)),a=l(n(20536));function l(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),a=r.default.Children.toArray(t),l=a[0],s=a[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(i.default,o,n?r.default.cloneElement(l,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(r.default.Component);l.propTypes={},t.default=l,e.exports=t.default},20536:function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}}return t.default=e,t}(n(40718)),o=l(n(2265)),i=l(n(54887)),a=n(52181);function l(e){return e&&e.__esModule?e:{default:e}}n(32601);var s="unmounted";t.UNMOUNTED=s;var c="exited";t.EXITED=c;var u="entering";t.ENTERING=u;var d="entered";t.ENTERED=d;var f="exiting";t.EXITING=f;var p=function(e){function t(t,n){r=e.call(this,t,n)||this;var r,o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=c,r.appearStatus=u):o=d:o=t.unmountOnExit||t.mountOnEnter?s:c,r.state={status:o},r.nextCallback=null,r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===s?{status:c}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==u&&n!==d&&(t=u):(n===u||n===d)&&(t=f)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=i.default.findDOMNode(this);t===u?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:s})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;if(!t&&!r){this.safeSetState({status:d},function(){n.props.onEntered(e)});return}this.props.onEnter(e,o),this.safeSetState({status:u},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,function(){n.safeSetState({status:d},function(){n.props.onEntered(e,o)})})})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();if(!n){this.safeSetState({status:c},function(){t.props.onExited(e)});return}this.props.onExit(e),this.safeSetState({status:f},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:c},function(){t.props.onExited(e)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;if(!e||r){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)},n.render=function(){var e=this.state.status;if(e===s)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},t}(o.default.Component);function h(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:h,onEntering:h,onEntered:h,onExit:h,onExiting:h,onExited:h},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var m=(0,a.polyfill)(p);t.default=m},38244:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(40718)),o=l(n(2265)),i=n(52181),a=n(28710);function l(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),i=u(this.state.children).map(n);return(delete r.appear,delete r.enter,delete r.exit,null===t)?i:o.default.createElement(t,r,i)},t}(o.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,i.polyfill)(d);t.default=f,e.exports=t.default},30719:function(e,t,n){"use strict";var r=l(n(33664)),o=l(n(31601)),i=l(n(38244)),a=l(n(20536));function l(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:a.default,TransitionGroup:i.default,ReplaceTransition:o.default,CSSTransition:r.default}},28710:function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var l=o(e.children),s=i(t,l);return Object.keys(s).forEach(function(o){var i=s[o];if((0,r.isValidElement)(i)){var c=o in t,u=o in l,d=t[o],f=(0,r.isValidElement)(d)&&!d.props.in;u&&(!c||f)?s[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)}):u||!c||f?u&&c&&(0,r.isValidElement)(d)&&(s[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:d.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):s[o]=(0,r.cloneElement)(i,{in:!1})}}),s};var r=n(2265);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=t&&(0,r.isValidElement)(e)?t(e):e}),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var l={};for(var s in t){if(o[s])for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,w),i=parseInt("".concat(n),10),a=parseInt("".concat(r),10),l=parseInt("".concat(t.height||o.height),10),s=parseInt("".concat(t.width||o.width),10);return E(E(E(E(E({},t),o),i?{x:i}:{}),a?{y:a}:{}),{},{height:l,width:s,name:t.name,radius:t.radius})}function C(e){return r.createElement(b.bn,k({shapeType:"rectangle",propTransformer:O,activeClassName:"recharts-active-bar"},e))}var j=["value","background"];function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(){return(P=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,j);if(!l)return null;var c=M(M(M(M(M({},s),{},{fill:"#eee"},l),a),(0,y.bw)(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:o,index:n,key:"background-bar-".concat(n),className:"recharts-bar-background-rectangle"});return r.createElement(C,P({option:e.props.background,isActive:n===i},c))})}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,o=n.data,i=n.xAxis,a=n.yAxis,l=n.layout,s=n.children,c=(0,m.NN)(s,d.W);if(!c)return null;var f="vertical"===l?o[0].height/2:o[0].width/2,p=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:(0,v.F$)(e,t)}};return r.createElement(u.m,{clipPath:e?"url(#clipPath-".concat(t,")"):null},c.map(function(e){return r.cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:o,xAxis:i,yAxis:a,layout:l,offset:f,dataPointFormatter:p})}))}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,i=e.className,a=e.xAxis,l=e.yAxis,s=e.left,d=e.top,f=e.width,h=e.height,m=e.isAnimationActive,g=e.background,v=e.id;if(t||!n||!n.length)return null;var y=this.state.isAnimationFinished,b=(0,o.Z)("recharts-bar",i),x=a&&a.allowDataOverflow,w=l&&l.allowDataOverflow,k=x||w,S=c()(v)?this.id:v;return r.createElement(u.m,{className:b},x||w?r.createElement("defs",null,r.createElement("clipPath",{id:"clipPath-".concat(S)},r.createElement("rect",{x:x?s:s-f/2,y:w?d:d-h/2,width:x?f:2*f,height:w?h:2*h}))):null,r.createElement(u.m,{className:"recharts-bar-rectangles",clipPath:k?"url(#clipPath-".concat(S,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(k,S),(!m||y)&&p.e.renderCallByParent(this.props,n))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],n&&N(f.prototype,n),a&&N(f,a),Object.defineProperty(f,"prototype",{writable:!1}),f}(r.PureComponent);D(z,"displayName","Bar"),D(z,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!0,isAnimationActive:!g.x.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),D(z,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,i=e.xAxis,a=e.yAxis,l=e.xAxisTicks,s=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,p=e.offset,g=(0,v.Bu)(r,n);if(!g)return null;var y=t.layout,b=n.props,x=b.dataKey,w=b.children,k=b.minPointSize,S="horizontal"===y?a:i,E=c?S.scale.domain():null,O=(0,v.Yj)({numericAxis:S}),C=(0,m.NN)(w,f.b),j=d.map(function(e,t){var r,d,f,p,m,b;if(c?r=(0,v.Vv)(c[u+t],E):Array.isArray(r=(0,v.F$)(e,x))||(r=[O,r]),"horizontal"===y){var w,S=[a.scale(r[0]),a.scale(r[1])],j=S[0],_=S[1];d=(0,v.Fy)({axis:i,ticks:l,bandSize:o,offset:g.offset,entry:e,index:t}),f=null!==(w=null!=_?_:j)&&void 0!==w?w:void 0,p=g.size;var P=j-_;if(m=Number.isNaN(P)?0:P,b={x:d,y:a.y,width:p,height:a.height},Math.abs(k)>0&&Math.abs(m)0&&Math.abs(p)=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function O(e,t){for(var n=0;n0?this.props:h)),o<=0||a<=0||!m||!m.length)?null:r.createElement(u.m,{className:(0,s.Z)("recharts-cartesian-axis",c),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),f._.renderCallByParent(this.props))}}],o=[{key:"renderTickItem",value:function(e,t,n){return r.isValidElement(e)?r.cloneElement(e,t):i()(e)?e(t):r.createElement(d.x,w({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}}],n&&O(k.prototype,n),o&&O(k,o),Object.defineProperty(k,"prototype",{writable:!1}),k}(r.Component);_(T,"displayName","CartesianAxis"),_(T,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"})},56940:function(e,t,n){"use strict";n.d(t,{q:function(){return P}});var r=n(2265),o=n(86757),i=n.n(o),a=n(1175),l=n(16630),s=n(82944),c=n(85355),u=n(78242),d=n(80285),f=n(25739),p=["x1","y1","x2","y2","key"],h=["offset"];function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var x=function(e){var t=e.fill;if(!t||"none"===t)return null;var n=e.fillOpacity,o=e.x,i=e.y,a=e.width,l=e.height;return r.createElement("rect",{x:o,y:i,width:a,height:l,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function w(e,t){var n;if(r.isValidElement(e))n=r.cloneElement(e,t);else if(i()(e))n=e(t);else{var o=t.x1,a=t.y1,l=t.x2,c=t.y2,u=t.key,d=b(t,p),f=(0,s.L6)(d,!1),m=(f.offset,b(f,h));n=r.createElement("line",y({},m,{x1:o,y1:a,x2:l,y2:c,fill:"none",key:u}))}return n}function k(e){var t=e.x,n=e.width,o=e.horizontal,i=void 0===o||o,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var l=a.map(function(r,o){return w(i,v(v({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:"line-".concat(o),index:o}))});return r.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function S(e){var t=e.y,n=e.height,o=e.vertical,i=void 0===o||o,a=e.verticalPoints;if(!i||!a||!a.length)return null;var l=a.map(function(r,o){return w(i,v(v({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:"line-".concat(o),index:o}))});return r.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function E(e){var t=e.horizontalFill,n=e.fillOpacity,o=e.x,i=e.y,a=e.width,l=e.height,s=e.horizontalPoints,c=e.horizontal;if(!(void 0===c||c)||!t||!t.length)return null;var u=s.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==u[0]&&u.unshift(0);var d=u.map(function(e,s){var c=u[s+1]?u[s+1]-e:i+l-e;if(c<=0)return null;var d=s%t.length;return r.createElement("rect",{key:"react-".concat(s),y:e,x:o,height:c,width:a,stroke:"none",fill:t[d],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return r.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function O(e){var t=e.vertical,n=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,l=e.width,s=e.height,c=e.verticalPoints;if(!(void 0===t||t)||!n||!n.length)return null;var u=c.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==u[0]&&u.unshift(0);var d=u.map(function(e,t){var c=u[t+1]?u[t+1]-e:i+l-e;if(c<=0)return null;var d=t%n.length;return r.createElement("rect",{key:"react-".concat(t),x:e,y:a,width:c,height:s,stroke:"none",fill:n[d],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return r.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var C=function(e,t){var n=e.xAxis,r=e.width,o=e.height,i=e.offset;return(0,c.Rf)((0,u.f)(v(v(v({},d.O.defaultProps),n),{},{ticks:(0,c.uY)(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.left,i.left+i.width,t)},j=function(e,t){var n=e.yAxis,r=e.width,o=e.height,i=e.offset;return(0,c.Rf)((0,u.f)(v(v(v({},d.O.defaultProps),n),{},{ticks:(0,c.uY)(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.top,i.top+i.height,t)},_={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function P(e){var t,n,o,s,c,u,d=(0,f.zn)(),p=(0,f.Mw)(),h=(0,f.qD)(),g=v(v({},e),{},{stroke:null!==(t=e.stroke)&&void 0!==t?t:_.stroke,fill:null!==(n=e.fill)&&void 0!==n?n:_.fill,horizontal:null!==(o=e.horizontal)&&void 0!==o?o:_.horizontal,horizontalFill:null!==(s=e.horizontalFill)&&void 0!==s?s:_.horizontalFill,vertical:null!==(c=e.vertical)&&void 0!==c?c:_.vertical,verticalFill:null!==(u=e.verticalFill)&&void 0!==u?u:_.verticalFill}),b=g.x,w=g.y,P=g.width,T=g.height,M=g.xAxis,N=g.yAxis,A=g.syncWithTicks,I=g.horizontalValues,R=g.verticalValues;if(!(0,l.hj)(P)||P<=0||!(0,l.hj)(T)||T<=0||!(0,l.hj)(b)||b!==+b||!(0,l.hj)(w)||w!==+w)return null;var D=g.verticalCoordinatesGenerator||C,L=g.horizontalCoordinatesGenerator||j,z=g.horizontalPoints,Z=g.verticalPoints;if((!z||!z.length)&&i()(L)){var B=I&&I.length,F=L({yAxis:N?v(v({},N),{},{ticks:B?I:N.ticks}):void 0,width:d,height:p,offset:h},!!B||A);(0,a.Z)(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(m(F),"]")),Array.isArray(F)&&(z=F)}if((!Z||!Z.length)&&i()(D)){var H=R&&R.length,q=D({xAxis:M?v(v({},M),{},{ticks:H?R:M.ticks}):void 0,width:d,height:p,offset:h},!!H||A);(0,a.Z)(Array.isArray(q),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(m(q),"]")),Array.isArray(q)&&(Z=q)}return r.createElement("g",{className:"recharts-cartesian-grid"},r.createElement(x,{fill:g.fill,fillOpacity:g.fillOpacity,x:g.x,y:g.y,width:g.width,height:g.height}),r.createElement(k,y({},g,{offset:h,horizontalPoints:z})),r.createElement(S,y({},g,{offset:h,verticalPoints:Z})),r.createElement(E,y({},g,{horizontalPoints:z})),r.createElement(O,y({},g,{verticalPoints:Z})))}P.displayName="CartesianGrid"},13137:function(e,t,n){"use strict";n.d(t,{W:function(){return u}});var r=n(2265),o=n(69398),i=n(9841),a=n(82944),l=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,l),v=(0,a.L6)(g,!1);"x"===e.direction&&"number"!==h.type&&(0,o.Z)(!1);var y=f.map(function(e){var o,a,l=p(e,d),f=l.x,g=l.y,y=l.value,b=l.errorVal;if(!b)return null;var x=[];if(Array.isArray(b)){var w=function(e){if(Array.isArray(e))return e}(b)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{for(i=(n=n.call(e)).next;!(s=(r=i.call(n)).done)&&(l.push(r.value),2!==l.length);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(b,2)||function(e,t){if(e){if("string"==typeof e)return c(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,2)}}(b,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();o=w[0],a=w[1]}else o=a=b;if("vertical"===n){var k=h.scale,S=g+t,E=S+u,O=S-u,C=k(y-o),j=k(y+a);x.push({x1:j,y1:E,x2:j,y2:O}),x.push({x1:C,y1:S,x2:j,y2:S}),x.push({x1:C,y1:E,x2:C,y2:O})}else if("horizontal"===n){var _=m.scale,P=f+t,T=P-u,M=P+u,N=_(y-o),A=_(y+a);x.push({x1:T,y1:A,x2:M,y2:A}),x.push({x1:P,y1:N,x2:P,y2:A}),x.push({x1:T,y1:N,x2:M,y2:N})}return r.createElement(i.m,s({className:"recharts-errorBar",key:"bar-".concat(x.map(function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))},v),x.map(function(e){return r.createElement("line",s({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))}))});return r.createElement(i.m,{className:"recharts-errorBars"},y)}u.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},u.displayName="ErrorBar"},54061:function(e,t,n){"use strict";n.d(t,{x:function(){return I}});var r=n(2265),o=n(59221),i=n(86757),a=n.n(i),l=n(77571),s=n.n(l),c=n(21652),u=n.n(c),d=n(87602),f=n(57165),p=n(81889),h=n(9841),m=n(58772),g=n(13137),v=n(16630),y=n(82944),b=n(34067),x=n(85355),w=["type","layout","connectNulls","ref"];function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(){return(S=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ni){l=[].concat(C(r.slice(0,s)),[i-u]);break}var d=l.length%2==0?[0,a]:[a];return[].concat(C(c.repeat(r,Math.floor(t/o))),C(l),d).map(function(e){return"".concat(e,"px")}).join(", ")}),N(T(e),"id",(0,v.EL)("recharts-line-")),N(T(e),"pathRef",function(t){e.mainCurve=t}),N(T(e),"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),N(T(e),"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return n=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,o=n.points,i=n.xAxis,a=n.yAxis,l=n.layout,s=n.children,c=(0,y.NN)(s,g.W);if(!c)return null;var u=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:(0,x.F$)(e.payload,t)}};return r.createElement(h.m,{clipPath:e?"url(#clipPath-".concat(t,")"):null},c.map(function(e){return r.cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:o,xAxis:i,yAxis:a,layout:l,dataPointFormatter:u})}))}},{key:"renderDots",value:function(e,t,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,i=o.dot,a=o.points,l=o.dataKey,s=(0,y.L6)(this.props,!1),u=(0,y.L6)(i,!0),d=a.map(function(e,t){var n=O(O(O({key:"dot-".concat(t),r:3},s),u),{},{value:e.value,dataKey:l,cx:e.x,cy:e.y,index:t,payload:e.payload});return c.renderDotItem(i,n)}),f={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(n,")"):null};return r.createElement(h.m,S({className:"recharts-line-dots",key:"dots"},f),d)}},{key:"renderCurveStatically",value:function(e,t,n,o){var i=this.props,a=i.type,l=i.layout,s=i.connectNulls,c=(i.ref,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,w)),u=O(O(O({},(0,y.L6)(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(n,")"):null,points:e},o),{},{type:a,layout:l,connectNulls:s});return r.createElement(f.H,S({},u,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var n=this,i=this.props,a=i.points,l=i.strokeDasharray,s=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,d=i.animationEasing,f=i.animationId,p=i.animateNewValues,h=i.width,m=i.height,g=this.state,y=g.prevPoints,b=g.totalLength;return r.createElement(o.ZP,{begin:c,duration:u,isActive:s,easing:d,from:{t:0},to:{t:1},key:"line-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var o,i=r.t;if(y){var s=y.length/a.length,c=a.map(function(e,t){var n=Math.floor(t*s);if(y[n]){var r=y[n],o=(0,v.k4)(r.x,e.x),a=(0,v.k4)(r.y,e.y);return O(O({},e),{},{x:o(i),y:a(i)})}if(p){var l=(0,v.k4)(2*h,e.x),c=(0,v.k4)(m/2,e.y);return O(O({},e),{},{x:l(i),y:c(i)})}return O(O({},e),{},{x:e.x,y:e.y})});return n.renderCurveStatically(c,e,t)}var u=(0,v.k4)(0,b)(i);if(l){var d="".concat(l).split(/[,\s]+/gim).map(function(e){return parseFloat(e)});o=n.getStrokeDasharray(u,b,d)}else o=n.generateSimpleStrokeDasharray(b,u);return n.renderCurveStatically(a,e,t,{strokeDasharray:o})})}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,o=n.isAnimationActive,i=this.state,a=i.prevPoints,l=i.totalLength;return o&&r&&r.length&&(!a&&l>0||!u()(a,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,o=t.dot,i=t.points,a=t.className,l=t.xAxis,c=t.yAxis,u=t.top,f=t.left,p=t.width,g=t.height,v=t.isAnimationActive,b=t.id;if(n||!i||!i.length)return null;var x=this.state.isAnimationFinished,w=1===i.length,k=(0,d.Z)("recharts-line",a),S=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,O=S||E,C=s()(b)?this.id:b,j=null!==(e=(0,y.L6)(o,!1))&&void 0!==e?e:{r:3,strokeWidth:2},_=j.r,P=j.strokeWidth,T=((0,y.$k)(o)?o:{}).clipDot,M=void 0===T||T,N=2*(void 0===_?3:_)+(void 0===P?2:P);return r.createElement(h.m,{className:k},S||E?r.createElement("defs",null,r.createElement("clipPath",{id:"clipPath-".concat(C)},r.createElement("rect",{x:S?f:f-p/2,y:E?u:u-g/2,width:S?p:2*p,height:E?g:2*g})),!M&&r.createElement("clipPath",{id:"clipPath-dots-".concat(C)},r.createElement("rect",{x:f-N/2,y:u-N/2,width:p+N,height:g+N}))):null,!w&&this.renderCurve(O,C),this.renderErrorBar(O,C),(w||o)&&this.renderDots(O,M,C),(!v||x)&&m.e.renderCallByParent(this.props,i))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(C(e),[0]):e,r=[],o=0;oe*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t=2?(0,i.uY)(v[1].coordinate-v[0].coordinate):1,P=(r="width"===O,d=y.x,f=y.y,h=y.width,m=y.height,1===_?{start:r?d:f,end:r?d+h:f+m}:{start:r?d+h:f+m,end:r?d:f});return"equidistantPreserveStart"===w?function(e,t,n,r,o){for(var i,a=(r||[]).slice(),l=t.start,s=t.end,d=0,f=1,p=l;f<=a.length;)if(i=function(){var t,i=null==r?void 0:r[d];if(void 0===i)return{v:c(r,f)};var a=d,h=function(){return void 0===t&&(t=n(i,a)),t},m=i.coordinate,g=0===d||u(e,m,h,p,s);g||(d=0,p=l,f+=1),g&&(p=m+e*(h()/2+o),d+=f)}())return i.v;return[]}(_,P,j,v,b):("preserveStart"===w||"preserveStartEnd"===w?function(e,t,n,r,o,i){var a=(r||[]).slice(),l=a.length,s=t.start,c=t.end;if(i){var d=r[l-1],f=n(d,l-1),h=e*(d.coordinate+e*f/2-c);a[l-1]=d=p(p({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate}),u(e,d.tickCoord,function(){return f},s,c)&&(c=d.tickCoord-e*(f/2+o),a[l-1]=p(p({},d),{},{isShow:!0}))}for(var m=i?l-1:l,g=function(t){var r,i=a[t],l=function(){return void 0===r&&(r=n(i,t)),r};if(0===t){var d=e*(i.coordinate-e*l()/2-s);a[t]=i=p(p({},i),{},{tickCoord:d<0?i.coordinate-d*e:i.coordinate})}else a[t]=i=p(p({},i),{},{tickCoord:i.coordinate});u(e,i.tickCoord,l,s,c)&&(s=i.tickCoord+e*(l()/2+o),a[t]=p(p({},i),{},{isShow:!0}))},v=0;v0?c.coordinate-f*e:c.coordinate})}else i[t]=c=p(p({},c),{},{tickCoord:c.coordinate});u(e,c.tickCoord,d,l,s)&&(s=c.tickCoord-e*(d()/2+o),i[t]=p(p({},c),{},{isShow:!0}))},d=a-1;d>=0;d--)c(d);return i}(_,P,j,v,b)).filter(function(e){return e.isShow})}},93765:function(e,t,n){"use strict";n.d(t,{z:function(){return tx}});var r=n(2265),o=n(77571),i=n.n(o),a=n(86757),l=n.n(a),s=n(99676),c=n.n(s),u=n(13735),d=n.n(u),f=n(34935),p=n.n(f),h=n(37065),m=n.n(h),g=n(84173),v=n.n(g),y=n(32242),b=n.n(y),x=n(87602),w=n(69398),k=n(48777),S=n(9841),E=n(8147),O=n(22190),C=n(81889),j=n(73649),_=n(82944),P=n(55284),T=n(58811),M=n(85355),N=n(16630);function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function R(e){for(var t=1;t0&&t.handleDrag(e.changedTouches[0])}),V(W(t),"handleDragEnd",function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=t.props,n=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:n,startIndex:o})}),t.detachDragEndListener()}),V(W(t),"handleLeaveWrapper",function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))}),V(W(t),"handleEnterSlideOrTraveller",function(){t.setState({isTextActive:!0})}),V(W(t),"handleLeaveSlideOrTraveller",function(){t.setState({isTextActive:!1})}),V(W(t),"handleSlideDragStart",function(e){var n=G(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),t.attachDragEndListener()}),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(W(t),"startX"),endX:t.handleTravellerDragStart.bind(W(t),"endX")},t.state={},t}return n=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,n=e.endX,r=this.state.scaleValues,o=this.props,i=o.gap,l=o.data.length-1,s=a.getIndexInRange(r,Math.min(t,n)),c=a.getIndexInRange(r,Math.max(t,n));return{startIndex:s-s%i,endIndex:c===l?l:c-c%i}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,i=(0,M.F$)(n[e],o,e);return l()(r)?r(i,e):i}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,i=this.props,a=i.x,l=i.width,s=i.travellerWidth,c=i.startIndex,u=i.endIndex,d=i.onChange,f=e.pageX-n;f>0?f=Math.min(f,a+l-s-o,a+l-s-r):f<0&&(f=Math.max(f,a-r,a-o));var p=this.getIndex({startX:r+f,endX:o+f});(p.startIndex!==c||p.endIndex!==u)&&d&&d(p),this.setState({startX:r+f,endX:o+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=G(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t,n=this.state,r=n.brushMoveStartX,o=n.movingTravellerId,i=n.endX,a=n.startX,l=this.state[o],s=this.props,c=s.x,u=s.width,d=s.travellerWidth,f=s.onChange,p=s.gap,h=s.data,m={startX:this.state.startX,endX:this.state.endX},g=e.pageX-r;g>0?g=Math.min(g,c+u-d-l):g<0&&(g=Math.max(g,c-l)),m[o]=l+g;var v=this.getIndex(m),y=v.startIndex,b=v.endIndex,x=function(){var e=h.length-1;return"startX"===o&&(i>a?y%p==0:b%p==0)||ia?b%p==0:y%p==0)||i>a&&b===e};this.setState((V(t={},o,l+g),V(t,"brushMoveStartX",e.pageX),t),function(){f&&x()&&f(v)})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,i=r.startX,a=r.endX,l=this.state[t],s=o.indexOf(l);if(-1!==s){var c=s+e;if(-1!==c&&!(c>=o.length)){var u=o[c];"startX"===t&&u>=a||"endX"===t&&u<=i||this.setState(V({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,o=e.width,i=e.height,a=e.fill,l=e.stroke;return r.createElement("rect",{stroke:l,fill:a,x:t,y:n,width:o,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,o=e.width,i=e.height,a=e.data,l=e.children,s=e.padding,c=r.Children.only(l);return c?r.cloneElement(c,{x:t,y:n,width:o,height:i,margin:s,compact:!0,data:a}):null}},{key:"renderTravellerLayer",value:function(e,t){var n=this,o=this.props,i=o.y,l=o.travellerWidth,s=o.height,c=o.traveller,u=o.ariaLabel,d=o.data,f=o.startIndex,p=o.endIndex,h=Math.max(e,this.props.x),m=H(H({},(0,_.L6)(this.props,!1)),{},{x:h,y:i,width:l,height:s}),g=u||"Min value: ".concat(d[f].name,", Max value: ").concat(d[p].name);return r.createElement(S.m,{tabIndex:0,role:"slider","aria-label":g,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),n.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,t))},onFocus:function(){n.setState({isTravellerFocused:!0})},onBlur:function(){n.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},a.renderTraveller(c,m))}},{key:"renderSlide",value:function(e,t){var n=this.props,o=n.y,i=n.height,a=n.stroke,l=n.travellerWidth;return r.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:a,fillOpacity:.2,x:Math.min(e,t)+l,y:o,width:Math.max(Math.abs(t-e)-l,0),height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,o=e.y,i=e.height,a=e.travellerWidth,l=e.stroke,s=this.state,c=s.startX,u=s.endX,d={pointerEvents:"none",fill:l};return r.createElement(S.m,{className:"recharts-brush-texts"},r.createElement(T.x,B({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,u)-5,y:o+i/2},d),this.getTextOfTick(t)),r.createElement(T.x,B({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,u)+a+5,y:o+i/2},d),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,o=e.children,i=e.x,a=e.y,l=e.width,s=e.height,c=e.alwaysShowText,u=this.state,d=u.startX,f=u.endX,p=u.isTextActive,h=u.isSlideMoving,m=u.isTravellerMoving,g=u.isTravellerFocused;if(!t||!t.length||!(0,N.hj)(i)||!(0,N.hj)(a)||!(0,N.hj)(l)||!(0,N.hj)(s)||l<=0||s<=0)return null;var v=(0,x.Z)("recharts-brush",n),y=1===r.Children.count(o),b=z("userSelect","none");return r.createElement(S.m,{className:v,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(d,f),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(f,"endX"),(p||h||m||g||c)&&this.renderText())}}],o=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,n=e.y,o=e.width,i=e.height,a=e.stroke,l=Math.floor(n+i/2)-1;return r.createElement(r.Fragment,null,r.createElement("rect",{x:t,y:n,width:o,height:i,fill:a,stroke:"none"}),r.createElement("line",{x1:t+1,y1:l,x2:t+o-1,y2:l,fill:"none",stroke:"#fff"}),r.createElement("line",{x1:t+1,y1:l+2,x2:t+o-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,t){return r.isValidElement(e)?r.cloneElement(e,t):l()(e)?e(t):a.renderDefaultTraveller(t)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,i=e.travellerWidth,a=e.updateId,l=e.startIndex,s=e.endIndex;if(n!==t.prevData||a!==t.prevUpdateId)return H({prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r},n&&n.length?X({data:n,width:r,x:o,travellerWidth:i,startIndex:l,endIndex:s}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||i!==t.prevTravellerWidth)){t.scale.range([o,o+r-i]);var c=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=e.length,r=0,o=n-1;o-r>1;){var i=Math.floor((r+o)/2);e[i]>t?o=i:r=i}return t>=e[o]?o:r}}],n&&q(a.prototype,n),o&&q(a,o),Object.defineProperty(a,"prototype",{writable:!1}),a}(r.PureComponent);V(Y,"displayName","Brush"),V(Y,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Q=n(4094),J=n(38569),ee=n(26680),et=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},en=n(25311),er=n(1175);function eo(e){return(eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ei(){return(ei=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eH));return(0,N.hj)(n)&&(0,N.hj)(i)&&(0,N.hj)(d)&&(0,N.hj)(p)&&(0,N.hj)(l)&&(0,N.hj)(c)?r.createElement("path",eq({},(0,_.L6)(m,!0),{className:(0,x.Z)("recharts-cross",h),d:"M".concat(n,",").concat(l,"v").concat(p,"M").concat(c,",").concat(i,"h").concat(d)})):null};function eK(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle;return{points:[(0,eP.op)(t,n,r,o),(0,eP.op)(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}var eV=n(60474);function e$(e){return(e$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eG(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function e3(e,t){return(e3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function e6(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e8(e){return(e8=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function e5(e){return function(e){if(Array.isArray(e))return e9(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||e7(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e7(e,t){if(e){if("string"==typeof e)return e9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e9(e,t)}}function e9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0?i:e&&e.length&&(0,N.hj)(r)&&(0,N.hj)(o)?e.slice(r,o+1):[]};function tu(e){return"number"===e?[0,"auto"]:void 0}var td=function(e,t,n,r){var o=e.graphicalItems,i=e.tooltipAxis,a=tc(t,e);return n<0||!o||!o.length||n>=a.length?null:o.reduce(function(o,l){var s,c,u=null!==(s=l.props.data)&&void 0!==s?s:t;if(u&&e.dataStartIndex+e.dataEndIndex!==0&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),i.dataKey&&!i.allowDuplicatedCategory){var d=void 0===u?a:u;c=(0,N.Ap)(d,i.dataKey,r)}else c=u&&u[n]||a[n];return c?[].concat(e5(o),[(0,M.Qo)(l,c)]):o},[])},tf=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},i="horizontal"===n?o.x:"vertical"===n?o.y:"centric"===n?o.angle:o.radius,a=e.orderedTooltipTicks,l=e.tooltipAxis,s=e.tooltipTicks,c=(0,M.VO)(i,a,s,l);if(c>=0&&s){var u=s[c]&&s[c].value,d=td(e,t,c,u),f=ts(n,a,c,o);return{activeTooltipIndex:c,activeLabel:u,activePayload:d,activeCoordinate:f}}return null},tp=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,a=t.axisIdKey,l=t.stackGroups,s=t.dataStartIndex,u=t.dataEndIndex,d=e.layout,f=e.children,p=e.stackOffset,h=(0,M.NA)(d,o);return n.reduce(function(t,n){var m=n.props,g=m.type,v=m.dataKey,y=m.allowDataOverflow,b=m.allowDuplicatedCategory,x=m.scale,w=m.ticks,k=m.includeHidden,S=n.props[a];if(t[S])return t;var E=tc(e.data,{graphicalItems:r.filter(function(e){return e.props[a]===S}),dataStartIndex:s,dataEndIndex:u}),O=E.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&(0,N.hj)(r)&&(0,N.hj)(o))return!0}return!1})(n.props.domain,y,g)&&(_=(0,M.LG)(n.props.domain,null,y),h&&("number"===g||"auto"!==x)&&(T=(0,M.gF)(E,v,"category")));var C=tu(g);if(!_||0===_.length){var j,_,P,T,A,I=null!==(A=n.props.domain)&&void 0!==A?A:C;if(v){if(_=(0,M.gF)(E,v,g),"category"===g&&h){var R=(0,N.bv)(_);b&&R?(P=_,_=c()(0,O)):b||(_=(0,M.ko)(I,_,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(e5(e),[t])},[]))}else if("category"===g)_=b?_.filter(function(e){return""!==e&&!i()(e)}):(0,M.ko)(I,_,n).reduce(function(e,t){return e.indexOf(t)>=0||""===t||i()(t)?e:[].concat(e5(e),[t])},[]);else if("number"===g){var D=(0,M.ZI)(E,r.filter(function(e){return e.props[a]===S&&(k||!e.props.hide)}),v,o,d);D&&(_=D)}h&&("number"===g||"auto"!==x)&&(T=(0,M.gF)(E,v,"category"))}else _=h?c()(0,O):l&&l[S]&&l[S].hasStack&&"number"===g?"expand"===p?[0,1]:(0,M.EB)(l[S].stackGroups,s,u):(0,M.s6)(E,r.filter(function(e){return e.props[a]===S&&(k||!e.props.hide)}),g,d,!0);"number"===g?(_=e_(f,_,S,o,w),I&&(_=(0,M.LG)(I,_,y))):"category"===g&&I&&_.every(function(e){return I.indexOf(e)>=0})&&(_=I)}return tt(tt({},t),{},tn({},S,tt(tt({},n.props),{},{axisType:o,domain:_,categoricalDomain:T,duplicateDomain:P,originalDomain:null!==(j=n.props.domain)&&void 0!==j?j:C,isCategorical:h,layout:d})))},{})},th=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,l=t.dataStartIndex,s=t.dataEndIndex,u=e.layout,f=e.children,p=tc(e.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:s}),h=p.length,m=(0,M.NA)(u,o),g=-1;return n.reduce(function(e,t){var v,y=t.props[i],b=tu("number");return e[y]?e:(g++,v=m?c()(0,h):a&&a[y]&&a[y].hasStack?e_(f,v=(0,M.EB)(a[y].stackGroups,l,s),y,o):e_(f,v=(0,M.LG)(b,(0,M.s6)(p,n.filter(function(e){return e.props[i]===y&&!e.props.hide}),"number",u),r.defaultProps.allowDataOverflow),y,o),tt(tt({},e),{},tn({},y,tt(tt({axisType:o},r.defaultProps),{},{hide:!0,orientation:d()(to,"".concat(o,".").concat(g%2),null),domain:v,originalDomain:b,isCategorical:m,layout:u}))))},{})},tm=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,i=t.graphicalItems,a=t.stackGroups,l=t.dataStartIndex,s=t.dataEndIndex,c=e.children,u="".concat(r,"Id"),d=(0,_.NN)(c,o),f={};return d&&d.length?f=tp(e,{axes:d,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:l,dataEndIndex:s}):i&&i.length&&(f=th(e,{Axis:o,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:l,dataEndIndex:s})),f},tg=function(e){var t=(0,N.Kt)(e),n=(0,M.uY)(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:p()(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:(0,M.zT)(t,n)}},tv=function(e){var t=e.children,n=e.defaultShowTooltip,r=(0,_.sP)(t,Y),o=0,i=0;return e.data&&0!==e.data.length&&(i=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(i=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!n}},ty=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},tb=function(e,t){var n=e.props,r=e.graphicalItems,o=e.xAxisMap,i=void 0===o?{}:o,a=e.yAxisMap,l=void 0===a?{}:a,s=n.width,c=n.height,u=n.children,f=n.margin||{},p=(0,_.sP)(u,Y),h=(0,_.sP)(u,O.D),m=Object.keys(l).reduce(function(e,t){var n=l[t],r=n.orientation;return n.mirror||n.hide?e:tt(tt({},e),{},tn({},r,e[r]+n.width))},{left:f.left||0,right:f.right||0}),g=Object.keys(i).reduce(function(e,t){var n=i[t],r=n.orientation;return n.mirror||n.hide?e:tt(tt({},e),{},tn({},r,d()(e,"".concat(r))+n.height))},{top:f.top||0,bottom:f.bottom||0}),v=tt(tt({},g),m),y=v.bottom;p&&(v.bottom+=p.props.height||Y.defaultProps.height),h&&t&&(v=(0,M.By)(v,r,n,t));var b=s-v.left-v.right,x=c-v.top-v.bottom;return tt(tt({brushBottom:y},v),{},{width:Math.max(b,0),height:Math.max(x,0)})},tx=function(e){var t,n=e.chartName,o=e.GraphicalChild,a=e.defaultTooltipEventType,s=void 0===a?"axis":a,c=e.validateTooltipEventTypes,u=void 0===c?["axis"]:c,f=e.axisComponents,p=e.legendContent,h=e.formatAxisMap,g=e.defaultProps,y=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,a=t.updateId,l=t.dataStartIndex,s=t.dataEndIndex,c=e.barSize,u=e.layout,d=e.barGap,p=e.barCategoryGap,h=e.maxBarSize,m=ty(u),g=m.numericAxisName,v=m.cateAxisName,y=!!n&&!!n.length&&n.some(function(e){var t=(0,_.Gf)(e&&e.type);return t&&t.indexOf("Bar")>=0})&&(0,M.pt)({barSize:c,stackGroups:r}),b=[];return n.forEach(function(n,c){var m,x=tc(e.data,{graphicalItems:[n],dataStartIndex:l,dataEndIndex:s}),k=n.props,S=k.dataKey,E=k.maxBarSize,O=n.props["".concat(g,"Id")],C=n.props["".concat(v,"Id")],j=f.reduce(function(e,r){var o,i=t["".concat(r.axisType,"Map")],a=n.props["".concat(r.axisType,"Id")];i&&i[a]||"zAxis"===r.axisType||(0,w.Z)(!1);var l=i[a];return tt(tt({},e),{},(tn(o={},r.axisType,l),tn(o,"".concat(r.axisType,"Ticks"),(0,M.uY)(l)),o))},{}),P=j[v],T=j["".concat(v,"Ticks")],N=r&&r[O]&&r[O].hasStack&&(0,M.O3)(n,r[O].stackGroups),A=(0,_.Gf)(n.type).indexOf("Bar")>=0,I=(0,M.zT)(P,T),R=[];if(A){var D,L,z=i()(E)?h:E,Z=null!==(D=null!==(L=(0,M.zT)(P,T,!0))&&void 0!==L?L:z)&&void 0!==D?D:0;R=(0,M.qz)({barGap:d,barCategoryGap:p,bandSize:Z!==I?Z:I,sizeList:y[C],maxBarSize:z}),Z!==I&&(R=R.map(function(e){return tt(tt({},e),{},{position:tt(tt({},e.position),{},{offset:e.position.offset-Z/2})})}))}var B=n&&n.type&&n.type.getComposedData;B&&b.push({props:tt(tt({},B(tt(tt({},j),{},{displayedData:x,props:e,dataKey:S,item:n,bandSize:I,barPosition:R,offset:o,stackedData:N,layout:u,dataStartIndex:l,dataEndIndex:s}))),{},(tn(m={key:n.key||"item-".concat(c)},g,j[g]),tn(m,v,j[v]),tn(m,"animationId",a),m)),childIndex:(0,_.$R)(n,e.children),item:n})}),b},O=function(e,t){var r=e.props,i=e.dataStartIndex,a=e.dataEndIndex,l=e.updateId;if(!(0,_.TT)({props:r}))return null;var s=r.children,c=r.layout,u=r.stackOffset,d=r.data,p=r.reverseStackOrder,m=ty(c),g=m.numericAxisName,v=m.cateAxisName,b=(0,_.NN)(s,o),x=(0,M.wh)(d,b,"".concat(g,"Id"),"".concat(v,"Id"),u,p),w=f.reduce(function(e,t){var n="".concat(t.axisType,"Map");return tt(tt({},e),{},tn({},n,tm(r,tt(tt({},t),{},{graphicalItems:b,stackGroups:t.axisType===g&&x,dataStartIndex:i,dataEndIndex:a}))))},{}),k=tb(tt(tt({},w),{},{props:r,graphicalItems:b}),null==t?void 0:t.legendBBox);Object.keys(w).forEach(function(e){w[e]=h(r,w[e],k,e.replace("Map",""),n)});var S=tg(w["".concat(v,"Map")]),E=y(r,tt(tt({},w),{},{dataStartIndex:i,dataEndIndex:a,updateId:l,graphicalItems:b,stackGroups:x,offset:k}));return tt(tt({formattedGraphicalItems:E,graphicalItems:b,offset:k,stackGroups:x},S),w)};return t=function(e){(function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&e3(e,t)})(c,e);var t,o,a=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=e8(c);return e=t?Reflect.construct(n,arguments,e8(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===e0(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return e6(e)}(this,e)});function c(e){var t,o,s;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,c),tn(e6(s=a.call(this,e)),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),tn(e6(s),"accessibilityManager",new ez),tn(e6(s),"handleLegendBBoxUpdate",function(e){if(e){var t=s.state,n=t.dataStartIndex,r=t.dataEndIndex,o=t.updateId;s.setState(tt({legendBBox:e},O({props:s.props,dataStartIndex:n,dataEndIndex:r,updateId:o},tt(tt({},s.state),{},{legendBBox:e}))))}}),tn(e6(s),"handleReceiveSyncEvent",function(e,t,n){s.props.syncId===e&&(n!==s.eventEmitterSymbol||"function"==typeof s.props.syncMethod)&&s.applySyncEvent(t)}),tn(e6(s),"handleBrushChange",function(e){var t=e.startIndex,n=e.endIndex;if(t!==s.state.dataStartIndex||n!==s.state.dataEndIndex){var r=s.state.updateId;s.setState(function(){return tt({dataStartIndex:t,dataEndIndex:n},O({props:s.props,dataStartIndex:t,dataEndIndex:n,updateId:r},s.state))}),s.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),tn(e6(s),"handleMouseEnter",function(e){var t=s.getMouseInfo(e);if(t){var n=tt(tt({},t),{},{isTooltipActive:!0});s.setState(n),s.triggerSyncEvent(n);var r=s.props.onMouseEnter;l()(r)&&r(n,e)}}),tn(e6(s),"triggeredAfterMouseMove",function(e){var t=s.getMouseInfo(e),n=t?tt(tt({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};s.setState(n),s.triggerSyncEvent(n);var r=s.props.onMouseMove;l()(r)&&r(n,e)}),tn(e6(s),"handleItemMouseEnter",function(e){s.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),tn(e6(s),"handleItemMouseLeave",function(){s.setState(function(){return{isTooltipActive:!1}})}),tn(e6(s),"handleMouseMove",function(e){e.persist(),s.throttleTriggeredAfterMouseMove(e)}),tn(e6(s),"handleMouseLeave",function(e){var t={isTooltipActive:!1};s.setState(t),s.triggerSyncEvent(t);var n=s.props.onMouseLeave;l()(n)&&n(t,e)}),tn(e6(s),"handleOuterEvent",function(e){var t,n=(0,_.Bh)(e),r=d()(s.props,"".concat(n));n&&l()(r)&&r(null!==(t=/.*touch.*/i.test(n)?s.getMouseInfo(e.changedTouches[0]):s.getMouseInfo(e))&&void 0!==t?t:{},e)}),tn(e6(s),"handleClick",function(e){var t=s.getMouseInfo(e);if(t){var n=tt(tt({},t),{},{isTooltipActive:!0});s.setState(n),s.triggerSyncEvent(n);var r=s.props.onClick;l()(r)&&r(n,e)}}),tn(e6(s),"handleMouseDown",function(e){var t=s.props.onMouseDown;l()(t)&&t(s.getMouseInfo(e),e)}),tn(e6(s),"handleMouseUp",function(e){var t=s.props.onMouseUp;l()(t)&&t(s.getMouseInfo(e),e)}),tn(e6(s),"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&s.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),tn(e6(s),"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&s.handleMouseDown(e.changedTouches[0])}),tn(e6(s),"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&s.handleMouseUp(e.changedTouches[0])}),tn(e6(s),"triggerSyncEvent",function(e){void 0!==s.props.syncId&&eN.emit(eA,s.props.syncId,e,s.eventEmitterSymbol)}),tn(e6(s),"applySyncEvent",function(e){var t=s.props,n=t.layout,r=t.syncMethod,o=s.state.updateId,i=e.dataStartIndex,a=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)s.setState(tt({dataStartIndex:i,dataEndIndex:a},O({props:s.props,dataStartIndex:i,dataEndIndex:a,updateId:o},s.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,u=e.activeTooltipIndex,d=s.state,f=d.offset,p=d.tooltipTicks;if(!f)return;if("function"==typeof r)u=r(p,e);else if("value"===r){u=-1;for(var h=0;h=0){if(u.dataKey&&!u.allowDuplicatedCategory){var j="function"==typeof u.dataKey?function(e){return"function"==typeof u.dataKey?u.dataKey(e.payload):null}:"payload.".concat(u.dataKey.toString());T=(0,N.Ap)(g,j,f),A=v&&y&&(0,N.Ap)(y,j,f)}else T=null==g?void 0:g[d],A=v&&y&&y[d];if(S||k){var P=void 0!==e.props.activeIndex?e.props.activeIndex:d;return[(0,r.cloneElement)(e,tt(tt(tt({},o.props),O),{},{activeIndex:P})),null,null]}if(!i()(T))return[C].concat(e5(s.renderActivePoints({item:o,activePoint:T,basePoint:A,childIndex:d,isRange:v})))}else{var T,A,I,R=(null!==(I=s.getItemByXY(s.state.activeCoordinate))&&void 0!==I?I:{graphicalItem:C}).graphicalItem,D=R.item,L=void 0===D?e:D,z=R.childIndex,Z=tt(tt(tt({},o.props),O),{},{activeIndex:z});return[(0,r.cloneElement)(L,Z),null,null]}}return v?[C,null,null]:[C,null]}),tn(e6(s),"renderCustomized",function(e,t,n){return(0,r.cloneElement)(e,tt(tt({key:"recharts-customized-".concat(n)},s.props),s.state))}),tn(e6(s),"renderMap",{CartesianGrid:{handler:s.renderGrid,once:!0},ReferenceArea:{handler:s.renderReferenceElement},ReferenceLine:{handler:tl},ReferenceDot:{handler:s.renderReferenceElement},XAxis:{handler:tl},YAxis:{handler:tl},Brush:{handler:s.renderBrush,once:!0},Bar:{handler:s.renderGraphicChild},Line:{handler:s.renderGraphicChild},Area:{handler:s.renderGraphicChild},Radar:{handler:s.renderGraphicChild},RadialBar:{handler:s.renderGraphicChild},Scatter:{handler:s.renderGraphicChild},Pie:{handler:s.renderGraphicChild},Funnel:{handler:s.renderGraphicChild},Tooltip:{handler:s.renderCursor,once:!0},PolarGrid:{handler:s.renderPolarGrid,once:!0},PolarAngleAxis:{handler:s.renderPolarAxis},PolarRadiusAxis:{handler:s.renderPolarAxis},Customized:{handler:s.renderCustomized}}),s.clipPathId="".concat(null!==(t=e.id)&&void 0!==t?t:(0,N.EL)("recharts"),"-clip"),s.throttleTriggeredAfterMouseMove=m()(s.triggeredAfterMouseMove,null!==(o=e.throttleDelay)&&void 0!==o?o:1e3/60),s.state={},s}return o=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,i=(0,_.sP)(t,E.u);if(i){var a=i.props.defaultIndex;if("number"==typeof a&&!(a<0)&&!(a>this.state.tooltipTicks.length)){var l=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,s=td(this.state,n,a,l),c=this.state.tooltipTicks[a].coordinate,u=(this.state.offset.top+r)/2,d="horizontal"===o?{x:c,y:u}:{y:c,x:u},f=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});f&&(d=tt(tt({},d),f.props.points[a].tooltipPosition),s=f.props.points[a].tooltipPayload);var p={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:l,activePayload:s,activeCoordinate:d};this.setState(p),this.renderCursor(i),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin){var n,r;this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}})}return null}},{key:"componentDidUpdate",value:function(e){(0,_.rL)([(0,_.sP)(e.children,E.u)],[(0,_.sP)(this.props.children,E.u)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=(0,_.sP)(this.props.children,E.u);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return u.indexOf(t)>=0?t:s}return s}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=(0,Q.os)(n),o={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},i=n.width/t.offsetWidth||1,a=this.inRange(o.chartX,o.chartY,i);if(!a)return null;var l=this.state,s=l.xAxisMap,c=l.yAxisMap;if("axis"!==this.getTooltipEventType()&&s&&c){var u=(0,N.Kt)(s).scale,d=(0,N.Kt)(c).scale,f=u&&u.invert?u.invert(o.chartX):null,p=d&&d.invert?d.invert(o.chartY):null;return tt(tt({},o),{},{xValue:f,yValue:p})}var h=tf(this.state,this.props.data,this.props.layout,a);return h?tt(tt({},o),h):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,i=t/n;if("horizontal"===r||"vertical"===r){var a=this.state.offset;return o>=a.left&&o<=a.left+a.width&&i>=a.top&&i<=a.top+a.height?{x:o,y:i}:null}var l=this.state,s=l.angleAxisMap,c=l.radiusAxisMap;if(s&&c){var u=(0,N.Kt)(s);return(0,eP.z3)({x:o,y:i},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=(0,_.sP)(e,E.u),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),tt(tt({},(0,eI.Ym)(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){eN.on(eA,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){eN.removeListener(eA,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,i=r.length;oe.length)&&(t=e.length);for(var n=0,r=Array(t);n=0?1:-1;"insideStart"===l?(o=y+E*c,a=w):"insideEnd"===l?(o=b-E*c,a=!w):"end"===l&&(o=b+E*c,a=w),a=S<=0?a:!a;var O=(0,h.op)(f,m,k,o),C=(0,h.op)(f,m,k,o+(a?1:-1)*359),j="M".concat(O.x,",").concat(O.y,"\n A").concat(k,",").concat(k,",0,1,").concat(a?0:1,",\n ").concat(C.x,",").concat(C.y),_=i()(e.id)?(0,p.EL)("recharts-radial-line-"):e.id;return r.createElement("text",x({},n,{dominantBaseline:"central",className:(0,u.Z)("recharts-radial-bar-label",d)}),r.createElement("defs",null,r.createElement("path",{id:_,d:j})),r.createElement("textPath",{xlinkHref:"#".concat(_)},t))},S=function(e){var t=e.viewBox,n=e.offset,r=e.position,o=t.cx,i=t.cy,a=t.innerRadius,l=t.outerRadius,s=(t.startAngle+t.endAngle)/2;if("outside"===r){var c=(0,h.op)(o,i,l+n,s),u=c.x;return{x:u,y:c.y,textAnchor:u>=o?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:o,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:o,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:o,y:i,textAnchor:"middle",verticalAnchor:"end"};var d=(0,h.op)(o,i,(a+l)/2,s);return{x:d.x,y:d.y,textAnchor:"middle",verticalAnchor:"middle"}},E=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,o=e.position,i=t.x,a=t.y,l=t.width,s=t.height,u=s>=0?1:-1,d=u*r,f=u>0?"end":"start",h=u>0?"start":"end",m=l>=0?1:-1,g=m*r,v=m>0?"end":"start",y=m>0?"start":"end";if("top"===o)return b(b({},{x:i+l/2,y:a-u*r,textAnchor:"middle",verticalAnchor:f}),n?{height:Math.max(a-n.y,0),width:l}:{});if("bottom"===o)return b(b({},{x:i+l/2,y:a+s+d,textAnchor:"middle",verticalAnchor:h}),n?{height:Math.max(n.y+n.height-(a+s),0),width:l}:{});if("left"===o){var x={x:i-g,y:a+s/2,textAnchor:v,verticalAnchor:"middle"};return b(b({},x),n?{width:Math.max(x.x-n.x,0),height:s}:{})}if("right"===o){var w={x:i+l+g,y:a+s/2,textAnchor:y,verticalAnchor:"middle"};return b(b({},w),n?{width:Math.max(n.x+n.width-w.x,0),height:s}:{})}var k=n?{width:l,height:s}:{};return"insideLeft"===o?b({x:i+g,y:a+s/2,textAnchor:y,verticalAnchor:"middle"},k):"insideRight"===o?b({x:i+l-g,y:a+s/2,textAnchor:v,verticalAnchor:"middle"},k):"insideTop"===o?b({x:i+l/2,y:a+d,textAnchor:"middle",verticalAnchor:h},k):"insideBottom"===o?b({x:i+l/2,y:a+s-d,textAnchor:"middle",verticalAnchor:f},k):"insideTopLeft"===o?b({x:i+g,y:a+d,textAnchor:y,verticalAnchor:h},k):"insideTopRight"===o?b({x:i+l-g,y:a+d,textAnchor:v,verticalAnchor:h},k):"insideBottomLeft"===o?b({x:i+g,y:a+s-d,textAnchor:y,verticalAnchor:f},k):"insideBottomRight"===o?b({x:i+l-g,y:a+s-d,textAnchor:v,verticalAnchor:f},k):c()(o)&&((0,p.hj)(o.x)||(0,p.hU)(o.x))&&((0,p.hj)(o.y)||(0,p.hU)(o.y))?b({x:i+(0,p.h1)(o.x,l),y:a+(0,p.h1)(o.y,s),textAnchor:"end",verticalAnchor:"end"},k):b({x:i+l/2,y:a+s/2,textAnchor:"middle",verticalAnchor:"middle"},k)};function O(e){var t,n=e.offset,o=b({offset:void 0===n?5:n},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,g)),a=o.viewBox,s=o.position,c=o.value,h=o.children,m=o.content,v=o.className,y=o.textBreakAll;if(!a||i()(c)&&i()(h)&&!(0,r.isValidElement)(m)&&!l()(m))return null;if((0,r.isValidElement)(m))return(0,r.cloneElement)(m,o);if(l()(m)){if(t=(0,r.createElement)(m,o),(0,r.isValidElement)(t))return t}else t=w(o);var O="cx"in a&&(0,p.hj)(a.cx),C=(0,f.L6)(o,!0);if(O&&("insideStart"===s||"insideEnd"===s||"end"===s))return k(o,t,C);var j=O?S(o):E(o);return r.createElement(d.x,x({className:(0,u.Z)("recharts-label",void 0===v?"":v)},C,j,{breakAll:y}),t)}O.displayName="Label";var C=function(e){var t=e.cx,n=e.cy,r=e.angle,o=e.startAngle,i=e.endAngle,a=e.r,l=e.radius,s=e.innerRadius,c=e.outerRadius,u=e.x,d=e.y,f=e.top,h=e.left,m=e.width,g=e.height,v=e.clockWise,y=e.labelViewBox;if(y)return y;if((0,p.hj)(m)&&(0,p.hj)(g)){if((0,p.hj)(u)&&(0,p.hj)(d))return{x:u,y:d,width:m,height:g};if((0,p.hj)(f)&&(0,p.hj)(h))return{x:f,y:h,width:m,height:g}}return(0,p.hj)(u)&&(0,p.hj)(d)?{x:u,y:d,width:0,height:0}:(0,p.hj)(t)&&(0,p.hj)(n)?{cx:t,cy:n,startAngle:o||r||0,endAngle:i||r||0,innerRadius:s||0,outerRadius:c||l||a||0,clockWise:v}:e.viewBox?e.viewBox:{}};O.parseViewBox=C,O.renderCallByParent=function(e,t){var n,o,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!e||!e.children&&i&&!e.label)return null;var a=e.children,s=C(e),u=(0,f.NN)(a,O).map(function(e,n){return(0,r.cloneElement)(e,{viewBox:t||s,key:"label-".concat(n)})});return i?[(n=e.label,o=t||s,n?!0===n?r.createElement(O,{key:"label-implicit",viewBox:o}):(0,p.P2)(n)?r.createElement(O,{key:"label-implicit",viewBox:o,value:n}):(0,r.isValidElement)(n)?n.type===O?(0,r.cloneElement)(n,{key:"label-implicit",viewBox:o}):r.createElement(O,{key:"label-implicit",content:n,viewBox:o}):l()(n)?r.createElement(O,{key:"label-implicit",content:n,viewBox:o}):c()(n)?r.createElement(O,x({viewBox:o},n,{key:"label-implicit"})):null:null)].concat(function(e){if(Array.isArray(e))return v(e)}(u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e,t){if(e){if("string"==typeof e)return v(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,void 0)}}(u)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):u}},58772:function(e,t,n){"use strict";n.d(t,{e:function(){return O}});var r=n(2265),o=n(77571),i=n.n(o),a=n(28302),l=n.n(a),s=n(86757),c=n.n(s),u=n(86185),d=n.n(u),f=n(26680),p=n(9841),h=n(82944),m=n(85355);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var v=["valueAccessor"],y=["data","dataKey","clockWise","id","textBreakAll"];function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(e){return Array.isArray(e.value)?d()(e.value):e.value};function O(e){var t=e.valueAccessor,n=void 0===t?E:t,o=S(e,v),a=o.data,l=o.dataKey,s=o.clockWise,c=o.id,u=o.textBreakAll,d=S(o,y);return a&&a.length?r.createElement(p.m,{className:"recharts-label-list"},a.map(function(e,t){var o=i()(l)?n(e,t):(0,m.F$)(e&&e.payload,l),a=i()(c)?{}:{id:"".concat(c,"-").concat(t)};return r.createElement(f._,x({},(0,h.L6)(e,!0),d,a,{parentViewBox:e.parentViewBox,value:o,textBreakAll:u,viewBox:f._.parseViewBox(i()(s)?e:k(k({},e),{},{clockWise:s})),key:"label-".concat(t),index:t}))})):null}O.displayName="LabelList",O.renderCallByParent=function(e,t){var n,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!e||!e.children&&o&&!e.label)return null;var i=e.children,a=(0,h.NN)(i,O).map(function(e,n){return(0,r.cloneElement)(e,{data:t,key:"labelList-".concat(n)})});return o?[(n=e.label)?!0===n?r.createElement(O,{key:"labelList-implicit",data:t}):r.isValidElement(n)||c()(n)?r.createElement(O,{key:"labelList-implicit",data:t,content:n}):l()(n)?r.createElement(O,x({data:t},n,{key:"labelList-implicit"})):null:null].concat(function(e){if(Array.isArray(e))return b(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return b(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,void 0)}}(a)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):a}},22190:function(e,t,n){"use strict";n.d(t,{D:function(){return N}});var r=n(2265),o=n(86757),i=n.n(o),a=n(87602),l=n(1175),s=n(48777),c=n(14870),u=n(41637);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t